From ee2838bd9d101a9220031363a70a694dbb83ec61 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Fri, 21 Jun 2019 09:10:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=AF=95=E8=AE=BE=E5=88=86=E7=BB=84=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E8=B0=83=E6=95=B4=E6=9C=80=E5=A4=A7=E5=88=86=E7=BB=84?= =?UTF-8?q?=E4=BA=BA=E6=95=B0=E7=9A=84=E9=BB=98=E8=AE=A4=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/migrate/20190505093440_init_use_index.rb | 6 +++--- db/migrate/20190621010002_change_default_to_max_num.rb | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 db/migrate/20190621010002_change_default_to_max_num.rb diff --git a/db/migrate/20190505093440_init_use_index.rb b/db/migrate/20190505093440_init_use_index.rb index d885c3a9d..b7c3101dd 100644 --- a/db/migrate/20190505093440_init_use_index.rb +++ b/db/migrate/20190505093440_init_use_index.rb @@ -2,8 +2,8 @@ class InitUseIndex < ActiveRecord::Migration[5.2] 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_mail if index_exists?(:users, :mail, name: :index_users_on_mail) - add_index :users, :login, unique: true - add_index :users, :mail, unique: true - add_index :users, :phone, unique: true + # add_index :users, :login, unique: true + # add_index :users, :mail, unique: true + # add_index :users, :phone, unique: true end end diff --git a/db/migrate/20190621010002_change_default_to_max_num.rb b/db/migrate/20190621010002_change_default_to_max_num.rb new file mode 100644 index 000000000..435756cd8 --- /dev/null +++ b/db/migrate/20190621010002_change_default_to_max_num.rb @@ -0,0 +1,5 @@ +class ChangeDefaultToMaxNum < ActiveRecord::Migration[5.2] + def change + change_column :graduation_tasks, :max_num, :integer, default: 5 + end +end