mirror of
https://git.tt-rss.org/fox/ttrss-docker-compose
synced 2025-06-08 13:09:53 +02:00
add support for restoring schema on restart (needed only for demo, not normally used)
This commit is contained in:
parent
9adf705f70
commit
05d341df89
1 changed files with 5 additions and 1 deletions
|
@ -40,7 +40,11 @@ done
|
||||||
|
|
||||||
$PSQL -c "create extension if not exists pg_trgm"
|
$PSQL -c "create extension if not exists pg_trgm"
|
||||||
|
|
||||||
if ! $PSQL -c 'select * from ttrss_version'; then
|
RESTORE_SCHEMA=/var/www/html/tt-rss/backups/restore-schema.sql.gz
|
||||||
|
|
||||||
|
if [ -r $RESTORE_SCHEMA ]; then
|
||||||
|
zcat $RESTORE_SCHEMA | $PSQL
|
||||||
|
elif ! $PSQL -c 'select * from ttrss_version'; then
|
||||||
$PSQL < /var/www/html/tt-rss/schema/ttrss_schema_pgsql.sql
|
$PSQL < /var/www/html/tt-rss/schema/ttrss_schema_pgsql.sql
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue