mirror of
https://github.com/dat515-2025/Group-8.git
synced 2026-03-22 15:12:08 +01:00
15 lines
360 B
Bash
15 lines
360 B
Bash
#!/bin/bash
|
|
|
|
if [ -z "$1" ]; then
|
|
echo "Usage: $0 <migration_message>"
|
|
exit 1
|
|
fi
|
|
|
|
cd backend || { echo "Directory 'backend' does not exist"; exit 1; }
|
|
alembic revision --autogenerate -m "$1"
|
|
git add alembic/versions/*
|
|
YELLOW='\033[1;33m'
|
|
NC='\033[0m' # No Color
|
|
|
|
echo -e "${YELLOW}Don't forget to check imports in the new migration file!${NC}"
|
|
cd - || exit |