Commit 00ee3900 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 46eba24f
......@@ -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))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment