Files
social-media/backend/scripts/add-migration.sh
Jonathan Bourdon df3e602015
Some checks failed
Backend CI/CD / build_and_deploy (push) Has been cancelled
Frontend CI/CD / build_and_deploy (push) Has been cancelled
feat: pivot to social media workflow app
2026-04-24 12:58:35 -04:00

18 lines
418 B
Bash
Executable File

#!/bin/bash
# Usage: ./add-migration.sh Messaging Initial
MODULE_NAME=$1
MIGRATION_NAME=$2
if [ -z "$MODULE_NAME" ] || [ -z "$MIGRATION_NAME" ]; then
echo "Usage: $0 <ModuleName> <MigrationName>"
exit 1
fi
dotnet ef migrations add \
--context "Socialize.Modules.${MODULE_NAME}.Data.${MODULE_NAME}DbContext" \
--configuration Debug \
--output-dir "Modules/${MODULE_NAME}/Migrations" \
"$MIGRATION_NAME"