-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add anonymous_id and nullifier for uniqueness (#15)
* add anonymous_id and nullifier for uniqueness * use unique index for: aid and nullifier instead of using unique field in table
- Loading branch information
1 parent
4f07c00
commit 98b7784
Showing
5 changed files
with
76 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
-- +migrate Up | ||
ALTER TABLE verify_users ADD COLUMN anonymous_id TEXT DEFAULT ''; | ||
ALTER TABLE verify_users ADD COLUMN nullifier TEXT DEFAULT ''; | ||
|
||
CREATE UNIQUE INDEX verify_users_anonymous_id_unique ON verify_users(anonymous_id) WHERE anonymous_id != ''; | ||
CREATE UNIQUE INDEX verify_users_nullifier_unique ON verify_users(nullifier) WHERE nullifier != ''; | ||
-- +migrate Down | ||
ALTER TABLE verify_users DROP COLUMN anonymous_id; | ||
ALTER TABLE verify_users DROP COLUMN nullifier; | ||
|
||
DROP INDEX verify_users_anonymous_id_unique; | ||
DROP INDEX verify_users_nullifier_unique; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters