本地版实训迁移

dev_aliyun
cxt 5 years ago
parent a01e548ac4
commit 7b5ddef6b8

@ -0,0 +1,3 @@
class LocalStage < ActiveRecord::Base
# attr_accessible :description, :local_subject_id, :name, :position, :shixuns_count, :subject_id
end

@ -0,0 +1,3 @@
class LocalStageShixun < ActiveRecord::Base
# attr_accessible :local_subject_id, :position, :shixun_id, :stage_id, :subject_id
end

@ -0,0 +1,3 @@
class LocalSubject < ActiveRecord::Base
# attr_accessible :description, :introduction, :learning_notes, :name, :shixuns_count, :stage_shixuns_count, :stages_count, :status
end

@ -0,0 +1,17 @@
class CreateLocalSubjects < ActiveRecord::Migration
def change
create_table :local_subjects do |t|
t.string :name
t.text :description
t.integer :status
t.text :learning_notes
t.string :introduction
t.integer :stages_count
t.integer :stage_shixuns_count
t.integer :shixuns_count
t.integer :subject_id
t.timestamps
end
end
end

@ -0,0 +1,14 @@
class CreateLocalStages < ActiveRecord::Migration
def change
create_table :local_stages do |t|
t.integer :subject_id
t.string :name
t.text :description
t.integer :position
t.integer :shixuns_count
t.integer :local_subject_id
t.timestamps
end
end
end

@ -0,0 +1,15 @@
class CreateLocalStageShixuns < ActiveRecord::Migration
def change
create_table :local_stage_shixuns do |t|
t.integer :subject_id
t.integer :local_subject_id
t.integer :stage_id
t.integer :local_stage_id
t.integer :shixun_id
t.integer :local_shixun_id
t.integer :position
t.timestamps
end
end
end
Loading…
Cancel
Save