Skip to content

Commit 696bb24

Browse files
author
Damian Borowiecki
committed
CM-235: Fixed json_schema extension
1 parent c0d1e63 commit 696bb24

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ FROM postgres:13-alpine
22

33
# Script to detect whether the database has finished initializing
44
COPY ["true_isready.sh", "/usr/local/bin/"]
5-
COPY ["database scripts/00_dump.sql", "database scripts/0[2345]_*.sql", "database scripts/demo_db.sql", "/docker-entrypoint-initdb.d/"]
5+
COPY ["database scripts/00_dump.sql", "database scripts/0[2345]_*.sql", "database scripts/demo_db.sql", "database scripts/json_schema_extension.sql", "/docker-entrypoint-initdb.d/"]
66

77
# Install https://github.com/gavinwahl/postgres-json-schema/
88
# extension that allows validation of jsonb fields against jsonschema
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CREATE EXTENSION "postgres-json-schema";

install_postgres_json_schema_extension.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,3 @@ apk add postgresql-client
1818
/bin/mkdir -p '/usr/local/share/postgresql/extension'
1919

2020
chmod 666 /usr/local/share/postgresql/extension/postgres-json-schema.control
21-
# Add extension to PostgreSQL
22-
# Assuming you're operating in the psql shell
23-
psql -U $POSTGRES_USER -d $POSTGRES_DB -c "CREATE EXTENSION \"postgres-json-schema\";"

0 commit comments

Comments
 (0)