add support for restoring schema on restart (needed only for demo, not normally used)
This commit is contained in:
parent
9adf705f70
commit
05d341df89
|
@ -40,7 +40,11 @@ done
|
|||
|
||||
$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
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in New Issue