File tree 1 file changed +4
-1
lines changed
1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,8 @@ if [ ! -d "migrations" ]; then
28
28
python3 -m flask db init
29
29
fi
30
30
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
32
33
if [ ! -e " instance/volumes/sqlite.db" ] && [ -e " instance/volumes/sqlite-backup.db" ]; then
33
34
echo " No sqlite.db found, using sqlite-backup.db to generate the file."
34
35
@@ -41,6 +42,8 @@ if [ ! -e "instance/volumes/sqlite.db" ] && [ -e "instance/volumes/sqlite-backup
41
42
42
43
python3 -m flask db stamp " ${backup_version} "
43
44
45
+ # Check if sqlite.db exists
46
+ # . backup before migration
44
47
elif [ -e " instance/volumes/sqlite.db" ]; then
45
48
# Create a timestamp for the backup file
46
49
timestamp=$( date " +%Y%m%d%H%M%S" )
You can’t perform that action at this time.
0 commit comments