Improvements to user views and forms + correction of schema creation for new tenants.

This commit is contained in:
Josako
2024-06-03 13:24:13 +02:00
parent fcc0caeb09
commit c660c35de4
5 changed files with 73 additions and 10 deletions

32
scripts/db_heads.sh Executable file
View File

@@ -0,0 +1,32 @@
#!/usr/bin/env bash
# Usage: ./db_heads.sh -d migrations/public
cd "/Volumes/OWC4M2_1/Dropbox/Josako's Dev/Josako/EveAI/Development/eveAI/" || exit 1
source "/Volumes/OWC4M2_1/Dropbox/Josako's Dev/Josako/EveAI/Development/eveAI/.venv/bin/activate"
while getopts d: flag
do
case "${flag}" in
d) directory=${OPTARG};;
*) # Catch-all for unexpected arguments
echo "Invalid option: -$OPTARG" >&2
echo "Usage: ./migrate.sh -m \"Your migration message\" -d migrations/public"
exit 1
;;
esac
done
# Check if the message and directory are provided
if [ -z "$directory" ]; then
echo "Directory is required."
echo "Usage: ./db_heads.sh -d migrations/public"
exit 1
fi
# Set FLASK_APP environment variable
export FLASK_APP=scripts/run_eveai_app.py # Modify if your Flask app is initiated differently
export PYTHONPATH="$PYTHONPATH:/Volumes/OWC4M2_1/Dropbox/Josako's Dev/Josako/EveAI/Development/eveAI/"
# Run the Flask migration command
flask db heads -d "$directory"