Browse Source

commit: add migrator

码农 6 years ago
parent
commit
ebff7f679c

+ 4 - 4
MyTrelloWeb/App/ApiModule.cs

@@ -1,11 +1,11 @@
-using System;
-using System.Collections.Generic;
-using System.Web;
-using MyTrelloWeb.App.AppServices;
+using MyTrelloWeb.App.AppServices;
 using MyTrelloWeb.VCommon.Ioc;
 using MyTrelloWeb.VCommon.Json;
 using MyTrelloWeb.VCommon.Logging;
 using MyTrelloWeb.VCommon.VOpenApi;
+using System;
+using System.Collections.Generic;
+using System.Web;
 
 namespace MyTrelloWeb.App
 {

+ 23 - 20
MyTrelloWeb/App/AppServices/KanbanService.cs

@@ -16,6 +16,8 @@ namespace MyTrelloWeb.App.AppServices
 
         void ListDelete(DeleteByIdInput input);
 
+        //TODO: get list summary
+
         // card level
 
         void CardCreate(CreateWithNameAndParentIdInput input);
@@ -26,6 +28,9 @@ namespace MyTrelloWeb.App.AppServices
 
         void CardDelete(DeleteByIdInput input);
 
+        //TODO: edit summary
+        //TODO: get Card detail
+
         // manifest level
 
         void ManifestCreate(CreateWithNameAndParentIdInput input);
@@ -40,11 +45,13 @@ namespace MyTrelloWeb.App.AppServices
 
         void ItemCreate(CreateWithNameAndParentIdInput input);
 
-        void ItemMove(CreateWithNameAndParentIdInput input);
+        void ItemMove(MoveInput input);
 
         void ItemRename(ReameInput input);
 
         void ItemDelete(DeleteByIdInput input);
+
+        //TODO: item check
     }
 
     internal class KanbanService : AppServiceBase, IKanbanService
@@ -54,67 +61,63 @@ namespace MyTrelloWeb.App.AppServices
             return new KanbanSummaryOutput();
         }
 
-        public void ListCreate(CreateWithNameInput input)
-        {
-        }
-
-        public void ListRename(ReameInput input)
+        void IKanbanService.ListCreate(CreateWithNameInput input)
         {
         }
 
-        public void ListDelete(DeleteByIdInput input)
+        void IKanbanService.ListRename(ReameInput input)
         {
         }
 
-        public void CardCreate(CreateWithNameAndParentIdInput input)
+        void IKanbanService.ListDelete(DeleteByIdInput input)
         {
         }
 
-        public void CardRename(ReameInput input)
+        void IKanbanService.CardCreate(CreateWithNameAndParentIdInput input)
         {
         }
 
-        public void CardMove(MoveInput input)
+        void IKanbanService.CardRename(ReameInput input)
         {
         }
 
-        public void CardDelete(DeleteByIdInput input)
+        void IKanbanService.CardMove(MoveInput input)
         {
         }
 
-        public void ManifestCreate(CreateWithNameAndParentIdInput input)
+        void IKanbanService.CardDelete(DeleteByIdInput input)
         {
         }
 
-        public void ManifestMove(MoveInput input)
+        void IKanbanService.ManifestCreate(CreateWithNameAndParentIdInput input)
         {
         }
 
-        public void ManifestRename(ReameInput input)
+        void IKanbanService.ManifestMove(MoveInput input)
         {
         }
 
-        public void ManifestDelete(DeleteByIdInput input)
+        void IKanbanService.ManifestRename(ReameInput input)
         {
         }
 
-        public void ItemCreate(CreateWithNameAndParentIdInput input)
+        void IKanbanService.ManifestDelete(DeleteByIdInput input)
         {
         }
 
-        public void ItemMove(CreateWithNameAndParentIdInput input)
+        void IKanbanService.ItemCreate(CreateWithNameAndParentIdInput input)
         {
         }
 
-        public void ItemRename(ReameInput input)
+        void IKanbanService.ItemMove(MoveInput input)
         {
         }
 
