Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,20 @@ alter table
rename column
health_new to health;

-- Drop imported subgraph_deployment tables from other shards so that we
-- can drop our local 'health' type
-- graph-node startup will recreate the foreign table import
do $$
declare r record;
begin
for r in select foreign_table_schema as nsp
from information_schema.foreign_tables
where foreign_table_schema like 'shard_%'
and foreign_table_name = 'subgraph_deployment'
loop
execute 'drop foreign table ' || r.nsp || '.subgraph_deployment';
end loop;
end
$$;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to do the same in the down migration too.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I looked at the down migration, and I think that is fine, since when we run the down migration, the imported tables don't reference anything.


drop type subgraphs."health";