add uniqueness constraint on user names
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
class AddUniqueNameConstraintToUsers < ActiveRecord::Migration
|
||||
def up
|
||||
remove_index :users, :name
|
||||
execute "create unique index index_users_on_name on users(lower(name))"
|
||||
end
|
||||
end
|
||||
@@ -7579,3 +7579,5 @@ INSERT INTO schema_migrations (version) VALUES ('20170330230231');
|
||||
|
||||
INSERT INTO schema_migrations (version) VALUES ('20170413000209');
|
||||
|
||||
INSERT INTO schema_migrations (version) VALUES ('20170414005856');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user