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/20191112010611_create_hack_...

13 lines
308 B

class CreateHackUserLastestCodes < ActiveRecord::Migration[5.2]
def change
create_table :hack_user_lastest_codes do |t|
t.references :user
t.references :hack
t.text :code
t.timestamps
end
add_index :hack_user_lastest_codes, [:user_id, :hack_id], unique: true
end
end