Skip to content

Rollback

Luca Sgroi edited this page May 20, 2017 · 4 revisions

Synopsis

Rollback database migrations using FluentMigrator command line runner.
By default the task rollbacks one step.


Properties

  • MigrationProjectName - the project containing the migrations
    Default to $ProjectName
  • MigrationAssemblyFullPath - the migrations assembly's directory
    Default to Get-ProjectBuildOutputDir $MigrationProjectName (e.g. C:\Source\Solution\Project\bin\Release)
  • MigrationAssemblyFullName - the assembly containing the migrations to execute
    Default to $MigrationAssemblyFullPath\$MigrationProjectName.dll"
  • MigrationNamespace - the exact namespace that contains the migrations to run
    Default is all migrations found in $MigrationAssemblyFullName
  • MigrationConnectionString - the connection string to the server and database
    Required
  • MigrationTimeout - overrides the SqlCommand timeout (in seconds)
    Default to 30 seconds
  • MigrationProfile - the profile to run after executing migrations
    Optional
  • MigrationTag - filters migrations to be run based on tags
    Optional
  • MigrationDatabase - the kind of database (see FluentMigrator providers)
    Default to SqlServer
  • RollbackSteps - the number of versions to rollback
    Optional
  • RollbackToVersion - the specific version to rollback to
    Optional