Add a new migration that updates the graph tables (nodes, channels and policies) in preparation for the new columns required for V2 announcements. This migration has to be added to the set of "live" migrations instead of "dev only" since it edits the columns of existing tables and so changes the existing sql models. We are going to prep the SQLStore code to handle the V2 types in the coming commits, so we need this migration to be in place. In this commit we also remove the TestSchemaMigrationIdempotency test since this test fails with the new "ALTER TABLE" migrations which dont have "IF NOT EXISTS" options like tables and indexes do. Migrations should be idempotent anyways due to the migration tracker file and/or the sqlc migration tracker.
17 lines
686 B
SQL
17 lines
686 B
SQL
-- Remove the block_height column from graph_nodes
|
|
ALTER TABLE graph_nodes DROP COLUMN block_height;
|
|
|
|
-- Remove the signature column from graph_channels
|
|
ALTER TABLE graph_channels DROP COLUMN signature;
|
|
|
|
-- Remove the funding_pk_script column from graph_channels
|
|
ALTER TABLE graph_channels DROP COLUMN funding_pk_script;
|
|
|
|
-- Remove the merkle_root_hash column from graph_channels
|
|
ALTER TABLE graph_channels DROP COLUMN merkle_root_hash;
|
|
|
|
-- Remove the block_height column from graph_channel_policies
|
|
ALTER TABLE graph_channel_policies DROP COLUMN block_height;
|
|
|
|
-- Remove the disable_flags column from graph_channel_policies
|
|
ALTER TABLE graph_channel_policies DROP COLUMN disable_flags; |