1
0
Fork 0

Add unique index on users.username

This commit is contained in:
Alex Kotov 2020-10-15 05:48:19 +05:00
parent 92d7079171
commit 94320a15e9
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08
2 changed files with 4 additions and 0 deletions

View file

@ -1,3 +1,5 @@
-- This file should undo anything in `up.sql`
DROP INDEX index_users_on_username;
DROP TABLE users;

View file

@ -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);