diff --git a/marlowe-runtime/changelog.d/20230711_083919_jhbertra_plt_6569_tag_schema_fix.md b/marlowe-runtime/changelog.d/20230711_083919_jhbertra_plt_6569_tag_schema_fix.md new file mode 100644 index 0000000000..31b2613112 --- /dev/null +++ b/marlowe-runtime/changelog.d/20230711_083919_jhbertra_plt_6569_tag_schema_fix.md @@ -0,0 +1,3 @@ +### Fixed + +- Added migration to change tags column from varchar(64) to text. diff --git a/marlowe-runtime/marlowe-indexer/deploy/tag-text.sql b/marlowe-runtime/marlowe-indexer/deploy/tag-text.sql new file mode 100644 index 0000000000..6899676956 --- /dev/null +++ b/marlowe-runtime/marlowe-indexer/deploy/tag-text.sql @@ -0,0 +1,8 @@ +-- Deploy marlowe:tag-text to pg +-- requires: tags + +BEGIN; + +ALTER TABLE marlowe.contractTxOutTag ALTER COLUMN tag TYPE TEXT; + +COMMIT; diff --git a/marlowe-runtime/marlowe-indexer/revert/tag-text.sql b/marlowe-runtime/marlowe-indexer/revert/tag-text.sql new file mode 100644 index 0000000000..eb3e611458 --- /dev/null +++ b/marlowe-runtime/marlowe-indexer/revert/tag-text.sql @@ -0,0 +1,7 @@ +-- Revert marlowe:tag-text from pg + +BEGIN; + +ALTER TABLE marlowe.contractTxOutTag ALTER COLUMN tag TYPE VARCHAR(64); + +COMMIT; diff --git a/marlowe-runtime/marlowe-indexer/sqitch.plan b/marlowe-runtime/marlowe-indexer/sqitch.plan index 855a4c3bef..c696e1694f 100644 --- a/marlowe-runtime/marlowe-indexer/sqitch.plan +++ b/marlowe-runtime/marlowe-indexer/sqitch.plan @@ -9,3 +9,4 @@ withdrawalCreateNotNull [block-cols] 2023-02-03T19:58:45Z Jamie Bertram # Fixes payout columns. indexRoleCurrency [schema] 2023-02-28T21:16:41Z Jamie Bertram # Fixes adds index to role currency columns. tags [schema] 2023-03-02T18:33:26Z Jamie Bertram # Adds contract tags table. +tag-text [tags] 2023-07-11T12:37:05Z Jamie Bertram # Changes tags from varchar(64) to text. diff --git a/marlowe-runtime/marlowe-indexer/verify/tag-text.sql b/marlowe-runtime/marlowe-indexer/verify/tag-text.sql new file mode 100644 index 0000000000..66ee3acf89 --- /dev/null +++ b/marlowe-runtime/marlowe-indexer/verify/tag-text.sql @@ -0,0 +1,7 @@ +-- Verify marlowe:tag-text on pg + +BEGIN; + +-- XXX Add verifications here. + +ROLLBACK;