Skip to content

Commit

Permalink
Merge pull request #823 from worldcoin/piohei/fix_migration
Browse files Browse the repository at this point in the history
Fix migration.
  • Loading branch information
piohei authored Nov 14, 2024
2 parents 12233db + 6e937eb commit 4b8c3c4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 4 additions & 2 deletions schemas/database/016_remove_recovery.down.sql
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ CREATE TABLE recoveries (

ALTER TABLE unprocessed_identities
ADD COLUMN eligibility TIMESTAMPTZ,
ADD COLUMN status VARCHAR(50) NOT NULL,
ADD COLUMN status VARCHAR(50),
ADD COLUMN processed_at TIMESTAMPTZ,
ADD COLUMN error_message TEXT;

UPDATE unprocessed_identities SET status = 'new', eligibility = CURRENT_TIMESTAMP WHERE status IS NULL;

ALTER TABLE unprocessed_identities
DROP CONSTRAINT unique_commitment;
ALTER COLUMN status SET NOT NULL;
4 changes: 0 additions & 4 deletions schemas/database/016_remove_recovery.up.sql
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,3 @@ ALTER TABLE unprocessed_identities
DROP COLUMN status,
DROP COLUMN processed_at,
DROP COLUMN error_message;

ALTER TABLE unprocessed_identities
ADD CONSTRAINT unique_commitment UNIQUE (commitment);

0 comments on commit 4b8c3c4

Please sign in to comment.