Skip to content
Snippets Groups Projects
Commit 0e3b453d authored by Julien Leduc's avatar Julien Leduc
Browse files

Do not use cta-catalogue-schema-drop to wipe a sqlite database because in this...

Do not use cta-catalogue-schema-drop to wipe a sqlite database because in this case we need to cleanup the full database directory
parent a225c00f
No related branches found
No related tags found
No related merge requests found
......@@ -57,7 +57,11 @@ echo ${DATABASEURL} >/etc/cta/cta-catalogue.conf
if [ "$KEEP_DATABASE" == "0" ]; then
echo "Wiping database"
echo yes | cta-catalogue-schema-drop /etc/cta/cta-catalogue.conf || die "ERROR: Could not wipe database. cta-catalogue-schema-drop /etc/cta/cta-catalogue.conf FAILED"
if [ "$DATABASETYPE" != "sqlite" ]; then
echo yes | cta-catalogue-schema-drop /etc/cta/cta-catalogue.conf || die "ERROR: Could not wipe database. cta-catalogue-schema-drop /etc/cta/cta-catalogue.conf FAILED"
else
rm -fr $(dirname $(echo ${DATABASEURL} | cut -d: -f2))
fi
if [ "$DATABASETYPE" == "sqlite" ]; then
mkdir -p $(dirname $(echo ${DATABASEURL} | cut -d: -f2))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment