# BimlFlex Database Manual Deployment

## Parameters
* `$server`: Name of Server (Example: localhost, server.database.windows.net)
* `$databaseName`: Name of BimlFlex Database (Example: BimlFlex)
* `$authentication`: Authentication Type (Examples: WindowsAuthentication, SqlServerAuthentication, AadPasswordAuthentication, AadMultiFactorAuthentication, AadIntegratedAuthentication)
* `$userId`: Name of User if not using WindowsAuthentication
* `$password`: Password of User when using SqlServerAuthentication or other User Authentication Types
* `$tennantId`: Tennant ID (Subscription ID) when using AadMultiFactorAuthentication
* `$dacpacPath`: Path of the Dacpac, default is same folder as this script `'./BimlFlex.dacpac'`
* `$scriptPath`: Path of the pre deploymnet script, default is same folder as this script `'./BimlFlex_PreDacpac_Deployment.sql'`

## Script
Powershell script that will:
* Download DacFX (SqlPackage.exe) if not already installed
* Deploy the `BimlFlex_PreDacpac_Deployment.sql` script if database exist
* Deploy `BimlFlex.dacpac` to database using `SqlPackage.exe`

