_____ _ _ _ _ __ __ _ _ _ | __ \ | | | \ | | | | | \/ (_) | | (_) | | | | ___ | |_| \| | ___| |_| \ / |_ __ _ _ __ __ _| |_ _ ___ _ __ ___ | | | |/ _ \| __| . ` |/ _ \ __| |\/| | |/ _` | '__/ _` | __| |/ _ \| '_ \/ __| | |__| | (_) | |_| |\ | __/ |_| | | | | (_| | | | (_| | |_| | (_) | | | \__ \ |_____/ \___/ \__|_| \_|\___|\__|_| |_|_|\__, |_| \__,_|\__|_|\___/|_| |_|___/ __/ | |___/
DotNetMigrations - http://github.com/jpoehls/dotnetmigrations
DotNetMigrations is a database migration framework that assists in managing and versioning database changes. It was originally designed as a straight port of the rails functionality located in the Ruby on Rails framework; however, it has since grown wings and taken its own path in several areas.
View our CI builds on the CodeBetter TeamCity server.
Available on NuGet at http://www.nuget.org/List/Packages/DotNetMigrations
- PowerShell 2.0
- .NET Framework 4.0
- Git must be installed and in your path
- Make sure the
$public_versionnumber is correct in the
- Make sure the changelog is up-to-date in the
- Commit any changes up to this point.
- Tag the release in Git with
git tag vX.Y.Zwhere
$public_versionfrom the build script.
- Add the hash of the tagged release from Git to the changelog entry for the release.
Use this to get the hash:
git log -n1 -r "vX.Y.Z" --pretty=%H
- Commit the changelog update.
- Look in the
.\@artifactsfolder for the goods.
- Run the
.\@artifacts\PublishNuGetPackage.batscript to publish to the NuGet Gallery.
- Uploaded the zipped binaries from
- Spread the word!
git log --format='%aN' | sort -u
- Darren Cauthon
- James Eggers
- Joshua Poehls
- Kieran Benton
This releases fixes the breaks in versions 0.83 and 0.84.
WARNING! You must manually modify your
[schema_migrations]table in order for this release to run. You need to make the following modifications.
- DROP the primary key constraint from the
- Run this SQL:
ALTER TABLE [schema_migrations] ADD [id] INT NOT NULL IDENTITY(1,1) CONSTRAINT [PK_schema_migrations] PRIMARY KEY
[id]column will be added and used to locate the max version number in the migration table.
This works because migrations are always inserted in sequential order so the IDs will also be in the correct order.
This release also removes support for upgrading from the legacy
[schema_info]table used by very early versions of DotNetMigrations. This really shouldn't matter to anyone at this point but if it does then just run an older version of DNM to perform the upgrade and then switch to the latest DNM release.
- DROP the primary key constraint from the
- First release to be published to NuGet! (thanks Darren Cauthon!)
WARNING! This release breaks support for the
local_timeversioning strategies. Only
seq_numwill work. If you use one of the time based strategies wait for v0.85 before upgrading.
- Added preliminary support for Mono. (Thanks James Eggers!)
- Fixed issue #21 with migrations not working past version 9.
- Breaking change! The
##DNM:PROVIDER##token is now
/*DNM:PROVIDER*/The new token format will help ensure that your SQL scripts will run without errors outside of DNM.
Added support for a
CommandTimeoutparameter in the connection strings. This value will be used as the
DbCommand.CommandTimeoutvalue when the migration scripts are executed.
You must manually run the following SQL against your database to ensure issue #21 is fixed.
ALTER TABLE [schema_migrations] ALTER COLUMN [version] [int] NOT NULL
**Note* that this is the change that will break the
local_timeversioning strategies since timestamps are too large to fit into an
[int]column. If you are not using
seq_numthen DO NOT run this alter command and your migrations should continue to execute like they did in the previous version.
- Added support for post migration actions that plugins can use to inject functionality that should run after a migration completes. (This was added to support the new PersistentMigrate [pmigrate] command in the dotnetmigrations-contrib project.)
seedcommand that executes scripts in the
setupcommand that migrates a database to the latest version and executes scripts in the seed folder.
This is the same as running:
> db migrate myConnection > db seed myConnection
New sequential number
Added support for a
##DNM:PROVIDER##token in migration scripts that is replaced with the connection string's provider name.
Added support for migration scripts without placeholders. When the script doesn't have any
END_TEARDOWNtokens then the entire script is assumed to be a Setup with no Teardown.
This release brings yet another significant rewrite. Building on the MEF integration and innovations of 0.6, many improvements have been made to make writing commands easier and safer.
New 'connections' command that provides a command line interface for viewing, adding, editing and removing stored connection strings in the config file.
Revamped help system that provides detailed info on the usage of all commands, including custom commands.
Smarter, more robust parsing of migrations scripts that contain GO keywords. Special thanks to the Subtext project who we borrowed these improvements from!
New strongly-typed parsing of command line arguments with support DataAnnotation attributes for validation and automatic integration with the help system.
New CommandBase and DatabaseCommandBase classes for building custom commands.
Rewritten data access routines that wrap all bulk operations in transactions. Also much smarter database connection handling.
Beefed up unit tests suite with full coverage of all critical routines.
Changed unit tests to use SQL Server CE 3.5.1 instead of SQL Server Express. This means anyone can run the unit tests now without having to setup a database first.
Major updates to the build script to use Psake instead of NAnt to run the unit tests after compilation and improvements for integrating with TeamCity.
Lots of bug fixes.
This version has been completely rewritten from the ground up using .Net 3.5 and the Managed Extensibility Framework.
Completely new directory structure and codebase
MEF has been used to assist in the inner workings of the application as well as allow for new logs and commands to be created.
Unit Tests Project has been added - tests use the NUnit framework
An automated build file has been created for NAnt v0.86 b1
Core project has been created to allow for easy access to classes required for extending DotNetMigrations
Breaking Change! The BulkCopy command has been removed. The BulkCopy command has temporarily been removed from the bundled commands of the application. This command will be moved to the DotNetMigrations-Contrib project as soon as it's ready. If you use the bulkcopy command, please continue using v0.5.
About the DotNetMigrations-Contrib Project
Thanks to the Managed Extensibility Framework, DotNetMigrations is now able to have new commands and logging mechanisms to be created and added by anyone who wants. Because of this, the DotNetMigrations-Contrib project is being launched in the very near future (target launch date is Feb 01, 2010). The goal of this sister project is to provide a location for people to share new commands and logs to the application without having to worry about getting a different version of the core DotNetMigrations application from this project.
fixed bug where blank lines before a
GOin the migration script would cause an exception to be thrown
refactored the code for each 'command' into individual classes that inherit from a base
fixed bug that caused a sql error to be thrown whenever the
schema_infotable did not exist
added return codes to the application
- fixed bug where lines in the SQL migration script were being concatenated together without any whitespace to separate them
uses DbProviderFactories to perform all database connections default provider is
System.Data.SqlClientyou can specify a specific provider by adding a
PROVIDER=setting to your connection string ex.
misc updates made to specifically support SQL Compact 3.5 databases
- added the
- added the
- initial release!
Copyright (c) 2008-2011, Joshua Poehls All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of DotNetMigrations nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ================================================================================== Portions of the source were taken from the Subtext project and are covered under the following license. These portions also contain this license in the header of their source code files. ================================================================================== Copyright (c) 2005 - 2010, Phil Haack All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the Subtext nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.