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.
19 lines
463 B
19 lines
463 B
class CreateHackUserCodes < ActiveRecord::Migration[5.2]
|
|
def change
|
|
create_table :hack_user_codes do |t|
|
|
t.references :user
|
|
t.references :hack
|
|
t.text :code
|
|
t.text :output
|
|
t.text :error_msg
|
|
t.integer :error_line
|
|
t.integer :position
|
|
t.integer :status, default: 0
|
|
t.integer :query_index
|
|
t.timestamps
|
|
end
|
|
|
|
add_index :hack_user_codes, [:user_id, :hack_id, :query_index], unique: true
|
|
end
|
|
end
|