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.
22 lines
642 B
22 lines
642 B
5 years ago
|
class CreateSubjectShixunInfos < ActiveRecord::Migration[5.2]
|
||
|
def change
|
||
|
create_table :subject_shixun_infos do |t|
|
||
|
t.references :subject
|
||
|
t.references :shixun
|
||
|
t.string :stage
|
||
|
t.string :shixun_name
|
||
|
t.integer :challenge_count, default: 0
|
||
|
t.integer :course_count, default: 0
|
||
|
t.integer :school_count, default: 0
|
||
|
t.integer :used_count, default: 0
|
||
|
t.integer :passed_count, default: 0
|
||
|
t.integer :evaluate_count, default: 0
|
||
|
t.integer :passed_ave_time, default: 0
|
||
|
|
||
|
t.timestamps
|
||
|
end
|
||
|
|
||
|
add_index :subject_shixun_infos, [:shixun_id, :subject_id], unique: true
|
||
|
end
|
||
|
end
|