# Release-specific deployment configuration
# This file is packaged with each release in database/deploy-config.ps1
# Jenkins copies this file into the release zip during build

$deployConfig = @{
    # Site
    SiteName            = "MILL"
    AppSubfolder        = "app"

    # Database (connection string comes from shared/appsettings.json)
    TargetDatabaseName  = "swv-mill"

    # Notifications (hardcoded per project)
    GoogleChatEndpoint  = "https://chat.googleapis.com/v1/spaces/AAAAJRpbtEI/messages?key=AIzaSyDdI0hCZtE6vySjMm-WEfRq3CPzqKqqsHI&token=vJwOgajWKAxzrFTX4yKL6f6YRGCTxDQFTMWElyB6RGU"
    N8nWebhook          = "https://n8n.2.dev.dexteel.com/webhook/logs"
    N8nSpaceId          = "0191c254-82fe-7e4a-ac89-d2544c601ff0"
    N8nParentPageId     = "0198625f-a23c-770e-9c26-93e3edcd3dcb"

    # DACPACs to deploy (in order, based on schema dependencies)
    # Format: @{Name="dacpac-name"; TargetDB="database"; EnvVars=@("/v:var=value")}
    # historian-sql targets its own database (historian) and is referenced by the other
    # dacpacs via the $(historian) SQLCMD variable.
    Dacpacs = @(
        @{Name="historian-sql"; TargetDB="historian"},
        @{Name="mesf-core-sql-sql140"; TargetDB="swv-mill"},
        @{Name="del-sql"; TargetDB="swv-mill";  EnvVars=@("/v:historian=historian")},
        @{Name="forms-sql"; TargetDB="swv-mill"},
        @{Name="mt-sql"; TargetDB="swv-mill";  EnvVars=@("/v:historian=historian","/v:swv-mes=swv-mes","/v:ms-server=ms-server")},
        @{Name="lab-sql"; TargetDB="swv-mill";  EnvVars=@("/v:historian=historian","/v:swv-mes=swv-mes","/v:ms-server=ms-server")},
        @{Name="m1-sql"; TargetDB="swv-mill";  EnvVars=@("/v:historian=historian")},
        @{Name="m2-sql"; TargetDB="swv-mill";  EnvVars=@("/v:historian=historian","/v:swv-mes=swv-mes","/v:ms-server=ms-server")},
        @{Name="swv-sql"; TargetDB="swv-mill";  EnvVars=@("/v:historian=historian","/v:swv-mes=swv-mes","/v:ms-server=ms-server")}
    )
}