many fixes and improvements - rework for modules/ and common/
feat(emailer): add Postmark and Resend providers
This commit is contained in:
25
backend/scripts/update-databases.sh
Executable file
25
backend/scripts/update-databases.sh
Executable file
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Usage:
|
||||
# ./update-db.sh Messaging => applies latest migration
|
||||
# ./update-db.sh Messaging Initial => updates to a specific migration
|
||||
|
||||
MODULE_NAME=$1
|
||||
TARGET_MIGRATION=$2 # Optional
|
||||
|
||||
if [ -z "$MODULE_NAME" ]; then
|
||||
echo "Usage: $0 <ModuleName> [MigrationName]"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
UPDATE_COMMAND=(
|
||||
dotnet ef database update
|
||||
--context "Hutopy.Modules.${MODULE_NAME}.Data.${MODULE_NAME}DbContext"
|
||||
--configuration Debug
|
||||
)
|
||||
|
||||
if [ -n "$TARGET_MIGRATION" ]; then
|
||||
UPDATE_COMMAND+=("$TARGET_MIGRATION")
|
||||
fi
|
||||
|
||||
"${UPDATE_COMMAND[@]}"
|
||||
Reference in New Issue
Block a user