-        public void ItemDelete(DeleteByIdInput input)
+        void IKanbanService.ItemRename(ReameInput input)
         {
         }
 
-        public void CheckListCreate(CreateWithNameAndParentIdInput input)
+        void IKanbanService.ItemDelete(DeleteByIdInput input)
         {
         }
     }

+ 36 - 0
MyTrelloWeb/App/DbMigration/20190413235130_InitDatabase.cs

@@ -0,0 +1,36 @@
+using FluentMigrator;
+using MyTrelloWeb.VCommon.Logging;
+
+namespace MyTrelloWeb.App.DbMigration
+{
+    [Migration(Version)]
+    public class InitDatabase : Migration
+    {
+        private const long Version = 20190413235130;
+
+        public override void Up()
+        {
+            Logger.Info($"Exec Migration UP {Version}_{this.GetType().Name}");
+
+            Create.Table("Kanban")
+                .WithColumn("ListId").AsGuid().PrimaryKey()
+                .WithColumn("CardId").AsGuid().PrimaryKey()
+                .WithColumn("ManifestId").AsGuid().PrimaryKey()
+                .WithColumn("ItemId").AsGuid().PrimaryKey()
+                .WithColumn("Sort").AsInt32()
+                .WithColumn("Title").AsString()
+                .WithColumn("Summary").AsString().Nullable()
+                .WithColumn("Checked").AsBoolean()
+                .WithColumn("CreationTime").AsDateTime()
+                .WithColumn("LastModificationTime").AsDateTime().Nullable()
+                ;
+        }
+
+        public override void Down()
+        {
+            Logger.Info($"Exec Migration DOWN {Version}_{this.GetType().Name}");
+
+            Delete.Table("Kanban");
+        }
+    }
+}

+ 5 - 5
MyTrelloWeb/App/Entity/KanbanEntity.cs

@@ -10,19 +10,19 @@ namespace MyTrelloWeb.App.Entity
 
         public Guid CardId { get; set; }
 
-        public Guid CheckListId { get; set; }
+        public Guid ManifestId { get; set; }
 
-        public Guid CheckListItemId { get; set; }
+        public Guid ItemId { get; set; }
+
+        public int Sort { get; set; }
 
         [Required]
         public string Title { get; set; }
 
-        public string Descript { get; set; }
+        public string Summary { get; set; }
 
         public bool Checked { get; set; }
 
-        public int Sort { get; set; }
-
         public DateTime CreationTime { get; set; }
         public DateTime? LastModificationTime { get; set; }
     }

+ 83 - 0
MyTrelloWeb/App/MyTrelloDbMigrator.cs

