OpenSource » Database Migrator » Migrator2
Clone URL:  
Pushed to one repository · View In Graph Contained in tip

2.0.1 Upgraded to .Net 4.5.1 and added binding redirect for custom nhibernate

Changeset 638f56e99ea0

Parent e616017b8117

by Profile picture of Daniel PupekDaniel Pupek

Changes to 13 files · Browse files at 638f56e99ea0 Showing diff from parent e616017b8117 Diff from another changeset...

 
1
2
 
3
4
5
 
23
24
25
26
 
27
28
29
 
34
35
36
 
37
38
39
 
42
43
44
 
45
46
47
 
1
 
2
3
4
5
 
23
24
25
 
26
27
28
29
 
34
35
36
37
38
39
40
 
43
44
45
46
47
48
49
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0"> +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0">   <PropertyGroup>   <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>   <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> @@ -23,7 +23,7 @@
  <OldToolsVersion>3.5</OldToolsVersion>   <UpgradeBackupLocation>   </UpgradeBackupLocation> - <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> + <TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>   <TargetFrameworkProfile />   </PropertyGroup>   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> @@ -34,6 +34,7 @@
  <DefineConstants>DEBUG;TRACE</DefineConstants>   <ErrorReport>prompt</ErrorReport>   <WarningLevel>4</WarningLevel> + <Prefer32Bit>false</Prefer32Bit>   </PropertyGroup>   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">   <DebugType>pdbonly</DebugType> @@ -42,6 +43,7 @@
  <DefineConstants>TRACE</DefineConstants>   <ErrorReport>prompt</ErrorReport>   <WarningLevel>4</WarningLevel> + <Prefer32Bit>false</Prefer32Bit>   </PropertyGroup>   <ItemGroup>   <Reference Include="log4net, Version=2.0.7.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
 
30
31
32
33
34
 
 
35
 
30
31
32
 
 
33
34
35
@@ -30,6 +30,6 @@
 // Build Number  // Revision  // -[assembly: AssemblyVersion("2.0.0.0")] -[assembly: AssemblyFileVersion("2.0.0.0")] +[assembly: AssemblyVersion("2.0.1.0")] +[assembly: AssemblyFileVersion("2.0.1.0")]  [assembly: NeutralResourcesLanguageAttribute("en-US")]
 
1
2
3
 
 
 
 
 
 
 
 
 
 
 
 
1
2
 
3
4
5
6
7
8
9
10
11
12
13
@@ -1,3 +1,13 @@
 <?xml version="1.0"?>  <configuration> -<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration> + <runtime> + <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> + + <dependentAssembly> + <assemblyIdentity name="NHibernate" publicKeyToken="aa95f207798dfdb4" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-4.0.0.4000" newVersion="4.0.2.4000" /> + </dependentAssembly> + + </assemblyBinding> + </runtime> +<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.1"/></startup></configuration>
 
1
2
3
 
4
5
6
 
 
1
2
 
3
4
5
6
 
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>  <packages> - <package id="log4net" version="2.0.7" targetFramework="net40" /> + <package id="log4net" version="2.0.7" targetFramework="net40" requireReinstallation="true" />   <package id="Microsoft.AspNet.Razor" version="2.0.30506.0" targetFramework="net40" />   <package id="RazorEngine" version="3.3.0" targetFramework="net40" />  </packages> \ No newline at end of file
 
29
30
31
32
33
 
 
34
35
 
29
30
31
 
 
32
33
34
35
@@ -29,7 +29,7 @@
 // Build Number  // Revision  // -[assembly: AssemblyVersion("2.0.0.0")] -[assembly: AssemblyFileVersion("2.0.0.0")] +[assembly: AssemblyVersion("2.0.1.0")] +[assembly: AssemblyFileVersion("2.0.1.0")]  [assembly: InternalsVisibleTo("Migrator.Tests")]  [assembly: InternalsVisibleTo("Migrator.Console")]
 
19
20
21
 
22
23
24
 
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
 
 
 
344
345
346
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
347
348
349
 
19
20
21
22
23
24
25
 
328
329
330
 
