|
@@ -0,0 +1,30 @@
|
|
|
+using FluentMigrator;
|
|
|
+using MyTrelloWeb.VCommon.Logging;
|
|
|
+using MyTrelloWeb.VCommon.VEntity;
|
|
|
+
|
|
|
+namespace MyTrelloWeb.App.DbMigration
|
|
|
+{
|
|
|
+ [Migration(Version)]
|
|
|
+ public class AddCreationTimeIndex : Migration
|
|
|
+ {
|
|
|
+ private const long Version = 20190414212000;
|
|
|
+
|
|
|
+ public override void Up()
|
|
|
+ {
|
|
|
+ Logger.Info($"Exec Migration UP {Version}_{GetType().Name}");
|
|
|
+
|
|
|
+ Create
|
|
|
+ .Index().OnTable("Kanban").OnColumn(nameof(IHaveCreationTime.CreationTime));
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ public override void Down()
|
|
|
+ {
|
|
|
+ Logger.Info($"Exec Migration DOWN {Version}_{GetType().Name}");
|
|
|
+
|
|
|
+ Delete
|
|
|
+ .Index().OnTable("Kanban").OnColumn(nameof(IHaveCreationTime.CreationTime));
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|