Skip to content

Commit

Permalink
Add already required btree_gist
Browse files Browse the repository at this point in the history
  • Loading branch information
frodrigo committed Jun 20, 2024
1 parent 8458d43 commit 54ca966
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions tools/database/schema.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
CREATE EXTENSION btree_gist;

CREATE OR REPLACE FUNCTION public.marker_elem_ids(elems jsonb[])
RETURNS bigint[]
LANGUAGE sql
Expand Down
4 changes: 3 additions & 1 deletion tools/database/schema_generate.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#! /bin/sh

echo "CREATE EXTENSION btree_gist;" > schema.sql

psql -h "$DB_HOST" -U osmose osmose_frontend -A --tuples-only -c "
SELECT
left(pg_get_functiondef(p.oid), -1) || E';\n'
Expand All @@ -20,6 +22,6 @@ WHERE
(d.objid IS NULL OR proname = 'marker_elem_ids')
ORDER BY
p.proname
" > schema.sql
" >> schema.sql

pg_dump --no-tablespaces -s -O -x -t "backends|markers|categories|markers_counts|class|items|sources|sources_password|stats|markers_status|updates|updates_last" -h "$DB_HOST" -U osmose osmose_frontend >> schema.sql

0 comments on commit 54ca966

Please sign in to comment.