@@ -0,0 +1,83 @@
+using FluentMigrator.Runner;
+using Microsoft.Extensions.DependencyInjection;
+using MySql.Data.MySqlClient;
+using System;
+using MyTrelloWeb.VCommon.Logging;
+
+namespace MyTrelloWeb.App
+{
+    public class MyTrelloDbMigrator
+    {
+        public static void Run()
+        {
+            //Create database if no exist
+
+            var builder = new MySqlConnectionStringBuilder(MyTrelloConfig.DefaultConnectionString);
+            var dbName = builder.Database;
+            builder.Remove("database");
+
+            using (var conn = new MySqlConnection(builder.ConnectionString))
+            {
+                conn.Open();
+                using (var cmd = conn.CreateCommand())
+                {
+                    cmd.CommandText = "SHOW DATABASES LIKE @" + nameof(dbName);
+                    cmd.Parameters.Add(new MySqlParameter(nameof(dbName), dbName));
+                    var dbCheckResult = cmd.ExecuteScalar() as string;
+                    cmd.Parameters.Clear();
+                    if (null == dbCheckResult || dbCheckResult.ToLower() != dbName.ToLower())
+                    {
+                        Logger.Info("Db no exist, try create...");
+                        cmd.CommandText = $"CREATE DATABASE {dbName} CHARACTER SET utf8 COLLATE utf8_bin";
+                        cmd.ExecuteNonQuery();
+                        Logger.Info("Db created");
+                    }
+                }
+            }
+
+            // Run FluentMigrator
+
+            var serviceProvider = CreateServices();
+
+            // Put the database update into a scope to ensure
+            // that all resources will be disposed.
+            using (var scope = serviceProvider.CreateScope())
+            {
+                UpdateDatabase(scope.ServiceProvider);
+            }
+        }
+
+        /// <summary>
+        /// Configure the dependency injection services
+        /// </summary>
+        private static IServiceProvider CreateServices()
+        {
+            return new ServiceCollection()
+                // Add common FluentMigrator services
+                .AddFluentMigratorCore()
+                .ConfigureRunner(rb => rb
+                    // Add SQLite support to FluentMigrator
+                    .AddMySql5()
+                    // Set the connection string
+                    .WithGlobalConnectionString(MyTrelloConfig.DefaultConnectionString)
+                    // Define the assembly containing the migrations
+                    .ScanIn(typeof(MyTrelloDbMigrator).Assembly).For.Migrations())
+                // Enable logging to console in the FluentMigrator way
+                .AddLogging(lb => lb.AddFluentMigratorConsole())
+                // Build the service provider
+                .BuildServiceProvider(false);
+        }
+
+        /// <summary>
+        /// Update the database
+        /// </summary>
+        private static void UpdateDatabase(IServiceProvider serviceProvider)
+        {
+            // Instantiate the runner
+            var runner = serviceProvider.GetRequiredService<IMigrationRunner>();
+
+            // Execute the migrations
+            runner.MigrateUp();
+        }
+    }
+}

+ 2 - 0
MyTrelloWeb/App_Start/AppActivator.cs

@@ -1,4 +1,5 @@
 using MyTrelloWeb;
+using MyTrelloWeb.App;
 
 [assembly: WebActivatorEx.PreApplicationStartMethod(typeof(AppActivator), nameof(AppActivator.InitApp), Order = 0)]
 
@@ -9,6 +10,7 @@ namespace MyTrelloWeb
         public static void InitApp()
         {
             MyTrelloConfig.Init();
+            MyTrelloDbMigrator.Run();
         }
     }
 }

+ 90 - 1
MyTrelloWeb/MyTrelloWeb.csproj

@@ -54,7 +54,82 @@
     <Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
       <HintPath>C:\NuGetLocalRepo\EntityFramework.6.2.0\lib\net45\EntityFramework.SqlServer.dll</HintPath>
     </Reference>
