Skip to content

Commit 4e6023c

Browse files
authored
docs: Add missing documentation for Arcus.Scripting.Sql (#455)
1 parent 52e386a commit 4e6023c

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

docs/preview/03-Features/powershell/azure-sql.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ PS> Install-Module -Name Arcus.Scripting.SQL
1818
With this script, you can perform database upgrades by providing/adding specific SQL scripts with the right version number.
1919
Once a new version number is detected it will incrementally execute this.
2020

21-
While doing so it will create a table "DatabaseVersion".
21+
While doing so it will create a table "DatabaseVersion" (unless overriden by specifying the `DatabaseVersionTable` parameter).
2222
If the DatabaseVersion table doesn't exist it will automatically create it.
2323

2424
This function allows you to trigger a database migration, which will only execute the newly provided SQL scripts, based on the provided version number in each of the scripts.
@@ -35,6 +35,7 @@ The current version is stored in a table "DatabaseVersion", which will be create
3535
| `ScriptsFolder` | no (default: `$PSScriptRoot/sqlScripts` | The directory folder where the SQL migration scripts are located on the file system |
3636
| `ScriptsFileFilter` | no (default: `*.sql`) | The file filter to limit the SQL script files to use during the migrations |
3737
| `DatabaseSchema` | no (default: `dbo`) | The database schema to use when running SQL commands on the target database |
38+
| `DatabaseVersionTable` | no (default: `DatabaseVersion`) | The name of the table that keeps track of the migration scripts that have been applied |
3839

3940
Make sure that the credentials that you provide can write tables to the database + any action that you specify in the SQL scripts. (If the user is a member of the `db_ddlamin` role, then that user should have the necessary rights)
4041

@@ -61,7 +62,8 @@ PS> Invoke-AzSqlDatabaseMigration `
6162
-TrustServerCertificate `
6263
-ScriptsFolder "$PSScriptRoot/sql-scripts" `
6364
-ScriptsFileFilter "*.MyScript.sql" `
64-
-DatabaseSchema "custom"
65+
-DatabaseSchema "custom" `
66+
-DatabaseVersionTable "MySpecificVersionTable"
6567
# DB migration 1.0.0 applied!
6668
# Done migrating database. Current Database version is 1.0.0
6769
```

docs/versioned_docs/version-v1.5.0/03-Features/powershell/azure-sql.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ PS> Install-Module -Name Arcus.Scripting.SQL
1818
With this script, you can perform database upgrades by providing/adding specific SQL scripts with the right version number.
1919
Once a new version number is detected it will incrementally execute this.
2020

21-
While doing so it will create a table "DatabaseVersion".
21+
While doing so it will create a table "DatabaseVersion" (unless overriden by specifying the `DatabaseVersionTable` parameter).
2222
If the DatabaseVersion table doesn't exist it will automatically create it.
2323

2424
This function allows you to trigger a database migration, which will only execute the newly provided SQL scripts, based on the provided version number in each of the scripts.
@@ -35,6 +35,7 @@ The current version is stored in a table "DatabaseVersion", which will be create
3535
| `ScriptsFolder` | no (default: `$PSScriptRoot/sqlScripts` | The directory folder where the SQL migration scripts are located on the file system |
3636
| `ScriptsFileFilter` | no (default: `*.sql`) | The file filter to limit the SQL script files to use during the migrations |
3737
| `DatabaseSchema` | no (default: `dbo`) | The database schema to use when running SQL commands on the target database |
38+
| `DatabaseVersionTable` | no (default: `DatabaseVersion`) | The name of the table that keeps track of the migration scripts that have been applied |
3839

3940
Make sure that the credentials that you provide can write tables to the database + any action that you specify in the SQL scripts. (If the user is a member of the `db_ddlamin` role, then that user should have the necessary rights)
4041

@@ -61,7 +62,8 @@ PS> Invoke-AzSqlDatabaseMigration `
6162
-TrustServerCertificate `
6263
-ScriptsFolder "$PSScriptRoot/sql-scripts" `
6364
-ScriptsFileFilter "*.MyScript.sql" `
64-
-DatabaseSchema "custom"
65+
-DatabaseSchema "custom" `
66+
-DatabaseVersionTable "MySpecificVersionTable"
6567
# DB migration 1.0.0 applied!
6668
# Done migrating database. Current Database version is 1.0.0
6769
```

0 commit comments

Comments
 (0)