From f13d9d35f886e7ed0723ad5a519a8b735d8cce87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Dugovi=C4=8D?= Date: Thu, 19 Sep 2024 15:00:39 +0200 Subject: [PATCH] RHINENG-10032: recreate pg_repack extension --- .../migrations/130_recreate_pg_repack_extension.up.sql | 8 ++++++++ database_admin/schema/create_schema.sql | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 database_admin/migrations/130_recreate_pg_repack_extension.up.sql diff --git a/database_admin/migrations/130_recreate_pg_repack_extension.up.sql b/database_admin/migrations/130_recreate_pg_repack_extension.up.sql new file mode 100644 index 000000000..01358801c --- /dev/null +++ b/database_admin/migrations/130_recreate_pg_repack_extension.up.sql @@ -0,0 +1,8 @@ +DO $$ +BEGIN + DROP EXTENSION IF EXISTS pg_repack; + IF EXISTS (SELECT 1 FROM pg_available_extensions WHERE name = 'pg_repack') THEN + CREATE EXTENSION pg_repack; + END IF; +END +$$; diff --git a/database_admin/schema/create_schema.sql b/database_admin/schema/create_schema.sql index 24527da9e..e129e3841 100644 --- a/database_admin/schema/create_schema.sql +++ b/database_admin/schema/create_schema.sql @@ -7,7 +7,7 @@ CREATE TABLE IF NOT EXISTS schema_migrations INSERT INTO schema_migrations -VALUES (129, false); +VALUES (130, false); -- --------------------------------------------------------------------------- -- Functions