diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d947bea..e2c55420 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,23 +1,18 @@ + + -# 0.19.1 +# 0.18.0 * Fixed: Rivet doesn't use the CommandTimeout property in rivet.json configuration file. - - -# 0.19.0 - * `Export-Migration` will now allow references to objects in databases that have been applied before it. -* The `DatabaseOrder` setting in the rivet.json file has now been renamed to `Databases`. - - -# 0.18.0 - +* The `DatabaseOrder` setting in the rivet.json file has been removed in favor of a new `Databases` property that should +be the ordered-list of databases to migrate. * `Export-Migration` will now include extended properties on schemas, views, and view columns. # 0.17.0 -## Changes +## Changes * When initializing a database, Rivet now runs the migrations found in the schema.ps1 file, which contains the baseline database schema upon which all migrations should be applied. You can use the `Checkpoint-Migration` function to create @@ -28,10 +23,10 @@ a baseline `schema.ps1` file for your database(s). * Updated `Checkpoint-Migration` function: - * The `schema.ps1` file generated from `Checkpoint-Migration` is saved to the Migrations directory of each database - that is being checkpointed. - * Only migrations that have been applied to the database will be exported to the `schema.ps1` file. - * Migrations that have been checkpointed will be removed from the Migrations directory. +* The `schema.ps1` file generated from `Checkpoint-Migration` is saved to the Migrations directory of each database +that is being checkpointed. +* Only migrations that have been applied to the database will be exported to the `schema.ps1` file. +* Migrations that have been checkpointed will be removed from the Migrations directory. # 0.15.0 @@ -130,7 +125,7 @@ order. See `help about_Rivet_Configuration` for more information. ## Enhancements * Created `Merge-Migration` function for creating cumulative, roll up migrations. - + # 0.7.0 @@ -167,7 +162,7 @@ for half a second. * Obsoleted the parameter sets of the `Remove-CheckConstraint`, `Remove-DefaulConstraint`, `Remove-ForeignKey`, `Remove-Index`, `Remove-PrimaryKey`, and `Remove-UniqueKey` operations that use an inferred constraint/index name. These operations now expect the name of the constraint/index to drop with the `Name` parameter. -* Improved object model so that customizing index/constraint names is easier. +* Improved object model so that customizing index/constraint names is easier. * Added `about_Rivet_Cookbook` help topic to showing how to customize index/constraint names. * Updated and improved the `about_Rivet_Plugins` help topic. * Obsoleted the `Enable-ForeignKey` and `Disable-ForeignKey` operations. Use the `Enable-Constraint` and @@ -183,8 +178,8 @@ multiple names, IDs, or file names). * Results from `Invoke-SqlScript` operations cause silent error when formatted as a table. * Path to rivet.json file not showing in an error message when using implicit path. - - + + # 0.5.1 ## Enhancements @@ -197,8 +192,8 @@ all operations. ## Bug Fixes * Get-Migration fails when run from Convert-Migration: it doesn't know the path to use to load migrations from. - - + + # 0.5.0 ## Enhancements @@ -219,7 +214,7 @@ output replaces the old Write-Host output). * NOCHECK parameter has been added to `Add-ForeignKey` and `Add-CheckConstraint` operations * `Disable-CheckConstraint` and `Enable-CheckConstraint` functions have been added. * `Disable-ForeignKey` and `Enable-ForeignKey` functions have been added. - + ## Bug Fixes * Convert-Migration.ps1 generates incorrect SQL if a migration removes then re-adds a column. @@ -245,7 +240,7 @@ output replaces the old Write-Host output). * `Get-RivetConfig` is now a publicly exposed function. Use this method to parse a Rivet JSON configuration file. It returns a `Rivet.Configuration.Configuration` object. - + # 0.3.0 ## Enhancements @@ -279,4 +274,4 @@ option. See `about_Rivet_Configuration` for more information. * Rivet now updates its internal objects using migrations (i.e. it is now self-migrating). It uses (and reserves) migration IDs below 01000000000000. If you have migrations with these IDs, you'll need to give them new IDs and update IDs in any rivet.Migrations table that uses that ID. -* Migration name maximum length increased to 241 characters (the theoretical maximum allowed by Windows). \ No newline at end of file +* Migration name maximum length increased to 241 characters (the theoretical maximum allowed by Windows). diff --git a/Rivet/Rivet.psd1 b/Rivet/Rivet.psd1 index 5cd96593..ae1fc80b 100644 --- a/Rivet/Rivet.psd1 +++ b/Rivet/Rivet.psd1 @@ -11,7 +11,7 @@ RootModule = 'Rivet.psm1' # Version number of this module. - ModuleVersion = '0.19.1' + ModuleVersion = '0.18.0' # ID used to uniquely identify this module GUID = '8af34b47-259b-4630-a945-75d38c33b94d' @@ -63,7 +63,7 @@ Rivet is a database migration/change management/versioning tool inspired by Ruby #TypesToProcess = '' # Format files (.ps1xml) to be loaded when importing this module - FormatsToProcess = @( + FormatsToProcess = @( 'Formats\RivetMigrationResult-GroupingFormat.format.ps1xml', 'Formats\RivetOperationResult-GroupingFormat.format.ps1xml', 'Formats\Rivet.Migration.format.ps1xml', diff --git a/appveyor.yml b/appveyor.yml index 27ec8f43..ff34c359 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -53,13 +53,19 @@ for: only: - job_group: ps build_script: - - ps: .\init.ps1 -SqlServerName "$($env:MSSQL_INSTANCE_NAME)" - - ps: .\build.ps1 + - ps: | + $ProgressPreference = 'SilentlyContinue' + iwr https://raw.githubusercontent.com/webmd-health-services/Prism/main/Scripts/init.ps1 | iex | Format-Table + .\init.ps1 -SqlServerName "$($env:MSSQL_INSTANCE_NAME)" + .\build.ps1 # Build in PowerShell - matrix: only: - job_group: pwsh build_script: - - pwsh: ./init.ps1 -SqlServerName "$($env:MSSQL_INSTANCE_NAME)" - - pwsh: ./build.ps1 \ No newline at end of file + - pwsh: | + $ProgressPreference = 'SilentlyContinue' + iwr https://raw.githubusercontent.com/webmd-health-services/Prism/main/Scripts/init.ps1 | iex | Format-Table + ./init.ps1 -SqlServerName "$($env:MSSQL_INSTANCE_NAME)" + ./build.ps1 diff --git a/init.ps1 b/init.ps1 index 15d29c41..90c56caf 100644 --- a/init.ps1 +++ b/init.ps1 @@ -14,44 +14,3 @@ Set-StrictMode -Version 'Latest' $InformationPreference = 'Continue' $SqlServerName | Set-Content -Path 'Test\Server.txt' - -# Run in a background job so that old PackageManagement assemblies don't get loaded. -$job = Start-Job { - $InformationPreference = 'Continue' - $psGalleryRepo = Get-PSRepository -Name 'PSGallery' - $repoToUse = $psGalleryRepo.Name - # On Windows 2012 R2, Windows PowerShell 5.1, and .NET 4.6.2, PSGallery's URL ends with a '/'. - if( -not $psGalleryRepo -or $psgalleryRepo.SourceLocation -ne 'https://www.powershellgallery.com/api/v2' ) - { - $repoToUse = 'PSGallery2' - Register-PSRepository -Name $repoToUse ` - -InstallationPolicy Trusted ` - -SourceLocation 'https://www.powershellgallery.com/api/v2' ` - -PackageManagementProvider $psGalleryRepo.PackageManagementProvider - } - - Write-Information -MessageData 'Installing latest version of PowerShell module Prism.' - Install-Module -Name 'Prism' -Scope CurrentUser -Repository $repoToUse -AllowClobber -Force - - if( -not (Get-Module -Name 'PackageManagement' -ListAvailable | Where-Object 'Version' -eq '1.4.7') ) - { - Write-Information -MessageData 'Installing PowerShell module PackageManagement 1.4.7.' - Install-Module -Name 'PackageManagement' -RequiredVersion '1.4.7'-Repository $repoToUse -AllowClobber -Force - } - - if( -not (Get-Module -Name 'PowerShellGet' -ListAvailable | Where-Object 'Version' -eq '2.2.5') ) - { - Write-Information -MessageData 'Installing PowerShell module PowerShellGet 2.2.5.' - Install-Module -Name 'PowerShellGet' -RequiredVersion '2.2.5' -Repository $repoToUse -AllowClobber -Force - } -} - -if( (Get-Command -Name 'Receive-Job' -ParameterName 'AutoRemoveJob') ) -{ - $job | Receive-Job -AutoRemoveJob -Wait -} -else -{ - $job | Wait-Job | Receive-Job - $job | Remove-Job -} diff --git a/whiskey.yml b/whiskey.yml index c40ce0b7..eb235447 100644 --- a/whiskey.yml +++ b/whiskey.yml @@ -1,7 +1,7 @@ PublishOn: - prerelease - master - + Build: - PowerShell: IfExists: env:MSSQL_SERVICE_NAME @@ -13,8 +13,9 @@ Build: Path: Rivet\Rivet.psd1 PowerShellModuleName: Rivet Prerelease: - - "*/*": alpha1 - - develop: rc1 + - main: "" + - master: "" + - "*": rc1 # Update the AppVeyor build/version number. - Exec: @@ -60,7 +61,7 @@ Build: - MergeFile: OnlyBy: BuildServer IfExists: Rivet\Functions\*.ps1 - Path: + Path: - Test\RivetTest\Functions\*.ps1 - Test\RivetTest\RivetTest.Exports.ps1 DestinationPath: Test\RivetTest\RivetTest.psm1