331
 
 
 
 
 
 
 
 
 
 
 
 
332
333
334
335
 
 
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
@@ -19,6 +19,7 @@
 using System.Runtime.InteropServices;  using System.Text.RegularExpressions;  using System.Collections.Generic; +using System.Diagnostics;  using System.Linq;  using Mono.Security.X509;   @@ -327,23 +328,35 @@
  /// <returns>The migrations collection</returns>   public static IEnumerable<Type> GetMigrationTypes(Assembly asm)   { - var migrations = new List<Type>();   - foreach (Type t in asm.GetTypes()) - { - MigrationAttribute attrib = (MigrationAttribute) - Attribute.GetCustomAttribute(t, typeof(MigrationAttribute)); - if (attrib != null && typeof(Migration).IsAssignableFrom(t)) - { - if (!attrib.Ignore) - { - migrations.Add(t); - } - } - } + try + { + var migrations = new List<Type>();   - migrations.Sort(new MigrationTypeComparer(true)); - return migrations; + foreach (Type t in asm.GetTypes()) + { + MigrationAttribute attrib = (MigrationAttribute) + Attribute.GetCustomAttribute(t, typeof(MigrationAttribute)); + if (attrib != null && typeof(Migration).IsAssignableFrom(t)) + { + if (!attrib.Ignore) + { + migrations.Add(t); + } + } + } + + migrations.Sort(new MigrationTypeComparer(true)); + return migrations; + } + catch (Exception e) + { +#if DEBUG + Debugger.Launch(); + Debugger.Break(); +#endif + throw ; + }   }     #endregion
 
1
2
 
3
4
5
 
23
24
25
26
 
27
28
29
 
36
37
38
 
39
40
41
 
45
46
47
 
48
49
50
 
1
 
2
3
4
5
 
23
24
25
 
26
27
28
29
 
36
37
38
39
40
41
42
 
46
47
48
49
50
51
52
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0"> +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0">   <PropertyGroup>   <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>   <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> @@ -23,7 +23,7 @@
  <OldToolsVersion>3.5</OldToolsVersion>   <UpgradeBackupLocation>   </UpgradeBackupLocation> - <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> + <TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>   <TargetFrameworkProfile />   </PropertyGroup>   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> @@ -36,6 +36,7 @@
  <WarningLevel>4</WarningLevel>   <DocumentationFile>bin\Migrator\Debug\Migrator.XML</DocumentationFile>   <PlatformTarget>AnyCPU</PlatformTarget> + <Prefer32Bit>false</Prefer32Bit>   </PropertyGroup>   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">   <DebugType>pdbonly</DebugType> @@ -45,6 +46,7 @@
  <ErrorReport>prompt</ErrorReport>   <WarningLevel>4</WarningLevel>   <DocumentationFile>bin\Migrator\Release\Migrator.XML</DocumentationFile> + <Prefer32Bit>false</Prefer32Bit>   </PropertyGroup>   <ItemGroup>   <Reference Include="EntityFramework">
 
1
 
2
3
4
5
 
6
7
8
 
9
10
11
12
13
14
15
 
 
 
 
16
17
18
19
20
21
 
22
23
24
25
26
 
 
27
28
29
 
 
 
 
1
2
3
4
 
5
6
7
 
8
9
10
11
 
 
 
 
12
13
14
15
16
17
18
19
20
 
21
22
23
24
 
 
25
26
27
28
 
 
29
@@ -1,29 +1,29 @@
-<?xml version="1.0" encoding="utf-8"?> +<?xml version="1.0" encoding="utf-8"?>  <configuration>   <configSections>   <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --> - <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /> + <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>   </configSections>   <startup> - <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" /> + <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.1"/>   </startup>   <system.data>   <DbProviderFactories> - <remove invariant="System.Data.SQLite" /> - <add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".Net Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" /> - <remove invariant="System.Data.SQLite.EF6" /> - <add name="SQLite Data Provider (Entity Framework 6)" invariant="System.Data.SQLite.EF6" description=".Net Framework Data Provider for SQLite (Entity Framework 6)" type="System.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6" /> + <remove invariant="System.Data.SQLite"/> + <add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".Net Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite"/> + <remove invariant="System.Data.SQLite.EF6"/> + <add name="SQLite Data Provider (Entity Framework 6)" invariant="System.Data.SQLite.EF6" description=".Net Framework Data Provider for SQLite (Entity Framework 6)" type="System.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6"/>   </DbProviderFactories>   </system.data>   <entityFramework>   <defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">   <parameters> - <parameter value="v11.0" /> + <parameter value="v11.0"/>   </parameters>   </defaultConnectionFactory>   <providers> - <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" /> - <provider invariantName="System.Data.SQLite.EF6" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6" /> + <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer"/> + <provider invariantName="System.Data.SQLite.EF6" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6"/>   </providers>   </entityFramework> -</configuration> \ No newline at end of file
+</configuration>
 
1
2
3
4
 
 
5
6
7
8
 
 
 
9
 
 
1
2
 
 
3
4
5
 
 
 
6
7
8
9
 
