Skip to content

Commit

Permalink
Merge pull request #11 from IliyanIlievPH/10
Browse files Browse the repository at this point in the history
Closes #10
  • Loading branch information
PaterSantyago committed Jul 21, 2020
2 parents 8847c17 + d467e29 commit 1124042
Show file tree
Hide file tree
Showing 16 changed files with 154 additions and 126 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 2.2.207
dotnet-version: 3.1.302
- name: Install dependencies
run: dotnet restore
- name: Build solution
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 2.2.207
dotnet-version: 3.1.302
- name: Install dependencies
run: dotnet restore
- name: Build
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
<None Remove="MAVN.Service.MaintenanceMode.Client.xml" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Lykke.HttpClientGenerator" Version="2.5.0" />
<PackageReference Include="Lykke.SettingsReader" Version="5.2.0" />
<PackageReference Include="Lykke.HttpClientGenerator" Version="3.1.0" />
<PackageReference Include="Lykke.SettingsReader" Version="5.3.0" />
<PackageReference Include="Refit" Version="4.6.30" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<Version>1.0.0</Version>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Lykke.Common" Version="7.4.0" />
<PackageReference Include="Lykke.Common" Version="7.5.0" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<Version>1.0.0</Version>
</PropertyGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<Version>1.0.0</Version>
<RootNamespace>MAVN.Service.MaintenanceMode.MsSqlRepositories</RootNamespace>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\MAVN.Service.MaintenanceMode.Domain\MAVN.Service.MaintenanceMode.Domain.csproj" />
<PackageReference Include="MAVN.Persistence.PostgreSQL.Legacy" Version="1.1.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="3.1.5">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<PackageReference Include="MAVN.Common.MsSql" Version="3.0.0" />
<ProjectReference Include="..\MAVN.Service.MaintenanceMode.Domain\MAVN.Service.MaintenanceMode.Domain.csproj" />
</ItemGroup>
<PropertyGroup>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
using System.Data.Common;
using JetBrains.Annotations;
using MAVN.Common.MsSql;
using MAVN.Persistence.PostgreSQL.Legacy;
using MAVN.Service.MaintenanceMode.MsSqlRepositories.Entitites;
using Microsoft.EntityFrameworkCore;

namespace MAVN.Service.MaintenanceMode.MsSqlRepositories
{
public class MaintenanceEventContext : MsSqlContext
public class MaintenanceEventContext : PostgreSQLContext
{
private const string Schema = "maintenance";

Expand Down Expand Up @@ -40,11 +40,7 @@ public MaintenanceEventContext(string connectionString, bool isTraceEnabled, int
{
}

protected override void OnLykkeConfiguring(DbContextOptionsBuilder optionsBuilder)
{
}

protected override void OnLykkeModelCreating(ModelBuilder modelBuilder)
protected override void OnMAVNModelCreating(ModelBuilder modelBuilder)
{
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;
using System;
using System.Threading.Tasks;
using MAVN.Common.MsSql;
using MAVN.Persistence.PostgreSQL.Legacy;
using MAVN.Service.MaintenanceMode.Domain;
using MAVN.Service.MaintenanceMode.Domain.Repositories;
using MAVN.Service.MaintenanceMode.MsSqlRepositories.Entitites;
Expand All @@ -10,9 +10,9 @@ namespace MAVN.Service.MaintenanceMode.MsSqlRepositories
{
public class MaintenanceEventRepository : IMaintenanceEventRepository
{
private readonly MsSqlContextFactory<MaintenanceEventContext> _contextFactory;
private readonly PostgreSQLContextFactory<MaintenanceEventContext> _contextFactory;

public MaintenanceEventRepository(MsSqlContextFactory<MaintenanceEventContext> contextFactory)
public MaintenanceEventRepository(PostgreSQLContextFactory<MaintenanceEventContext> contextFactory)
{
_contextFactory = contextFactory;
}
Expand Down

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using System;
using Microsoft.EntityFrameworkCore.Metadata;
using System;
using Microsoft.EntityFrameworkCore.Migrations;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;

namespace MAVN.Service.MaintenanceMode.MsSqlRepositories.Migrations
{
public partial class InitialMigration : Migration
public partial class Initial : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
Expand All @@ -17,7 +17,7 @@ protected override void Up(MigrationBuilder migrationBuilder)
columns: table => new
{
Id = table.Column<int>(nullable: false)
.Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn),
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
PlannedDuration = table.Column<TimeSpan>(nullable: false),
ActualStart = table.Column<DateTime>(nullable: false),
Who = table.Column<string>(nullable: false),
Expand All @@ -34,7 +34,7 @@ protected override void Up(MigrationBuilder migrationBuilder)
columns: table => new
{
Id = table.Column<int>(nullable: false)
.Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn),
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
PlannedDuration = table.Column<TimeSpan>(nullable: false),
ActualStart = table.Column<DateTime>(nullable: false),
Who = table.Column<string>(nullable: false),
Expand Down
Loading

0 comments on commit 1124042

Please sign in to comment.