Skip to content

Commit

Permalink
Fix migration.
Browse files Browse the repository at this point in the history
  • Loading branch information
piohei committed Nov 14, 2024
1 parent e823802 commit 6e937eb
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 6e937eb

Please sign in to comment.