+    <Reference Include="FluentMigrator, Version=3.1.3.0, Culture=neutral, PublicKeyToken=aacfc7de5acabf05, processorArchitecture=MSIL">
+      <HintPath>C:\NuGetLocalRepo\FluentMigrator.3.1.3\lib\net461\FluentMigrator.dll</HintPath>
+    </Reference>
+    <Reference Include="FluentMigrator.Abstractions, Version=3.1.3.0, Culture=neutral, PublicKeyToken=aacfc7de5acabf05, processorArchitecture=MSIL">
+      <HintPath>C:\NuGetLocalRepo\FluentMigrator.Abstractions.3.1.3\lib\net461\FluentMigrator.Abstractions.dll</HintPath>
+    </Reference>
+    <Reference Include="FluentMigrator.Extensions.SqlAnywhere, Version=3.1.3.0, Culture=neutral, PublicKeyToken=aacfc7de5acabf05, processorArchitecture=MSIL">
+      <HintPath>C:\NuGetLocalRepo\FluentMigrator.Extensions.SqlAnywhere.3.1.3\lib\net461\FluentMigrator.Extensions.SqlAnywhere.dll</HintPath>
+    </Reference>
+    <Reference Include="FluentMigrator.Extensions.SqlServer, Version=3.1.3.0, Culture=neutral, PublicKeyToken=aacfc7de5acabf05, processorArchitecture=MSIL">
+      <HintPath>C:\NuGetLocalRepo\FluentMigrator.Extensions.SqlServer.3.1.3\lib\net461\FluentMigrator.Extensions.SqlServer.dll</HintPath>
+    </Reference>
+    <Reference Include="FluentMigrator.Runner, Version=3.1.3.0, Culture=neutral, PublicKeyToken=aacfc7de5acabf05, processorArchitecture=MSIL">
+      <HintPath>C:\NuGetLocalRepo\FluentMigrator.Runner.3.1.3\lib\net461\FluentMigrator.Runner.dll</HintPath>
+    </Reference>
+    <Reference Include="FluentMigrator.Runner.Core, Version=3.1.3.0, Culture=neutral, PublicKeyToken=aacfc7de5acabf05, processorArchitecture=MSIL">
+      <HintPath>C:\NuGetLocalRepo\FluentMigrator.Runner.Core.3.1.3\lib\net461\FluentMigrator.Runner.Core.dll</HintPath>
+    </Reference>
+    <Reference Include="FluentMigrator.Runner.Db2, Version=3.1.3.0, Culture=neutral, PublicKeyToken=aacfc7de5acabf05, processorArchitecture=MSIL">
+      <HintPath>C:\NuGetLocalRepo\FluentMigrator.Runner.Db2.3.1.3\lib\net461\FluentMigrator.Runner.Db2.dll</HintPath>
+    </Reference>
+    <Reference Include="FluentMigrator.Runner.Firebird, Version=3.1.3.0, Culture=neutral, PublicKeyToken=aacfc7de5acabf05, processorArchitecture=MSIL">
+      <HintPath>C:\NuGetLocalRepo\FluentMigrator.Runner.Firebird.3.1.3\lib\net461\FluentMigrator.Runner.Firebird.dll</HintPath>
+    </Reference>
+    <Reference Include="FluentMigrator.Runner.Hana, Version=3.1.3.0, Culture=neutral, PublicKeyToken=aacfc7de5acabf05, processorArchitecture=MSIL">
+      <HintPath>C:\NuGetLocalRepo\FluentMigrator.Runner.Hana.3.1.3\lib\net461\FluentMigrator.Runner.Hana.dll</HintPath>
+    </Reference>
+    <Reference Include="FluentMigrator.Runner.Jet, Version=3.1.3.0, Culture=neutral, PublicKeyToken=aacfc7de5acabf05, processorArchitecture=MSIL">
+      <HintPath>C:\NuGetLocalRepo\FluentMigrator.Runner.Jet.3.1.3\lib\net461\FluentMigrator.Runner.Jet.dll</HintPath>
+    </Reference>
+    <Reference Include="FluentMigrator.Runner.MySql, Version=3.1.3.0, Culture=neutral, PublicKeyToken=aacfc7de5acabf05, processorArchitecture=MSIL">
+      <HintPath>C:\NuGetLocalRepo\FluentMigrator.Runner.MySql.3.1.3\lib\net461\FluentMigrator.Runner.MySql.dll</HintPath>
+    </Reference>
+    <Reference Include="FluentMigrator.Runner.Oracle, Version=3.1.3.0, Culture=neutral, PublicKeyToken=aacfc7de5acabf05, processorArchitecture=MSIL">
+      <HintPath>C:\NuGetLocalRepo\FluentMigrator.Runner.Oracle.3.1.3\lib\net461\FluentMigrator.Runner.Oracle.dll</HintPath>
+    </Reference>
+    <Reference Include="FluentMigrator.Runner.Postgres, Version=3.1.3.0, Culture=neutral, PublicKeyToken=aacfc7de5acabf05, processorArchitecture=MSIL">
+      <HintPath>C:\NuGetLocalRepo\FluentMigrator.Runner.Postgres.3.1.3\lib\net461\FluentMigrator.Runner.Postgres.dll</HintPath>
+    </Reference>
+    <Reference Include="FluentMigrator.Runner.Redshift, Version=3.1.3.0, Culture=neutral, PublicKeyToken=aacfc7de5acabf05, processorArchitecture=MSIL">
+      <HintPath>C:\NuGetLocalRepo\FluentMigrator.Runner.Redshift.3.1.3\lib\net461\FluentMigrator.Runner.Redshift.dll</HintPath>
+    </Reference>
+    <Reference Include="FluentMigrator.Runner.SqlAnywhere, Version=3.1.3.0, Culture=neutral, PublicKeyToken=aacfc7de5acabf05, processorArchitecture=MSIL">
+      <HintPath>C:\NuGetLocalRepo\FluentMigrator.Runner.SqlAnywhere.3.1.3\lib\net461\FluentMigrator.Runner.SqlAnywhere.dll</HintPath>
+    </Reference>
+    <Reference Include="FluentMigrator.Runner.SQLite, Version=3.1.3.0, Culture=neutral, PublicKeyToken=aacfc7de5acabf05, processorArchitecture=MSIL">
+      <HintPath>C:\NuGetLocalRepo\FluentMigrator.Runner.SQLite.3.1.3\lib\net461\FluentMigrator.Runner.SQLite.dll</HintPath>
+    </Reference>
+    <Reference Include="FluentMigrator.Runner.SqlServer, Version=3.1.3.0, Culture=neutral, PublicKeyToken=aacfc7de5acabf05, processorArchitecture=MSIL">
+      <HintPath>C:\NuGetLocalRepo\FluentMigrator.Runner.SqlServer.3.1.3\lib\net461\FluentMigrator.Runner.SqlServer.dll</HintPath>
+    </Reference>
+    <Reference Include="FluentMigrator.Runner.SqlServerCe, Version=3.1.3.0, Culture=neutral, PublicKeyToken=aacfc7de5acabf05, processorArchitecture=MSIL">
+      <HintPath>C:\NuGetLocalRepo\FluentMigrator.Runner.SqlServerCe.3.1.3\lib\net461\FluentMigrator.Runner.SqlServerCe.dll</HintPath>
+    </Reference>
     <Reference Include="Microsoft.CSharp" />
