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.
trustieforge/db/migrate/20140703085204_clear_course...

12 lines
287 B

class ClearCourseData < ActiveRecord::Migration
def up
# 清理课程表垃圾数据
# 之前删除项目未删除课程的数据
sql = 'delete from courses where name is null and extra not in (select identifier from projects)'
execute(sql)
end
def down
end
end