
param (
    [Parameter(ValueFromPipeline)]
    [string]$d
)
&"$ROOT\Scripts\check-dep.ps1"

$passSchemaFolder = (Get-Variable -Name 'SchemaFolder' -ErrorAction SilentlyContinue)
$SchemaFolder = 'Cedar'
if (($args.count -eq 1 -AND ($args[0].ToLower() -eq "cisa")) -Or ($null -ne $passSchemaFolder))
{
    $SchemaFolder = 'Cisa'
    Set-Variable -Name 'SchemaFolder' -Value 'Cisa' -Scope Global
}

$SchemaFolderFull = "DbSchema$SchemaFolder"

$Global:DbSchemaFolder = "$ROOT\Var\$SchemaFolderFull\"

if (-Not(Test-Path $DbSchemaFolder -PathType Container)) {
    [void](New-Item -Path "$ROOT\Var\" -Name $SchemaFolderFull -ItemType "directory")
}
