-
Notifications
You must be signed in to change notification settings - Fork 0
SQL Server genie
arbinada-com edited this page Apr 23, 2020
·
1 revision
SQL Server genie generates and updates database layer on SQL Server 2005 or higher.
| Atribute | Value |
|---|---|
| type | GenieLamp.Genies.SqlServer.SqlServerGenie |
| assembly | GenieLamp.Genies.SqlServer |
| Parameter name | Description |
|---|---|
| Database.Create | Indicates to add database creation to the script |
| Database.Name | Name of database to create |
| Schemas.Create | Indicates to add schema(s) creation to the script |
| UpdateDatabase.Utility | Command line utility to run database updating script |
| UpdateDatabase.Arguments | Command line utility arguments |
| File name | Description |
|---|---|
| CRE_%PROJECT_NAME%.sql | SQL script to create database catalog |
| UPD_%PROJECT_NAME%.sql | SQL script to update database catalog |
| DEL_%PROJECT_NAME%.sql | SQL script to delete database catalog |
Updating script will not delete anything in your database but will add new elements only (i.e. columns, indexes etc). You should manually remove any database objects you need before starting update.
<Genie name="SqlServer"
type="GenieLamp.Genies.SqlServer.SqlServerGenie"
assembly="GenieLamp.Genies.SqlServer"
active="false"
outDir="%PROJECT_DIR%/../SQL/SqlServer-%TARGET_VERSION%"
outFileName="%PROJECT_NAME%.sql"
updateDatabase="true"
targetVersion="2008">
<Param name="Database.Create" value="true" />
<Param name="Database.Name" value="mydb" />
<Param name="Schemas.Create" value="true" />
<Param name="UpdateDatabase.Utility" value="sqlcmd" />
<Param name="UpdateDatabase.Arguments" value="-S localhost -i %FILE_NAME%" />
</Genie>