schon/scripts/Windows/make-migrations.ps1
Egor fureunoir Gorbunov b5e303e7a5 feat(email): add multilingual support and image handling to email templates
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.
2026-01-26 15:35:30 +03:00

36 lines
957 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 "Generating migration files..."
if ($useDocker) {
docker compose exec app uv run manage.py makemigrations
} elseif ($useNative) {
& .\.venv\Scripts\python.exe manage.py makemigrations
}
if ($LASTEXITCODE -ne 0) {
Write-Error-Custom "Failed to generate migration files"
exit $LASTEXITCODE
}
Write-Success "Migration files created successfully!"
Write-Result "You can now use migrate.ps1 script or run: make migrate"