Skip to content

Commit b501412

Browse files
Made DROP FUNCTION commands idempotent
1 parent 7609148 commit b501412

File tree

1 file changed

+20
-19
lines changed

1 file changed

+20
-19
lines changed

sql/pg-microsharding-down.sql

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
1-
DROP FUNCTION microsharding_active_shards_();
2-
DROP FUNCTION microsharding_advisory_lock_();
3-
DROP FUNCTION microsharding_debug_fdw_create(text, text[]);
4-
DROP FUNCTION microsharding_debug_fdw_drop(text);
5-
DROP FUNCTION microsharding_debug_fdw_schemas_(text);
6-
DROP FUNCTION microsharding_debug_views_create(text, text);
7-
DROP FUNCTION microsharding_debug_views_drop(text);
8-
DROP FUNCTION microsharding_do_on_each(text);
9-
DROP FUNCTION microsharding_ensure_absent(integer, integer);
10-
DROP FUNCTION microsharding_ensure_active_shards_(text[]);
11-
DROP FUNCTION microsharding_ensure_active(integer, integer);
12-
DROP FUNCTION microsharding_ensure_exist(integer, integer);
13-
DROP FUNCTION microsharding_ensure_inactive(integer, integer);
14-
DROP FUNCTION microsharding_fmt_(text, integer);
15-
DROP FUNCTION microsharding_list_active_shards();
16-
DROP FUNCTION microsharding_migration_after(text, text, text);
17-
DROP FUNCTION microsharding_migration_before(text);
18-
DROP FUNCTION microsharding_notice_locks_(text, timestamptz);
19-
DROP FUNCTION microsharding_schema_name_(integer);
1+
DROP FUNCTION IF EXISTS microsharding_active_shards_();
2+
DROP FUNCTION IF EXISTS microsharding_advisory_lock_();
3+
DROP FUNCTION IF EXISTS microsharding_debug_fdw_create(text, text[]);
4+
DROP FUNCTION IF EXISTS microsharding_debug_fdw_drop(text);
5+
DROP FUNCTION IF EXISTS microsharding_debug_fdw_schemas_(text);
6+
DROP FUNCTION IF EXISTS microsharding_debug_views_create(text, text);
7+
DROP FUNCTION IF EXISTS microsharding_debug_views_drop(text);
8+
DROP FUNCTION IF EXISTS microsharding_do_on_each(text);
9+
DROP FUNCTION IF EXISTS microsharding_ensure_absent(integer, integer);
10+
DROP FUNCTION IF EXISTS microsharding_ensure_active_shards_(text[]);
11+
DROP FUNCTION IF EXISTS microsharding_ensure_active(integer, integer);
12+
DROP FUNCTION IF EXISTS microsharding_ensure_exist(integer, integer);
13+
DROP FUNCTION IF EXISTS microsharding_ensure_exist(integer, integer, varchar);
14+
DROP FUNCTION IF EXISTS microsharding_ensure_inactive(integer, integer);
15+
DROP FUNCTION IF EXISTS microsharding_fmt_(text, integer);
16+
DROP FUNCTION IF EXISTS microsharding_list_active_shards();
17+
DROP FUNCTION IF EXISTS microsharding_migration_after(text, text, text);
18+
DROP FUNCTION IF EXISTS microsharding_migration_before(text);
19+
DROP FUNCTION IF EXISTS microsharding_notice_locks_(text, timestamptz);
20+
DROP FUNCTION IF EXISTS microsharding_schema_name_(integer);

0 commit comments

Comments
 (0)