Skip to content
This repository has been archived by the owner on Apr 30, 2021. It is now read-only.

Commit

Permalink
Adding Redshift npgsql db connector
Browse files Browse the repository at this point in the history
  • Loading branch information
yurigorokhov committed Jun 14, 2016
1 parent 2db3a59 commit 3b40a35
Show file tree
Hide file tree
Showing 67 changed files with 239,958 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/mindtouch.db/updateDb.cs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ static int Main(string[] args) {

// Begin Parsing DLL
var dllAssembly = Assembly.LoadFile(updateDLL);
var upgradeAttribute = ADataUpdater.GetUpdateClassWithUpgradeAttribte(dllAssembly).Value;
var upgradeAttribute = ADataUpdater.GetUpdateClassWithUpgradeAttribute(dllAssembly).Value;
ADataUpdater schemaUpdater = null;
if(listDatabases) {

Expand Down
18 changes: 18 additions & 0 deletions src/mindtouch.dream/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?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" />
</configSections>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
<parameters>
<parameter value="v11.0" />
</parameters>
</defaultConnectionFactory>
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
<provider invariantName="Npgsql" type="Npgsql.NpgsqlServices, Npgsql.EntityFramework" />
</providers>
</entityFramework>
</configuration>
4 changes: 2 additions & 2 deletions src/mindtouch.dream/Data/ADataUpdater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public int CompareTo(DbMethod other) {
public abstract class ADataUpdater : IDataUpdater {

//--- Class Methods ---
public static KeyValuePair<Type, DataUpgradeAttribute> GetUpdateClassWithUpgradeAttribte(Assembly updateAssembly) {
public static KeyValuePair<Type, DataUpgradeAttribute> GetUpdateClassWithUpgradeAttribute(Assembly updateAssembly) {

// get all the members of the Assembly
var types = updateAssembly.GetTypes();
Expand Down Expand Up @@ -273,7 +273,7 @@ public virtual void ExecuteMethod(string name) {
/// <param name="param">Parameter array to pass to custom method</param>
public void ExecuteCustomMethod(string name, Assembly updateAssembly, params object[] param) {
if(_dataUpgradeClass == null) {
_dataUpgradeClass = GetUpdateClassWithUpgradeAttribte(updateAssembly).Key;
_dataUpgradeClass = GetUpdateClassWithUpgradeAttribute(updateAssembly).Key;
}
if(_dataUpgradeClassInstance == null) {
_dataUpgradeClassInstance = CreateActivatorInstance(_dataUpgradeClass);
Expand Down
22 changes: 22 additions & 0 deletions src/mindtouch.dream/mindtouch.dream.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,36 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Autofac.2.6.3.862\lib\net40\Autofac.dll</HintPath>
</Reference>
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.6.0.0\lib\net40\EntityFramework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.6.0.0\lib\net40\EntityFramework.SqlServer.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821, processorArchitecture=MSIL">
<HintPath>..\packages\log4net.1.2.10\lib\2.0\log4net.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Mono.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">
<HintPath>..\packages\Npgsql.2.2.7\lib\net40\Mono.Security.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Npgsql, Version=2.2.7.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7, processorArchitecture=MSIL">
<HintPath>..\packages\Npgsql.2.2.7\lib\net40\Npgsql.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Npgsql.EntityFramework, Version=2.2.7.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7, processorArchitecture=MSIL">
<HintPath>..\packages\Npgsql.EntityFramework.2.2.7\lib\net40\Npgsql.EntityFramework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="SgmlReaderDll, Version=1.8.12.0, Culture=neutral, PublicKeyToken=46b2db9ca481831b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\redist\SgmlReaderDll.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Core" />
<Reference Include="System.Data" />
<Reference Include="System.Security" />
Expand Down Expand Up @@ -331,6 +352,7 @@
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<None Include="mindtouch.dream.nuspec">
<SubType>Designer</SubType>
</None>
Expand Down
3 changes: 3 additions & 0 deletions src/mindtouch.dream/packages.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Autofac" version="2.6.3.862" targetFramework="net40" />
<package id="EntityFramework" version="6.0.0" targetFramework="net40" />
<package id="log4net" version="1.2.10" targetFramework="net40" />
<package id="Npgsql" version="2.2.7" targetFramework="net40" />
<package id="Npgsql.EntityFramework" version="2.2.7" targetFramework="net40" />
</packages>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
</configSections>
</configuration>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
</configSections>
</configuration>
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit 3b40a35

Please sign in to comment.