+    <Reference Include="Microsoft.Extensions.Configuration.Abstractions, Version=2.0.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
+      <HintPath>C:\NuGetLocalRepo\Microsoft.Extensions.Configuration.Abstractions.2.0.1\lib\netstandard2.0\Microsoft.Extensions.Configuration.Abstractions.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.Extensions.DependencyInjection, Version=2.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
+      <HintPath>C:\NuGetLocalRepo\Microsoft.Extensions.DependencyInjection.2.0.0\lib\netstandard2.0\Microsoft.Extensions.DependencyInjection.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.Extensions.DependencyInjection.Abstractions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
+      <HintPath>C:\NuGetLocalRepo\Microsoft.Extensions.DependencyInjection.Abstractions.2.0.0\lib\netstandard2.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.Extensions.Logging, Version=2.0.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
+      <HintPath>C:\NuGetLocalRepo\Microsoft.Extensions.Logging.2.0.1\lib\netstandard2.0\Microsoft.Extensions.Logging.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.Extensions.Logging.Abstractions, Version=2.0.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
+      <HintPath>C:\NuGetLocalRepo\Microsoft.Extensions.Logging.Abstractions.2.0.1\lib\netstandard2.0\Microsoft.Extensions.Logging.Abstractions.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.Extensions.Options, Version=2.0.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
+      <HintPath>C:\NuGetLocalRepo\Microsoft.Extensions.Options.2.0.1\lib\netstandard2.0\Microsoft.Extensions.Options.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.Extensions.Primitives, Version=2.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
+      <HintPath>C:\NuGetLocalRepo\Microsoft.Extensions.Primitives.2.0.0\lib\netstandard2.0\Microsoft.Extensions.Primitives.dll</HintPath>
+    </Reference>
     <Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
       <HintPath>C:\NuGetLocalRepo\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
     </Reference>
@@ -68,6 +143,9 @@
       <HintPath>C:\NuGetLocalRepo\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
     </Reference>
     <Reference Include="System.ComponentModel" />
