Skip to content

Commit fe45fe9

Browse files
committed
Fix migrations
1 parent 10ee723 commit fe45fe9

3 files changed

+2
-38
lines changed

schema/migration-2-0034-20231218.sql

-19
This file was deleted.

schema/migration-2-0034-20231220.sql

+2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@ BEGIN
88
IF next_version = 34 THEN
99
EXECUTE 'CREATe TABLE "off_chain_vote_data"("id" SERIAL8 PRIMARY KEY UNIQUE,"voting_anchor_id" INT8 NOT NULL,"hash" BYTEA NOT NULL,"json" jsonb NOT NULL,"bytes" bytea NOT NULL)' ;
1010
EXECUTE 'ALTER TABLE "off_chain_vote_data" ADD CONSTRAINT "unique_off_chain_vote_data" UNIQUE("voting_anchor_id","hash")' ;
11+
EXECUTE 'ALTER TABLE "off_chain_vote_data" ADD COLUMN "warning" VARCHAR NULL' ;
1112
EXECUTE 'CREATe TABLE "off_chain_vote_fetch_error"("id" SERIAL8 PRIMARY KEY UNIQUE,"voting_anchor_id" INT8 NOT NULL,"fetch_error" VARCHAR NOT NULL,"fetch_time" timestamp NOT NULL,"retry_count" word31type NOT NULL)' ;
1213
EXECUTE 'ALTER TABLE "off_chain_vote_fetch_error" ADD CONSTRAINT "unique_off_chain_vote_fetch_error" UNIQUE("voting_anchor_id","retry_count")' ;
14+
EXECUTE 'CREATe TABLE "constitution"("id" SERIAL8 PRIMARY KEY UNIQUE,"gov_action_proposal_id" INT8 NOT NULL,"voting_anchor_id" INT8 NOT NULL,"script_hash" hash28type NULL)' ;
1315
-- Hand written SQL statements can be added here.
1416
UPDATE schema_version SET stage_two = next_version ;
1517
RAISE NOTICE 'DB has been migrated to stage_two version %', next_version ;

schema/migration-2-0035-20231218.sql

-19
This file was deleted.

0 commit comments

Comments
 (0)