22 lines
480 B
PowerShell
22 lines
480 B
PowerShell
param(
|
|
[Parameter(Mandatory = $true)]
|
|
[string]$Scenario,
|
|
|
|
[Parameter(Mandatory = $true)]
|
|
[string]$ConnectString,
|
|
|
|
[string]$SqlClient = "sql"
|
|
)
|
|
|
|
$ErrorActionPreference = "Stop"
|
|
|
|
$repoRoot = Split-Path -Parent $PSScriptRoot
|
|
$resetScript = Join-Path $repoRoot "scenarios/$Scenario/sql/99_reset.sql"
|
|
|
|
if (-not (Test-Path $resetScript)) {
|
|
throw "Reset script not found: $resetScript"
|
|
}
|
|
|
|
Write-Host "Resetting scenario $Scenario"
|
|
& $SqlClient $ConnectString "@$resetScript"
|