+    <Reference Include="System.ComponentModel.Annotations, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+      <HintPath>C:\NuGetLocalRepo\System.ComponentModel.Annotations.4.4.1\lib\net461\System.ComponentModel.Annotations.dll</HintPath>
+    </Reference>
     <Reference Include="System.Configuration.Install" />
     <Reference Include="System.Drawing.Design" />
     <Reference Include="System.Management" />
@@ -141,13 +219,16 @@
     <EmbeddedResource Include="VCommon\VSwaggerUI\Version2\swagger-ui-standalone-preset.js" />
     <EmbeddedResource Include="VCommon\VSwaggerUI\Version2\swagger-ui.css" />
     <EmbeddedResource Include="VCommon\VSwaggerUI\Version2\swagger-ui.js" />
-    <Content Include="Web.config" />
+    <Content Include="Web.config">
+      <SubType>Designer</SubType>
+    </Content>
   </ItemGroup>
   <ItemGroup>
     <Compile Include="App\ApiModule.cs" />
     <Compile Include="App\AppServices\Common\AppServiceBase.cs" />
     <Compile Include="App\AppServices\KanbanService.cs" />
     <Compile Include="App\Auditing\ServiceAuditInterceptor.cs" />
+    <Compile Include="App\DbMigration\20190413235130_InitDatabase.cs" />
     <Compile Include="App\Dto\CreateWithNameAndParentIdInput.cs" />
     <Compile Include="App\Dto\CreateWithNameInput.cs" />
     <Compile Include="App\Dto\DeleteByIdInput.cs" />
@@ -156,6 +237,7 @@
     <Compile Include="App\Dto\ReameInput.cs" />
     <Compile Include="App\EntityFramework\MyTrelloDataContext.cs" />
     <Compile Include="App\Entity\KanbanEntity.cs" />
+    <Compile Include="App\MyTrelloDbMigrator.cs" />
     <Compile Include="App\Swagger2UiModule.cs" />
     <Compile Include="App\Swagger1UiModule.cs" />
     <Compile Include="App\VFriendlyException.cs" />
@@ -311,6 +393,13 @@
       </FlavorProperties>
     </VisualStudio>
   </ProjectExtensions>
+  <Import Project="C:\NuGetLocalRepo\FluentMigrator.Runner.SqlServerCe.3.1.3\build\netstandard2.0\FluentMigrator.Runner.SqlServerCe.targets" Condition="Exists('C:\NuGetLocalRepo\FluentMigrator.Runner.SqlServerCe.3.1.3\build\netstandard2.0\FluentMigrator.Runner.SqlServerCe.targets')" />
+  <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
+    <PropertyGroup>
+      <ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>
+    </PropertyGroup>
+    <Error Condition="!Exists('C:\NuGetLocalRepo\FluentMigrator.Runner.SqlServerCe.3.1.3\build\netstandard2.0\FluentMigrator.Runner.SqlServerCe.targets')" Text="$([System.String]::Format('$(ErrorText)', 'C:\NuGetLocalRepo\FluentMigrator.Runner.SqlServerCe.3.1.3\build\netstandard2.0\FluentMigrator.Runner.SqlServerCe.targets'))" />
+  </Target>
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
        Other similar extension points exist, see Microsoft.Common.targets.
   <Target Name="BeforeBuild">

+ 9 - 1
MyTrelloWeb/Web.config

@@ -12,7 +12,7 @@
     <add key="LogPath" value="C:\VAppLogs\MyTrelloWeb" />
   </appSettings>
   <connectionStrings>
-    <add name="default" connectionString="Initial Catalog=MyTrello;Data Source=my_trello_db_server;user id=root;password=1234" />
+    <add name="default" connectionString="Initial Catalog=MyTrello;Data Source=my_trello_db_server;user id=root" />
   </connectionStrings>
   <system.web>
     <compilation debug="true" targetFramework="4.6.1" />
