我通过 Nuget 安装了 Fluent Migrator... 我创建了一个基本迁移
[Migration(1)]
class _001_User : Migration
{
public override void Up()
{
Create.Table("User");
}
public override void Down()
{
Delete.Table("User");
}
}
我使用 runner 运行它并创建版本表,但不运行此迁移。我以前使用过流利的迁移器,但不知道为什么这不起作用。Visual Studio 2012、.NET 4.5、SqlServer2012
来自流利的迁移器运行器的输出。
VersionMigration migrating
[+] Beginning Transaction
[+] CreateTable VersionInfo
[+] Committing Transaction
[+] VersionMigration migrated
-------------------------------------------------------------------------------
VersionUniqueMigration migrating
-------------------------------------------------------------------------------
[+] Beginning Transaction
[+] CreateIndex VersionInfo (Version)
[+] AlterTable VersionInfo
[+] CreateColumn VersionInfo AppliedOn DateTime
[+] Committing Transaction
[+] VersionUniqueMigration migrated
[+] Task completed.