canvas-lms/db/migrate/20110513162300_add_template...

12 lines
321 B
Ruby

class AddTemplateCourseIdToCourses < ActiveRecord::Migration
def self.up
add_column :courses, :template_course_id, :integer, :limit => 8
add_index :courses, [:template_course_id]
end
def self.down
remove_index :courses, [:template_course_id]
remove_column :courses, :template_course_id
end
end