mirror of
https://github.com/Fluffy-Bean/GameExpo23.git
synced 2025-05-27 21:33:11 +00:00
Deepsource Python issues
This commit is contained in:
parent
e0fc37d48a
commit
4d912d314c
10 changed files with 162 additions and 156 deletions
10
TFR/run.sh
10
TFR/run.sh
|
@ -1,15 +1,15 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Wait for database to start
|
||||
until pg_isready -d $DB_NAME -h $DB_HOST -U $DB_USER
|
||||
until pg_isready -d "$DB_NAME" -h "$DB_HOST" -U "$DB_USER"
|
||||
do
|
||||
echo "Waiting for database to start... (5s)"
|
||||
sleep 5
|
||||
echo "Waiting for database to start... (3s)"
|
||||
sleep 3
|
||||
done
|
||||
|
||||
echo "Database is ready!"
|
||||
|
||||
# Check if migrastions folder exists
|
||||
# Check if migrations folder exists
|
||||
if [ ! -d "/data/storage/migrations" ];
|
||||
then
|
||||
echo "Creating tables..."
|
||||
|
@ -17,7 +17,7 @@ then
|
|||
fi
|
||||
|
||||
# Check if there are any changes to the database
|
||||
if ! $(flask --app server db check | grep -q "No changes in schema detected.");
|
||||
if ! flask --app server db check | grep "No changes in schema detected.";
|
||||
then
|
||||
echo "Database changes detected! Migrating..."
|
||||
flask --app server db migrate
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue