Introduce `EmailImage`, `EmailTemplate`, and `EmailCampaign` models for enhanced email management, including campaign tracking and one-click unsubscribe tokens. Added multilingual fields for email templates and improved accessibility with image alt text. Also adapted `Post` content fields to support translations.
36 lines
909 B
PowerShell
36 lines
909 B
PowerShell
Set-StrictMode -Version Latest
|
|
$ErrorActionPreference = 'Stop'
|
|
|
|
# Load shared utilities
|
|
$utilsPath = Join-Path $PSScriptRoot '..\lib\utils.ps1'
|
|
. $utilsPath
|
|
|
|
$starterPath = Join-Path $PSScriptRoot 'starter.ps1'
|
|
. $starterPath
|
|
if ($LASTEXITCODE -ne 0) {
|
|
exit $LASTEXITCODE
|
|
}
|
|
|
|
$useDocker = Test-Path '.env'
|
|
$useNative = Test-Path '.venv'
|
|
|
|
if (-not $useDocker -and -not $useNative) {
|
|
Write-Warning-Custom "Neither .env (Docker) nor .venv (native) found. Please set up your environment first."
|
|
exit 1
|
|
}
|
|
|
|
Write-Step "Applying migration files..."
|
|
|
|
if ($useDocker) {
|
|
docker compose exec app uv run manage.py migrate
|
|
} elseif ($useNative) {
|
|
& .\.venv\Scripts\python.exe manage.py migrate
|
|
}
|
|
|
|
if ($LASTEXITCODE -ne 0) {
|
|
Write-Error-Custom "Failed to apply migration files"
|
|
exit $LASTEXITCODE
|
|
}
|
|
Write-Success "Migration files applied successfully!"
|
|
|
|
Write-Result "Database is now up to date"
|