Sha256: 1448032f11a81175ebfdc90209afd26b329cd976a2c07cfca897aa784a5ed3fa

Contents?: true

Size: 232 Bytes

Versions: 8

Compression:

Stored size: 232 Bytes

Contents

class CreateJoinTableCategoriesPosts < ActiveRecord::Migration[6.0]
  def change
    create_join_table :categories, :posts do |t|

      # t.index [:category_id, :post_id]
      # t.index [:post_id, :category_id]

    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
phcdevworks_tutorials-2.1.2 db/migrate/20191003235303_create_join_table_categories_posts.rb
phcdevworks_tutorials-2.1.1 db/migrate/20191003235303_create_join_table_categories_posts.rb
phcdevworks_tutorials-2.1.0 db/migrate/20191003235303_create_join_table_categories_posts.rb
phcdevworks_tutorials-2.0.0 db/migrate/20191003235303_create_join_table_categories_posts.rb
phcdevworks_tutorials-1.2.5 db/migrate/20191003235303_create_join_table_categories_posts.rb
phcdevworks_tutorials-1.2.4 db/migrate/20191003235303_create_join_table_categories_posts.rb
phcdevworks_tutorials-1.2.3 db/migrate/20191003235303_create_join_table_categories_posts.rb
phcdevworks_tutorials-1.2.2 db/migrate/20191003235303_create_join_table_categories_posts.rb