Browse Source

Change database provider to PostgreSql

pull/36/head
EngincanV 5 years ago
parent
commit
ed2cf896a5
  1. 2
      src/EventHub.BackgroundServices/appsettings.json
  2. 2
      src/EventHub.DbMigrator/appsettings.json
  3. 2
      src/EventHub.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/EventHubMigrationsDbContextFactory.cs
  4. 2633
      src/EventHub.EntityFrameworkCore.DbMigrations/Migrations/20210307195605_Initial.Designer.cs
  5. 31
      src/EventHub.EntityFrameworkCore.DbMigrations/Migrations/20210321144318_Added_Indexes.cs
  6. 5273
      src/EventHub.EntityFrameworkCore.DbMigrations/Migrations/20210421100913_Initial.Designer.cs
  7. 3149
      src/EventHub.EntityFrameworkCore.DbMigrations/Migrations/20210421100913_Initial.cs
  8. 863
      src/EventHub.EntityFrameworkCore.DbMigrations/Migrations/EventHubMigrationsDbContextModelSnapshot.cs
  9. 6
      src/EventHub.EntityFrameworkCore/EntityFrameworkCore/EventHubEntityFrameworkCoreModule.cs
  10. 2
      src/EventHub.EntityFrameworkCore/EventHub.EntityFrameworkCore.csproj
  11. 2
      src/EventHub.HttpApi.Host/appsettings.json
  12. 2
      src/EventHub.IdentityServer/appsettings.json

2
src/EventHub.BackgroundServices/appsettings.json

@ -1,6 +1,6 @@
{
"ConnectionStrings": {
"Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=EventHub;Trusted_Connection=True"
"Default": "Host=localhost;Database=EventHub;Username=postgres;Password=1q2w3E*"
},
"Redis": {
"Configuration": "127.0.0.1"

2
src/EventHub.DbMigrator/appsettings.json

@ -1,6 +1,6 @@
{
"ConnectionStrings": {
"Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=EventHub;Trusted_Connection=True"
"Default": "Host=localhost;Database=EventHub;Username=postgres;Password=1q2w3E*"
},
"IdentityServer": {
"Clients": {

2
src/EventHub.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/EventHubMigrationsDbContextFactory.cs

@ -16,7 +16,7 @@ namespace EventHub.EntityFrameworkCore
var configuration = BuildConfiguration();
var builder = new DbContextOptionsBuilder<EventHubMigrationsDbContext>()
.UseSqlServer(configuration.GetConnectionString("Default"));
.UseNpgsql(configuration.GetConnectionString("Default"));
return new EventHubMigrationsDbContext(builder.Options);
}

2633
src/EventHub.EntityFrameworkCore.DbMigrations/Migrations/20210307195605_Initial.Designer.cs

File diff suppressed because it is too large

31
src/EventHub.EntityFrameworkCore.DbMigrations/Migrations/20210321144318_Added_Indexes.cs

@ -1,31 +0,0 @@
using Microsoft.EntityFrameworkCore.Migrations;
namespace EventHub.Migrations
{
public partial class Added_Indexes : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateIndex(
name: "IX_EhEvents_IsEmailSentToMembers",
table: "EhEvents",
column: "IsEmailSentToMembers");
migrationBuilder.CreateIndex(
name: "IX_EhEvents_IsRemindingEmailSent_StartTime",
table: "EhEvents",
columns: new[] { "IsRemindingEmailSent", "StartTime" });
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropIndex(
name: "IX_EhEvents_IsEmailSentToMembers",
table: "EhEvents");
migrationBuilder.DropIndex(
name: "IX_EhEvents_IsRemindingEmailSent_StartTime",
table: "EhEvents");
}
}
}

5273
src/EventHub.EntityFrameworkCore.DbMigrations/Migrations/20210321144318_Added_Indexes.Designer.cs → src/EventHub.EntityFrameworkCore.DbMigrations/Migrations/20210421100913_Initial.Designer.cs

File diff suppressed because it is too large

3149
src/EventHub.EntityFrameworkCore.DbMigrations/Migrations/20210307195605_Initial.cs → src/EventHub.EntityFrameworkCore.DbMigrations/Migrations/20210421100913_Initial.cs

File diff suppressed because it is too large

863
src/EventHub.EntityFrameworkCore.DbMigrations/Migrations/EventHubMigrationsDbContextModelSnapshot.cs

File diff suppressed because it is too large

6
src/EventHub.EntityFrameworkCore/EntityFrameworkCore/EventHubEntityFrameworkCoreModule.cs

@ -2,13 +2,13 @@ using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.AuditLogging.EntityFrameworkCore;
using Volo.Abp.BackgroundJobs.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore.SqlServer;
using Volo.Abp.Identity.EntityFrameworkCore;
using Volo.Abp.IdentityServer.EntityFrameworkCore;
using Volo.Abp.Modularity;
using Volo.Abp.PermissionManagement.EntityFrameworkCore;
using Volo.Abp.SettingManagement.EntityFrameworkCore;
using Volo.Abp.BlobStoring.Database.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore.PostgreSql;
namespace EventHub.EntityFrameworkCore
{
@ -18,7 +18,7 @@ namespace EventHub.EntityFrameworkCore
typeof(AbpIdentityServerEntityFrameworkCoreModule),
typeof(AbpPermissionManagementEntityFrameworkCoreModule),
typeof(AbpSettingManagementEntityFrameworkCoreModule),
typeof(AbpEntityFrameworkCoreSqlServerModule),
typeof(AbpEntityFrameworkCorePostgreSqlModule),
typeof(AbpBackgroundJobsEntityFrameworkCoreModule),
typeof(AbpAuditLoggingEntityFrameworkCoreModule),
typeof(BlobStoringDatabaseEntityFrameworkCoreModule)
@ -43,7 +43,7 @@ namespace EventHub.EntityFrameworkCore
{
/* The main point to change your DBMS.
* See also EventHubMigrationsDbContextFactory for EF Core tooling. */
options.UseSqlServer();
options.UseNpgsql();
});
}
}

