add support for restoring schema on restart (needed only for demo, not normally used)

remotes/origin/pgsql-count-bits-12
Andrew Dolgov 5 years ago
parent 9adf705f70
commit 05d341df89

@ -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…
Cancel
Save