@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="utf-8"?>  <packages> - <package id="EntityFramework" version="6.0.2" targetFramework="net40" /> - <package id="log4net" version="2.0.7" targetFramework="net40" /> + <package id="EntityFramework" version="6.0.2" targetFramework="net40" requireReinstallation="true" /> + <package id="log4net" version="2.0.7" targetFramework="net40" requireReinstallation="true" />   <package id="System.Data.SQLite" version="1.0.92.0" targetFramework="net40" /> - <package id="System.Data.SQLite.Core" version="1.0.92.0" targetFramework="net40" /> - <package id="System.Data.SQLite.EF6" version="1.0.92.0" targetFramework="net40" /> - <package id="System.Data.SQLite.Linq" version="1.0.92.0" targetFramework="net40" /> + <package id="System.Data.SQLite.Core" version="1.0.92.0" targetFramework="net40" requireReinstallation="true" /> + <package id="System.Data.SQLite.EF6" version="1.0.92.0" targetFramework="net40" requireReinstallation="true" /> + <package id="System.Data.SQLite.Linq" version="1.0.92.0" targetFramework="net40" requireReinstallation="true" />  </packages> \ No newline at end of file
Change 1 of 1 Show Entire File test/​App.config Stacked
 
1
2
3
4
5
6
7
 
 
 
 
8
9
10
 
11
12
 
1
2
3
 
 
 
 
4
5
6
7
8
9
 
10
11
12
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>  <configuration>   <appSettings> - <add key="MySqlConnectionString" value="Server=localhost;Database=MigratorTests; User ID=root;Password=sa;"/> - <add key="NpgsqlConnectionString" value="Data Source=localhost;Trusted_Connection=yes;Initial Catalog=MigratorTests;Pooling=false;"/> - <add key="SqlServerConnectionString" value="Data Source=localhost;Trusted_Connection=yes;Initial Catalog=MigratorTests;Pooling=false;"/> - <add key="SqliteServerConnectionString" value="data source=:memory:"/> + <add key="MySqlConnectionString" value="Server=localhost;Database=MigratorTests; User ID=root;Password=sa;"/> + <add key="NpgsqlConnectionString" value="Data Source=localhost;Trusted_Connection=yes;Initial Catalog=MigratorTests;Pooling=false;"/> + <add key="SqlServerConnectionString" value="Data Source=localhost;Trusted_Connection=yes;Initial Catalog=MigratorTests;Pooling=false;"/> + <add key="SqliteServerConnectionString" value="data source=:memory:"/>   </appSettings>   <startup> - <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/> + <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.1"/>   </startup>  </configuration>
 
1
2
 
3
4
5
 
23
24
25
26
 
27
28
29
 
34
35
36
 
37
38
39
 
42
43
44
 
45
46
47
 
1
 
2
3
4
5
 
23
24
25
 
26
27
28
29
 
34
35
36
37
38
39
40
 
43
44
45
46
47
48
49
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0"> +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0">   <PropertyGroup>   <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>   <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> @@ -23,7 +23,7 @@
  <OldToolsVersion>3.5</OldToolsVersion>   <UpgradeBackupLocation>   </UpgradeBackupLocation> - <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> + <TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>   <TargetFrameworkProfile />   </PropertyGroup>   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> @@ -34,6 +34,7 @@
  <DefineConstants>TRACE;DEBUG;DOTNET2</DefineConstants>   <ErrorReport>prompt</ErrorReport>   <WarningLevel>4</WarningLevel> + <Prefer32Bit>false</Prefer32Bit>   </PropertyGroup>   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">   <DebugType>pdbonly</DebugType> @@ -42,6 +43,7 @@
  <DefineConstants>TRACE;DOTNET2</DefineConstants>   <ErrorReport>prompt</ErrorReport>   <WarningLevel>4</WarningLevel> + <Prefer32Bit>false</Prefer32Bit>   </PropertyGroup>   <ItemGroup>   <Reference Include="log4net, Version=2.0.7.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
 
3
4
5
6
7
8
9
10
 
3
4
5
 
 
6
7
8
@@ -3,8 +3,6 @@
   using NUnit.Framework;   -using Migrator.Loggers; -  namespace Migrator.Providers.Tests  {   [TestFixture, Category("Postgre")]
 
1
2
3
 
4
 
 
1
2
 
3
4
 
@@ -1,4 +1,4 @@
 <?xml version="1.0" encoding="utf-8"?>  <packages> - <package id="log4net" version="2.0.7" targetFramework="net40" /> + <package id="log4net" version="2.0.7" targetFramework="net40" requireReinstallation="true" />  </packages> \ No newline at end of file