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
534 B
19 lines
534 B
class CreateSubjectUserInfos < ActiveRecord::Migration[5.2]
|
|
def change
|
|
create_table :subject_user_infos do |t|
|
|
t.references :user
|
|
t.references :subject
|
|
t.string :username
|
|
t.integer :passed_myshixun_count, default: 0
|
|
t.integer :passed_games_count, default: 0
|
|
t.integer :code_line_count, default: 0
|
|
t.integer :evaluate_count, default: 0
|
|
t.integer :cost_time, default: 0
|
|
t.timestamps
|
|
end
|
|
|
|
add_index :subject_user_infos, [:user_id, :subject_id], unique: true
|
|
|
|
end
|
|
end
|