【问题标题】:Fluentmigrator migrate into specific versionFluentmigrator 迁移到特定版本
【发布时间】:2017-08-10 14:56:32
【问题描述】:

是否有可能将数据库更改迁移到任何特定版本。作为示例,我们在 out 项目中有迁移列表,我们只想将版本 2 的更改迁移到数据库中。我可能有以下迁移

  • 版本 1 - 已经在数据库中

  • 版本 2 - 想要迁移到数据库

  • 版本 3 - 稍后会迁移。

    有没有类似migrate:up --Version 2的命令?我正在使用 FluentMigrator.1.4.0.0

【问题讨论】:

    标签: fluent-migrator


    【解决方案1】:

    我设法使用下面的脚本来做到这一点。

    Migrate.exe /connection "data source=source;initial catalog=db;User ID=sa;Password=123;" /db SQLserver2012 /timeout 600 /task migrate:up --version=2 /target ..\DatabaseMigration\bin\Debug\DatabaseMigration.dll
    
    pause
    

    【讨论】:

    • 谢谢你把这个放在这里,正是我需要的
    猜你喜欢
    • 2016-08-19
    • 2015-06-18
    • 1970-01-01
    • 2019-05-04
    • 2015-11-23
    • 1970-01-01
    • 2020-04-01
    • 2018-04-06
    • 1970-01-01
    相关资源
    最近更新 更多