You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
educoder/db/migrate/20200320074850_create_colle...

14 lines
304 B

class CreateCollections < ActiveRecord::Migration[5.2]
def change
create_table :collections do |t|
t.references :user, index: true
t.integer :container_id
t.string :container_type
t.timestamps
end
add_index :collections, [:container_type, :container_id]
end
end