From a87c06c2ffd3e104438075c5af6bf1000d7e8204 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sedat=20=C3=96ZT=C3=9CRK?= <76204082+iamsedatozturk@users.noreply.github.com> Date: Mon, 2 Mar 2026 14:25:00 +0300 Subject: [PATCH] =?UTF-8?q?TablePrefix=20d=C3=BCzenlemesi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SqlQueryManagerDbProperties.cs | 2 +- .../TableNameResolver.cs | 14 +- .../Entities/Host/Definitions/Sector.cs | 6 +- ....cs => 20260302111924_Initial.Designer.cs} | 27 +- ...3_Initial.cs => 20260302111924_Initial.cs} | 877 +++++++++--------- .../PlatformDbContextModelSnapshot.cs | 25 +- 6 files changed, 470 insertions(+), 481 deletions(-) rename api/src/Sozsoft.Platform.EntityFrameworkCore/Migrations/{20260301215123_Initial.Designer.cs => 20260302111924_Initial.Designer.cs} (99%) rename api/src/Sozsoft.Platform.EntityFrameworkCore/Migrations/{20260301215123_Initial.cs => 20260302111924_Initial.cs} (97%) diff --git a/api/modules/Sozsoft.SqlQueryManager/Sozsoft.SqlQueryManager.Domain/SqlQueryManagerDbProperties.cs b/api/modules/Sozsoft.SqlQueryManager/Sozsoft.SqlQueryManager.Domain/SqlQueryManagerDbProperties.cs index 06ba53e..3ab31fa 100644 --- a/api/modules/Sozsoft.SqlQueryManager/Sozsoft.SqlQueryManager.Domain/SqlQueryManagerDbProperties.cs +++ b/api/modules/Sozsoft.SqlQueryManager/Sozsoft.SqlQueryManager.Domain/SqlQueryManagerDbProperties.cs @@ -2,7 +2,7 @@ public static class Prefix { - public static string MenuPrefix { get; set; } = "Sas"; + public static string MenuPrefix { get; set; } = "Adm"; public static string HostPrefix { get; set; } = "T"; public static string? DbSchema { get; set; } = null; diff --git a/api/src/Sozsoft.Platform.Domain.Shared/TableNameResolver.cs b/api/src/Sozsoft.Platform.Domain.Shared/TableNameResolver.cs index c47981a..651f070 100644 --- a/api/src/Sozsoft.Platform.Domain.Shared/TableNameResolver.cs +++ b/api/src/Sozsoft.Platform.Domain.Shared/TableNameResolver.cs @@ -33,13 +33,13 @@ public static class TableNameResolver { nameof(TableNameEnum.BackgroundWorker_MailQueue), (TablePrefix.PlatformByName, MenuPrefix.Saas) }, { nameof(TableNameEnum.BackgroundWorker_MailQueueEvents), (TablePrefix.PlatformByName, MenuPrefix.Saas) }, { nameof(TableNameEnum.BackgroundWorker_MailQueueTableFormat), (TablePrefix.PlatformByName, MenuPrefix.Saas) }, - { nameof(TableNameEnum.ForumCategory), (TablePrefix.PlatformByName, MenuPrefix.Saas) }, - { nameof(TableNameEnum.ForumTopic), (TablePrefix.PlatformByName, MenuPrefix.Saas) }, - { nameof(TableNameEnum.ForumPost), (TablePrefix.PlatformByName, MenuPrefix.Saas) }, + { nameof(TableNameEnum.ForumCategory), (TablePrefix.TenantByName, MenuPrefix.Saas) }, + { nameof(TableNameEnum.ForumTopic), (TablePrefix.TenantByName, MenuPrefix.Saas) }, + { nameof(TableNameEnum.ForumPost), (TablePrefix.TenantByName, MenuPrefix.Saas) }, // 🔹 ADMINISTRATION TABLOLARI { nameof(TableNameEnum.ContactTitle), (TablePrefix.PlatformByName, MenuPrefix.Administration) }, - { nameof(TableNameEnum.Sector), (TablePrefix.TenantByName, MenuPrefix.Administration) }, + { nameof(TableNameEnum.Sector), (TablePrefix.PlatformByName, MenuPrefix.Administration) }, { nameof(TableNameEnum.Currency), (TablePrefix.PlatformByName, MenuPrefix.Administration) }, { nameof(TableNameEnum.CountryGroup), (TablePrefix.PlatformByName, MenuPrefix.Administration) }, { nameof(TableNameEnum.Country), (TablePrefix.PlatformByName, MenuPrefix.Administration) }, @@ -51,7 +51,7 @@ public static class TableNameResolver { nameof(TableNameEnum.SkillLevel), (TablePrefix.TenantByName, MenuPrefix.Administration) }, { nameof(TableNameEnum.UomCategory), (TablePrefix.TenantByName, MenuPrefix.Administration) }, { nameof(TableNameEnum.Uom), (TablePrefix.TenantByName, MenuPrefix.Administration) }, - { nameof(TableNameEnum.IpRestriction), (TablePrefix.TenantByName, MenuPrefix.Saas) }, + { nameof(TableNameEnum.IpRestriction), (TablePrefix.TenantByName, MenuPrefix.Administration) }, { nameof(TableNameEnum.About), (TablePrefix.TenantByName, MenuPrefix.Administration) }, { nameof(TableNameEnum.Service), (TablePrefix.TenantByName, MenuPrefix.Administration) }, { nameof(TableNameEnum.Product), (TablePrefix.TenantByName, MenuPrefix.Administration) }, @@ -63,8 +63,8 @@ public static class TableNameResolver { nameof(TableNameEnum.BlogPost), (TablePrefix.TenantByName, MenuPrefix.Administration) }, { nameof(TableNameEnum.Demo), (TablePrefix.TenantByName, MenuPrefix.Administration) }, { nameof(TableNameEnum.Contact), (TablePrefix.TenantByName, MenuPrefix.Administration) }, - { nameof(TableNameEnum.Route), (TablePrefix.PlatformByName, MenuPrefix.Administration) }, - { nameof(TableNameEnum.Menu), (TablePrefix.PlatformByName, MenuPrefix.Administration) }, + { nameof(TableNameEnum.Route), (TablePrefix.TenantByName, MenuPrefix.Administration) }, + { nameof(TableNameEnum.Menu), (TablePrefix.TenantByName, MenuPrefix.Administration) }, { nameof(TableNameEnum.Note), (TablePrefix.TenantByName, MenuPrefix.Administration) }, { nameof(TableNameEnum.ReportCategory), (TablePrefix.TenantByName, MenuPrefix.Administration) }, { nameof(TableNameEnum.ReportTemplate), (TablePrefix.TenantByName, MenuPrefix.Administration) }, diff --git a/api/src/Sozsoft.Platform.Domain/Entities/Host/Definitions/Sector.cs b/api/src/Sozsoft.Platform.Domain/Entities/Host/Definitions/Sector.cs index 9375544..370582c 100644 --- a/api/src/Sozsoft.Platform.Domain/Entities/Host/Definitions/Sector.cs +++ b/api/src/Sozsoft.Platform.Domain/Entities/Host/Definitions/Sector.cs @@ -1,13 +1,9 @@ -using System; -using System.Collections.Generic; -using Volo.Abp.Domain.Entities.Auditing; +using Volo.Abp.Domain.Entities.Auditing; namespace Sozsoft.Platform.Entities; public class Sector : FullAuditedEntity { - public Guid? TenantId { get; set; } - public string Name { get; set; } public Sector(string id) diff --git a/api/src/Sozsoft.Platform.EntityFrameworkCore/Migrations/20260301215123_Initial.Designer.cs b/api/src/Sozsoft.Platform.EntityFrameworkCore/Migrations/20260302111924_Initial.Designer.cs similarity index 99% rename from api/src/Sozsoft.Platform.EntityFrameworkCore/Migrations/20260301215123_Initial.Designer.cs rename to api/src/Sozsoft.Platform.EntityFrameworkCore/Migrations/20260302111924_Initial.Designer.cs index 1840057..e9d7457 100644 --- a/api/src/Sozsoft.Platform.EntityFrameworkCore/Migrations/20260301215123_Initial.Designer.cs +++ b/api/src/Sozsoft.Platform.EntityFrameworkCore/Migrations/20260302111924_Initial.Designer.cs @@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore; namespace Sozsoft.Platform.Migrations { [DbContext(typeof(PlatformDbContext))] - [Migration("20260301215123_Initial")] + [Migration("20260302111924_Initial")] partial class Initial { /// @@ -2069,7 +2069,7 @@ namespace Sozsoft.Platform.Migrations b.HasKey("Id"); - b.ToTable("Sas_T_IpRestriction", (string)null); + b.ToTable("Adm_T_IpRestriction", (string)null); }); modelBuilder.Entity("Sozsoft.Platform.Entities.ListForm", b => @@ -2890,7 +2890,7 @@ namespace Sozsoft.Platform.Migrations b.HasKey("Id"); - b.ToTable("Adm_H_Menu", (string)null); + b.ToTable("Adm_T_Menu", (string)null); }); modelBuilder.Entity("Sozsoft.Platform.Entities.Note", b => @@ -3488,7 +3488,7 @@ namespace Sozsoft.Platform.Migrations b.HasIndex("Key") .IsUnique(); - b.ToTable("Adm_H_Route", (string)null); + b.ToTable("Adm_T_Route", (string)null); }); modelBuilder.Entity("Sozsoft.Platform.Entities.Sector", b => @@ -3532,12 +3532,9 @@ namespace Sozsoft.Platform.Migrations .HasMaxLength(128) .HasColumnType("nvarchar(128)"); - b.Property("TenantId") - .HasColumnType("uniqueidentifier"); - b.HasKey("Id"); - b.ToTable("Adm_T_Sector", (string)null); + b.ToTable("Adm_H_Sector", (string)null); }); modelBuilder.Entity("Sozsoft.Platform.Entities.Service", b => @@ -4220,7 +4217,7 @@ namespace Sozsoft.Platform.Migrations b.HasIndex("DisplayOrder"); - b.ToTable("Sas_H_ForumCategory", (string)null); + b.ToTable("Sas_T_ForumCategory", (string)null); }); modelBuilder.Entity("Sozsoft.Platform.Forum.ForumPost", b => @@ -4290,7 +4287,7 @@ namespace Sozsoft.Platform.Migrations b.HasIndex("TopicId"); - b.ToTable("Sas_H_ForumPost", (string)null); + b.ToTable("Sas_T_ForumPost", (string)null); }); modelBuilder.Entity("Sozsoft.Platform.Forum.ForumTopic", b => @@ -4389,7 +4386,7 @@ namespace Sozsoft.Platform.Migrations b.HasIndex("LastPostDate"); - b.ToTable("Sas_H_ForumTopic", (string)null); + b.ToTable("Sas_T_ForumTopic", (string)null); }); modelBuilder.Entity("Sozsoft.Settings.Entities.SettingDefinition", b => @@ -4594,7 +4591,7 @@ namespace Sozsoft.Platform.Migrations b.HasIndex("SchemaName", "FunctionName"); - b.ToTable("Sas_T_SqlFunction", (string)null); + b.ToTable("Adm_T_SqlFunction", (string)null); }); modelBuilder.Entity("Sozsoft.SqlQueryManager.Domain.Entities.SqlQuery", b => @@ -4694,7 +4691,7 @@ namespace Sozsoft.Platform.Migrations b.HasIndex("Status"); - b.ToTable("Sas_T_SqlQuery", (string)null); + b.ToTable("Adm_T_SqlQuery", (string)null); }); modelBuilder.Entity("Sozsoft.SqlQueryManager.Domain.Entities.SqlStoredProcedure", b => @@ -4792,7 +4789,7 @@ namespace Sozsoft.Platform.Migrations b.HasIndex("SchemaName", "ProcedureName"); - b.ToTable("Sas_T_SqlStoredProcedure", (string)null); + b.ToTable("Adm_T_SqlStoredProcedure", (string)null); }); modelBuilder.Entity("Sozsoft.SqlQueryManager.Domain.Entities.SqlView", b => @@ -4889,7 +4886,7 @@ namespace Sozsoft.Platform.Migrations b.HasIndex("SchemaName", "ViewName"); - b.ToTable("Sas_T_SqlView", (string)null); + b.ToTable("Adm_T_SqlView", (string)null); }); modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => diff --git a/api/src/Sozsoft.Platform.EntityFrameworkCore/Migrations/20260301215123_Initial.cs b/api/src/Sozsoft.Platform.EntityFrameworkCore/Migrations/20260302111924_Initial.cs similarity index 97% rename from api/src/Sozsoft.Platform.EntityFrameworkCore/Migrations/20260301215123_Initial.cs rename to api/src/Sozsoft.Platform.EntityFrameworkCore/Migrations/20260302111924_Initial.cs index 69d26b1..393d57e 100644 --- a/api/src/Sozsoft.Platform.EntityFrameworkCore/Migrations/20260301215123_Initial.cs +++ b/api/src/Sozsoft.Platform.EntityFrameworkCore/Migrations/20260302111924_Initial.cs @@ -498,26 +498,11 @@ namespace Sozsoft.Platform.Migrations }); migrationBuilder.CreateTable( - name: "Adm_H_Menu", + name: "Adm_H_Sector", columns: table => new { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Code = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - DisplayName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - Order = table.Column(type: "int", nullable: false), - Url = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - Icon = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ParentCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - CssClass = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - RequiredPermissionName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - ShortName = table.Column(type: "nvarchar(max)", nullable: true), - Target = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - IsDisabled = table.Column(type: "bit", nullable: false), - ElementId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - UserId = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - RoleId = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - CultureName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Id = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), CreationTime = table.Column(type: "datetime2", nullable: false), CreatorId = table.Column(type: "uniqueidentifier", nullable: true), LastModificationTime = table.Column(type: "datetime2", nullable: true), @@ -528,31 +513,7 @@ namespace Sozsoft.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_Adm_H_Menu", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Adm_H_Route", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Key = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - Path = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), - ComponentPath = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), - RouteType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Authority = table.Column(type: "nvarchar(max)", 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) - }, - constraints: table => - { - table.PrimaryKey("PK_Adm_H_Route", x => x.Id); + table.PrimaryKey("PK_Adm_H_Sector", x => x.Id); }); migrationBuilder.CreateTable( @@ -762,6 +723,62 @@ namespace Sozsoft.Platform.Migrations table.PrimaryKey("PK_Adm_T_InstallmentOption", x => x.Id); }); + migrationBuilder.CreateTable( + name: "Adm_T_IpRestriction", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + ResourceType = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: false), + ResourceId = table.Column(type: "nvarchar(32)", maxLength: 32, nullable: true), + IP = table.Column(type: "nvarchar(32)", maxLength: 32, nullable: false), + 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) + }, + constraints: table => + { + table.PrimaryKey("PK_Adm_T_IpRestriction", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Adm_T_Menu", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Code = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + DisplayName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + Order = table.Column(type: "int", nullable: false), + Url = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + Icon = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ParentCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + CssClass = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + RequiredPermissionName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + ShortName = table.Column(type: "nvarchar(max)", nullable: true), + Target = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + IsDisabled = table.Column(type: "bit", nullable: false), + ElementId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + UserId = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + RoleId = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + CultureName = table.Column(type: "nvarchar(64)", maxLength: 64, 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) + }, + constraints: table => + { + table.PrimaryKey("PK_Adm_T_Menu", x => x.Id); + }); + migrationBuilder.CreateTable( name: "Adm_T_Note", columns: table => new @@ -902,12 +919,16 @@ namespace Sozsoft.Platform.Migrations }); migrationBuilder.CreateTable( - name: "Adm_T_Sector", + name: "Adm_T_Route", columns: table => new { - Id = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + Id = table.Column(type: "uniqueidentifier", nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + Key = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + Path = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + ComponentPath = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + RouteType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Authority = table.Column(type: "nvarchar(max)", nullable: true), CreationTime = table.Column(type: "datetime2", nullable: false), CreatorId = table.Column(type: "uniqueidentifier", nullable: true), LastModificationTime = table.Column(type: "datetime2", nullable: true), @@ -918,7 +939,7 @@ namespace Sozsoft.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_Adm_T_Sector", x => x.Id); + table.PrimaryKey("PK_Adm_T_Route", x => x.Id); }); migrationBuilder.CreateTable( @@ -965,6 +986,99 @@ namespace Sozsoft.Platform.Migrations table.PrimaryKey("PK_Adm_T_SkillType", x => x.Id); }); + migrationBuilder.CreateTable( + name: "Adm_T_SqlFunction", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + FunctionName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + SchemaName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + DisplayName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + FunctionType = table.Column(type: "int", nullable: false), + FunctionBody = table.Column(type: "nvarchar(max)", nullable: false), + ReturnType = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + DataSourceCode = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + Status = table.Column(type: "int", nullable: false), + Category = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + IsDeployed = table.Column(type: "bit", nullable: false), + LastDeployedAt = table.Column(type: "datetime2", nullable: true), + Parameters = table.Column(type: "nvarchar(max)", maxLength: 4096, 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) + }, + constraints: table => + { + table.PrimaryKey("PK_Adm_T_SqlFunction", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Adm_T_SqlQuery", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Code = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + Name = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + QueryText = table.Column(type: "nvarchar(max)", nullable: false), + DataSourceCode = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + Status = table.Column(type: "int", nullable: false), + Category = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + Tags = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), + LastExecutedAt = table.Column(type: "datetime2", nullable: true), + ExecutionCount = table.Column(type: "int", nullable: false), + IsModifyingData = table.Column(type: "bit", nullable: false), + Parameters = table.Column(type: "nvarchar(max)", maxLength: 4096, 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) + }, + constraints: table => + { + table.PrimaryKey("PK_Adm_T_SqlQuery", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Adm_T_SqlStoredProcedure", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + ProcedureName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + SchemaName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + DisplayName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + ProcedureBody = table.Column(type: "nvarchar(max)", nullable: false), + DataSourceCode = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + Status = table.Column(type: "int", nullable: false), + Category = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + IsDeployed = table.Column(type: "bit", nullable: false), + LastDeployedAt = table.Column(type: "datetime2", nullable: true), + Parameters = table.Column(type: "nvarchar(max)", maxLength: 4096, 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) + }, + constraints: table => + { + table.PrimaryKey("PK_Adm_T_SqlStoredProcedure", x => x.Id); + }); + migrationBuilder.CreateTable( name: "Adm_T_SqlTable", columns: table => new @@ -993,6 +1107,36 @@ namespace Sozsoft.Platform.Migrations table.PrimaryKey("PK_Adm_T_SqlTable", x => x.Id); }); + migrationBuilder.CreateTable( + name: "Adm_T_SqlView", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + ViewName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + SchemaName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + DisplayName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + ViewDefinition = table.Column(type: "nvarchar(max)", nullable: false), + DataSourceCode = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + Status = table.Column(type: "int", nullable: false), + Category = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + IsDeployed = table.Column(type: "bit", nullable: false), + LastDeployedAt = table.Column(type: "datetime2", nullable: true), + WithSchemaBinding = table.Column(type: "bit", nullable: false), + 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) + }, + constraints: table => + { + table.PrimaryKey("PK_Adm_T_SqlView", x => x.Id); + }); + migrationBuilder.CreateTable( name: "Adm_T_UomCategory", columns: table => new @@ -1193,38 +1337,6 @@ namespace Sozsoft.Platform.Migrations table.PrimaryKey("PK_Sas_H_DataSource", x => x.Id); }); - migrationBuilder.CreateTable( - name: "Sas_H_ForumCategory", - 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), - Slug = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - Description = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), - Icon = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - DisplayOrder = table.Column(type: "int", nullable: false), - IsActive = table.Column(type: "bit", nullable: false), - IsLocked = table.Column(type: "bit", nullable: false), - TopicCount = table.Column(type: "int", nullable: true), - PostCount = table.Column(type: "int", nullable: true), - LastPostId = table.Column(type: "uniqueidentifier", nullable: true), - LastPostDate = table.Column(type: "datetime2", nullable: true), - LastPostUserId = table.Column(type: "uniqueidentifier", nullable: true), - LastPostUserName = table.Column(type: "nvarchar(256)", maxLength: 256, 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) - }, - constraints: table => - { - table.PrimaryKey("PK_Sas_H_ForumCategory", x => x.Id); - }); - migrationBuilder.CreateTable( name: "Sas_H_Language", columns: table => new @@ -1488,6 +1600,38 @@ namespace Sozsoft.Platform.Migrations table.PrimaryKey("PK_Sas_T_Branch", x => x.Id); }); + migrationBuilder.CreateTable( + name: "Sas_T_ForumCategory", + 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), + Slug = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + Description = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), + Icon = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + DisplayOrder = table.Column(type: "int", nullable: false), + IsActive = table.Column(type: "bit", nullable: false), + IsLocked = table.Column(type: "bit", nullable: false), + TopicCount = table.Column(type: "int", nullable: true), + PostCount = table.Column(type: "int", nullable: true), + LastPostId = table.Column(type: "uniqueidentifier", nullable: true), + LastPostDate = table.Column(type: "datetime2", nullable: true), + LastPostUserId = table.Column(type: "uniqueidentifier", nullable: true), + LastPostUserName = table.Column(type: "nvarchar(256)", maxLength: 256, 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) + }, + constraints: table => + { + table.PrimaryKey("PK_Sas_T_ForumCategory", x => x.Id); + }); + migrationBuilder.CreateTable( name: "Sas_T_GlobalSearch", columns: table => new @@ -1506,151 +1650,6 @@ namespace Sozsoft.Platform.Migrations table.PrimaryKey("PK_Sas_T_GlobalSearch", x => x.Id); }); - migrationBuilder.CreateTable( - name: "Sas_T_IpRestriction", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - ResourceType = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: false), - ResourceId = table.Column(type: "nvarchar(32)", maxLength: 32, nullable: true), - IP = table.Column(type: "nvarchar(32)", maxLength: 32, nullable: false), - 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) - }, - constraints: table => - { - table.PrimaryKey("PK_Sas_T_IpRestriction", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Sas_T_SqlFunction", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - FunctionName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - SchemaName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - DisplayName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), - Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), - FunctionType = table.Column(type: "int", nullable: false), - FunctionBody = table.Column(type: "nvarchar(max)", nullable: false), - ReturnType = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), - DataSourceCode = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - Status = table.Column(type: "int", nullable: false), - Category = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - IsDeployed = table.Column(type: "bit", nullable: false), - LastDeployedAt = table.Column(type: "datetime2", nullable: true), - Parameters = table.Column(type: "nvarchar(max)", maxLength: 4096, 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) - }, - constraints: table => - { - table.PrimaryKey("PK_Sas_T_SqlFunction", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Sas_T_SqlQuery", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Code = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - Name = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), - Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), - QueryText = table.Column(type: "nvarchar(max)", nullable: false), - DataSourceCode = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - Status = table.Column(type: "int", nullable: false), - Category = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - Tags = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), - LastExecutedAt = table.Column(type: "datetime2", nullable: true), - ExecutionCount = table.Column(type: "int", nullable: false), - IsModifyingData = table.Column(type: "bit", nullable: false), - Parameters = table.Column(type: "nvarchar(max)", maxLength: 4096, 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) - }, - constraints: table => - { - table.PrimaryKey("PK_Sas_T_SqlQuery", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Sas_T_SqlStoredProcedure", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - ProcedureName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - SchemaName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - DisplayName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), - Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), - ProcedureBody = table.Column(type: "nvarchar(max)", nullable: false), - DataSourceCode = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - Status = table.Column(type: "int", nullable: false), - Category = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - IsDeployed = table.Column(type: "bit", nullable: false), - LastDeployedAt = table.Column(type: "datetime2", nullable: true), - Parameters = table.Column(type: "nvarchar(max)", maxLength: 4096, 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) - }, - constraints: table => - { - table.PrimaryKey("PK_Sas_T_SqlStoredProcedure", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Sas_T_SqlView", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - ViewName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - SchemaName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - DisplayName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), - Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), - ViewDefinition = table.Column(type: "nvarchar(max)", nullable: false), - DataSourceCode = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - Status = table.Column(type: "int", nullable: false), - Category = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - IsDeployed = table.Column(type: "bit", nullable: false), - LastDeployedAt = table.Column(type: "datetime2", nullable: true), - WithSchemaBinding = table.Column(type: "bit", nullable: false), - 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) - }, - constraints: table => - { - table.PrimaryKey("PK_Sas_T_SqlView", x => x.Id); - }); - migrationBuilder.CreateTable( name: "AbpAuditLogActions", columns: table => new @@ -2227,46 +2226,6 @@ namespace Sozsoft.Platform.Migrations onDelete: ReferentialAction.Cascade); }); - migrationBuilder.CreateTable( - name: "Sas_H_ForumTopic", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Title = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), - Content = table.Column(type: "nvarchar(max)", nullable: false), - CategoryId = table.Column(type: "uniqueidentifier", nullable: false), - AuthorId = table.Column(type: "uniqueidentifier", nullable: false), - AuthorName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - ViewCount = table.Column(type: "int", nullable: false), - ReplyCount = table.Column(type: "int", nullable: false), - LikeCount = table.Column(type: "int", nullable: false), - IsPinned = table.Column(type: "bit", nullable: false), - IsLocked = table.Column(type: "bit", nullable: false), - IsSolved = table.Column(type: "bit", nullable: false), - LastPostId = table.Column(type: "uniqueidentifier", nullable: true), - LastPostDate = table.Column(type: "datetime2", nullable: true), - LastPostUserId = table.Column(type: "uniqueidentifier", nullable: true), - LastPostUserName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - TenantId = table.Column(type: "uniqueidentifier", 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) - }, - constraints: table => - { - table.PrimaryKey("PK_Sas_H_ForumTopic", x => x.Id); - table.ForeignKey( - name: "FK_Sas_H_ForumTopic_Sas_H_ForumCategory_CategoryId", - column: x => x.CategoryId, - principalTable: "Sas_H_ForumCategory", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - migrationBuilder.CreateTable( name: "Sas_H_LanguageText", columns: table => new @@ -2469,6 +2428,46 @@ namespace Sozsoft.Platform.Migrations onDelete: ReferentialAction.Restrict); }); + migrationBuilder.CreateTable( + name: "Sas_T_ForumTopic", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Title = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + Content = table.Column(type: "nvarchar(max)", nullable: false), + CategoryId = table.Column(type: "uniqueidentifier", nullable: false), + AuthorId = table.Column(type: "uniqueidentifier", nullable: false), + AuthorName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + ViewCount = table.Column(type: "int", nullable: false), + ReplyCount = table.Column(type: "int", nullable: false), + LikeCount = table.Column(type: "int", nullable: false), + IsPinned = table.Column(type: "bit", nullable: false), + IsLocked = table.Column(type: "bit", nullable: false), + IsSolved = table.Column(type: "bit", nullable: false), + LastPostId = table.Column(type: "uniqueidentifier", nullable: true), + LastPostDate = table.Column(type: "datetime2", nullable: true), + LastPostUserId = table.Column(type: "uniqueidentifier", nullable: true), + LastPostUserName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + TenantId = table.Column(type: "uniqueidentifier", 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) + }, + constraints: table => + { + table.PrimaryKey("PK_Sas_T_ForumTopic", x => x.Id); + table.ForeignKey( + name: "FK_Sas_T_ForumTopic_Sas_T_ForumCategory_CategoryId", + column: x => x.CategoryId, + principalTable: "Sas_T_ForumCategory", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + migrationBuilder.CreateTable( name: "AbpEntityPropertyChanges", columns: table => new @@ -2582,44 +2581,6 @@ namespace Sozsoft.Platform.Migrations onDelete: ReferentialAction.Cascade); }); - migrationBuilder.CreateTable( - name: "Sas_H_ForumPost", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TopicId = table.Column(type: "uniqueidentifier", nullable: false), - Content = table.Column(type: "nvarchar(max)", nullable: false), - AuthorId = table.Column(type: "uniqueidentifier", nullable: false), - AuthorName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - LikeCount = table.Column(type: "int", nullable: true), - IsAcceptedAnswer = table.Column(type: "bit", nullable: true), - ParentPostId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", 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) - }, - constraints: table => - { - table.PrimaryKey("PK_Sas_H_ForumPost", x => x.Id); - table.ForeignKey( - name: "FK_Sas_H_ForumPost_Sas_H_ForumPost_ParentPostId", - column: x => x.ParentPostId, - principalTable: "Sas_H_ForumPost", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_Sas_H_ForumPost_Sas_H_ForumTopic_TopicId", - column: x => x.TopicId, - principalTable: "Sas_H_ForumTopic", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - migrationBuilder.CreateTable( name: "Sas_H_ListFormImportExecute", columns: table => new @@ -2652,6 +2613,44 @@ namespace Sozsoft.Platform.Migrations onDelete: ReferentialAction.Cascade); }); + migrationBuilder.CreateTable( + name: "Sas_T_ForumPost", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TopicId = table.Column(type: "uniqueidentifier", nullable: false), + Content = table.Column(type: "nvarchar(max)", nullable: false), + AuthorId = table.Column(type: "uniqueidentifier", nullable: false), + AuthorName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + LikeCount = table.Column(type: "int", nullable: true), + IsAcceptedAnswer = table.Column(type: "bit", nullable: true), + ParentPostId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", 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) + }, + constraints: table => + { + table.PrimaryKey("PK_Sas_T_ForumPost", x => x.Id); + table.ForeignKey( + name: "FK_Sas_T_ForumPost_Sas_T_ForumPost_ParentPostId", + column: x => x.ParentPostId, + principalTable: "Sas_T_ForumPost", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + table.ForeignKey( + name: "FK_Sas_T_ForumPost_Sas_T_ForumTopic_TopicId", + column: x => x.TopicId, + principalTable: "Sas_T_ForumTopic", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + migrationBuilder.CreateTable( name: "Adm_H_District", columns: table => new @@ -2939,12 +2938,6 @@ namespace Sozsoft.Platform.Migrations unique: true, filter: "[Country] IS NOT NULL AND [Township] IS NOT NULL"); - migrationBuilder.CreateIndex( - name: "IX_Adm_H_Route_Key", - table: "Adm_H_Route", - column: "Key", - unique: true); - migrationBuilder.CreateIndex( name: "IX_Adm_T_BlogCategory_Slug", table: "Adm_T_BlogCategory", @@ -2985,6 +2978,12 @@ namespace Sozsoft.Platform.Migrations table: "Adm_T_ReportTemplate", column: "CategoryId"); + migrationBuilder.CreateIndex( + name: "IX_Adm_T_Route_Key", + table: "Adm_T_Route", + column: "Key", + unique: true); + migrationBuilder.CreateIndex( name: "IX_Adm_T_Skill_SkillTypeId", table: "Adm_T_Skill", @@ -2995,11 +2994,96 @@ namespace Sozsoft.Platform.Migrations table: "Adm_T_SkillLevel", column: "SkillTypeId"); + migrationBuilder.CreateIndex( + name: "IX_Adm_T_SqlFunction_DataSourceCode", + table: "Adm_T_SqlFunction", + column: "DataSourceCode"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_SqlFunction_FunctionType", + table: "Adm_T_SqlFunction", + column: "FunctionType"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_SqlFunction_IsDeployed", + table: "Adm_T_SqlFunction", + column: "IsDeployed"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_SqlFunction_SchemaName_FunctionName", + table: "Adm_T_SqlFunction", + columns: new[] { "SchemaName", "FunctionName" }); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_SqlFunction_Status", + table: "Adm_T_SqlFunction", + column: "Status"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_SqlQuery_Category", + table: "Adm_T_SqlQuery", + column: "Category"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_SqlQuery_Code", + table: "Adm_T_SqlQuery", + column: "Code"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_SqlQuery_DataSourceCode", + table: "Adm_T_SqlQuery", + column: "DataSourceCode"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_SqlQuery_Status", + table: "Adm_T_SqlQuery", + column: "Status"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_SqlStoredProcedure_DataSourceCode", + table: "Adm_T_SqlStoredProcedure", + column: "DataSourceCode"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_SqlStoredProcedure_IsDeployed", + table: "Adm_T_SqlStoredProcedure", + column: "IsDeployed"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_SqlStoredProcedure_SchemaName_ProcedureName", + table: "Adm_T_SqlStoredProcedure", + columns: new[] { "SchemaName", "ProcedureName" }); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_SqlStoredProcedure_Status", + table: "Adm_T_SqlStoredProcedure", + column: "Status"); + migrationBuilder.CreateIndex( name: "IX_Adm_T_SqlTableField_EntityId", table: "Adm_T_SqlTableField", column: "EntityId"); + migrationBuilder.CreateIndex( + name: "IX_Adm_T_SqlView_DataSourceCode", + table: "Adm_T_SqlView", + column: "DataSourceCode"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_SqlView_IsDeployed", + table: "Adm_T_SqlView", + column: "IsDeployed"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_SqlView_SchemaName_ViewName", + table: "Adm_T_SqlView", + columns: new[] { "SchemaName", "ViewName" }); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_SqlView_Status", + table: "Adm_T_SqlView", + column: "Status"); + migrationBuilder.CreateIndex( name: "IX_Adm_T_Uom_UomCategoryId", table: "Adm_T_Uom", @@ -3051,36 +3135,6 @@ namespace Sozsoft.Platform.Migrations columns: new[] { "TableName", "Order" }, unique: true); - migrationBuilder.CreateIndex( - name: "IX_Sas_H_ForumCategory_DisplayOrder", - table: "Sas_H_ForumCategory", - column: "DisplayOrder"); - - migrationBuilder.CreateIndex( - name: "IX_Sas_H_ForumPost_ParentPostId", - table: "Sas_H_ForumPost", - column: "ParentPostId"); - - migrationBuilder.CreateIndex( - name: "IX_Sas_H_ForumPost_TopicId", - table: "Sas_H_ForumPost", - column: "TopicId"); - - migrationBuilder.CreateIndex( - name: "IX_Sas_H_ForumTopic_CategoryId", - table: "Sas_H_ForumTopic", - column: "CategoryId"); - - migrationBuilder.CreateIndex( - name: "IX_Sas_H_ForumTopic_IsPinned", - table: "Sas_H_ForumTopic", - column: "IsPinned"); - - migrationBuilder.CreateIndex( - name: "IX_Sas_H_ForumTopic_LastPostDate", - table: "Sas_H_ForumTopic", - column: "LastPostDate"); - migrationBuilder.CreateIndex( name: "IX_Sas_H_LanguageKey_ResourceName_Key", table: "Sas_H_LanguageKey", @@ -3128,89 +3182,34 @@ namespace Sozsoft.Platform.Migrations column: "BranchId"); migrationBuilder.CreateIndex( - name: "IX_Sas_T_SqlFunction_DataSourceCode", - table: "Sas_T_SqlFunction", - column: "DataSourceCode"); + name: "IX_Sas_T_ForumCategory_DisplayOrder", + table: "Sas_T_ForumCategory", + column: "DisplayOrder"); migrationBuilder.CreateIndex( - name: "IX_Sas_T_SqlFunction_FunctionType", - table: "Sas_T_SqlFunction", - column: "FunctionType"); + name: "IX_Sas_T_ForumPost_ParentPostId", + table: "Sas_T_ForumPost", + column: "ParentPostId"); migrationBuilder.CreateIndex( - name: "IX_Sas_T_SqlFunction_IsDeployed", - table: "Sas_T_SqlFunction", - column: "IsDeployed"); + name: "IX_Sas_T_ForumPost_TopicId", + table: "Sas_T_ForumPost", + column: "TopicId"); migrationBuilder.CreateIndex( - name: "IX_Sas_T_SqlFunction_SchemaName_FunctionName", - table: "Sas_T_SqlFunction", - columns: new[] { "SchemaName", "FunctionName" }); + name: "IX_Sas_T_ForumTopic_CategoryId", + table: "Sas_T_ForumTopic", + column: "CategoryId"); migrationBuilder.CreateIndex( - name: "IX_Sas_T_SqlFunction_Status", - table: "Sas_T_SqlFunction", - column: "Status"); + name: "IX_Sas_T_ForumTopic_IsPinned", + table: "Sas_T_ForumTopic", + column: "IsPinned"); migrationBuilder.CreateIndex( - name: "IX_Sas_T_SqlQuery_Category", - table: "Sas_T_SqlQuery", - column: "Category"); - - migrationBuilder.CreateIndex( - name: "IX_Sas_T_SqlQuery_Code", - table: "Sas_T_SqlQuery", - column: "Code"); - - migrationBuilder.CreateIndex( - name: "IX_Sas_T_SqlQuery_DataSourceCode", - table: "Sas_T_SqlQuery", - column: "DataSourceCode"); - - migrationBuilder.CreateIndex( - name: "IX_Sas_T_SqlQuery_Status", - table: "Sas_T_SqlQuery", - column: "Status"); - - migrationBuilder.CreateIndex( - name: "IX_Sas_T_SqlStoredProcedure_DataSourceCode", - table: "Sas_T_SqlStoredProcedure", - column: "DataSourceCode"); - - migrationBuilder.CreateIndex( - name: "IX_Sas_T_SqlStoredProcedure_IsDeployed", - table: "Sas_T_SqlStoredProcedure", - column: "IsDeployed"); - - migrationBuilder.CreateIndex( - name: "IX_Sas_T_SqlStoredProcedure_SchemaName_ProcedureName", - table: "Sas_T_SqlStoredProcedure", - columns: new[] { "SchemaName", "ProcedureName" }); - - migrationBuilder.CreateIndex( - name: "IX_Sas_T_SqlStoredProcedure_Status", - table: "Sas_T_SqlStoredProcedure", - column: "Status"); - - migrationBuilder.CreateIndex( - name: "IX_Sas_T_SqlView_DataSourceCode", - table: "Sas_T_SqlView", - column: "DataSourceCode"); - - migrationBuilder.CreateIndex( - name: "IX_Sas_T_SqlView_IsDeployed", - table: "Sas_T_SqlView", - column: "IsDeployed"); - - migrationBuilder.CreateIndex( - name: "IX_Sas_T_SqlView_SchemaName_ViewName", - table: "Sas_T_SqlView", - columns: new[] { "SchemaName", "ViewName" }); - - migrationBuilder.CreateIndex( - name: "IX_Sas_T_SqlView_Status", - table: "Sas_T_SqlView", - column: "Status"); + name: "IX_Sas_T_ForumTopic_LastPostDate", + table: "Sas_T_ForumTopic", + column: "LastPostDate"); } /// @@ -3298,10 +3297,7 @@ namespace Sozsoft.Platform.Migrations name: "Adm_H_District"); migrationBuilder.DropTable( - name: "Adm_H_Menu"); - - migrationBuilder.DropTable( - name: "Adm_H_Route"); + name: "Adm_H_Sector"); migrationBuilder.DropTable( name: "Adm_T_About"); @@ -3330,6 +3326,12 @@ namespace Sozsoft.Platform.Migrations migrationBuilder.DropTable( name: "Adm_T_InstallmentOption"); + migrationBuilder.DropTable( + name: "Adm_T_IpRestriction"); + + migrationBuilder.DropTable( + name: "Adm_T_Menu"); + migrationBuilder.DropTable( name: "Adm_T_Note"); @@ -3346,7 +3348,7 @@ namespace Sozsoft.Platform.Migrations name: "Adm_T_ReportTemplate"); migrationBuilder.DropTable( - name: "Adm_T_Sector"); + name: "Adm_T_Route"); migrationBuilder.DropTable( name: "Adm_T_Service"); @@ -3357,9 +3359,21 @@ namespace Sozsoft.Platform.Migrations migrationBuilder.DropTable( name: "Adm_T_SkillLevel"); + migrationBuilder.DropTable( + name: "Adm_T_SqlFunction"); + + migrationBuilder.DropTable( + name: "Adm_T_SqlQuery"); + + migrationBuilder.DropTable( + name: "Adm_T_SqlStoredProcedure"); + migrationBuilder.DropTable( name: "Adm_T_SqlTableField"); + migrationBuilder.DropTable( + name: "Adm_T_SqlView"); + migrationBuilder.DropTable( name: "Adm_T_Uom"); @@ -3384,9 +3398,6 @@ namespace Sozsoft.Platform.Migrations migrationBuilder.DropTable( name: "Sas_H_DataSource"); - migrationBuilder.DropTable( - name: "Sas_H_ForumPost"); - migrationBuilder.DropTable( name: "Sas_H_LanguageText"); @@ -3411,24 +3422,12 @@ namespace Sozsoft.Platform.Migrations migrationBuilder.DropTable( name: "Sas_T_BranchUsers"); + migrationBuilder.DropTable( + name: "Sas_T_ForumPost"); + migrationBuilder.DropTable( name: "Sas_T_GlobalSearch"); - migrationBuilder.DropTable( - name: "Sas_T_IpRestriction"); - - migrationBuilder.DropTable( - name: "Sas_T_SqlFunction"); - - migrationBuilder.DropTable( - name: "Sas_T_SqlQuery"); - - migrationBuilder.DropTable( - name: "Sas_T_SqlStoredProcedure"); - - migrationBuilder.DropTable( - name: "Sas_T_SqlView"); - migrationBuilder.DropTable( name: "AbpEntityChanges"); @@ -3471,9 +3470,6 @@ namespace Sozsoft.Platform.Migrations migrationBuilder.DropTable( name: "Sas_H_BackgroundWorker_MailQueue"); - migrationBuilder.DropTable( - name: "Sas_H_ForumTopic"); - migrationBuilder.DropTable( name: "Sas_H_LanguageKey"); @@ -3489,6 +3485,9 @@ namespace Sozsoft.Platform.Migrations migrationBuilder.DropTable( name: "Sas_T_Branch"); + migrationBuilder.DropTable( + name: "Sas_T_ForumTopic"); + migrationBuilder.DropTable( name: "AbpAuditLogs"); @@ -3502,10 +3501,10 @@ namespace Sozsoft.Platform.Migrations name: "Sas_H_BackgroundWorker_MailQueueTableFormat"); migrationBuilder.DropTable( - name: "Sas_H_ForumCategory"); + name: "Sas_H_ListForm"); migrationBuilder.DropTable( - name: "Sas_H_ListForm"); + name: "Sas_T_ForumCategory"); migrationBuilder.DropTable( name: "Adm_H_CountryGroup"); diff --git a/api/src/Sozsoft.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs b/api/src/Sozsoft.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs index 6375549..443d843 100644 --- a/api/src/Sozsoft.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs +++ b/api/src/Sozsoft.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs @@ -2066,7 +2066,7 @@ namespace Sozsoft.Platform.Migrations b.HasKey("Id"); - b.ToTable("Sas_T_IpRestriction", (string)null); + b.ToTable("Adm_T_IpRestriction", (string)null); }); modelBuilder.Entity("Sozsoft.Platform.Entities.ListForm", b => @@ -2887,7 +2887,7 @@ namespace Sozsoft.Platform.Migrations b.HasKey("Id"); - b.ToTable("Adm_H_Menu", (string)null); + b.ToTable("Adm_T_Menu", (string)null); }); modelBuilder.Entity("Sozsoft.Platform.Entities.Note", b => @@ -3485,7 +3485,7 @@ namespace Sozsoft.Platform.Migrations b.HasIndex("Key") .IsUnique(); - b.ToTable("Adm_H_Route", (string)null); + b.ToTable("Adm_T_Route", (string)null); }); modelBuilder.Entity("Sozsoft.Platform.Entities.Sector", b => @@ -3529,12 +3529,9 @@ namespace Sozsoft.Platform.Migrations .HasMaxLength(128) .HasColumnType("nvarchar(128)"); - b.Property("TenantId") - .HasColumnType("uniqueidentifier"); - b.HasKey("Id"); - b.ToTable("Adm_T_Sector", (string)null); + b.ToTable("Adm_H_Sector", (string)null); }); modelBuilder.Entity("Sozsoft.Platform.Entities.Service", b => @@ -4217,7 +4214,7 @@ namespace Sozsoft.Platform.Migrations b.HasIndex("DisplayOrder"); - b.ToTable("Sas_H_ForumCategory", (string)null); + b.ToTable("Sas_T_ForumCategory", (string)null); }); modelBuilder.Entity("Sozsoft.Platform.Forum.ForumPost", b => @@ -4287,7 +4284,7 @@ namespace Sozsoft.Platform.Migrations b.HasIndex("TopicId"); - b.ToTable("Sas_H_ForumPost", (string)null); + b.ToTable("Sas_T_ForumPost", (string)null); }); modelBuilder.Entity("Sozsoft.Platform.Forum.ForumTopic", b => @@ -4386,7 +4383,7 @@ namespace Sozsoft.Platform.Migrations b.HasIndex("LastPostDate"); - b.ToTable("Sas_H_ForumTopic", (string)null); + b.ToTable("Sas_T_ForumTopic", (string)null); }); modelBuilder.Entity("Sozsoft.Settings.Entities.SettingDefinition", b => @@ -4591,7 +4588,7 @@ namespace Sozsoft.Platform.Migrations b.HasIndex("SchemaName", "FunctionName"); - b.ToTable("Sas_T_SqlFunction", (string)null); + b.ToTable("Adm_T_SqlFunction", (string)null); }); modelBuilder.Entity("Sozsoft.SqlQueryManager.Domain.Entities.SqlQuery", b => @@ -4691,7 +4688,7 @@ namespace Sozsoft.Platform.Migrations b.HasIndex("Status"); - b.ToTable("Sas_T_SqlQuery", (string)null); + b.ToTable("Adm_T_SqlQuery", (string)null); }); modelBuilder.Entity("Sozsoft.SqlQueryManager.Domain.Entities.SqlStoredProcedure", b => @@ -4789,7 +4786,7 @@ namespace Sozsoft.Platform.Migrations b.HasIndex("SchemaName", "ProcedureName"); - b.ToTable("Sas_T_SqlStoredProcedure", (string)null); + b.ToTable("Adm_T_SqlStoredProcedure", (string)null); }); modelBuilder.Entity("Sozsoft.SqlQueryManager.Domain.Entities.SqlView", b => @@ -4886,7 +4883,7 @@ namespace Sozsoft.Platform.Migrations b.HasIndex("SchemaName", "ViewName"); - b.ToTable("Sas_T_SqlView", (string)null); + b.ToTable("Adm_T_SqlView", (string)null); }); modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b =>