Browse Source

commit: add index, pre caps rename

码农 5 years ago
parent
commit
02dcde5150

+ 30 - 0
MyTrelloWeb/App/DbMigration/20190414212000_AddIndex.cs

@@ -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));
+
+        }
+    }
+}

MyTrelloWeb/Index.html → MyTrelloWeb/Index-chg.html


+ 1 - 0
MyTrelloWeb/MyTrelloWeb.csproj

@@ -230,6 +230,7 @@
     <Compile Include="App\AppServices\KanbanService.cs" />
     <Compile Include="App\Auditing\ServiceAuditInterceptor.cs" />
     <Compile Include="App\DbMigration\20190413235130_InitDatabase.cs" />
+    <Compile Include="App\DbMigration\20190414212000_AddIndex.cs" />
     <Compile Include="App\Dto\CardDetailOutput.cs" />
     <Compile Include="App\Dto\CheckInput.cs" />
     <Compile Include="App\Dto\CreateWithTitleAndParentIdInput.cs" />