Skip to content

Commit d219856

Browse files
authored
fix: workaround for tle bug (#622)
* chore: workaround for tle bug * fix: update schema.sql
1 parent c795cea commit d219856

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
-- migrate:up
2+
DO $$
3+
DECLARE
4+
tle_exists boolean;
5+
BEGIN
6+
tle_exists = (
7+
select count(*) = 1
8+
from pg_available_extensions
9+
where name = 'pg_tle'
10+
);
11+
12+
IF tle_exists
13+
THEN
14+
create extension if not exists pg_tle;
15+
drop extension if exists pg_tle;
16+
END IF;
17+
END $$;
18+
19+
-- migrate:down
20+

migrations/schema.sql

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,13 @@ CREATE EXTENSION IF NOT EXISTS pgsodium WITH SCHEMA pgsodium;
6565
COMMENT ON EXTENSION pgsodium IS 'Pgsodium is a modern cryptography library for Postgres.';
6666

6767

68+
--
69+
-- Name: pgtle; Type: SCHEMA; Schema: -; Owner: -
70+
--
71+
72+
CREATE SCHEMA pgtle;
73+
74+
6875
--
6976
-- Name: realtime; Type: SCHEMA; Schema: -; Owner: -
7077
--

0 commit comments

Comments
 (0)