You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: 20160602164008_create_tag_groups.rb
    path of file: ./repos/discourse/db/migrate
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

class CreateTagGroups < ActiveRecord::Migration[4.2]
  def change
    create_table :tag_groups do |t|
      t.string :name, null: false
      t.integer :tag_count, null: false, default: 0
      t.timestamps null: false
    end

    create_table :tag_group_memberships do 
    
  def change
    create_table :tag_groups do |t|
      t.string :name, null: false
      t.integer :tag_count, null: false, default: 0
      t.timestamps null: false
    end

    create_table :tag_group_memberships do |t|
      t.references :tag, null: false
      t.references :tag_group, null: false
      t.timestamps null: false
    end

    add_index :tag_group_memberships, %i[tag_group_id tag_id], unique: true
  end