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
