Skip to content

Commit 934d2ba

Browse files
committed
add usage comments
1 parent 5ea84fa commit 934d2ba

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

migrate.sh

+4-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ if [ ! -d "migrations" ]; then
2828
python3 -m flask db init
2929
fi
3030

31-
# Check if sqlite.db exists
31+
# Check if sqlite.db does not exists and there is a sqlite-backup.db file
32+
# . restore from backup before migration
3233
if [ ! -e "instance/volumes/sqlite.db" ] && [ -e "instance/volumes/sqlite-backup.db" ]; then
3334
echo "No sqlite.db found, using sqlite-backup.db to generate the file."
3435

@@ -41,6 +42,8 @@ if [ ! -e "instance/volumes/sqlite.db" ] && [ -e "instance/volumes/sqlite-backup
4142

4243
python3 -m flask db stamp "${backup_version}"
4344

45+
# Check if sqlite.db exists
46+
# . backup before migration
4447
elif [ -e "instance/volumes/sqlite.db" ]; then
4548
# Create a timestamp for the backup file
4649
timestamp=$(date "+%Y%m%d%H%M%S")

0 commit comments

Comments
 (0)