2
src/EventHub.EntityFrameworkCore/EventHub.EntityFrameworkCore.csproj

@ -10,7 +10,7 @@
<ItemGroup>
<PackageReference Include="Volo.Abp.BlobStoring.Database.EntityFrameworkCore" Version="4.2.1" />
<ProjectReference Include="..\EventHub.Domain\EventHub.Domain.csproj" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore.SqlServer" Version="4.2.1" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore.PostgreSql" Version="4.2.1" />
<PackageReference Include="Volo.Abp.PermissionManagement.EntityFrameworkCore" Version="4.2.1" />
<PackageReference Include="Volo.Abp.SettingManagement.EntityFrameworkCore" Version="4.2.1" />
<PackageReference Include="Volo.Abp.Identity.EntityFrameworkCore" Version="4.2.1" />

2
src/EventHub.HttpApi.Host/appsettings.json

@ -3,7 +3,7 @@
"CorsOrigins": "https://*.EventHub.com,https://localhost:44307,https://localhost:44308"
},
"ConnectionStrings": {
"Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=EventHub;Trusted_Connection=True"
"Default": "Host=localhost;Database=EventHub;Username=postgres;Password=1q2w3E*"
},
"Redis": {
"Configuration": "127.0.0.1"

2
src/EventHub.IdentityServer/appsettings.json

@ -5,7 +5,7 @@
"RedirectAllowedUrls": "http://localhost:4200,https://localhost:44307"
},
"ConnectionStrings": {
"Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=EventHub;Trusted_Connection=True"
"Default": "Host=localhost;Database=EventHub;Username=postgres;Password=1q2w3E*"
},
"Redis": {
"Configuration": "127.0.0.1"

Loading…
Cancel
Save