Files
uis-cloud-computing/create_migration.sh

11 lines
234 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/*
cd - || exit