mirror of
https://github.com/Fluffy-Bean/GameExpo23.git
synced 2025-06-22 15:46:17 +00:00
Add Flask Migrate and update run.sh
This commit is contained in:
parent
77c0711a24
commit
36be8993df
8 changed files with 37 additions and 30 deletions
|
@ -1,19 +1,19 @@
|
|||
#!/bin/sh
|
||||
|
||||
# # Check if migrastions folder exists
|
||||
# if [ ! -d "/data/storage/migrations" ];
|
||||
# then
|
||||
# echo "Creating tables..."
|
||||
# flask --app website db init
|
||||
# fi
|
||||
# Check if migrastions folder exists
|
||||
if [ ! -d "/data/storage/migrations" ];
|
||||
then
|
||||
echo "Creating tables..."
|
||||
flask --app website db init
|
||||
fi
|
||||
|
||||
# # Check if there are any changes to the database
|
||||
# if ! $(flask --app website db check | grep -q "No changes in schema detected.");
|
||||
# then
|
||||
# echo "Database changes detected! Migrating..."
|
||||
# flask --app website db migrate
|
||||
# flask --app website db upgrade
|
||||
# fi
|
||||
# Check if there are any changes to the database
|
||||
if ! $(flask --app website db check | grep -q "No changes in schema detected.");
|
||||
then
|
||||
echo "Database changes detected! Migrating..."
|
||||
flask --app website db migrate
|
||||
flask --app website db upgrade
|
||||
fi
|
||||
|
||||
# Start website!!!!
|
||||
echo "Starting expo website..."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue