We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c86a2ef commit 00c2ff3Copy full SHA for 00c2ff3
schema/migration-2-0036-20240117.sql
@@ -0,0 +1,21 @@
1
+-- Persistent generated migration.
2
+
3
+CREATE FUNCTION migrate() RETURNS void AS $$
4
+DECLARE
5
+ next_version int ;
6
+BEGIN
7
+ SELECT stage_two + 1 INTO next_version FROM schema_version ;
8
+ IF next_version = 36 THEN
9
+ EXECUTE 'ALTER TABLE "tx_out" DROP COLUMN "address_raw"' ;
10
11
+ EXECUTE 'ALTER TABLE "collateral_tx_out" DROP COLUMN "address_raw"' ;
12
+ -- Hand written SQL statements can be added here.
13
+ UPDATE schema_version SET stage_two = next_version ;
14
+ RAISE NOTICE 'DB has been migrated to stage_two version %', next_version ;
15
+ END IF ;
16
+END ;
17
+$$ LANGUAGE plpgsql ;
18
19
+SELECT migrate() ;
20
21
+DROP FUNCTION migrate() ;
0 commit comments