mirror of
https://github.com/penpot/penpot.git
synced 2025-01-24 07:29:08 -05:00
Exclude from unique index users marked for delete.
This commit is contained in:
parent
2ba3d27db6
commit
1efd25a0e5
1 changed files with 4 additions and 2 deletions
|
@ -24,10 +24,12 @@ VALUES ('00000000-0000-0000-0000-000000000000'::uuid,
|
||||||
''::bytea);
|
''::bytea);
|
||||||
|
|
||||||
CREATE UNIQUE INDEX users_username_idx
|
CREATE UNIQUE INDEX users_username_idx
|
||||||
ON users USING btree (username);
|
ON users WHERE deleted_at is null
|
||||||
|
USING btree (username) ;
|
||||||
|
|
||||||
CREATE UNIQUE INDEX users_email_idx
|
CREATE UNIQUE INDEX users_email_idx
|
||||||
ON users USING btree (email);
|
ON users WHERE deleted_at is null
|
||||||
|
USING btree (email);
|
||||||
|
|
||||||
CREATE TRIGGER users_modified_at_tgr BEFORE UPDATE ON users
|
CREATE TRIGGER users_modified_at_tgr BEFORE UPDATE ON users
|
||||||
FOR EACH ROW EXECUTE PROCEDURE update_modified_at();
|
FOR EACH ROW EXECUTE PROCEDURE update_modified_at();
|
||||||
|
|
Loading…
Add table
Reference in a new issue