This version of Rivet is backwards-incompatible. It changes the way plug-ins work. In order to upgrade to this version, you'll need to update your plugins and your rivet.json file.
- Package your plugins into a PowerShell module. Make sure your plug-in functions are exported by your module.
- Add the attribute
[Rivet.Plugin([Rivet.Event]::BeforeOperationLoad)]to any existing
- Add the attribute
[Rivet.Plugin([Rivet.Event]::AfterOperationLoad)]to any existing
- Change the
PluginsRootsetting in your rivet.json file to
PluginPaths. Change its value to the path to the module you created in step 1. Rivet will import the module into the global scope for you. Or, if you want to import the module, set the
PluginModulesproperty to a list of module names that contain the plug-ins to use.
about_Rivet_Plugins for more information.
Export-Migrationfunction for exporting database objects as Rivet migrations.
- Rivet can now add XML columns that don't have schema associated with them.
New-Columncan now be used to create columns on tables that have custom size specifications, are rowguidcol, are identities, custom collations, and are file stream.
- Breaking Change: Rivet plug-ins must now be packaged as/in PowerShell modules. The
PluginsRootconfiguration option has been renamed to
PluginPathsand should be a list of paths were Rivet can find the PowerShell modules containing your plug-ins. These paths are imported using the
about_Rivet_Pluginsfor more information.
PluginsRoot) configuration setting is now allowed to have wildcards.
- Completely re-architected how
Merge-Migrationmerges migrations together. This fixed a lot of bugs where many operations were not merging correctly.
- The Convert-Migration.ps1 sample script no longer include a header for all migrations that affected an operation, since Rivet no longer exposes this information. Instead, it only adds an author header for the migration an operation ends up in.
ColumnNameparameter is now required. When merging operations, Rivet needs to know what column a default expression operates on. You'll get a warning if it isn't provided. In a future version of Rivet, this parameter will be made mandatory.
- Default constraint names are now required. You must pass a constraint name to the Add-DefaultConstraint operator's Name parameter and to the DefaultConstraintName parameter on any column definition that has a default value.
- Performance improvement: Rivet now only queries once for the state of all applied migrations instead of querying for every migration.
- Performance improvement: Rivet only reads migration files that haven't been applied to a database. This should help with backwards-compatability. If Rivet's API changes only migrations you want to push/pop will need to get updated to match the new API.
- Unique key constraint names are now required. You must pass a constraint name to the Add-UniqueKey operation's Name parameter.
- Primary key constraint names are now required. You must pass a constraint name to the Add-PrimaryKey operation's Name parameter.
- Foreign key constraint names are now required. You must pass a constraint name to the Add-ForeignKey operation's Name parameter.
- Index names are now required. You must pass an index name to the Add-Index operation's Name parameter.
- Fixed: Get-Migration and Get-MigrationFile don't properly exclude migrations in some situations.
- Fixed: the idempotent queries for renaming a data type and index don't work.
- Adding support for running Rivet under Windows PowerShell 5.1 and PowerShell Core.
- You can now specify the order Rivet should apply migrations to multiple databases with the "DatabaseOrder" setting in your rivet.json file. It should be set to a list of databases and Rivet will apply migrations to databases in that order. See
help about_Rivet_Configurationfor more information.