Add unique index on users.username
This commit is contained in:
parent
92d7079171
commit
94320a15e9
2 changed files with 4 additions and 0 deletions
|
@ -1,3 +1,5 @@
|
|||
-- This file should undo anything in `up.sql`
|
||||
|
||||
DROP INDEX index_users_on_username;
|
||||
|
||||
DROP TABLE users;
|
||||
|
|
|
@ -5,3 +5,5 @@ CREATE TABLE users (
|
|||
username VARCHAR NOT NULL,
|
||||
encrypted_password VARCHAR NOT NULL
|
||||
);
|
||||
|
||||
CREATE UNIQUE INDEX index_users_on_username ON users USING btree (username);
|
||||
|
|
Reference in a new issue