From 1f955df8eedda00e3d963f68163d513b43c35d49 Mon Sep 17 00:00:00 2001 From: Sam Rose Date: Mon, 4 Nov 2024 09:52:18 -0500 Subject: [PATCH] test: check if oriole is available and if so then enable --- migrations/tests/test.sql | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/migrations/tests/test.sql b/migrations/tests/test.sql index 7afa40645..e19a6620d 100644 --- a/migrations/tests/test.sql +++ b/migrations/tests/test.sql @@ -5,6 +5,16 @@ BEGIN; CREATE EXTENSION IF NOT EXISTS pgtap; +-- Check and create OrioleDB if available +DO $$ +BEGIN + IF EXISTS (SELECT 1 FROM pg_available_extensions WHERE name = 'orioledb') THEN + IF NOT EXISTS (SELECT 1 FROM pg_extension WHERE extname = 'orioledb') THEN + CREATE EXTENSION orioledb; + END IF; + END IF; +END $$; + SELECT no_plan(); \ir fixtures.sql