From 2e4bdc74502e5a6c1e3aa26175c83f8944879eb6 Mon Sep 17 00:00:00 2001 From: enisn Date: Thu, 25 Nov 2021 15:38:13 +0300 Subject: [PATCH 1/9] Update development environment --- etc/docker/docker-compose.infrastructure.override.yml | 7 +++---- etc/docker/docker-compose.infrastructure.yml | 8 ++++---- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/etc/docker/docker-compose.infrastructure.override.yml b/etc/docker/docker-compose.infrastructure.override.yml index c2ba1033..fed3bf2c 100644 --- a/etc/docker/docker-compose.infrastructure.override.yml +++ b/etc/docker/docker-compose.infrastructure.override.yml @@ -10,9 +10,8 @@ services: ports: - "6379:6379" - sql-server-db: + postgres-db: ports: - - "1434:1433" + - "5432:5432" environment: - SA_PASSWORD: "myPassw0rd" - ACCEPT_EULA: "Y" + POSTGRES_PASSWORD: "myPassw0rd" diff --git a/etc/docker/docker-compose.infrastructure.yml b/etc/docker/docker-compose.infrastructure.yml index eb2ec29d..7f561838 100644 --- a/etc/docker/docker-compose.infrastructure.yml +++ b/etc/docker/docker-compose.infrastructure.yml @@ -13,11 +13,11 @@ services: networks: - eshoponabp-network - sql-server-db: - container_name: sql-server-db - image: mcr.microsoft.com/mssql/server + postgres-db: + container_name: postgres-db + image: postgres:14.1 volumes: - - sqldata:/var/opt/mssql + - sqldata:/var/opt/postgres networks: - eshoponabp-network From 85f773428f432d714d6a99c829d27f5b75491295 Mon Sep 17 00:00:00 2001 From: enisn Date: Thu, 25 Nov 2021 15:38:56 +0300 Subject: [PATCH 2/9] Change database provider to PostgreSQL for Administration Service --- ...strationService.EntityFrameworkCore.csproj | 2 +- .../AdministrationServiceDbContextFactory.cs | 2 +- ...trationServiceEntityFrameworkCoreModule.cs | 6 +- ....cs => 20211125123421_Initial.Designer.cs} | 169 +++++++++--------- ...3_Initial.cs => 20211125123421_Initial.cs} | 161 +++++++++-------- ...nistrationServiceDbContextModelSnapshot.cs | 167 ++++++++--------- .../appsettings.json | 2 +- 7 files changed, 259 insertions(+), 250 deletions(-) rename services/administration/src/EShopOnAbp.AdministrationService.EntityFrameworkCore/Migrations/{20211006102113_Initial.Designer.cs => 20211125123421_Initial.Designer.cs} (75%) rename services/administration/src/EShopOnAbp.AdministrationService.EntityFrameworkCore/Migrations/{20211006102113_Initial.cs => 20211125123421_Initial.cs} (59%) 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" From 3b1d0fc1d4ea035901089425176376918eea2f7a Mon Sep 17 00:00:00 2001 From: enisn Date: Thu, 25 Nov 2021 15:56:18 +0300 Subject: [PATCH 3/9] Change database provider to PostgreSQL for Catalog Service --- ...opOnAbp.CatalogService.EntityFrameworkCore.csproj | 2 +- .../CatalogServiceDbContextFactory.cs | 2 +- .../CatalogServiceEntityFrameworkCoreModule.cs | 11 ++++++----- ...esigner.cs => 20211125124215_Initial.Designer.cs} | 12 ++++++------ ...11132527_Initial.cs => 20211125124215_Initial.cs} | 0 .../CatalogServiceDbContextModelSnapshot.cs | 10 +++++----- .../appsettings.json | 4 ++-- 7 files changed, 21 insertions(+), 20 deletions(-) rename services/catalog/src/EShopOnAbp.CatalogService.EntityFrameworkCore/Migrations/{20211011132527_Initial.Designer.cs => 20211125124215_Initial.Designer.cs} (73%) rename services/catalog/src/EShopOnAbp.CatalogService.EntityFrameworkCore/Migrations/{20211011132527_Initial.cs => 20211125124215_Initial.cs} (100%) diff --git a/services/catalog/src/EShopOnAbp.CatalogService.EntityFrameworkCore/EShopOnAbp.CatalogService.EntityFrameworkCore.csproj b/services/catalog/src/EShopOnAbp.CatalogService.EntityFrameworkCore/EShopOnAbp.CatalogService.EntityFrameworkCore.csproj index 80da06e9..f5fa1c4c 100644 --- a/services/catalog/src/EShopOnAbp.CatalogService.EntityFrameworkCore/EShopOnAbp.CatalogService.EntityFrameworkCore.csproj +++ b/services/catalog/src/EShopOnAbp.CatalogService.EntityFrameworkCore/EShopOnAbp.CatalogService.EntityFrameworkCore.csproj @@ -12,7 +12,7 @@ - + diff --git a/services/catalog/src/EShopOnAbp.CatalogService.EntityFrameworkCore/EntityFrameworkCore/CatalogServiceDbContextFactory.cs b/services/catalog/src/EShopOnAbp.CatalogService.EntityFrameworkCore/EntityFrameworkCore/CatalogServiceDbContextFactory.cs index 54475bfe..37e6ae87 100644 --- a/services/catalog/src/EShopOnAbp.CatalogService.EntityFrameworkCore/EntityFrameworkCore/CatalogServiceDbContextFactory.cs +++ b/services/catalog/src/EShopOnAbp.CatalogService.EntityFrameworkCore/EntityFrameworkCore/CatalogServiceDbContextFactory.cs @@ -16,7 +16,7 @@ namespace EShopOnAbp.CatalogService.EntityFrameworkCore var configuration = BuildConfiguration(); var builder = new DbContextOptionsBuilder() - .UseSqlServer(configuration.GetConnectionString(CatalogServiceDbProperties.ConnectionStringName)); + .UseNpgsql(configuration.GetConnectionString(CatalogServiceDbProperties.ConnectionStringName)); return new CatalogServiceDbContext(builder.Options); } diff --git a/services/catalog/src/EShopOnAbp.CatalogService.EntityFrameworkCore/EntityFrameworkCore/CatalogServiceEntityFrameworkCoreModule.cs b/services/catalog/src/EShopOnAbp.CatalogService.EntityFrameworkCore/EntityFrameworkCore/CatalogServiceEntityFrameworkCoreModule.cs index d3169ce1..62d8e651 100644 --- a/services/catalog/src/EShopOnAbp.CatalogService.EntityFrameworkCore/EntityFrameworkCore/CatalogServiceEntityFrameworkCoreModule.cs +++ b/services/catalog/src/EShopOnAbp.CatalogService.EntityFrameworkCore/EntityFrameworkCore/CatalogServiceEntityFrameworkCoreModule.cs @@ -1,13 +1,13 @@ using Microsoft.Extensions.DependencyInjection; using Volo.Abp.EntityFrameworkCore; -using Volo.Abp.EntityFrameworkCore.SqlServer; +using Volo.Abp.EntityFrameworkCore.PostgreSql; using Volo.Abp.Modularity; namespace EShopOnAbp.CatalogService.EntityFrameworkCore { [DependsOn( typeof(CatalogServiceDomainModule), - typeof(AbpEntityFrameworkCoreSqlServerModule) + typeof(AbpEntityFrameworkCorePostgreSqlModule) )] public class CatalogServiceEntityFrameworkCoreModule : AbpModule { @@ -27,9 +27,10 @@ namespace EShopOnAbp.CatalogService.EntityFrameworkCore Configure(options => { - /* The main point to change your DBMS. - * See also CatalogServiceMigrationsDbContextFactory for EF Core tooling. */ - options.UseSqlServer(); + options.UseNpgsql(b => + { + b.MigrationsHistoryTable("__CatalogService_Migrations"); + }); }); } } diff --git a/services/catalog/src/EShopOnAbp.CatalogService.EntityFrameworkCore/Migrations/20211011132527_Initial.Designer.cs b/services/catalog/src/EShopOnAbp.CatalogService.EntityFrameworkCore/Migrations/20211125124215_Initial.Designer.cs similarity index 73% rename from services/catalog/src/EShopOnAbp.CatalogService.EntityFrameworkCore/Migrations/20211011132527_Initial.Designer.cs rename to services/catalog/src/EShopOnAbp.CatalogService.EntityFrameworkCore/Migrations/20211125124215_Initial.Designer.cs index c32140a5..05f04edc 100644 --- a/services/catalog/src/EShopOnAbp.CatalogService.EntityFrameworkCore/Migrations/20211011132527_Initial.Designer.cs +++ b/services/catalog/src/EShopOnAbp.CatalogService.EntityFrameworkCore/Migrations/20211125124215_Initial.Designer.cs @@ -2,9 +2,9 @@ using EShopOnAbp.CatalogService.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 @@ -12,18 +12,18 @@ using Volo.Abp.EntityFrameworkCore; namespace EShopOnAbp.CatalogService.Migrations { [DbContext(typeof(CatalogServiceDbContext))] - [Migration("20211011132527_Initial")] + [Migration("20211125124215_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); #pragma warning restore 612, 618 } } diff --git a/services/catalog/src/EShopOnAbp.CatalogService.EntityFrameworkCore/Migrations/20211011132527_Initial.cs b/services/catalog/src/EShopOnAbp.CatalogService.EntityFrameworkCore/Migrations/20211125124215_Initial.cs similarity index 100% rename from services/catalog/src/EShopOnAbp.CatalogService.EntityFrameworkCore/Migrations/20211011132527_Initial.cs rename to services/catalog/src/EShopOnAbp.CatalogService.EntityFrameworkCore/Migrations/20211125124215_Initial.cs diff --git a/services/catalog/src/EShopOnAbp.CatalogService.EntityFrameworkCore/Migrations/CatalogServiceDbContextModelSnapshot.cs b/services/catalog/src/EShopOnAbp.CatalogService.EntityFrameworkCore/Migrations/CatalogServiceDbContextModelSnapshot.cs index f5ed6f26..6b110a46 100644 --- a/services/catalog/src/EShopOnAbp.CatalogService.EntityFrameworkCore/Migrations/CatalogServiceDbContextModelSnapshot.cs +++ b/services/catalog/src/EShopOnAbp.CatalogService.EntityFrameworkCore/Migrations/CatalogServiceDbContextModelSnapshot.cs @@ -2,8 +2,8 @@ using EShopOnAbp.CatalogService.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 @@ -17,11 +17,11 @@ namespace EShopOnAbp.CatalogService.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); #pragma warning restore 612, 618 } } diff --git a/services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/appsettings.json b/services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/appsettings.json index 7d8efd15..98806764 100644 --- a/services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/appsettings.json +++ b/services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/appsettings.json @@ -18,8 +18,8 @@ }, "AllowedHosts": "*", "ConnectionStrings": { - "CatalogService": "Server=localhost,1434;Database=EShopOnAbp_Catalog;User Id=sa;password=myPassw0rd;MultipleActiveResultSets=true", - "AdministrationService": "Server=localhost,1434;Database=EShopOnAbp_Administration;User Id=sa;password=myPassw0rd;MultipleActiveResultSets=true" + "CatalogService": "User ID=postgres;Password=myPassw0rd;Host=localhost;Port=5432;Database=EShopOnAbp_Catalog;Pooling=false;", + "AdministrationService": "User ID=postgres;Password=myPassw0rd;Host=localhost;Port=5432;Database=EShopOnAbp_Administration;Pooling=false;" }, "StringEncryption": { "DefaultPassPhrase": "cca88WgRXnVk07rx" From 85a9482fb594648f94f41241f096023f78252774 Mon Sep 17 00:00:00 2001 From: enisn Date: Thu, 25 Nov 2021 16:09:19 +0300 Subject: [PATCH 4/9] Fix catalog history table naming --- .../EntityFrameworkCore/CatalogServiceDbContextFactory.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/services/catalog/src/EShopOnAbp.CatalogService.EntityFrameworkCore/EntityFrameworkCore/CatalogServiceDbContextFactory.cs b/services/catalog/src/EShopOnAbp.CatalogService.EntityFrameworkCore/EntityFrameworkCore/CatalogServiceDbContextFactory.cs index 37e6ae87..55b44780 100644 --- a/services/catalog/src/EShopOnAbp.CatalogService.EntityFrameworkCore/EntityFrameworkCore/CatalogServiceDbContextFactory.cs +++ b/services/catalog/src/EShopOnAbp.CatalogService.EntityFrameworkCore/EntityFrameworkCore/CatalogServiceDbContextFactory.cs @@ -16,7 +16,12 @@ namespace EShopOnAbp.CatalogService.EntityFrameworkCore var configuration = BuildConfiguration(); var builder = new DbContextOptionsBuilder() - .UseNpgsql(configuration.GetConnectionString(CatalogServiceDbProperties.ConnectionStringName)); + .UseNpgsql( + configuration.GetConnectionString(CatalogServiceDbProperties.ConnectionStringName), + b => + { + b.MigrationsHistoryTable("__CatalogService_Migrations"); + }); return new CatalogServiceDbContext(builder.Options); } From 708948fdad4af754107939edd39eabfa6e5e9c59 Mon Sep 17 00:00:00 2001 From: enisn Date: Thu, 25 Nov 2021 16:09:36 +0300 Subject: [PATCH 5/9] Change database provider to PostgreSQL for Identity Service --- ...IdentityService.EntityFrameworkCore.csproj | 2 +- .../IdentityServiceDbContextFactory.cs | 2 +- ...dentityServiceEntityFrameworkCoreModule.cs | 6 +- ....cs => 20211125125938_Initial.Designer.cs} | 583 +++++++++-------- ...3_Initial.cs => 20211125125938_Initial.cs} | 605 +++++++++--------- .../IdentityServiceDbContextModelSnapshot.cs | 581 +++++++++-------- .../appsettings.json | 5 +- 7 files changed, 890 insertions(+), 894 deletions(-) rename services/identity/src/EShopOnAbp.IdentityService.EntityFrameworkCore/Migrations/{20211006102143_Initial.Designer.cs => 20211125125938_Initial.Designer.cs} (76%) rename services/identity/src/EShopOnAbp.IdentityService.EntityFrameworkCore/Migrations/{20211006102143_Initial.cs => 20211125125938_Initial.cs} (62%) diff --git a/services/identity/src/EShopOnAbp.IdentityService.EntityFrameworkCore/EShopOnAbp.IdentityService.EntityFrameworkCore.csproj b/services/identity/src/EShopOnAbp.IdentityService.EntityFrameworkCore/EShopOnAbp.IdentityService.EntityFrameworkCore.csproj index b10c609a..835acce1 100644 --- a/services/identity/src/EShopOnAbp.IdentityService.EntityFrameworkCore/EShopOnAbp.IdentityService.EntityFrameworkCore.csproj +++ b/services/identity/src/EShopOnAbp.IdentityService.EntityFrameworkCore/EShopOnAbp.IdentityService.EntityFrameworkCore.csproj @@ -16,7 +16,7 @@ - + diff --git a/services/identity/src/EShopOnAbp.IdentityService.EntityFrameworkCore/EntityFrameworkCore/IdentityServiceDbContextFactory.cs b/services/identity/src/EShopOnAbp.IdentityService.EntityFrameworkCore/EntityFrameworkCore/IdentityServiceDbContextFactory.cs index 26113817..d6a1a616 100644 --- a/services/identity/src/EShopOnAbp.IdentityService.EntityFrameworkCore/EntityFrameworkCore/IdentityServiceDbContextFactory.cs +++ b/services/identity/src/EShopOnAbp.IdentityService.EntityFrameworkCore/EntityFrameworkCore/IdentityServiceDbContextFactory.cs @@ -15,7 +15,7 @@ namespace EShopOnAbp.IdentityService.EntityFrameworkCore IdentityServiceEfCoreEntityExtensionMappings.Configure(); var builder = new DbContextOptionsBuilder() - .UseSqlServer(GetConnectionStringFromConfiguration(), b => + .UseNpgsql(GetConnectionStringFromConfiguration(), b => { b.MigrationsHistoryTable("__IdentityService_Migrations"); }); diff --git a/services/identity/src/EShopOnAbp.IdentityService.EntityFrameworkCore/EntityFrameworkCore/IdentityServiceEntityFrameworkCoreModule.cs b/services/identity/src/EShopOnAbp.IdentityService.EntityFrameworkCore/EntityFrameworkCore/IdentityServiceEntityFrameworkCoreModule.cs index 8008c0f0..e5b0ac95 100644 --- a/services/identity/src/EShopOnAbp.IdentityService.EntityFrameworkCore/EntityFrameworkCore/IdentityServiceEntityFrameworkCoreModule.cs +++ b/services/identity/src/EShopOnAbp.IdentityService.EntityFrameworkCore/EntityFrameworkCore/IdentityServiceEntityFrameworkCoreModule.cs @@ -1,6 +1,6 @@ using Microsoft.Extensions.DependencyInjection; using Volo.Abp.EntityFrameworkCore; -using Volo.Abp.EntityFrameworkCore.SqlServer; +using Volo.Abp.EntityFrameworkCore.PostgreSql; using Volo.Abp.Identity.EntityFrameworkCore; using Volo.Abp.IdentityServer.EntityFrameworkCore; using Volo.Abp.Modularity; @@ -9,7 +9,7 @@ namespace EShopOnAbp.IdentityService.EntityFrameworkCore { [DependsOn( typeof(IdentityServiceDomainModule), - typeof(AbpEntityFrameworkCoreSqlServerModule), + typeof(AbpEntityFrameworkCorePostgreSqlModule), typeof(AbpIdentityEntityFrameworkCoreModule), typeof(AbpIdentityServerEntityFrameworkCoreModule) )] @@ -34,7 +34,7 @@ namespace EShopOnAbp.IdentityService.EntityFrameworkCore { options.Configure(c => { - c.UseSqlServer(b => { b.MigrationsHistoryTable("__IdentityService_Migrations"); }); + c.UseNpgsql(b => { b.MigrationsHistoryTable("__IdentityService_Migrations"); }); }); }); } diff --git a/services/identity/src/EShopOnAbp.IdentityService.EntityFrameworkCore/Migrations/20211006102143_Initial.Designer.cs b/services/identity/src/EShopOnAbp.IdentityService.EntityFrameworkCore/Migrations/20211125125938_Initial.Designer.cs similarity index 76% rename from services/identity/src/EShopOnAbp.IdentityService.EntityFrameworkCore/Migrations/20211006102143_Initial.Designer.cs rename to services/identity/src/EShopOnAbp.IdentityService.EntityFrameworkCore/Migrations/20211125125938_Initial.Designer.cs index 14e60231..a07ea510 100644 --- a/services/identity/src/EShopOnAbp.IdentityService.EntityFrameworkCore/Migrations/20211006102143_Initial.Designer.cs +++ b/services/identity/src/EShopOnAbp.IdentityService.EntityFrameworkCore/Migrations/20211125125938_Initial.Designer.cs @@ -3,9 +3,9 @@ using System; using EShopOnAbp.IdentityService.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,59 +13,59 @@ using Volo.Abp.EntityFrameworkCore; namespace EShopOnAbp.IdentityService.Migrations { [DbContext(typeof(IdentityServiceDbContext))] - [Migration("20211006102143_Initial")] + [Migration("20211125125938_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.Identity.IdentityClaimType", 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("Description") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)"); b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("IsStatic") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("Name") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)"); b.Property("Regex") .HasMaxLength(512) - .HasColumnType("nvarchar(512)"); + .HasColumnType("character varying(512)"); b.Property("RegexDescription") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)"); b.Property("Required") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("ValueType") - .HasColumnType("int"); + .HasColumnType("integer"); b.HasKey("Id"); @@ -75,25 +75,24 @@ namespace EShopOnAbp.IdentityService.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("SourceTenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("SourceUserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("TargetTenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("TargetUserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.HasKey("Id"); b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId") - .IsUnique() - .HasFilter("[SourceTenantId] IS NOT NULL AND [TargetTenantId] IS NOT NULL"); + .IsUnique(); b.ToTable("AbpLinkUsers", (string)null); }); @@ -101,42 +100,42 @@ namespace EShopOnAbp.IdentityService.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", 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("IsDefault") - .HasColumnType("bit") + .HasColumnType("boolean") .HasColumnName("IsDefault"); b.Property("IsPublic") - .HasColumnType("bit") + .HasColumnType("boolean") .HasColumnName("IsPublic"); b.Property("IsStatic") - .HasColumnType("bit") + .HasColumnType("boolean") .HasColumnName("IsStatic"); b.Property("Name") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)"); b.Property("NormalizedName") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -149,22 +148,22 @@ namespace EShopOnAbp.IdentityService.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("ClaimType") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)"); b.Property("ClaimValue") .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); + .HasColumnType("character varying(1024)"); b.Property("RoleId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -177,63 +176,63 @@ namespace EShopOnAbp.IdentityService.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Action") .HasMaxLength(96) - .HasColumnType("nvarchar(96)"); + .HasColumnType("character varying(96)"); b.Property("ApplicationName") .HasMaxLength(96) - .HasColumnType("nvarchar(96)"); + .HasColumnType("character varying(96)"); b.Property("BrowserInfo") .HasMaxLength(512) - .HasColumnType("nvarchar(512)"); + .HasColumnType("character varying(512)"); b.Property("ClientId") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)"); b.Property("ClientIpAddress") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)"); 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)"); b.Property("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("Identity") .HasMaxLength(96) - .HasColumnType("nvarchar(96)"); + .HasColumnType("character varying(96)"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("TenantName") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)"); b.Property("UserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("UserName") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)"); b.HasKey("Id"); @@ -251,142 +250,142 @@ namespace EShopOnAbp.IdentityService.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("AccessFailedCount") .ValueGeneratedOnAdd() - .HasColumnType("int") + .HasColumnType("integer") .HasDefaultValue(0) .HasColumnName("AccessFailedCount"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) - .HasColumnType("nvarchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("Email") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)") + .HasColumnType("character varying(256)") .HasColumnName("Email"); b.Property("EmailConfirmed") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("EmailConfirmed"); b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("IsActive") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("IsExternal") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsExternal"); b.Property("LastModificationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("LockoutEnabled") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("LockoutEnabled"); b.Property("LockoutEnd") - .HasColumnType("datetimeoffset"); + .HasColumnType("timestamp with time zone"); b.Property("Name") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") + .HasColumnType("character varying(64)") .HasColumnName("Name"); b.Property("NormalizedEmail") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)") + .HasColumnType("character varying(256)") .HasColumnName("NormalizedEmail"); b.Property("NormalizedUserName") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)") + .HasColumnType("character varying(256)") .HasColumnName("NormalizedUserName"); b.Property("PasswordHash") .HasMaxLength(256) - .HasColumnType("nvarchar(256)") + .HasColumnType("character varying(256)") .HasColumnName("PasswordHash"); b.Property("PhoneNumber") .HasMaxLength(16) - .HasColumnType("nvarchar(16)") + .HasColumnType("character varying(16)") .HasColumnName("PhoneNumber"); b.Property("PhoneNumberConfirmed") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("PhoneNumberConfirmed"); b.Property("SecurityStamp") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)") + .HasColumnType("character varying(256)") .HasColumnName("SecurityStamp"); b.Property("Surname") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") + .HasColumnType("character varying(64)") .HasColumnName("Surname"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("TwoFactorEnabled") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("TwoFactorEnabled"); b.Property("UserName") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)") + .HasColumnType("character varying(256)") .HasColumnName("UserName"); b.HasKey("Id"); @@ -405,23 +404,23 @@ namespace EShopOnAbp.IdentityService.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("ClaimType") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)"); b.Property("ClaimValue") .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); + .HasColumnType("character varying(1024)"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("UserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.HasKey("Id"); @@ -433,23 +432,23 @@ namespace EShopOnAbp.IdentityService.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => { b.Property("UserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("LoginProvider") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)"); b.Property("ProviderDisplayName") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)"); b.Property("ProviderKey") .IsRequired() .HasMaxLength(196) - .HasColumnType("nvarchar(196)"); + .HasColumnType("character varying(196)"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("UserId", "LoginProvider"); @@ -462,21 +461,21 @@ namespace EShopOnAbp.IdentityService.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => { b.Property("OrganizationUnitId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("UserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("CreationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("OrganizationUnitId", "UserId"); @@ -489,13 +488,13 @@ namespace EShopOnAbp.IdentityService.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => { b.Property("UserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("RoleId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("UserId", "RoleId"); @@ -508,22 +507,22 @@ namespace EShopOnAbp.IdentityService.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => { b.Property("UserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("LoginProvider") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)"); b.Property("Name") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("Value") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text"); b.HasKey("UserId", "LoginProvider", "Name"); @@ -533,65 +532,65 @@ namespace EShopOnAbp.IdentityService.Migrations modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Code") .IsRequired() .HasMaxLength(95) - .HasColumnType("nvarchar(95)") + .HasColumnType("character varying(95)") .HasColumnName("Code"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) - .HasColumnType("nvarchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("DisplayName") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)") + .HasColumnType("character varying(128)") .HasColumnName("DisplayName"); b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("ParentId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -606,21 +605,21 @@ namespace EShopOnAbp.IdentityService.Migrations modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => { b.Property("OrganizationUnitId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("RoleId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("CreationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("OrganizationUnitId", "RoleId"); @@ -633,70 +632,70 @@ namespace EShopOnAbp.IdentityService.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResource", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("AllowedAccessTokenSigningAlgorithms") .HasMaxLength(100) - .HasColumnType("nvarchar(100)"); + .HasColumnType("character varying(100)"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) - .HasColumnType("nvarchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("Description") .HasMaxLength(1000) - .HasColumnType("nvarchar(1000)"); + .HasColumnType("character varying(1000)"); b.Property("DisplayName") .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); + .HasColumnType("character varying(200)"); b.Property("Enabled") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("Name") .IsRequired() .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); + .HasColumnType("character varying(200)"); b.Property("ShowInDiscoveryDocument") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.HasKey("Id"); @@ -706,11 +705,11 @@ namespace EShopOnAbp.IdentityService.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b => { b.Property("ApiResourceId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Type") .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); + .HasColumnType("character varying(200)"); b.HasKey("ApiResourceId", "Type"); @@ -720,15 +719,15 @@ namespace EShopOnAbp.IdentityService.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceProperty", b => { b.Property("ApiResourceId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Key") .HasMaxLength(250) - .HasColumnType("nvarchar(250)"); + .HasColumnType("character varying(250)"); b.Property("Value") .HasMaxLength(2000) - .HasColumnType("nvarchar(2000)"); + .HasColumnType("character varying(2000)"); b.HasKey("ApiResourceId", "Key", "Value"); @@ -738,11 +737,11 @@ namespace EShopOnAbp.IdentityService.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceScope", b => { b.Property("ApiResourceId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Scope") .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); + .HasColumnType("character varying(200)"); b.HasKey("ApiResourceId", "Scope"); @@ -752,22 +751,22 @@ namespace EShopOnAbp.IdentityService.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceSecret", b => { b.Property("ApiResourceId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Type") .HasMaxLength(250) - .HasColumnType("nvarchar(250)"); + .HasColumnType("character varying(250)"); b.Property("Value") .HasMaxLength(4000) - .HasColumnType("nvarchar(4000)"); + .HasColumnType("character varying(4000)"); b.Property("Description") .HasMaxLength(1000) - .HasColumnType("nvarchar(1000)"); + .HasColumnType("character varying(1000)"); b.Property("Expiration") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.HasKey("ApiResourceId", "Type", "Value"); @@ -777,72 +776,72 @@ namespace EShopOnAbp.IdentityService.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScope", 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("CreationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("Description") .HasMaxLength(1000) - .HasColumnType("nvarchar(1000)"); + .HasColumnType("character varying(1000)"); b.Property("DisplayName") .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); + .HasColumnType("character varying(200)"); b.Property("Emphasize") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("Enabled") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("Name") .IsRequired() .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); + .HasColumnType("character varying(200)"); b.Property("Required") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("ShowInDiscoveryDocument") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.HasKey("Id"); @@ -852,11 +851,11 @@ namespace EShopOnAbp.IdentityService.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScopeClaim", b => { b.Property("ApiScopeId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Type") .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); + .HasColumnType("character varying(200)"); b.HasKey("ApiScopeId", "Type"); @@ -866,15 +865,15 @@ namespace EShopOnAbp.IdentityService.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScopeProperty", b => { b.Property("ApiScopeId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Key") .HasMaxLength(250) - .HasColumnType("nvarchar(250)"); + .HasColumnType("character varying(250)"); b.Property("Value") .HasMaxLength(2000) - .HasColumnType("nvarchar(2000)"); + .HasColumnType("character varying(2000)"); b.HasKey("ApiScopeId", "Key", "Value"); @@ -884,178 +883,178 @@ namespace EShopOnAbp.IdentityService.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.Client", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("AbsoluteRefreshTokenLifetime") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("AccessTokenLifetime") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("AccessTokenType") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("AllowAccessTokensViaBrowser") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("AllowOfflineAccess") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("AllowPlainTextPkce") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("AllowRememberConsent") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("AllowedIdentityTokenSigningAlgorithms") .HasMaxLength(100) - .HasColumnType("nvarchar(100)"); + .HasColumnType("character varying(100)"); b.Property("AlwaysIncludeUserClaimsInIdToken") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("AlwaysSendClientClaims") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("AuthorizationCodeLifetime") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("BackChannelLogoutSessionRequired") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("BackChannelLogoutUri") .HasMaxLength(2000) - .HasColumnType("nvarchar(2000)"); + .HasColumnType("character varying(2000)"); b.Property("ClientClaimsPrefix") .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); + .HasColumnType("character varying(200)"); b.Property("ClientId") .IsRequired() .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); + .HasColumnType("character varying(200)"); b.Property("ClientName") .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); + .HasColumnType("character varying(200)"); b.Property("ClientUri") .HasMaxLength(2000) - .HasColumnType("nvarchar(2000)"); + .HasColumnType("character varying(2000)"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) - .HasColumnType("nvarchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("ConsentLifetime") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("CreationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("Description") .HasMaxLength(1000) - .HasColumnType("nvarchar(1000)"); + .HasColumnType("character varying(1000)"); b.Property("DeviceCodeLifetime") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("EnableLocalLogin") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("Enabled") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("FrontChannelLogoutSessionRequired") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("FrontChannelLogoutUri") .HasMaxLength(2000) - .HasColumnType("nvarchar(2000)"); + .HasColumnType("character varying(2000)"); b.Property("IdentityTokenLifetime") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("IncludeJwtId") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("LogoUri") .HasMaxLength(2000) - .HasColumnType("nvarchar(2000)"); + .HasColumnType("character varying(2000)"); b.Property("PairWiseSubjectSalt") .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); + .HasColumnType("character varying(200)"); b.Property("ProtocolType") .IsRequired() .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); + .HasColumnType("character varying(200)"); b.Property("RefreshTokenExpiration") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("RefreshTokenUsage") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("RequireClientSecret") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("RequireConsent") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("RequirePkce") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("RequireRequestObject") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("SlidingRefreshTokenLifetime") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("UpdateAccessTokenClaimsOnRefresh") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("UserCodeType") .HasMaxLength(100) - .HasColumnType("nvarchar(100)"); + .HasColumnType("character varying(100)"); b.Property("UserSsoLifetime") - .HasColumnType("int"); + .HasColumnType("integer"); b.HasKey("Id"); @@ -1067,15 +1066,15 @@ namespace EShopOnAbp.IdentityService.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientClaim", b => { b.Property("ClientId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Type") .HasMaxLength(250) - .HasColumnType("nvarchar(250)"); + .HasColumnType("character varying(250)"); b.Property("Value") .HasMaxLength(250) - .HasColumnType("nvarchar(250)"); + .HasColumnType("character varying(250)"); b.HasKey("ClientId", "Type", "Value"); @@ -1085,11 +1084,11 @@ namespace EShopOnAbp.IdentityService.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientCorsOrigin", b => { b.Property("ClientId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Origin") .HasMaxLength(150) - .HasColumnType("nvarchar(150)"); + .HasColumnType("character varying(150)"); b.HasKey("ClientId", "Origin"); @@ -1099,11 +1098,11 @@ namespace EShopOnAbp.IdentityService.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientGrantType", b => { b.Property("ClientId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("GrantType") .HasMaxLength(250) - .HasColumnType("nvarchar(250)"); + .HasColumnType("character varying(250)"); b.HasKey("ClientId", "GrantType"); @@ -1113,11 +1112,11 @@ namespace EShopOnAbp.IdentityService.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientIdPRestriction", b => { b.Property("ClientId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Provider") .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); + .HasColumnType("character varying(200)"); b.HasKey("ClientId", "Provider"); @@ -1127,11 +1126,11 @@ namespace EShopOnAbp.IdentityService.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientPostLogoutRedirectUri", b => { b.Property("ClientId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("PostLogoutRedirectUri") .HasMaxLength(2000) - .HasColumnType("nvarchar(2000)"); + .HasColumnType("character varying(2000)"); b.HasKey("ClientId", "PostLogoutRedirectUri"); @@ -1141,15 +1140,15 @@ namespace EShopOnAbp.IdentityService.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientProperty", b => { b.Property("ClientId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Key") .HasMaxLength(250) - .HasColumnType("nvarchar(250)"); + .HasColumnType("character varying(250)"); b.Property("Value") .HasMaxLength(2000) - .HasColumnType("nvarchar(2000)"); + .HasColumnType("character varying(2000)"); b.HasKey("ClientId", "Key", "Value"); @@ -1159,11 +1158,11 @@ namespace EShopOnAbp.IdentityService.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientRedirectUri", b => { b.Property("ClientId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("RedirectUri") .HasMaxLength(2000) - .HasColumnType("nvarchar(2000)"); + .HasColumnType("character varying(2000)"); b.HasKey("ClientId", "RedirectUri"); @@ -1173,11 +1172,11 @@ namespace EShopOnAbp.IdentityService.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientScope", b => { b.Property("ClientId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Scope") .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); + .HasColumnType("character varying(200)"); b.HasKey("ClientId", "Scope"); @@ -1187,22 +1186,22 @@ namespace EShopOnAbp.IdentityService.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientSecret", b => { b.Property("ClientId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Type") .HasMaxLength(250) - .HasColumnType("nvarchar(250)"); + .HasColumnType("character varying(250)"); b.Property("Value") .HasMaxLength(4000) - .HasColumnType("nvarchar(4000)"); + .HasColumnType("character varying(4000)"); b.Property("Description") .HasMaxLength(2000) - .HasColumnType("nvarchar(2000)"); + .HasColumnType("character varying(2000)"); b.Property("Expiration") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.HasKey("ClientId", "Type", "Value"); @@ -1212,61 +1211,61 @@ namespace EShopOnAbp.IdentityService.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Devices.DeviceFlowCodes", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("ClientId") .IsRequired() .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); + .HasColumnType("character varying(200)"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) - .HasColumnType("nvarchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("Data") .IsRequired() .HasMaxLength(50000) - .HasColumnType("nvarchar(max)"); + .HasColumnType("character varying(50000)"); b.Property("Description") .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); + .HasColumnType("character varying(200)"); b.Property("DeviceCode") .IsRequired() .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); + .HasColumnType("character varying(200)"); b.Property("Expiration") .IsRequired() - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("SessionId") .HasMaxLength(100) - .HasColumnType("nvarchar(100)"); + .HasColumnType("character varying(100)"); b.Property("SubjectId") .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); + .HasColumnType("character varying(200)"); b.Property("UserCode") .IsRequired() .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); + .HasColumnType("character varying(200)"); b.HasKey("Id"); @@ -1284,56 +1283,56 @@ namespace EShopOnAbp.IdentityService.Migrations { b.Property("Key") .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); + .HasColumnType("character varying(200)"); b.Property("ClientId") .IsRequired() .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); + .HasColumnType("character varying(200)"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) - .HasColumnType("nvarchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("ConsumedTime") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("Data") .IsRequired() .HasMaxLength(50000) - .HasColumnType("nvarchar(max)"); + .HasColumnType("character varying(50000)"); b.Property("Description") .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); + .HasColumnType("character varying(200)"); b.Property("Expiration") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("SessionId") .HasMaxLength(100) - .HasColumnType("nvarchar(100)"); + .HasColumnType("character varying(100)"); b.Property("SubjectId") .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); + .HasColumnType("character varying(200)"); b.Property("Type") .IsRequired() .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + .HasColumnType("character varying(50)"); b.HasKey("Key"); @@ -1349,72 +1348,72 @@ namespace EShopOnAbp.IdentityService.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", 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("CreationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("Description") .HasMaxLength(1000) - .HasColumnType("nvarchar(1000)"); + .HasColumnType("character varying(1000)"); b.Property("DisplayName") .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); + .HasColumnType("character varying(200)"); b.Property("Emphasize") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("Enabled") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("Name") .IsRequired() .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); + .HasColumnType("character varying(200)"); b.Property("Required") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("ShowInDiscoveryDocument") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.HasKey("Id"); @@ -1424,11 +1423,11 @@ namespace EShopOnAbp.IdentityService.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResourceClaim", b => { b.Property("IdentityResourceId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Type") .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); + .HasColumnType("character varying(200)"); b.HasKey("IdentityResourceId", "Type"); @@ -1438,15 +1437,15 @@ namespace EShopOnAbp.IdentityService.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResourceProperty", b => { b.Property("IdentityResourceId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Key") .HasMaxLength(250) - .HasColumnType("nvarchar(250)"); + .HasColumnType("character varying(250)"); b.Property("Value") .HasMaxLength(2000) - .HasColumnType("nvarchar(2000)"); + .HasColumnType("character varying(2000)"); b.HasKey("IdentityResourceId", "Key", "Value"); diff --git a/services/identity/src/EShopOnAbp.IdentityService.EntityFrameworkCore/Migrations/20211006102143_Initial.cs b/services/identity/src/EShopOnAbp.IdentityService.EntityFrameworkCore/Migrations/20211125125938_Initial.cs similarity index 62% rename from services/identity/src/EShopOnAbp.IdentityService.EntityFrameworkCore/Migrations/20211006102143_Initial.cs rename to services/identity/src/EShopOnAbp.IdentityService.EntityFrameworkCore/Migrations/20211125125938_Initial.cs index 32e0ad05..423dd971 100644 --- a/services/identity/src/EShopOnAbp.IdentityService.EntityFrameworkCore/Migrations/20211006102143_Initial.cs +++ b/services/identity/src/EShopOnAbp.IdentityService.EntityFrameworkCore/Migrations/20211125125938_Initial.cs @@ -13,16 +13,16 @@ namespace EShopOnAbp.IdentityService.Migrations name: "AbpClaimTypes", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Name = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), - Required = table.Column(type: "bit", nullable: false), - IsStatic = table.Column(type: "bit", nullable: false), - Regex = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), - RegexDescription = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - Description = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - ValueType = table.Column(type: "int", 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), + Name = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), + Required = table.Column(type: "boolean", nullable: false), + IsStatic = table.Column(type: "boolean", nullable: false), + Regex = table.Column(type: "character varying(512)", maxLength: 512, nullable: true), + RegexDescription = table.Column(type: "character varying(128)", maxLength: 128, nullable: true), + Description = table.Column(type: "character varying(256)", maxLength: 256, nullable: true), + ValueType = table.Column(type: "integer", nullable: false), + ExtraProperties = table.Column(type: "text", nullable: true), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: true) }, constraints: table => { @@ -33,11 +33,11 @@ namespace EShopOnAbp.IdentityService.Migrations name: "AbpLinkUsers", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), - SourceUserId = table.Column(type: "uniqueidentifier", nullable: false), - SourceTenantId = table.Column(type: "uniqueidentifier", nullable: true), - TargetUserId = table.Column(type: "uniqueidentifier", nullable: false), - TargetTenantId = table.Column(type: "uniqueidentifier", nullable: true) + Id = table.Column(type: "uuid", nullable: false), + SourceUserId = table.Column(type: "uuid", nullable: false), + SourceTenantId = table.Column(type: "uuid", nullable: true), + TargetUserId = table.Column(type: "uuid", nullable: false), + TargetTenantId = table.Column(type: "uuid", nullable: true) }, constraints: table => { @@ -48,20 +48,20 @@ namespace EShopOnAbp.IdentityService.Migrations name: "AbpOrganizationUnits", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - ParentId = table.Column(type: "uniqueidentifier", nullable: true), - Code = table.Column(type: "nvarchar(95)", maxLength: 95, nullable: false), - DisplayName = 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), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + ParentId = table.Column(type: "uuid", nullable: true), + Code = table.Column(type: "character varying(95)", maxLength: 95, nullable: false), + DisplayName = 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), + CreationTime = table.Column(type: "timestamp with time zone", nullable: false), + CreatorId = table.Column(type: "uuid", nullable: true), + LastModificationTime = table.Column(type: "timestamp with time zone", nullable: true), + LastModifierId = table.Column(type: "uuid", nullable: true), + IsDeleted = table.Column(type: "boolean", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uuid", nullable: true), + DeletionTime = table.Column(type: "timestamp with time zone", nullable: true) }, constraints: table => { @@ -77,15 +77,15 @@ namespace EShopOnAbp.IdentityService.Migrations name: "AbpRoles", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Name = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), - NormalizedName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), - IsDefault = table.Column(type: "bit", nullable: false), - IsStatic = table.Column(type: "bit", nullable: false), - IsPublic = table.Column(type: "bit", 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(256)", maxLength: 256, nullable: false), + NormalizedName = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), + IsDefault = table.Column(type: "boolean", nullable: false), + IsStatic = table.Column(type: "boolean", nullable: false), + IsPublic = table.Column(type: "boolean", nullable: false), + ExtraProperties = table.Column(type: "text", nullable: true), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: true) }, constraints: table => { @@ -96,21 +96,21 @@ namespace EShopOnAbp.IdentityService.Migrations name: "AbpSecurityLogs", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - ApplicationName = table.Column(type: "nvarchar(96)", maxLength: 96, nullable: true), - Identity = table.Column(type: "nvarchar(96)", maxLength: 96, nullable: true), - Action = 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), - TenantName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ClientId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - CorrelationId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ClientIpAddress = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - BrowserInfo = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), - CreationTime = table.Column(type: "datetime2", 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), + ApplicationName = table.Column(type: "character varying(96)", maxLength: 96, nullable: true), + Identity = table.Column(type: "character varying(96)", maxLength: 96, nullable: true), + Action = 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), + TenantName = table.Column(type: "character varying(64)", maxLength: 64, nullable: true), + ClientId = table.Column(type: "character varying(64)", maxLength: 64, nullable: true), + CorrelationId = table.Column(type: "character varying(64)", maxLength: 64, nullable: true), + ClientIpAddress = table.Column(type: "character varying(64)", maxLength: 64, nullable: true), + BrowserInfo = table.Column(type: "character varying(512)", maxLength: 512, nullable: true), + CreationTime = table.Column(type: "timestamp with time zone", nullable: false), + ExtraProperties = table.Column(type: "text", nullable: true), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: true) }, constraints: table => { @@ -121,34 +121,34 @@ namespace EShopOnAbp.IdentityService.Migrations name: "AbpUsers", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - UserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), - NormalizedUserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), - Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Surname = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Email = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), - NormalizedEmail = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), - EmailConfirmed = table.Column(type: "bit", nullable: false, defaultValue: false), - PasswordHash = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - SecurityStamp = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), - IsExternal = table.Column(type: "bit", nullable: false, defaultValue: false), - PhoneNumber = table.Column(type: "nvarchar(16)", maxLength: 16, nullable: true), - PhoneNumberConfirmed = table.Column(type: "bit", nullable: false, defaultValue: false), - IsActive = table.Column(type: "bit", nullable: false), - TwoFactorEnabled = table.Column(type: "bit", nullable: false, defaultValue: false), - LockoutEnd = table.Column(type: "datetimeoffset", nullable: true), - LockoutEnabled = table.Column(type: "bit", nullable: false, defaultValue: false), - AccessFailedCount = table.Column(type: "int", nullable: false, defaultValue: 0), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + UserName = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), + NormalizedUserName = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), + Name = table.Column(type: "character varying(64)", maxLength: 64, nullable: true), + Surname = table.Column(type: "character varying(64)", maxLength: 64, nullable: true), + Email = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), + NormalizedEmail = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), + EmailConfirmed = table.Column(type: "boolean", nullable: false, defaultValue: false), + PasswordHash = table.Column(type: "character varying(256)", maxLength: 256, nullable: true), + SecurityStamp = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), + IsExternal = table.Column(type: "boolean", nullable: false, defaultValue: false), + PhoneNumber = table.Column(type: "character varying(16)", maxLength: 16, nullable: true), + PhoneNumberConfirmed = table.Column(type: "boolean", nullable: false, defaultValue: false), + IsActive = table.Column(type: "boolean", nullable: false), + TwoFactorEnabled = table.Column(type: "boolean", nullable: false, defaultValue: false), + LockoutEnd = table.Column(type: "timestamp with time zone", nullable: true), + LockoutEnabled = table.Column(type: "boolean", nullable: false, defaultValue: false), + AccessFailedCount = table.Column(type: "integer", nullable: false, defaultValue: 0), + ExtraProperties = table.Column(type: "text", nullable: true), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "timestamp with time zone", nullable: false), + CreatorId = table.Column(type: "uuid", nullable: true), + LastModificationTime = table.Column(type: "timestamp with time zone", nullable: true), + LastModifierId = table.Column(type: "uuid", nullable: true), + IsDeleted = table.Column(type: "boolean", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uuid", nullable: true), + DeletionTime = table.Column(type: "timestamp with time zone", nullable: true) }, constraints: table => { @@ -159,22 +159,22 @@ namespace EShopOnAbp.IdentityService.Migrations name: "IdentityServerApiResources", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Name = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), - DisplayName = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), - Description = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), - Enabled = table.Column(type: "bit", nullable: false), - AllowedAccessTokenSigningAlgorithms = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), - ShowInDiscoveryDocument = table.Column(type: "bit", nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) + Id = table.Column(type: "uuid", nullable: false), + Name = table.Column(type: "character varying(200)", maxLength: 200, nullable: false), + DisplayName = table.Column(type: "character varying(200)", maxLength: 200, nullable: true), + Description = table.Column(type: "character varying(1000)", maxLength: 1000, nullable: true), + Enabled = table.Column(type: "boolean", nullable: false), + AllowedAccessTokenSigningAlgorithms = table.Column(type: "character varying(100)", maxLength: 100, nullable: true), + ShowInDiscoveryDocument = table.Column(type: "boolean", nullable: false), + ExtraProperties = table.Column(type: "text", nullable: true), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "timestamp with time zone", nullable: false), + CreatorId = table.Column(type: "uuid", nullable: true), + LastModificationTime = table.Column(type: "timestamp with time zone", nullable: true), + LastModifierId = table.Column(type: "uuid", nullable: true), + IsDeleted = table.Column(type: "boolean", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uuid", nullable: true), + DeletionTime = table.Column(type: "timestamp with time zone", nullable: true) }, constraints: table => { @@ -185,23 +185,23 @@ namespace EShopOnAbp.IdentityService.Migrations name: "IdentityServerApiScopes", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Enabled = table.Column(type: "bit", nullable: false), - Name = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), - DisplayName = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), - Description = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), - Required = table.Column(type: "bit", nullable: false), - Emphasize = table.Column(type: "bit", nullable: false), - ShowInDiscoveryDocument = table.Column(type: "bit", nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) + Id = table.Column(type: "uuid", nullable: false), + Enabled = table.Column(type: "boolean", nullable: false), + Name = table.Column(type: "character varying(200)", maxLength: 200, nullable: false), + DisplayName = table.Column(type: "character varying(200)", maxLength: 200, nullable: true), + Description = table.Column(type: "character varying(1000)", maxLength: 1000, nullable: true), + Required = table.Column(type: "boolean", nullable: false), + Emphasize = table.Column(type: "boolean", nullable: false), + ShowInDiscoveryDocument = table.Column(type: "boolean", nullable: false), + ExtraProperties = table.Column(type: "text", nullable: true), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "timestamp with time zone", nullable: false), + CreatorId = table.Column(type: "uuid", nullable: true), + LastModificationTime = table.Column(type: "timestamp with time zone", nullable: true), + LastModifierId = table.Column(type: "uuid", nullable: true), + IsDeleted = table.Column(type: "boolean", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uuid", nullable: true), + DeletionTime = table.Column(type: "timestamp with time zone", nullable: true) }, constraints: table => { @@ -212,55 +212,55 @@ namespace EShopOnAbp.IdentityService.Migrations name: "IdentityServerClients", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), - ClientId = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), - ClientName = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), - Description = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), - ClientUri = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: true), - LogoUri = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: true), - Enabled = table.Column(type: "bit", nullable: false), - ProtocolType = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), - RequireClientSecret = table.Column(type: "bit", nullable: false), - RequireConsent = table.Column(type: "bit", nullable: false), - AllowRememberConsent = table.Column(type: "bit", nullable: false), - AlwaysIncludeUserClaimsInIdToken = table.Column(type: "bit", nullable: false), - RequirePkce = table.Column(type: "bit", nullable: false), - AllowPlainTextPkce = table.Column(type: "bit", nullable: false), - RequireRequestObject = table.Column(type: "bit", nullable: false), - AllowAccessTokensViaBrowser = table.Column(type: "bit", nullable: false), - FrontChannelLogoutUri = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: true), - FrontChannelLogoutSessionRequired = table.Column(type: "bit", nullable: false), - BackChannelLogoutUri = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: true), - BackChannelLogoutSessionRequired = table.Column(type: "bit", nullable: false), - AllowOfflineAccess = table.Column(type: "bit", nullable: false), - IdentityTokenLifetime = table.Column(type: "int", nullable: false), - AllowedIdentityTokenSigningAlgorithms = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), - AccessTokenLifetime = table.Column(type: "int", nullable: false), - AuthorizationCodeLifetime = table.Column(type: "int", nullable: false), - ConsentLifetime = table.Column(type: "int", nullable: true), - AbsoluteRefreshTokenLifetime = table.Column(type: "int", nullable: false), - SlidingRefreshTokenLifetime = table.Column(type: "int", nullable: false), - RefreshTokenUsage = table.Column(type: "int", nullable: false), - UpdateAccessTokenClaimsOnRefresh = table.Column(type: "bit", nullable: false), - RefreshTokenExpiration = table.Column(type: "int", nullable: false), - AccessTokenType = table.Column(type: "int", nullable: false), - EnableLocalLogin = table.Column(type: "bit", nullable: false), - IncludeJwtId = table.Column(type: "bit", nullable: false), - AlwaysSendClientClaims = table.Column(type: "bit", nullable: false), - ClientClaimsPrefix = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), - PairWiseSubjectSalt = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), - UserSsoLifetime = table.Column(type: "int", nullable: true), - UserCodeType = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), - DeviceCodeLifetime = table.Column(type: "int", nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) + Id = table.Column(type: "uuid", nullable: false), + ClientId = table.Column(type: "character varying(200)", maxLength: 200, nullable: false), + ClientName = table.Column(type: "character varying(200)", maxLength: 200, nullable: true), + Description = table.Column(type: "character varying(1000)", maxLength: 1000, nullable: true), + ClientUri = table.Column(type: "character varying(2000)", maxLength: 2000, nullable: true), + LogoUri = table.Column(type: "character varying(2000)", maxLength: 2000, nullable: true), + Enabled = table.Column(type: "boolean", nullable: false), + ProtocolType = table.Column(type: "character varying(200)", maxLength: 200, nullable: false), + RequireClientSecret = table.Column(type: "boolean", nullable: false), + RequireConsent = table.Column(type: "boolean", nullable: false), + AllowRememberConsent = table.Column(type: "boolean", nullable: false), + AlwaysIncludeUserClaimsInIdToken = table.Column(type: "boolean", nullable: false), + RequirePkce = table.Column(type: "boolean", nullable: false), + AllowPlainTextPkce = table.Column(type: "boolean", nullable: false), + RequireRequestObject = table.Column(type: "boolean", nullable: false), + AllowAccessTokensViaBrowser = table.Column(type: "boolean", nullable: false), + FrontChannelLogoutUri = table.Column(type: "character varying(2000)", maxLength: 2000, nullable: true), + FrontChannelLogoutSessionRequired = table.Column(type: "boolean", nullable: false), + BackChannelLogoutUri = table.Column(type: "character varying(2000)", maxLength: 2000, nullable: true), + BackChannelLogoutSessionRequired = table.Column(type: "boolean", nullable: false), + AllowOfflineAccess = table.Column(type: "boolean", nullable: false), + IdentityTokenLifetime = table.Column(type: "integer", nullable: false), + AllowedIdentityTokenSigningAlgorithms = table.Column(type: "character varying(100)", maxLength: 100, nullable: true), + AccessTokenLifetime = table.Column(type: "integer", nullable: false), + AuthorizationCodeLifetime = table.Column(type: "integer", nullable: false), + ConsentLifetime = table.Column(type: "integer", nullable: true), + AbsoluteRefreshTokenLifetime = table.Column(type: "integer", nullable: false), + SlidingRefreshTokenLifetime = table.Column(type: "integer", nullable: false), + RefreshTokenUsage = table.Column(type: "integer", nullable: false), + UpdateAccessTokenClaimsOnRefresh = table.Column(type: "boolean", nullable: false), + RefreshTokenExpiration = table.Column(type: "integer", nullable: false), + AccessTokenType = table.Column(type: "integer", nullable: false), + EnableLocalLogin = table.Column(type: "boolean", nullable: false), + IncludeJwtId = table.Column(type: "boolean", nullable: false), + AlwaysSendClientClaims = table.Column(type: "boolean", nullable: false), + ClientClaimsPrefix = table.Column(type: "character varying(200)", maxLength: 200, nullable: true), + PairWiseSubjectSalt = table.Column(type: "character varying(200)", maxLength: 200, nullable: true), + UserSsoLifetime = table.Column(type: "integer", nullable: true), + UserCodeType = table.Column(type: "character varying(100)", maxLength: 100, nullable: true), + DeviceCodeLifetime = table.Column(type: "integer", nullable: false), + ExtraProperties = table.Column(type: "text", nullable: true), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "timestamp with time zone", nullable: false), + CreatorId = table.Column(type: "uuid", nullable: true), + LastModificationTime = table.Column(type: "timestamp with time zone", nullable: true), + LastModifierId = table.Column(type: "uuid", nullable: true), + IsDeleted = table.Column(type: "boolean", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uuid", nullable: true), + DeletionTime = table.Column(type: "timestamp with time zone", nullable: true) }, constraints: table => { @@ -271,19 +271,19 @@ namespace EShopOnAbp.IdentityService.Migrations name: "IdentityServerDeviceFlowCodes", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), - DeviceCode = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), - UserCode = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), - SubjectId = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), - SessionId = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), - ClientId = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), - Description = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), - Expiration = table.Column(type: "datetime2", nullable: false), - Data = table.Column(type: "nvarchar(max)", maxLength: 50000, nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true) + Id = table.Column(type: "uuid", nullable: false), + DeviceCode = table.Column(type: "character varying(200)", maxLength: 200, nullable: false), + UserCode = table.Column(type: "character varying(200)", maxLength: 200, nullable: false), + SubjectId = table.Column(type: "character varying(200)", maxLength: 200, nullable: true), + SessionId = table.Column(type: "character varying(100)", maxLength: 100, nullable: true), + ClientId = table.Column(type: "character varying(200)", maxLength: 200, nullable: false), + Description = table.Column(type: "character varying(200)", maxLength: 200, nullable: true), + Expiration = table.Column(type: "timestamp with time zone", nullable: false), + Data = table.Column(type: "character varying(50000)", maxLength: 50000, nullable: false), + ExtraProperties = table.Column(type: "text", nullable: true), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "timestamp with time zone", nullable: false), + CreatorId = table.Column(type: "uuid", nullable: true) }, constraints: table => { @@ -294,23 +294,23 @@ namespace EShopOnAbp.IdentityService.Migrations name: "IdentityServerIdentityResources", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Name = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), - DisplayName = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), - Description = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), - Enabled = table.Column(type: "bit", nullable: false), - Required = table.Column(type: "bit", nullable: false), - Emphasize = table.Column(type: "bit", nullable: false), - ShowInDiscoveryDocument = table.Column(type: "bit", nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) + Id = table.Column(type: "uuid", nullable: false), + Name = table.Column(type: "character varying(200)", maxLength: 200, nullable: false), + DisplayName = table.Column(type: "character varying(200)", maxLength: 200, nullable: true), + Description = table.Column(type: "character varying(1000)", maxLength: 1000, nullable: true), + Enabled = table.Column(type: "boolean", nullable: false), + Required = table.Column(type: "boolean", nullable: false), + Emphasize = table.Column(type: "boolean", nullable: false), + ShowInDiscoveryDocument = table.Column(type: "boolean", nullable: false), + ExtraProperties = table.Column(type: "text", nullable: true), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "timestamp with time zone", nullable: false), + CreatorId = table.Column(type: "uuid", nullable: true), + LastModificationTime = table.Column(type: "timestamp with time zone", nullable: true), + LastModifierId = table.Column(type: "uuid", nullable: true), + IsDeleted = table.Column(type: "boolean", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uuid", nullable: true), + DeletionTime = table.Column(type: "timestamp with time zone", nullable: true) }, constraints: table => { @@ -321,19 +321,19 @@ namespace EShopOnAbp.IdentityService.Migrations name: "IdentityServerPersistedGrants", columns: table => new { - Key = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), - Type = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), - SubjectId = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), - SessionId = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), - ClientId = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), - Description = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - Expiration = table.Column(type: "datetime2", nullable: true), - ConsumedTime = table.Column(type: "datetime2", nullable: true), - Data = table.Column(type: "nvarchar(max)", maxLength: 50000, nullable: false), - Id = table.Column(type: "uniqueidentifier", nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true) + Key = table.Column(type: "character varying(200)", maxLength: 200, nullable: false), + Type = table.Column(type: "character varying(50)", maxLength: 50, nullable: false), + SubjectId = table.Column(type: "character varying(200)", maxLength: 200, nullable: true), + SessionId = table.Column(type: "character varying(100)", maxLength: 100, nullable: true), + ClientId = table.Column(type: "character varying(200)", maxLength: 200, nullable: false), + Description = table.Column(type: "character varying(200)", maxLength: 200, nullable: true), + CreationTime = table.Column(type: "timestamp with time zone", nullable: false), + Expiration = table.Column(type: "timestamp with time zone", nullable: true), + ConsumedTime = table.Column(type: "timestamp with time zone", nullable: true), + Data = table.Column(type: "character varying(50000)", maxLength: 50000, nullable: false), + Id = table.Column(type: "uuid", nullable: false), + ExtraProperties = table.Column(type: "text", nullable: true), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: true) }, constraints: table => { @@ -344,17 +344,17 @@ namespace EShopOnAbp.IdentityService.Migrations name: "AbpOrganizationUnitRoles", columns: table => new { - RoleId = table.Column(type: "uniqueidentifier", nullable: false), - OrganizationUnitId = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true) + RoleId = table.Column(type: "uuid", nullable: false), + OrganizationUnitId = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + CreationTime = table.Column(type: "timestamp with time zone", nullable: false), + CreatorId = table.Column(type: "uuid", nullable: true) }, constraints: table => { table.PrimaryKey("PK_AbpOrganizationUnitRoles", x => new { x.OrganizationUnitId, x.RoleId }); table.ForeignKey( - name: "FK_AbpOrganizationUnitRoles_AbpOrganizationUnits_OrganizationUnitId", + name: "FK_AbpOrganizationUnitRoles_AbpOrganizationUnits_OrganizationU~", column: x => x.OrganizationUnitId, principalTable: "AbpOrganizationUnits", principalColumn: "Id", @@ -371,11 +371,11 @@ namespace EShopOnAbp.IdentityService.Migrations name: "AbpRoleClaims", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), - RoleId = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - ClaimType = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), - ClaimValue = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true) + Id = table.Column(type: "uuid", nullable: false), + RoleId = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + ClaimType = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), + ClaimValue = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: true) }, constraints: table => { @@ -392,11 +392,11 @@ namespace EShopOnAbp.IdentityService.Migrations name: "AbpUserClaims", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), - UserId = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - ClaimType = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), - ClaimValue = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true) + Id = table.Column(type: "uuid", nullable: false), + UserId = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + ClaimType = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), + ClaimValue = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: true) }, constraints: table => { @@ -413,11 +413,11 @@ namespace EShopOnAbp.IdentityService.Migrations name: "AbpUserLogins", columns: table => new { - UserId = table.Column(type: "uniqueidentifier", nullable: false), - LoginProvider = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - ProviderKey = table.Column(type: "nvarchar(196)", maxLength: 196, nullable: false), - ProviderDisplayName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true) + UserId = table.Column(type: "uuid", nullable: false), + LoginProvider = table.Column(type: "character varying(64)", maxLength: 64, nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + ProviderKey = table.Column(type: "character varying(196)", maxLength: 196, nullable: false), + ProviderDisplayName = table.Column(type: "character varying(128)", maxLength: 128, nullable: true) }, constraints: table => { @@ -434,17 +434,17 @@ namespace EShopOnAbp.IdentityService.Migrations name: "AbpUserOrganizationUnits", columns: table => new { - UserId = table.Column(type: "uniqueidentifier", nullable: false), - OrganizationUnitId = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true) + UserId = table.Column(type: "uuid", nullable: false), + OrganizationUnitId = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + CreationTime = table.Column(type: "timestamp with time zone", nullable: false), + CreatorId = table.Column(type: "uuid", nullable: true) }, constraints: table => { table.PrimaryKey("PK_AbpUserOrganizationUnits", x => new { x.OrganizationUnitId, x.UserId }); table.ForeignKey( - name: "FK_AbpUserOrganizationUnits_AbpOrganizationUnits_OrganizationUnitId", + name: "FK_AbpUserOrganizationUnits_AbpOrganizationUnits_OrganizationU~", column: x => x.OrganizationUnitId, principalTable: "AbpOrganizationUnits", principalColumn: "Id", @@ -461,9 +461,9 @@ namespace EShopOnAbp.IdentityService.Migrations name: "AbpUserRoles", columns: table => new { - UserId = table.Column(type: "uniqueidentifier", nullable: false), - RoleId = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true) + UserId = table.Column(type: "uuid", nullable: false), + RoleId = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true) }, constraints: table => { @@ -486,11 +486,11 @@ namespace EShopOnAbp.IdentityService.Migrations name: "AbpUserTokens", columns: table => new { - UserId = table.Column(type: "uniqueidentifier", nullable: false), - LoginProvider = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Value = table.Column(type: "nvarchar(max)", nullable: true) + UserId = table.Column(type: "uuid", nullable: false), + LoginProvider = table.Column(type: "character varying(64)", maxLength: 64, nullable: false), + Name = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + Value = table.Column(type: "text", nullable: true) }, constraints: table => { @@ -507,14 +507,14 @@ namespace EShopOnAbp.IdentityService.Migrations name: "IdentityServerApiResourceClaims", columns: table => new { - Type = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), - ApiResourceId = table.Column(type: "uniqueidentifier", nullable: false) + Type = table.Column(type: "character varying(200)", maxLength: 200, nullable: false), + ApiResourceId = table.Column(type: "uuid", nullable: false) }, constraints: table => { table.PrimaryKey("PK_IdentityServerApiResourceClaims", x => new { x.ApiResourceId, x.Type }); table.ForeignKey( - name: "FK_IdentityServerApiResourceClaims_IdentityServerApiResources_ApiResourceId", + name: "FK_IdentityServerApiResourceClaims_IdentityServerApiResources_~", column: x => x.ApiResourceId, principalTable: "IdentityServerApiResources", principalColumn: "Id", @@ -525,15 +525,15 @@ namespace EShopOnAbp.IdentityService.Migrations name: "IdentityServerApiResourceProperties", columns: table => new { - ApiResourceId = table.Column(type: "uniqueidentifier", nullable: false), - Key = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: false), - Value = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: false) + ApiResourceId = table.Column(type: "uuid", nullable: false), + Key = table.Column(type: "character varying(250)", maxLength: 250, nullable: false), + Value = table.Column(type: "character varying(2000)", maxLength: 2000, nullable: false) }, constraints: table => { table.PrimaryKey("PK_IdentityServerApiResourceProperties", x => new { x.ApiResourceId, x.Key, x.Value }); table.ForeignKey( - name: "FK_IdentityServerApiResourceProperties_IdentityServerApiResources_ApiResourceId", + name: "FK_IdentityServerApiResourceProperties_IdentityServerApiResour~", column: x => x.ApiResourceId, principalTable: "IdentityServerApiResources", principalColumn: "Id", @@ -544,14 +544,14 @@ namespace EShopOnAbp.IdentityService.Migrations name: "IdentityServerApiResourceScopes", columns: table => new { - ApiResourceId = table.Column(type: "uniqueidentifier", nullable: false), - Scope = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false) + ApiResourceId = table.Column(type: "uuid", nullable: false), + Scope = table.Column(type: "character varying(200)", maxLength: 200, nullable: false) }, constraints: table => { table.PrimaryKey("PK_IdentityServerApiResourceScopes", x => new { x.ApiResourceId, x.Scope }); table.ForeignKey( - name: "FK_IdentityServerApiResourceScopes_IdentityServerApiResources_ApiResourceId", + name: "FK_IdentityServerApiResourceScopes_IdentityServerApiResources_~", column: x => x.ApiResourceId, principalTable: "IdentityServerApiResources", principalColumn: "Id", @@ -562,17 +562,17 @@ namespace EShopOnAbp.IdentityService.Migrations name: "IdentityServerApiResourceSecrets", columns: table => new { - Type = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: false), - Value = table.Column(type: "nvarchar(4000)", maxLength: 4000, nullable: false), - ApiResourceId = table.Column(type: "uniqueidentifier", nullable: false), - Description = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), - Expiration = table.Column(type: "datetime2", nullable: true) + Type = table.Column(type: "character varying(250)", maxLength: 250, nullable: false), + Value = table.Column(type: "character varying(4000)", maxLength: 4000, nullable: false), + ApiResourceId = table.Column(type: "uuid", nullable: false), + Description = table.Column(type: "character varying(1000)", maxLength: 1000, nullable: true), + Expiration = table.Column(type: "timestamp with time zone", nullable: true) }, constraints: table => { table.PrimaryKey("PK_IdentityServerApiResourceSecrets", x => new { x.ApiResourceId, x.Type, x.Value }); table.ForeignKey( - name: "FK_IdentityServerApiResourceSecrets_IdentityServerApiResources_ApiResourceId", + name: "FK_IdentityServerApiResourceSecrets_IdentityServerApiResources~", column: x => x.ApiResourceId, principalTable: "IdentityServerApiResources", principalColumn: "Id", @@ -583,14 +583,14 @@ namespace EShopOnAbp.IdentityService.Migrations name: "IdentityServerApiScopeClaims", columns: table => new { - Type = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), - ApiScopeId = table.Column(type: "uniqueidentifier", nullable: false) + Type = table.Column(type: "character varying(200)", maxLength: 200, nullable: false), + ApiScopeId = table.Column(type: "uuid", nullable: false) }, constraints: table => { table.PrimaryKey("PK_IdentityServerApiScopeClaims", x => new { x.ApiScopeId, x.Type }); table.ForeignKey( - name: "FK_IdentityServerApiScopeClaims_IdentityServerApiScopes_ApiScopeId", + name: "FK_IdentityServerApiScopeClaims_IdentityServerApiScopes_ApiSco~", column: x => x.ApiScopeId, principalTable: "IdentityServerApiScopes", principalColumn: "Id", @@ -601,15 +601,15 @@ namespace EShopOnAbp.IdentityService.Migrations name: "IdentityServerApiScopeProperties", columns: table => new { - ApiScopeId = table.Column(type: "uniqueidentifier", nullable: false), - Key = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: false), - Value = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: false) + ApiScopeId = table.Column(type: "uuid", nullable: false), + Key = table.Column(type: "character varying(250)", maxLength: 250, nullable: false), + Value = table.Column(type: "character varying(2000)", maxLength: 2000, nullable: false) }, constraints: table => { table.PrimaryKey("PK_IdentityServerApiScopeProperties", x => new { x.ApiScopeId, x.Key, x.Value }); table.ForeignKey( - name: "FK_IdentityServerApiScopeProperties_IdentityServerApiScopes_ApiScopeId", + name: "FK_IdentityServerApiScopeProperties_IdentityServerApiScopes_Ap~", column: x => x.ApiScopeId, principalTable: "IdentityServerApiScopes", principalColumn: "Id", @@ -620,9 +620,9 @@ namespace EShopOnAbp.IdentityService.Migrations name: "IdentityServerClientClaims", columns: table => new { - ClientId = table.Column(type: "uniqueidentifier", nullable: false), - Type = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: false), - Value = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: false) + ClientId = table.Column(type: "uuid", nullable: false), + Type = table.Column(type: "character varying(250)", maxLength: 250, nullable: false), + Value = table.Column(type: "character varying(250)", maxLength: 250, nullable: false) }, constraints: table => { @@ -639,14 +639,14 @@ namespace EShopOnAbp.IdentityService.Migrations name: "IdentityServerClientCorsOrigins", columns: table => new { - ClientId = table.Column(type: "uniqueidentifier", nullable: false), - Origin = table.Column(type: "nvarchar(150)", maxLength: 150, nullable: false) + ClientId = table.Column(type: "uuid", nullable: false), + Origin = table.Column(type: "character varying(150)", maxLength: 150, nullable: false) }, constraints: table => { table.PrimaryKey("PK_IdentityServerClientCorsOrigins", x => new { x.ClientId, x.Origin }); table.ForeignKey( - name: "FK_IdentityServerClientCorsOrigins_IdentityServerClients_ClientId", + name: "FK_IdentityServerClientCorsOrigins_IdentityServerClients_Clien~", column: x => x.ClientId, principalTable: "IdentityServerClients", principalColumn: "Id", @@ -657,14 +657,14 @@ namespace EShopOnAbp.IdentityService.Migrations name: "IdentityServerClientGrantTypes", columns: table => new { - ClientId = table.Column(type: "uniqueidentifier", nullable: false), - GrantType = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: false) + ClientId = table.Column(type: "uuid", nullable: false), + GrantType = table.Column(type: "character varying(250)", maxLength: 250, nullable: false) }, constraints: table => { table.PrimaryKey("PK_IdentityServerClientGrantTypes", x => new { x.ClientId, x.GrantType }); table.ForeignKey( - name: "FK_IdentityServerClientGrantTypes_IdentityServerClients_ClientId", + name: "FK_IdentityServerClientGrantTypes_IdentityServerClients_Client~", column: x => x.ClientId, principalTable: "IdentityServerClients", principalColumn: "Id", @@ -675,14 +675,14 @@ namespace EShopOnAbp.IdentityService.Migrations name: "IdentityServerClientIdPRestrictions", columns: table => new { - ClientId = table.Column(type: "uniqueidentifier", nullable: false), - Provider = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false) + ClientId = table.Column(type: "uuid", nullable: false), + Provider = table.Column(type: "character varying(200)", maxLength: 200, nullable: false) }, constraints: table => { table.PrimaryKey("PK_IdentityServerClientIdPRestrictions", x => new { x.ClientId, x.Provider }); table.ForeignKey( - name: "FK_IdentityServerClientIdPRestrictions_IdentityServerClients_ClientId", + name: "FK_IdentityServerClientIdPRestrictions_IdentityServerClients_C~", column: x => x.ClientId, principalTable: "IdentityServerClients", principalColumn: "Id", @@ -693,14 +693,14 @@ namespace EShopOnAbp.IdentityService.Migrations name: "IdentityServerClientPostLogoutRedirectUris", columns: table => new { - ClientId = table.Column(type: "uniqueidentifier", nullable: false), - PostLogoutRedirectUri = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: false) + ClientId = table.Column(type: "uuid", nullable: false), + PostLogoutRedirectUri = table.Column(type: "character varying(2000)", maxLength: 2000, nullable: false) }, constraints: table => { table.PrimaryKey("PK_IdentityServerClientPostLogoutRedirectUris", x => new { x.ClientId, x.PostLogoutRedirectUri }); table.ForeignKey( - name: "FK_IdentityServerClientPostLogoutRedirectUris_IdentityServerClients_ClientId", + name: "FK_IdentityServerClientPostLogoutRedirectUris_IdentityServerCl~", column: x => x.ClientId, principalTable: "IdentityServerClients", principalColumn: "Id", @@ -711,15 +711,15 @@ namespace EShopOnAbp.IdentityService.Migrations name: "IdentityServerClientProperties", columns: table => new { - ClientId = table.Column(type: "uniqueidentifier", nullable: false), - Key = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: false), - Value = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: false) + ClientId = table.Column(type: "uuid", nullable: false), + Key = table.Column(type: "character varying(250)", maxLength: 250, nullable: false), + Value = table.Column(type: "character varying(2000)", maxLength: 2000, nullable: false) }, constraints: table => { table.PrimaryKey("PK_IdentityServerClientProperties", x => new { x.ClientId, x.Key, x.Value }); table.ForeignKey( - name: "FK_IdentityServerClientProperties_IdentityServerClients_ClientId", + name: "FK_IdentityServerClientProperties_IdentityServerClients_Client~", column: x => x.ClientId, principalTable: "IdentityServerClients", principalColumn: "Id", @@ -730,14 +730,14 @@ namespace EShopOnAbp.IdentityService.Migrations name: "IdentityServerClientRedirectUris", columns: table => new { - ClientId = table.Column(type: "uniqueidentifier", nullable: false), - RedirectUri = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: false) + ClientId = table.Column(type: "uuid", nullable: false), + RedirectUri = table.Column(type: "character varying(2000)", maxLength: 2000, nullable: false) }, constraints: table => { table.PrimaryKey("PK_IdentityServerClientRedirectUris", x => new { x.ClientId, x.RedirectUri }); table.ForeignKey( - name: "FK_IdentityServerClientRedirectUris_IdentityServerClients_ClientId", + name: "FK_IdentityServerClientRedirectUris_IdentityServerClients_Clie~", column: x => x.ClientId, principalTable: "IdentityServerClients", principalColumn: "Id", @@ -748,8 +748,8 @@ namespace EShopOnAbp.IdentityService.Migrations name: "IdentityServerClientScopes", columns: table => new { - ClientId = table.Column(type: "uniqueidentifier", nullable: false), - Scope = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false) + ClientId = table.Column(type: "uuid", nullable: false), + Scope = table.Column(type: "character varying(200)", maxLength: 200, nullable: false) }, constraints: table => { @@ -766,11 +766,11 @@ namespace EShopOnAbp.IdentityService.Migrations name: "IdentityServerClientSecrets", columns: table => new { - Type = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: false), - Value = table.Column(type: "nvarchar(4000)", maxLength: 4000, nullable: false), - ClientId = table.Column(type: "uniqueidentifier", nullable: false), - Description = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: true), - Expiration = table.Column(type: "datetime2", nullable: true) + Type = table.Column(type: "character varying(250)", maxLength: 250, nullable: false), + Value = table.Column(type: "character varying(4000)", maxLength: 4000, nullable: false), + ClientId = table.Column(type: "uuid", nullable: false), + Description = table.Column(type: "character varying(2000)", maxLength: 2000, nullable: true), + Expiration = table.Column(type: "timestamp with time zone", nullable: true) }, constraints: table => { @@ -787,14 +787,14 @@ namespace EShopOnAbp.IdentityService.Migrations name: "IdentityServerIdentityResourceClaims", columns: table => new { - Type = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), - IdentityResourceId = table.Column(type: "uniqueidentifier", nullable: false) + Type = table.Column(type: "character varying(200)", maxLength: 200, nullable: false), + IdentityResourceId = table.Column(type: "uuid", nullable: false) }, constraints: table => { table.PrimaryKey("PK_IdentityServerIdentityResourceClaims", x => new { x.IdentityResourceId, x.Type }); table.ForeignKey( - name: "FK_IdentityServerIdentityResourceClaims_IdentityServerIdentityResources_IdentityResourceId", + name: "FK_IdentityServerIdentityResourceClaims_IdentityServerIdentity~", column: x => x.IdentityResourceId, principalTable: "IdentityServerIdentityResources", principalColumn: "Id", @@ -805,15 +805,15 @@ namespace EShopOnAbp.IdentityService.Migrations name: "IdentityServerIdentityResourceProperties", columns: table => new { - IdentityResourceId = table.Column(type: "uniqueidentifier", nullable: false), - Key = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: false), - Value = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: false) + IdentityResourceId = table.Column(type: "uuid", nullable: false), + Key = table.Column(type: "character varying(250)", maxLength: 250, nullable: false), + Value = table.Column(type: "character varying(2000)", maxLength: 2000, nullable: false) }, constraints: table => { table.PrimaryKey("PK_IdentityServerIdentityResourceProperties", x => new { x.IdentityResourceId, x.Key, x.Value }); table.ForeignKey( - name: "FK_IdentityServerIdentityResourceProperties_IdentityServerIdentityResources_IdentityResourceId", + name: "FK_IdentityServerIdentityResourceProperties_IdentityServerIden~", column: x => x.IdentityResourceId, principalTable: "IdentityServerIdentityResources", principalColumn: "Id", @@ -821,11 +821,10 @@ namespace EShopOnAbp.IdentityService.Migrations }); migrationBuilder.CreateIndex( - name: "IX_AbpLinkUsers_SourceUserId_SourceTenantId_TargetUserId_TargetTenantId", + name: "IX_AbpLinkUsers_SourceUserId_SourceTenantId_TargetUserId_Targe~", table: "AbpLinkUsers", columns: new[] { "SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId" }, - unique: true, - filter: "[SourceTenantId] IS NOT NULL AND [TargetTenantId] IS NOT NULL"); + unique: true); migrationBuilder.CreateIndex( name: "IX_AbpOrganizationUnitRoles_RoleId_OrganizationUnitId", diff --git a/services/identity/src/EShopOnAbp.IdentityService.EntityFrameworkCore/Migrations/IdentityServiceDbContextModelSnapshot.cs b/services/identity/src/EShopOnAbp.IdentityService.EntityFrameworkCore/Migrations/IdentityServiceDbContextModelSnapshot.cs index e4e6b04f..4f461647 100644 --- a/services/identity/src/EShopOnAbp.IdentityService.EntityFrameworkCore/Migrations/IdentityServiceDbContextModelSnapshot.cs +++ b/services/identity/src/EShopOnAbp.IdentityService.EntityFrameworkCore/Migrations/IdentityServiceDbContextModelSnapshot.cs @@ -3,8 +3,8 @@ using System; using EShopOnAbp.IdentityService.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,52 +18,52 @@ namespace EShopOnAbp.IdentityService.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.Identity.IdentityClaimType", 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("Description") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)"); b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("IsStatic") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("Name") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)"); b.Property("Regex") .HasMaxLength(512) - .HasColumnType("nvarchar(512)"); + .HasColumnType("character varying(512)"); b.Property("RegexDescription") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)"); b.Property("Required") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("ValueType") - .HasColumnType("int"); + .HasColumnType("integer"); b.HasKey("Id"); @@ -73,25 +73,24 @@ namespace EShopOnAbp.IdentityService.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("SourceTenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("SourceUserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("TargetTenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("TargetUserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.HasKey("Id"); b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId") - .IsUnique() - .HasFilter("[SourceTenantId] IS NOT NULL AND [TargetTenantId] IS NOT NULL"); + .IsUnique(); b.ToTable("AbpLinkUsers", (string)null); }); @@ -99,42 +98,42 @@ namespace EShopOnAbp.IdentityService.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", 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("IsDefault") - .HasColumnType("bit") + .HasColumnType("boolean") .HasColumnName("IsDefault"); b.Property("IsPublic") - .HasColumnType("bit") + .HasColumnType("boolean") .HasColumnName("IsPublic"); b.Property("IsStatic") - .HasColumnType("bit") + .HasColumnType("boolean") .HasColumnName("IsStatic"); b.Property("Name") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)"); b.Property("NormalizedName") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -147,22 +146,22 @@ namespace EShopOnAbp.IdentityService.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("ClaimType") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)"); b.Property("ClaimValue") .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); + .HasColumnType("character varying(1024)"); b.Property("RoleId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -175,63 +174,63 @@ namespace EShopOnAbp.IdentityService.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Action") .HasMaxLength(96) - .HasColumnType("nvarchar(96)"); + .HasColumnType("character varying(96)"); b.Property("ApplicationName") .HasMaxLength(96) - .HasColumnType("nvarchar(96)"); + .HasColumnType("character varying(96)"); b.Property("BrowserInfo") .HasMaxLength(512) - .HasColumnType("nvarchar(512)"); + .HasColumnType("character varying(512)"); b.Property("ClientId") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)"); b.Property("ClientIpAddress") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)"); 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)"); b.Property("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("Identity") .HasMaxLength(96) - .HasColumnType("nvarchar(96)"); + .HasColumnType("character varying(96)"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("TenantName") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)"); b.Property("UserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("UserName") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)"); b.HasKey("Id"); @@ -249,142 +248,142 @@ namespace EShopOnAbp.IdentityService.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("AccessFailedCount") .ValueGeneratedOnAdd() - .HasColumnType("int") + .HasColumnType("integer") .HasDefaultValue(0) .HasColumnName("AccessFailedCount"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) - .HasColumnType("nvarchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("Email") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)") + .HasColumnType("character varying(256)") .HasColumnName("Email"); b.Property("EmailConfirmed") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("EmailConfirmed"); b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("IsActive") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("IsExternal") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsExternal"); b.Property("LastModificationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("LockoutEnabled") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("LockoutEnabled"); b.Property("LockoutEnd") - .HasColumnType("datetimeoffset"); + .HasColumnType("timestamp with time zone"); b.Property("Name") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") + .HasColumnType("character varying(64)") .HasColumnName("Name"); b.Property("NormalizedEmail") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)") + .HasColumnType("character varying(256)") .HasColumnName("NormalizedEmail"); b.Property("NormalizedUserName") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)") + .HasColumnType("character varying(256)") .HasColumnName("NormalizedUserName"); b.Property("PasswordHash") .HasMaxLength(256) - .HasColumnType("nvarchar(256)") + .HasColumnType("character varying(256)") .HasColumnName("PasswordHash"); b.Property("PhoneNumber") .HasMaxLength(16) - .HasColumnType("nvarchar(16)") + .HasColumnType("character varying(16)") .HasColumnName("PhoneNumber"); b.Property("PhoneNumberConfirmed") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("PhoneNumberConfirmed"); b.Property("SecurityStamp") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)") + .HasColumnType("character varying(256)") .HasColumnName("SecurityStamp"); b.Property("Surname") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") + .HasColumnType("character varying(64)") .HasColumnName("Surname"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("TwoFactorEnabled") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("TwoFactorEnabled"); b.Property("UserName") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)") + .HasColumnType("character varying(256)") .HasColumnName("UserName"); b.HasKey("Id"); @@ -403,23 +402,23 @@ namespace EShopOnAbp.IdentityService.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("ClaimType") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)"); b.Property("ClaimValue") .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); + .HasColumnType("character varying(1024)"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("UserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.HasKey("Id"); @@ -431,23 +430,23 @@ namespace EShopOnAbp.IdentityService.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => { b.Property("UserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("LoginProvider") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)"); b.Property("ProviderDisplayName") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)"); b.Property("ProviderKey") .IsRequired() .HasMaxLength(196) - .HasColumnType("nvarchar(196)"); + .HasColumnType("character varying(196)"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("UserId", "LoginProvider"); @@ -460,21 +459,21 @@ namespace EShopOnAbp.IdentityService.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => { b.Property("OrganizationUnitId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("UserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("CreationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("OrganizationUnitId", "UserId"); @@ -487,13 +486,13 @@ namespace EShopOnAbp.IdentityService.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => { b.Property("UserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("RoleId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("UserId", "RoleId"); @@ -506,22 +505,22 @@ namespace EShopOnAbp.IdentityService.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => { b.Property("UserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("LoginProvider") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)"); b.Property("Name") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("Value") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text"); b.HasKey("UserId", "LoginProvider", "Name"); @@ -531,65 +530,65 @@ namespace EShopOnAbp.IdentityService.Migrations modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Code") .IsRequired() .HasMaxLength(95) - .HasColumnType("nvarchar(95)") + .HasColumnType("character varying(95)") .HasColumnName("Code"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) - .HasColumnType("nvarchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("DisplayName") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)") + .HasColumnType("character varying(128)") .HasColumnName("DisplayName"); b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("ParentId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -604,21 +603,21 @@ namespace EShopOnAbp.IdentityService.Migrations modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => { b.Property("OrganizationUnitId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("RoleId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("CreationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("OrganizationUnitId", "RoleId"); @@ -631,70 +630,70 @@ namespace EShopOnAbp.IdentityService.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResource", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("AllowedAccessTokenSigningAlgorithms") .HasMaxLength(100) - .HasColumnType("nvarchar(100)"); + .HasColumnType("character varying(100)"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) - .HasColumnType("nvarchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("Description") .HasMaxLength(1000) - .HasColumnType("nvarchar(1000)"); + .HasColumnType("character varying(1000)"); b.Property("DisplayName") .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); + .HasColumnType("character varying(200)"); b.Property("Enabled") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("Name") .IsRequired() .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); + .HasColumnType("character varying(200)"); b.Property("ShowInDiscoveryDocument") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.HasKey("Id"); @@ -704,11 +703,11 @@ namespace EShopOnAbp.IdentityService.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b => { b.Property("ApiResourceId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Type") .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); + .HasColumnType("character varying(200)"); b.HasKey("ApiResourceId", "Type"); @@ -718,15 +717,15 @@ namespace EShopOnAbp.IdentityService.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceProperty", b => { b.Property("ApiResourceId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Key") .HasMaxLength(250) - .HasColumnType("nvarchar(250)"); + .HasColumnType("character varying(250)"); b.Property("Value") .HasMaxLength(2000) - .HasColumnType("nvarchar(2000)"); + .HasColumnType("character varying(2000)"); b.HasKey("ApiResourceId", "Key", "Value"); @@ -736,11 +735,11 @@ namespace EShopOnAbp.IdentityService.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceScope", b => { b.Property("ApiResourceId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Scope") .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); + .HasColumnType("character varying(200)"); b.HasKey("ApiResourceId", "Scope"); @@ -750,22 +749,22 @@ namespace EShopOnAbp.IdentityService.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceSecret", b => { b.Property("ApiResourceId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Type") .HasMaxLength(250) - .HasColumnType("nvarchar(250)"); + .HasColumnType("character varying(250)"); b.Property("Value") .HasMaxLength(4000) - .HasColumnType("nvarchar(4000)"); + .HasColumnType("character varying(4000)"); b.Property("Description") .HasMaxLength(1000) - .HasColumnType("nvarchar(1000)"); + .HasColumnType("character varying(1000)"); b.Property("Expiration") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.HasKey("ApiResourceId", "Type", "Value"); @@ -775,72 +774,72 @@ namespace EShopOnAbp.IdentityService.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScope", 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("CreationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("Description") .HasMaxLength(1000) - .HasColumnType("nvarchar(1000)"); + .HasColumnType("character varying(1000)"); b.Property("DisplayName") .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); + .HasColumnType("character varying(200)"); b.Property("Emphasize") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("Enabled") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("Name") .IsRequired() .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); + .HasColumnType("character varying(200)"); b.Property("Required") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("ShowInDiscoveryDocument") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.HasKey("Id"); @@ -850,11 +849,11 @@ namespace EShopOnAbp.IdentityService.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScopeClaim", b => { b.Property("ApiScopeId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Type") .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); + .HasColumnType("character varying(200)"); b.HasKey("ApiScopeId", "Type"); @@ -864,15 +863,15 @@ namespace EShopOnAbp.IdentityService.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScopeProperty", b => { b.Property("ApiScopeId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Key") .HasMaxLength(250) - .HasColumnType("nvarchar(250)"); + .HasColumnType("character varying(250)"); b.Property("Value") .HasMaxLength(2000) - .HasColumnType("nvarchar(2000)"); + .HasColumnType("character varying(2000)"); b.HasKey("ApiScopeId", "Key", "Value"); @@ -882,178 +881,178 @@ namespace EShopOnAbp.IdentityService.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.Client", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("AbsoluteRefreshTokenLifetime") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("AccessTokenLifetime") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("AccessTokenType") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("AllowAccessTokensViaBrowser") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("AllowOfflineAccess") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("AllowPlainTextPkce") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("AllowRememberConsent") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("AllowedIdentityTokenSigningAlgorithms") .HasMaxLength(100) - .HasColumnType("nvarchar(100)"); + .HasColumnType("character varying(100)"); b.Property("AlwaysIncludeUserClaimsInIdToken") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("AlwaysSendClientClaims") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("AuthorizationCodeLifetime") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("BackChannelLogoutSessionRequired") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("BackChannelLogoutUri") .HasMaxLength(2000) - .HasColumnType("nvarchar(2000)"); + .HasColumnType("character varying(2000)"); b.Property("ClientClaimsPrefix") .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); + .HasColumnType("character varying(200)"); b.Property("ClientId") .IsRequired() .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); + .HasColumnType("character varying(200)"); b.Property("ClientName") .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); + .HasColumnType("character varying(200)"); b.Property("ClientUri") .HasMaxLength(2000) - .HasColumnType("nvarchar(2000)"); + .HasColumnType("character varying(2000)"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) - .HasColumnType("nvarchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("ConsentLifetime") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("CreationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("Description") .HasMaxLength(1000) - .HasColumnType("nvarchar(1000)"); + .HasColumnType("character varying(1000)"); b.Property("DeviceCodeLifetime") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("EnableLocalLogin") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("Enabled") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("FrontChannelLogoutSessionRequired") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("FrontChannelLogoutUri") .HasMaxLength(2000) - .HasColumnType("nvarchar(2000)"); + .HasColumnType("character varying(2000)"); b.Property("IdentityTokenLifetime") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("IncludeJwtId") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("LogoUri") .HasMaxLength(2000) - .HasColumnType("nvarchar(2000)"); + .HasColumnType("character varying(2000)"); b.Property("PairWiseSubjectSalt") .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); + .HasColumnType("character varying(200)"); b.Property("ProtocolType") .IsRequired() .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); + .HasColumnType("character varying(200)"); b.Property("RefreshTokenExpiration") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("RefreshTokenUsage") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("RequireClientSecret") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("RequireConsent") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("RequirePkce") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("RequireRequestObject") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("SlidingRefreshTokenLifetime") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("UpdateAccessTokenClaimsOnRefresh") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("UserCodeType") .HasMaxLength(100) - .HasColumnType("nvarchar(100)"); + .HasColumnType("character varying(100)"); b.Property("UserSsoLifetime") - .HasColumnType("int"); + .HasColumnType("integer"); b.HasKey("Id"); @@ -1065,15 +1064,15 @@ namespace EShopOnAbp.IdentityService.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientClaim", b => { b.Property("ClientId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Type") .HasMaxLength(250) - .HasColumnType("nvarchar(250)"); + .HasColumnType("character varying(250)"); b.Property("Value") .HasMaxLength(250) - .HasColumnType("nvarchar(250)"); + .HasColumnType("character varying(250)"); b.HasKey("ClientId", "Type", "Value"); @@ -1083,11 +1082,11 @@ namespace EShopOnAbp.IdentityService.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientCorsOrigin", b => { b.Property("ClientId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Origin") .HasMaxLength(150) - .HasColumnType("nvarchar(150)"); + .HasColumnType("character varying(150)"); b.HasKey("ClientId", "Origin"); @@ -1097,11 +1096,11 @@ namespace EShopOnAbp.IdentityService.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientGrantType", b => { b.Property("ClientId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("GrantType") .HasMaxLength(250) - .HasColumnType("nvarchar(250)"); + .HasColumnType("character varying(250)"); b.HasKey("ClientId", "GrantType"); @@ -1111,11 +1110,11 @@ namespace EShopOnAbp.IdentityService.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientIdPRestriction", b => { b.Property("ClientId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Provider") .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); + .HasColumnType("character varying(200)"); b.HasKey("ClientId", "Provider"); @@ -1125,11 +1124,11 @@ namespace EShopOnAbp.IdentityService.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientPostLogoutRedirectUri", b => { b.Property("ClientId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("PostLogoutRedirectUri") .HasMaxLength(2000) - .HasColumnType("nvarchar(2000)"); + .HasColumnType("character varying(2000)"); b.HasKey("ClientId", "PostLogoutRedirectUri"); @@ -1139,15 +1138,15 @@ namespace EShopOnAbp.IdentityService.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientProperty", b => { b.Property("ClientId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Key") .HasMaxLength(250) - .HasColumnType("nvarchar(250)"); + .HasColumnType("character varying(250)"); b.Property("Value") .HasMaxLength(2000) - .HasColumnType("nvarchar(2000)"); + .HasColumnType("character varying(2000)"); b.HasKey("ClientId", "Key", "Value"); @@ -1157,11 +1156,11 @@ namespace EShopOnAbp.IdentityService.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientRedirectUri", b => { b.Property("ClientId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("RedirectUri") .HasMaxLength(2000) - .HasColumnType("nvarchar(2000)"); + .HasColumnType("character varying(2000)"); b.HasKey("ClientId", "RedirectUri"); @@ -1171,11 +1170,11 @@ namespace EShopOnAbp.IdentityService.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientScope", b => { b.Property("ClientId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Scope") .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); + .HasColumnType("character varying(200)"); b.HasKey("ClientId", "Scope"); @@ -1185,22 +1184,22 @@ namespace EShopOnAbp.IdentityService.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientSecret", b => { b.Property("ClientId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Type") .HasMaxLength(250) - .HasColumnType("nvarchar(250)"); + .HasColumnType("character varying(250)"); b.Property("Value") .HasMaxLength(4000) - .HasColumnType("nvarchar(4000)"); + .HasColumnType("character varying(4000)"); b.Property("Description") .HasMaxLength(2000) - .HasColumnType("nvarchar(2000)"); + .HasColumnType("character varying(2000)"); b.Property("Expiration") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.HasKey("ClientId", "Type", "Value"); @@ -1210,61 +1209,61 @@ namespace EShopOnAbp.IdentityService.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Devices.DeviceFlowCodes", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("ClientId") .IsRequired() .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); + .HasColumnType("character varying(200)"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) - .HasColumnType("nvarchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("Data") .IsRequired() .HasMaxLength(50000) - .HasColumnType("nvarchar(max)"); + .HasColumnType("character varying(50000)"); b.Property("Description") .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); + .HasColumnType("character varying(200)"); b.Property("DeviceCode") .IsRequired() .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); + .HasColumnType("character varying(200)"); b.Property("Expiration") .IsRequired() - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("SessionId") .HasMaxLength(100) - .HasColumnType("nvarchar(100)"); + .HasColumnType("character varying(100)"); b.Property("SubjectId") .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); + .HasColumnType("character varying(200)"); b.Property("UserCode") .IsRequired() .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); + .HasColumnType("character varying(200)"); b.HasKey("Id"); @@ -1282,56 +1281,56 @@ namespace EShopOnAbp.IdentityService.Migrations { b.Property("Key") .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); + .HasColumnType("character varying(200)"); b.Property("ClientId") .IsRequired() .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); + .HasColumnType("character varying(200)"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) - .HasColumnType("nvarchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("ConsumedTime") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("Data") .IsRequired() .HasMaxLength(50000) - .HasColumnType("nvarchar(max)"); + .HasColumnType("character varying(50000)"); b.Property("Description") .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); + .HasColumnType("character varying(200)"); b.Property("Expiration") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("SessionId") .HasMaxLength(100) - .HasColumnType("nvarchar(100)"); + .HasColumnType("character varying(100)"); b.Property("SubjectId") .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); + .HasColumnType("character varying(200)"); b.Property("Type") .IsRequired() .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + .HasColumnType("character varying(50)"); b.HasKey("Key"); @@ -1347,72 +1346,72 @@ namespace EShopOnAbp.IdentityService.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", 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("CreationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("Description") .HasMaxLength(1000) - .HasColumnType("nvarchar(1000)"); + .HasColumnType("character varying(1000)"); b.Property("DisplayName") .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); + .HasColumnType("character varying(200)"); b.Property("Emphasize") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("Enabled") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("Name") .IsRequired() .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); + .HasColumnType("character varying(200)"); b.Property("Required") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("ShowInDiscoveryDocument") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.HasKey("Id"); @@ -1422,11 +1421,11 @@ namespace EShopOnAbp.IdentityService.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResourceClaim", b => { b.Property("IdentityResourceId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Type") .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); + .HasColumnType("character varying(200)"); b.HasKey("IdentityResourceId", "Type"); @@ -1436,15 +1435,15 @@ namespace EShopOnAbp.IdentityService.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResourceProperty", b => { b.Property("IdentityResourceId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Key") .HasMaxLength(250) - .HasColumnType("nvarchar(250)"); + .HasColumnType("character varying(250)"); b.Property("Value") .HasMaxLength(2000) - .HasColumnType("nvarchar(2000)"); + .HasColumnType("character varying(2000)"); b.HasKey("IdentityResourceId", "Key", "Value"); diff --git a/services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/appsettings.json b/services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/appsettings.json index 4b03f5f5..05de07d2 100644 --- a/services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/appsettings.json +++ b/services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/appsettings.json @@ -18,9 +18,8 @@ }, "AllowedHosts": "*", "ConnectionStrings": { - "IdentityService": "Server=localhost,1434;Database=EShopOnAbp_Identity;User Id=sa;password=myPassw0rd", - "AdministrationService": "Server=localhost,1434;Database=EShopOnAbp_Administration;User Id=sa;password=myPassw0rd", - "SaasService": "Server=localhost,1434;Database=EShopOnAbp_Saas;User Id=sa;password=myPassw0rd" + "IdentityService": "User ID=postgres;Password=myPassw0rd;Host=localhost;Port=5432;Database=EShopOnAbp_Identity;Pooling=false;", + "AdministrationService": "User ID=postgres;Password=myPassw0rd;Host=localhost;Port=5432;Database=EShopOnAbp_Administration;Pooling=false;" }, "StringEncryption": { "DefaultPassPhrase": "gsKnGZ041HLL4IM8" From 2739b89493908329024400da73c4e3d00a97051f Mon Sep 17 00:00:00 2001 From: enisn Date: Thu, 25 Nov 2021 16:09:55 +0300 Subject: [PATCH 6/9] Change database provider to PostgreSQL for Ordering Service --- ...pOnAbp.OrderingService.EntityFrameworkCore.csproj | 2 +- .../OrderingServiceDbContextFactory.cs | 7 ++++++- .../OrderingServiceEntityFrameworkCoreModule.cs | 9 ++++++--- ...esigner.cs => 20211125130659_Initial.Designer.cs} | 12 ++++++------ ...12121150_Initial.cs => 20211125130659_Initial.cs} | 0 .../OrderingServiceDbContextModelSnapshot.cs | 10 +++++----- .../appsettings.json | 4 ++-- 7 files changed, 26 insertions(+), 18 deletions(-) rename services/ordering/src/EShopOnAbp.OrderingService.EntityFrameworkCore/Migrations/{20211012121150_Initial.Designer.cs => 20211125130659_Initial.Designer.cs} (73%) rename services/ordering/src/EShopOnAbp.OrderingService.EntityFrameworkCore/Migrations/{20211012121150_Initial.cs => 20211125130659_Initial.cs} (100%) diff --git a/services/ordering/src/EShopOnAbp.OrderingService.EntityFrameworkCore/EShopOnAbp.OrderingService.EntityFrameworkCore.csproj b/services/ordering/src/EShopOnAbp.OrderingService.EntityFrameworkCore/EShopOnAbp.OrderingService.EntityFrameworkCore.csproj index 4cc80b83..22746939 100644 --- a/services/ordering/src/EShopOnAbp.OrderingService.EntityFrameworkCore/EShopOnAbp.OrderingService.EntityFrameworkCore.csproj +++ b/services/ordering/src/EShopOnAbp.OrderingService.EntityFrameworkCore/EShopOnAbp.OrderingService.EntityFrameworkCore.csproj @@ -9,7 +9,7 @@ - + diff --git a/services/ordering/src/EShopOnAbp.OrderingService.EntityFrameworkCore/EntityFrameworkCore/OrderingServiceDbContextFactory.cs b/services/ordering/src/EShopOnAbp.OrderingService.EntityFrameworkCore/EntityFrameworkCore/OrderingServiceDbContextFactory.cs index 4ad9d674..6f0dc5d1 100644 --- a/services/ordering/src/EShopOnAbp.OrderingService.EntityFrameworkCore/EntityFrameworkCore/OrderingServiceDbContextFactory.cs +++ b/services/ordering/src/EShopOnAbp.OrderingService.EntityFrameworkCore/EntityFrameworkCore/OrderingServiceDbContextFactory.cs @@ -16,7 +16,12 @@ namespace EShopOnAbp.OrderingService.EntityFrameworkCore var configuration = BuildConfiguration(); var builder = new DbContextOptionsBuilder() - .UseSqlServer(configuration.GetConnectionString("Default")); + .UseNpgsql( + configuration.GetConnectionString(OrderingServiceDbProperties.ConnectionStringName), + b => + { + b.MigrationsHistoryTable("__OrderingService_Migrations"); + }); return new OrderingServiceDbContext(builder.Options); } diff --git a/services/ordering/src/EShopOnAbp.OrderingService.EntityFrameworkCore/EntityFrameworkCore/OrderingServiceEntityFrameworkCoreModule.cs b/services/ordering/src/EShopOnAbp.OrderingService.EntityFrameworkCore/EntityFrameworkCore/OrderingServiceEntityFrameworkCoreModule.cs index 008e820c..c1042014 100644 --- a/services/ordering/src/EShopOnAbp.OrderingService.EntityFrameworkCore/EntityFrameworkCore/OrderingServiceEntityFrameworkCoreModule.cs +++ b/services/ordering/src/EShopOnAbp.OrderingService.EntityFrameworkCore/EntityFrameworkCore/OrderingServiceEntityFrameworkCoreModule.cs @@ -1,13 +1,13 @@ using Microsoft.Extensions.DependencyInjection; using Volo.Abp.EntityFrameworkCore; -using Volo.Abp.EntityFrameworkCore.SqlServer; +using Volo.Abp.EntityFrameworkCore.PostgreSql; using Volo.Abp.Modularity; namespace EShopOnAbp.OrderingService.EntityFrameworkCore { [DependsOn( typeof(OrderingServiceDomainModule), - typeof(AbpEntityFrameworkCoreSqlServerModule) + typeof(AbpEntityFrameworkCorePostgreSqlModule) )] public class OrderingServiceEntityFrameworkCoreModule : AbpModule { @@ -29,7 +29,10 @@ namespace EShopOnAbp.OrderingService.EntityFrameworkCore { /* The main point to change your DBMS. * See also OrderingServiceMigrationsDbContextFactory for EF Core tooling. */ - options.UseSqlServer(); + options.UseNpgsql(b => + { + b.MigrationsHistoryTable("__OrderingService_Migrations"); + }); }); } } diff --git a/services/ordering/src/EShopOnAbp.OrderingService.EntityFrameworkCore/Migrations/20211012121150_Initial.Designer.cs b/services/ordering/src/EShopOnAbp.OrderingService.EntityFrameworkCore/Migrations/20211125130659_Initial.Designer.cs similarity index 73% rename from services/ordering/src/EShopOnAbp.OrderingService.EntityFrameworkCore/Migrations/20211012121150_Initial.Designer.cs rename to services/ordering/src/EShopOnAbp.OrderingService.EntityFrameworkCore/Migrations/20211125130659_Initial.Designer.cs index 6a8184bf..d777f5c4 100644 --- a/services/ordering/src/EShopOnAbp.OrderingService.EntityFrameworkCore/Migrations/20211012121150_Initial.Designer.cs +++ b/services/ordering/src/EShopOnAbp.OrderingService.EntityFrameworkCore/Migrations/20211125130659_Initial.Designer.cs @@ -2,9 +2,9 @@ using EShopOnAbp.OrderingService.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 @@ -12,18 +12,18 @@ using Volo.Abp.EntityFrameworkCore; namespace EShopOnAbp.OrderingService.Migrations { [DbContext(typeof(OrderingServiceDbContext))] - [Migration("20211012121150_Initial")] + [Migration("20211125130659_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); #pragma warning restore 612, 618 } } diff --git a/services/ordering/src/EShopOnAbp.OrderingService.EntityFrameworkCore/Migrations/20211012121150_Initial.cs b/services/ordering/src/EShopOnAbp.OrderingService.EntityFrameworkCore/Migrations/20211125130659_Initial.cs similarity index 100% rename from services/ordering/src/EShopOnAbp.OrderingService.EntityFrameworkCore/Migrations/20211012121150_Initial.cs rename to services/ordering/src/EShopOnAbp.OrderingService.EntityFrameworkCore/Migrations/20211125130659_Initial.cs diff --git a/services/ordering/src/EShopOnAbp.OrderingService.EntityFrameworkCore/Migrations/OrderingServiceDbContextModelSnapshot.cs b/services/ordering/src/EShopOnAbp.OrderingService.EntityFrameworkCore/Migrations/OrderingServiceDbContextModelSnapshot.cs index 59bd1666..727a995f 100644 --- a/services/ordering/src/EShopOnAbp.OrderingService.EntityFrameworkCore/Migrations/OrderingServiceDbContextModelSnapshot.cs +++ b/services/ordering/src/EShopOnAbp.OrderingService.EntityFrameworkCore/Migrations/OrderingServiceDbContextModelSnapshot.cs @@ -2,8 +2,8 @@ using EShopOnAbp.OrderingService.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 @@ -17,11 +17,11 @@ namespace EShopOnAbp.OrderingService.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); #pragma warning restore 612, 618 } } diff --git a/services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host/appsettings.json b/services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host/appsettings.json index 450518aa..b83b13d0 100644 --- a/services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host/appsettings.json +++ b/services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host/appsettings.json @@ -18,8 +18,8 @@ }, "AllowedHosts": "*", "ConnectionStrings": { - "OrderingService": "Server=localhost,1434;Database=EShopOnAbp_Ordering;User Id=sa;password=myPassw0rd;MultipleActiveResultSets=true", - "AdministrationService": "Server=localhost,1434;Database=EShopOnAbp_Administration;User Id=sa;password=myPassw0rd;MultipleActiveResultSets=true" + "OrderingService": "User ID=postgres;Password=myPassw0rd;Host=localhost;Port=5432;Database=EShopOnAbp_Ordering;Pooling=false", + "AdministrationService": "User ID=postgres;Password=myPassw0rd;Host=localhost;Port=5432;Database=EShopOnAbp_Administration;Pooling=false;" }, "StringEncryption": { "DefaultPassPhrase": "0f000WgRXnVk0704" From b7a047fe9cda1ec314ddd8e008a1781087c58177 Mon Sep 17 00:00:00 2001 From: enisn Date: Thu, 25 Nov 2021 16:15:18 +0300 Subject: [PATCH 7/9] Change database provider to PostgreSQL for Payment Service --- ...opOnAbp.PaymentService.EntityFrameworkCore.csproj | 2 +- .../PaymentServiceDbContextFactory.cs | 7 ++++++- .../PaymentServiceEntityFrameworkCoreModule.cs | 9 ++++++--- ...esigner.cs => 20211125131248_Initial.Designer.cs} | 12 ++++++------ ...13122454_Initial.cs => 20211125131248_Initial.cs} | 0 .../PaymentServiceDbContextModelSnapshot.cs | 10 +++++----- .../appsettings.json | 4 ++-- 7 files changed, 26 insertions(+), 18 deletions(-) rename services/payment/src/EShopOnAbp.PaymentService.EntityFrameworkCore/Migrations/{20211013122454_Initial.Designer.cs => 20211125131248_Initial.Designer.cs} (73%) rename services/payment/src/EShopOnAbp.PaymentService.EntityFrameworkCore/Migrations/{20211013122454_Initial.cs => 20211125131248_Initial.cs} (100%) diff --git a/services/payment/src/EShopOnAbp.PaymentService.EntityFrameworkCore/EShopOnAbp.PaymentService.EntityFrameworkCore.csproj b/services/payment/src/EShopOnAbp.PaymentService.EntityFrameworkCore/EShopOnAbp.PaymentService.EntityFrameworkCore.csproj index f647bbeb..f0f9d1ac 100644 --- a/services/payment/src/EShopOnAbp.PaymentService.EntityFrameworkCore/EShopOnAbp.PaymentService.EntityFrameworkCore.csproj +++ b/services/payment/src/EShopOnAbp.PaymentService.EntityFrameworkCore/EShopOnAbp.PaymentService.EntityFrameworkCore.csproj @@ -9,7 +9,7 @@ - + diff --git a/services/payment/src/EShopOnAbp.PaymentService.EntityFrameworkCore/EntityFrameworkCore/PaymentServiceDbContextFactory.cs b/services/payment/src/EShopOnAbp.PaymentService.EntityFrameworkCore/EntityFrameworkCore/PaymentServiceDbContextFactory.cs index 885e3803..6f280a6c 100644 --- a/services/payment/src/EShopOnAbp.PaymentService.EntityFrameworkCore/EntityFrameworkCore/PaymentServiceDbContextFactory.cs +++ b/services/payment/src/EShopOnAbp.PaymentService.EntityFrameworkCore/EntityFrameworkCore/PaymentServiceDbContextFactory.cs @@ -16,7 +16,12 @@ namespace EShopOnAbp.PaymentService.EntityFrameworkCore var configuration = BuildConfiguration(); var builder = new DbContextOptionsBuilder() - .UseSqlServer(configuration.GetConnectionString(PaymentServiceDbProperties.ConnectionStringName)); + .UseNpgsql( + configuration.GetConnectionString(PaymentServiceDbProperties.ConnectionStringName), + b => + { + b.MigrationsHistoryTable("__PaymentService_Migrations"); + }); return new PaymentServiceDbContext(builder.Options); } diff --git a/services/payment/src/EShopOnAbp.PaymentService.EntityFrameworkCore/EntityFrameworkCore/PaymentServiceEntityFrameworkCoreModule.cs b/services/payment/src/EShopOnAbp.PaymentService.EntityFrameworkCore/EntityFrameworkCore/PaymentServiceEntityFrameworkCoreModule.cs index 9e1ee693..3d0f2e05 100644 --- a/services/payment/src/EShopOnAbp.PaymentService.EntityFrameworkCore/EntityFrameworkCore/PaymentServiceEntityFrameworkCoreModule.cs +++ b/services/payment/src/EShopOnAbp.PaymentService.EntityFrameworkCore/EntityFrameworkCore/PaymentServiceEntityFrameworkCoreModule.cs @@ -1,13 +1,13 @@ using Microsoft.Extensions.DependencyInjection; using Volo.Abp.EntityFrameworkCore; -using Volo.Abp.EntityFrameworkCore.SqlServer; +using Volo.Abp.EntityFrameworkCore.PostgreSql; using Volo.Abp.Modularity; namespace EShopOnAbp.PaymentService.EntityFrameworkCore { [DependsOn( typeof(PaymentServiceDomainModule), - typeof(AbpEntityFrameworkCoreSqlServerModule) + typeof(AbpEntityFrameworkCorePostgreSqlModule) )] public class PaymentServiceEntityFrameworkCoreModule : AbpModule { @@ -29,7 +29,10 @@ namespace EShopOnAbp.PaymentService.EntityFrameworkCore { /* The main point to change your DBMS. * See also PaymentServiceMigrationsDbContextFactory for EF Core tooling. */ - options.UseSqlServer(); + options.UseNpgsql(b => + { + b.MigrationsHistoryTable("__PaymentService_Migrations"); + }); }); } } diff --git a/services/payment/src/EShopOnAbp.PaymentService.EntityFrameworkCore/Migrations/20211013122454_Initial.Designer.cs b/services/payment/src/EShopOnAbp.PaymentService.EntityFrameworkCore/Migrations/20211125131248_Initial.Designer.cs similarity index 73% rename from services/payment/src/EShopOnAbp.PaymentService.EntityFrameworkCore/Migrations/20211013122454_Initial.Designer.cs rename to services/payment/src/EShopOnAbp.PaymentService.EntityFrameworkCore/Migrations/20211125131248_Initial.Designer.cs index 3b6d2221..8d8560b6 100644 --- a/services/payment/src/EShopOnAbp.PaymentService.EntityFrameworkCore/Migrations/20211013122454_Initial.Designer.cs +++ b/services/payment/src/EShopOnAbp.PaymentService.EntityFrameworkCore/Migrations/20211125131248_Initial.Designer.cs @@ -2,9 +2,9 @@ using EShopOnAbp.PaymentService.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 @@ -12,18 +12,18 @@ using Volo.Abp.EntityFrameworkCore; namespace EShopOnAbp.PaymentService.Migrations { [DbContext(typeof(PaymentServiceDbContext))] - [Migration("20211013122454_Initial")] + [Migration("20211125131248_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.2.21480.5") - .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); #pragma warning restore 612, 618 } } diff --git a/services/payment/src/EShopOnAbp.PaymentService.EntityFrameworkCore/Migrations/20211013122454_Initial.cs b/services/payment/src/EShopOnAbp.PaymentService.EntityFrameworkCore/Migrations/20211125131248_Initial.cs similarity index 100% rename from services/payment/src/EShopOnAbp.PaymentService.EntityFrameworkCore/Migrations/20211013122454_Initial.cs rename to services/payment/src/EShopOnAbp.PaymentService.EntityFrameworkCore/Migrations/20211125131248_Initial.cs diff --git a/services/payment/src/EShopOnAbp.PaymentService.EntityFrameworkCore/Migrations/PaymentServiceDbContextModelSnapshot.cs b/services/payment/src/EShopOnAbp.PaymentService.EntityFrameworkCore/Migrations/PaymentServiceDbContextModelSnapshot.cs index e31cd181..6894351b 100644 --- a/services/payment/src/EShopOnAbp.PaymentService.EntityFrameworkCore/Migrations/PaymentServiceDbContextModelSnapshot.cs +++ b/services/payment/src/EShopOnAbp.PaymentService.EntityFrameworkCore/Migrations/PaymentServiceDbContextModelSnapshot.cs @@ -2,8 +2,8 @@ using EShopOnAbp.PaymentService.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 @@ -17,11 +17,11 @@ namespace EShopOnAbp.PaymentService.Migrations { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) - .HasAnnotation("ProductVersion", "6.0.0-rc.2.21480.5") - .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); #pragma warning restore 612, 618 } } diff --git a/services/payment/src/EShopOnAbp.PaymentService.HttpApi.Host/appsettings.json b/services/payment/src/EShopOnAbp.PaymentService.HttpApi.Host/appsettings.json index e26f48a0..a196a0ba 100644 --- a/services/payment/src/EShopOnAbp.PaymentService.HttpApi.Host/appsettings.json +++ b/services/payment/src/EShopOnAbp.PaymentService.HttpApi.Host/appsettings.json @@ -18,8 +18,8 @@ }, "AllowedHosts": "*", "ConnectionStrings": { - "PaymentService": "Server=localhost,1434;Database=EShopOnAbp_Payment;User Id=sa;password=myPassw0rd;MultipleActiveResultSets=true", - "AdministrationService": "Server=localhost,1434;Database=EShopOnAbp_Administration;User Id=sa;password=myPassw0rd;MultipleActiveResultSets=true" + "PaymentService": "User ID=postgres;Password=myPassw0rd;Host=localhost;Port=5432;Database=EShopOnAbp_Payment;Pooling=false;", + "AdministrationService": "User ID=postgres;Password=myPassw0rd;Host=localhost;Port=5432;Database=EShopOnAbp_Administration;Pooling=false;" }, "StringEncryption": { "DefaultPassPhrase": "abc55ABArnzv0407" From fdf9aac301f535e5daaf7087f663e2c802c88318 Mon Sep 17 00:00:00 2001 From: enisn Date: Thu, 25 Nov 2021 16:16:24 +0300 Subject: [PATCH 8/9] Update connectionstrings of auth-server --- apps/auth-server/src/EShopOnAbp.AuthServer/appsettings.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/auth-server/src/EShopOnAbp.AuthServer/appsettings.json b/apps/auth-server/src/EShopOnAbp.AuthServer/appsettings.json index cecca953..42d2325f 100644 --- a/apps/auth-server/src/EShopOnAbp.AuthServer/appsettings.json +++ b/apps/auth-server/src/EShopOnAbp.AuthServer/appsettings.json @@ -13,8 +13,8 @@ }, "AllowedHosts": "*", "ConnectionStrings": { - "IdentityService": "Server=localhost,1434;Database=EShopOnAbp_Identity;User Id=sa;password=myPassw0rd;MultipleActiveResultSets=true", - "AdministrationService": "Server=localhost,1434;Database=EShopOnAbp_Administration;User Id=sa;password=myPassw0rd;MultipleActiveResultSets=true" + "IdentityService": "User ID=postgres;Password=myPassw0rd;Host=localhost;Port=5432;Database=EShopOnAbp_Identity;Pooling=false;", + "AdministrationService": "User ID=postgres;Password=myPassw0rd;Host=localhost;Port=5432;Database=EShopOnAbp_Administration;Pooling=false;" }, "StringEncryption": { "DefaultPassPhrase": "gsKnGZ041HLL4IM8" From 477872008bff3df6a46cdcb9a7612c4105afdb91 Mon Sep 17 00:00:00 2001 From: Galip Tolga Erdem Date: Fri, 26 Nov 2021 16:34:03 +0300 Subject: [PATCH 9/9] added pgadmin and fixed tye script --- .../docker-compose.infrastructure.override.yml | 7 +++++++ etc/docker/docker-compose.infrastructure.yml | 15 ++++++++++++--- run-tye.ps1 | 2 +- 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/etc/docker/docker-compose.infrastructure.override.yml b/etc/docker/docker-compose.infrastructure.override.yml index fed3bf2c..9a7c285a 100644 --- a/etc/docker/docker-compose.infrastructure.override.yml +++ b/etc/docker/docker-compose.infrastructure.override.yml @@ -15,3 +15,10 @@ services: - "5432:5432" environment: POSTGRES_PASSWORD: "myPassw0rd" + + pgadmin: + ports: + - "${PGADMIN_PORT:-5050}:80" + environment: + PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL:-pgadmin4@pgadmin.org} + PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD:-admin} diff --git a/etc/docker/docker-compose.infrastructure.yml b/etc/docker/docker-compose.infrastructure.yml index 7f561838..3eea4369 100644 --- a/etc/docker/docker-compose.infrastructure.yml +++ b/etc/docker/docker-compose.infrastructure.yml @@ -17,12 +17,21 @@ services: container_name: postgres-db image: postgres:14.1 volumes: - - sqldata:/var/opt/postgres + - postgres_data:/var/opt/postgres networks: - eshoponabp-network - + + pgadmin: + container_name: pgadmin_container + image: dpage/pgadmin4:6.2 + volumes: + - pgadmin_data:/var/lib/pgadmin + networks: + - eshoponabp-network + volumes: - sqldata: + postgres_data: + pgadmin_data: networks: eshoponabp-network: diff --git a/run-tye.ps1 b/run-tye.ps1 index dde3af14..27dd2bdf 100644 --- a/run-tye.ps1 +++ b/run-tye.ps1 @@ -12,7 +12,7 @@ if (! ( Test-Path ".\etc\dev-cert\localhost.pfx" -PathType Leaf ) ){ docker network create eshoponabp-network $requiredServices = @( - 'sql-server-db', + 'postgres-db', 'rabbitmq', 'redis' )