diff --git a/services/administration/src/EShopOnAbp.AdministrationService.EntityFrameworkCore/EShopOnAbp.AdministrationService.EntityFrameworkCore.csproj b/services/administration/src/EShopOnAbp.AdministrationService.EntityFrameworkCore/EShopOnAbp.AdministrationService.EntityFrameworkCore.csproj index 918602bf..b0b1e660 100644 --- a/services/administration/src/EShopOnAbp.AdministrationService.EntityFrameworkCore/EShopOnAbp.AdministrationService.EntityFrameworkCore.csproj +++ b/services/administration/src/EShopOnAbp.AdministrationService.EntityFrameworkCore/EShopOnAbp.AdministrationService.EntityFrameworkCore.csproj @@ -13,7 +13,7 @@ - + diff --git a/services/administration/src/EShopOnAbp.AdministrationService.EntityFrameworkCore/EntityFrameworkCore/AdministrationServiceDbContextFactory.cs b/services/administration/src/EShopOnAbp.AdministrationService.EntityFrameworkCore/EntityFrameworkCore/AdministrationServiceDbContextFactory.cs index 97ff6685..e1d9b4b0 100644 --- a/services/administration/src/EShopOnAbp.AdministrationService.EntityFrameworkCore/EntityFrameworkCore/AdministrationServiceDbContextFactory.cs +++ b/services/administration/src/EShopOnAbp.AdministrationService.EntityFrameworkCore/EntityFrameworkCore/AdministrationServiceDbContextFactory.cs @@ -10,7 +10,7 @@ namespace EShopOnAbp.AdministrationService.EntityFrameworkCore public AdministrationServiceDbContext CreateDbContext(string[] args) { var builder = new DbContextOptionsBuilder() - .UseSqlServer(GetConnectionStringFromConfiguration(), b => + .UseNpgsql(GetConnectionStringFromConfiguration(), b => { b.MigrationsHistoryTable("__AdministrationService_Migrations"); }); diff --git a/services/administration/src/EShopOnAbp.AdministrationService.EntityFrameworkCore/EntityFrameworkCore/AdministrationServiceEntityFrameworkCoreModule.cs b/services/administration/src/EShopOnAbp.AdministrationService.EntityFrameworkCore/EntityFrameworkCore/AdministrationServiceEntityFrameworkCoreModule.cs index 2f305309..a9257a22 100644 --- a/services/administration/src/EShopOnAbp.AdministrationService.EntityFrameworkCore/EntityFrameworkCore/AdministrationServiceEntityFrameworkCoreModule.cs +++ b/services/administration/src/EShopOnAbp.AdministrationService.EntityFrameworkCore/EntityFrameworkCore/AdministrationServiceEntityFrameworkCoreModule.cs @@ -2,7 +2,7 @@ using Volo.Abp.AuditLogging.EntityFrameworkCore; using Volo.Abp.BlobStoring.Database.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore; -using Volo.Abp.EntityFrameworkCore.SqlServer; +using Volo.Abp.EntityFrameworkCore.PostgreSql; using Volo.Abp.FeatureManagement.EntityFrameworkCore; using Volo.Abp.Modularity; using Volo.Abp.PermissionManagement.EntityFrameworkCore; @@ -12,7 +12,7 @@ namespace EShopOnAbp.AdministrationService.EntityFrameworkCore { [DependsOn( typeof(AdministrationServiceDomainModule), - typeof(AbpEntityFrameworkCoreSqlServerModule), + typeof(AbpEntityFrameworkCorePostgreSqlModule), typeof(AbpPermissionManagementEntityFrameworkCoreModule), typeof(AbpSettingManagementEntityFrameworkCoreModule), typeof(AbpAuditLoggingEntityFrameworkCoreModule), @@ -38,7 +38,7 @@ namespace EShopOnAbp.AdministrationService.EntityFrameworkCore { options.Configure(c => { - c.UseSqlServer(b => + c.UseNpgsql(b => { b.MigrationsHistoryTable("__AdministrationService_Migrations"); }); diff --git a/services/administration/src/EShopOnAbp.AdministrationService.EntityFrameworkCore/Migrations/20211006102113_Initial.Designer.cs b/services/administration/src/EShopOnAbp.AdministrationService.EntityFrameworkCore/Migrations/20211125123421_Initial.Designer.cs similarity index 75% rename from services/administration/src/EShopOnAbp.AdministrationService.EntityFrameworkCore/Migrations/20211006102113_Initial.Designer.cs rename to services/administration/src/EShopOnAbp.AdministrationService.EntityFrameworkCore/Migrations/20211125123421_Initial.Designer.cs index f928b77a..1a5d55b0 100644 --- a/services/administration/src/EShopOnAbp.AdministrationService.EntityFrameworkCore/Migrations/20211006102113_Initial.Designer.cs +++ b/services/administration/src/EShopOnAbp.AdministrationService.EntityFrameworkCore/Migrations/20211125123421_Initial.Designer.cs @@ -3,9 +3,9 @@ using System; using EShopOnAbp.AdministrationService.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; using Volo.Abp.EntityFrameworkCore; #nullable disable @@ -13,115 +13,115 @@ using Volo.Abp.EntityFrameworkCore; namespace EShopOnAbp.AdministrationService.Migrations { [DbContext(typeof(AdministrationServiceDbContext))] - [Migration("20211006102113_Initial")] + [Migration("20211125123421_Initial")] partial class Initial { protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) - .HasAnnotation("ProductVersion", "6.0.0-rc.1.21452.10") - .HasAnnotation("Relational:MaxIdentifierLength", 128); + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.PostgreSql) + .HasAnnotation("ProductVersion", "6.0.0") + .HasAnnotation("Relational:MaxIdentifierLength", 63); - SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1); + NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("ApplicationName") .HasMaxLength(96) - .HasColumnType("nvarchar(96)") + .HasColumnType("character varying(96)") .HasColumnName("ApplicationName"); b.Property("BrowserInfo") .HasMaxLength(512) - .HasColumnType("nvarchar(512)") + .HasColumnType("character varying(512)") .HasColumnName("BrowserInfo"); b.Property("ClientId") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") + .HasColumnType("character varying(64)") .HasColumnName("ClientId"); b.Property("ClientIpAddress") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") + .HasColumnType("character varying(64)") .HasColumnName("ClientIpAddress"); b.Property("ClientName") .HasMaxLength(128) - .HasColumnType("nvarchar(128)") + .HasColumnType("character varying(128)") .HasColumnName("ClientName"); b.Property("Comments") .HasMaxLength(256) - .HasColumnType("nvarchar(256)") + .HasColumnType("character varying(256)") .HasColumnName("Comments"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) - .HasColumnType("nvarchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CorrelationId") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") + .HasColumnType("character varying(64)") .HasColumnName("CorrelationId"); b.Property("Exceptions") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text"); b.Property("ExecutionDuration") - .HasColumnType("int") + .HasColumnType("integer") .HasColumnName("ExecutionDuration"); b.Property("ExecutionTime") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("HttpMethod") .HasMaxLength(16) - .HasColumnType("nvarchar(16)") + .HasColumnType("character varying(16)") .HasColumnName("HttpMethod"); b.Property("HttpStatusCode") - .HasColumnType("int") + .HasColumnType("integer") .HasColumnName("HttpStatusCode"); b.Property("ImpersonatorTenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("ImpersonatorTenantId"); b.Property("ImpersonatorUserId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("ImpersonatorUserId"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("TenantName") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text"); b.Property("Url") .HasMaxLength(256) - .HasColumnType("nvarchar(256)") + .HasColumnType("character varying(256)") .HasColumnName("Url"); b.Property("UserId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("UserId"); b.Property("UserName") .HasMaxLength(256) - .HasColumnType("nvarchar(256)") + .HasColumnType("character varying(256)") .HasColumnName("UserName"); b.HasKey("Id"); @@ -136,41 +136,41 @@ namespace EShopOnAbp.AdministrationService.Migrations modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("AuditLogId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("AuditLogId"); b.Property("ExecutionDuration") - .HasColumnType("int") + .HasColumnType("integer") .HasColumnName("ExecutionDuration"); b.Property("ExecutionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("ExecutionTime"); b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("MethodName") .HasMaxLength(128) - .HasColumnType("nvarchar(128)") + .HasColumnType("character varying(128)") .HasColumnName("MethodName"); b.Property("Parameters") .HasMaxLength(2000) - .HasColumnType("nvarchar(2000)") + .HasColumnType("character varying(2000)") .HasColumnName("Parameters"); b.Property("ServiceName") .HasMaxLength(256) - .HasColumnType("nvarchar(256)") + .HasColumnType("character varying(256)") .HasColumnName("ServiceName"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -185,41 +185,41 @@ namespace EShopOnAbp.AdministrationService.Migrations modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("AuditLogId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("AuditLogId"); b.Property("ChangeTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("ChangeTime"); b.Property("ChangeType") - .HasColumnType("tinyint") + .HasColumnType("smallint") .HasColumnName("ChangeType"); b.Property("EntityId") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)") + .HasColumnType("character varying(128)") .HasColumnName("EntityId"); b.Property("EntityTenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("EntityTypeFullName") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)") + .HasColumnType("character varying(128)") .HasColumnName("EntityTypeFullName"); b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -234,35 +234,35 @@ namespace EShopOnAbp.AdministrationService.Migrations modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("EntityChangeId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("NewValue") .HasMaxLength(512) - .HasColumnType("nvarchar(512)") + .HasColumnType("character varying(512)") .HasColumnName("NewValue"); b.Property("OriginalValue") .HasMaxLength(512) - .HasColumnType("nvarchar(512)") + .HasColumnType("character varying(512)") .HasColumnName("OriginalValue"); b.Property("PropertyName") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)") + .HasColumnType("character varying(128)") .HasColumnName("PropertyName"); b.Property("PropertyTypeFullName") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") + .HasColumnType("character varying(64)") .HasColumnName("PropertyTypeFullName"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -275,32 +275,32 @@ namespace EShopOnAbp.AdministrationService.Migrations modelBuilder.Entity("Volo.Abp.BlobStoring.Database.DatabaseBlob", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) - .HasColumnType("nvarchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("ContainerId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Content") .HasMaxLength(2147483647) - .HasColumnType("varbinary(max)"); + .HasColumnType("bytea"); b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("Name") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -315,25 +315,25 @@ namespace EShopOnAbp.AdministrationService.Migrations modelBuilder.Entity("Volo.Abp.BlobStoring.Database.DatabaseBlobContainer", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) - .HasColumnType("nvarchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("Name") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -346,29 +346,30 @@ namespace EShopOnAbp.AdministrationService.Migrations modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Name") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)"); b.Property("ProviderKey") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)"); b.Property("ProviderName") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)"); b.Property("Value") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)"); b.HasKey("Id"); - b.HasIndex("Name", "ProviderName", "ProviderKey"); + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique(); b.ToTable("AbpFeatureValues", (string)null); }); @@ -376,30 +377,31 @@ namespace EShopOnAbp.AdministrationService.Migrations modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Name") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)"); b.Property("ProviderKey") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)"); b.Property("ProviderName") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); - b.HasIndex("Name", "ProviderName", "ProviderKey"); + b.HasIndex("TenantId", "Name", "ProviderName", "ProviderKey") + .IsUnique(); b.ToTable("AbpPermissionGrants", (string)null); }); @@ -407,29 +409,30 @@ namespace EShopOnAbp.AdministrationService.Migrations modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Name") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)"); b.Property("ProviderKey") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)"); b.Property("ProviderName") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)"); b.Property("Value") .IsRequired() .HasMaxLength(2048) - .HasColumnType("nvarchar(2048)"); + .HasColumnType("character varying(2048)"); b.HasKey("Id"); - b.HasIndex("Name", "ProviderName", "ProviderKey"); + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique(); b.ToTable("AbpSettings", (string)null); }); diff --git a/services/administration/src/EShopOnAbp.AdministrationService.EntityFrameworkCore/Migrations/20211006102113_Initial.cs b/services/administration/src/EShopOnAbp.AdministrationService.EntityFrameworkCore/Migrations/20211125123421_Initial.cs similarity index 59% rename from services/administration/src/EShopOnAbp.AdministrationService.EntityFrameworkCore/Migrations/20211006102113_Initial.cs rename to services/administration/src/EShopOnAbp.AdministrationService.EntityFrameworkCore/Migrations/20211125123421_Initial.cs index e45ed4c9..696bc02a 100644 --- a/services/administration/src/EShopOnAbp.AdministrationService.EntityFrameworkCore/Migrations/20211006102113_Initial.cs +++ b/services/administration/src/EShopOnAbp.AdministrationService.EntityFrameworkCore/Migrations/20211125123421_Initial.cs @@ -13,28 +13,28 @@ namespace EShopOnAbp.AdministrationService.Migrations name: "AbpAuditLogs", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), - ApplicationName = table.Column(type: "nvarchar(96)", maxLength: 96, nullable: true), - UserId = table.Column(type: "uniqueidentifier", nullable: true), - UserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - TenantName = table.Column(type: "nvarchar(max)", nullable: true), - ImpersonatorUserId = table.Column(type: "uniqueidentifier", nullable: true), - ImpersonatorTenantId = table.Column(type: "uniqueidentifier", nullable: true), - ExecutionTime = table.Column(type: "datetime2", nullable: false), - ExecutionDuration = table.Column(type: "int", nullable: false), - ClientIpAddress = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ClientName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - ClientId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - CorrelationId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - BrowserInfo = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), - HttpMethod = table.Column(type: "nvarchar(16)", maxLength: 16, nullable: true), - Url = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - Exceptions = table.Column(type: "nvarchar(max)", nullable: true), - Comments = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - HttpStatusCode = table.Column(type: "int", nullable: true), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true) + Id = table.Column(type: "uuid", nullable: false), + ApplicationName = table.Column(type: "character varying(96)", maxLength: 96, nullable: true), + UserId = table.Column(type: "uuid", nullable: true), + UserName = table.Column(type: "character varying(256)", maxLength: 256, nullable: true), + TenantId = table.Column(type: "uuid", nullable: true), + TenantName = table.Column(type: "text", nullable: true), + ImpersonatorUserId = table.Column(type: "uuid", nullable: true), + ImpersonatorTenantId = table.Column(type: "uuid", nullable: true), + ExecutionTime = table.Column(type: "timestamp with time zone", nullable: false), + ExecutionDuration = table.Column(type: "integer", nullable: false), + ClientIpAddress = table.Column(type: "character varying(64)", maxLength: 64, nullable: true), + ClientName = table.Column(type: "character varying(128)", maxLength: 128, nullable: true), + ClientId = table.Column(type: "character varying(64)", maxLength: 64, nullable: true), + CorrelationId = table.Column(type: "character varying(64)", maxLength: 64, nullable: true), + BrowserInfo = table.Column(type: "character varying(512)", maxLength: 512, nullable: true), + HttpMethod = table.Column(type: "character varying(16)", maxLength: 16, nullable: true), + Url = table.Column(type: "character varying(256)", maxLength: 256, nullable: true), + Exceptions = table.Column(type: "text", nullable: true), + Comments = table.Column(type: "character varying(256)", maxLength: 256, nullable: true), + HttpStatusCode = table.Column(type: "integer", nullable: true), + ExtraProperties = table.Column(type: "text", nullable: true), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: true) }, constraints: table => { @@ -45,11 +45,11 @@ namespace EShopOnAbp.AdministrationService.Migrations name: "AbpBlobContainers", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true) + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + Name = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), + ExtraProperties = table.Column(type: "text", nullable: true), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: true) }, constraints: table => { @@ -60,11 +60,11 @@ namespace EShopOnAbp.AdministrationService.Migrations name: "AbpFeatureValues", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - Value = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - ProviderName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ProviderKey = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true) + Id = table.Column(type: "uuid", nullable: false), + Name = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), + Value = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), + ProviderName = table.Column(type: "character varying(64)", maxLength: 64, nullable: true), + ProviderKey = table.Column(type: "character varying(64)", maxLength: 64, nullable: true) }, constraints: table => { @@ -75,11 +75,11 @@ namespace EShopOnAbp.AdministrationService.Migrations name: "AbpPermissionGrants", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - ProviderName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ProviderKey = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + Name = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), + ProviderName = table.Column(type: "character varying(64)", maxLength: 64, nullable: false), + ProviderKey = table.Column(type: "character varying(64)", maxLength: 64, nullable: false) }, constraints: table => { @@ -90,11 +90,11 @@ namespace EShopOnAbp.AdministrationService.Migrations name: "AbpSettings", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - Value = table.Column(type: "nvarchar(2048)", maxLength: 2048, nullable: false), - ProviderName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ProviderKey = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true) + Id = table.Column(type: "uuid", nullable: false), + Name = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), + Value = table.Column(type: "character varying(2048)", maxLength: 2048, nullable: false), + ProviderName = table.Column(type: "character varying(64)", maxLength: 64, nullable: true), + ProviderKey = table.Column(type: "character varying(64)", maxLength: 64, nullable: true) }, constraints: table => { @@ -105,15 +105,15 @@ namespace EShopOnAbp.AdministrationService.Migrations name: "AbpAuditLogActions", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - AuditLogId = table.Column(type: "uniqueidentifier", nullable: false), - ServiceName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - MethodName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - Parameters = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: true), - ExecutionTime = table.Column(type: "datetime2", nullable: false), - ExecutionDuration = table.Column(type: "int", nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true) + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + AuditLogId = table.Column(type: "uuid", nullable: false), + ServiceName = table.Column(type: "character varying(256)", maxLength: 256, nullable: true), + MethodName = table.Column(type: "character varying(128)", maxLength: 128, nullable: true), + Parameters = table.Column(type: "character varying(2000)", maxLength: 2000, nullable: true), + ExecutionTime = table.Column(type: "timestamp with time zone", nullable: false), + ExecutionDuration = table.Column(type: "integer", nullable: false), + ExtraProperties = table.Column(type: "text", nullable: true) }, constraints: table => { @@ -130,15 +130,15 @@ namespace EShopOnAbp.AdministrationService.Migrations name: "AbpEntityChanges", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), - AuditLogId = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - ChangeTime = table.Column(type: "datetime2", nullable: false), - ChangeType = table.Column(type: "tinyint", nullable: false), - EntityTenantId = table.Column(type: "uniqueidentifier", nullable: true), - EntityId = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - EntityTypeFullName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true) + Id = table.Column(type: "uuid", nullable: false), + AuditLogId = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + ChangeTime = table.Column(type: "timestamp with time zone", nullable: false), + ChangeType = table.Column(type: "smallint", nullable: false), + EntityTenantId = table.Column(type: "uuid", nullable: true), + EntityId = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), + EntityTypeFullName = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), + ExtraProperties = table.Column(type: "text", nullable: true) }, constraints: table => { @@ -155,13 +155,13 @@ namespace EShopOnAbp.AdministrationService.Migrations name: "AbpBlobs", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), - ContainerId = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Name = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), - Content = table.Column(type: "varbinary(max)", maxLength: 2147483647, nullable: true), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true) + Id = table.Column(type: "uuid", nullable: false), + ContainerId = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + Name = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), + Content = table.Column(type: "bytea", maxLength: 2147483647, nullable: true), + ExtraProperties = table.Column(type: "text", nullable: true), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: true) }, constraints: table => { @@ -178,13 +178,13 @@ namespace EShopOnAbp.AdministrationService.Migrations name: "AbpEntityPropertyChanges", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - EntityChangeId = table.Column(type: "uniqueidentifier", nullable: false), - NewValue = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), - OriginalValue = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), - PropertyName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - PropertyTypeFullName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + EntityChangeId = table.Column(type: "uuid", nullable: false), + NewValue = table.Column(type: "character varying(512)", maxLength: 512, nullable: true), + OriginalValue = table.Column(type: "character varying(512)", maxLength: 512, nullable: true), + PropertyName = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), + PropertyTypeFullName = table.Column(type: "character varying(64)", maxLength: 64, nullable: false) }, constraints: table => { @@ -203,7 +203,7 @@ namespace EShopOnAbp.AdministrationService.Migrations column: "AuditLogId"); migrationBuilder.CreateIndex( - name: "IX_AbpAuditLogActions_TenantId_ServiceName_MethodName_ExecutionTime", + name: "IX_AbpAuditLogActions_TenantId_ServiceName_MethodName_Executio~", table: "AbpAuditLogActions", columns: new[] { "TenantId", "ServiceName", "MethodName", "ExecutionTime" }); @@ -250,17 +250,20 @@ namespace EShopOnAbp.AdministrationService.Migrations migrationBuilder.CreateIndex( name: "IX_AbpFeatureValues_Name_ProviderName_ProviderKey", table: "AbpFeatureValues", - columns: new[] { "Name", "ProviderName", "ProviderKey" }); + columns: new[] { "Name", "ProviderName", "ProviderKey" }, + unique: true); migrationBuilder.CreateIndex( - name: "IX_AbpPermissionGrants_Name_ProviderName_ProviderKey", + name: "IX_AbpPermissionGrants_TenantId_Name_ProviderName_ProviderKey", table: "AbpPermissionGrants", - columns: new[] { "Name", "ProviderName", "ProviderKey" }); + columns: new[] { "TenantId", "Name", "ProviderName", "ProviderKey" }, + unique: true); migrationBuilder.CreateIndex( name: "IX_AbpSettings_Name_ProviderName_ProviderKey", table: "AbpSettings", - columns: new[] { "Name", "ProviderName", "ProviderKey" }); + columns: new[] { "Name", "ProviderName", "ProviderKey" }, + unique: true); } protected override void Down(MigrationBuilder migrationBuilder) diff --git a/services/administration/src/EShopOnAbp.AdministrationService.EntityFrameworkCore/Migrations/AdministrationServiceDbContextModelSnapshot.cs b/services/administration/src/EShopOnAbp.AdministrationService.EntityFrameworkCore/Migrations/AdministrationServiceDbContextModelSnapshot.cs index bb7561ad..96f9132b 100644 --- a/services/administration/src/EShopOnAbp.AdministrationService.EntityFrameworkCore/Migrations/AdministrationServiceDbContextModelSnapshot.cs +++ b/services/administration/src/EShopOnAbp.AdministrationService.EntityFrameworkCore/Migrations/AdministrationServiceDbContextModelSnapshot.cs @@ -3,8 +3,8 @@ using System; using EShopOnAbp.AdministrationService.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; using Volo.Abp.EntityFrameworkCore; #nullable disable @@ -18,108 +18,108 @@ namespace EShopOnAbp.AdministrationService.Migrations { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) - .HasAnnotation("ProductVersion", "6.0.0-rc.1.21452.10") - .HasAnnotation("Relational:MaxIdentifierLength", 128); + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.PostgreSql) + .HasAnnotation("ProductVersion", "6.0.0") + .HasAnnotation("Relational:MaxIdentifierLength", 63); - SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1); + NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("ApplicationName") .HasMaxLength(96) - .HasColumnType("nvarchar(96)") + .HasColumnType("character varying(96)") .HasColumnName("ApplicationName"); b.Property("BrowserInfo") .HasMaxLength(512) - .HasColumnType("nvarchar(512)") + .HasColumnType("character varying(512)") .HasColumnName("BrowserInfo"); b.Property("ClientId") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") + .HasColumnType("character varying(64)") .HasColumnName("ClientId"); b.Property("ClientIpAddress") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") + .HasColumnType("character varying(64)") .HasColumnName("ClientIpAddress"); b.Property("ClientName") .HasMaxLength(128) - .HasColumnType("nvarchar(128)") + .HasColumnType("character varying(128)") .HasColumnName("ClientName"); b.Property("Comments") .HasMaxLength(256) - .HasColumnType("nvarchar(256)") + .HasColumnType("character varying(256)") .HasColumnName("Comments"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) - .HasColumnType("nvarchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CorrelationId") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") + .HasColumnType("character varying(64)") .HasColumnName("CorrelationId"); b.Property("Exceptions") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text"); b.Property("ExecutionDuration") - .HasColumnType("int") + .HasColumnType("integer") .HasColumnName("ExecutionDuration"); b.Property("ExecutionTime") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("HttpMethod") .HasMaxLength(16) - .HasColumnType("nvarchar(16)") + .HasColumnType("character varying(16)") .HasColumnName("HttpMethod"); b.Property("HttpStatusCode") - .HasColumnType("int") + .HasColumnType("integer") .HasColumnName("HttpStatusCode"); b.Property("ImpersonatorTenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("ImpersonatorTenantId"); b.Property("ImpersonatorUserId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("ImpersonatorUserId"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("TenantName") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text"); b.Property("Url") .HasMaxLength(256) - .HasColumnType("nvarchar(256)") + .HasColumnType("character varying(256)") .HasColumnName("Url"); b.Property("UserId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("UserId"); b.Property("UserName") .HasMaxLength(256) - .HasColumnType("nvarchar(256)") + .HasColumnType("character varying(256)") .HasColumnName("UserName"); b.HasKey("Id"); @@ -134,41 +134,41 @@ namespace EShopOnAbp.AdministrationService.Migrations modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("AuditLogId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("AuditLogId"); b.Property("ExecutionDuration") - .HasColumnType("int") + .HasColumnType("integer") .HasColumnName("ExecutionDuration"); b.Property("ExecutionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("ExecutionTime"); b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("MethodName") .HasMaxLength(128) - .HasColumnType("nvarchar(128)") + .HasColumnType("character varying(128)") .HasColumnName("MethodName"); b.Property("Parameters") .HasMaxLength(2000) - .HasColumnType("nvarchar(2000)") + .HasColumnType("character varying(2000)") .HasColumnName("Parameters"); b.Property("ServiceName") .HasMaxLength(256) - .HasColumnType("nvarchar(256)") + .HasColumnType("character varying(256)") .HasColumnName("ServiceName"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -183,41 +183,41 @@ namespace EShopOnAbp.AdministrationService.Migrations modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("AuditLogId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("AuditLogId"); b.Property("ChangeTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("ChangeTime"); b.Property("ChangeType") - .HasColumnType("tinyint") + .HasColumnType("smallint") .HasColumnName("ChangeType"); b.Property("EntityId") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)") + .HasColumnType("character varying(128)") .HasColumnName("EntityId"); b.Property("EntityTenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("EntityTypeFullName") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)") + .HasColumnType("character varying(128)") .HasColumnName("EntityTypeFullName"); b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -232,35 +232,35 @@ namespace EShopOnAbp.AdministrationService.Migrations modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("EntityChangeId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("NewValue") .HasMaxLength(512) - .HasColumnType("nvarchar(512)") + .HasColumnType("character varying(512)") .HasColumnName("NewValue"); b.Property("OriginalValue") .HasMaxLength(512) - .HasColumnType("nvarchar(512)") + .HasColumnType("character varying(512)") .HasColumnName("OriginalValue"); b.Property("PropertyName") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)") + .HasColumnType("character varying(128)") .HasColumnName("PropertyName"); b.Property("PropertyTypeFullName") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") + .HasColumnType("character varying(64)") .HasColumnName("PropertyTypeFullName"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -273,32 +273,32 @@ namespace EShopOnAbp.AdministrationService.Migrations modelBuilder.Entity("Volo.Abp.BlobStoring.Database.DatabaseBlob", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) - .HasColumnType("nvarchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("ContainerId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Content") .HasMaxLength(2147483647) - .HasColumnType("varbinary(max)"); + .HasColumnType("bytea"); b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("Name") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -313,25 +313,25 @@ namespace EShopOnAbp.AdministrationService.Migrations modelBuilder.Entity("Volo.Abp.BlobStoring.Database.DatabaseBlobContainer", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) - .HasColumnType("nvarchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("Name") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -344,29 +344,30 @@ namespace EShopOnAbp.AdministrationService.Migrations modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Name") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)"); b.Property("ProviderKey") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)"); b.Property("ProviderName") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)"); b.Property("Value") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)"); b.HasKey("Id"); - b.HasIndex("Name", "ProviderName", "ProviderKey"); + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique(); b.ToTable("AbpFeatureValues", (string)null); }); @@ -374,30 +375,31 @@ namespace EShopOnAbp.AdministrationService.Migrations modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Name") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)"); b.Property("ProviderKey") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)"); b.Property("ProviderName") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); - b.HasIndex("Name", "ProviderName", "ProviderKey"); + b.HasIndex("TenantId", "Name", "ProviderName", "ProviderKey") + .IsUnique(); b.ToTable("AbpPermissionGrants", (string)null); }); @@ -405,29 +407,30 @@ namespace EShopOnAbp.AdministrationService.Migrations modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Name") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)"); b.Property("ProviderKey") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)"); b.Property("ProviderName") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)"); b.Property("Value") .IsRequired() .HasMaxLength(2048) - .HasColumnType("nvarchar(2048)"); + .HasColumnType("character varying(2048)"); b.HasKey("Id"); - b.HasIndex("Name", "ProviderName", "ProviderKey"); + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique(); b.ToTable("AbpSettings", (string)null); }); diff --git a/services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host/appsettings.json b/services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host/appsettings.json index 12fbc8fa..19c9900c 100644 --- a/services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host/appsettings.json +++ b/services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host/appsettings.json @@ -33,7 +33,7 @@ }, "AllowedHosts": "*", "ConnectionStrings": { - "AdministrationService": "Server=localhost,1434;Database=EShopOnAbp_Administration;User Id=sa;password=myPassw0rd;MultipleActiveResultSets=true" + "AdministrationService": "User ID=postgres;Password=myPassw0rd;Host=localhost;Port=5432;Database=EShopOnAbp_Administration;Pooling=false;" }, "StringEncryption": { "DefaultPassPhrase": "gsKnGZ041HLL4IM8"