Skip to content

Commit 37fc810

Browse files
authored
Merge pull request #54 from sqlcollaborative/dbup-420
Support for Postgres and MySql
2 parents 7074f17 + 2e3bfeb commit 37fc810

36 files changed

+461
-192
lines changed

bin/dbup-core.dll

43 KB
Binary file not shown.

bin/dbup-mysql.dll

12.5 KB
Binary file not shown.

bin/dbup-oracle.dll

0 Bytes
Binary file not shown.

bin/dbup-postgresql.dll

13 KB
Binary file not shown.

bin/dbup-sqlserver.dll

512 Bytes
Binary file not shown.

bin/deploy.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ $config = Get-DBOConfig -Path "$PSScriptRoot\dbops.config.json" -Configuration $
4141

4242
#Convert custom parameters into a package configuration, excluding variables
4343
foreach ($key in ($PSBoundParameters.Keys)) {
44-
if ($key -in [DBOpsConfigProperty].GetEnumNames() -and $key -ne 'Variables') {
44+
if ($key -in [DBOps.ConfigProperty].GetEnumNames() -and $key -ne 'Variables') {
4545
Write-PSFMessage -Level Debug -Message "Overriding parameter $key with $($PSBoundParameters[$key])"
4646
$config.SetValue($key, $PSBoundParameters[$key])
4747
}

dbops.psm1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ Set-PSFConfig -FullName dbops.mail.To -Value "" -Initialize -Description "'To' f
146146
Set-PSFConfig -FullName dbops.mail.Subject -Value "DBOps deployment status" -Initialize -Description "'Subject' field in the outgoing emails."
147147
Set-PSFConfig -FullName dbops.security.encryptionkey -Value "~/.dbops.key" -Initialize -Description "Path to a custom encryption key used to encrypt/decrypt passwords. The key should be a binary file with a length of 128, 192 or 256 bits. Key will be generated automatically if not exists."
148148
Set-PSFConfig -FullName dbops.security.usecustomencryptionkey -Value ($PSVersionTable.Platform -eq 'Unix') -Validation bool -Initialize -Description "Determines whether to use a custom encryption key for storing passwords. Enabled by default only on Unix platforms."
149-
Set-PSFConfig -FullName dbops.rdbms.type -Value 'SQLServer' -Validation connectionType -Initialize -Description "Assumes a certain RDBMS as a default one for each command. SQLServer by default"
149+
Set-PSFConfig -FullName dbops.rdbms.type -Value 'SqlServer' -Validation connectionType -Initialize -Description "Assumes a certain RDBMS as a default one for each command. SQLServer by default"
150150

151151
# extensions for SMO
152152
$typeData = Get-TypeData -TypeName 'Microsoft.SqlServer.Management.Smo.Database'

functions/Install-DBOPackage.ps1

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,8 @@
166166
[switch]$CreateDatabase,
167167
[AllowNull()]
168168
[string]$ConnectionString,
169-
[ValidateSet('SQLServer', 'Oracle')]
170169
[Alias('ConnectionType', 'ServerType')]
171-
[string]$Type = (Get-DBODefaultSetting -Name rdbms.type -Value)
170+
[DBOps.ConnectionType]$Type = (Get-DBODefaultSetting -Name rdbms.type -Value)
172171
)
173172

174173
begin {

functions/Install-DBOSqlScript.ps1

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,8 @@
162162
[switch]$CreateDatabase,
163163
[AllowNull()]
164164
[string]$ConnectionString,
165-
[ValidateSet('SQLServer', 'Oracle')]
166165
[Alias('ConnectionType', 'ServerType')]
167-
[string]$Type = (Get-DBODefaultSetting -Name rdbms.type -Value)
166+
[DBOps.ConnectionType]$Type = (Get-DBODefaultSetting -Name rdbms.type -Value)
168167
)
169168

170169
begin {

functions/Install-DBOSupportLibrary.ps1

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ Function Install-DBOSupportLibrary {
1515
.PARAMETER Scope
1616
Choose whether to install for CurrentUser or for AllUsers
1717
18+
.PARAMETER SkipDependencies
19+
Skips dependencies of the package with the connectivity libraries, only downloading a single package.
20+
1821
.PARAMETER Confirm
1922
Prompts to confirm certain actions
2023
@@ -34,10 +37,10 @@ Function Install-DBOSupportLibrary {
3437
ValueFromPipeline = $true,
3538
Position = 1)]
3639
[Alias('System', 'Database')]
37-
[ValidateSet('SQLServer', 'Oracle')]
38-
[string[]]$Type,
40+
[DBOps.ConnectionType[]]$Type,
3941
[ValidateSet('CurrentUser', 'AllUsers')]
4042
[string]$Scope = 'AllUsers',
43+
#[switch]$SkipDependencies, # disabling for now, dependencies are not supported anyways
4144
[switch]$Force
4245
)
4346
begin {
@@ -77,7 +80,7 @@ Function Install-DBOSupportLibrary {
7780
# Install dependencies
7881
foreach ($package in $packagesToUpdate) {
7982
Write-PSFMessage -Level Verbose -Message "Installing package $($package.Name)($($package.Version))"
80-
$null = Install-Package -Source $packageSource.Name -Name $package.Name -RequiredVersion $package.Version -Force:$Force -Scope:$Scope
83+
$null = Install-Package -Source $packageSource.Name -Name $package.Name -RequiredVersion $package.Version -Force:$Force -Scope:$Scope -SkipDependencies
8184
}
8285
}
8386
}

0 commit comments

Comments
 (0)