@@ -53,6 +53,14 @@
         <assemblyIdentity name="Unity.Abstractions" publicKeyToken="489b6accfaf20ef0" culture="neutral" />
         <bindingRedirect oldVersion="0.0.0.0-4.1.3.0" newVersion="4.1.3.0" />
       </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.0.4.1" newVersion="4.0.4.1" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
+      </dependentAssembly>
     </assemblyBinding>
   </runtime>
 </configuration>

+ 26 - 0
MyTrelloWeb/packages.config

@@ -3,10 +3,36 @@
   <package id="AutoMapper" version="8.0.0" targetFramework="net461" />
   <package id="EntityFramework" version="6.2.0" targetFramework="net461" />
   <package id="EntityFramework.DynamicFilters" version="3.0.1" targetFramework="net461" />
+  <package id="FluentMigrator" version="3.1.3" targetFramework="net461" />
+  <package id="FluentMigrator.Abstractions" version="3.1.3" targetFramework="net461" />
+  <package id="FluentMigrator.Extensions.SqlAnywhere" version="3.1.3" targetFramework="net461" />
+  <package id="FluentMigrator.Extensions.SqlServer" version="3.1.3" targetFramework="net461" />
+  <package id="FluentMigrator.Runner" version="3.1.3" targetFramework="net461" />
+  <package id="FluentMigrator.Runner.Core" version="3.1.3" targetFramework="net461" />
+  <package id="FluentMigrator.Runner.Db2" version="3.1.3" targetFramework="net461" />
+  <package id="FluentMigrator.Runner.Firebird" version="3.1.3" targetFramework="net461" />
+  <package id="FluentMigrator.Runner.Hana" version="3.1.3" targetFramework="net461" />
+  <package id="FluentMigrator.Runner.Jet" version="3.1.3" targetFramework="net461" />
+  <package id="FluentMigrator.Runner.MySql" version="3.1.3" targetFramework="net461" />
+  <package id="FluentMigrator.Runner.Oracle" version="3.1.3" targetFramework="net461" />
+  <package id="FluentMigrator.Runner.Postgres" version="3.1.3" targetFramework="net461" />
+  <package id="FluentMigrator.Runner.Redshift" version="3.1.3" targetFramework="net461" />
+  <package id="FluentMigrator.Runner.SqlAnywhere" version="3.1.3" targetFramework="net461" />
+  <package id="FluentMigrator.Runner.SQLite" version="3.1.3" targetFramework="net461" />
+  <package id="FluentMigrator.Runner.SqlServer" version="3.1.3" targetFramework="net461" />
+  <package id="FluentMigrator.Runner.SqlServerCe" version="3.1.3" targetFramework="net461" />
+  <package id="Microsoft.Extensions.Configuration.Abstractions" version="2.0.1" targetFramework="net461" />
+  <package id="Microsoft.Extensions.DependencyInjection" version="2.0.0" targetFramework="net461" />
+  <package id="Microsoft.Extensions.DependencyInjection.Abstractions" version="2.0.0" targetFramework="net461" />
+  <package id="Microsoft.Extensions.Logging" version="2.0.1" targetFramework="net461" />
+  <package id="Microsoft.Extensions.Logging.Abstractions" version="2.0.1" targetFramework="net461" />
+  <package id="Microsoft.Extensions.Options" version="2.0.1" targetFramework="net461" />
+  <package id="Microsoft.Extensions.Primitives" version="2.0.0" targetFramework="net461" />
   <package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net461" />
   <package id="MySql.Data" version="6.10.8" targetFramework="net461" />
   <package id="MySql.Data.Entity" version="6.10.8" targetFramework="net461" />
   <package id="Newtonsoft.Json" version="12.0.1" targetFramework="net461" />
+  <package id="System.ComponentModel.Annotations" version="4.4.1" targetFramework="net461" />
   <package id="System.Runtime.CompilerServices.Unsafe" version="4.5.2" targetFramework="net461" />
   <package id="System.ValueTuple" version="4.5.0" targetFramework="net461" />
   <package id="Unity.Abstractions" version="4.1.3" targetFramework="net461" />