毕设分组任务调整最大分组人数的默认值

dev_course
cxt 6 years ago
parent be653f8a94
commit ee2838bd9d

@ -2,8 +2,8 @@ class InitUseIndex < ActiveRecord::Migration[5.2]
def change def change
remove_index :users, name: :index_users_on_login if index_exists?(:users, :login, name: :index_users_on_login) remove_index :users, name: :index_users_on_login if index_exists?(:users, :login, name: :index_users_on_login)
remove_index :users, name: :index_users_on_mail if index_exists?(:users, :mail, name: :index_users_on_mail) remove_index :users, name: :index_users_on_mail if index_exists?(:users, :mail, name: :index_users_on_mail)
add_index :users, :login, unique: true # add_index :users, :login, unique: true
add_index :users, :mail, unique: true # add_index :users, :mail, unique: true
add_index :users, :phone, unique: true # add_index :users, :phone, unique: true
end end
end end

@ -0,0 +1,5 @@
class ChangeDefaultToMaxNum < ActiveRecord::Migration[5.2]
def change
change_column :graduation_tasks, :max_num, :integer, default: 5
end
end
Loading…
Cancel
Save