From 01e19ef26f7261772ce460c053d95916a44cc704 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sedat=20=C3=96zt=C3=BCrk?= Date: Mon, 25 May 2026 17:31:54 +0300 Subject: [PATCH] =?UTF-8?q?PostgreSql=20=C3=BCzerinde=20=C3=A7al=C4=B1?= =?UTF-8?q?=C5=9Fmas=C4=B1=20i=C3=A7in=20=C3=A7al=C4=B1=C5=9Fma?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SettingsConsts.cs | 2 +- .../DatabaseObjectDto.cs | 5 +- .../ISqlObjectManagerAppService.cs | 1 + .../SqlObjectExplorerDto.cs | 5 +- .../SqlObjectManagerAppService.cs | 422 +- .../Services/SqlExecutorService.cs | 20 +- .../Intranet/AnnouncementDto.cs | 14 +- .../Intranet/SocialPostDto.cs | 18 +- .../Intranet/IntranetAppService.cs | 44 +- .../Sozsoft.Platform.DbMigrator/Program.cs | 11 + .../Seeds/HangfireDbSchemaMigrator.cs | 6 + .../Seeds/HostData.json | 8 +- .../Seeds/HostDataSeeder.cs | 16 +- .../Seeds/LanguagesData.json | 6 + .../Seeds/ListFormSeeder_Administration.cs | 6 +- .../PostgresData/Adm_T_DatabaseBackupAll.sql | 7 + .../Adm_T_DatabaseBackupFilesDeleteAll.sql | 7 + .../Sas_H_BackgroundWorker_JobFlow.sql | 103 + .../Seeds/SqlDataSeeder.cs | 21 +- .../Sozsoft.Platform.DbMigrator.csproj | 4 + .../PlatformConsts.cs | 2 +- .../PlatformDynamicEntityManager.cs | 88 +- .../DynamicData/PgDynamicDataRepository.cs | 411 +- ...tyFrameworkCorePlatformDbSchemaMigrator.cs | 14 +- .../EntityFrameworkCore/PlatformDbContext.cs | 25 +- .../PlatformDbContextFactory.cs | 28 +- .../Migrations/20260524210111_Initial.cs | 4428 ----------------- ....cs => 20260525115708_Initial.Designer.cs} | 4221 +++++++++------- .../Migrations/20260525115708_Initial.cs | 4425 ++++++++++++++++ .../PlatformDbContextModelSnapshot.cs | 4219 +++++++++------- .../Seeds/TenantData.json | 80 +- .../DbStartup/SetupAppRunner.cs | 48 +- .../PlatformHttpApiHostModule.cs | 21 +- .../Sozsoft.Platform.HttpApi.Host/Program.cs | 10 + configs/docker/start_postgres.bat | 1 + configs/docker/{start.bat => start_sql.bat} | 0 configs/docker/stop_postgres.bat | 1 + configs/docker/stop_sql.bat | 1 + ui/public/version.json | 13 +- ui/src/proxy/sql-query-manager/models.ts | 2 + ui/src/services/sql-query-manager.service.ts | 10 + .../views/developerKit/SqlObjectExplorer.tsx | 18 +- ui/src/views/developerKit/SqlQueryManager.tsx | 151 +- ui/src/views/intranet/SocialWall/PostItem.tsx | 57 +- .../intranet/widgets/AnnouncementModal.tsx | 29 +- .../views/intranet/widgets/Announcements.tsx | 24 +- .../views/intranet/widgets/UpcomingEvents.tsx | 14 +- 47 files changed, 10764 insertions(+), 8303 deletions(-) create mode 100644 api/src/Sozsoft.Platform.DbMigrator/Seeds/PostgresData/Adm_T_DatabaseBackupAll.sql create mode 100644 api/src/Sozsoft.Platform.DbMigrator/Seeds/PostgresData/Adm_T_DatabaseBackupFilesDeleteAll.sql create mode 100644 api/src/Sozsoft.Platform.DbMigrator/Seeds/PostgresData/Sas_H_BackgroundWorker_JobFlow.sql delete mode 100644 api/src/Sozsoft.Platform.EntityFrameworkCore/Migrations/20260524210111_Initial.cs rename api/src/Sozsoft.Platform.EntityFrameworkCore/Migrations/{20260524210111_Initial.Designer.cs => 20260525115708_Initial.Designer.cs} (64%) create mode 100644 api/src/Sozsoft.Platform.EntityFrameworkCore/Migrations/20260525115708_Initial.cs create mode 100644 configs/docker/start_postgres.bat rename configs/docker/{start.bat => start_sql.bat} (100%) create mode 100644 configs/docker/stop_postgres.bat create mode 100644 configs/docker/stop_sql.bat diff --git a/api/modules/Sozsoft.Settings/Sozsoft.Settings.Domain.Shared/SettingsConsts.cs b/api/modules/Sozsoft.Settings/Sozsoft.Settings.Domain.Shared/SettingsConsts.cs index 85b60e9..1fdc072 100644 --- a/api/modules/Sozsoft.Settings/Sozsoft.Settings.Domain.Shared/SettingsConsts.cs +++ b/api/modules/Sozsoft.Settings/Sozsoft.Settings.Domain.Shared/SettingsConsts.cs @@ -15,7 +15,7 @@ public static class SettingsConsts public const string FormNamePrefix = "Setting_"; - public const string DefaultDatabaseProvider = DatabaseProvider.SqlServer; + public const string DefaultDatabaseProvider = DatabaseProvider.PostgreSql; public static class DatabaseProvider { diff --git a/api/modules/Sozsoft.SqlQueryManager/Sozsoft.SqlQueryManager.Application.Contracts/DatabaseObjectDto.cs b/api/modules/Sozsoft.SqlQueryManager/Sozsoft.SqlQueryManager.Application.Contracts/DatabaseObjectDto.cs index 1403161..f2aa092 100644 --- a/api/modules/Sozsoft.SqlQueryManager/Sozsoft.SqlQueryManager.Application.Contracts/DatabaseObjectDto.cs +++ b/api/modules/Sozsoft.SqlQueryManager/Sozsoft.SqlQueryManager.Application.Contracts/DatabaseObjectDto.cs @@ -4,7 +4,10 @@ public class DatabaseTableDto { public string SchemaName { get; set; } public string TableName { get; set; } - public string FullName => $"{SchemaName}.{TableName}"; + public string DataSourceType { get; set; } + public string FullName => DataSourceType == "Postgresql" + ? $"\"{SchemaName}\".\"{TableName}\"" + : $"[{SchemaName}].[{TableName}]"; } public class DatabaseColumnDto diff --git a/api/modules/Sozsoft.SqlQueryManager/Sozsoft.SqlQueryManager.Application.Contracts/ISqlObjectManagerAppService.cs b/api/modules/Sozsoft.SqlQueryManager/Sozsoft.SqlQueryManager.Application.Contracts/ISqlObjectManagerAppService.cs index 72fc605..f9652ee 100644 --- a/api/modules/Sozsoft.SqlQueryManager/Sozsoft.SqlQueryManager.Application.Contracts/ISqlObjectManagerAppService.cs +++ b/api/modules/Sozsoft.SqlQueryManager/Sozsoft.SqlQueryManager.Application.Contracts/ISqlObjectManagerAppService.cs @@ -22,6 +22,7 @@ public interface ISqlObjectManagerAppService : IApplicationService // Database Metadata Operations Task> GetTableColumnsAsync(string dataSourceCode, string schemaName, string tableName); + Task GetTableCreateScriptAsync(string dataSourceCode, string schemaName, string tableName); /// /// Gets the SQL definition/body of a native SQL Server object (Stored Procedure, View, or Function) diff --git a/api/modules/Sozsoft.SqlQueryManager/Sozsoft.SqlQueryManager.Application.Contracts/SqlObjectExplorerDto.cs b/api/modules/Sozsoft.SqlQueryManager/Sozsoft.SqlQueryManager.Application.Contracts/SqlObjectExplorerDto.cs index 513c0ae..b3a2683 100644 --- a/api/modules/Sozsoft.SqlQueryManager/Sozsoft.SqlQueryManager.Application.Contracts/SqlObjectExplorerDto.cs +++ b/api/modules/Sozsoft.SqlQueryManager/Sozsoft.SqlQueryManager.Application.Contracts/SqlObjectExplorerDto.cs @@ -9,7 +9,10 @@ public class SqlNativeObjectDto { public string SchemaName { get; set; } = "dbo"; public string ObjectName { get; set; } = ""; - public string FullName => $"[{SchemaName}].[{ObjectName}]"; + public string DataSourceType { get; set; } = ""; + public string FullName => DataSourceType == "Postgresql" + ? $"\"{SchemaName}\".\"{ObjectName}\"" + : $"[{SchemaName}].[{ObjectName}]"; } /// diff --git a/api/modules/Sozsoft.SqlQueryManager/Sozsoft.SqlQueryManager.Application/SqlObjectManagerAppService.cs b/api/modules/Sozsoft.SqlQueryManager/Sozsoft.SqlQueryManager.Application/SqlObjectManagerAppService.cs index 8ad7553..4f6c545 100644 --- a/api/modules/Sozsoft.SqlQueryManager/Sozsoft.SqlQueryManager.Application/SqlObjectManagerAppService.cs +++ b/api/modules/Sozsoft.SqlQueryManager/Sozsoft.SqlQueryManager.Application/SqlObjectManagerAppService.cs @@ -13,6 +13,8 @@ using Microsoft.Extensions.Logging; using Volo.Abp.Application.Services; using Volo.Abp.MultiTenancy; using System.Text.RegularExpressions; +using Sozsoft.Platform.Enums; +using Sozsoft.Platform.Queries; namespace Sozsoft.SqlQueryManager.Application; @@ -43,6 +45,7 @@ public class SqlObjectManagerAppService : ApplicationService, ISqlObjectManagerA private readonly ISqlExecutorService _sqlExecutorService; private readonly ISqlTemplateProvider _templateProvider; + private readonly IDataSourceManager _dataSourceManager; private readonly ICurrentTenant _currentTenant; private readonly IHttpContextAccessor _httpContextAccessor; private readonly IHostEnvironment _hostEnvironment; @@ -51,6 +54,7 @@ public class SqlObjectManagerAppService : ApplicationService, ISqlObjectManagerA public SqlObjectManagerAppService( ISqlExecutorService sqlExecutorService, ISqlTemplateProvider templateProvider, + IDataSourceManager dataSourceManager, ICurrentTenant currentTenant, IHttpContextAccessor httpContextAccessor, IHostEnvironment hostEnvironment, @@ -58,6 +62,7 @@ public class SqlObjectManagerAppService : ApplicationService, ISqlObjectManagerA { _sqlExecutorService = sqlExecutorService; _templateProvider = templateProvider; + _dataSourceManager = dataSourceManager; _currentTenant = currentTenant; _httpContextAccessor = httpContextAccessor; _hostEnvironment = hostEnvironment; @@ -90,11 +95,12 @@ public class SqlObjectManagerAppService : ApplicationService, ISqlObjectManagerA { ValidateTenantAccess(); var result = new SqlObjectExplorerDto(); + var dataSourceType = await GetDataSourceTypeAsync(dataSourceCode); - result.Tables = await GetTablesAsync(dataSourceCode); - result.Views = await GetNativeObjectsAsync(dataSourceCode, "V"); - result.StoredProcedures = await GetNativeObjectsAsync(dataSourceCode, "P"); - result.Functions = await GetNativeObjectsAsync(dataSourceCode, "FN", "IF", "TF"); + result.Tables = await GetTablesAsync(dataSourceCode, dataSourceType); + result.Views = await GetNativeObjectsAsync(dataSourceCode, dataSourceType, "V"); + result.StoredProcedures = await GetNativeObjectsAsync(dataSourceCode, dataSourceType, "P"); + result.Functions = await GetNativeObjectsAsync(dataSourceCode, dataSourceType, "FN", "IF", "TF"); result.Templates = _templateProvider.GetAvailableQueryTemplates() .Select(t => new SqlTemplateDto @@ -109,20 +115,25 @@ public class SqlObjectManagerAppService : ApplicationService, ISqlObjectManagerA return result; } - private async Task> GetNativeObjectsAsync(string dataSourceCode, params string[] objectTypes) + private async Task GetDataSourceTypeAsync(string dataSourceCode) { - var typeList = string.Join(",", objectTypes.Select(t => $"'{t}'")); - var query = $@" - SELECT - SCHEMA_NAME(o.schema_id) AS SchemaName, - o.name AS ObjectName - FROM - sys.objects o - WHERE - o.type IN ({typeList}) - AND o.is_ms_shipped = 0 - ORDER BY - SCHEMA_NAME(o.schema_id), o.name"; + var dataSource = await _dataSourceManager.GetDataSourceAsync(_currentTenant.IsAvailable, dataSourceCode); + if (dataSource == null) + { + throw new Volo.Abp.UserFriendlyException($"Data source '{dataSourceCode}' was not found."); + } + + return dataSource.DataSourceType; + } + + private async Task> GetNativeObjectsAsync( + string dataSourceCode, + DataSourceTypeEnum dataSourceType, + params string[] objectTypes) + { + var query = dataSourceType == DataSourceTypeEnum.Postgresql + ? BuildPostgreSqlNativeObjectsQuery(objectTypes) + : BuildSqlServerNativeObjectsQuery(objectTypes); var result = await _sqlExecutorService.ExecuteQueryAsync(query, dataSourceCode); @@ -136,8 +147,9 @@ public class SqlObjectManagerAppService : ApplicationService, ISqlObjectManagerA { objects.Add(new SqlNativeObjectDto { - SchemaName = dict["SchemaName"]?.ToString() ?? "dbo", - ObjectName = dict["ObjectName"]?.ToString() ?? "" + SchemaName = GetDictionaryValue(dict, "SchemaName")?.ToString() ?? GetDefaultSchemaName(dataSourceType), + ObjectName = GetDictionaryValue(dict, "ObjectName")?.ToString() ?? "", + DataSourceType = dataSourceType.ToString() }); } } @@ -146,9 +158,73 @@ public class SqlObjectManagerAppService : ApplicationService, ISqlObjectManagerA return objects; } - private async Task> GetTablesAsync(string dataSourceCode) + private static string BuildSqlServerNativeObjectsQuery(params string[] objectTypes) { - var query = @" + var typeList = string.Join(",", objectTypes.Select(t => $"'{t}'")); + return $@" + SELECT + SCHEMA_NAME(o.schema_id) AS SchemaName, + o.name AS ObjectName + FROM + sys.objects o + WHERE + o.type IN ({typeList}) + AND o.is_ms_shipped = 0 + ORDER BY + SCHEMA_NAME(o.schema_id), o.name"; + } + + private static string BuildPostgreSqlNativeObjectsQuery(params string[] objectTypes) + { + var wantsViews = objectTypes.Contains("V"); + var wantsProcedures = objectTypes.Contains("P"); + var wantsFunctions = objectTypes.Any(t => t is "FN" or "IF" or "TF"); + + if (wantsViews) + { + return @" + SELECT + table_schema AS ""SchemaName"", + table_name AS ""ObjectName"" + FROM information_schema.views + WHERE table_schema NOT IN ('pg_catalog', 'information_schema') + ORDER BY table_schema, table_name"; + } + + var proKinds = new List(); + if (wantsProcedures) + { + proKinds.Add("'p'"); + } + + if (wantsFunctions) + { + proKinds.Add("'f'"); + } + + return $@" + SELECT + n.nspname AS ""SchemaName"", + p.proname AS ""ObjectName"" + FROM pg_proc p + INNER JOIN pg_namespace n ON n.oid = p.pronamespace + WHERE n.nspname NOT IN ('pg_catalog', 'information_schema') + AND p.prokind IN ({string.Join(",", proKinds)}) + ORDER BY n.nspname, p.proname"; + } + + private async Task> GetTablesAsync(string dataSourceCode, DataSourceTypeEnum dataSourceType) + { + var query = dataSourceType == DataSourceTypeEnum.Postgresql + ? @" + SELECT + table_schema AS ""SchemaName"", + table_name AS ""TableName"" + FROM information_schema.tables + WHERE table_type = 'BASE TABLE' + AND table_schema NOT IN ('pg_catalog', 'information_schema') + ORDER BY table_schema, table_name" + : @" SELECT SCHEMA_NAME(t.schema_id) AS SchemaName, t.name AS TableName @@ -171,8 +247,9 @@ public class SqlObjectManagerAppService : ApplicationService, ISqlObjectManagerA { tables.Add(new DatabaseTableDto { - SchemaName = dict["SchemaName"]?.ToString() ?? "dbo", - TableName = dict["TableName"]?.ToString() ?? "" + SchemaName = GetDictionaryValue(dict, "SchemaName")?.ToString() ?? GetDefaultSchemaName(dataSourceType), + TableName = GetDictionaryValue(dict, "TableName")?.ToString() ?? "", + DataSourceType = dataSourceType.ToString() }); } } @@ -229,12 +306,9 @@ public class SqlObjectManagerAppService : ApplicationService, ISqlObjectManagerA public async Task GetNativeObjectDefinitionAsync(string dataSourceCode, string schemaName, string objectName) { ValidateTenantAccess(); - var query = @" - SELECT OBJECT_DEFINITION(OBJECT_ID(@ObjectName)) AS Definition"; - - var fullObjectName = $"[{schemaName}].[{objectName}]"; + var dataSourceType = await GetDataSourceTypeAsync(dataSourceCode); var result = await _sqlExecutorService.ExecuteQueryAsync( - query.Replace("@ObjectName", $"'{fullObjectName}'"), + BuildNativeObjectDefinitionQuery(dataSourceType, schemaName, objectName), dataSourceCode); if (result.Success && result.Data != null) @@ -243,15 +317,18 @@ public class SqlObjectManagerAppService : ApplicationService, ISqlObjectManagerA if (dataList.Count > 0) { var row = dataList[0] as IDictionary; - if (row != null && row.ContainsKey("Definition")) + if (row != null) { - var definition = row["Definition"]?.ToString() ?? string.Empty; + var definition = GetDictionaryValue(row, "Definition")?.ToString() ?? string.Empty; // Always open object script as CREATE OR ALTER in editor. - definition = Regex.Replace( - definition, - @"^\s*(?:CREATE|ALTER)\s+(?:OR\s+ALTER\s+)?", - "CREATE OR ALTER ", - RegexOptions.IgnoreCase); + if (dataSourceType == DataSourceTypeEnum.Mssql) + { + definition = Regex.Replace( + definition, + @"^\s*(?:CREATE|ALTER)\s+(?:OR\s+ALTER\s+)?", + "CREATE OR ALTER ", + RegexOptions.IgnoreCase); + } return definition; } } @@ -260,10 +337,59 @@ public class SqlObjectManagerAppService : ApplicationService, ISqlObjectManagerA return string.Empty; } + private static string BuildNativeObjectDefinitionQuery( + DataSourceTypeEnum dataSourceType, + string schemaName, + string objectName) + { + if (dataSourceType == DataSourceTypeEnum.Postgresql) + { + var schema = ToSqlLiteral(schemaName); + var name = ToSqlLiteral(objectName); + + return $@" + SELECT ""Definition"" + FROM ( + SELECT pg_get_viewdef(c.oid, true) AS ""Definition"" + FROM pg_class c + INNER JOIN pg_namespace n ON n.oid = c.relnamespace + WHERE n.nspname = {schema} + AND c.relname = {name} + AND c.relkind IN ('v', 'm') + + UNION ALL + + SELECT pg_get_functiondef(p.oid) AS ""Definition"" + FROM pg_proc p + INNER JOIN pg_namespace n ON n.oid = p.pronamespace + WHERE n.nspname = {schema} + AND p.proname = {name} + AND p.prokind IN ('f', 'p') + ) d + LIMIT 1"; + } + + var fullObjectName = $"[{schemaName.Replace("]", "]]")}].[{objectName.Replace("]", "]]")}]"; + return $@" + SELECT OBJECT_DEFINITION(OBJECT_ID({ToSqlLiteral(fullObjectName)})) AS Definition"; + } + public async Task> GetTableColumnsAsync(string dataSourceCode, string schemaName, string tableName) { ValidateTenantAccess(); - var query = $@" + var dataSourceType = await GetDataSourceTypeAsync(dataSourceCode); + var query = dataSourceType == DataSourceTypeEnum.Postgresql + ? $@" + SELECT + column_name AS ""ColumnName"", + COALESCE(NULLIF(udt_name, ''), data_type) AS ""DataType"", + CASE WHEN is_nullable = 'YES' THEN TRUE ELSE FALSE END AS ""IsNullable"", + character_maximum_length AS ""MaxLength"" + FROM information_schema.columns + WHERE table_schema = {ToSqlLiteral(schemaName)} + AND table_name = {ToSqlLiteral(tableName)} + ORDER BY ordinal_position" + : $@" SELECT c.name AS ColumnName, TYPE_NAME(c.user_type_id) AS DataType, @@ -274,8 +400,8 @@ public class SqlObjectManagerAppService : ApplicationService, ISqlObjectManagerA INNER JOIN sys.tables t ON c.object_id = t.object_id INNER JOIN sys.schemas s ON t.schema_id = s.schema_id WHERE - s.name = '{schemaName}' - AND t.name = '{tableName}' + s.name = {ToSqlLiteral(schemaName)} + AND t.name = {ToSqlLiteral(tableName)} ORDER BY c.column_id"; @@ -291,10 +417,10 @@ public class SqlObjectManagerAppService : ApplicationService, ISqlObjectManagerA { columns.Add(new DatabaseColumnDto { - ColumnName = dict["ColumnName"]?.ToString() ?? "", - DataType = dict["DataType"]?.ToString() ?? "", - IsNullable = dict["IsNullable"] is bool b && b, - MaxLength = dict["MaxLength"] != null ? int.Parse(dict["MaxLength"].ToString()) : null + ColumnName = GetDictionaryValue(dict, "ColumnName")?.ToString() ?? "", + DataType = GetDictionaryValue(dict, "DataType")?.ToString() ?? "", + IsNullable = ToBoolean(GetDictionaryValue(dict, "IsNullable")), + MaxLength = ToNullableInt(GetDictionaryValue(dict, "MaxLength")) }); } } @@ -303,6 +429,218 @@ public class SqlObjectManagerAppService : ApplicationService, ISqlObjectManagerA return columns; } + [HttpGet("api/app/sql-object-manager/table-create-script")] + public async Task GetTableCreateScriptAsync(string dataSourceCode, string schemaName, string tableName) + { + ValidateTenantAccess(); + var dataSourceType = await GetDataSourceTypeAsync(dataSourceCode); + + var result = await _sqlExecutorService.ExecuteQueryAsync( + BuildTableCreateScriptQuery(dataSourceType, schemaName, tableName), + dataSourceCode); + + if (!result.Success || result.Data == null) + { + return string.Empty; + } + + var row = result.Data.FirstOrDefault() as IDictionary; + return GetDictionaryValue(row, "Script")?.ToString() ?? string.Empty; + } + + private static string BuildTableCreateScriptQuery( + DataSourceTypeEnum dataSourceType, + string schemaName, + string tableName) + { + if (dataSourceType == DataSourceTypeEnum.Postgresql) + { + return BuildPostgreSqlTableCreateScriptQuery(schemaName, tableName); + } + + return BuildSqlServerTableCreateScriptQuery(schemaName, tableName); + } + + private static string BuildSqlServerTableCreateScriptQuery(string schemaName, string tableName) + { + var fullName = $"[{schemaName.Replace("]", "]]")}].[{tableName.Replace("]", "]]")}]"; + var escapedFullName = ToSqlLiteral(fullName); + + return $@" +DECLARE @ObjectId INT = OBJECT_ID({escapedFullName}); + +IF @ObjectId IS NULL +BEGIN + SELECT CAST('' AS NVARCHAR(MAX)) AS Script; + RETURN; +END; + +;WITH cols AS +( + SELECT + c.column_id, + ' ' + QUOTENAME(c.name) + ' ' + + CASE + WHEN t.name IN ('varchar', 'char', 'varbinary', 'binary') THEN + t.name + '(' + CASE WHEN c.max_length = -1 THEN 'MAX' ELSE CAST(c.max_length AS VARCHAR(10)) END + ')' + WHEN t.name IN ('nvarchar', 'nchar') THEN + t.name + '(' + CASE WHEN c.max_length = -1 THEN 'MAX' ELSE CAST(c.max_length / 2 AS VARCHAR(10)) END + ')' + WHEN t.name IN ('decimal', 'numeric') THEN + t.name + '(' + CAST(c.precision AS VARCHAR(10)) + ',' + CAST(c.scale AS VARCHAR(10)) + ')' + WHEN t.name IN ('datetime2', 'datetimeoffset', 'time') THEN + t.name + '(' + CAST(c.scale AS VARCHAR(10)) + ')' + ELSE t.name + END + + CASE + WHEN ic.object_id IS NOT NULL + THEN ' IDENTITY(' + CAST(ic.seed_value AS VARCHAR(30)) + ',' + CAST(ic.increment_value AS VARCHAR(30)) + ')' + ELSE '' + END + + CASE WHEN c.is_nullable = 1 THEN ' NULL' ELSE ' NOT NULL' END + + ISNULL(' DEFAULT ' + dc.definition, '') AS line + FROM sys.columns c + INNER JOIN sys.types t ON c.user_type_id = t.user_type_id + LEFT JOIN sys.identity_columns ic ON c.object_id = ic.object_id AND c.column_id = ic.column_id + LEFT JOIN sys.default_constraints dc ON c.default_object_id = dc.object_id + WHERE c.object_id = @ObjectId +), +pk AS +( + SELECT + ' CONSTRAINT ' + QUOTENAME(k.name) + ' PRIMARY KEY ' + + CASE WHEN i.type = 1 THEN 'CLUSTERED' ELSE 'NONCLUSTERED' END + + CHAR(13) + CHAR(10) + ' (' + CHAR(13) + CHAR(10) + + ( + SELECT ' ' + QUOTENAME(c.name) + CASE WHEN ic.is_descending_key = 1 THEN ' DESC' ELSE ' ASC' END + CHAR(13) + CHAR(10) + FROM sys.index_columns ic + INNER JOIN sys.columns c ON ic.object_id = c.object_id AND ic.column_id = c.column_id + WHERE ic.object_id = i.object_id + AND ic.index_id = i.index_id + AND ic.is_included_column = 0 + ORDER BY ic.key_ordinal + FOR XML PATH(''), TYPE + ).value('.', 'NVARCHAR(MAX)') + + ' )' AS line + FROM sys.key_constraints k + INNER JOIN sys.indexes i ON k.parent_object_id = i.object_id AND k.unique_index_id = i.index_id + WHERE k.parent_object_id = @ObjectId + AND k.type = 'PK' +) +SELECT + 'IF OBJECT_ID(N''{fullName.Replace("'", "''")}'', ''U'') IS NULL' + CHAR(13) + CHAR(10) + + 'BEGIN' + CHAR(13) + CHAR(10) + + ' CREATE TABLE {fullName}' + CHAR(13) + CHAR(10) + + ' (' + CHAR(13) + CHAR(10) + + STUFF( + ( + SELECT ',' + CHAR(13) + CHAR(10) + line + FROM cols + ORDER BY column_id + FOR XML PATH(''), TYPE + ).value('.', 'NVARCHAR(MAX)') + ,1,3,'') + + ISNULL( + ( + SELECT ',' + CHAR(13) + CHAR(10) + line + FROM pk + ), + '' + ) + CHAR(13) + CHAR(10) + ' )' + CHAR(13) + CHAR(10) + 'END' + CHAR(13) + CHAR(10) + 'GO' AS Script;"; + } + + private static string BuildPostgreSqlTableCreateScriptQuery(string schemaName, string tableName) + { + return $@" +WITH cols AS ( + SELECT + c.ordinal_position, + ' ' || quote_ident(c.column_name) || ' ' || + CASE + WHEN c.data_type = 'character varying' THEN 'varchar(' || c.character_maximum_length || ')' + WHEN c.data_type = 'character' THEN 'char(' || c.character_maximum_length || ')' + WHEN c.data_type = 'numeric' AND c.numeric_precision IS NOT NULL THEN 'numeric(' || c.numeric_precision || ',' || c.numeric_scale || ')' + WHEN c.data_type = 'USER-DEFINED' THEN c.udt_name + ELSE c.data_type + END || + CASE WHEN c.is_nullable = 'NO' THEN ' NOT NULL' ELSE '' END || + COALESCE(' DEFAULT ' || c.column_default, '') AS line + FROM information_schema.columns c + WHERE c.table_schema = {ToSqlLiteral(schemaName)} + AND c.table_name = {ToSqlLiteral(tableName)} +), +pk AS ( + SELECT + ' CONSTRAINT ' || quote_ident(tc.constraint_name) || ' PRIMARY KEY (' || + string_agg(quote_ident(kcu.column_name), ', ' ORDER BY kcu.ordinal_position) || ')' AS line + FROM information_schema.table_constraints tc + JOIN information_schema.key_column_usage kcu + ON tc.constraint_name = kcu.constraint_name + AND tc.table_schema = kcu.table_schema + AND tc.table_name = kcu.table_name + WHERE tc.constraint_type = 'PRIMARY KEY' + AND tc.table_schema = {ToSqlLiteral(schemaName)} + AND tc.table_name = {ToSqlLiteral(tableName)} + GROUP BY tc.constraint_name +) +SELECT + 'CREATE TABLE IF NOT EXISTS ' || quote_ident({ToSqlLiteral(schemaName)}) || '.' || quote_ident({ToSqlLiteral(tableName)}) || E'\n(\n' || + string_agg(line, E',\n' ORDER BY sort_order) || + E'\n);' AS ""Script"" +FROM ( + SELECT ordinal_position AS sort_order, line FROM cols + UNION ALL + SELECT 100000 AS sort_order, line FROM pk +) s;"; + } + + private static object GetDictionaryValue(IDictionary row, string key) + { + if (row == null) + { + return null; + } + + if (row.TryGetValue(key, out var value)) + { + return value; + } + + var match = row.FirstOrDefault(x => string.Equals(x.Key, key, StringComparison.OrdinalIgnoreCase)); + return string.IsNullOrEmpty(match.Key) ? null : match.Value; + } + + private static string GetDefaultSchemaName(DataSourceTypeEnum dataSourceType) + { + return dataSourceType == DataSourceTypeEnum.Postgresql ? "public" : "dbo"; + } + + private static string ToSqlLiteral(string value) + { + return $"'{(value ?? string.Empty).Replace("'", "''")}'"; + } + + private static bool ToBoolean(object value) + { + return value switch + { + bool boolValue => boolValue, + short shortValue => shortValue != 0, + int intValue => intValue != 0, + long longValue => longValue != 0, + _ => bool.TryParse(value?.ToString(), out var parsed) && parsed + }; + } + + private static int? ToNullableInt(object value) + { + if (value == null) + { + return null; + } + + return int.TryParse(value.ToString(), out var parsed) ? parsed : null; + } + private SqlQueryExecutionResultDto MapExecutionResult(SqlExecutionResult result, bool isDeployed = false) { return new SqlQueryExecutionResultDto diff --git a/api/modules/Sozsoft.SqlQueryManager/Sozsoft.SqlQueryManager.Domain/Services/SqlExecutorService.cs b/api/modules/Sozsoft.SqlQueryManager/Sozsoft.SqlQueryManager.Domain/Services/SqlExecutorService.cs index 68ff301..fdd0be0 100644 --- a/api/modules/Sozsoft.SqlQueryManager/Sozsoft.SqlQueryManager.Domain/Services/SqlExecutorService.cs +++ b/api/modules/Sozsoft.SqlQueryManager/Sozsoft.SqlQueryManager.Domain/Services/SqlExecutorService.cs @@ -5,6 +5,7 @@ using System.Linq; using System.Text.RegularExpressions; using System.Threading.Tasks; using Sozsoft.Platform.DynamicData; +using Sozsoft.Platform.Enums; using Sozsoft.Platform.Queries; using Microsoft.Extensions.DependencyInjection; using Volo.Abp; @@ -38,14 +39,25 @@ public class SqlExecutorService : DomainService, ISqlExecutorService .WithData("DataSourceCode", dataSourceCode); } - // Get appropriate repository based on database type - // For now, using MS SQL Server repository - var repository = _serviceProvider.GetKeyedService("Ms"); + var repositoryKey = dataSource.DataSourceType switch + { + DataSourceTypeEnum.Mssql => "Ms", + DataSourceTypeEnum.Postgresql => "Pg", + _ => null + }; + + if (repositoryKey == null) + { + throw new BusinessException("SqlQueryManager:DataSourceTypeNotSupported") + .WithData("DatabaseType", dataSource.DataSourceType); + } + + var repository = _serviceProvider.GetKeyedService(repositoryKey); if (repository == null) { throw new BusinessException("SqlQueryManager:RepositoryNotFound") - .WithData("DatabaseType", "Ms"); + .WithData("DatabaseType", repositoryKey); } return repository; diff --git a/api/src/Sozsoft.Platform.Application.Contracts/Intranet/AnnouncementDto.cs b/api/src/Sozsoft.Platform.Application.Contracts/Intranet/AnnouncementDto.cs index 1959d3c..52d6ff4 100644 --- a/api/src/Sozsoft.Platform.Application.Contracts/Intranet/AnnouncementDto.cs +++ b/api/src/Sozsoft.Platform.Application.Contracts/Intranet/AnnouncementDto.cs @@ -8,16 +8,16 @@ public class AnnouncementDto : FullAuditedEntityDto { public Guid? TenantId { get; set; } - public string Title { get; set; } - public string Excerpt { get; set; } - public string Content { get; set; } - public string ImageUrl { get; set; } - public string Category { get; set; } + public string Title { get; set; } = string.Empty; + public string Excerpt { get; set; } = string.Empty; + public string Content { get; set; } = string.Empty; + public string ImageUrl { get; set; } = string.Empty; + public string Category { get; set; } = string.Empty; public Guid? UserId { get; set; } - public UserInfoViewModel User { get; set; } + public UserInfoViewModel? User { get; set; } public DateTime PublishDate { get; set; } public DateTime? ExpiryDate { get; set; } public bool IsPinned { get; set; } public int ViewCount { get; set; } - public string Attachments { get; set; } + public string Attachments { get; set; } = string.Empty; } diff --git a/api/src/Sozsoft.Platform.Application.Contracts/Intranet/SocialPostDto.cs b/api/src/Sozsoft.Platform.Application.Contracts/Intranet/SocialPostDto.cs index a34d43d..891a368 100644 --- a/api/src/Sozsoft.Platform.Application.Contracts/Intranet/SocialPostDto.cs +++ b/api/src/Sozsoft.Platform.Application.Contracts/Intranet/SocialPostDto.cs @@ -9,7 +9,7 @@ public class SocialPostDto : FullAuditedEntityDto { public Guid? UserId { get; set; } public UserInfoViewModel? User { get; set; } - public string Content { get; set; } + public string Content { get; set; } = string.Empty; public int LikeCount { get; set; } public bool IsLiked { get; set; } @@ -17,14 +17,14 @@ public class SocialPostDto : FullAuditedEntityDto public SocialLocationDto? Location { get; set; } public SocialMediaDto? Media { get; set; } - public List Comments { get; set; } - public List Likes { get; set; } + public List Comments { get; set; } = []; + public List Likes { get; set; } = []; } public class SocialLocationDto : FullAuditedEntityDto { public Guid SocialPostId { get; set; } - public string Name { get; set; } + public string Name { get; set; } = string.Empty; public string? Address { get; set; } public double? Lat { get; set; } public double? Lng { get; set; } @@ -34,8 +34,8 @@ public class SocialLocationDto : FullAuditedEntityDto public class SocialMediaDto : FullAuditedEntityDto { public Guid SocialPostId { get; set; } - public string Type { get; set; } // image | video | poll - public string[] Urls { get; set; } + public string Type { get; set; } = string.Empty; // image | video | poll + public string[] Urls { get; set; } = []; // Poll Fields public string? PollQuestion { get; set; } @@ -43,13 +43,13 @@ public class SocialMediaDto : FullAuditedEntityDto public DateTime? PollEndsAt { get; set; } public string? PollUserVoteId { get; set; } - public List PollOptions { get; set; } + public List PollOptions { get; set; } = []; } public class SocialPollOptionDto : FullAuditedEntityDto { public Guid SocialMediaId { get; set; } - public string Text { get; set; } + public string Text { get; set; } = string.Empty; public int Votes { get; set; } } @@ -58,7 +58,7 @@ public class SocialCommentDto : FullAuditedEntityDto public Guid SocialPostId { get; set; } public Guid? UserId { get; set; } public UserInfoViewModel? User { get; set; } - public string Content { get; set; } + public string Content { get; set; } = string.Empty; } public class SocialLikeDto : FullAuditedEntityDto diff --git a/api/src/Sozsoft.Platform.Application/Intranet/IntranetAppService.cs b/api/src/Sozsoft.Platform.Application/Intranet/IntranetAppService.cs index 06e2034..f3f35f2 100644 --- a/api/src/Sozsoft.Platform.Application/Intranet/IntranetAppService.cs +++ b/api/src/Sozsoft.Platform.Application/Intranet/IntranetAppService.cs @@ -123,6 +123,22 @@ public class IntranetAppService : PlatformAppService, IIntranetAppService .MapDepartmentAndJobPositionAssignments(departmentDict, jobPositionDict); } + private async Task GetDashboardFallbackUserAsync( + IReadOnlyDictionary departmentDict, + IReadOnlyDictionary jobPositionDict) + { + var normalizedAdmin = PlatformConsts.AbpIdentity.User.AdminEmailDefaultValue; + var user = await _identityUserRepository.FindByNormalizedUserNameAsync(normalizedAdmin) + ?? await _identityUserRepository.FindByNormalizedEmailAsync(normalizedAdmin); + + if (user == null && CurrentUser.Id.HasValue) + { + user = await _identityUserRepository.FindAsync(CurrentUser.Id.Value); + } + + return user != null ? MapUserInfoViewModel(user, departmentDict, jobPositionDict) : null; + } + private async Task> GetUpcomingEventsAsync() { var queryable = await _eventRepository @@ -166,6 +182,7 @@ public class IntranetAppService : PlatformAppService, IIntranetAppService } var (departmentDict, jobPositionDict) = await GetUserLookupDictionariesAsync(); + var fallbackUser = await GetDashboardFallbackUserAsync(departmentDict, jobPositionDict); var users = await _identityUserRepository.GetListAsync(); var userDict = users @@ -178,7 +195,11 @@ public class IntranetAppService : PlatformAppService, IIntranetAppService var result = new List(); foreach (var evt in events) { - if (!evt.UserId.HasValue || !userDict.TryGetValue(evt.UserId.Value, out var user)) + var user = evt.UserId.HasValue && userDict.TryGetValue(evt.UserId.Value, out var eventUser) + ? eventUser + : fallbackUser; + + if (user == null) continue; var commentDtos = new List(); @@ -346,17 +367,22 @@ public class IntranetAppService : PlatformAppService, IIntranetAppService var announcementDtos = new List(); var (departmentDict, jobPositionDict) = await GetUserLookupDictionariesAsync(); + var fallbackUser = await GetDashboardFallbackUserAsync(departmentDict, jobPositionDict); foreach (var announcement in announcements) { var dto = ObjectMapper.Map(announcement); - var user = await _identityUserRepository.FindAsync(announcement.UserId ?? Guid.Empty); - if (user != null) + if (announcement.UserId.HasValue) { - dto.User = MapUserInfoViewModel(user, departmentDict, jobPositionDict); + var user = await _identityUserRepository.FindAsync(announcement.UserId.Value); + if (user != null) + { + dto.User = MapUserInfoViewModel(user, departmentDict, jobPositionDict); + } } + dto.User ??= fallbackUser; announcementDtos.Add(dto); } @@ -433,8 +459,8 @@ public class IntranetAppService : PlatformAppService, IIntranetAppService // Collect all unique user IDs to resolve in a single query var userIds = dtos .Select(p => p.UserId) - .Union(dtos.SelectMany(p => p.Comments.Select(c => c.UserId))) - .Union(dtos.SelectMany(p => p.Likes.Select(l => l.UserId))) + .Union(dtos.SelectMany(p => (p.Comments ?? []).Select(c => c.UserId))) + .Union(dtos.SelectMany(p => (p.Likes ?? []).Select(l => l.UserId))) .Where(id => id.HasValue) .Select(id => id!.Value) .Distinct() @@ -454,11 +480,11 @@ public class IntranetAppService : PlatformAppService, IIntranetAppService if (dto.UserId.HasValue && userMap.TryGetValue(dto.UserId.Value, out var postUser)) dto.User = postUser; - foreach (var comment in dto.Comments) + foreach (var comment in dto.Comments ?? []) if (comment.UserId.HasValue && userMap.TryGetValue(comment.UserId.Value, out var commentUser)) comment.User = commentUser; - foreach (var like in dto.Likes) + foreach (var like in dto.Likes ?? []) if (like.UserId.HasValue && userMap.TryGetValue(like.UserId.Value, out var likeUser)) like.User = likeUser; } @@ -467,7 +493,7 @@ public class IntranetAppService : PlatformAppService, IIntranetAppService foreach (var dto in dtos) { dto.IsOwnPost = dto.UserId == CurrentUser.Id; - dto.IsLiked = dto.Likes.Any(l => l.UserId == CurrentUser.Id); + dto.IsLiked = dto.Likes?.Any(l => l.UserId == CurrentUser.Id) == true; } await EnrichPollOptionsAsync(dtos); diff --git a/api/src/Sozsoft.Platform.DbMigrator/Program.cs b/api/src/Sozsoft.Platform.DbMigrator/Program.cs index 321e1f0..886223b 100644 --- a/api/src/Sozsoft.Platform.DbMigrator/Program.cs +++ b/api/src/Sozsoft.Platform.DbMigrator/Program.cs @@ -6,6 +6,7 @@ using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; using Serilog; using Serilog.Events; +using static Sozsoft.Settings.SettingsConsts; namespace Sozsoft.Platform.DbMigrator; @@ -13,6 +14,8 @@ class Program { static async Task Main(string[] args) { + ConfigurePostgreSqlCompatibility(); + Log.Logger = new LoggerConfiguration() .MinimumLevel.Information() .MinimumLevel.Override("Microsoft", LogEventLevel.Warning) @@ -30,6 +33,14 @@ class Program await CreateHostBuilder(args).RunConsoleAsync(); } + private static void ConfigurePostgreSqlCompatibility() + { + if (DefaultDatabaseProvider == DatabaseProvider.PostgreSql) + { + System.AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true); + } + } + public static IHostBuilder CreateHostBuilder(string[] args) => Host.CreateDefaultBuilder(args) .AddAppSettingsSecretsJson() diff --git a/api/src/Sozsoft.Platform.DbMigrator/Seeds/HangfireDbSchemaMigrator.cs b/api/src/Sozsoft.Platform.DbMigrator/Seeds/HangfireDbSchemaMigrator.cs index b182da1..84594f5 100644 --- a/api/src/Sozsoft.Platform.DbMigrator/Seeds/HangfireDbSchemaMigrator.cs +++ b/api/src/Sozsoft.Platform.DbMigrator/Seeds/HangfireDbSchemaMigrator.cs @@ -34,6 +34,12 @@ public class HangfireDbSchemaMigrator : IPlatformDbSchemaMigrator, ITransientDep public async Task MigrateAsync() { + if (DefaultDatabaseProvider != DatabaseProvider.SqlServer) + { + _logger.LogInformation("HangFire SQL Server schema migration skipped for database provider '{Provider}'.", DefaultDatabaseProvider); + return; + } + var connectionString = _configuration.GetConnectionString(DefaultDatabaseProvider); if (string.IsNullOrWhiteSpace(connectionString)) { diff --git a/api/src/Sozsoft.Platform.DbMigrator/Seeds/HostData.json b/api/src/Sozsoft.Platform.DbMigrator/Seeds/HostData.json index ab6db3b..49c2975 100644 --- a/api/src/Sozsoft.Platform.DbMigrator/Seeds/HostData.json +++ b/api/src/Sozsoft.Platform.DbMigrator/Seeds/HostData.json @@ -258,7 +258,7 @@ "code": "App.SiteManagement.General.NewMemberNotificationEmails", "nameKey": "App.SiteManagement.General.NewMemberNotificationEmails", "descriptionKey": "App.SiteManagement.General.NewMemberNotificationEmails.Description", - "defaultValue": "system@sozsoft.com", + "defaultValue": "SYSTEM@SOZSOFT.COM", "isVisibleToClients": false, "providers": "G|D", "isInherited": false, @@ -274,7 +274,7 @@ "code": "App.SiteManagement.General.TimedLoginEmails", "nameKey": "App.SiteManagement.General.TimedLoginEmails", "descriptionKey": "App.SiteManagement.General.TimedLoginEmails.Description", - "defaultValue": "system@sozsoft.com", + "defaultValue": "SYSTEM@SOZSOFT.COM", "isVisibleToClients": false, "providers": "G|D", "isInherited": false, @@ -466,7 +466,7 @@ "code": "Abp.Mailing.DefaultFromAddress", "nameKey": "Abp.Mailing.DefaultFromAddress", "descriptionKey": "Abp.Mailing.DefaultFromAddress.Description", - "defaultValue": "system@sozsoft.com", + "defaultValue": "SYSTEM@SOZSOFT.COM", "isVisibleToClients": false, "providers": "T|G|D", "isInherited": false, @@ -482,7 +482,7 @@ "code": "Abp.Mailing.Smtp.UserName", "nameKey": "Abp.Mailing.Smtp.UserName", "descriptionKey": "Abp.Mailing.Smtp.UserName.Description", - "defaultValue": "system@sozsoft.com", + "defaultValue": "SYSTEM@SOZSOFT.COM", "isVisibleToClients": false, "providers": "T|G|D", "isInherited": false, diff --git a/api/src/Sozsoft.Platform.DbMigrator/Seeds/HostDataSeeder.cs b/api/src/Sozsoft.Platform.DbMigrator/Seeds/HostDataSeeder.cs index 3a26fca..e210eac 100644 --- a/api/src/Sozsoft.Platform.DbMigrator/Seeds/HostDataSeeder.cs +++ b/api/src/Sozsoft.Platform.DbMigrator/Seeds/HostDataSeeder.cs @@ -212,6 +212,11 @@ public class HostDataSeeder : IDataSeedContributor, ITransientDependency .ToListAsync()) .ToHashSet(); + var countryGroupNames = (await dbCtx.Set() + .Select(c => c.Name) + .ToListAsync()) + .ToHashSet(); + var options = new JsonSerializerOptions { PropertyNameCaseInsensitive = true }; using var fs = File.OpenRead(Path.Combine("Seeds", "Countries.json")); @@ -228,10 +233,19 @@ public class HostDataSeeder : IDataSeedContributor, ITransientDependency if (!seenCodes.Add(item.Name) || existingCodes.Contains(item.Name)) continue; + var groupName = string.IsNullOrWhiteSpace(item.GroupName) + ? null + : item.GroupName.Trim(); + + if (!string.IsNullOrWhiteSpace(groupName) && !countryGroupNames.Contains(groupName)) + { + groupName = null; + } + buffer.Add(new Country( item.Name, item.Name, - item.GroupName, + groupName, item.Currency, item.PhoneCode, item.TaxLabel diff --git a/api/src/Sozsoft.Platform.DbMigrator/Seeds/LanguagesData.json b/api/src/Sozsoft.Platform.DbMigrator/Seeds/LanguagesData.json index 0a45dd8..94441cd 100644 --- a/api/src/Sozsoft.Platform.DbMigrator/Seeds/LanguagesData.json +++ b/api/src/Sozsoft.Platform.DbMigrator/Seeds/LanguagesData.json @@ -18440,6 +18440,12 @@ "en": "Failed", "tr": "Başarısız" }, + { + "resourceName": "Platform", + "key": "App.DeveloperKit.DynamicServices.TotalDescription", + "en": "Number of failed services", + "tr": "Başarısız servislerin sayısı" + }, { "resourceName": "Platform", "key": "App.DeveloperKit.DynamicServices.FailedDescription", diff --git a/api/src/Sozsoft.Platform.DbMigrator/Seeds/ListFormSeeder_Administration.cs b/api/src/Sozsoft.Platform.DbMigrator/Seeds/ListFormSeeder_Administration.cs index d8f7c6a..5770498 100644 --- a/api/src/Sozsoft.Platform.DbMigrator/Seeds/ListFormSeeder_Administration.cs +++ b/api/src/Sozsoft.Platform.DbMigrator/Seeds/ListFormSeeder_Administration.cs @@ -4164,11 +4164,11 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Event)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = DefaultEditingOptionJson(listFormName, 750, 500, true, true, true, true, false, true), + EditingOptionJson = DefaultEditingOptionJson(listFormName, 900, 500, true, true, true, true, false, true), EditingFormJson = JsonSerializer.Serialize(new List() { new() { - Order = 1, ColCount = 4, ColSpan = 1, ItemType = "group", Items = + Order = 1, ColCount = 3, ColSpan = 1, ItemType = "group", Items = [ new EditingFormItemDto { Order = 1, DataField = "CategoryId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 2, DataField = "TypeId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, @@ -4178,7 +4178,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep new EditingFormItemDto { Order = 6, DataField = "UserId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 7, DataField = "Status", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 8, DataField = "ParticipantsCount", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox }, - new EditingFormItemDto { Order = 9, DataField = "Description", ColSpan = 2, EditorType2 = EditorTypes.dxTextArea }, + new EditingFormItemDto { Order = 9, DataField = "Description", ColSpan = 2, EditorType2 = EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 10, DataField = "Photos", ColSpan = 1, EditorType2 = EditorTypes.dxImageUpload, EditorOptions = EditorOptionValues.ImageUploadOptions }, ]} }), diff --git a/api/src/Sozsoft.Platform.DbMigrator/Seeds/PostgresData/Adm_T_DatabaseBackupAll.sql b/api/src/Sozsoft.Platform.DbMigrator/Seeds/PostgresData/Adm_T_DatabaseBackupAll.sql new file mode 100644 index 0000000..e268bbe --- /dev/null +++ b/api/src/Sozsoft.Platform.DbMigrator/Seeds/PostgresData/Adm_T_DatabaseBackupAll.sql @@ -0,0 +1,7 @@ +CREATE OR REPLACE PROCEDURE public."Adm_T_DatabaseBackupAll"() +LANGUAGE plpgsql +AS $$ +BEGIN + RAISE NOTICE 'PostgreSQL backup must be performed with pg_dump/pg_dumpall or an external backup service.'; +END; +$$; diff --git a/api/src/Sozsoft.Platform.DbMigrator/Seeds/PostgresData/Adm_T_DatabaseBackupFilesDeleteAll.sql b/api/src/Sozsoft.Platform.DbMigrator/Seeds/PostgresData/Adm_T_DatabaseBackupFilesDeleteAll.sql new file mode 100644 index 0000000..b64195f --- /dev/null +++ b/api/src/Sozsoft.Platform.DbMigrator/Seeds/PostgresData/Adm_T_DatabaseBackupFilesDeleteAll.sql @@ -0,0 +1,7 @@ +CREATE OR REPLACE PROCEDURE public."Adm_T_DatabaseBackupFilesDeleteAll"() +LANGUAGE plpgsql +AS $$ +BEGIN + RAISE NOTICE 'PostgreSQL backup file cleanup must be performed by the host/container scheduler.'; +END; +$$; diff --git a/api/src/Sozsoft.Platform.DbMigrator/Seeds/PostgresData/Sas_H_BackgroundWorker_JobFlow.sql b/api/src/Sozsoft.Platform.DbMigrator/Seeds/PostgresData/Sas_H_BackgroundWorker_JobFlow.sql new file mode 100644 index 0000000..7d83419 --- /dev/null +++ b/api/src/Sozsoft.Platform.DbMigrator/Seeds/PostgresData/Sas_H_BackgroundWorker_JobFlow.sql @@ -0,0 +1,103 @@ +DO $$ +BEGIN + IF to_regclass('hangfire.job') IS NULL + OR to_regclass('hangfire.jobparameter') IS NULL + OR to_regclass('hangfire.state') IS NULL THEN + RAISE NOTICE 'Hangfire PostgreSQL tables were not found. Sas_H_BackgroundWorker_JobFlow view creation skipped.'; + RETURN; + END IF; + + EXECUTE $view$ +CREATE OR REPLACE VIEW public."Sas_H_BackgroundWorker_JobFlow" AS +SELECT + j.id AS "Id", + COALESCE(p."RecurringJobId", 'OneTimeJob') AS "JobName", + COALESCE(prc."ProcessingAt", enq."EnqueuedAt", j.createdat) AS "ExecutionDate", + CASE + WHEN suc."DurationMs" IS NOT NULL THEN suc."DurationMs" + WHEN prc."ProcessingAt" IS NOT NULL AND suc."SucceededAt" IS NOT NULL + THEN (EXTRACT(EPOCH FROM (suc."SucceededAt" - prc."ProcessingAt")) * 1000)::bigint + WHEN prc."ProcessingAt" IS NOT NULL AND fld."FailedAt" IS NOT NULL + THEN (EXTRACT(EPOCH FROM (fld."FailedAt" - prc."ProcessingAt")) * 1000)::bigint + ELSE NULL + END AS "Duration", + j.statename AS "Status", + CASE + WHEN j.statename = 'Failed' THEN COALESCE( + fld."ExceptionMessage", + fld."FailedReason", + fld."ExceptionType", + 'Unknown error' + ) + ELSE NULL + END AS "FailureReason", + fld."ExceptionType", + fld."ExceptionDetails" +FROM hangfire.job j +LEFT JOIN hangfire.jobqueue jq + ON jq.jobid = j.id +LEFT JOIN LATERAL +( + SELECT + MAX(CASE + WHEN jp.name = 'RecurringJobId' + THEN REPLACE(jp.value, '"', '') + END) AS "RecurringJobId" + FROM hangfire.jobparameter jp + WHERE jp.jobid = j.id +) p ON TRUE +LEFT JOIN LATERAL +( + SELECT + s.createdat AS "EnqueuedAt", + s.reason AS "EnqueuedReason", + s.data::jsonb ->> 'Queue' AS "QueueName" + FROM hangfire.state s + WHERE s.jobid = j.id + AND s.name = 'Enqueued' + ORDER BY s.createdat DESC + LIMIT 1 +) enq ON TRUE +LEFT JOIN LATERAL +( + SELECT + s.createdat AS "ProcessingAt", + s.reason AS "ProcessingReason", + s.data::jsonb ->> 'ServerId' AS "ServerName", + s.data::jsonb ->> 'WorkerId' AS "WorkerId" + FROM hangfire.state s + WHERE s.jobid = j.id + AND s.name = 'Processing' + ORDER BY s.createdat DESC + LIMIT 1 +) prc ON TRUE +LEFT JOIN LATERAL +( + SELECT + s.createdat AS "SucceededAt", + s.reason AS "SucceededReason", + NULLIF(s.data::jsonb ->> 'PerformanceDuration', '')::bigint AS "DurationMs" + FROM hangfire.state s + WHERE s.jobid = j.id + AND s.name = 'Succeeded' + ORDER BY s.createdat DESC + LIMIT 1 +) suc ON TRUE +LEFT JOIN LATERAL +( + SELECT + s.createdat AS "FailedAt", + s.reason AS "FailedReason", + s.data::jsonb ->> 'ExceptionType' AS "ExceptionType", + s.data::jsonb ->> 'ExceptionMessage' AS "ExceptionMessage", + s.data::jsonb ->> 'ExceptionDetails' AS "ExceptionDetails" + FROM hangfire.state s + WHERE s.jobid = j.id + AND s.name = 'Failed' + ORDER BY s.createdat DESC + LIMIT 1 +) fld ON TRUE +WHERE COALESCE(j.invocationdata::jsonb ->> 'Method', '') <> 'DoWorkAsync' +$view$; +END; +$$; diff --git a/api/src/Sozsoft.Platform.DbMigrator/Seeds/SqlDataSeeder.cs b/api/src/Sozsoft.Platform.DbMigrator/Seeds/SqlDataSeeder.cs index 27ab116..d4a2ce7 100644 --- a/api/src/Sozsoft.Platform.DbMigrator/Seeds/SqlDataSeeder.cs +++ b/api/src/Sozsoft.Platform.DbMigrator/Seeds/SqlDataSeeder.cs @@ -9,6 +9,7 @@ using Sozsoft.Platform.EntityFrameworkCore; using Volo.Abp.Data; using Volo.Abp.DependencyInjection; using Volo.Abp.EntityFrameworkCore; +using static Sozsoft.Settings.SettingsConsts; namespace Sozsoft.Platform.Data.Seeds; @@ -32,10 +33,11 @@ public class SqlDataSeeder : IDataSeedContributor, ITransientDependency public async Task SeedAsync(DataSeedContext context) { - var sqlDataPath = Path.Combine(Directory.GetCurrentDirectory(), "Seeds", "SqlData"); + var dataDirectoryName = GetDataDirectoryName(); + var sqlDataPath = Path.Combine(Directory.GetCurrentDirectory(), "Seeds", dataDirectoryName); if (!Directory.Exists(sqlDataPath)) { - _logger.LogInformation("Seeds/SqlData directory not found, skipping SqlDataSeeder."); + _logger.LogInformation("Seeds/{DirectoryName} directory not found, skipping SqlDataSeeder.", dataDirectoryName); return; } @@ -45,11 +47,15 @@ public class SqlDataSeeder : IDataSeedContributor, ITransientDependency if (sqlFiles.Length == 0) { - _logger.LogInformation("No .sql files found in Seeds/SqlData directory, skipping SqlDataSeeder."); + _logger.LogInformation("No .sql files found in Seeds/{DirectoryName} directory, skipping SqlDataSeeder.", dataDirectoryName); return; } - _logger.LogInformation("SqlDataSeeder started. {Count} file(s) to be processed.", sqlFiles.Length); + _logger.LogInformation( + "SqlDataSeeder started for provider '{Provider}' from Seeds/{DirectoryName}. {Count} file(s) to be processed.", + DefaultDatabaseProvider, + dataDirectoryName, + sqlFiles.Length); var dbContext = await _dbContextProvider.GetDbContextAsync(); @@ -98,6 +104,13 @@ public class SqlDataSeeder : IDataSeedContributor, ITransientDependency _logger.LogInformation("SqlDataSeeder completed. {Count} file(s) processed.", sqlFiles.Length); } + private static string GetDataDirectoryName() + { + return DefaultDatabaseProvider == DatabaseProvider.PostgreSql + ? "PostgresData" + : "SqlData"; + } + private static (string Action, string? ObjectName, string? ObjectType) ExtractSqlInfo(string sql) { var patterns = new[] diff --git a/api/src/Sozsoft.Platform.DbMigrator/Sozsoft.Platform.DbMigrator.csproj b/api/src/Sozsoft.Platform.DbMigrator/Sozsoft.Platform.DbMigrator.csproj index d96c6ae..de9f498 100644 --- a/api/src/Sozsoft.Platform.DbMigrator/Sozsoft.Platform.DbMigrator.csproj +++ b/api/src/Sozsoft.Platform.DbMigrator/Sozsoft.Platform.DbMigrator.csproj @@ -85,6 +85,10 @@ PreserveNewest Always + + PreserveNewest + Always + diff --git a/api/src/Sozsoft.Platform.Domain.Shared/PlatformConsts.cs b/api/src/Sozsoft.Platform.Domain.Shared/PlatformConsts.cs index 0535e01..ecea6a7 100644 --- a/api/src/Sozsoft.Platform.Domain.Shared/PlatformConsts.cs +++ b/api/src/Sozsoft.Platform.Domain.Shared/PlatformConsts.cs @@ -162,7 +162,7 @@ public static class PlatformConsts public const string AdminRoleName = "admin"; public const string AdminNameDefaultValue = "Sedat"; public const string AdminSurNameDefaultValue = "ÖZTÜRK"; - public const string AdminEmailDefaultValue = "system@sozsoft.com"; + public const string AdminEmailDefaultValue = "SYSTEM@SOZSOFT.COM"; public const string AdminPasswordDefaultValue = "1q2w3E*"; public const string AdminPhoneNumberDefaultValue = "05449476346"; public const string AdminRocketUsernameDefaultValue = "sedat.ozturk"; diff --git a/api/src/Sozsoft.Platform.EntityFrameworkCore/DeveloperKit/PlatformDynamicEntityManager.cs b/api/src/Sozsoft.Platform.EntityFrameworkCore/DeveloperKit/PlatformDynamicEntityManager.cs index ec89fb2..d65e84e 100644 --- a/api/src/Sozsoft.Platform.EntityFrameworkCore/DeveloperKit/PlatformDynamicEntityManager.cs +++ b/api/src/Sozsoft.Platform.EntityFrameworkCore/DeveloperKit/PlatformDynamicEntityManager.cs @@ -21,47 +21,57 @@ public class DynamicEntityManager : IDynamicEntityManager public async Task?> GetEntityListAsync(string entityName) { + var dbContext = await _dbContextProvider.GetDbContextAsync(); + var isPostgreSql = IsPostgreSql(dbContext); + var tableName = QuoteIdentifier(entityName, isPostgreSql); + var idDeletedColumn = QuoteIdentifier("IsDeleted", isPostgreSql); var hasIsDeleted = await ColumnExistsAsync(entityName, "IsDeleted"); var query = hasIsDeleted - ? $"SELECT * FROM [{entityName}] WHERE IsDeleted = 0 OR IsDeleted IS NULL" - : $"SELECT * FROM [{entityName}]"; + ? $"SELECT * FROM {tableName} WHERE {idDeletedColumn} = {FalseLiteral(isPostgreSql)} OR {idDeletedColumn} IS NULL" + : $"SELECT * FROM {tableName}"; return await ExecuteRawQueryAsync(query); } public async Task GetEntityByIdAsync(string entityName, Guid id) { + var dbContext = await _dbContextProvider.GetDbContextAsync(); + var isPostgreSql = IsPostgreSql(dbContext); + var tableName = QuoteIdentifier(entityName, isPostgreSql); + var idColumn = QuoteIdentifier("Id", isPostgreSql); + var isDeletedColumn = QuoteIdentifier("IsDeleted", isPostgreSql); var hasIsDeleted = await ColumnExistsAsync(entityName, "IsDeleted"); var query = hasIsDeleted - ? $"SELECT * FROM [{entityName}] WHERE Id = '{id}' AND (IsDeleted = 0 OR IsDeleted IS NULL)" - : $"SELECT * FROM [{entityName}] WHERE Id = '{id}'"; + ? $"SELECT * FROM {tableName} WHERE {idColumn} = '{id}' AND ({isDeletedColumn} = {FalseLiteral(isPostgreSql)} OR {isDeletedColumn} IS NULL)" + : $"SELECT * FROM {tableName} WHERE {idColumn} = '{id}'"; var result = await ExecuteRawQueryAsync(query); return result?.FirstOrDefault(); } public async Task CreateEntityAsync(string entityName, JsonElement data) { + var dbContext = await _dbContextProvider.GetDbContextAsync(); + var isPostgreSql = IsPostgreSql(dbContext); var newId = Guid.NewGuid(); var hasIsDeleted = await ColumnExistsAsync(entityName, "IsDeleted"); var hasCreationTime = await ColumnExistsAsync(entityName, "CreationTime"); - var columns = new List { "[Id]" }; + var columns = new List { QuoteIdentifier("Id", isPostgreSql) }; var values = new List { $"'{newId}'" }; - if (hasCreationTime) { columns.Add("[CreationTime]"); values.Add("SYSUTCDATETIME()"); } - if (hasIsDeleted) { columns.Add("[IsDeleted]"); values.Add("0"); } + if (hasCreationTime) { columns.Add(QuoteIdentifier("CreationTime", isPostgreSql)); values.Add(UtcNowExpression(isPostgreSql)); } + if (hasIsDeleted) { columns.Add(QuoteIdentifier("IsDeleted", isPostgreSql)); values.Add(FalseLiteral(isPostgreSql)); } foreach (var prop in data.EnumerateObject()) { if (prop.NameEquals("id") || prop.NameEquals("Id")) continue; - columns.Add($"[{prop.Name}]"); - values.Add(FormatValueForSql(prop.Value)); + columns.Add(QuoteIdentifier(prop.Name, isPostgreSql)); + values.Add(FormatValueForSql(prop.Value, isPostgreSql)); } - var insertQuery = $"INSERT INTO [{entityName}] ({string.Join(", ", columns)}) VALUES ({string.Join(", ", values)})"; + var insertQuery = $"INSERT INTO {QuoteIdentifier(entityName, isPostgreSql)} ({string.Join(", ", columns)}) VALUES ({string.Join(", ", values)})"; - var dbContext = await _dbContextProvider.GetDbContextAsync(); await dbContext.Database.ExecuteSqlRawAsync(insertQuery); return await GetEntityByIdAsync(entityName, newId); @@ -69,6 +79,8 @@ public class DynamicEntityManager : IDynamicEntityManager public async Task UpdateEntityAsync(string entityName, Guid id, JsonElement data) { + var dbContext = await _dbContextProvider.GetDbContextAsync(); + var isPostgreSql = IsPostgreSql(dbContext); var existing = await GetEntityByIdAsync(entityName, id); if (existing == null) return null; @@ -77,19 +89,18 @@ public class DynamicEntityManager : IDynamicEntityManager var hasLastModification = await ColumnExistsAsync(entityName, "LastModificationTime"); if (hasLastModification) - setParts.Add("[LastModificationTime] = SYSUTCDATETIME()"); + setParts.Add($"{QuoteIdentifier("LastModificationTime", isPostgreSql)} = {UtcNowExpression(isPostgreSql)}"); foreach (var prop in data.EnumerateObject()) { if (prop.NameEquals("id") || prop.NameEquals("Id")) continue; - setParts.Add($"[{prop.Name}] = {FormatValueForSql(prop.Value)}"); + setParts.Add($"{QuoteIdentifier(prop.Name, isPostgreSql)} = {FormatValueForSql(prop.Value, isPostgreSql)}"); } - var updateQuery = $"UPDATE [{entityName}] SET {string.Join(", ", setParts)} WHERE Id = '{id}'"; + var updateQuery = $"UPDATE {QuoteIdentifier(entityName, isPostgreSql)} SET {string.Join(", ", setParts)} WHERE {QuoteIdentifier("Id", isPostgreSql)} = '{id}'"; - var dbContext = await _dbContextProvider.GetDbContextAsync(); await dbContext.Database.ExecuteSqlRawAsync(updateQuery); return await GetEntityByIdAsync(entityName, id); @@ -102,6 +113,7 @@ public class DynamicEntityManager : IDynamicEntityManager return false; var dbContext = await _dbContextProvider.GetDbContextAsync(); + var isPostgreSql = IsPostgreSql(dbContext); var hasIsDeleted = await ColumnExistsAsync(entityName, "IsDeleted"); try @@ -110,21 +122,21 @@ public class DynamicEntityManager : IDynamicEntityManager { var hasDeletionTime = await ColumnExistsAsync(entityName, "DeletionTime"); var softDeleteQuery = hasDeletionTime - ? $"UPDATE [{entityName}] SET [IsDeleted] = 1, [DeletionTime] = SYSUTCDATETIME() WHERE Id = '{id}'" - : $"UPDATE [{entityName}] SET [IsDeleted] = 1 WHERE Id = '{id}'"; + ? $"UPDATE {QuoteIdentifier(entityName, isPostgreSql)} SET {QuoteIdentifier("IsDeleted", isPostgreSql)} = {TrueLiteral(isPostgreSql)}, {QuoteIdentifier("DeletionTime", isPostgreSql)} = {UtcNowExpression(isPostgreSql)} WHERE {QuoteIdentifier("Id", isPostgreSql)} = '{id}'" + : $"UPDATE {QuoteIdentifier(entityName, isPostgreSql)} SET {QuoteIdentifier("IsDeleted", isPostgreSql)} = {TrueLiteral(isPostgreSql)} WHERE {QuoteIdentifier("Id", isPostgreSql)} = '{id}'"; var affected = await dbContext.Database.ExecuteSqlRawAsync(softDeleteQuery); return affected > 0; } else { - var hardDeleteQuery = $"DELETE FROM [{entityName}] WHERE Id = '{id}'"; + var hardDeleteQuery = $"DELETE FROM {QuoteIdentifier(entityName, isPostgreSql)} WHERE {QuoteIdentifier("Id", isPostgreSql)} = '{id}'"; var affected = await dbContext.Database.ExecuteSqlRawAsync(hardDeleteQuery); return affected > 0; } } catch { - var hardDeleteQuery = $"DELETE FROM [{entityName}] WHERE Id = '{id}'"; + var hardDeleteQuery = $"DELETE FROM {QuoteIdentifier(entityName, isPostgreSql)} WHERE {QuoteIdentifier("Id", isPostgreSql)} = '{id}'"; var affected = await dbContext.Database.ExecuteSqlRawAsync(hardDeleteQuery); return affected > 0; } @@ -132,8 +144,11 @@ public class DynamicEntityManager : IDynamicEntityManager private async Task ColumnExistsAsync(string tableName, string columnName) { - var query = $"SELECT COUNT(1) FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = '{tableName}' AND COLUMN_NAME = '{columnName}'"; var dbContext = await _dbContextProvider.GetDbContextAsync(); + var isPostgreSql = IsPostgreSql(dbContext); + var query = isPostgreSql + ? $"SELECT COUNT(1) FROM information_schema.columns WHERE table_schema NOT IN ('pg_catalog', 'information_schema') AND table_name = '{tableName.Replace("'", "''")}' AND column_name = '{columnName.Replace("'", "''")}'" + : $"SELECT COUNT(1) FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = '{tableName.Replace("'", "''")}' AND COLUMN_NAME = '{columnName.Replace("'", "''")}'"; var connection = dbContext.Database.GetDbConnection(); await dbContext.Database.OpenConnectionAsync(); try @@ -181,14 +196,14 @@ public class DynamicEntityManager : IDynamicEntityManager } } - private static string FormatValueForSql(JsonElement value) + private static string FormatValueForSql(JsonElement value, bool isPostgreSql) { return value.ValueKind switch { JsonValueKind.Number when value.TryGetInt64(out var l) => l.ToString(), JsonValueKind.Number when value.TryGetDecimal(out var d) => d.ToString(System.Globalization.CultureInfo.InvariantCulture), - JsonValueKind.True => "1", - JsonValueKind.False => "0", + JsonValueKind.True => TrueLiteral(isPostgreSql), + JsonValueKind.False => FalseLiteral(isPostgreSql), JsonValueKind.Null => "NULL", JsonValueKind.String when value.TryGetGuid(out var g) => $"'{g}'", JsonValueKind.String when value.TryGetDateTime(out var dt) => $"'{dt:yyyy-MM-dd HH:mm:ss}'", @@ -196,5 +211,32 @@ public class DynamicEntityManager : IDynamicEntityManager _ => "NULL", }; } + + private static bool IsPostgreSql(PlatformDbContext dbContext) + { + return dbContext.Database.ProviderName?.Contains("Npgsql", StringComparison.OrdinalIgnoreCase) == true; + } + + private static string QuoteIdentifier(string identifier, bool isPostgreSql) + { + return isPostgreSql + ? $"\"{identifier.Replace("\"", "\"\"")}\"" + : $"[{identifier.Replace("]", "]]")}]"; + } + + private static string TrueLiteral(bool isPostgreSql) + { + return isPostgreSql ? "TRUE" : "1"; + } + + private static string FalseLiteral(bool isPostgreSql) + { + return isPostgreSql ? "FALSE" : "0"; + } + + private static string UtcNowExpression(bool isPostgreSql) + { + return isPostgreSql ? "NOW() AT TIME ZONE 'UTC'" : "SYSUTCDATETIME()"; + } } diff --git a/api/src/Sozsoft.Platform.EntityFrameworkCore/DynamicData/PgDynamicDataRepository.cs b/api/src/Sozsoft.Platform.EntityFrameworkCore/DynamicData/PgDynamicDataRepository.cs index daa91eb..97c005d 100644 --- a/api/src/Sozsoft.Platform.EntityFrameworkCore/DynamicData/PgDynamicDataRepository.cs +++ b/api/src/Sozsoft.Platform.EntityFrameworkCore/DynamicData/PgDynamicDataRepository.cs @@ -2,9 +2,13 @@ using System.Collections.Generic; using System.Data; using System.Data.Common; +using System.Globalization; +using System.Linq; +using System.Text.Json; using System.Threading.Tasks; using Dapper; using Sozsoft.Platform.DynamicData; +using Sozsoft.Platform; using Npgsql; using Volo.Abp.DependencyInjection; using Volo.Abp.Threading; @@ -20,6 +24,10 @@ public class PgDynamicDataRepository : IDynamicDataRepository, IScopedDependency private readonly Dictionary _transactions; private readonly Dictionary _connections; + private readonly HashSet _registeredTransactions; + private readonly HashSet _registeredConnections; + private readonly object _lock = new object(); + public bool IsDisposed { get; private set; } public PgDynamicDataRepository( @@ -30,6 +38,8 @@ public class PgDynamicDataRepository : IDynamicDataRepository, IScopedDependency _cancellationTokenProvider = cancellationTokenProvider; _transactions = []; _connections = []; + _registeredTransactions = []; + _registeredConnections = []; } private string BuildKey(string cs) @@ -41,44 +51,72 @@ public class PgDynamicDataRepository : IDynamicDataRepository, IScopedDependency private async Task GetOrCreateConnectionAsync(string cs) { var key = BuildKey(cs); - if (!_connections.TryGetValue(key, out var connection)) + NpgsqlConnection connection; + + lock (_lock) { - connection = new NpgsqlConnection(cs); - _connections[key] = connection; + if (_connections.TryGetValue(key, out connection)) + { + // varsa aynı connection'ı kullan + } + else + { + connection = new NpgsqlConnection(cs); + _connections[key] = connection; + } } + // Lock dışında state yönetimi if (connection.State == ConnectionState.Broken) { connection.Close(); } - if (connection.State != ConnectionState.Open) + if (connection.State == ConnectionState.Closed) { await connection.OpenAsync(_cancellationTokenProvider.FallbackToProvider(default)); } + // UoW tamamlandığında connection'ı kapatmak için tek seferlik kayıt if (_unitOfWorkManager.Current != null) { - _unitOfWorkManager.Current.OnCompleted(async () => + lock (_lock) { - if (_connections.TryGetValue(key, out var conn)) + if (!_registeredConnections.Contains(key)) { - _connections.Remove(key); + _registeredConnections.Add(key); - try + _unitOfWorkManager.Current.OnCompleted(async () => { - if (conn.State != ConnectionState.Closed) + NpgsqlConnection conn = null; + lock (_lock) { - await conn.CloseAsync(); + if (_connections.TryGetValue(key, out conn)) + { + _connections.Remove(key); + } + + _registeredConnections.Remove(key); } - conn.Dispose(); - } - catch - { - // ignore - } + + if (conn != null) + { + try + { + if (conn.State != ConnectionState.Closed) + { + await conn.CloseAsync(); + } + conn.Dispose(); + } + catch + { + // ignore + } + } + }); } - }); + } } return connection; @@ -88,44 +126,62 @@ public class PgDynamicDataRepository : IDynamicDataRepository, IScopedDependency { var key = BuildKey(cs); - if (_transactions.TryGetValue(key, out var tx)) + lock (_lock) { - if (tx?.Connection != null && - tx.Connection == con && - tx.Connection.State == ConnectionState.Open) + if (_transactions.TryGetValue(key, out var existing)) { - return tx; - } + if (existing?.Connection != null && + existing.Connection == con && + existing.Connection.State == ConnectionState.Open) + { + return existing; + } - try { tx?.Dispose(); } catch { } - _transactions.Remove(key); + try { existing?.Dispose(); } catch { } + _transactions.Remove(key); + } } - var newTx = await con.BeginTransactionAsync(_cancellationTokenProvider.FallbackToProvider(default)); - _transactions[key] = newTx; + var newTransaction = await con.BeginTransactionAsync(_cancellationTokenProvider.FallbackToProvider(default)); + bool shouldRegister = false; - if (_unitOfWorkManager.Current != null) + lock (_lock) + { + _transactions[key] = newTransaction; + + if (!_registeredTransactions.Contains(key)) + { + _registeredTransactions.Add(key); + shouldRegister = true; + } + } + + if (shouldRegister && _unitOfWorkManager.Current != null) { _unitOfWorkManager.Current.AddTransactionApi( key, - new DapperTransactionApi(newTx, _cancellationTokenProvider) + new DapperTransactionApi(newTransaction, _cancellationTokenProvider) ); _unitOfWorkManager.Current.OnCompleted(() => { - _transactions.Remove(key); + lock (_lock) + { + _transactions.Remove(key); + _registeredTransactions.Remove(key); + } return Task.CompletedTask; }); } - return newTx; + return newTransaction; } // ------------------ Dapper metotları ------------------ public virtual async Task> QueryAsync(string sql, string cs, Dictionary parameters = null) { - var param = new DynamicParameters(parameters); + var param = CreateDynamicParameters(parameters); var dbConnection = await GetOrCreateConnectionAsync(cs); var transaction = await GetOrCreateTransactionAsync(dbConnection, cs); @@ -135,7 +191,7 @@ public class PgDynamicDataRepository : IDynamicDataRepository, IScopedDependency public virtual async Task> QueryAsync(string sql, string cs, Dictionary parameters = null) { - var param = new DynamicParameters(parameters); + var param = CreateDynamicParameters(parameters); var dbConnection = await GetOrCreateConnectionAsync(cs); var transaction = await GetOrCreateTransactionAsync(dbConnection, cs); @@ -144,7 +200,7 @@ public class PgDynamicDataRepository : IDynamicDataRepository, IScopedDependency public virtual async Task QuerySingleAsync(string sql, string cs, Dictionary parameters = null) { - var param = new DynamicParameters(parameters); + var param = CreateDynamicParameters(parameters); var dbConnection = await GetOrCreateConnectionAsync(cs); var transaction = await GetOrCreateTransactionAsync(dbConnection, cs); @@ -153,7 +209,7 @@ public class PgDynamicDataRepository : IDynamicDataRepository, IScopedDependency public virtual async Task ExecuteScalarAsync(string sql, string cs, Dictionary parameters = null) { - var param = new DynamicParameters(parameters); + var param = CreateDynamicParameters(parameters); var dbConnection = await GetOrCreateConnectionAsync(cs); var transaction = await GetOrCreateTransactionAsync(dbConnection, cs); @@ -184,13 +240,257 @@ public class PgDynamicDataRepository : IDynamicDataRepository, IScopedDependency public virtual async Task ExecuteAsync(string sql, string cs, Dictionary parameters = null) { - var param = new DynamicParameters(parameters); + var param = CreateDynamicParameters(parameters); var dbConnection = await GetOrCreateConnectionAsync(cs); var transaction = await GetOrCreateTransactionAsync(dbConnection, cs); return await dbConnection.ExecuteAsync(sql, param, transaction); } + private static DynamicParameters CreateDynamicParameters(Dictionary parameters) + { + var dynamicParameters = new DynamicParameters(); + + if (parameters == null) + { + return dynamicParameters; + } + + foreach (var parameter in parameters) + { + dynamicParameters.Add(parameter.Key, NormalizeParameterValue(parameter.Value)); + } + + return dynamicParameters; + } + + private static object NormalizeParameterValue(object value) + { + if (value == null || value == DBNull.Value) + { + return value; + } + + if (value is JsonElement jsonElement) + { + return NormalizeJsonElement(jsonElement); + } + + if (value is Array array && value is not byte[]) + { + return NormalizeArrayParameter(array); + } + + return value; + } + + private static object NormalizeArrayParameter(Array values) + { + var normalizedValues = values + .Cast() + .Select(NormalizeParameterValue) + .Where(value => value != null && value != DBNull.Value) + .ToArray(); + + if (normalizedValues.Length == 0) + { + return Array.Empty(); + } + + if (TryBuildGuidArray(normalizedValues, out var guidValues)) + { + return guidValues; + } + + if (TryBuildIntArray(normalizedValues, out var intValues)) + { + return intValues; + } + + if (TryBuildLongArray(normalizedValues, out var longValues)) + { + return longValues; + } + + if (TryBuildDecimalArray(normalizedValues, out var decimalValues)) + { + return decimalValues; + } + + if (TryBuildBoolArray(normalizedValues, out var boolValues)) + { + return boolValues; + } + + if (TryBuildDateTimeOffsetArray(normalizedValues, out var dateTimeOffsetValues)) + { + return dateTimeOffsetValues; + } + + var stringValues = normalizedValues.Select(value => value.ToString()).ToArray(); + + if (stringValues.Length == 1 && stringValues[0]?.Contains(PlatformConsts.MultiValueDelimiter) == true) + { + return stringValues[0].Split(PlatformConsts.MultiValueDelimiter, StringSplitOptions.RemoveEmptyEntries); + } + + return stringValues; + } + + private static object NormalizeJsonElement(JsonElement value) + { + return value.ValueKind switch + { + JsonValueKind.String => value.GetString(), + JsonValueKind.Number when value.TryGetInt32(out var intValue) => intValue, + JsonValueKind.Number when value.TryGetInt64(out var longValue) => longValue, + JsonValueKind.Number when value.TryGetDecimal(out var decimalValue) => decimalValue, + JsonValueKind.True => true, + JsonValueKind.False => false, + JsonValueKind.Null => null, + JsonValueKind.Undefined => null, + _ => value.ToString() + }; + } + + private static bool TryBuildGuidArray(object[] values, out Guid[] result) + { + result = new Guid[values.Length]; + + for (var i = 0; i < values.Length; i++) + { + if (values[i] is Guid guidValue) + { + result[i] = guidValue; + continue; + } + + if (!Guid.TryParse(values[i]?.ToString(), out result[i])) + { + result = null; + return false; + } + } + + return true; + } + + private static bool TryBuildIntArray(object[] values, out int[] result) + { + result = new int[values.Length]; + + for (var i = 0; i < values.Length; i++) + { + if (values[i] is int intValue) + { + result[i] = intValue; + continue; + } + + if (!int.TryParse(values[i]?.ToString(), NumberStyles.Integer, CultureInfo.InvariantCulture, out result[i])) + { + result = null; + return false; + } + } + + return true; + } + + private static bool TryBuildLongArray(object[] values, out long[] result) + { + result = new long[values.Length]; + + for (var i = 0; i < values.Length; i++) + { + if (values[i] is long longValue) + { + result[i] = longValue; + continue; + } + + if (!long.TryParse(values[i]?.ToString(), NumberStyles.Integer, CultureInfo.InvariantCulture, out result[i])) + { + result = null; + return false; + } + } + + return true; + } + + private static bool TryBuildDecimalArray(object[] values, out decimal[] result) + { + result = new decimal[values.Length]; + + for (var i = 0; i < values.Length; i++) + { + if (values[i] is decimal decimalValue) + { + result[i] = decimalValue; + continue; + } + + if (!decimal.TryParse(values[i]?.ToString(), NumberStyles.Any, CultureInfo.InvariantCulture, out result[i])) + { + result = null; + return false; + } + } + + return true; + } + + private static bool TryBuildBoolArray(object[] values, out bool[] result) + { + result = new bool[values.Length]; + + for (var i = 0; i < values.Length; i++) + { + if (values[i] is bool boolValue) + { + result[i] = boolValue; + continue; + } + + if (!bool.TryParse(values[i]?.ToString(), out result[i])) + { + result = null; + return false; + } + } + + return true; + } + + private static bool TryBuildDateTimeOffsetArray(object[] values, out DateTimeOffset[] result) + { + result = new DateTimeOffset[values.Length]; + + for (var i = 0; i < values.Length; i++) + { + if (values[i] is DateTimeOffset dateTimeOffsetValue) + { + result[i] = dateTimeOffsetValue; + continue; + } + + if (values[i] is DateTime dateTimeValue) + { + result[i] = dateTimeValue; + continue; + } + + if (!DateTimeOffset.TryParse(values[i]?.ToString(), CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal, out result[i])) + { + result = null; + return false; + } + } + + return true; + } + // ------------------ Dispose ------------------ public void Dispose() @@ -208,31 +508,36 @@ public class PgDynamicDataRepository : IDynamicDataRepository, IScopedDependency if (disposing) { - foreach (var tx in _transactions.Values) + lock (_lock) { - try { tx?.Dispose(); } catch { } - } - _transactions.Clear(); - - foreach (var connection in _connections.Values) - { - try + foreach (var tx in _transactions.Values) { - if (connection != null) + try { tx?.Dispose(); } catch { } + } + _transactions.Clear(); + _registeredTransactions.Clear(); + + foreach (var connection in _connections.Values) + { + try { - if (connection.State != ConnectionState.Closed) + if (connection != null) { - connection.Close(); + if (connection.State != ConnectionState.Closed) + { + connection.Close(); + } + connection.Dispose(); } - connection.Dispose(); + } + catch + { + // ignore } } - catch - { - // ignore - } + _connections.Clear(); + _registeredConnections.Clear(); } - _connections.Clear(); } IsDisposed = true; diff --git a/api/src/Sozsoft.Platform.EntityFrameworkCore/EntityFrameworkCore/EntityFrameworkCorePlatformDbSchemaMigrator.cs b/api/src/Sozsoft.Platform.EntityFrameworkCore/EntityFrameworkCore/EntityFrameworkCorePlatformDbSchemaMigrator.cs index 206c93e..56c4093 100644 --- a/api/src/Sozsoft.Platform.EntityFrameworkCore/EntityFrameworkCore/EntityFrameworkCorePlatformDbSchemaMigrator.cs +++ b/api/src/Sozsoft.Platform.EntityFrameworkCore/EntityFrameworkCore/EntityFrameworkCorePlatformDbSchemaMigrator.cs @@ -4,6 +4,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.DependencyInjection; using Sozsoft.Platform.Data; using Volo.Abp.DependencyInjection; +using static Sozsoft.Settings.SettingsConsts; namespace Sozsoft.Platform.EntityFrameworkCore; @@ -26,10 +27,17 @@ public class EntityFrameworkCorePlatformDbSchemaMigrator * current scope. */ - await _serviceProvider + var database = _serviceProvider .GetRequiredService() - .Database - .MigrateAsync(); + .Database; + + if (DefaultDatabaseProvider == DatabaseProvider.PostgreSql) + { + await database.EnsureCreatedAsync(); + return; + } + + await database.MigrateAsync(); } } diff --git a/api/src/Sozsoft.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContext.cs b/api/src/Sozsoft.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContext.cs index 3134044..f838495 100644 --- a/api/src/Sozsoft.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContext.cs +++ b/api/src/Sozsoft.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContext.cs @@ -38,6 +38,8 @@ public class PlatformDbContext : IIdentityDbContext, ITenantManagementDbContext { + private readonly bool _isPostgreSql; + #region Saas public DbSet LogEntries { get; set; } public DbSet Tenants { get; set; } @@ -144,14 +146,15 @@ public class PlatformDbContext : public PlatformDbContext(DbContextOptions options) : base(options) { - + _isPostgreSql = options.Extensions.Any(extension => + extension.GetType().Namespace?.StartsWith("Npgsql.EntityFrameworkCore.PostgreSQL", StringComparison.Ordinal) == true); } protected override void ConfigureConventions(ModelConfigurationBuilder configurationBuilder) { base.ConfigureConventions(configurationBuilder); - if (DefaultDatabaseProvider == DatabaseProvider.PostgreSql) + if (_isPostgreSql) { configurationBuilder.Properties().UseCollation("tr-x-icu"); } @@ -1447,5 +1450,23 @@ public class PlatformDbContext : b.HasIndex(x => new { x.TenantId, x.Name }).IsUnique().HasFilter("[IsDeleted] = 0"); }); + + ConfigureProviderSpecificModel(builder); + } + + private void ConfigureProviderSpecificModel(ModelBuilder builder) + { + if (!_isPostgreSql) + { + return; + } + + foreach (var index in builder.Model.GetEntityTypes().SelectMany(entityType => entityType.GetIndexes())) + { + if (index.GetFilter() == "[IsDeleted] = 0") + { + index.SetFilter("\"IsDeleted\" = FALSE"); + } + } } } diff --git a/api/src/Sozsoft.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContextFactory.cs b/api/src/Sozsoft.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContextFactory.cs index 4b6b158..8630092 100644 --- a/api/src/Sozsoft.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContextFactory.cs +++ b/api/src/Sozsoft.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContextFactory.cs @@ -16,27 +16,45 @@ public class PlatformDbContextFactory : IDesignTimeDbContextFactory(); - switch (DefaultDatabaseProvider) + switch (databaseProvider) { case DatabaseProvider.PostgreSql: - //AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true); // PGSQL - builder.UseNpgsql(configuration.GetConnectionString(DefaultDatabaseProvider)); + AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true); + builder.UseNpgsql(configuration.GetConnectionString(DatabaseProvider.PostgreSql)); break; case DatabaseProvider.SqlServer: - builder.UseSqlServer(configuration.GetConnectionString(DefaultDatabaseProvider)); + builder.UseSqlServer(configuration.GetConnectionString(DatabaseProvider.SqlServer)); break; default: - throw new InvalidOperationException("Unsupported database provider configured."); + throw new InvalidOperationException($"Unsupported database provider configured: {databaseProvider}"); } return new PlatformDbContext(builder.Options); } + private static string GetDatabaseProvider(string[] args) + { + var provider = Environment.GetEnvironmentVariable("EF_DATABASE_PROVIDER"); + + for (var i = 0; i < args.Length; i++) + { + if (args[i].Equals("--provider", StringComparison.OrdinalIgnoreCase) && i + 1 < args.Length) + { + provider = args[i + 1]; + break; + } + } + + return string.IsNullOrWhiteSpace(provider) + ? DefaultDatabaseProvider + : provider; + } private static IConfigurationRoot BuildConfiguration() { diff --git a/api/src/Sozsoft.Platform.EntityFrameworkCore/Migrations/20260524210111_Initial.cs b/api/src/Sozsoft.Platform.EntityFrameworkCore/Migrations/20260524210111_Initial.cs deleted file mode 100644 index 05349ad..0000000 --- a/api/src/Sozsoft.Platform.EntityFrameworkCore/Migrations/20260524210111_Initial.cs +++ /dev/null @@ -1,4428 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace Sozsoft.Platform.Migrations -{ - /// - public partial class Initial : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "AbpAuditLogExcelFiles", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - FileName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpAuditLogExcelFiles", x => x.Id); - }); - - migrationBuilder.CreateTable( - 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(64)", maxLength: 64, nullable: true), - ImpersonatorUserId = table.Column(type: "uniqueidentifier", nullable: true), - ImpersonatorUserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - ImpersonatorTenantId = table.Column(type: "uniqueidentifier", nullable: true), - ImpersonatorTenantName = table.Column(type: "nvarchar(64)", maxLength: 64, 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: false), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpAuditLogs", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AbpBackgroundJobs", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - ApplicationName = table.Column(type: "nvarchar(96)", maxLength: 96, nullable: true), - JobName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - JobArgs = table.Column(type: "nvarchar(max)", maxLength: 1048576, nullable: false), - TryCount = table.Column(type: "smallint", nullable: false, defaultValue: (short)0), - CreationTime = table.Column(type: "datetime2", nullable: false), - NextTryTime = table.Column(type: "datetime2", nullable: false), - LastTryTime = table.Column(type: "datetime2", nullable: true), - IsAbandoned = table.Column(type: "bit", nullable: false, defaultValue: false), - Priority = table.Column(type: "tinyint", nullable: false, defaultValue: (byte)15), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: false), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpBackgroundJobs", x => x.Id); - }); - - migrationBuilder.CreateTable( - 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), - CreationTime = table.Column(type: "datetime2", nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: false), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpClaimTypes", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AbpFeatureGroups", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - DisplayName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpFeatureGroups", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AbpFeatures", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - GroupName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - ParentName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - DisplayName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), - Description = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - DefaultValue = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - IsVisibleToClients = table.Column(type: "bit", nullable: false), - IsAvailableToHost = table.Column(type: "bit", nullable: false), - AllowedProviders = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - ValueType = table.Column(type: "nvarchar(2048)", maxLength: 2048, nullable: true), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpFeatures", x => x.Id); - }); - - migrationBuilder.CreateTable( - 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) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpFeatureValues", x => x.Id); - }); - - migrationBuilder.CreateTable( - 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) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpLinkUsers", x => x.Id); - }); - - migrationBuilder.CreateTable( - 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), - EntityVersion = table.Column(type: "int", nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: false), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, 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_AbpOrganizationUnits", x => x.Id); - table.ForeignKey( - name: "FK_AbpOrganizationUnits_AbpOrganizationUnits_ParentId", - column: x => x.ParentId, - principalTable: "AbpOrganizationUnits", - principalColumn: "Id"); - }); - - migrationBuilder.CreateTable( - 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) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpPermissionGrants", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AbpPermissionGroups", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - DisplayName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpPermissionGroups", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AbpPermissions", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - GroupName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - ParentName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - DisplayName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), - IsEnabled = table.Column(type: "bit", nullable: false), - MultiTenancySide = table.Column(type: "tinyint", nullable: false), - Providers = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - StateCheckers = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - MenuGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpPermissions", x => x.Id); - }); - - migrationBuilder.CreateTable( - 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), - EntityVersion = table.Column(type: "int", nullable: false), - CreationTime = table.Column(type: "datetime2", nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: false), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpRoles", x => x.Id); - }); - - migrationBuilder.CreateTable( - 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: false), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpSecurityLogs", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AbpSessions", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - SessionId = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - Device = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - DeviceInfo = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - UserId = table.Column(type: "uniqueidentifier", nullable: false), - ClientId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - IpAddresses = table.Column(type: "nvarchar(2048)", maxLength: 2048, nullable: true), - SignedIn = table.Column(type: "datetime2", nullable: false), - LastAccessed = table.Column(type: "datetime2", nullable: true), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpSessions", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AbpSettingDefinitions", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - DisplayName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), - Description = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), - DefaultValue = table.Column(type: "nvarchar(2048)", maxLength: 2048, nullable: true), - IsVisibleToClients = table.Column(type: "bit", nullable: false), - Providers = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), - IsInherited = table.Column(type: "bit", nullable: false), - IsEncrypted = table.Column(type: "bit", nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpSettingDefinitions", x => x.Id); - }); - - migrationBuilder.CreateTable( - 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) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpSettings", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AbpTenants", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - NormalizedName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - EntityVersion = table.Column(type: "int", nullable: false), - Address1 = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - Address2 = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - City = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - Country = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - District = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - Email = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - FaxNumber = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), - Founder = table.Column(type: "nvarchar(max)", nullable: true), - IsActive = table.Column(type: "bit", nullable: false, defaultValue: true), - MaxConcurrentUsers = table.Column(type: "int", nullable: true, defaultValue: 0), - MenuGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - MobileNumber = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), - OrganizationName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - PhoneNumber = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), - PostalCode = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: true), - TaxOffice = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Township = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - VknTckn = table.Column(type: "bigint", nullable: true), - Website = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: false), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, 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_AbpTenants", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AbpUserDelegations", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - SourceUserId = table.Column(type: "uniqueidentifier", nullable: false), - TargetUserId = table.Column(type: "uniqueidentifier", nullable: false), - StartTime = table.Column(type: "datetime2", nullable: false), - EndTime = table.Column(type: "datetime2", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpUserDelegations", x => x.Id); - }); - - migrationBuilder.CreateTable( - 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), - ShouldChangePasswordOnNextLogin = table.Column(type: "bit", nullable: false), - EntityVersion = table.Column(type: "int", nullable: false), - LastPasswordChangeTime = table.Column(type: "datetimeoffset", nullable: true), - BirthDate = table.Column(type: "datetime2", nullable: true), - BirthPlace = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - BloodType = table.Column(type: "nvarchar(16)", maxLength: 16, nullable: true), - DepartmentId = table.Column(type: "uniqueidentifier", nullable: false), - District = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - EducationLevel = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - FamilySequenceNo = table.Column(type: "nvarchar(32)", maxLength: 32, nullable: true), - FatherName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - GraduationSchool = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - HireDate = table.Column(type: "datetime2", nullable: true), - HomeAddress = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), - IdentityNumber = table.Column(type: "nvarchar(15)", maxLength: 15, nullable: true), - IsVerified = table.Column(type: "bit", nullable: false, defaultValue: false), - IssuedDate = table.Column(type: "datetime2", nullable: true), - IssuedPlace = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - JobPositionId = table.Column(type: "uniqueidentifier", nullable: false), - LoginEndDate = table.Column(type: "datetime2", nullable: true), - MaritalStatus = table.Column(type: "nvarchar(32)", maxLength: 32, nullable: true), - MarriageDate = table.Column(type: "datetime2", nullable: true), - MotherName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - Nationality = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - Province = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - RocketUsername = table.Column(type: "nvarchar(max)", nullable: true), - SequenceNo = table.Column(type: "nvarchar(32)", maxLength: 32, nullable: true), - SerialNo = table.Column(type: "nvarchar(32)", maxLength: 32, nullable: true), - SskNo = table.Column(type: "nvarchar(32)", maxLength: 32, nullable: true), - TerminationDate = table.Column(type: "datetime2", nullable: true), - Village = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - VolumeNo = table.Column(type: "nvarchar(32)", maxLength: 32, nullable: true), - WorkHour = table.Column(type: "nvarchar(max)", nullable: true), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: false), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, 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_AbpUsers", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Adm_T_Announcement", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Title = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), - Excerpt = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: false), - Content = table.Column(type: "nvarchar(max)", maxLength: 4096, nullable: false), - ImageUrl = table.Column(type: "text", nullable: true), - Category = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - UserId = table.Column(type: "uniqueidentifier", nullable: true), - PublishDate = table.Column(type: "datetime2", nullable: false), - ExpiryDate = table.Column(type: "datetime2", nullable: true), - IsPinned = table.Column(type: "bit", nullable: false), - ViewCount = table.Column(type: "int", nullable: false, defaultValue: 0), - Attachments = table.Column(type: "nvarchar(2048)", maxLength: 2048, 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_Announcement", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Adm_T_Department", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ParentId = 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_Adm_T_Department", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Adm_T_EventCategory", - 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), - 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_EventCategory", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Adm_T_EventType", - 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), - 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_EventType", 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_Note", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - EntityName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - EntityId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Type = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Subject = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), - Content = table.Column(type: "nvarchar(2048)", maxLength: 2048, nullable: false), - FilesJson = 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_T_Note", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Adm_T_ReportCategory", - 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), - Description = table.Column(type: "nvarchar(max)", maxLength: 4096, nullable: true), - Icon = 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_ReportCategory", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Adm_T_Sector", - 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), - 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_Sector", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Adm_T_Sequence", - 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), - IsActive = table.Column(type: "bit", nullable: false, defaultValue: true), - Prefix = table.Column(type: "nvarchar(32)", maxLength: 32, nullable: true), - Suffix = table.Column(type: "nvarchar(32)", maxLength: 32, nullable: true), - PaddingSize = table.Column(type: "int", nullable: false, defaultValue: 6), - IncrementStep = table.Column(type: "int", nullable: false, defaultValue: 1), - StartNumber = table.Column(type: "bigint", nullable: false), - NextNumber = table.Column(type: "bigint", nullable: false, defaultValue: 1L), - ResetPeriod = table.Column(type: "int", nullable: false, defaultValue: 0), - LastPeriodKey = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), - FormatTemplate = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false, defaultValue: "{Prefix}{Number}{Suffix}"), - 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_Sequence", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Adm_T_SocialPost", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - UserId = table.Column(type: "uniqueidentifier", nullable: true), - Content = table.Column(type: "nvarchar(max)", maxLength: 4096, nullable: false), - LikeCount = table.Column(type: "int", nullable: false, defaultValue: 0), - IsLiked = table.Column(type: "bit", nullable: false, defaultValue: false), - IsOwnPost = table.Column(type: "bit", nullable: false, defaultValue: 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_SocialPost", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Adm_T_Survey", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Title = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), - Description = table.Column(type: "nvarchar(2048)", maxLength: 2048, nullable: true), - Deadline = table.Column(type: "datetime2", nullable: false), - Responses = table.Column(type: "int", nullable: false, defaultValue: 0), - Status = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: false), - IsAnonymous = 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_Survey", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Adm_T_Videoroom", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - BranchId = table.Column(type: "uniqueidentifier", nullable: true), - Name = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), - Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), - Subject = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - TeacherId = table.Column(type: "uniqueidentifier", nullable: true), - TeacherName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - ScheduledStartTime = table.Column(type: "datetime2", nullable: false), - ScheduledEndTime = table.Column(type: "datetime2", nullable: true), - Duration = table.Column(type: "int", nullable: false), - ActualStartTime = table.Column(type: "datetime2", nullable: true), - ActualEndTime = table.Column(type: "datetime2", nullable: true), - MaxParticipants = table.Column(type: "int", nullable: false), - ParticipantCount = table.Column(type: "int", nullable: false), - SettingsJson = 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_T_Videoroom", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Adm_T_WorkHour", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - StartTime = table.Column(type: "datetime2", maxLength: 8, nullable: false), - EndTime = table.Column(type: "datetime2", maxLength: 8, nullable: false), - Monday = table.Column(type: "bit", nullable: true), - Tuesday = table.Column(type: "bit", nullable: true), - Wednesday = table.Column(type: "bit", nullable: true), - Thursday = table.Column(type: "bit", nullable: true), - Friday = table.Column(type: "bit", nullable: true), - Saturday = table.Column(type: "bit", nullable: true), - Sunday = table.Column(type: "bit", 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_WorkHour", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "OpenIddictApplications", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - ApplicationType = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), - ClientId = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), - ClientSecret = table.Column(type: "nvarchar(max)", nullable: true), - ClientType = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), - ConsentType = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), - DisplayName = table.Column(type: "nvarchar(max)", nullable: true), - DisplayNames = table.Column(type: "nvarchar(max)", nullable: true), - JsonWebKeySet = table.Column(type: "nvarchar(max)", nullable: true), - Permissions = table.Column(type: "nvarchar(max)", nullable: true), - PostLogoutRedirectUris = table.Column(type: "nvarchar(max)", nullable: true), - Properties = table.Column(type: "nvarchar(max)", nullable: true), - RedirectUris = table.Column(type: "nvarchar(max)", nullable: true), - Requirements = table.Column(type: "nvarchar(max)", nullable: true), - Settings = table.Column(type: "nvarchar(max)", nullable: true), - FrontChannelLogoutUri = table.Column(type: "nvarchar(max)", nullable: true), - ClientUri = table.Column(type: "nvarchar(max)", nullable: true), - LogoUri = table.Column(type: "nvarchar(max)", nullable: true), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: false), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, 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_OpenIddictApplications", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "OpenIddictScopes", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Description = table.Column(type: "nvarchar(max)", nullable: true), - Descriptions = table.Column(type: "nvarchar(max)", nullable: true), - DisplayName = table.Column(type: "nvarchar(max)", nullable: true), - DisplayNames = table.Column(type: "nvarchar(max)", nullable: true), - Name = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), - Properties = table.Column(type: "nvarchar(max)", nullable: true), - Resources = table.Column(type: "nvarchar(max)", nullable: true), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: false), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, 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_OpenIddictScopes", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Sas_H_About", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - StatsJson = table.Column(type: "text", nullable: true), - DescriptionsJson = table.Column(type: "text", nullable: true), - SectionsJson = table.Column(type: "text", 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_About", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Sas_H_AiBot", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - Description = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - ApiUrl = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - IsActive = table.Column(type: "bit", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Sas_H_AiBot", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Sas_H_BackgroundWorker", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - Cron = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - WorkerType = table.Column(type: "int", nullable: false), - IsActive = table.Column(type: "bit", nullable: false, defaultValue: true), - DataSourceCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - BeforeSp = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - AfterSp = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - Options = table.Column(type: "text", 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_BackgroundWorker", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Sas_H_BackgroundWorker_MailQueueTableFormat", - columns: table => new - { - Id = table.Column(type: "int", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), - TableName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - Order = table.Column(type: "smallint", nullable: false), - ColumnName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Caption = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HeaderCss = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), - Css = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), - FooterCss = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), - DataType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - DataFormat = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - IsHidden = table.Column(type: "bit", nullable: false), - IsProtected = table.Column(type: "bit", nullable: false), - SubTotal = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Width = table.Column(type: "int", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Sas_H_BackgroundWorker_MailQueueTableFormat", x => x.Id); - table.UniqueConstraint("AK_Sas_H_BackgroundWorker_MailQueueTableFormat_TableName", x => x.TableName); - }); - - migrationBuilder.CreateTable( - name: "Sas_H_BlogCategory", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - 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(128)", maxLength: 128, nullable: true), - DisplayOrder = table.Column(type: "int", nullable: false), - IsActive = table.Column(type: "bit", nullable: false), - PostCount = table.Column(type: "int", 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_BlogCategory", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Sas_H_Contact", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Address = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), - PhoneNumber = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), - Email = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - Location = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - TaxNumber = table.Column(type: "bigint", nullable: true), - BankJson = table.Column(type: "text", nullable: true), - WorkHoursJson = table.Column(type: "text", nullable: true), - MapJson = table.Column(type: "text", 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_Contact", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Sas_H_ContactTitle", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Title = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - Abbreviation = 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_Sas_H_ContactTitle", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Sas_H_CountryGroup", - columns: table => new - { - Id = table.Column(type: "nvarchar(450)", 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), - 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_CountryGroup", x => x.Id); - table.UniqueConstraint("AK_Sas_H_CountryGroup_Name", x => x.Name); - }); - - migrationBuilder.CreateTable( - name: "Sas_H_CrudEndpoint", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - EntityName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - Method = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: false), - Path = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), - OperationType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - CsharpCode = table.Column(type: "nvarchar(max)", nullable: false), - IsActive = 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_H_CrudEndpoint", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Sas_H_Currency", - columns: table => new - { - Id = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Symbol = table.Column(type: "nvarchar(8)", maxLength: 8, nullable: true), - Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - Rate = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), - IsActive = table.Column(type: "bit", nullable: false, defaultValue: true), - LastUpdated = table.Column(type: "datetime2", 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_Currency", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Sas_H_CustomComponent", - 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), - Code = table.Column(type: "nvarchar(max)", nullable: false), - Props = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), - Description = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), - IsActive = table.Column(type: "bit", nullable: false), - Dependencies = table.Column(type: "nvarchar(2048)", maxLength: 2048, 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_CustomComponent", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Sas_H_CustomEndpoint", - 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), - Description = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), - Url = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), - Method = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: false), - DataSourceCode = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - Sql = table.Column(type: "nvarchar(max)", nullable: false), - ParametersJson = table.Column(type: "text", nullable: true), - PermissionsJson = table.Column(type: "text", 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_CustomEndpoint", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Sas_H_DataSource", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Code = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - DataSourceType = table.Column(type: "int", nullable: false), - ConnectionString = 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_DataSource", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Sas_H_Demo", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - OrganizationName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), - Name = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), - Email = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), - PhoneNumber = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: false), - Address = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: false), - NumberOfBranches = table.Column(type: "int", nullable: false), - NumberOfUsers = table.Column(type: "int", nullable: false), - Message = table.Column(type: "nvarchar(2048)", maxLength: 2048, 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_H_Demo", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Sas_H_DynamicService", - 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), - DisplayName = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), - Description = table.Column(type: "nvarchar(2048)", maxLength: 2048, nullable: true), - Code = table.Column(type: "text", nullable: false), - IsActive = table.Column(type: "bit", nullable: false, defaultValue: true), - CompilationStatus = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: false), - LastCompilationError = table.Column(type: "text", nullable: true), - LastSuccessfulCompilation = table.Column(type: "datetime2", nullable: true), - Version = table.Column(type: "int", nullable: false, defaultValue: 1), - CodeHash = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - PrimaryEntityType = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - ControllerName = 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_DynamicService", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Sas_H_Home", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - HeroBackgroundImageKey = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - HeroPrimaryCtaKey = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - HeroSecondaryCtaKey = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - FeaturesTitleKey = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - FeaturesSubtitleKey = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - SolutionsTitleKey = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - SolutionsSubtitleKey = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - CtaTitleKey = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - CtaSubtitleKey = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - CtaButtonLabelKey = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - SlidesJson = table.Column(type: "text", nullable: true), - FeaturesJson = table.Column(type: "text", nullable: true), - SolutionsJson = table.Column(type: "text", 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_Home", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Sas_H_InstallmentOption", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Installment = table.Column(type: "int", nullable: false), - Name = table.Column(type: "nvarchar(32)", maxLength: 32, nullable: false), - Commission = table.Column(type: "decimal(5,3)", precision: 5, scale: 3, 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_H_InstallmentOption", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Sas_H_Language", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - CultureName = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: false), - UiCultureName = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: false), - DisplayName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - IsEnabled = table.Column(type: "bit", nullable: false), - TwoLetterISOLanguageName = table.Column(type: "nvarchar(2)", maxLength: 2, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Sas_H_Language", x => x.Id); - table.UniqueConstraint("AK_Sas_H_Language_CultureName", x => x.CultureName); - }); - - migrationBuilder.CreateTable( - name: "Sas_H_LanguageKey", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Key = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - ResourceName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Sas_H_LanguageKey", x => x.Id); - table.UniqueConstraint("AK_Sas_H_LanguageKey_ResourceName_Key", x => new { x.ResourceName, x.Key }); - }); - - migrationBuilder.CreateTable( - name: "Sas_H_ListForm", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - ListFormCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - CultureName = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: false), - DataSourceCode = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - SelectCommandType = table.Column(type: "int", nullable: false), - TableName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - SelectCommand = table.Column(type: "text", nullable: true), - KeyFieldName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - KeyFieldDbSourceType = table.Column(type: "int", nullable: false), - SelectFieldsDefaultValueJson = table.Column(type: "text", nullable: true), - Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - Description = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), - Title = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - SortMode = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), - PageSize = table.Column(type: "int", nullable: false, defaultValue: 50), - Width = table.Column(type: "int", nullable: true), - Height = table.Column(type: "int", nullable: true), - FullHeight = table.Column(type: "bit", nullable: false), - DefaultFilter = table.Column(type: "nvarchar(max)", nullable: true), - ColumnOptionJson = table.Column(type: "text", nullable: true), - PivotOptionJson = table.Column(type: "text", nullable: true), - TreeOptionJson = table.Column(type: "nvarchar(max)", nullable: true), - GanttOptionJson = table.Column(type: "nvarchar(max)", nullable: true), - SchedulerOptionJson = table.Column(type: "nvarchar(max)", nullable: true), - FilterRowJson = table.Column(type: "text", nullable: true), - RowJson = table.Column(type: "nvarchar(max)", nullable: true), - HeaderFilterJson = table.Column(type: "text", nullable: true), - FilterPanelJson = table.Column(type: "text", nullable: true), - SearchPanelJson = table.Column(type: "text", nullable: true), - GroupPanelJson = table.Column(type: "text", nullable: true), - SelectionJson = table.Column(type: "text", nullable: true), - PagerOptionJson = table.Column(type: "text", nullable: true), - EditingOptionJson = table.Column(type: "text", nullable: true), - EditingFormJson = table.Column(type: "text", nullable: true), - PermissionJson = table.Column(type: "text", nullable: true), - InsertFieldsDefaultValueJson = table.Column(type: "text", nullable: true), - UpdateFieldsDefaultValueJson = table.Column(type: "text", nullable: true), - DeleteFieldsDefaultValueJson = table.Column(type: "text", nullable: true), - CommandColumnJson = table.Column(type: "text", nullable: true), - StateStoringJson = table.Column(type: "text", nullable: true), - DeleteCommand = table.Column(type: "text", nullable: true), - DeleteBeforeCommand = table.Column(type: "nvarchar(max)", nullable: true), - DeleteAfterCommand = table.Column(type: "nvarchar(max)", nullable: true), - UpdateCommand = table.Column(type: "text", nullable: true), - UpdateBeforeCommand = table.Column(type: "nvarchar(max)", nullable: true), - UpdateAfterCommand = table.Column(type: "nvarchar(max)", nullable: true), - InsertCommand = table.Column(type: "text", nullable: true), - InsertBeforeCommand = table.Column(type: "nvarchar(max)", nullable: true), - InsertAfterCommand = table.Column(type: "nvarchar(max)", nullable: true), - UpdateServiceAddress = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - InsertServiceAddress = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - DeleteServiceAddress = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - CustomJsSourcesJson = table.Column(type: "text", nullable: true), - CustomStyleSourcesJson = table.Column(type: "text", nullable: true), - FormFieldsDefaultValueJson = table.Column(type: "text", nullable: true), - IsTenant = table.Column(type: "bit", nullable: false), - IsBranch = table.Column(type: "bit", nullable: false), - IsOrganizationUnit = table.Column(type: "bit", nullable: false), - ListFormType = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), - IsSubForm = table.Column(type: "bit", nullable: false), - SubFormsListFormType = table.Column(type: "nvarchar(max)", nullable: true), - ShowNote = table.Column(type: "bit", nullable: false), - SubFormsJson = table.Column(type: "text", nullable: true), - WidgetsJson = table.Column(type: "text", nullable: true), - WorkflowJson = table.Column(type: "text", nullable: true), - ExtraFilterJson = table.Column(type: "text", nullable: true), - LayoutJson = table.Column(type: "text", nullable: true), - UserId = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - RoleId = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - CommonJson = table.Column(type: "text", nullable: true), - DataSourceJson = table.Column(type: "text", nullable: true), - AdaptiveLayoutJson = table.Column(type: "text", nullable: true), - AnimationJson = table.Column(type: "text", nullable: true), - AnnotationsJson = table.Column(type: "text", nullable: true), - ArgumentAxisJson = table.Column(type: "text", nullable: true), - CommonAnnotationsSettingsJson = table.Column(type: "text", nullable: true), - CommonAxisSettingsJson = table.Column(type: "text", nullable: true), - CommonPaneSettingsJson = table.Column(type: "text", nullable: true), - CommonSeriesSettingsJson = table.Column(type: "text", nullable: true), - CrosshairJson = table.Column(type: "text", nullable: true), - ExportJson = table.Column(type: "text", nullable: true), - LegendJson = table.Column(type: "text", nullable: true), - MarginJson = table.Column(type: "text", nullable: true), - PanesJson = table.Column(type: "text", nullable: true), - ScrollBarJson = table.Column(type: "text", nullable: true), - SeriesJson = table.Column(type: "text", nullable: true), - SizeJson = table.Column(type: "text", nullable: true), - TitleJson = table.Column(type: "text", nullable: true), - TooltipJson = table.Column(type: "text", nullable: true), - ValueAxisJson = table.Column(type: "text", nullable: true), - ZoomAndPanJson = table.Column(type: "text", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Sas_H_ListForm", x => x.Id); - table.UniqueConstraint("AK_Sas_H_ListForm_ListFormCode", x => x.ListFormCode); - }); - - migrationBuilder.CreateTable( - name: "Sas_H_ListFormWorkflow", - columns: table => new - { - Id = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), - ListFormCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Kind = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), - Title = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: false), - CompareColumn = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), - CompareOperator = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: false), - CompareValue = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false), - Approver = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: false), - NextOnStart = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), - NextOnTrue = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), - NextOnFalse = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), - NextOnApprove = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), - NextOnReject = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), - PositionX = table.Column(type: "int", nullable: false), - PositionY = table.Column(type: "int", nullable: false), - CompareOutcomesJson = table.Column(type: "text", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Sas_H_ListFormWorkflow", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Sas_H_LogEntry", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Message = table.Column(type: "nvarchar(max)", nullable: true), - MessageTemplate = table.Column(type: "nvarchar(max)", nullable: true), - Level = table.Column(type: "nvarchar(max)", nullable: true), - TimeStamp = table.Column(type: "datetime2", nullable: true), - Exception = table.Column(type: "nvarchar(max)", nullable: true), - Properties = table.Column(type: "nvarchar(max)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Sas_H_LogEntry", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Sas_H_Menu", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - 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) - }, - constraints: table => - { - table.PrimaryKey("PK_Sas_H_Menu", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Sas_H_MenuGroup", - columns: table => new - { - Id = table.Column(type: "nvarchar(450)", nullable: false), - Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Sas_H_MenuGroup", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Sas_H_NotificationType", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", 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), - 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_NotificationType", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Sas_H_Order", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - IsActive = table.Column(type: "bit", nullable: false), - OrganizationName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - Founder = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - VknTckn = table.Column(type: "bigint", nullable: true), - TaxOffice = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - Address1 = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), - Address2 = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), - District = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - Country = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - City = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - PostalCode = table.Column(type: "nvarchar(16)", maxLength: 16, nullable: true), - MobileNumber = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), - PhoneNumber = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), - FaxNumber = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), - Email = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - Website = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - MenuGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Subtotal = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false), - Commission = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false), - Total = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false), - PaymentMethodId = table.Column(type: "uniqueidentifier", nullable: false), - Installment = table.Column(type: "int", nullable: true), - PaymentDataJson = 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_H_Order", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Sas_H_PaymentMethod", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Commission = table.Column(type: "decimal(5,3)", precision: 5, scale: 3, nullable: false), - Logo = table.Column(type: "nvarchar(32)", maxLength: 32, 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_PaymentMethod", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Sas_H_Product", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), - Category = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Order = table.Column(type: "int", nullable: false), - MonthlyPrice = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: true), - YearlyPrice = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: true), - IsQuantityBased = table.Column(type: "bit", nullable: false), - ImageUrl = table.Column(type: "nvarchar(512)", maxLength: 512, 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_Product", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Sas_H_Route", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", 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), - 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_Route", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Sas_H_Service", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Icon = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Title = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - Description = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), - Type = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Features = 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_Sas_H_Service", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Sas_H_SettingDefinition", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Code = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - NameKey = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - DescriptionKey = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), - DefaultValue = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), - IsVisibleToClients = table.Column(type: "bit", nullable: false), - Providers = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - IsInherited = table.Column(type: "bit", nullable: false), - IsEncrypted = table.Column(type: "bit", nullable: false), - MainGroupKey = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - SubGroupKey = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - RequiredPermissionName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - DataType = table.Column(type: "nvarchar(16)", maxLength: 16, nullable: false), - SelectOptions = table.Column(type: "nvarchar(max)", nullable: true), - Order = table.Column(type: "int", 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_H_SettingDefinition", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Sas_H_SkillType", - columns: table => new - { - 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), - 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_SkillType", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Sas_H_UomCategory", - columns: table => new - { - 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), - 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_UomCategory", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Sas_T_Branch", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - VknTckn = table.Column(type: "bigint", nullable: false), - TaxOffice = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - Country = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - City = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - District = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - Township = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - Address1 = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), - Address2 = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), - PostalCode = table.Column(type: "nvarchar(16)", maxLength: 16, nullable: true), - MobileNumber = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: false), - PhoneNumber = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), - FaxNumber = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), - Email = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - Website = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - IsActive = table.Column(type: "bit", nullable: true, defaultValue: 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_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 - { - Id = table.Column(type: "int", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - System = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Group = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Term = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), - Weight = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Url = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Sas_T_GlobalSearch", x => x.Id); - }); - - migrationBuilder.CreateTable( - 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) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpAuditLogActions", x => x.Id); - table.ForeignKey( - name: "FK_AbpAuditLogActions_AbpAuditLogs_AuditLogId", - column: x => x.AuditLogId, - principalTable: "AbpAuditLogs", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - 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: true), - EntityTypeFullName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpEntityChanges", x => x.Id); - table.ForeignKey( - name: "FK_AbpEntityChanges_AbpAuditLogs_AuditLogId", - column: x => x.AuditLogId, - principalTable: "AbpAuditLogs", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - 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) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpOrganizationUnitRoles", x => new { x.OrganizationUnitId, x.RoleId }); - table.ForeignKey( - name: "FK_AbpOrganizationUnitRoles_AbpOrganizationUnits_OrganizationUnitId", - column: x => x.OrganizationUnitId, - principalTable: "AbpOrganizationUnits", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "FK_AbpOrganizationUnitRoles_AbpRoles_RoleId", - column: x => x.RoleId, - principalTable: "AbpRoles", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - 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) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpRoleClaims", x => x.Id); - table.ForeignKey( - name: "FK_AbpRoleClaims_AbpRoles_RoleId", - column: x => x.RoleId, - principalTable: "AbpRoles", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "AbpTenantConnectionStrings", - columns: table => new - { - TenantId = table.Column(type: "uniqueidentifier", nullable: false), - Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Value = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpTenantConnectionStrings", x => new { x.TenantId, x.Name }); - table.ForeignKey( - name: "FK_AbpTenantConnectionStrings_AbpTenants_TenantId", - column: x => x.TenantId, - principalTable: "AbpTenants", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - 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) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpUserClaims", x => x.Id); - table.ForeignKey( - name: "FK_AbpUserClaims_AbpUsers_UserId", - column: x => x.UserId, - principalTable: "AbpUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - 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) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpUserLogins", x => new { x.UserId, x.LoginProvider }); - table.ForeignKey( - name: "FK_AbpUserLogins_AbpUsers_UserId", - column: x => x.UserId, - principalTable: "AbpUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - 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) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpUserOrganizationUnits", x => new { x.OrganizationUnitId, x.UserId }); - table.ForeignKey( - name: "FK_AbpUserOrganizationUnits_AbpOrganizationUnits_OrganizationUnitId", - column: x => x.OrganizationUnitId, - principalTable: "AbpOrganizationUnits", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "FK_AbpUserOrganizationUnits_AbpUsers_UserId", - column: x => x.UserId, - principalTable: "AbpUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - 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) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpUserRoles", x => new { x.UserId, x.RoleId }); - table.ForeignKey( - name: "FK_AbpUserRoles_AbpRoles_RoleId", - column: x => x.RoleId, - principalTable: "AbpRoles", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "FK_AbpUserRoles_AbpUsers_UserId", - column: x => x.UserId, - principalTable: "AbpUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - 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) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpUserTokens", x => new { x.UserId, x.LoginProvider, x.Name }); - table.ForeignKey( - name: "FK_AbpUserTokens_AbpUsers_UserId", - column: x => x.UserId, - principalTable: "AbpUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Adm_T_JobPosition", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - DepartmentId = table.Column(type: "uniqueidentifier", nullable: false), - ParentId = 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_Adm_T_JobPosition", x => x.Id); - table.ForeignKey( - name: "FK_Adm_T_JobPosition_Adm_T_Department_DepartmentId", - column: x => x.DepartmentId, - principalTable: "Adm_T_Department", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateTable( - name: "Adm_T_Event", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - CategoryId = table.Column(type: "uniqueidentifier", nullable: false), - TypeId = table.Column(type: "uniqueidentifier", nullable: false), - Date = table.Column(type: "datetime2", nullable: false), - Name = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), - Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), - Place = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - Status = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), - UserId = table.Column(type: "uniqueidentifier", nullable: true), - ParticipantsCount = table.Column(type: "int", nullable: false), - Likes = table.Column(type: "int", nullable: false), - isPublished = table.Column(type: "bit", nullable: false, defaultValue: false), - Photos = table.Column(type: "text", 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_Event", x => x.Id); - table.ForeignKey( - name: "FK_Adm_T_Event_Adm_T_EventCategory_CategoryId", - column: x => x.CategoryId, - principalTable: "Adm_T_EventCategory", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "FK_Adm_T_Event_Adm_T_EventType_TypeId", - column: x => x.TypeId, - principalTable: "Adm_T_EventType", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateTable( - name: "Adm_T_ReportTemplate", - 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), - Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), - HtmlContent = table.Column(type: "nvarchar(max)", nullable: false), - CategoryId = table.Column(type: "uniqueidentifier", nullable: false), - Status = table.Column(type: "nvarchar(20)", maxLength: 20, 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_ReportTemplate", x => x.Id); - table.ForeignKey( - name: "FK_Adm_T_ReportTemplate_Adm_T_ReportCategory_CategoryId", - column: x => x.CategoryId, - principalTable: "Adm_T_ReportCategory", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Adm_T_SocialComment", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - SocialPostId = table.Column(type: "uniqueidentifier", nullable: false), - UserId = table.Column(type: "uniqueidentifier", nullable: true), - Content = table.Column(type: "nvarchar(max)", maxLength: 8192, 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_SocialComment", x => x.Id); - table.ForeignKey( - name: "FK_Adm_T_SocialComment_Adm_T_SocialPost_SocialPostId", - column: x => x.SocialPostId, - principalTable: "Adm_T_SocialPost", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Adm_T_SocialLike", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - SocialPostId = table.Column(type: "uniqueidentifier", nullable: false), - UserId = 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_Adm_T_SocialLike", x => x.Id); - table.ForeignKey( - name: "FK_Adm_T_SocialLike_Adm_T_SocialPost_SocialPostId", - column: x => x.SocialPostId, - principalTable: "Adm_T_SocialPost", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Adm_T_SocialLocation", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - SocialPostId = table.Column(type: "uniqueidentifier", nullable: false), - Name = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), - Address = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), - Lat = table.Column(type: "float", nullable: true), - Lng = table.Column(type: "float", nullable: true), - PlaceId = table.Column(type: "nvarchar(128)", maxLength: 128, 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_SocialLocation", x => x.Id); - table.ForeignKey( - name: "FK_Adm_T_SocialLocation_Adm_T_SocialPost_SocialPostId", - column: x => x.SocialPostId, - principalTable: "Adm_T_SocialPost", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Adm_T_SocialMedia", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - SocialPostId = table.Column(type: "uniqueidentifier", nullable: false), - Type = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Urls = table.Column(type: "nvarchar(max)", nullable: true), - PollQuestion = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), - PollTotalVotes = table.Column(type: "int", nullable: true), - PollEndsAt = table.Column(type: "datetime2", nullable: true), - PollUserVoteId = table.Column(type: "nvarchar(128)", maxLength: 128, 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_SocialMedia", x => x.Id); - table.ForeignKey( - name: "FK_Adm_T_SocialMedia_Adm_T_SocialPost_SocialPostId", - column: x => x.SocialPostId, - principalTable: "Adm_T_SocialPost", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Adm_T_SurveyQuestion", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - SurveyId = table.Column(type: "uniqueidentifier", nullable: false), - QuestionText = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: false), - Type = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Order = table.Column(type: "int", nullable: false), - IsRequired = 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_SurveyQuestion", x => x.Id); - table.ForeignKey( - name: "FK_Adm_T_SurveyQuestion_Adm_T_Survey_SurveyId", - column: x => x.SurveyId, - principalTable: "Adm_T_Survey", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Adm_T_SurveyResponse", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - SurveyId = table.Column(type: "uniqueidentifier", nullable: false), - UserId = table.Column(type: "uniqueidentifier", nullable: true), - SubmissionTime = table.Column(type: "datetime2", 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_SurveyResponse", x => x.Id); - table.ForeignKey( - name: "FK_Adm_T_SurveyResponse_Adm_T_Survey_SurveyId", - column: x => x.SurveyId, - principalTable: "Adm_T_Survey", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Adm_T_VideoroomAttandance", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - BranchId = table.Column(type: "uniqueidentifier", nullable: true), - SessionId = table.Column(type: "uniqueidentifier", nullable: false), - StudentId = table.Column(type: "uniqueidentifier", nullable: true), - StudentName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - JoinTime = table.Column(type: "datetime2", nullable: false), - LeaveTime = table.Column(type: "datetime2", nullable: true), - TotalDurationMinutes = table.Column(type: "int", 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_VideoroomAttandance", x => x.Id); - table.ForeignKey( - name: "FK_Adm_T_VideoroomAttandance_Adm_T_Videoroom_SessionId", - column: x => x.SessionId, - principalTable: "Adm_T_Videoroom", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Adm_T_VideoroomChat", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - BranchId = table.Column(type: "uniqueidentifier", nullable: true), - SessionId = table.Column(type: "uniqueidentifier", nullable: false), - SenderId = table.Column(type: "uniqueidentifier", nullable: true), - SenderName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - Message = table.Column(type: "nvarchar(2048)", maxLength: 2048, nullable: false), - Timestamp = table.Column(type: "datetime2", nullable: false), - RecipientId = table.Column(type: "uniqueidentifier", nullable: true), - RecipientName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - IsTeacher = table.Column(type: "bit", nullable: false), - MessageType = 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_VideoroomChat", x => x.Id); - table.ForeignKey( - name: "FK_Adm_T_VideoroomChat_Adm_T_Videoroom_SessionId", - column: x => x.SessionId, - principalTable: "Adm_T_Videoroom", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Adm_T_VideoroomParticipant", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - BranchId = table.Column(type: "uniqueidentifier", nullable: true), - SessionId = table.Column(type: "uniqueidentifier", nullable: false), - UserId = table.Column(type: "uniqueidentifier", nullable: true), - UserName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - IsTeacher = table.Column(type: "bit", nullable: false), - IsAudioMuted = table.Column(type: "bit", nullable: false), - IsVideoMuted = table.Column(type: "bit", nullable: false), - IsHandRaised = table.Column(type: "bit", nullable: false), - IsKicked = table.Column(type: "bit", nullable: false, defaultValue: false), - IsActive = table.Column(type: "bit", nullable: false, defaultValue: true), - JoinTime = table.Column(type: "datetime2", nullable: false), - ConnectionId = table.Column(type: "nvarchar(128)", maxLength: 128, 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_VideoroomParticipant", x => x.Id); - table.ForeignKey( - name: "FK_Adm_T_VideoroomParticipant_Adm_T_Videoroom_SessionId", - column: x => x.SessionId, - principalTable: "Adm_T_Videoroom", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "OpenIddictAuthorizations", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - ApplicationId = table.Column(type: "uniqueidentifier", nullable: true), - CreationDate = table.Column(type: "datetime2", nullable: true), - Properties = table.Column(type: "nvarchar(max)", nullable: true), - Scopes = table.Column(type: "nvarchar(max)", nullable: true), - Status = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), - Subject = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: true), - Type = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: false), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_OpenIddictAuthorizations", x => x.Id); - table.ForeignKey( - name: "FK_OpenIddictAuthorizations_OpenIddictApplications_ApplicationId", - column: x => x.ApplicationId, - principalTable: "OpenIddictApplications", - principalColumn: "Id"); - }); - - migrationBuilder.CreateTable( - name: "Sas_H_BackgroundWorker_MailQueue", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TemplateId = table.Column(type: "uniqueidentifier", nullable: false), - From = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - To = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - MailParameter = table.Column(type: "nvarchar(max)", maxLength: 8192, nullable: true), - TableName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - TableParameter = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), - Attachment = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - AttachmentParameter = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), - SendStatus = table.Column(type: "bit", nullable: false), - SendTime = table.Column(type: "datetime2", nullable: true), - AwsMessageId = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - RelatedRecordId = table.Column(type: "nvarchar(128)", maxLength: 128, 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_BackgroundWorker_MailQueue", x => x.Id); - table.UniqueConstraint("AK_Sas_H_BackgroundWorker_MailQueue_AwsMessageId", x => x.AwsMessageId); - table.ForeignKey( - name: "FK_Sas_H_BackgroundWorker_MailQueue_Sas_H_BackgroundWorker_MailQueueTableFormat_TableName", - column: x => x.TableName, - principalTable: "Sas_H_BackgroundWorker_MailQueueTableFormat", - principalColumn: "TableName", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Sas_H_BlogPost", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Title = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), - Slug = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), - ContentTr = table.Column(type: "nvarchar(max)", nullable: false), - ContentEn = table.Column(type: "nvarchar(max)", nullable: false), - Summary = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: false), - CoverImage = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), - ReadTime = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - CategoryId = table.Column(type: "uniqueidentifier", nullable: false), - Author = table.Column(type: "nvarchar(max)", nullable: true), - ViewCount = table.Column(type: "int", nullable: true), - LikeCount = table.Column(type: "int", nullable: true), - CommentCount = table.Column(type: "int", nullable: true), - IsPublished = table.Column(type: "bit", nullable: false), - PublishedAt = table.Column(type: "datetime2", 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_BlogPost", x => x.Id); - table.ForeignKey( - name: "FK_Sas_H_BlogPost_Sas_H_BlogCategory_CategoryId", - column: x => x.CategoryId, - principalTable: "Sas_H_BlogCategory", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateTable( - name: "Sas_H_Country", - columns: table => new - { - Id = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - GroupName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - Currency = table.Column(type: "nvarchar(8)", maxLength: 8, nullable: false), - PhoneCode = table.Column(type: "int", nullable: false), - TaxLabel = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ZipRequired = table.Column(type: "bit", nullable: false), - StateRequired = 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_H_Country", x => x.Id); - table.ForeignKey( - name: "FK_Sas_H_Country_Sas_H_CountryGroup_GroupName", - column: x => x.GroupName, - principalTable: "Sas_H_CountryGroup", - principalColumn: "Name", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateTable( - name: "Sas_H_LanguageText", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - CultureName = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: false), - Key = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - ResourceName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Value = table.Column(type: "nvarchar(max)", maxLength: 4096, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Sas_H_LanguageText", x => x.Id); - table.ForeignKey( - name: "FK_Sas_H_LanguageText_Sas_H_LanguageKey_ResourceName_Key", - columns: x => new { x.ResourceName, x.Key }, - principalTable: "Sas_H_LanguageKey", - principalColumns: new[] { "ResourceName", "Key" }, - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "FK_Sas_H_LanguageText_Sas_H_Language_CultureName", - column: x => x.CultureName, - principalTable: "Sas_H_Language", - principalColumn: "CultureName", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Sas_H_ListFormCustomization", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - ListFormCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - UserId = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - RoleId = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - FilterName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - CustomizationData = table.Column(type: "text", nullable: true), - CustomizationType = table.Column(type: "int", 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_H_ListFormCustomization", x => x.Id); - table.ForeignKey( - name: "FK_Sas_H_ListFormCustomization_Sas_H_ListForm_ListFormCode", - column: x => x.ListFormCode, - principalTable: "Sas_H_ListForm", - principalColumn: "ListFormCode", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Sas_H_ListFormField", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - ListFormCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - 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(10)", maxLength: 10, nullable: false), - FieldName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - CaptionName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - PlaceHolder = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - Visible = table.Column(type: "bit", nullable: true, defaultValue: true), - IsActive = table.Column(type: "bit", nullable: true, defaultValue: true), - Width = table.Column(type: "int", nullable: true, defaultValue: 100), - ListOrderNo = table.Column(type: "int", nullable: true, defaultValue: 30), - SourceDbType = table.Column(type: "int", nullable: false), - SortIndex = table.Column(type: "int", nullable: true), - SortDirection = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: true), - AllowSearch = table.Column(type: "bit", nullable: true, defaultValue: false), - AllowEditing = table.Column(type: "bit", nullable: true, defaultValue: true), - AllowAdding = table.Column(type: "bit", nullable: true, defaultValue: true), - BandName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - ColumnFilterJson = table.Column(type: "text", nullable: true), - ColumnHeaderJson = table.Column(type: "text", nullable: true), - GroupingJson = table.Column(type: "text", nullable: true), - ColumnCustomizationJson = table.Column(type: "text", nullable: true), - TotalSummaryJson = table.Column(type: "text", nullable: true), - GroupSummaryJson = table.Column(type: "text", nullable: true), - ColumnCssClass = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - ColumnCssValue = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - JoinTableJson = table.Column(type: "text", nullable: true), - LookupJson = table.Column(type: "text", nullable: true), - ValidationRuleJson = table.Column(type: "text", nullable: true), - ColumnStylingJson = table.Column(type: "text", nullable: true), - PermissionJson = table.Column(type: "text", nullable: true), - PivotSettingsJson = table.Column(type: "text", nullable: true), - Alignment = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true, defaultValue: "left"), - Format = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - EditorOptions = table.Column(type: "text", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Sas_H_ListFormField", x => x.Id); - table.ForeignKey( - name: "FK_Sas_H_ListFormField_Sas_H_ListForm_ListFormCode", - column: x => x.ListFormCode, - principalTable: "Sas_H_ListForm", - principalColumn: "ListFormCode", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Sas_H_ListFormImport", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - ListFormCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - BlobName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), - Status = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - TotalRows = table.Column(type: "int", 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_H_ListFormImport", x => x.Id); - table.ForeignKey( - name: "FK_Sas_H_ListFormImport_Sas_H_ListForm_ListFormCode", - column: x => x.ListFormCode, - principalTable: "Sas_H_ListForm", - principalColumn: "ListFormCode", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Sas_H_NotificationRule", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - NotificationTypeId = table.Column(type: "uniqueidentifier", nullable: false), - RecipientType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - RecipientId = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - Channel = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - IsActive = table.Column(type: "bit", nullable: false), - IsFixed = table.Column(type: "bit", nullable: false), - IsCustomized = 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_H_NotificationRule", x => x.Id); - table.ForeignKey( - name: "FK_Sas_H_NotificationRule_Sas_H_NotificationType_NotificationTypeId", - column: x => x.NotificationTypeId, - principalTable: "Sas_H_NotificationType", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateTable( - name: "Sas_H_OrderItem", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - OrderId = table.Column(type: "uniqueidentifier", nullable: false), - ProductId = table.Column(type: "uniqueidentifier", nullable: false), - ProductName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - BillingCycle = table.Column(type: "nvarchar(32)", maxLength: 32, nullable: false), - Quantity = table.Column(type: "int", nullable: false), - TotalPrice = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, 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_H_OrderItem", x => x.Id); - table.ForeignKey( - name: "FK_Sas_H_OrderItem_Sas_H_Order_OrderId", - column: x => x.OrderId, - principalTable: "Sas_H_Order", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Sas_H_Skill", - columns: table => new - { - Id = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - SkillTypeId = 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), - 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_Skill", x => x.Id); - table.ForeignKey( - name: "FK_Sas_H_Skill_Sas_H_SkillType_SkillTypeId", - column: x => x.SkillTypeId, - principalTable: "Sas_H_SkillType", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Sas_H_SkillLevel", - columns: table => new - { - Id = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - SkillTypeId = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - Progress = table.Column(type: "int", nullable: false, defaultValue: 0), - IsDefault = table.Column(type: "bit", nullable: false, defaultValue: 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_H_SkillLevel", x => x.Id); - table.ForeignKey( - name: "FK_Sas_H_SkillLevel_Sas_H_SkillType_SkillTypeId", - column: x => x.SkillTypeId, - principalTable: "Sas_H_SkillType", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Sas_H_Uom", - columns: table => new - { - Id = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - UomCategoryId = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Type = table.Column(type: "nvarchar(32)", maxLength: 32, nullable: false), - Ratio = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), - IsActive = table.Column(type: "bit", nullable: false), - Rounding = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, 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_H_Uom", x => x.Id); - table.ForeignKey( - name: "FK_Sas_H_Uom_Sas_H_UomCategory_UomCategoryId", - column: x => x.UomCategoryId, - principalTable: "Sas_H_UomCategory", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateTable( - name: "Sas_T_BranchUsers", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - BranchId = table.Column(type: "uniqueidentifier", nullable: false), - UserId = table.Column(type: "uniqueidentifier", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Sas_T_BranchUsers", x => x.Id); - table.ForeignKey( - name: "FK_Sas_T_BranchUsers_Sas_T_Branch_BranchId", - column: x => x.BranchId, - principalTable: "Sas_T_Branch", - principalColumn: "Id", - 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 - { - 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) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpEntityPropertyChanges", x => x.Id); - table.ForeignKey( - name: "FK_AbpEntityPropertyChanges_AbpEntityChanges_EntityChangeId", - column: x => x.EntityChangeId, - principalTable: "AbpEntityChanges", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Adm_T_EventComment", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - EventId = table.Column(type: "uniqueidentifier", nullable: false), - UserId = table.Column(type: "uniqueidentifier", nullable: false), - Content = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), - Likes = table.Column(type: "int", nullable: false, defaultValue: 0), - 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_EventComment", x => x.Id); - table.ForeignKey( - name: "FK_Adm_T_EventComment_Adm_T_Event_EventId", - column: x => x.EventId, - principalTable: "Adm_T_Event", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Adm_T_EventLike", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - EventId = table.Column(type: "uniqueidentifier", nullable: false), - UserId = 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_Adm_T_EventLike", x => x.Id); - table.ForeignKey( - name: "FK_Adm_T_EventLike_Adm_T_Event_EventId", - column: x => x.EventId, - principalTable: "Adm_T_Event", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Adm_T_SocialPollOption", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - SocialMediaId = table.Column(type: "uniqueidentifier", nullable: false), - Text = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: false), - Votes = table.Column(type: "int", 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_SocialPollOption", x => x.Id); - table.ForeignKey( - name: "FK_Adm_T_SocialPollOption_Adm_T_SocialMedia_SocialMediaId", - column: x => x.SocialMediaId, - principalTable: "Adm_T_SocialMedia", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Adm_T_SurveyQuestionOption", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - QuestionId = table.Column(type: "uniqueidentifier", nullable: false), - Text = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: false), - Order = table.Column(type: "int", 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_SurveyQuestionOption", x => x.Id); - table.ForeignKey( - name: "FK_Adm_T_SurveyQuestionOption_Adm_T_SurveyQuestion_QuestionId", - column: x => x.QuestionId, - principalTable: "Adm_T_SurveyQuestion", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Adm_T_SurveyAnswer", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - ResponseId = table.Column(type: "uniqueidentifier", nullable: false), - QuestionId = table.Column(type: "uniqueidentifier", nullable: false), - QuestionType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Value = table.Column(type: "nvarchar(1024)", maxLength: 1024, 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_SurveyAnswer", x => x.Id); - table.ForeignKey( - name: "FK_Adm_T_SurveyAnswer_Adm_T_SurveyQuestion_QuestionId", - column: x => x.QuestionId, - principalTable: "Adm_T_SurveyQuestion", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_Adm_T_SurveyAnswer_Adm_T_SurveyResponse_ResponseId", - column: x => x.ResponseId, - principalTable: "Adm_T_SurveyResponse", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "OpenIddictTokens", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - ApplicationId = table.Column(type: "uniqueidentifier", nullable: true), - AuthorizationId = table.Column(type: "uniqueidentifier", nullable: true), - CreationDate = table.Column(type: "datetime2", nullable: true), - ExpirationDate = table.Column(type: "datetime2", nullable: true), - Payload = table.Column(type: "nvarchar(max)", nullable: true), - Properties = table.Column(type: "nvarchar(max)", nullable: true), - RedemptionDate = table.Column(type: "datetime2", nullable: true), - ReferenceId = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), - Status = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), - Subject = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: true), - Type = table.Column(type: "nvarchar(150)", maxLength: 150, nullable: true), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: false), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_OpenIddictTokens", x => x.Id); - table.ForeignKey( - name: "FK_OpenIddictTokens_OpenIddictApplications_ApplicationId", - column: x => x.ApplicationId, - principalTable: "OpenIddictApplications", - principalColumn: "Id"); - table.ForeignKey( - name: "FK_OpenIddictTokens_OpenIddictAuthorizations_AuthorizationId", - column: x => x.AuthorizationId, - principalTable: "OpenIddictAuthorizations", - principalColumn: "Id"); - }); - - migrationBuilder.CreateTable( - name: "Sas_H_BackgroundWorker_MailQueueEvents", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - AwsMessageId = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - EventDate = table.Column(type: "datetime2", nullable: true), - Event = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), - MailAddress = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - ResponseDescription = 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_Sas_H_BackgroundWorker_MailQueueEvents", x => x.Id); - table.ForeignKey( - name: "FK_Sas_H_BackgroundWorker_MailQueueEvents_Sas_H_BackgroundWorker_MailQueue_AwsMessageId", - column: x => x.AwsMessageId, - principalTable: "Sas_H_BackgroundWorker_MailQueue", - principalColumn: "AwsMessageId", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Sas_H_City", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Country = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - PlateCode = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), - CountryId = table.Column(type: "nvarchar(128)", 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_City", x => x.Id); - table.ForeignKey( - name: "FK_Sas_H_City_Sas_H_Country_CountryId", - column: x => x.CountryId, - principalTable: "Sas_H_Country", - principalColumn: "Id"); - }); - - migrationBuilder.CreateTable( - name: "Sas_H_ListFormImportLog", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - ImportId = table.Column(type: "uniqueidentifier", nullable: false), - BlobName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), - Status = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ExecRows = table.Column(type: "int", nullable: false), - ValidRows = table.Column(type: "int", nullable: false), - ErrorRows = table.Column(type: "int", nullable: false), - Progress = table.Column(type: "float", nullable: false), - ErrorsJson = table.Column(type: "text", 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_ListFormImportLog", x => x.Id); - table.ForeignKey( - name: "FK_Sas_H_ListFormImportLog_Sas_H_ListFormImport_ImportId", - column: x => x.ImportId, - principalTable: "Sas_H_ListFormImport", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Sas_H_Notification", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - NotificationRuleId = table.Column(type: "uniqueidentifier", nullable: false), - NotificationChannel = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - NotificationTypeId = table.Column(type: "uniqueidentifier", nullable: false), - Identifier = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), - UserId = table.Column(type: "uniqueidentifier", nullable: true), - Message = table.Column(type: "nvarchar(2048)", maxLength: 2048, nullable: false), - IsSent = table.Column(type: "bit", nullable: false), - IsRead = table.Column(type: "bit", nullable: false), - ReadTime = table.Column(type: "datetime2", 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_Notification", x => x.Id); - table.ForeignKey( - name: "FK_Sas_H_Notification_Sas_H_NotificationRule_NotificationRuleId", - column: x => x.NotificationRuleId, - principalTable: "Sas_H_NotificationRule", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "FK_Sas_H_Notification_Sas_H_NotificationType_NotificationTypeId", - column: x => x.NotificationTypeId, - principalTable: "Sas_H_NotificationType", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - - 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: "Sas_H_District", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Country = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - City = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), - Township = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), - CityId = 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_District", x => x.Id); - table.ForeignKey( - name: "FK_Sas_H_District_Sas_H_City_CityId", - column: x => x.CityId, - principalTable: "Sas_H_City", - principalColumn: "Id"); - }); - - migrationBuilder.CreateIndex( - name: "IX_AbpAuditLogActions_AuditLogId", - table: "AbpAuditLogActions", - column: "AuditLogId"); - - migrationBuilder.CreateIndex( - name: "IX_AbpAuditLogActions_TenantId_ServiceName_MethodName_ExecutionTime", - table: "AbpAuditLogActions", - columns: new[] { "TenantId", "ServiceName", "MethodName", "ExecutionTime" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpAuditLogs_TenantId_ExecutionTime", - table: "AbpAuditLogs", - columns: new[] { "TenantId", "ExecutionTime" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpAuditLogs_TenantId_UserId_ExecutionTime", - table: "AbpAuditLogs", - columns: new[] { "TenantId", "UserId", "ExecutionTime" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpBackgroundJobs_IsAbandoned_NextTryTime", - table: "AbpBackgroundJobs", - columns: new[] { "IsAbandoned", "NextTryTime" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpEntityChanges_AuditLogId", - table: "AbpEntityChanges", - column: "AuditLogId"); - - migrationBuilder.CreateIndex( - name: "IX_AbpEntityChanges_TenantId_EntityTypeFullName_EntityId", - table: "AbpEntityChanges", - columns: new[] { "TenantId", "EntityTypeFullName", "EntityId" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpEntityPropertyChanges_EntityChangeId", - table: "AbpEntityPropertyChanges", - column: "EntityChangeId"); - - migrationBuilder.CreateIndex( - name: "IX_AbpFeatureGroups_Name", - table: "AbpFeatureGroups", - column: "Name", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_AbpFeatures_GroupName", - table: "AbpFeatures", - column: "GroupName"); - - migrationBuilder.CreateIndex( - name: "IX_AbpFeatures_Name", - table: "AbpFeatures", - column: "Name", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_AbpFeatureValues_Name_ProviderName_ProviderKey", - table: "AbpFeatureValues", - columns: new[] { "Name", "ProviderName", "ProviderKey" }, - unique: true, - filter: "[ProviderName] IS NOT NULL AND [ProviderKey] IS NOT NULL"); - - migrationBuilder.CreateIndex( - name: "IX_AbpLinkUsers_SourceUserId_SourceTenantId_TargetUserId_TargetTenantId", - table: "AbpLinkUsers", - columns: new[] { "SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId" }, - unique: true, - filter: "[SourceTenantId] IS NOT NULL AND [TargetTenantId] IS NOT NULL"); - - migrationBuilder.CreateIndex( - name: "IX_AbpOrganizationUnitRoles_RoleId_OrganizationUnitId", - table: "AbpOrganizationUnitRoles", - columns: new[] { "RoleId", "OrganizationUnitId" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpOrganizationUnits_Code", - table: "AbpOrganizationUnits", - column: "Code"); - - migrationBuilder.CreateIndex( - name: "IX_AbpOrganizationUnits_ParentId", - table: "AbpOrganizationUnits", - column: "ParentId"); - - migrationBuilder.CreateIndex( - name: "IX_AbpPermissionGrants_TenantId_Name_ProviderName_ProviderKey", - table: "AbpPermissionGrants", - columns: new[] { "TenantId", "Name", "ProviderName", "ProviderKey" }, - unique: true, - filter: "[TenantId] IS NOT NULL"); - - migrationBuilder.CreateIndex( - name: "IX_AbpPermissionGroups_Name", - table: "AbpPermissionGroups", - column: "Name", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_AbpPermissions_GroupName", - table: "AbpPermissions", - column: "GroupName"); - - migrationBuilder.CreateIndex( - name: "IX_AbpPermissions_Name", - table: "AbpPermissions", - column: "Name", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_AbpRoleClaims_RoleId", - table: "AbpRoleClaims", - column: "RoleId"); - - migrationBuilder.CreateIndex( - name: "IX_AbpRoles_NormalizedName", - table: "AbpRoles", - column: "NormalizedName"); - - migrationBuilder.CreateIndex( - name: "IX_AbpSecurityLogs_TenantId_Action", - table: "AbpSecurityLogs", - columns: new[] { "TenantId", "Action" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpSecurityLogs_TenantId_ApplicationName", - table: "AbpSecurityLogs", - columns: new[] { "TenantId", "ApplicationName" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpSecurityLogs_TenantId_Identity", - table: "AbpSecurityLogs", - columns: new[] { "TenantId", "Identity" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpSecurityLogs_TenantId_UserId", - table: "AbpSecurityLogs", - columns: new[] { "TenantId", "UserId" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpSessions_Device", - table: "AbpSessions", - column: "Device"); - - migrationBuilder.CreateIndex( - name: "IX_AbpSessions_SessionId", - table: "AbpSessions", - column: "SessionId"); - - migrationBuilder.CreateIndex( - name: "IX_AbpSessions_TenantId_UserId", - table: "AbpSessions", - columns: new[] { "TenantId", "UserId" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpSettingDefinitions_Name", - table: "AbpSettingDefinitions", - column: "Name", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_AbpSettings_Name_ProviderName_ProviderKey", - table: "AbpSettings", - columns: new[] { "Name", "ProviderName", "ProviderKey" }, - unique: true, - filter: "[ProviderName] IS NOT NULL AND [ProviderKey] IS NOT NULL"); - - migrationBuilder.CreateIndex( - name: "IX_AbpTenants_Name", - table: "AbpTenants", - column: "Name"); - - migrationBuilder.CreateIndex( - name: "IX_AbpTenants_NormalizedName", - table: "AbpTenants", - column: "NormalizedName"); - - migrationBuilder.CreateIndex( - name: "IX_AbpUserClaims_UserId", - table: "AbpUserClaims", - column: "UserId"); - - migrationBuilder.CreateIndex( - name: "IX_AbpUserLogins_LoginProvider_ProviderKey", - table: "AbpUserLogins", - columns: new[] { "LoginProvider", "ProviderKey" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpUserOrganizationUnits_UserId_OrganizationUnitId", - table: "AbpUserOrganizationUnits", - columns: new[] { "UserId", "OrganizationUnitId" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpUserRoles_RoleId_UserId", - table: "AbpUserRoles", - columns: new[] { "RoleId", "UserId" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpUsers_Email", - table: "AbpUsers", - column: "Email"); - - migrationBuilder.CreateIndex( - name: "IX_AbpUsers_NormalizedEmail", - table: "AbpUsers", - column: "NormalizedEmail"); - - migrationBuilder.CreateIndex( - name: "IX_AbpUsers_NormalizedUserName", - table: "AbpUsers", - column: "NormalizedUserName"); - - migrationBuilder.CreateIndex( - name: "IX_AbpUsers_UserName", - table: "AbpUsers", - column: "UserName"); - - migrationBuilder.CreateIndex( - name: "IX_Adm_T_Announcement_TenantId_Title", - table: "Adm_T_Announcement", - columns: new[] { "TenantId", "Title" }, - unique: true, - filter: "[IsDeleted] = 0"); - - migrationBuilder.CreateIndex( - name: "IX_Adm_T_Department_TenantId_Name", - table: "Adm_T_Department", - columns: new[] { "TenantId", "Name" }, - unique: true, - filter: "[IsDeleted] = 0"); - - migrationBuilder.CreateIndex( - name: "IX_Adm_T_Event_CategoryId", - table: "Adm_T_Event", - column: "CategoryId"); - - migrationBuilder.CreateIndex( - name: "IX_Adm_T_Event_TenantId_CategoryId_TypeId_Name", - table: "Adm_T_Event", - columns: new[] { "TenantId", "CategoryId", "TypeId", "Name" }, - unique: true, - filter: "[IsDeleted] = 0"); - - migrationBuilder.CreateIndex( - name: "IX_Adm_T_Event_TypeId", - table: "Adm_T_Event", - column: "TypeId"); - - migrationBuilder.CreateIndex( - name: "IX_Adm_T_EventCategory_TenantId_Name", - table: "Adm_T_EventCategory", - columns: new[] { "TenantId", "Name" }, - unique: true, - filter: "[IsDeleted] = 0"); - - migrationBuilder.CreateIndex( - name: "IX_Adm_T_EventComment_EventId", - table: "Adm_T_EventComment", - column: "EventId"); - - migrationBuilder.CreateIndex( - name: "IX_Adm_T_EventLike_EventId", - table: "Adm_T_EventLike", - column: "EventId"); - - migrationBuilder.CreateIndex( - name: "IX_Adm_T_EventType_TenantId_Name", - table: "Adm_T_EventType", - columns: new[] { "TenantId", "Name" }, - unique: true, - filter: "[IsDeleted] = 0"); - - migrationBuilder.CreateIndex( - name: "IX_Adm_T_IpRestriction_TenantId_ResourceType_ResourceId_IP", - table: "Adm_T_IpRestriction", - columns: new[] { "TenantId", "ResourceType", "ResourceId", "IP" }, - unique: true, - filter: "[IsDeleted] = 0"); - - migrationBuilder.CreateIndex( - name: "IX_Adm_T_JobPosition_DepartmentId", - table: "Adm_T_JobPosition", - column: "DepartmentId"); - - migrationBuilder.CreateIndex( - name: "IX_Adm_T_JobPosition_TenantId_Name_DepartmentId", - table: "Adm_T_JobPosition", - columns: new[] { "TenantId", "Name", "DepartmentId" }, - unique: true, - filter: "[IsDeleted] = 0"); - - migrationBuilder.CreateIndex( - name: "IX_Adm_T_ReportCategory_TenantId_Name", - table: "Adm_T_ReportCategory", - columns: new[] { "TenantId", "Name" }, - unique: true, - filter: "[IsDeleted] = 0"); - - migrationBuilder.CreateIndex( - name: "IX_Adm_T_ReportTemplate_CategoryId", - table: "Adm_T_ReportTemplate", - column: "CategoryId"); - - migrationBuilder.CreateIndex( - name: "IX_Adm_T_ReportTemplate_TenantId_Name", - table: "Adm_T_ReportTemplate", - columns: new[] { "TenantId", "Name" }, - unique: true, - filter: "[IsDeleted] = 0"); - - migrationBuilder.CreateIndex( - name: "IX_Adm_T_Sector_TenantId_Name", - table: "Adm_T_Sector", - columns: new[] { "TenantId", "Name" }, - unique: true, - filter: "[IsDeleted] = 0"); - - migrationBuilder.CreateIndex( - name: "IX_Adm_T_Sequence_TenantId_Name", - table: "Adm_T_Sequence", - columns: new[] { "TenantId", "Name" }, - unique: true, - filter: "[IsDeleted] = 0"); - - migrationBuilder.CreateIndex( - name: "IX_Adm_T_SocialComment_SocialPostId", - table: "Adm_T_SocialComment", - column: "SocialPostId"); - - migrationBuilder.CreateIndex( - name: "IX_Adm_T_SocialLike_SocialPostId", - table: "Adm_T_SocialLike", - column: "SocialPostId"); - - migrationBuilder.CreateIndex( - name: "IX_Adm_T_SocialLocation_SocialPostId", - table: "Adm_T_SocialLocation", - column: "SocialPostId", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Adm_T_SocialMedia_SocialPostId", - table: "Adm_T_SocialMedia", - column: "SocialPostId", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Adm_T_SocialPollOption_SocialMediaId", - table: "Adm_T_SocialPollOption", - column: "SocialMediaId"); - - migrationBuilder.CreateIndex( - name: "IX_Adm_T_Survey_TenantId_Title", - table: "Adm_T_Survey", - columns: new[] { "TenantId", "Title" }, - unique: true, - filter: "[IsDeleted] = 0"); - - migrationBuilder.CreateIndex( - name: "IX_Adm_T_SurveyAnswer_QuestionId", - table: "Adm_T_SurveyAnswer", - column: "QuestionId"); - - migrationBuilder.CreateIndex( - name: "IX_Adm_T_SurveyAnswer_ResponseId", - table: "Adm_T_SurveyAnswer", - column: "ResponseId"); - - migrationBuilder.CreateIndex( - name: "IX_Adm_T_SurveyQuestion_SurveyId", - table: "Adm_T_SurveyQuestion", - column: "SurveyId"); - - migrationBuilder.CreateIndex( - name: "IX_Adm_T_SurveyQuestionOption_QuestionId", - table: "Adm_T_SurveyQuestionOption", - column: "QuestionId"); - - migrationBuilder.CreateIndex( - name: "IX_Adm_T_SurveyResponse_SurveyId", - table: "Adm_T_SurveyResponse", - column: "SurveyId"); - - migrationBuilder.CreateIndex( - name: "IX_Adm_T_Videoroom_TenantId_BranchId_Name", - table: "Adm_T_Videoroom", - columns: new[] { "TenantId", "BranchId", "Name" }, - unique: true, - filter: "[IsDeleted] = 0"); - - migrationBuilder.CreateIndex( - name: "IX_Adm_T_VideoroomAttandance_SessionId", - table: "Adm_T_VideoroomAttandance", - column: "SessionId"); - - migrationBuilder.CreateIndex( - name: "IX_Adm_T_VideoroomChat_SessionId", - table: "Adm_T_VideoroomChat", - column: "SessionId"); - - migrationBuilder.CreateIndex( - name: "IX_Adm_T_VideoroomParticipant_SessionId", - table: "Adm_T_VideoroomParticipant", - column: "SessionId"); - - migrationBuilder.CreateIndex( - name: "IX_Adm_T_WorkHour_TenantId_Name", - table: "Adm_T_WorkHour", - columns: new[] { "TenantId", "Name" }, - unique: true, - filter: "[IsDeleted] = 0"); - - migrationBuilder.CreateIndex( - name: "IX_OpenIddictApplications_ClientId", - table: "OpenIddictApplications", - column: "ClientId"); - - migrationBuilder.CreateIndex( - name: "IX_OpenIddictAuthorizations_ApplicationId_Status_Subject_Type", - table: "OpenIddictAuthorizations", - columns: new[] { "ApplicationId", "Status", "Subject", "Type" }); - - migrationBuilder.CreateIndex( - name: "IX_OpenIddictScopes_Name", - table: "OpenIddictScopes", - column: "Name"); - - migrationBuilder.CreateIndex( - name: "IX_OpenIddictTokens_ApplicationId_Status_Subject_Type", - table: "OpenIddictTokens", - columns: new[] { "ApplicationId", "Status", "Subject", "Type" }); - - migrationBuilder.CreateIndex( - name: "IX_OpenIddictTokens_AuthorizationId", - table: "OpenIddictTokens", - column: "AuthorizationId"); - - migrationBuilder.CreateIndex( - name: "IX_OpenIddictTokens_ReferenceId", - table: "OpenIddictTokens", - column: "ReferenceId"); - - migrationBuilder.CreateIndex( - name: "IX_Sas_H_AiBot_Name", - table: "Sas_H_AiBot", - column: "Name", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Sas_H_BackgroundWorker_Name", - table: "Sas_H_BackgroundWorker", - column: "Name", - unique: true, - filter: "[IsDeleted] = 0"); - - migrationBuilder.CreateIndex( - name: "IX_Sas_H_BackgroundWorker_MailQueue_TableName", - table: "Sas_H_BackgroundWorker_MailQueue", - column: "TableName"); - - migrationBuilder.CreateIndex( - name: "IX_Sas_H_BackgroundWorker_MailQueueEvents_AwsMessageId", - table: "Sas_H_BackgroundWorker_MailQueueEvents", - column: "AwsMessageId"); - - migrationBuilder.CreateIndex( - name: "IX_MailQueueTableFormat", - table: "Sas_H_BackgroundWorker_MailQueueTableFormat", - columns: new[] { "TableName", "Order" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Sas_H_BlogCategory_Name", - table: "Sas_H_BlogCategory", - column: "Name", - unique: true, - filter: "[IsDeleted] = 0"); - - migrationBuilder.CreateIndex( - name: "IX_Sas_H_BlogPost_CategoryId_Title", - table: "Sas_H_BlogPost", - columns: new[] { "CategoryId", "Title" }, - unique: true, - filter: "[IsDeleted] = 0"); - - migrationBuilder.CreateIndex( - name: "IX_Sas_H_City_Country_Name", - table: "Sas_H_City", - columns: new[] { "Country", "Name" }, - unique: true, - filter: "[IsDeleted] = 0"); - - migrationBuilder.CreateIndex( - name: "IX_Sas_H_City_CountryId", - table: "Sas_H_City", - column: "CountryId"); - - migrationBuilder.CreateIndex( - name: "IX_Sas_H_ContactTitle_Title", - table: "Sas_H_ContactTitle", - column: "Title", - unique: true, - filter: "[IsDeleted] = 0"); - - migrationBuilder.CreateIndex( - name: "IX_Sas_H_Country_GroupName", - table: "Sas_H_Country", - column: "GroupName"); - - migrationBuilder.CreateIndex( - name: "IX_Sas_H_Country_Name", - table: "Sas_H_Country", - column: "Name", - unique: true, - filter: "[IsDeleted] = 0"); - - migrationBuilder.CreateIndex( - name: "IX_Sas_H_CountryGroup_Name", - table: "Sas_H_CountryGroup", - column: "Name", - unique: true, - filter: "[IsDeleted] = 0"); - - migrationBuilder.CreateIndex( - name: "IX_Sas_H_CrudEndpoint_TenantId_EntityName_Method_Path", - table: "Sas_H_CrudEndpoint", - columns: new[] { "TenantId", "EntityName", "Method", "Path" }, - unique: true, - filter: "[IsDeleted] = 0"); - - migrationBuilder.CreateIndex( - name: "IX_Sas_H_Currency_Id_Name", - table: "Sas_H_Currency", - columns: new[] { "Id", "Name" }, - unique: true, - filter: "[IsDeleted] = 0"); - - migrationBuilder.CreateIndex( - name: "IX_Sas_H_CustomComponent_TenantId_Name", - table: "Sas_H_CustomComponent", - columns: new[] { "TenantId", "Name" }, - unique: true, - filter: "[IsDeleted] = 0"); - - migrationBuilder.CreateIndex( - name: "IX_Sas_H_CustomEndpoint_TenantId_Name", - table: "Sas_H_CustomEndpoint", - columns: new[] { "TenantId", "Name" }, - unique: true, - filter: "[IsDeleted] = 0"); - - migrationBuilder.CreateIndex( - name: "IX_Sas_H_DataSource_Code", - table: "Sas_H_DataSource", - column: "Code", - unique: true, - filter: "[IsDeleted] = 0"); - - migrationBuilder.CreateIndex( - name: "IX_Sas_H_District_CityId", - table: "Sas_H_District", - column: "CityId"); - - migrationBuilder.CreateIndex( - name: "IX_Sas_H_District_Country_City_Name_Township", - table: "Sas_H_District", - columns: new[] { "Country", "City", "Name", "Township" }, - unique: true, - filter: "[IsDeleted] = 0"); - - migrationBuilder.CreateIndex( - name: "IX_Sas_H_DynamicService_TenantId_Name", - table: "Sas_H_DynamicService", - columns: new[] { "TenantId", "Name" }, - unique: true, - filter: "[IsDeleted] = 0"); - - migrationBuilder.CreateIndex( - name: "IX_Sas_H_InstallmentOption_Name", - table: "Sas_H_InstallmentOption", - column: "Name", - unique: true, - filter: "[IsDeleted] = 0"); - - migrationBuilder.CreateIndex( - name: "IX_Sas_H_LanguageKey_ResourceName_Key", - table: "Sas_H_LanguageKey", - columns: new[] { "ResourceName", "Key" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Sas_H_LanguageText_CultureName", - table: "Sas_H_LanguageText", - column: "CultureName"); - - migrationBuilder.CreateIndex( - name: "IX_Sas_H_LanguageText_ResourceName_Key", - table: "Sas_H_LanguageText", - columns: new[] { "ResourceName", "Key" }); - - migrationBuilder.CreateIndex( - name: "IX_Sas_H_ListForm_ListFormCode", - table: "Sas_H_ListForm", - column: "ListFormCode", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Sas_H_ListFormCustomization_ListFormCode", - table: "Sas_H_ListFormCustomization", - column: "ListFormCode"); - - migrationBuilder.CreateIndex( - name: "IX_Sas_H_ListFormField_ListFormCode_UserId_RoleId_CultureName_FieldName", - table: "Sas_H_ListFormField", - columns: new[] { "ListFormCode", "UserId", "RoleId", "CultureName", "FieldName" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Sas_H_ListFormImport_ListFormCode", - table: "Sas_H_ListFormImport", - column: "ListFormCode"); - - migrationBuilder.CreateIndex( - name: "IX_Sas_H_ListFormImportLog_ImportId", - table: "Sas_H_ListFormImportLog", - column: "ImportId"); - - migrationBuilder.CreateIndex( - name: "IX_Sas_H_Menu_Code", - table: "Sas_H_Menu", - column: "Code", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Sas_H_MenuGroup_Name", - table: "Sas_H_MenuGroup", - column: "Name", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Sas_H_Notification_NotificationRuleId", - table: "Sas_H_Notification", - column: "NotificationRuleId"); - - migrationBuilder.CreateIndex( - name: "IX_Sas_H_Notification_NotificationTypeId", - table: "Sas_H_Notification", - column: "NotificationTypeId"); - - migrationBuilder.CreateIndex( - name: "IX_Sas_H_NotificationRule_NotificationTypeId", - table: "Sas_H_NotificationRule", - column: "NotificationTypeId"); - - migrationBuilder.CreateIndex( - name: "IX_Sas_H_OrderItem_OrderId", - table: "Sas_H_OrderItem", - column: "OrderId"); - - migrationBuilder.CreateIndex( - name: "IX_Sas_H_PaymentMethod_Name", - table: "Sas_H_PaymentMethod", - column: "Name", - unique: true, - filter: "[IsDeleted] = 0"); - - migrationBuilder.CreateIndex( - name: "IX_Sas_H_Product_Name", - table: "Sas_H_Product", - column: "Name", - unique: true, - filter: "[IsDeleted] = 0"); - - migrationBuilder.CreateIndex( - name: "IX_Sas_H_Route_Key", - table: "Sas_H_Route", - column: "Key", - unique: true, - filter: "[IsDeleted] = 0"); - - migrationBuilder.CreateIndex( - name: "IX_Sas_H_Route_Path", - table: "Sas_H_Route", - column: "Path", - unique: true, - filter: "[IsDeleted] = 0"); - - migrationBuilder.CreateIndex( - name: "IX_Sas_H_Service_Title", - table: "Sas_H_Service", - column: "Title", - unique: true, - filter: "[IsDeleted] = 0"); - - migrationBuilder.CreateIndex( - name: "IX_Sas_H_Skill_SkillTypeId_Name", - table: "Sas_H_Skill", - columns: new[] { "SkillTypeId", "Name" }, - unique: true, - filter: "[IsDeleted] = 0"); - - migrationBuilder.CreateIndex( - name: "IX_Sas_H_SkillLevel_SkillTypeId_Name", - table: "Sas_H_SkillLevel", - columns: new[] { "SkillTypeId", "Name" }, - unique: true, - filter: "[IsDeleted] = 0"); - - migrationBuilder.CreateIndex( - name: "IX_Sas_H_SkillType_Name", - table: "Sas_H_SkillType", - column: "Name", - unique: true, - filter: "[IsDeleted] = 0"); - - migrationBuilder.CreateIndex( - name: "IX_Sas_H_Uom_Name_UomCategoryId", - table: "Sas_H_Uom", - columns: new[] { "Name", "UomCategoryId" }, - unique: true, - filter: "[IsDeleted] = 0"); - - migrationBuilder.CreateIndex( - name: "IX_Sas_H_Uom_UomCategoryId", - table: "Sas_H_Uom", - column: "UomCategoryId"); - - migrationBuilder.CreateIndex( - name: "IX_Sas_H_UomCategory_Name", - table: "Sas_H_UomCategory", - column: "Name", - unique: true, - filter: "[IsDeleted] = 0"); - - migrationBuilder.CreateIndex( - name: "IX_Sas_T_Branch_Code", - table: "Sas_T_Branch", - column: "Code", - unique: true, - filter: "[IsDeleted] = 0"); - - migrationBuilder.CreateIndex( - name: "IX_Sas_T_BranchUsers_BranchId", - table: "Sas_T_BranchUsers", - column: "BranchId"); - - migrationBuilder.CreateIndex( - name: "IX_Sas_T_BranchUsers_TenantId_BranchId_UserId", - table: "Sas_T_BranchUsers", - columns: new[] { "TenantId", "BranchId", "UserId" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Sas_T_ForumCategory_Name", - table: "Sas_T_ForumCategory", - column: "Name", - unique: true, - filter: "[IsDeleted] = 0"); - - migrationBuilder.CreateIndex( - name: "IX_Sas_T_ForumPost_ParentPostId", - table: "Sas_T_ForumPost", - column: "ParentPostId"); - - migrationBuilder.CreateIndex( - name: "IX_Sas_T_ForumPost_TopicId", - table: "Sas_T_ForumPost", - column: "TopicId"); - - migrationBuilder.CreateIndex( - name: "IX_Sas_T_ForumTopic_CategoryId", - table: "Sas_T_ForumTopic", - column: "CategoryId"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "AbpAuditLogActions"); - - migrationBuilder.DropTable( - name: "AbpAuditLogExcelFiles"); - - migrationBuilder.DropTable( - name: "AbpBackgroundJobs"); - - migrationBuilder.DropTable( - name: "AbpClaimTypes"); - - migrationBuilder.DropTable( - name: "AbpEntityPropertyChanges"); - - migrationBuilder.DropTable( - name: "AbpFeatureGroups"); - - migrationBuilder.DropTable( - name: "AbpFeatures"); - - migrationBuilder.DropTable( - name: "AbpFeatureValues"); - - migrationBuilder.DropTable( - name: "AbpLinkUsers"); - - migrationBuilder.DropTable( - name: "AbpOrganizationUnitRoles"); - - migrationBuilder.DropTable( - name: "AbpPermissionGrants"); - - migrationBuilder.DropTable( - name: "AbpPermissionGroups"); - - migrationBuilder.DropTable( - name: "AbpPermissions"); - - migrationBuilder.DropTable( - name: "AbpRoleClaims"); - - migrationBuilder.DropTable( - name: "AbpSecurityLogs"); - - migrationBuilder.DropTable( - name: "AbpSessions"); - - migrationBuilder.DropTable( - name: "AbpSettingDefinitions"); - - migrationBuilder.DropTable( - name: "AbpSettings"); - - migrationBuilder.DropTable( - name: "AbpTenantConnectionStrings"); - - migrationBuilder.DropTable( - name: "AbpUserClaims"); - - migrationBuilder.DropTable( - name: "AbpUserDelegations"); - - migrationBuilder.DropTable( - name: "AbpUserLogins"); - - migrationBuilder.DropTable( - name: "AbpUserOrganizationUnits"); - - migrationBuilder.DropTable( - name: "AbpUserRoles"); - - migrationBuilder.DropTable( - name: "AbpUserTokens"); - - migrationBuilder.DropTable( - name: "Adm_T_Announcement"); - - migrationBuilder.DropTable( - name: "Adm_T_EventComment"); - - migrationBuilder.DropTable( - name: "Adm_T_EventLike"); - - migrationBuilder.DropTable( - name: "Adm_T_IpRestriction"); - - migrationBuilder.DropTable( - name: "Adm_T_JobPosition"); - - migrationBuilder.DropTable( - name: "Adm_T_Note"); - - migrationBuilder.DropTable( - name: "Adm_T_ReportTemplate"); - - migrationBuilder.DropTable( - name: "Adm_T_Sector"); - - migrationBuilder.DropTable( - name: "Adm_T_Sequence"); - - migrationBuilder.DropTable( - name: "Adm_T_SocialComment"); - - migrationBuilder.DropTable( - name: "Adm_T_SocialLike"); - - migrationBuilder.DropTable( - name: "Adm_T_SocialLocation"); - - migrationBuilder.DropTable( - name: "Adm_T_SocialPollOption"); - - migrationBuilder.DropTable( - name: "Adm_T_SurveyAnswer"); - - migrationBuilder.DropTable( - name: "Adm_T_SurveyQuestionOption"); - - migrationBuilder.DropTable( - name: "Adm_T_VideoroomAttandance"); - - migrationBuilder.DropTable( - name: "Adm_T_VideoroomChat"); - - migrationBuilder.DropTable( - name: "Adm_T_VideoroomParticipant"); - - migrationBuilder.DropTable( - name: "Adm_T_WorkHour"); - - migrationBuilder.DropTable( - name: "OpenIddictScopes"); - - migrationBuilder.DropTable( - name: "OpenIddictTokens"); - - migrationBuilder.DropTable( - name: "Sas_H_About"); - - migrationBuilder.DropTable( - name: "Sas_H_AiBot"); - - migrationBuilder.DropTable( - name: "Sas_H_BackgroundWorker"); - - migrationBuilder.DropTable( - name: "Sas_H_BackgroundWorker_MailQueueEvents"); - - migrationBuilder.DropTable( - name: "Sas_H_BlogPost"); - - migrationBuilder.DropTable( - name: "Sas_H_Contact"); - - migrationBuilder.DropTable( - name: "Sas_H_ContactTitle"); - - migrationBuilder.DropTable( - name: "Sas_H_CrudEndpoint"); - - migrationBuilder.DropTable( - name: "Sas_H_Currency"); - - migrationBuilder.DropTable( - name: "Sas_H_CustomComponent"); - - migrationBuilder.DropTable( - name: "Sas_H_CustomEndpoint"); - - migrationBuilder.DropTable( - name: "Sas_H_DataSource"); - - migrationBuilder.DropTable( - name: "Sas_H_Demo"); - - migrationBuilder.DropTable( - name: "Sas_H_District"); - - migrationBuilder.DropTable( - name: "Sas_H_DynamicService"); - - migrationBuilder.DropTable( - name: "Sas_H_Home"); - - migrationBuilder.DropTable( - name: "Sas_H_InstallmentOption"); - - migrationBuilder.DropTable( - name: "Sas_H_LanguageText"); - - migrationBuilder.DropTable( - name: "Sas_H_ListFormCustomization"); - - migrationBuilder.DropTable( - name: "Sas_H_ListFormField"); - - migrationBuilder.DropTable( - name: "Sas_H_ListFormImportLog"); - - migrationBuilder.DropTable( - name: "Sas_H_ListFormWorkflow"); - - migrationBuilder.DropTable( - name: "Sas_H_LogEntry"); - - migrationBuilder.DropTable( - name: "Sas_H_Menu"); - - migrationBuilder.DropTable( - name: "Sas_H_MenuGroup"); - - migrationBuilder.DropTable( - name: "Sas_H_Notification"); - - migrationBuilder.DropTable( - name: "Sas_H_OrderItem"); - - migrationBuilder.DropTable( - name: "Sas_H_PaymentMethod"); - - migrationBuilder.DropTable( - name: "Sas_H_Product"); - - migrationBuilder.DropTable( - name: "Sas_H_Route"); - - migrationBuilder.DropTable( - name: "Sas_H_Service"); - - migrationBuilder.DropTable( - name: "Sas_H_SettingDefinition"); - - migrationBuilder.DropTable( - name: "Sas_H_Skill"); - - migrationBuilder.DropTable( - name: "Sas_H_SkillLevel"); - - migrationBuilder.DropTable( - name: "Sas_H_Uom"); - - migrationBuilder.DropTable( - name: "Sas_T_BranchUsers"); - - migrationBuilder.DropTable( - name: "Sas_T_ForumPost"); - - migrationBuilder.DropTable( - name: "Sas_T_GlobalSearch"); - - migrationBuilder.DropTable( - name: "AbpEntityChanges"); - - migrationBuilder.DropTable( - name: "AbpTenants"); - - migrationBuilder.DropTable( - name: "AbpOrganizationUnits"); - - migrationBuilder.DropTable( - name: "AbpRoles"); - - migrationBuilder.DropTable( - name: "AbpUsers"); - - migrationBuilder.DropTable( - name: "Adm_T_Event"); - - migrationBuilder.DropTable( - name: "Adm_T_Department"); - - migrationBuilder.DropTable( - name: "Adm_T_ReportCategory"); - - migrationBuilder.DropTable( - name: "Adm_T_SocialMedia"); - - migrationBuilder.DropTable( - name: "Adm_T_SurveyResponse"); - - migrationBuilder.DropTable( - name: "Adm_T_SurveyQuestion"); - - migrationBuilder.DropTable( - name: "Adm_T_Videoroom"); - - migrationBuilder.DropTable( - name: "OpenIddictAuthorizations"); - - migrationBuilder.DropTable( - name: "Sas_H_BackgroundWorker_MailQueue"); - - migrationBuilder.DropTable( - name: "Sas_H_BlogCategory"); - - migrationBuilder.DropTable( - name: "Sas_H_City"); - - migrationBuilder.DropTable( - name: "Sas_H_LanguageKey"); - - migrationBuilder.DropTable( - name: "Sas_H_Language"); - - migrationBuilder.DropTable( - name: "Sas_H_ListFormImport"); - - migrationBuilder.DropTable( - name: "Sas_H_NotificationRule"); - - migrationBuilder.DropTable( - name: "Sas_H_Order"); - - migrationBuilder.DropTable( - name: "Sas_H_SkillType"); - - migrationBuilder.DropTable( - name: "Sas_H_UomCategory"); - - migrationBuilder.DropTable( - name: "Sas_T_Branch"); - - migrationBuilder.DropTable( - name: "Sas_T_ForumTopic"); - - migrationBuilder.DropTable( - name: "AbpAuditLogs"); - - migrationBuilder.DropTable( - name: "Adm_T_EventCategory"); - - migrationBuilder.DropTable( - name: "Adm_T_EventType"); - - migrationBuilder.DropTable( - name: "Adm_T_SocialPost"); - - migrationBuilder.DropTable( - name: "Adm_T_Survey"); - - migrationBuilder.DropTable( - name: "OpenIddictApplications"); - - migrationBuilder.DropTable( - name: "Sas_H_BackgroundWorker_MailQueueTableFormat"); - - migrationBuilder.DropTable( - name: "Sas_H_Country"); - - migrationBuilder.DropTable( - name: "Sas_H_ListForm"); - - migrationBuilder.DropTable( - name: "Sas_H_NotificationType"); - - migrationBuilder.DropTable( - name: "Sas_T_ForumCategory"); - - migrationBuilder.DropTable( - name: "Sas_H_CountryGroup"); - } - } -} diff --git a/api/src/Sozsoft.Platform.EntityFrameworkCore/Migrations/20260524210111_Initial.Designer.cs b/api/src/Sozsoft.Platform.EntityFrameworkCore/Migrations/20260525115708_Initial.Designer.cs similarity index 64% rename from api/src/Sozsoft.Platform.EntityFrameworkCore/Migrations/20260524210111_Initial.Designer.cs rename to api/src/Sozsoft.Platform.EntityFrameworkCore/Migrations/20260525115708_Initial.Designer.cs index 1f3f448..4c690dc 100644 --- a/api/src/Sozsoft.Platform.EntityFrameworkCore/Migrations/20260524210111_Initial.Designer.cs +++ b/api/src/Sozsoft.Platform.EntityFrameworkCore/Migrations/20260525115708_Initial.Designer.cs @@ -2,9 +2,9 @@ using System; 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 Sozsoft.Platform.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore; @@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore; namespace Sozsoft.Platform.Migrations { [DbContext(typeof(PlatformDbContext))] - [Migration("20260524210111_Initial")] + [Migration("20260525115708_Initial")] partial class Initial { /// @@ -21,72 +21,75 @@ namespace Sozsoft.Platform.Migrations { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.PostgreSql) .HasAnnotation("ProductVersion", "10.0.4") - .HasAnnotation("Relational:MaxIdentifierLength", 128); + .HasAnnotation("Relational:MaxIdentifierLength", 63); - SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); modelBuilder.Entity("Sequence", b => { b.Property("Id") - .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("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("FormatTemplate") .IsRequired() .ValueGeneratedOnAdd() .HasMaxLength(256) - .HasColumnType("nvarchar(256)") - .HasDefaultValue("{Prefix}{Number}{Suffix}"); + .HasColumnType("character varying(256)") + .HasDefaultValue("{Prefix}{Number}{Suffix}") + .UseCollation("tr-x-icu"); b.Property("IncrementStep") .ValueGeneratedOnAdd() - .HasColumnType("int") + .HasColumnType("integer") .HasDefaultValue(1); b.Property("IsActive") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(true); 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("LastPeriodKey") .HasMaxLength(20) - .HasColumnType("nvarchar(20)"); + .HasColumnType("character varying(20)") + .UseCollation("tr-x-icu"); b.Property("Name") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("NextNumber") .ValueGeneratedOnAdd() @@ -95,16 +98,17 @@ namespace Sozsoft.Platform.Migrations b.Property("PaddingSize") .ValueGeneratedOnAdd() - .HasColumnType("int") + .HasColumnType("integer") .HasDefaultValue(6); b.Property("Prefix") .HasMaxLength(32) - .HasColumnType("nvarchar(32)"); + .HasColumnType("character varying(32)") + .UseCollation("tr-x-icu"); b.Property("ResetPeriod") .ValueGeneratedOnAdd() - .HasColumnType("int") + .HasColumnType("integer") .HasDefaultValue(0); b.Property("StartNumber") @@ -112,17 +116,18 @@ namespace Sozsoft.Platform.Migrations b.Property("Suffix") .HasMaxLength(32) - .HasColumnType("nvarchar(32)"); + .HasColumnType("character varying(32)") + .UseCollation("tr-x-icu"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); b.HasIndex("TenantId", "Name") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Adm_T_Sequence", (string)null); }); @@ -131,30 +136,34 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("CultureName") .IsRequired() .HasMaxLength(10) - .HasColumnType("nvarchar(10)"); + .HasColumnType("character varying(10)") + .UseCollation("tr-x-icu"); b.Property("DisplayName") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("IsEnabled") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("TwoLetterISOLanguageName") .IsRequired() .HasMaxLength(2) - .HasColumnType("nvarchar(2)"); + .HasColumnType("character varying(2)") + .UseCollation("tr-x-icu"); b.Property("UiCultureName") .IsRequired() .HasMaxLength(10) - .HasColumnType("nvarchar(10)"); + .HasColumnType("character varying(10)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -165,17 +174,19 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Key") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("ResourceName") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -189,25 +200,29 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("CultureName") .IsRequired() .HasMaxLength(10) - .HasColumnType("nvarchar(10)"); + .HasColumnType("character varying(10)") + .UseCollation("tr-x-icu"); b.Property("Key") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("ResourceName") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("Value") .IsRequired() .HasMaxLength(4096) - .HasColumnType("nvarchar(max)"); + .HasColumnType("character varying(4096)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -222,85 +237,94 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Attachment") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("AttachmentParameter") .HasMaxLength(512) - .HasColumnType("nvarchar(512)"); + .HasColumnType("character varying(512)") + .UseCollation("tr-x-icu"); b.Property("AwsMessageId") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); 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("From") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); 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("MailParameter") .HasMaxLength(8192) - .HasColumnType("nvarchar(max)"); + .HasColumnType("character varying(8192)") + .UseCollation("tr-x-icu"); b.Property("RelatedRecordId") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("SendStatus") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("SendTime") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("TableName") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("TableParameter") .HasMaxLength(512) - .HasColumnType("nvarchar(512)"); + .HasColumnType("character varying(512)") + .UseCollation("tr-x-icu"); b.Property("TemplateId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("To") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -313,56 +337,60 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("AwsMessageId") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); 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("Event") .HasMaxLength(20) - .HasColumnType("nvarchar(20)"); + .HasColumnType("character varying(20)") + .UseCollation("tr-x-icu"); b.Property("EventDate") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); 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("MailAddress") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("ResponseDescription") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -375,58 +403,67 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("int"); + .HasColumnType("integer"); - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("Caption") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("ColumnName") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("Css") .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); + .HasColumnType("character varying(1024)") + .UseCollation("tr-x-icu"); b.Property("DataFormat") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("DataType") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("FooterCss") .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); + .HasColumnType("character varying(1024)") + .UseCollation("tr-x-icu"); b.Property("HeaderCss") .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); + .HasColumnType("character varying(1024)") + .UseCollation("tr-x-icu"); b.Property("IsHidden") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("IsProtected") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("Order") .HasColumnType("smallint"); b.Property("SubTotal") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("TableName") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("Width") - .HasColumnType("int"); + .HasColumnType("integer"); b.HasKey("Id"); @@ -441,70 +478,73 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .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("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("Identifier") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("IsRead") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("IsSent") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("LastModificationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("Message") .IsRequired() .HasMaxLength(2048) - .HasColumnType("nvarchar(2048)"); + .HasColumnType("character varying(2048)") + .UseCollation("tr-x-icu"); b.Property("NotificationChannel") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("NotificationRuleId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("NotificationTypeId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("ReadTime") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("UserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.HasKey("Id"); @@ -519,63 +559,66 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Channel") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); 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("IsActive") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("IsCustomized") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("IsFixed") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("LastModificationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("NotificationTypeId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("RecipientId") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("RecipientType") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -588,42 +631,43 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .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("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); 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(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -633,46 +677,49 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.About", b => { b.Property("Id") - .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("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("DescriptionsJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); 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("SectionsJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("StatsJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -682,23 +729,26 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.AiBot", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("ApiUrl") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("Description") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("IsActive") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("Name") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -711,91 +761,97 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.Announcement", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Attachments") .HasMaxLength(2048) - .HasColumnType("nvarchar(2048)"); + .HasColumnType("character varying(2048)") + .UseCollation("tr-x-icu"); b.Property("Category") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("Content") .IsRequired() .HasMaxLength(4096) - .HasColumnType("nvarchar(max)"); + .HasColumnType("character varying(4096)") + .UseCollation("tr-x-icu"); 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("Excerpt") .IsRequired() .HasMaxLength(512) - .HasColumnType("nvarchar(512)"); + .HasColumnType("character varying(512)") + .UseCollation("tr-x-icu"); b.Property("ExpiryDate") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("ImageUrl") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("IsPinned") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("LastModificationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("PublishDate") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("Title") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("UserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("ViewCount") .ValueGeneratedOnAdd() - .HasColumnType("int") + .HasColumnType("integer") .HasDefaultValue(0); b.HasKey("Id"); b.HasIndex("TenantId", "Title") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Adm_T_Announcement", (string)null); }); @@ -803,76 +859,82 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.BackgroundWorker", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("AfterSp") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("BeforeSp") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("CreationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("Cron") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("DataSourceCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("IsActive") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(true); 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(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("Options") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("WorkerType") - .HasColumnType("int"); + .HasColumnType("integer"); b.HasKey("Id"); b.HasIndex("Name") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Sas_H_BackgroundWorker", (string)null); }); @@ -880,70 +942,74 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.BlogCategory", b => { b.Property("Id") - .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("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("Description") .HasMaxLength(512) - .HasColumnType("nvarchar(512)"); + .HasColumnType("character varying(512)") + .UseCollation("tr-x-icu"); b.Property("DisplayOrder") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("Icon") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("IsActive") - .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("Name") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("PostCount") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("Slug") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); b.HasIndex("Name") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Sas_H_BlogCategory", (string)null); }); @@ -951,95 +1017,103 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.BlogPost", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Author") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("CategoryId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("CommentCount") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("ContentEn") .IsRequired() - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("ContentTr") .IsRequired() - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("CoverImage") .HasMaxLength(512) - .HasColumnType("nvarchar(512)"); + .HasColumnType("character varying(512)") + .UseCollation("tr-x-icu"); 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("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("IsPublished") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("LastModificationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("LikeCount") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("PublishedAt") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("ReadTime") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("Slug") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("Summary") .IsRequired() .HasMaxLength(512) - .HasColumnType("nvarchar(512)"); + .HasColumnType("character varying(512)") + .UseCollation("tr-x-icu"); b.Property("Title") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("ViewCount") - .HasColumnType("int"); + .HasColumnType("integer"); b.HasKey("Id"); b.HasIndex("CategoryId", "Title") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Sas_H_BlogPost", (string)null); }); @@ -1047,117 +1121,132 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.Branch", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Address1") .HasMaxLength(512) - .HasColumnType("nvarchar(512)"); + .HasColumnType("character varying(512)") + .UseCollation("tr-x-icu"); b.Property("Address2") .HasMaxLength(512) - .HasColumnType("nvarchar(512)"); + .HasColumnType("character varying(512)") + .UseCollation("tr-x-icu"); b.Property("City") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("Code") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("Country") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); 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("District") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("Email") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("FaxNumber") .HasMaxLength(20) - .HasColumnType("nvarchar(20)"); + .HasColumnType("character varying(20)") + .UseCollation("tr-x-icu"); b.Property("IsActive") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(true); 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("MobileNumber") .IsRequired() .HasMaxLength(20) - .HasColumnType("nvarchar(20)"); + .HasColumnType("character varying(20)") + .UseCollation("tr-x-icu"); b.Property("Name") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("PhoneNumber") .HasMaxLength(20) - .HasColumnType("nvarchar(20)"); + .HasColumnType("character varying(20)") + .UseCollation("tr-x-icu"); b.Property("PostalCode") .HasMaxLength(16) - .HasColumnType("nvarchar(16)"); + .HasColumnType("character varying(16)") + .UseCollation("tr-x-icu"); b.Property("TaxOffice") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Township") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("VknTckn") .HasColumnType("bigint"); b.Property("Website") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); b.HasIndex("Code") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Sas_T_Branch", (string)null); }); @@ -1165,17 +1254,17 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.BranchUsers", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("BranchId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("UserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.HasKey("Id"); @@ -1190,53 +1279,57 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.City", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Country") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("CountryId") - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); 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("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(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("PlateCode") .HasMaxLength(20) - .HasColumnType("nvarchar(20)"); + .HasColumnType("character varying(20)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -1244,7 +1337,7 @@ namespace Sozsoft.Platform.Migrations b.HasIndex("Country", "Name") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Sas_H_City", (string)null); }); @@ -1252,65 +1345,72 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.Contact", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Address") .HasMaxLength(512) - .HasColumnType("nvarchar(512)"); + .HasColumnType("character varying(512)") + .UseCollation("tr-x-icu"); b.Property("BankJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); 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") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); 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("Location") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("MapJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("PhoneNumber") .HasMaxLength(20) - .HasColumnType("nvarchar(20)"); + .HasColumnType("character varying(20)") + .UseCollation("tr-x-icu"); b.Property("TaxNumber") .HasColumnType("bigint"); b.Property("WorkHoursJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -1320,52 +1420,54 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.ContactTitle", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Abbreviation") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); 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("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("Title") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); b.HasIndex("Title") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Sas_H_ContactTitle", (string)null); }); @@ -1374,64 +1476,69 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("CreationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("Currency") .IsRequired() .HasMaxLength(8) - .HasColumnType("nvarchar(8)"); + .HasColumnType("character varying(8)") + .UseCollation("tr-x-icu"); b.Property("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("GroupName") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); 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(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("PhoneCode") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("StateRequired") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("TaxLabel") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("ZipRequired") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.HasKey("Id"); @@ -1439,7 +1546,7 @@ namespace Sozsoft.Platform.Migrations b.HasIndex("Name") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Sas_H_Country", (string)null); }); @@ -1447,48 +1554,50 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.CountryGroup", b => { b.Property("Id") - .HasColumnType("nvarchar(450)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); 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("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(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); b.HasIndex("Name") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Sas_H_CountryGroup", (string)null); }); @@ -1496,74 +1605,79 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.CrudEndpoint", b => { b.Property("Id") - .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("CsharpCode") .IsRequired() - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("EntityName") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("IsActive") - .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("Method") .IsRequired() .HasMaxLength(10) - .HasColumnType("nvarchar(10)"); + .HasColumnType("character varying(10)") + .UseCollation("tr-x-icu"); b.Property("OperationType") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("Path") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); b.HasIndex("TenantId", "EntityName", "Method", "Path") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Sas_H_CrudEndpoint", (string)null); }); @@ -1572,64 +1686,67 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); 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("IsActive") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(true); 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("LastUpdated") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("Name") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("Rate") .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)"); + .HasColumnType("numeric(18,6)"); b.Property("Symbol") .HasMaxLength(8) - .HasColumnType("nvarchar(8)"); + .HasColumnType("character varying(8)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); b.HasIndex("Id", "Name") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Sas_H_Currency", (string)null); }); @@ -1637,71 +1754,76 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.CustomComponent", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Code") .IsRequired() - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); 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("Dependencies") .HasMaxLength(2048) - .HasColumnType("nvarchar(2048)"); + .HasColumnType("character varying(2048)") + .UseCollation("tr-x-icu"); b.Property("Description") .HasMaxLength(512) - .HasColumnType("nvarchar(512)"); + .HasColumnType("character varying(512)") + .UseCollation("tr-x-icu"); b.Property("IsActive") - .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("Name") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("Props") .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); + .HasColumnType("character varying(1024)") + .UseCollation("tr-x-icu"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); b.HasIndex("TenantId", "Name") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Sas_H_CustomComponent", (string)null); }); @@ -1709,81 +1831,89 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.CustomEndpoint", b => { b.Property("Id") - .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("DataSourceCode") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); 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(512) - .HasColumnType("nvarchar(512)"); + .HasColumnType("character varying(512)") + .UseCollation("tr-x-icu"); 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("Method") .IsRequired() .HasMaxLength(10) - .HasColumnType("nvarchar(10)"); + .HasColumnType("character varying(10)") + .UseCollation("tr-x-icu"); b.Property("Name") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("ParametersJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("PermissionsJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("Sql") .IsRequired() - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("Url") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); b.HasIndex("TenantId", "Name") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Sas_H_CustomEndpoint", (string)null); }); @@ -1791,55 +1921,57 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.DataSource", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Code") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("ConnectionString") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("CreationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("DataSourceType") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); 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.HasKey("Id"); b.HasIndex("Code") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Sas_H_DataSource", (string)null); }); @@ -1847,73 +1979,79 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.Demo", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Address") .IsRequired() .HasMaxLength(512) - .HasColumnType("nvarchar(512)"); + .HasColumnType("character varying(512)") + .UseCollation("tr-x-icu"); 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)") + .UseCollation("tr-x-icu"); 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("Message") .IsRequired() .HasMaxLength(2048) - .HasColumnType("nvarchar(2048)"); + .HasColumnType("character varying(2048)") + .UseCollation("tr-x-icu"); b.Property("Name") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("NumberOfBranches") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("NumberOfUsers") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("OrganizationName") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("PhoneNumber") .IsRequired() .HasMaxLength(20) - .HasColumnType("nvarchar(20)"); + .HasColumnType("character varying(20)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -1923,55 +2061,56 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.Department", b => { b.Property("Id") - .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("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); 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(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("ParentId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); b.HasIndex("TenantId", "Name") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Adm_T_Department", (string)null); }); @@ -1979,58 +2118,62 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.District", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("City") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("CityId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Country") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); 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("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(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("Township") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -2038,7 +2181,7 @@ namespace Sozsoft.Platform.Migrations b.HasIndex("Country", "City", "Name", "Township") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Sas_H_District", (string)null); }); @@ -2046,97 +2189,105 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.DynamicService", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Code") .IsRequired() - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("CodeHash") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("CompilationStatus") .IsRequired() .HasMaxLength(20) - .HasColumnType("nvarchar(20)"); + .HasColumnType("character varying(20)"); b.Property("ControllerName") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); 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(2048) - .HasColumnType("nvarchar(2048)"); + .HasColumnType("character varying(2048)") + .UseCollation("tr-x-icu"); b.Property("DisplayName") .HasMaxLength(512) - .HasColumnType("nvarchar(512)"); + .HasColumnType("character varying(512)") + .UseCollation("tr-x-icu"); b.Property("IsActive") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(true); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("LastCompilationError") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("LastModificationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("LastSuccessfulCompilation") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("Name") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("PrimaryEntityType") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("Version") .ValueGeneratedOnAdd() - .HasColumnType("int") + .HasColumnType("integer") .HasDefaultValue(1); b.HasKey("Id"); b.HasIndex("TenantId", "Name") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Sas_H_DynamicService", (string)null); }); @@ -2144,83 +2295,88 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.Event", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("CategoryId") - .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("Date") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); 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(1024) - .HasColumnType("nvarchar(1024)"); + .HasColumnType("character varying(1024)") + .UseCollation("tr-x-icu"); 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("Likes") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("Name") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("ParticipantsCount") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("Photos") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("Place") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("Status") .HasMaxLength(20) - .HasColumnType("nvarchar(20)"); + .HasColumnType("character varying(20)") + .UseCollation("tr-x-icu"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("TypeId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("UserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("isPublished") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false); b.HasKey("Id"); @@ -2231,7 +2387,7 @@ namespace Sozsoft.Platform.Migrations b.HasIndex("TenantId", "CategoryId", "TypeId", "Name") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Adm_T_Event", (string)null); }); @@ -2239,52 +2395,53 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.EventCategory", b => { b.Property("Id") - .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("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); 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(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); b.HasIndex("TenantId", "Name") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Adm_T_EventCategory", (string)null); }); @@ -2292,56 +2449,57 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.EventComment", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Content") .HasMaxLength(512) - .HasColumnType("nvarchar(512)"); + .HasColumnType("character varying(512)") + .UseCollation("tr-x-icu"); 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("EventId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); 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("Likes") .ValueGeneratedOnAdd() - .HasColumnType("int") + .HasColumnType("integer") .HasDefaultValue(0); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("UserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.HasKey("Id"); @@ -2353,47 +2511,47 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.EventLike", b => { b.Property("Id") - .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("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("EventId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); 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("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("UserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.HasKey("Id"); @@ -2405,52 +2563,53 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.EventType", b => { b.Property("Id") - .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("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); 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(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); b.HasIndex("TenantId", "Name") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Adm_T_EventType", (string)null); }); @@ -2459,34 +2618,39 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("int"); + .HasColumnType("integer"); - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("Group") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("System") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("Term") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("Url") .HasMaxLength(512) - .HasColumnType("nvarchar(512)"); + .HasColumnType("character varying(512)") + .UseCollation("tr-x-icu"); b.Property("Weight") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -2496,86 +2660,99 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.Home", b => { b.Property("Id") - .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("CtaButtonLabelKey") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("CtaSubtitleKey") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("CtaTitleKey") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("FeaturesJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("FeaturesSubtitleKey") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("FeaturesTitleKey") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("HeroBackgroundImageKey") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("HeroPrimaryCtaKey") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("HeroSecondaryCtaKey") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); 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("SlidesJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("SolutionsJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("SolutionsSubtitleKey") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("SolutionsTitleKey") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -2585,58 +2762,59 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.InstallmentOption", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Commission") .HasPrecision(5, 3) - .HasColumnType("decimal(5,3)"); + .HasColumnType("numeric(5,3)"); 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("Installment") - .HasColumnType("int"); + .HasColumnType("integer"); 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(32) - .HasColumnType("nvarchar(32)"); + .HasColumnType("character varying(32)") + .UseCollation("tr-x-icu"); b.Property("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.HasKey("Id"); b.HasIndex("Name") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Sas_H_InstallmentOption", (string)null); }); @@ -2644,61 +2822,64 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.IpRestriction", b => { b.Property("Id") - .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("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("IP") .IsRequired() .HasMaxLength(32) - .HasColumnType("nvarchar(32)"); + .HasColumnType("character varying(32)") + .UseCollation("tr-x-icu"); 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("ResourceId") .HasMaxLength(32) - .HasColumnType("nvarchar(32)"); + .HasColumnType("character varying(32)") + .UseCollation("tr-x-icu"); b.Property("ResourceType") .IsRequired() .HasMaxLength(10) - .HasColumnType("nvarchar(10)"); + .HasColumnType("character varying(10)") + .UseCollation("tr-x-icu"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); b.HasIndex("TenantId", "ResourceType", "ResourceId", "IP") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Adm_T_IpRestriction", (string)null); }); @@ -2706,51 +2887,52 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.JobPosition", b => { b.Property("Id") - .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("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("DepartmentId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); 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(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("ParentId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -2759,7 +2941,7 @@ namespace Sozsoft.Platform.Migrations b.HasIndex("TenantId", "Name", "DepartmentId") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Adm_T_JobPosition", (string)null); }); @@ -2767,297 +2949,376 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.ListForm", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("AdaptiveLayoutJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("AnimationJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("AnnotationsJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("ArgumentAxisJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("ColumnOptionJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("CommandColumnJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("CommonAnnotationsSettingsJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("CommonAxisSettingsJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("CommonJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("CommonPaneSettingsJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("CommonSeriesSettingsJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("CrosshairJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("CultureName") .IsRequired() .HasMaxLength(10) - .HasColumnType("nvarchar(10)"); + .HasColumnType("character varying(10)") + .UseCollation("tr-x-icu"); b.Property("CustomJsSourcesJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("CustomStyleSourcesJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("DataSourceCode") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("DataSourceJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("DefaultFilter") .IsUnicode(true) - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("DeleteAfterCommand") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("DeleteBeforeCommand") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("DeleteCommand") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("DeleteFieldsDefaultValueJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("DeleteServiceAddress") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("Description") .HasMaxLength(512) - .HasColumnType("nvarchar(512)"); + .HasColumnType("character varying(512)") + .UseCollation("tr-x-icu"); b.Property("EditingFormJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("EditingOptionJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("ExportJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("ExtraFilterJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("FilterPanelJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("FilterRowJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("FormFieldsDefaultValueJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("FullHeight") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("GanttOptionJson") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("GroupPanelJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("HeaderFilterJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("Height") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("InsertAfterCommand") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("InsertBeforeCommand") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("InsertCommand") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("InsertFieldsDefaultValueJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("InsertServiceAddress") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("IsBranch") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("IsOrganizationUnit") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("IsSubForm") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("IsTenant") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("KeyFieldDbSourceType") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("KeyFieldName") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("LayoutJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("LegendJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("ListFormCode") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("ListFormType") .HasMaxLength(20) - .HasColumnType("nvarchar(20)"); + .HasColumnType("character varying(20)") + .UseCollation("tr-x-icu"); b.Property("MarginJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("Name") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("PageSize") .ValueGeneratedOnAdd() - .HasColumnType("int") + .HasColumnType("integer") .HasDefaultValue(50); b.Property("PagerOptionJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("PanesJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("PermissionJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("PivotOptionJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("RoleId") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("RowJson") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("SchedulerOptionJson") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("ScrollBarJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("SearchPanelJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("SelectCommand") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("SelectCommandType") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("SelectFieldsDefaultValueJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("SelectionJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("SeriesJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("ShowNote") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("SizeJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("SortMode") .HasMaxLength(20) - .HasColumnType("nvarchar(20)"); + .HasColumnType("character varying(20)") + .UseCollation("tr-x-icu"); b.Property("StateStoringJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("SubFormsJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("SubFormsListFormType") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("TableName") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("Title") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("TitleJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("TooltipJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("TreeOptionJson") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("UpdateAfterCommand") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("UpdateBeforeCommand") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("UpdateCommand") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("UpdateFieldsDefaultValueJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("UpdateServiceAddress") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("UserId") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("ValueAxisJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("WidgetsJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("Width") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("WorkflowJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("ZoomAndPanJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -3070,60 +3331,65 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.ListFormCustomization", b => { b.Property("Id") - .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("CustomizationData") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("CustomizationType") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("FilterName") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); 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("ListFormCode") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("RoleId") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("UserId") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -3135,143 +3401,169 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.ListFormField", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Alignment") .ValueGeneratedOnAdd() .HasMaxLength(20) - .HasColumnType("nvarchar(20)") - .HasDefaultValue("left"); + .HasColumnType("character varying(20)") + .HasDefaultValue("left") + .UseCollation("tr-x-icu"); b.Property("AllowAdding") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(true); b.Property("AllowEditing") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(true); b.Property("AllowSearch") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false); b.Property("BandName") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("CaptionName") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("ColumnCssClass") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("ColumnCssValue") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("ColumnCustomizationJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("ColumnFilterJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("ColumnHeaderJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("ColumnStylingJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("CultureName") .IsRequired() .HasMaxLength(10) - .HasColumnType("nvarchar(10)"); + .HasColumnType("character varying(10)") + .UseCollation("tr-x-icu"); b.Property("EditorOptions") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("FieldName") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("Format") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("GroupSummaryJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("GroupingJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("IsActive") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(true); b.Property("JoinTableJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("ListFormCode") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("ListOrderNo") .ValueGeneratedOnAdd() - .HasColumnType("int") + .HasColumnType("integer") .HasDefaultValue(30); b.Property("LookupJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("PermissionJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("PivotSettingsJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("PlaceHolder") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("RoleId") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("SortDirection") .HasMaxLength(10) - .HasColumnType("nvarchar(10)"); + .HasColumnType("character varying(10)") + .UseCollation("tr-x-icu"); b.Property("SortIndex") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("SourceDbType") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("TotalSummaryJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("UserId") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("ValidationRuleJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("Visible") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(true); b.Property("Width") .ValueGeneratedOnAdd() - .HasColumnType("int") + .HasColumnType("integer") .HasDefaultValue(100); b.HasKey("Id"); @@ -3285,55 +3577,58 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.ListFormImport", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("BlobName") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); 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("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("ListFormCode") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("Status") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("TotalRows") - .HasColumnType("int"); + .HasColumnType("integer"); b.HasKey("Id"); @@ -3345,65 +3640,68 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.ListFormImportLog", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("BlobName") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); 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("ErrorRows") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("ErrorsJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("ExecRows") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("ImportId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); 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("Progress") - .HasColumnType("float"); + .HasColumnType("double precision"); b.Property("Status") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("ValidRows") - .HasColumnType("int"); + .HasColumnType("integer"); b.HasKey("Id"); @@ -3416,75 +3714,88 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + .HasColumnType("character varying(50)") + .UseCollation("tr-x-icu"); b.Property("Approver") .IsRequired() .HasMaxLength(250) - .HasColumnType("nvarchar(250)"); + .HasColumnType("character varying(250)") + .UseCollation("tr-x-icu"); b.Property("CompareColumn") .IsRequired() .HasMaxLength(100) - .HasColumnType("nvarchar(100)"); + .HasColumnType("character varying(100)") + .UseCollation("tr-x-icu"); b.Property("CompareOperator") .IsRequired() .HasMaxLength(20) - .HasColumnType("nvarchar(20)"); + .HasColumnType("character varying(20)") + .UseCollation("tr-x-icu"); b.Property("CompareOutcomesJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("CompareValue") .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); + .HasColumnType("numeric(18,2)"); b.Property("Kind") .IsRequired() .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + .HasColumnType("character varying(50)") + .UseCollation("tr-x-icu"); b.Property("ListFormCode") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("NextOnApprove") .IsRequired() .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + .HasColumnType("character varying(50)") + .UseCollation("tr-x-icu"); b.Property("NextOnFalse") .IsRequired() .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + .HasColumnType("character varying(50)") + .UseCollation("tr-x-icu"); b.Property("NextOnReject") .IsRequired() .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + .HasColumnType("character varying(50)") + .UseCollation("tr-x-icu"); b.Property("NextOnStart") .IsRequired() .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + .HasColumnType("character varying(50)") + .UseCollation("tr-x-icu"); b.Property("NextOnTrue") .IsRequired() .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + .HasColumnType("character varying(50)") + .UseCollation("tr-x-icu"); b.Property("PositionX") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("PositionY") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("Title") .IsRequired() .HasMaxLength(250) - .HasColumnType("nvarchar(250)"); + .HasColumnType("character varying(250)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -3494,25 +3805,30 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.LogEntry", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Exception") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("Level") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("Message") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("MessageTemplate") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("Properties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("TimeStamp") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.HasKey("Id"); @@ -3522,66 +3838,79 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.Menu", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Code") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("CssClass") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("CultureName") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("DisplayName") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("ElementId") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("Icon") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("IsDisabled") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("Order") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("ParentCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("RequiredPermissionName") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("RoleId") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("ShortName") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("Target") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("Url") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("UserId") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -3594,12 +3923,14 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.MenuGroup", b => { b.Property("Id") - .HasColumnType("nvarchar(450)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("Name") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -3612,69 +3943,75 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.Note", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Content") .IsRequired() .HasMaxLength(2048) - .HasColumnType("nvarchar(2048)"); + .HasColumnType("character varying(2048)") + .UseCollation("tr-x-icu"); 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("EntityId") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("EntityName") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("FilesJson") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); 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("Subject") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("Type") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -3684,129 +4021,146 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.Order", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Address1") .HasMaxLength(512) - .HasColumnType("nvarchar(512)"); + .HasColumnType("character varying(512)") + .UseCollation("tr-x-icu"); b.Property("Address2") .HasMaxLength(512) - .HasColumnType("nvarchar(512)"); + .HasColumnType("character varying(512)") + .UseCollation("tr-x-icu"); b.Property("City") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("Commission") .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); + .HasColumnType("numeric(18,2)"); b.Property("Country") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); 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("District") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("Email") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("FaxNumber") .HasMaxLength(20) - .HasColumnType("nvarchar(20)"); + .HasColumnType("character varying(20)") + .UseCollation("tr-x-icu"); b.Property("Founder") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("Installment") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("IsActive") - .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("MenuGroup") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("MobileNumber") .HasMaxLength(20) - .HasColumnType("nvarchar(20)"); + .HasColumnType("character varying(20)") + .UseCollation("tr-x-icu"); b.Property("Name") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("OrganizationName") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("PaymentDataJson") .HasMaxLength(4096) - .HasColumnType("nvarchar(max)"); + .HasColumnType("character varying(4096)") + .UseCollation("tr-x-icu"); b.Property("PaymentMethodId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("PhoneNumber") .HasMaxLength(20) - .HasColumnType("nvarchar(20)"); + .HasColumnType("character varying(20)") + .UseCollation("tr-x-icu"); b.Property("PostalCode") .HasMaxLength(16) - .HasColumnType("nvarchar(16)"); + .HasColumnType("character varying(16)") + .UseCollation("tr-x-icu"); b.Property("Subtotal") .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); + .HasColumnType("numeric(18,2)"); b.Property("TaxOffice") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("Total") .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); + .HasColumnType("numeric(18,2)"); b.Property("VknTckn") .HasColumnType("bigint"); b.Property("Website") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -3816,60 +4170,62 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.OrderItem", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("BillingCycle") .IsRequired() .HasMaxLength(32) - .HasColumnType("nvarchar(32)"); + .HasColumnType("character varying(32)") + .UseCollation("tr-x-icu"); 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("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("OrderId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("ProductId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("ProductName") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("Quantity") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("TotalPrice") .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); + .HasColumnType("numeric(18,2)"); b.HasKey("Id"); @@ -3881,56 +4237,58 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.PaymentMethod", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Commission") .HasPrecision(5, 3) - .HasColumnType("decimal(5,3)"); + .HasColumnType("numeric(5,3)"); 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("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("Logo") .HasMaxLength(32) - .HasColumnType("nvarchar(32)"); + .HasColumnType("character varying(32)") + .UseCollation("tr-x-icu"); b.Property("Name") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); b.HasIndex("Name") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Sas_H_PaymentMethod", (string)null); }); @@ -3938,75 +4296,79 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.Product", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Category") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); 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(1024) - .HasColumnType("nvarchar(1024)"); + .HasColumnType("character varying(1024)") + .UseCollation("tr-x-icu"); b.Property("ImageUrl") .HasMaxLength(512) - .HasColumnType("nvarchar(512)"); + .HasColumnType("character varying(512)") + .UseCollation("tr-x-icu"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("IsQuantityBased") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("LastModificationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("MonthlyPrice") .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); + .HasColumnType("numeric(18,2)"); b.Property("Name") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("Order") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("YearlyPrice") .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); + .HasColumnType("numeric(18,2)"); b.HasKey("Id"); b.HasIndex("Name") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Sas_H_Product", (string)null); }); @@ -4014,60 +4376,63 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.ReportCategory", b => { b.Property("Id") - .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("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("Description") .HasMaxLength(4096) - .HasColumnType("nvarchar(max)"); + .HasColumnType("character varying(4096)") + .UseCollation("tr-x-icu"); b.Property("Icon") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); 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(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); b.HasIndex("TenantId", "Name") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Adm_T_ReportCategory", (string)null); }); @@ -4075,60 +4440,64 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.ReportTemplate", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("CategoryId") - .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("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("Description") .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); + .HasColumnType("character varying(1024)") + .UseCollation("tr-x-icu"); b.Property("HtmlContent") .IsRequired() - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); 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(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("Status") .HasMaxLength(20) - .HasColumnType("nvarchar(20)"); + .HasColumnType("character varying(20)") + .UseCollation("tr-x-icu"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -4137,7 +4506,7 @@ namespace Sozsoft.Platform.Migrations b.HasIndex("TenantId", "Name") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Adm_T_ReportTemplate", (string)null); }); @@ -4145,69 +4514,73 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.Route", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Authority") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text"); b.Property("ComponentPath") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); 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("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("Key") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("LastModificationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("Path") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("RouteType") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); b.HasIndex("Key") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.HasIndex("Path") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Sas_H_Route", (string)null); }); @@ -4215,52 +4588,53 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.Sector", b => { b.Property("Id") - .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("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); 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(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); b.HasIndex("TenantId", "Name") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Adm_T_Sector", (string)null); }); @@ -4268,63 +4642,67 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.Service", b => { b.Property("Id") - .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("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("Description") .HasMaxLength(512) - .HasColumnType("nvarchar(512)"); + .HasColumnType("character varying(512)") + .UseCollation("tr-x-icu"); b.Property("Features") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text"); b.Property("Icon") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); 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("Title") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("Type") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); b.HasIndex("Title") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Sas_H_Service", (string)null); }); @@ -4333,53 +4711,56 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); 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("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(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("SkillTypeId") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); b.HasIndex("SkillTypeId", "Name") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Sas_H_Skill", (string)null); }); @@ -4388,63 +4769,66 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); 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("IsDefault") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false); 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(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("Progress") .ValueGeneratedOnAdd() - .HasColumnType("int") + .HasColumnType("integer") .HasDefaultValue(0); b.Property("SkillTypeId") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); b.HasIndex("SkillTypeId", "Name") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Sas_H_SkillLevel", (string)null); }); @@ -4453,48 +4837,50 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); 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("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(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); b.HasIndex("Name") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Sas_H_SkillType", (string)null); }); @@ -4502,52 +4888,53 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.SocialComment", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Content") .IsRequired() .HasMaxLength(8192) - .HasColumnType("nvarchar(max)"); + .HasColumnType("character varying(8192)") + .UseCollation("tr-x-icu"); 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("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("SocialPostId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("UserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.HasKey("Id"); @@ -4559,47 +4946,47 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.SocialLike", b => { b.Property("Id") - .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("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); 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("SocialPostId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("UserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.HasKey("Id"); @@ -4611,62 +4998,65 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.SocialLocation", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Address") .HasMaxLength(512) - .HasColumnType("nvarchar(512)"); + .HasColumnType("character varying(512)") + .UseCollation("tr-x-icu"); 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("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("Lat") - .HasColumnType("float"); + .HasColumnType("double precision"); b.Property("Lng") - .HasColumnType("float"); + .HasColumnType("double precision"); b.Property("Name") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("PlaceId") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("SocialPostId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -4680,66 +5070,69 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.SocialMedia", b => { b.Property("Id") - .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("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); 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("PollEndsAt") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("PollQuestion") .HasMaxLength(512) - .HasColumnType("nvarchar(512)"); + .HasColumnType("character varying(512)") + .UseCollation("tr-x-icu"); b.Property("PollTotalVotes") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("PollUserVoteId") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("SocialPostId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("Type") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); - b.PrimitiveCollection("Urls") - .HasColumnType("nvarchar(max)"); + b.PrimitiveCollection("Urls") + .HasColumnType("text[]"); b.HasKey("Id"); @@ -4752,52 +5145,53 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.SocialPollOption", b => { b.Property("Id") - .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("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); 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("SocialMediaId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("Text") .IsRequired() .HasMaxLength(512) - .HasColumnType("nvarchar(512)"); + .HasColumnType("character varying(512)") + .UseCollation("tr-x-icu"); b.Property("Votes") - .HasColumnType("int"); + .HasColumnType("integer"); b.HasKey("Id"); @@ -4809,64 +5203,65 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.SocialPost", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Content") .IsRequired() .HasMaxLength(4096) - .HasColumnType("nvarchar(max)"); + .HasColumnType("character varying(4096)") + .UseCollation("tr-x-icu"); 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("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("IsLiked") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false); b.Property("IsOwnPost") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false); b.Property("LastModificationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("LikeCount") .ValueGeneratedOnAdd() - .HasColumnType("int") + .HasColumnType("integer") .HasDefaultValue(0); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("UserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.HasKey("Id"); @@ -4876,72 +5271,75 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.Survey", b => { b.Property("Id") - .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("Deadline") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); 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(2048) - .HasColumnType("nvarchar(2048)"); + .HasColumnType("character varying(2048)") + .UseCollation("tr-x-icu"); b.Property("IsAnonymous") - .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("Responses") .ValueGeneratedOnAdd() - .HasColumnType("int") + .HasColumnType("integer") .HasDefaultValue(0); b.Property("Status") .IsRequired() .HasMaxLength(10) - .HasColumnType("nvarchar(10)"); + .HasColumnType("character varying(10)") + .UseCollation("tr-x-icu"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("Title") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); b.HasIndex("TenantId", "Title") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Adm_T_Survey", (string)null); }); @@ -4949,57 +5347,59 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.SurveyAnswer", b => { b.Property("Id") - .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("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); 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("QuestionId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("QuestionType") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("ResponseId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("Value") .IsRequired() .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); + .HasColumnType("character varying(1024)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -5013,60 +5413,62 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.SurveyQuestion", b => { b.Property("Id") - .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("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("IsRequired") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("LastModificationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("Order") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("QuestionText") .IsRequired() .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); + .HasColumnType("character varying(1024)") + .UseCollation("tr-x-icu"); b.Property("SurveyId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("Type") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -5078,52 +5480,53 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.SurveyQuestionOption", b => { b.Property("Id") - .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("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); 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("Order") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("QuestionId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("Text") .IsRequired() .HasMaxLength(512) - .HasColumnType("nvarchar(512)"); + .HasColumnType("character varying(512)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -5135,50 +5538,50 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.SurveyResponse", b => { b.Property("Id") - .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("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); 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("SubmissionTime") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("SurveyId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("UserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.HasKey("Id"); @@ -5191,63 +5594,67 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); 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("IsActive") - .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("Name") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("Ratio") .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)"); + .HasColumnType("numeric(18,6)"); b.Property("Rounding") .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)"); + .HasColumnType("numeric(18,6)"); b.Property("Type") .IsRequired() .HasMaxLength(32) - .HasColumnType("nvarchar(32)"); + .HasColumnType("character varying(32)") + .UseCollation("tr-x-icu"); b.Property("UomCategoryId") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -5255,7 +5662,7 @@ namespace Sozsoft.Platform.Migrations b.HasIndex("Name", "UomCategoryId") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Sas_H_Uom", (string)null); }); @@ -5264,48 +5671,50 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); 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("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(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); b.HasIndex("Name") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Sas_H_UomCategory", (string)null); }); @@ -5313,95 +5722,100 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.Videoroom", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("ActualEndTime") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("ActualStartTime") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("BranchId") - .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("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("Description") .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); + .HasColumnType("character varying(1024)") + .UseCollation("tr-x-icu"); b.Property("Duration") - .HasColumnType("int"); + .HasColumnType("integer"); 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("MaxParticipants") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("Name") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("ParticipantCount") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("ScheduledEndTime") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("ScheduledStartTime") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("SettingsJson") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("Subject") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("TeacherId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("TeacherName") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); b.HasIndex("TenantId", "BranchId", "Name") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Adm_T_Videoroom", (string)null); }); @@ -5409,64 +5823,65 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.VideoroomAttandance", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("BranchId") - .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("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("JoinTime") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("LastModificationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("LeaveTime") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("SessionId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("StudentId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("StudentName") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("TotalDurationMinutes") - .HasColumnType("int"); + .HasColumnType("integer"); b.HasKey("Id"); @@ -5478,77 +5893,81 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.VideoroomChat", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("BranchId") - .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("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("IsTeacher") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("LastModificationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("Message") .IsRequired() .HasMaxLength(2048) - .HasColumnType("nvarchar(2048)"); + .HasColumnType("character varying(2048)") + .UseCollation("tr-x-icu"); b.Property("MessageType") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("RecipientId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("RecipientName") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("SenderId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("SenderName") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("SessionId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("Timestamp") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.HasKey("Id"); @@ -5560,84 +5979,86 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.VideoroomParticipant", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("BranchId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("ConnectionId") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); 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("IsActive") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(true); b.Property("IsAudioMuted") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("IsHandRaised") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("IsKicked") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false); b.Property("IsTeacher") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("IsVideoMuted") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("JoinTime") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("LastModificationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("SessionId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("UserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("UserName") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -5649,81 +6070,82 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.WorkHour", b => { b.Property("Id") - .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("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("EndTime") .HasMaxLength(8) - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("Friday") - .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("Monday") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("Name") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("Saturday") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("StartTime") .HasMaxLength(8) - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("Sunday") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("Thursday") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("Tuesday") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("Wednesday") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.HasKey("Id"); b.HasIndex("TenantId", "Name") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Adm_T_WorkHour", (string)null); }); @@ -5731,92 +6153,97 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Forum.ForumCategory", b => { b.Property("Id") - .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("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("Description") .HasMaxLength(512) - .HasColumnType("nvarchar(512)"); + .HasColumnType("character varying(512)") + .UseCollation("tr-x-icu"); b.Property("DisplayOrder") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("Icon") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("IsActive") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("IsLocked") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("LastModificationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("LastPostDate") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("LastPostId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("LastPostUserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("LastPostUserName") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("Name") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("PostCount") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("Slug") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("TopicCount") - .HasColumnType("int"); + .HasColumnType("integer"); b.HasKey("Id"); b.HasIndex("Name") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Sas_T_ForumCategory", (string)null); }); @@ -5824,63 +6251,65 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Forum.ForumPost", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("AuthorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("AuthorName") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("Content") .IsRequired() - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); 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("IsAcceptedAnswer") - .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("LikeCount") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("ParentPostId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("TopicId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.HasKey("Id"); @@ -5894,90 +6323,94 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Forum.ForumTopic", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("AuthorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("AuthorName") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("CategoryId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Content") .IsRequired() - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); 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("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("IsLocked") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("IsPinned") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("IsSolved") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("LastModificationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("LastPostDate") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("LastPostId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("LastPostUserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("LastPostUserName") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("LikeCount") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("ReplyCount") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Title") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("ViewCount") - .HasColumnType("int"); + .HasColumnType("integer"); b.HasKey("Id"); @@ -5990,93 +6423,102 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Code") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("CreationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("DataType") .IsRequired() .HasMaxLength(16) - .HasColumnType("nvarchar(16)"); + .HasColumnType("character varying(16)") + .UseCollation("tr-x-icu"); b.Property("DefaultValue") .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); + .HasColumnType("character varying(1024)") + .UseCollation("tr-x-icu"); b.Property("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("DescriptionKey") .HasMaxLength(512) - .HasColumnType("nvarchar(512)"); + .HasColumnType("character varying(512)") + .UseCollation("tr-x-icu"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("IsEncrypted") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("IsInherited") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("IsVisibleToClients") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("LastModificationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("MainGroupKey") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("NameKey") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("Order") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("Providers") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("RequiredPermissionName") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("SelectOptions") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text"); b.Property("SubGroupKey") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -6087,114 +6529,129 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("ApplicationName") .HasMaxLength(96) - .HasColumnType("nvarchar(96)") - .HasColumnName("ApplicationName"); + .HasColumnType("character varying(96)") + .HasColumnName("ApplicationName") + .UseCollation("tr-x-icu"); b.Property("BrowserInfo") .HasMaxLength(512) - .HasColumnType("nvarchar(512)") - .HasColumnName("BrowserInfo"); + .HasColumnType("character varying(512)") + .HasColumnName("BrowserInfo") + .UseCollation("tr-x-icu"); b.Property("ClientId") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ClientId"); + .HasColumnType("character varying(64)") + .HasColumnName("ClientId") + .UseCollation("tr-x-icu"); b.Property("ClientIpAddress") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ClientIpAddress"); + .HasColumnType("character varying(64)") + .HasColumnName("ClientIpAddress") + .UseCollation("tr-x-icu"); b.Property("ClientName") .HasMaxLength(128) - .HasColumnType("nvarchar(128)") - .HasColumnName("ClientName"); + .HasColumnType("character varying(128)") + .HasColumnName("ClientName") + .UseCollation("tr-x-icu"); b.Property("Comments") .HasMaxLength(256) - .HasColumnType("nvarchar(256)") - .HasColumnName("Comments"); + .HasColumnType("character varying(256)") + .HasColumnName("Comments") + .UseCollation("tr-x-icu"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp") + .UseCollation("tr-x-icu"); b.Property("CorrelationId") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("CorrelationId"); + .HasColumnType("character varying(64)") + .HasColumnName("CorrelationId") + .UseCollation("tr-x-icu"); b.Property("Exceptions") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("ExecutionDuration") - .HasColumnType("int") + .HasColumnType("integer") .HasColumnName("ExecutionDuration"); b.Property("ExecutionTime") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("ExtraProperties") .IsRequired() - .HasColumnType("nvarchar(max)") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("HttpMethod") .HasMaxLength(16) - .HasColumnType("nvarchar(16)") - .HasColumnName("HttpMethod"); + .HasColumnType("character varying(16)") + .HasColumnName("HttpMethod") + .UseCollation("tr-x-icu"); b.Property("HttpStatusCode") - .HasColumnType("int") + .HasColumnType("integer") .HasColumnName("HttpStatusCode"); b.Property("ImpersonatorTenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("ImpersonatorTenantId"); b.Property("ImpersonatorTenantName") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ImpersonatorTenantName"); + .HasColumnType("character varying(64)") + .HasColumnName("ImpersonatorTenantName") + .UseCollation("tr-x-icu"); b.Property("ImpersonatorUserId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("ImpersonatorUserId"); b.Property("ImpersonatorUserName") .HasMaxLength(256) - .HasColumnType("nvarchar(256)") - .HasColumnName("ImpersonatorUserName"); + .HasColumnType("character varying(256)") + .HasColumnName("ImpersonatorUserName") + .UseCollation("tr-x-icu"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("TenantName") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("TenantName"); + .HasColumnType("character varying(64)") + .HasColumnName("TenantName") + .UseCollation("tr-x-icu"); b.Property("Url") .HasMaxLength(256) - .HasColumnType("nvarchar(256)") - .HasColumnName("Url"); + .HasColumnType("character varying(256)") + .HasColumnName("Url") + .UseCollation("tr-x-icu"); b.Property("UserId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("UserId"); b.Property("UserName") .HasMaxLength(256) - .HasColumnType("nvarchar(256)") - .HasColumnName("UserName"); + .HasColumnType("character varying(256)") + .HasColumnName("UserName") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -6209,41 +6666,44 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .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)") - .HasColumnName("MethodName"); + .HasColumnType("character varying(128)") + .HasColumnName("MethodName") + .UseCollation("tr-x-icu"); b.Property("Parameters") .HasMaxLength(2000) - .HasColumnType("nvarchar(2000)") - .HasColumnName("Parameters"); + .HasColumnType("character varying(2000)") + .HasColumnName("Parameters") + .UseCollation("tr-x-icu"); b.Property("ServiceName") .HasMaxLength(256) - .HasColumnType("nvarchar(256)") - .HasColumnName("ServiceName"); + .HasColumnType("character varying(256)") + .HasColumnName("ServiceName") + .UseCollation("tr-x-icu"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -6259,23 +6719,24 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .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("FileName") .HasMaxLength(256) - .HasColumnType("nvarchar(256)") - .HasColumnName("FileName"); + .HasColumnType("character varying(256)") + .HasColumnName("FileName") + .UseCollation("tr-x-icu"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -6287,40 +6748,42 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .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") .HasMaxLength(128) - .HasColumnType("nvarchar(128)") - .HasColumnName("EntityId"); + .HasColumnType("character varying(128)") + .HasColumnName("EntityId") + .UseCollation("tr-x-icu"); b.Property("EntityTenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("EntityTypeFullName") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)") - .HasColumnName("EntityTypeFullName"); + .HasColumnType("character varying(128)") + .HasColumnName("EntityTypeFullName") + .UseCollation("tr-x-icu"); b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -6336,35 +6799,39 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("EntityChangeId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("NewValue") .HasMaxLength(512) - .HasColumnType("nvarchar(512)") - .HasColumnName("NewValue"); + .HasColumnType("character varying(512)") + .HasColumnName("NewValue") + .UseCollation("tr-x-icu"); b.Property("OriginalValue") .HasMaxLength(512) - .HasColumnType("nvarchar(512)") - .HasColumnName("OriginalValue"); + .HasColumnType("character varying(512)") + .HasColumnName("OriginalValue") + .UseCollation("tr-x-icu"); b.Property("PropertyName") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)") - .HasColumnName("PropertyName"); + .HasColumnType("character varying(128)") + .HasColumnName("PropertyName") + .UseCollation("tr-x-icu"); b.Property("PropertyTypeFullName") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PropertyTypeFullName"); + .HasColumnType("character varying(64)") + .HasColumnName("PropertyTypeFullName") + .UseCollation("tr-x-icu"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -6378,52 +6845,56 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("ApplicationName") .HasMaxLength(96) - .HasColumnType("nvarchar(96)"); + .HasColumnType("character varying(96)") + .UseCollation("tr-x-icu"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp") + .UseCollation("tr-x-icu"); b.Property("CreationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("ExtraProperties") .IsRequired() - .HasColumnType("nvarchar(max)") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("IsAbandoned") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false); b.Property("JobArgs") .IsRequired() .HasMaxLength(1048576) - .HasColumnType("nvarchar(max)"); + .HasColumnType("character varying(1048576)") + .UseCollation("tr-x-icu"); b.Property("JobName") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("LastTryTime") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("NextTryTime") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("Priority") .ValueGeneratedOnAdd() - .HasColumnType("tinyint") + .HasColumnType("smallint") .HasDefaultValue((byte)15); b.Property("TryCount") @@ -6442,52 +6913,60 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("AllowedProviders") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("DefaultValue") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("Description") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("DisplayName") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("GroupName") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("IsAvailableToHost") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("IsVisibleToClients") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("Name") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("ParentName") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("ValueType") .HasMaxLength(2048) - .HasColumnType("nvarchar(2048)"); + .HasColumnType("character varying(2048)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -6503,21 +6982,23 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("DisplayName") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("Name") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -6531,31 +7012,34 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Name") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("ProviderKey") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("ProviderName") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("Value") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); b.HasIndex("Name", "ProviderName", "ProviderKey") - .IsUnique() - .HasFilter("[ProviderName] IS NOT NULL AND [ProviderKey] IS NOT NULL"); + .IsUnique(); b.ToTable("AbpFeatureValues", (string)null); }); @@ -6563,49 +7047,54 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp") + .UseCollation("tr-x-icu"); b.Property("CreationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("Description") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("ExtraProperties") .IsRequired() - .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)") + .UseCollation("tr-x-icu"); b.Property("Regex") .HasMaxLength(512) - .HasColumnType("nvarchar(512)"); + .HasColumnType("character varying(512)") + .UseCollation("tr-x-icu"); b.Property("RegexDescription") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("Required") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("ValueType") - .HasColumnType("int"); + .HasColumnType("integer"); b.HasKey("Id"); @@ -6615,25 +7104,24 @@ namespace Sozsoft.Platform.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); }); @@ -6641,51 +7129,54 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp") + .UseCollation("tr-x-icu"); b.Property("CreationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("EntityVersion") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("ExtraProperties") .IsRequired() - .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)") + .UseCollation("tr-x-icu"); b.Property("NormalizedName") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -6698,22 +7189,24 @@ namespace Sozsoft.Platform.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)") + .UseCollation("tr-x-icu"); b.Property("ClaimValue") .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); + .HasColumnType("character varying(1024)") + .UseCollation("tr-x-icu"); b.Property("RoleId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -6726,65 +7219,75 @@ namespace Sozsoft.Platform.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)") + .UseCollation("tr-x-icu"); b.Property("ApplicationName") .HasMaxLength(96) - .HasColumnType("nvarchar(96)"); + .HasColumnType("character varying(96)") + .UseCollation("tr-x-icu"); b.Property("BrowserInfo") .HasMaxLength(512) - .HasColumnType("nvarchar(512)"); + .HasColumnType("character varying(512)") + .UseCollation("tr-x-icu"); b.Property("ClientId") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("ClientIpAddress") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp") + .UseCollation("tr-x-icu"); b.Property("CorrelationId") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("ExtraProperties") .IsRequired() - .HasColumnType("nvarchar(max)") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("Identity") .HasMaxLength(96) - .HasColumnType("nvarchar(96)"); + .HasColumnType("character varying(96)") + .UseCollation("tr-x-icu"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("TenantName") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("UserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("UserName") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -6802,46 +7305,51 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentitySession", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("ClientId") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("Device") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("DeviceInfo") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("IpAddresses") .HasMaxLength(2048) - .HasColumnType("nvarchar(2048)"); + .HasColumnType("character varying(2048)") + .UseCollation("tr-x-icu"); b.Property("LastAccessed") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("SessionId") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("SignedIn") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("UserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.HasKey("Id"); @@ -6857,266 +7365,297 @@ namespace Sozsoft.Platform.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("BirthDate") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("BirthPlace") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("BloodType") .HasMaxLength(16) - .HasColumnType("nvarchar(16)"); + .HasColumnType("character varying(16)") + .UseCollation("tr-x-icu"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp") + .UseCollation("tr-x-icu"); 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("DepartmentId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("District") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("EducationLevel") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("Email") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)") - .HasColumnName("Email"); + .HasColumnType("character varying(256)") + .HasColumnName("Email") + .UseCollation("tr-x-icu"); b.Property("EmailConfirmed") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("EmailConfirmed"); b.Property("EntityVersion") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("ExtraProperties") .IsRequired() - .HasColumnType("nvarchar(max)") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("FamilySequenceNo") .HasMaxLength(32) - .HasColumnType("nvarchar(32)"); + .HasColumnType("character varying(32)") + .UseCollation("tr-x-icu"); b.Property("FatherName") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("GraduationSchool") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("HireDate") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("HomeAddress") .HasMaxLength(512) - .HasColumnType("nvarchar(512)"); + .HasColumnType("character varying(512)") + .UseCollation("tr-x-icu"); b.Property("IdentityNumber") .HasMaxLength(15) - .HasColumnType("nvarchar(15)"); + .HasColumnType("character varying(15)") + .UseCollation("tr-x-icu"); b.Property("IsActive") - .HasColumnType("bit") + .HasColumnType("boolean") .HasColumnName("IsActive"); 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("IsVerified") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false); b.Property("IssuedDate") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("IssuedPlace") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("JobPositionId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("LastModificationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("LastPasswordChangeTime") - .HasColumnType("datetimeoffset"); + .HasColumnType("timestamp with time zone"); b.Property("LockoutEnabled") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("LockoutEnabled"); b.Property("LockoutEnd") - .HasColumnType("datetimeoffset"); + .HasColumnType("timestamp with time zone"); b.Property("LoginEndDate") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("MaritalStatus") .HasMaxLength(32) - .HasColumnType("nvarchar(32)"); + .HasColumnType("character varying(32)") + .UseCollation("tr-x-icu"); b.Property("MarriageDate") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("MotherName") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("Name") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Name"); + .HasColumnType("character varying(64)") + .HasColumnName("Name") + .UseCollation("tr-x-icu"); b.Property("Nationality") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("NormalizedEmail") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)") - .HasColumnName("NormalizedEmail"); + .HasColumnType("character varying(256)") + .HasColumnName("NormalizedEmail") + .UseCollation("tr-x-icu"); b.Property("NormalizedUserName") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)") - .HasColumnName("NormalizedUserName"); + .HasColumnType("character varying(256)") + .HasColumnName("NormalizedUserName") + .UseCollation("tr-x-icu"); b.Property("PasswordHash") .HasMaxLength(256) - .HasColumnType("nvarchar(256)") - .HasColumnName("PasswordHash"); + .HasColumnType("character varying(256)") + .HasColumnName("PasswordHash") + .UseCollation("tr-x-icu"); b.Property("PhoneNumber") .HasMaxLength(16) - .HasColumnType("nvarchar(16)") - .HasColumnName("PhoneNumber"); + .HasColumnType("character varying(16)") + .HasColumnName("PhoneNumber") + .UseCollation("tr-x-icu"); b.Property("PhoneNumberConfirmed") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("PhoneNumberConfirmed"); b.Property("Province") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("RocketUsername") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("SecurityStamp") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)") - .HasColumnName("SecurityStamp"); + .HasColumnType("character varying(256)") + .HasColumnName("SecurityStamp") + .UseCollation("tr-x-icu"); b.Property("SequenceNo") .HasMaxLength(32) - .HasColumnType("nvarchar(32)"); + .HasColumnType("character varying(32)") + .UseCollation("tr-x-icu"); b.Property("SerialNo") .HasMaxLength(32) - .HasColumnType("nvarchar(32)"); + .HasColumnType("character varying(32)") + .UseCollation("tr-x-icu"); b.Property("ShouldChangePasswordOnNextLogin") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("SskNo") .HasMaxLength(32) - .HasColumnType("nvarchar(32)"); + .HasColumnType("character varying(32)") + .UseCollation("tr-x-icu"); b.Property("Surname") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Surname"); + .HasColumnType("character varying(64)") + .HasColumnName("Surname") + .UseCollation("tr-x-icu"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("TerminationDate") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("TwoFactorEnabled") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("TwoFactorEnabled"); b.Property("UserName") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)") - .HasColumnName("UserName"); + .HasColumnType("character varying(256)") + .HasColumnName("UserName") + .UseCollation("tr-x-icu"); b.Property("Village") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("VolumeNo") .HasMaxLength(32) - .HasColumnType("nvarchar(32)"); + .HasColumnType("character varying(32)") + .UseCollation("tr-x-icu"); b.Property("WorkHour") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -7134,23 +7673,25 @@ namespace Sozsoft.Platform.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)") + .UseCollation("tr-x-icu"); b.Property("ClaimValue") .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); + .HasColumnType("character varying(1024)") + .UseCollation("tr-x-icu"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("UserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.HasKey("Id"); @@ -7162,22 +7703,22 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUserDelegation", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("EndTime") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("SourceUserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("StartTime") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("TargetUserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -7188,23 +7729,26 @@ namespace Sozsoft.Platform.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)") + .UseCollation("tr-x-icu"); b.Property("ProviderDisplayName") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("ProviderKey") .IsRequired() .HasMaxLength(196) - .HasColumnType("nvarchar(196)"); + .HasColumnType("character varying(196)") + .UseCollation("tr-x-icu"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("UserId", "LoginProvider"); @@ -7217,21 +7761,21 @@ namespace Sozsoft.Platform.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"); @@ -7244,13 +7788,13 @@ namespace Sozsoft.Platform.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"); @@ -7263,22 +7807,25 @@ namespace Sozsoft.Platform.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)") + .UseCollation("tr-x-icu"); b.Property("Name") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("Value") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.HasKey("UserId", "LoginProvider", "Name"); @@ -7288,70 +7835,73 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Code") .IsRequired() .HasMaxLength(95) - .HasColumnType("nvarchar(95)") - .HasColumnName("Code"); + .HasColumnType("character varying(95)") + .HasColumnName("Code") + .UseCollation("tr-x-icu"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp") + .UseCollation("tr-x-icu"); 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)") - .HasColumnName("DisplayName"); + .HasColumnType("character varying(128)") + .HasColumnName("DisplayName") + .UseCollation("tr-x-icu"); b.Property("EntityVersion") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("ExtraProperties") .IsRequired() - .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"); @@ -7366,21 +7916,21 @@ namespace Sozsoft.Platform.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"); @@ -7394,104 +7944,122 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("ApplicationType") .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + .HasColumnType("character varying(50)") + .UseCollation("tr-x-icu"); b.Property("ClientId") .HasMaxLength(100) - .HasColumnType("nvarchar(100)"); + .HasColumnType("character varying(100)") + .UseCollation("tr-x-icu"); b.Property("ClientSecret") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("ClientType") .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + .HasColumnType("character varying(50)") + .UseCollation("tr-x-icu"); b.Property("ClientUri") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp") + .UseCollation("tr-x-icu"); b.Property("ConsentType") .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + .HasColumnType("character varying(50)") + .UseCollation("tr-x-icu"); 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") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("DisplayNames") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("ExtraProperties") .IsRequired() - .HasColumnType("nvarchar(max)") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("FrontChannelLogoutUri") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("JsonWebKeySet") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("LastModificationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("LogoUri") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("Permissions") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("PostLogoutRedirectUris") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("Properties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("RedirectUris") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("Requirements") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("Settings") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -7504,43 +8072,49 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("ApplicationId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp") + .UseCollation("tr-x-icu"); b.Property("CreationDate") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("ExtraProperties") .IsRequired() - .HasColumnType("nvarchar(max)") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("Properties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("Scopes") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("Status") .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + .HasColumnType("character varying(50)") + .UseCollation("tr-x-icu"); b.Property("Subject") .HasMaxLength(400) - .HasColumnType("nvarchar(400)"); + .HasColumnType("character varying(400)") + .UseCollation("tr-x-icu"); b.Property("Type") .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + .HasColumnType("character varying(50)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -7553,71 +8127,79 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp") + .UseCollation("tr-x-icu"); 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") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("Descriptions") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("DisplayName") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("DisplayNames") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("ExtraProperties") .IsRequired() - .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") .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); + .HasColumnType("character varying(200)") + .UseCollation("tr-x-icu"); b.Property("Properties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("Resources") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -7630,56 +8212,63 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("ApplicationId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("AuthorizationId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp") + .UseCollation("tr-x-icu"); b.Property("CreationDate") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("ExpirationDate") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("ExtraProperties") .IsRequired() - .HasColumnType("nvarchar(max)") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("Payload") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("Properties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("RedemptionDate") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("ReferenceId") .HasMaxLength(100) - .HasColumnType("nvarchar(100)"); + .HasColumnType("character varying(100)") + .UseCollation("tr-x-icu"); b.Property("Status") .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + .HasColumnType("character varying(50)") + .UseCollation("tr-x-icu"); b.Property("Subject") .HasMaxLength(400) - .HasColumnType("nvarchar(400)"); + .HasColumnType("character varying(400)") + .UseCollation("tr-x-icu"); b.Property("Type") .HasMaxLength(150) - .HasColumnType("nvarchar(150)"); + .HasColumnType("character varying(150)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -7696,48 +8285,55 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("DisplayName") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("GroupName") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("IsEnabled") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("MenuGroup") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("MultiTenancySide") - .HasColumnType("tinyint"); + .HasColumnType("smallint"); b.Property("Name") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("ParentName") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("Providers") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("StateCheckers") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -7753,32 +8349,34 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Name") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("ProviderKey") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("ProviderName") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); b.HasIndex("TenantId", "Name", "ProviderName", "ProviderKey") - .IsUnique() - .HasFilter("[TenantId] IS NOT NULL"); + .IsUnique(); b.ToTable("AbpPermissionGrants", (string)null); }); @@ -7787,21 +8385,23 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("DisplayName") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("Name") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -7815,31 +8415,34 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Name") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("ProviderKey") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("ProviderName") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("Value") .IsRequired() .HasMaxLength(2048) - .HasColumnType("nvarchar(2048)"); + .HasColumnType("character varying(2048)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); b.HasIndex("Name", "ProviderName", "ProviderKey") - .IsUnique() - .HasFilter("[ProviderName] IS NOT NULL AND [ProviderKey] IS NOT NULL"); + .IsUnique(); b.ToTable("AbpSettings", (string)null); }); @@ -7848,42 +8451,47 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("DefaultValue") .HasMaxLength(2048) - .HasColumnType("nvarchar(2048)"); + .HasColumnType("character varying(2048)") + .UseCollation("tr-x-icu"); b.Property("Description") .HasMaxLength(512) - .HasColumnType("nvarchar(512)"); + .HasColumnType("character varying(512)") + .UseCollation("tr-x-icu"); b.Property("DisplayName") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("IsEncrypted") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("IsInherited") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("IsVisibleToClients") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("Name") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("Providers") .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); + .HasColumnType("character varying(1024)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -7896,138 +8504,157 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Address1") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("Address2") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("City") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp") + .UseCollation("tr-x-icu"); b.Property("Country") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); 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("District") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("Email") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("EntityVersion") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("ExtraProperties") .IsRequired() - .HasColumnType("nvarchar(max)") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("FaxNumber") .HasMaxLength(20) - .HasColumnType("nvarchar(20)"); + .HasColumnType("character varying(20)") + .UseCollation("tr-x-icu"); b.Property("Founder") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("IsActive") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(true); 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("MaxConcurrentUsers") .ValueGeneratedOnAdd() - .HasColumnType("int") + .HasColumnType("integer") .HasDefaultValue(0); b.Property("MenuGroup") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("MobileNumber") .HasMaxLength(20) - .HasColumnType("nvarchar(20)"); + .HasColumnType("character varying(20)") + .UseCollation("tr-x-icu"); b.Property("Name") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("NormalizedName") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("OrganizationName") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("PhoneNumber") .HasMaxLength(20) - .HasColumnType("nvarchar(20)"); + .HasColumnType("character varying(20)") + .UseCollation("tr-x-icu"); b.Property("PostalCode") .HasMaxLength(10) - .HasColumnType("nvarchar(10)"); + .HasColumnType("character varying(10)") + .UseCollation("tr-x-icu"); b.Property("TaxOffice") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("Township") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("VknTckn") .HasColumnType("bigint"); b.Property("Website") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -8041,16 +8668,18 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => { b.Property("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Name") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("Value") .IsRequired() .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); + .HasColumnType("character varying(1024)") + .UseCollation("tr-x-icu"); b.HasKey("TenantId", "Name"); diff --git a/api/src/Sozsoft.Platform.EntityFrameworkCore/Migrations/20260525115708_Initial.cs b/api/src/Sozsoft.Platform.EntityFrameworkCore/Migrations/20260525115708_Initial.cs new file mode 100644 index 0000000..b762e6e --- /dev/null +++ b/api/src/Sozsoft.Platform.EntityFrameworkCore/Migrations/20260525115708_Initial.cs @@ -0,0 +1,4425 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace Sozsoft.Platform.Migrations +{ + /// + public partial class Initial : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "AbpAuditLogExcelFiles", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + FileName = table.Column(type: "character varying(256)", maxLength: 256, nullable: true, collation: "tr-x-icu"), + CreationTime = table.Column(type: "timestamp with time zone", nullable: false), + CreatorId = table.Column(type: "uuid", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpAuditLogExcelFiles", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpAuditLogs", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + ApplicationName = table.Column(type: "character varying(96)", maxLength: 96, nullable: true, collation: "tr-x-icu"), + UserId = table.Column(type: "uuid", nullable: true), + UserName = table.Column(type: "character varying(256)", maxLength: 256, nullable: true, collation: "tr-x-icu"), + TenantId = table.Column(type: "uuid", nullable: true), + TenantName = table.Column(type: "character varying(64)", maxLength: 64, nullable: true, collation: "tr-x-icu"), + ImpersonatorUserId = table.Column(type: "uuid", nullable: true), + ImpersonatorUserName = table.Column(type: "character varying(256)", maxLength: 256, nullable: true, collation: "tr-x-icu"), + ImpersonatorTenantId = table.Column(type: "uuid", nullable: true), + ImpersonatorTenantName = table.Column(type: "character varying(64)", maxLength: 64, nullable: true, collation: "tr-x-icu"), + 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, collation: "tr-x-icu"), + ClientName = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, collation: "tr-x-icu"), + ClientId = table.Column(type: "character varying(64)", maxLength: 64, nullable: true, collation: "tr-x-icu"), + CorrelationId = table.Column(type: "character varying(64)", maxLength: 64, nullable: true, collation: "tr-x-icu"), + BrowserInfo = table.Column(type: "character varying(512)", maxLength: 512, nullable: true, collation: "tr-x-icu"), + HttpMethod = table.Column(type: "character varying(16)", maxLength: 16, nullable: true, collation: "tr-x-icu"), + Url = table.Column(type: "character varying(256)", maxLength: 256, nullable: true, collation: "tr-x-icu"), + Exceptions = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + Comments = table.Column(type: "character varying(256)", maxLength: 256, nullable: true, collation: "tr-x-icu"), + HttpStatusCode = table.Column(type: "integer", nullable: true), + ExtraProperties = table.Column(type: "text", nullable: false), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: false, collation: "tr-x-icu") + }, + constraints: table => + { + table.PrimaryKey("PK_AbpAuditLogs", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpBackgroundJobs", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + ApplicationName = table.Column(type: "character varying(96)", maxLength: 96, nullable: true, collation: "tr-x-icu"), + JobName = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, collation: "tr-x-icu"), + JobArgs = table.Column(type: "character varying(1048576)", maxLength: 1048576, nullable: false, collation: "tr-x-icu"), + TryCount = table.Column(type: "smallint", nullable: false, defaultValue: (short)0), + CreationTime = table.Column(type: "timestamp with time zone", nullable: false), + NextTryTime = table.Column(type: "timestamp with time zone", nullable: false), + LastTryTime = table.Column(type: "timestamp with time zone", nullable: true), + IsAbandoned = table.Column(type: "boolean", nullable: false, defaultValue: false), + Priority = table.Column(type: "smallint", nullable: false, defaultValue: (byte)15), + ExtraProperties = table.Column(type: "text", nullable: false), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: false, collation: "tr-x-icu") + }, + constraints: table => + { + table.PrimaryKey("PK_AbpBackgroundJobs", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpClaimTypes", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + Name = table.Column(type: "character varying(256)", maxLength: 256, nullable: false, collation: "tr-x-icu"), + 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, collation: "tr-x-icu"), + RegexDescription = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, collation: "tr-x-icu"), + Description = table.Column(type: "character varying(256)", maxLength: 256, nullable: true, collation: "tr-x-icu"), + ValueType = table.Column(type: "integer", nullable: false), + CreationTime = table.Column(type: "timestamp with time zone", nullable: false), + ExtraProperties = table.Column(type: "text", nullable: false), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: false, collation: "tr-x-icu") + }, + constraints: table => + { + table.PrimaryKey("PK_AbpClaimTypes", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpFeatureGroups", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + Name = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, collation: "tr-x-icu"), + DisplayName = table.Column(type: "character varying(256)", maxLength: 256, nullable: false, collation: "tr-x-icu"), + ExtraProperties = table.Column(type: "text", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpFeatureGroups", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpFeatures", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + GroupName = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, collation: "tr-x-icu"), + Name = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, collation: "tr-x-icu"), + ParentName = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, collation: "tr-x-icu"), + DisplayName = table.Column(type: "character varying(256)", maxLength: 256, nullable: false, collation: "tr-x-icu"), + Description = table.Column(type: "character varying(256)", maxLength: 256, nullable: true, collation: "tr-x-icu"), + DefaultValue = table.Column(type: "character varying(256)", maxLength: 256, nullable: true, collation: "tr-x-icu"), + IsVisibleToClients = table.Column(type: "boolean", nullable: false), + IsAvailableToHost = table.Column(type: "boolean", nullable: false), + AllowedProviders = table.Column(type: "character varying(256)", maxLength: 256, nullable: true, collation: "tr-x-icu"), + ValueType = table.Column(type: "character varying(2048)", maxLength: 2048, nullable: true, collation: "tr-x-icu"), + ExtraProperties = table.Column(type: "text", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpFeatures", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpFeatureValues", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + Name = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, collation: "tr-x-icu"), + Value = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, collation: "tr-x-icu"), + ProviderName = table.Column(type: "character varying(64)", maxLength: 64, nullable: true, collation: "tr-x-icu"), + ProviderKey = table.Column(type: "character varying(64)", maxLength: 64, nullable: true, collation: "tr-x-icu") + }, + constraints: table => + { + table.PrimaryKey("PK_AbpFeatureValues", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpLinkUsers", + columns: table => new + { + 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 => + { + table.PrimaryKey("PK_AbpLinkUsers", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpOrganizationUnits", + columns: table => new + { + 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, collation: "tr-x-icu"), + DisplayName = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, collation: "tr-x-icu"), + EntityVersion = table.Column(type: "integer", nullable: false), + ExtraProperties = table.Column(type: "text", nullable: false), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: false, collation: "tr-x-icu"), + 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 => + { + table.PrimaryKey("PK_AbpOrganizationUnits", x => x.Id); + table.ForeignKey( + name: "FK_AbpOrganizationUnits_AbpOrganizationUnits_ParentId", + column: x => x.ParentId, + principalTable: "AbpOrganizationUnits", + principalColumn: "Id"); + }); + + migrationBuilder.CreateTable( + name: "AbpPermissionGrants", + columns: table => new + { + 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, collation: "tr-x-icu"), + ProviderName = table.Column(type: "character varying(64)", maxLength: 64, nullable: false, collation: "tr-x-icu"), + ProviderKey = table.Column(type: "character varying(64)", maxLength: 64, nullable: false, collation: "tr-x-icu") + }, + constraints: table => + { + table.PrimaryKey("PK_AbpPermissionGrants", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpPermissionGroups", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + Name = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, collation: "tr-x-icu"), + DisplayName = table.Column(type: "character varying(256)", maxLength: 256, nullable: false, collation: "tr-x-icu"), + ExtraProperties = table.Column(type: "text", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpPermissionGroups", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpPermissions", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + GroupName = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, collation: "tr-x-icu"), + Name = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, collation: "tr-x-icu"), + ParentName = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, collation: "tr-x-icu"), + DisplayName = table.Column(type: "character varying(256)", maxLength: 256, nullable: false, collation: "tr-x-icu"), + IsEnabled = table.Column(type: "boolean", nullable: false), + MultiTenancySide = table.Column(type: "smallint", nullable: false), + Providers = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, collation: "tr-x-icu"), + StateCheckers = table.Column(type: "character varying(256)", maxLength: 256, nullable: true, collation: "tr-x-icu"), + ExtraProperties = table.Column(type: "text", nullable: true), + MenuGroup = table.Column(type: "character varying(64)", maxLength: 64, nullable: true, collation: "tr-x-icu") + }, + constraints: table => + { + table.PrimaryKey("PK_AbpPermissions", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpRoles", + columns: table => new + { + 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, collation: "tr-x-icu"), + NormalizedName = table.Column(type: "character varying(256)", maxLength: 256, nullable: false, collation: "tr-x-icu"), + IsDefault = table.Column(type: "boolean", nullable: false), + IsStatic = table.Column(type: "boolean", nullable: false), + IsPublic = table.Column(type: "boolean", nullable: false), + EntityVersion = table.Column(type: "integer", nullable: false), + CreationTime = table.Column(type: "timestamp with time zone", nullable: false), + ExtraProperties = table.Column(type: "text", nullable: false), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: false, collation: "tr-x-icu") + }, + constraints: table => + { + table.PrimaryKey("PK_AbpRoles", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpSecurityLogs", + columns: table => new + { + 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, collation: "tr-x-icu"), + Identity = table.Column(type: "character varying(96)", maxLength: 96, nullable: true, collation: "tr-x-icu"), + Action = table.Column(type: "character varying(96)", maxLength: 96, nullable: true, collation: "tr-x-icu"), + UserId = table.Column(type: "uuid", nullable: true), + UserName = table.Column(type: "character varying(256)", maxLength: 256, nullable: true, collation: "tr-x-icu"), + TenantName = table.Column(type: "character varying(64)", maxLength: 64, nullable: true, collation: "tr-x-icu"), + ClientId = table.Column(type: "character varying(64)", maxLength: 64, nullable: true, collation: "tr-x-icu"), + CorrelationId = table.Column(type: "character varying(64)", maxLength: 64, nullable: true, collation: "tr-x-icu"), + ClientIpAddress = table.Column(type: "character varying(64)", maxLength: 64, nullable: true, collation: "tr-x-icu"), + BrowserInfo = table.Column(type: "character varying(512)", maxLength: 512, nullable: true, collation: "tr-x-icu"), + CreationTime = table.Column(type: "timestamp with time zone", nullable: false), + ExtraProperties = table.Column(type: "text", nullable: false), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: false, collation: "tr-x-icu") + }, + constraints: table => + { + table.PrimaryKey("PK_AbpSecurityLogs", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpSessions", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + SessionId = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, collation: "tr-x-icu"), + Device = table.Column(type: "character varying(64)", maxLength: 64, nullable: false, collation: "tr-x-icu"), + DeviceInfo = table.Column(type: "character varying(256)", maxLength: 256, nullable: true, collation: "tr-x-icu"), + TenantId = table.Column(type: "uuid", nullable: true), + UserId = table.Column(type: "uuid", nullable: false), + ClientId = table.Column(type: "character varying(64)", maxLength: 64, nullable: true, collation: "tr-x-icu"), + IpAddresses = table.Column(type: "character varying(2048)", maxLength: 2048, nullable: true, collation: "tr-x-icu"), + SignedIn = table.Column(type: "timestamp with time zone", nullable: false), + LastAccessed = table.Column(type: "timestamp with time zone", nullable: true), + ExtraProperties = table.Column(type: "text", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpSessions", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpSettingDefinitions", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + Name = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, collation: "tr-x-icu"), + DisplayName = table.Column(type: "character varying(256)", maxLength: 256, nullable: false, collation: "tr-x-icu"), + Description = table.Column(type: "character varying(512)", maxLength: 512, nullable: true, collation: "tr-x-icu"), + DefaultValue = table.Column(type: "character varying(2048)", maxLength: 2048, nullable: true, collation: "tr-x-icu"), + IsVisibleToClients = table.Column(type: "boolean", nullable: false), + Providers = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: true, collation: "tr-x-icu"), + IsInherited = table.Column(type: "boolean", nullable: false), + IsEncrypted = table.Column(type: "boolean", nullable: false), + ExtraProperties = table.Column(type: "text", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpSettingDefinitions", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpSettings", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + Name = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, collation: "tr-x-icu"), + Value = table.Column(type: "character varying(2048)", maxLength: 2048, nullable: false, collation: "tr-x-icu"), + ProviderName = table.Column(type: "character varying(64)", maxLength: 64, nullable: true, collation: "tr-x-icu"), + ProviderKey = table.Column(type: "character varying(64)", maxLength: 64, nullable: true, collation: "tr-x-icu") + }, + constraints: table => + { + table.PrimaryKey("PK_AbpSettings", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpTenants", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + Name = table.Column(type: "character varying(64)", maxLength: 64, nullable: false, collation: "tr-x-icu"), + NormalizedName = table.Column(type: "character varying(64)", maxLength: 64, nullable: false, collation: "tr-x-icu"), + EntityVersion = table.Column(type: "integer", nullable: false), + Address1 = table.Column(type: "character varying(256)", maxLength: 256, nullable: true, collation: "tr-x-icu"), + Address2 = table.Column(type: "character varying(256)", maxLength: 256, nullable: true, collation: "tr-x-icu"), + City = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, collation: "tr-x-icu"), + Country = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, collation: "tr-x-icu"), + District = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, collation: "tr-x-icu"), + Email = table.Column(type: "character varying(256)", maxLength: 256, nullable: true, collation: "tr-x-icu"), + FaxNumber = table.Column(type: "character varying(20)", maxLength: 20, nullable: true, collation: "tr-x-icu"), + Founder = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + IsActive = table.Column(type: "boolean", nullable: false, defaultValue: true), + MaxConcurrentUsers = table.Column(type: "integer", nullable: true, defaultValue: 0), + MenuGroup = table.Column(type: "character varying(64)", maxLength: 64, nullable: true, collation: "tr-x-icu"), + MobileNumber = table.Column(type: "character varying(20)", maxLength: 20, nullable: true, collation: "tr-x-icu"), + OrganizationName = table.Column(type: "character varying(64)", maxLength: 64, nullable: true, collation: "tr-x-icu"), + PhoneNumber = table.Column(type: "character varying(20)", maxLength: 20, nullable: true, collation: "tr-x-icu"), + PostalCode = table.Column(type: "character varying(10)", maxLength: 10, nullable: true, collation: "tr-x-icu"), + TaxOffice = table.Column(type: "character varying(64)", maxLength: 64, nullable: true, collation: "tr-x-icu"), + Township = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, collation: "tr-x-icu"), + VknTckn = table.Column(type: "bigint", nullable: true), + Website = table.Column(type: "character varying(256)", maxLength: 256, nullable: true, collation: "tr-x-icu"), + ExtraProperties = table.Column(type: "text", nullable: false), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: false, collation: "tr-x-icu"), + 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 => + { + table.PrimaryKey("PK_AbpTenants", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpUserDelegations", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + SourceUserId = table.Column(type: "uuid", nullable: false), + TargetUserId = table.Column(type: "uuid", nullable: false), + StartTime = table.Column(type: "timestamp with time zone", nullable: false), + EndTime = table.Column(type: "timestamp with time zone", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpUserDelegations", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpUsers", + columns: table => new + { + 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, collation: "tr-x-icu"), + NormalizedUserName = table.Column(type: "character varying(256)", maxLength: 256, nullable: false, collation: "tr-x-icu"), + Name = table.Column(type: "character varying(64)", maxLength: 64, nullable: true, collation: "tr-x-icu"), + Surname = table.Column(type: "character varying(64)", maxLength: 64, nullable: true, collation: "tr-x-icu"), + Email = table.Column(type: "character varying(256)", maxLength: 256, nullable: false, collation: "tr-x-icu"), + NormalizedEmail = table.Column(type: "character varying(256)", maxLength: 256, nullable: false, collation: "tr-x-icu"), + EmailConfirmed = table.Column(type: "boolean", nullable: false, defaultValue: false), + PasswordHash = table.Column(type: "character varying(256)", maxLength: 256, nullable: true, collation: "tr-x-icu"), + SecurityStamp = table.Column(type: "character varying(256)", maxLength: 256, nullable: false, collation: "tr-x-icu"), + IsExternal = table.Column(type: "boolean", nullable: false, defaultValue: false), + PhoneNumber = table.Column(type: "character varying(16)", maxLength: 16, nullable: true, collation: "tr-x-icu"), + 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), + ShouldChangePasswordOnNextLogin = table.Column(type: "boolean", nullable: false), + EntityVersion = table.Column(type: "integer", nullable: false), + LastPasswordChangeTime = table.Column(type: "timestamp with time zone", nullable: true), + BirthDate = table.Column(type: "timestamp with time zone", nullable: true), + BirthPlace = table.Column(type: "character varying(256)", maxLength: 256, nullable: true, collation: "tr-x-icu"), + BloodType = table.Column(type: "character varying(16)", maxLength: 16, nullable: true, collation: "tr-x-icu"), + DepartmentId = table.Column(type: "uuid", nullable: false), + District = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, collation: "tr-x-icu"), + EducationLevel = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, collation: "tr-x-icu"), + FamilySequenceNo = table.Column(type: "character varying(32)", maxLength: 32, nullable: true, collation: "tr-x-icu"), + FatherName = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, collation: "tr-x-icu"), + GraduationSchool = table.Column(type: "character varying(256)", maxLength: 256, nullable: true, collation: "tr-x-icu"), + HireDate = table.Column(type: "timestamp with time zone", nullable: true), + HomeAddress = table.Column(type: "character varying(512)", maxLength: 512, nullable: true, collation: "tr-x-icu"), + IdentityNumber = table.Column(type: "character varying(15)", maxLength: 15, nullable: true, collation: "tr-x-icu"), + IsVerified = table.Column(type: "boolean", nullable: false, defaultValue: false), + IssuedDate = table.Column(type: "timestamp with time zone", nullable: true), + IssuedPlace = table.Column(type: "character varying(256)", maxLength: 256, nullable: true, collation: "tr-x-icu"), + JobPositionId = table.Column(type: "uuid", nullable: false), + LoginEndDate = table.Column(type: "timestamp with time zone", nullable: true), + MaritalStatus = table.Column(type: "character varying(32)", maxLength: 32, nullable: true, collation: "tr-x-icu"), + MarriageDate = table.Column(type: "timestamp with time zone", nullable: true), + MotherName = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, collation: "tr-x-icu"), + Nationality = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, collation: "tr-x-icu"), + Province = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, collation: "tr-x-icu"), + RocketUsername = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + SequenceNo = table.Column(type: "character varying(32)", maxLength: 32, nullable: true, collation: "tr-x-icu"), + SerialNo = table.Column(type: "character varying(32)", maxLength: 32, nullable: true, collation: "tr-x-icu"), + SskNo = table.Column(type: "character varying(32)", maxLength: 32, nullable: true, collation: "tr-x-icu"), + TerminationDate = table.Column(type: "timestamp with time zone", nullable: true), + Village = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, collation: "tr-x-icu"), + VolumeNo = table.Column(type: "character varying(32)", maxLength: 32, nullable: true, collation: "tr-x-icu"), + WorkHour = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + ExtraProperties = table.Column(type: "text", nullable: false), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: false, collation: "tr-x-icu"), + 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 => + { + table.PrimaryKey("PK_AbpUsers", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Adm_T_Announcement", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + Title = table.Column(type: "character varying(256)", maxLength: 256, nullable: false, collation: "tr-x-icu"), + Excerpt = table.Column(type: "character varying(512)", maxLength: 512, nullable: false, collation: "tr-x-icu"), + Content = table.Column(type: "character varying(4096)", maxLength: 4096, nullable: false, collation: "tr-x-icu"), + ImageUrl = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + Category = table.Column(type: "character varying(64)", maxLength: 64, nullable: false, collation: "tr-x-icu"), + UserId = table.Column(type: "uuid", nullable: true), + PublishDate = table.Column(type: "timestamp with time zone", nullable: false), + ExpiryDate = table.Column(type: "timestamp with time zone", nullable: true), + IsPinned = table.Column(type: "boolean", nullable: false), + ViewCount = table.Column(type: "integer", nullable: false, defaultValue: 0), + Attachments = table.Column(type: "character varying(2048)", maxLength: 2048, nullable: true, collation: "tr-x-icu"), + 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 => + { + table.PrimaryKey("PK_Adm_T_Announcement", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Adm_T_Department", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + Name = table.Column(type: "character varying(64)", maxLength: 64, nullable: false, collation: "tr-x-icu"), + ParentId = table.Column(type: "uuid", 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 => + { + table.PrimaryKey("PK_Adm_T_Department", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Adm_T_EventCategory", + columns: table => new + { + 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, collation: "tr-x-icu"), + 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 => + { + table.PrimaryKey("PK_Adm_T_EventCategory", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Adm_T_EventType", + columns: table => new + { + 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, collation: "tr-x-icu"), + 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 => + { + table.PrimaryKey("PK_Adm_T_EventType", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Adm_T_IpRestriction", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + ResourceType = table.Column(type: "character varying(10)", maxLength: 10, nullable: false, collation: "tr-x-icu"), + ResourceId = table.Column(type: "character varying(32)", maxLength: 32, nullable: true, collation: "tr-x-icu"), + IP = table.Column(type: "character varying(32)", maxLength: 32, nullable: false, collation: "tr-x-icu"), + 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 => + { + table.PrimaryKey("PK_Adm_T_IpRestriction", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Adm_T_Note", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + EntityName = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, collation: "tr-x-icu"), + EntityId = table.Column(type: "character varying(64)", maxLength: 64, nullable: false, collation: "tr-x-icu"), + Type = table.Column(type: "character varying(64)", maxLength: 64, nullable: false, collation: "tr-x-icu"), + Subject = table.Column(type: "character varying(256)", maxLength: 256, nullable: false, collation: "tr-x-icu"), + Content = table.Column(type: "character varying(2048)", maxLength: 2048, nullable: false, collation: "tr-x-icu"), + FilesJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + 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 => + { + table.PrimaryKey("PK_Adm_T_Note", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Adm_T_ReportCategory", + columns: table => new + { + 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, collation: "tr-x-icu"), + Description = table.Column(type: "character varying(4096)", maxLength: 4096, nullable: true, collation: "tr-x-icu"), + Icon = table.Column(type: "character varying(64)", maxLength: 64, nullable: true, collation: "tr-x-icu"), + 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 => + { + table.PrimaryKey("PK_Adm_T_ReportCategory", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Adm_T_Sector", + columns: table => new + { + 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, collation: "tr-x-icu"), + 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 => + { + table.PrimaryKey("PK_Adm_T_Sector", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Adm_T_Sequence", + columns: table => new + { + 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, collation: "tr-x-icu"), + IsActive = table.Column(type: "boolean", nullable: false, defaultValue: true), + Prefix = table.Column(type: "character varying(32)", maxLength: 32, nullable: true, collation: "tr-x-icu"), + Suffix = table.Column(type: "character varying(32)", maxLength: 32, nullable: true, collation: "tr-x-icu"), + PaddingSize = table.Column(type: "integer", nullable: false, defaultValue: 6), + IncrementStep = table.Column(type: "integer", nullable: false, defaultValue: 1), + StartNumber = table.Column(type: "bigint", nullable: false), + NextNumber = table.Column(type: "bigint", nullable: false, defaultValue: 1L), + ResetPeriod = table.Column(type: "integer", nullable: false, defaultValue: 0), + LastPeriodKey = table.Column(type: "character varying(20)", maxLength: 20, nullable: true, collation: "tr-x-icu"), + FormatTemplate = table.Column(type: "character varying(256)", maxLength: 256, nullable: false, defaultValue: "{Prefix}{Number}{Suffix}", collation: "tr-x-icu"), + 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 => + { + table.PrimaryKey("PK_Adm_T_Sequence", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Adm_T_SocialPost", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + UserId = table.Column(type: "uuid", nullable: true), + Content = table.Column(type: "character varying(4096)", maxLength: 4096, nullable: false, collation: "tr-x-icu"), + LikeCount = table.Column(type: "integer", nullable: false, defaultValue: 0), + IsLiked = table.Column(type: "boolean", nullable: false, defaultValue: false), + IsOwnPost = table.Column(type: "boolean", nullable: false, defaultValue: false), + 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 => + { + table.PrimaryKey("PK_Adm_T_SocialPost", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Adm_T_Survey", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + Title = table.Column(type: "character varying(256)", maxLength: 256, nullable: false, collation: "tr-x-icu"), + Description = table.Column(type: "character varying(2048)", maxLength: 2048, nullable: true, collation: "tr-x-icu"), + Deadline = table.Column(type: "timestamp with time zone", nullable: false), + Responses = table.Column(type: "integer", nullable: false, defaultValue: 0), + Status = table.Column(type: "character varying(10)", maxLength: 10, nullable: false, collation: "tr-x-icu"), + IsAnonymous = table.Column(type: "boolean", nullable: false), + 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 => + { + table.PrimaryKey("PK_Adm_T_Survey", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Adm_T_Videoroom", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + BranchId = table.Column(type: "uuid", nullable: true), + Name = table.Column(type: "character varying(256)", maxLength: 256, nullable: false, collation: "tr-x-icu"), + Description = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: true, collation: "tr-x-icu"), + Subject = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, collation: "tr-x-icu"), + TeacherId = table.Column(type: "uuid", nullable: true), + TeacherName = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, collation: "tr-x-icu"), + ScheduledStartTime = table.Column(type: "timestamp with time zone", nullable: false), + ScheduledEndTime = table.Column(type: "timestamp with time zone", nullable: true), + Duration = table.Column(type: "integer", nullable: false), + ActualStartTime = table.Column(type: "timestamp with time zone", nullable: true), + ActualEndTime = table.Column(type: "timestamp with time zone", nullable: true), + MaxParticipants = table.Column(type: "integer", nullable: false), + ParticipantCount = table.Column(type: "integer", nullable: false), + SettingsJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + 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 => + { + table.PrimaryKey("PK_Adm_T_Videoroom", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Adm_T_WorkHour", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + Name = table.Column(type: "character varying(64)", maxLength: 64, nullable: false, collation: "tr-x-icu"), + StartTime = table.Column(type: "timestamp with time zone", maxLength: 8, nullable: false), + EndTime = table.Column(type: "timestamp with time zone", maxLength: 8, nullable: false), + Monday = table.Column(type: "boolean", nullable: true), + Tuesday = table.Column(type: "boolean", nullable: true), + Wednesday = table.Column(type: "boolean", nullable: true), + Thursday = table.Column(type: "boolean", nullable: true), + Friday = table.Column(type: "boolean", nullable: true), + Saturday = table.Column(type: "boolean", nullable: true), + Sunday = table.Column(type: "boolean", 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 => + { + table.PrimaryKey("PK_Adm_T_WorkHour", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "OpenIddictApplications", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + ApplicationType = table.Column(type: "character varying(50)", maxLength: 50, nullable: true, collation: "tr-x-icu"), + ClientId = table.Column(type: "character varying(100)", maxLength: 100, nullable: true, collation: "tr-x-icu"), + ClientSecret = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + ClientType = table.Column(type: "character varying(50)", maxLength: 50, nullable: true, collation: "tr-x-icu"), + ConsentType = table.Column(type: "character varying(50)", maxLength: 50, nullable: true, collation: "tr-x-icu"), + DisplayName = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + DisplayNames = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + JsonWebKeySet = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + Permissions = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + PostLogoutRedirectUris = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + Properties = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + RedirectUris = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + Requirements = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + Settings = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + FrontChannelLogoutUri = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + ClientUri = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + LogoUri = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + ExtraProperties = table.Column(type: "text", nullable: false), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: false, collation: "tr-x-icu"), + 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 => + { + table.PrimaryKey("PK_OpenIddictApplications", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "OpenIddictScopes", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + Description = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + Descriptions = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + DisplayName = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + DisplayNames = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + Name = table.Column(type: "character varying(200)", maxLength: 200, nullable: true, collation: "tr-x-icu"), + Properties = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + Resources = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + ExtraProperties = table.Column(type: "text", nullable: false), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: false, collation: "tr-x-icu"), + 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 => + { + table.PrimaryKey("PK_OpenIddictScopes", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Sas_H_About", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + StatsJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + DescriptionsJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + SectionsJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + 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 => + { + table.PrimaryKey("PK_Sas_H_About", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Sas_H_AiBot", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + Name = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, collation: "tr-x-icu"), + Description = table.Column(type: "character varying(256)", maxLength: 256, nullable: true, collation: "tr-x-icu"), + ApiUrl = table.Column(type: "character varying(256)", maxLength: 256, nullable: true, collation: "tr-x-icu"), + IsActive = table.Column(type: "boolean", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Sas_H_AiBot", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Sas_H_BackgroundWorker", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + Name = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, collation: "tr-x-icu"), + Cron = table.Column(type: "character varying(64)", maxLength: 64, nullable: false, collation: "tr-x-icu"), + WorkerType = table.Column(type: "integer", nullable: false), + IsActive = table.Column(type: "boolean", nullable: false, defaultValue: true), + DataSourceCode = table.Column(type: "character varying(64)", maxLength: 64, nullable: true, collation: "tr-x-icu"), + BeforeSp = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, collation: "tr-x-icu"), + AfterSp = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, collation: "tr-x-icu"), + Options = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + 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 => + { + table.PrimaryKey("PK_Sas_H_BackgroundWorker", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Sas_H_BackgroundWorker_MailQueueTableFormat", + columns: table => new + { + Id = table.Column(type: "integer", nullable: false) + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), + TableName = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, collation: "tr-x-icu"), + Order = table.Column(type: "smallint", nullable: false), + ColumnName = table.Column(type: "character varying(64)", maxLength: 64, nullable: true, collation: "tr-x-icu"), + Caption = table.Column(type: "character varying(64)", maxLength: 64, nullable: true, collation: "tr-x-icu"), + HeaderCss = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: true, collation: "tr-x-icu"), + Css = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: true, collation: "tr-x-icu"), + FooterCss = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: true, collation: "tr-x-icu"), + DataType = table.Column(type: "character varying(64)", maxLength: 64, nullable: true, collation: "tr-x-icu"), + DataFormat = table.Column(type: "character varying(64)", maxLength: 64, nullable: true, collation: "tr-x-icu"), + IsHidden = table.Column(type: "boolean", nullable: false), + IsProtected = table.Column(type: "boolean", nullable: false), + SubTotal = table.Column(type: "character varying(64)", maxLength: 64, nullable: true, collation: "tr-x-icu"), + Width = table.Column(type: "integer", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Sas_H_BackgroundWorker_MailQueueTableFormat", x => x.Id); + table.UniqueConstraint("AK_Sas_H_BackgroundWorker_MailQueueTableFormat_TableName", x => x.TableName); + }); + + migrationBuilder.CreateTable( + name: "Sas_H_BlogCategory", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + Name = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, collation: "tr-x-icu"), + Slug = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, collation: "tr-x-icu"), + Description = table.Column(type: "character varying(512)", maxLength: 512, nullable: true, collation: "tr-x-icu"), + Icon = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, collation: "tr-x-icu"), + DisplayOrder = table.Column(type: "integer", nullable: false), + IsActive = table.Column(type: "boolean", nullable: false), + PostCount = table.Column(type: "integer", 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 => + { + table.PrimaryKey("PK_Sas_H_BlogCategory", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Sas_H_Contact", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + Address = table.Column(type: "character varying(512)", maxLength: 512, nullable: true, collation: "tr-x-icu"), + PhoneNumber = table.Column(type: "character varying(20)", maxLength: 20, nullable: true, collation: "tr-x-icu"), + Email = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, collation: "tr-x-icu"), + Location = table.Column(type: "character varying(256)", maxLength: 256, nullable: true, collation: "tr-x-icu"), + TaxNumber = table.Column(type: "bigint", nullable: true), + BankJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + WorkHoursJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + MapJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + 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 => + { + table.PrimaryKey("PK_Sas_H_Contact", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Sas_H_ContactTitle", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + Title = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, collation: "tr-x-icu"), + Abbreviation = table.Column(type: "character varying(64)", maxLength: 64, nullable: true, collation: "tr-x-icu"), + 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 => + { + table.PrimaryKey("PK_Sas_H_ContactTitle", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Sas_H_CountryGroup", + columns: table => new + { + Id = table.Column(type: "text", nullable: false, collation: "tr-x-icu"), + Name = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, collation: "tr-x-icu"), + 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 => + { + table.PrimaryKey("PK_Sas_H_CountryGroup", x => x.Id); + table.UniqueConstraint("AK_Sas_H_CountryGroup_Name", x => x.Name); + }); + + migrationBuilder.CreateTable( + name: "Sas_H_CrudEndpoint", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + EntityName = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, collation: "tr-x-icu"), + Method = table.Column(type: "character varying(10)", maxLength: 10, nullable: false, collation: "tr-x-icu"), + Path = table.Column(type: "character varying(256)", maxLength: 256, nullable: false, collation: "tr-x-icu"), + OperationType = table.Column(type: "character varying(64)", maxLength: 64, nullable: false, collation: "tr-x-icu"), + CsharpCode = table.Column(type: "text", nullable: false, collation: "tr-x-icu"), + IsActive = table.Column(type: "boolean", nullable: false), + 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 => + { + table.PrimaryKey("PK_Sas_H_CrudEndpoint", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Sas_H_Currency", + columns: table => new + { + Id = table.Column(type: "character varying(64)", maxLength: 64, nullable: false, collation: "tr-x-icu"), + Symbol = table.Column(type: "character varying(8)", maxLength: 8, nullable: true, collation: "tr-x-icu"), + Name = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, collation: "tr-x-icu"), + Rate = table.Column(type: "numeric(18,6)", precision: 18, scale: 6, nullable: false), + IsActive = table.Column(type: "boolean", nullable: false, defaultValue: true), + LastUpdated = table.Column(type: "timestamp with time zone", 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 => + { + table.PrimaryKey("PK_Sas_H_Currency", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Sas_H_CustomComponent", + columns: table => new + { + 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, collation: "tr-x-icu"), + Code = table.Column(type: "text", nullable: false, collation: "tr-x-icu"), + Props = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: true, collation: "tr-x-icu"), + Description = table.Column(type: "character varying(512)", maxLength: 512, nullable: true, collation: "tr-x-icu"), + IsActive = table.Column(type: "boolean", nullable: false), + Dependencies = table.Column(type: "character varying(2048)", maxLength: 2048, nullable: true, collation: "tr-x-icu"), + 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 => + { + table.PrimaryKey("PK_Sas_H_CustomComponent", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Sas_H_CustomEndpoint", + columns: table => new + { + 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, collation: "tr-x-icu"), + Description = table.Column(type: "character varying(512)", maxLength: 512, nullable: true, collation: "tr-x-icu"), + Url = table.Column(type: "character varying(256)", maxLength: 256, nullable: false, collation: "tr-x-icu"), + Method = table.Column(type: "character varying(10)", maxLength: 10, nullable: false, collation: "tr-x-icu"), + DataSourceCode = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, collation: "tr-x-icu"), + Sql = table.Column(type: "text", nullable: false, collation: "tr-x-icu"), + ParametersJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + PermissionsJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + 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 => + { + table.PrimaryKey("PK_Sas_H_CustomEndpoint", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Sas_H_DataSource", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + Code = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, collation: "tr-x-icu"), + DataSourceType = table.Column(type: "integer", nullable: false), + ConnectionString = table.Column(type: "character varying(256)", maxLength: 256, nullable: true, collation: "tr-x-icu"), + 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 => + { + table.PrimaryKey("PK_Sas_H_DataSource", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Sas_H_Demo", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + OrganizationName = table.Column(type: "character varying(256)", maxLength: 256, nullable: false, collation: "tr-x-icu"), + Name = table.Column(type: "character varying(256)", maxLength: 256, nullable: false, collation: "tr-x-icu"), + Email = table.Column(type: "character varying(256)", maxLength: 256, nullable: false, collation: "tr-x-icu"), + PhoneNumber = table.Column(type: "character varying(20)", maxLength: 20, nullable: false, collation: "tr-x-icu"), + Address = table.Column(type: "character varying(512)", maxLength: 512, nullable: false, collation: "tr-x-icu"), + NumberOfBranches = table.Column(type: "integer", nullable: false), + NumberOfUsers = table.Column(type: "integer", nullable: false), + Message = table.Column(type: "character varying(2048)", maxLength: 2048, nullable: false, collation: "tr-x-icu"), + 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 => + { + table.PrimaryKey("PK_Sas_H_Demo", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Sas_H_DynamicService", + columns: table => new + { + 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, collation: "tr-x-icu"), + DisplayName = table.Column(type: "character varying(512)", maxLength: 512, nullable: true, collation: "tr-x-icu"), + Description = table.Column(type: "character varying(2048)", maxLength: 2048, nullable: true, collation: "tr-x-icu"), + Code = table.Column(type: "text", nullable: false, collation: "tr-x-icu"), + IsActive = table.Column(type: "boolean", nullable: false, defaultValue: true), + CompilationStatus = table.Column(type: "character varying(20)", maxLength: 20, nullable: false), + LastCompilationError = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + LastSuccessfulCompilation = table.Column(type: "timestamp with time zone", nullable: true), + Version = table.Column(type: "integer", nullable: false, defaultValue: 1), + CodeHash = table.Column(type: "character varying(64)", maxLength: 64, nullable: true, collation: "tr-x-icu"), + PrimaryEntityType = table.Column(type: "character varying(256)", maxLength: 256, nullable: true, collation: "tr-x-icu"), + ControllerName = table.Column(type: "character varying(256)", maxLength: 256, nullable: true, collation: "tr-x-icu"), + 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 => + { + table.PrimaryKey("PK_Sas_H_DynamicService", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Sas_H_Home", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + HeroBackgroundImageKey = table.Column(type: "character varying(256)", maxLength: 256, nullable: true, collation: "tr-x-icu"), + HeroPrimaryCtaKey = table.Column(type: "character varying(256)", maxLength: 256, nullable: true, collation: "tr-x-icu"), + HeroSecondaryCtaKey = table.Column(type: "character varying(256)", maxLength: 256, nullable: true, collation: "tr-x-icu"), + FeaturesTitleKey = table.Column(type: "character varying(256)", maxLength: 256, nullable: true, collation: "tr-x-icu"), + FeaturesSubtitleKey = table.Column(type: "character varying(256)", maxLength: 256, nullable: true, collation: "tr-x-icu"), + SolutionsTitleKey = table.Column(type: "character varying(256)", maxLength: 256, nullable: true, collation: "tr-x-icu"), + SolutionsSubtitleKey = table.Column(type: "character varying(256)", maxLength: 256, nullable: true, collation: "tr-x-icu"), + CtaTitleKey = table.Column(type: "character varying(256)", maxLength: 256, nullable: true, collation: "tr-x-icu"), + CtaSubtitleKey = table.Column(type: "character varying(256)", maxLength: 256, nullable: true, collation: "tr-x-icu"), + CtaButtonLabelKey = table.Column(type: "character varying(256)", maxLength: 256, nullable: true, collation: "tr-x-icu"), + SlidesJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + FeaturesJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + SolutionsJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + 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 => + { + table.PrimaryKey("PK_Sas_H_Home", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Sas_H_InstallmentOption", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + Installment = table.Column(type: "integer", nullable: false), + Name = table.Column(type: "character varying(32)", maxLength: 32, nullable: false, collation: "tr-x-icu"), + Commission = table.Column(type: "numeric(5,3)", precision: 5, scale: 3, nullable: false), + 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 => + { + table.PrimaryKey("PK_Sas_H_InstallmentOption", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Sas_H_Language", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + CultureName = table.Column(type: "character varying(10)", maxLength: 10, nullable: false, collation: "tr-x-icu"), + UiCultureName = table.Column(type: "character varying(10)", maxLength: 10, nullable: false, collation: "tr-x-icu"), + DisplayName = table.Column(type: "character varying(64)", maxLength: 64, nullable: false, collation: "tr-x-icu"), + IsEnabled = table.Column(type: "boolean", nullable: false), + TwoLetterISOLanguageName = table.Column(type: "character varying(2)", maxLength: 2, nullable: false, collation: "tr-x-icu") + }, + constraints: table => + { + table.PrimaryKey("PK_Sas_H_Language", x => x.Id); + table.UniqueConstraint("AK_Sas_H_Language_CultureName", x => x.CultureName); + }); + + migrationBuilder.CreateTable( + name: "Sas_H_LanguageKey", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + Key = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, collation: "tr-x-icu"), + ResourceName = table.Column(type: "character varying(64)", maxLength: 64, nullable: false, collation: "tr-x-icu") + }, + constraints: table => + { + table.PrimaryKey("PK_Sas_H_LanguageKey", x => x.Id); + table.UniqueConstraint("AK_Sas_H_LanguageKey_ResourceName_Key", x => new { x.ResourceName, x.Key }); + }); + + migrationBuilder.CreateTable( + name: "Sas_H_ListForm", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + ListFormCode = table.Column(type: "character varying(64)", maxLength: 64, nullable: false, collation: "tr-x-icu"), + CultureName = table.Column(type: "character varying(10)", maxLength: 10, nullable: false, collation: "tr-x-icu"), + DataSourceCode = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, collation: "tr-x-icu"), + SelectCommandType = table.Column(type: "integer", nullable: false), + TableName = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, collation: "tr-x-icu"), + SelectCommand = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + KeyFieldName = table.Column(type: "character varying(64)", maxLength: 64, nullable: true, collation: "tr-x-icu"), + KeyFieldDbSourceType = table.Column(type: "integer", nullable: false), + SelectFieldsDefaultValueJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + Name = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, collation: "tr-x-icu"), + Description = table.Column(type: "character varying(512)", maxLength: 512, nullable: true, collation: "tr-x-icu"), + Title = table.Column(type: "character varying(256)", maxLength: 256, nullable: true, collation: "tr-x-icu"), + SortMode = table.Column(type: "character varying(20)", maxLength: 20, nullable: true, collation: "tr-x-icu"), + PageSize = table.Column(type: "integer", nullable: false, defaultValue: 50), + Width = table.Column(type: "integer", nullable: true), + Height = table.Column(type: "integer", nullable: true), + FullHeight = table.Column(type: "boolean", nullable: false), + DefaultFilter = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + ColumnOptionJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + PivotOptionJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + TreeOptionJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + GanttOptionJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + SchedulerOptionJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + FilterRowJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + RowJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + HeaderFilterJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + FilterPanelJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + SearchPanelJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + GroupPanelJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + SelectionJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + PagerOptionJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + EditingOptionJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + EditingFormJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + PermissionJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + InsertFieldsDefaultValueJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + UpdateFieldsDefaultValueJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + DeleteFieldsDefaultValueJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + CommandColumnJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + StateStoringJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + DeleteCommand = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + DeleteBeforeCommand = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + DeleteAfterCommand = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + UpdateCommand = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + UpdateBeforeCommand = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + UpdateAfterCommand = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + InsertCommand = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + InsertBeforeCommand = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + InsertAfterCommand = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + UpdateServiceAddress = table.Column(type: "character varying(256)", maxLength: 256, nullable: true, collation: "tr-x-icu"), + InsertServiceAddress = table.Column(type: "character varying(256)", maxLength: 256, nullable: true, collation: "tr-x-icu"), + DeleteServiceAddress = table.Column(type: "character varying(256)", maxLength: 256, nullable: true, collation: "tr-x-icu"), + CustomJsSourcesJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + CustomStyleSourcesJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + FormFieldsDefaultValueJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + IsTenant = table.Column(type: "boolean", nullable: false), + IsBranch = table.Column(type: "boolean", nullable: false), + IsOrganizationUnit = table.Column(type: "boolean", nullable: false), + ListFormType = table.Column(type: "character varying(20)", maxLength: 20, nullable: true, collation: "tr-x-icu"), + IsSubForm = table.Column(type: "boolean", nullable: false), + SubFormsListFormType = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + ShowNote = table.Column(type: "boolean", nullable: false), + SubFormsJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + WidgetsJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + WorkflowJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + ExtraFilterJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + LayoutJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + UserId = table.Column(type: "character varying(256)", maxLength: 256, nullable: true, collation: "tr-x-icu"), + RoleId = table.Column(type: "character varying(256)", maxLength: 256, nullable: true, collation: "tr-x-icu"), + CommonJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + DataSourceJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + AdaptiveLayoutJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + AnimationJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + AnnotationsJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + ArgumentAxisJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + CommonAnnotationsSettingsJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + CommonAxisSettingsJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + CommonPaneSettingsJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + CommonSeriesSettingsJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + CrosshairJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + ExportJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + LegendJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + MarginJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + PanesJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + ScrollBarJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + SeriesJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + SizeJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + TitleJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + TooltipJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + ValueAxisJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + ZoomAndPanJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu") + }, + constraints: table => + { + table.PrimaryKey("PK_Sas_H_ListForm", x => x.Id); + table.UniqueConstraint("AK_Sas_H_ListForm_ListFormCode", x => x.ListFormCode); + }); + + migrationBuilder.CreateTable( + name: "Sas_H_ListFormWorkflow", + columns: table => new + { + Id = table.Column(type: "character varying(50)", maxLength: 50, nullable: false, collation: "tr-x-icu"), + ListFormCode = table.Column(type: "character varying(64)", maxLength: 64, nullable: false, collation: "tr-x-icu"), + Kind = table.Column(type: "character varying(50)", maxLength: 50, nullable: false, collation: "tr-x-icu"), + Title = table.Column(type: "character varying(250)", maxLength: 250, nullable: false, collation: "tr-x-icu"), + CompareColumn = table.Column(type: "character varying(100)", maxLength: 100, nullable: false, collation: "tr-x-icu"), + CompareOperator = table.Column(type: "character varying(20)", maxLength: 20, nullable: false, collation: "tr-x-icu"), + CompareValue = table.Column(type: "numeric(18,2)", precision: 18, scale: 2, nullable: false), + Approver = table.Column(type: "character varying(250)", maxLength: 250, nullable: false, collation: "tr-x-icu"), + NextOnStart = table.Column(type: "character varying(50)", maxLength: 50, nullable: false, collation: "tr-x-icu"), + NextOnTrue = table.Column(type: "character varying(50)", maxLength: 50, nullable: false, collation: "tr-x-icu"), + NextOnFalse = table.Column(type: "character varying(50)", maxLength: 50, nullable: false, collation: "tr-x-icu"), + NextOnApprove = table.Column(type: "character varying(50)", maxLength: 50, nullable: false, collation: "tr-x-icu"), + NextOnReject = table.Column(type: "character varying(50)", maxLength: 50, nullable: false, collation: "tr-x-icu"), + PositionX = table.Column(type: "integer", nullable: false), + PositionY = table.Column(type: "integer", nullable: false), + CompareOutcomesJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu") + }, + constraints: table => + { + table.PrimaryKey("PK_Sas_H_ListFormWorkflow", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Sas_H_LogEntry", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + Message = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + MessageTemplate = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + Level = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + TimeStamp = table.Column(type: "timestamp with time zone", nullable: true), + Exception = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + Properties = table.Column(type: "text", nullable: true, collation: "tr-x-icu") + }, + constraints: table => + { + table.PrimaryKey("PK_Sas_H_LogEntry", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Sas_H_Menu", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + Code = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, collation: "tr-x-icu"), + DisplayName = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, collation: "tr-x-icu"), + Order = table.Column(type: "integer", nullable: false), + Url = table.Column(type: "character varying(256)", maxLength: 256, nullable: true, collation: "tr-x-icu"), + Icon = table.Column(type: "character varying(64)", maxLength: 64, nullable: true, collation: "tr-x-icu"), + ParentCode = table.Column(type: "character varying(64)", maxLength: 64, nullable: true, collation: "tr-x-icu"), + CssClass = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, collation: "tr-x-icu"), + RequiredPermissionName = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, collation: "tr-x-icu"), + ShortName = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + Target = table.Column(type: "character varying(64)", maxLength: 64, nullable: true, collation: "tr-x-icu"), + IsDisabled = table.Column(type: "boolean", nullable: false), + ElementId = table.Column(type: "character varying(64)", maxLength: 64, nullable: true, collation: "tr-x-icu"), + UserId = table.Column(type: "character varying(256)", maxLength: 256, nullable: true, collation: "tr-x-icu"), + RoleId = table.Column(type: "character varying(256)", maxLength: 256, nullable: true, collation: "tr-x-icu"), + CultureName = table.Column(type: "character varying(64)", maxLength: 64, nullable: true, collation: "tr-x-icu") + }, + constraints: table => + { + table.PrimaryKey("PK_Sas_H_Menu", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Sas_H_MenuGroup", + columns: table => new + { + Id = table.Column(type: "text", nullable: false, collation: "tr-x-icu"), + Name = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, collation: "tr-x-icu") + }, + constraints: table => + { + table.PrimaryKey("PK_Sas_H_MenuGroup", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Sas_H_NotificationType", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + Name = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, collation: "tr-x-icu"), + 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 => + { + table.PrimaryKey("PK_Sas_H_NotificationType", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Sas_H_Order", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + Name = table.Column(type: "character varying(64)", maxLength: 64, nullable: true, collation: "tr-x-icu"), + IsActive = table.Column(type: "boolean", nullable: false), + OrganizationName = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, collation: "tr-x-icu"), + Founder = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, collation: "tr-x-icu"), + VknTckn = table.Column(type: "bigint", nullable: true), + TaxOffice = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, collation: "tr-x-icu"), + Address1 = table.Column(type: "character varying(512)", maxLength: 512, nullable: true, collation: "tr-x-icu"), + Address2 = table.Column(type: "character varying(512)", maxLength: 512, nullable: true, collation: "tr-x-icu"), + District = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, collation: "tr-x-icu"), + Country = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, collation: "tr-x-icu"), + City = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, collation: "tr-x-icu"), + PostalCode = table.Column(type: "character varying(16)", maxLength: 16, nullable: true, collation: "tr-x-icu"), + MobileNumber = table.Column(type: "character varying(20)", maxLength: 20, nullable: true, collation: "tr-x-icu"), + PhoneNumber = table.Column(type: "character varying(20)", maxLength: 20, nullable: true, collation: "tr-x-icu"), + FaxNumber = table.Column(type: "character varying(20)", maxLength: 20, nullable: true, collation: "tr-x-icu"), + Email = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, collation: "tr-x-icu"), + Website = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, collation: "tr-x-icu"), + MenuGroup = table.Column(type: "character varying(64)", maxLength: 64, nullable: true, collation: "tr-x-icu"), + Subtotal = table.Column(type: "numeric(18,2)", precision: 18, scale: 2, nullable: false), + Commission = table.Column(type: "numeric(18,2)", precision: 18, scale: 2, nullable: false), + Total = table.Column(type: "numeric(18,2)", precision: 18, scale: 2, nullable: false), + PaymentMethodId = table.Column(type: "uuid", nullable: false), + Installment = table.Column(type: "integer", nullable: true), + PaymentDataJson = table.Column(type: "character varying(4096)", maxLength: 4096, nullable: true, collation: "tr-x-icu"), + 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 => + { + table.PrimaryKey("PK_Sas_H_Order", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Sas_H_PaymentMethod", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + Name = table.Column(type: "character varying(64)", maxLength: 64, nullable: false, collation: "tr-x-icu"), + Commission = table.Column(type: "numeric(5,3)", precision: 5, scale: 3, nullable: false), + Logo = table.Column(type: "character varying(32)", maxLength: 32, nullable: true, collation: "tr-x-icu"), + 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 => + { + table.PrimaryKey("PK_Sas_H_PaymentMethod", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Sas_H_Product", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + Name = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, collation: "tr-x-icu"), + Description = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: true, collation: "tr-x-icu"), + Category = table.Column(type: "character varying(64)", maxLength: 64, nullable: false, collation: "tr-x-icu"), + Order = table.Column(type: "integer", nullable: false), + MonthlyPrice = table.Column(type: "numeric(18,2)", precision: 18, scale: 2, nullable: true), + YearlyPrice = table.Column(type: "numeric(18,2)", precision: 18, scale: 2, nullable: true), + IsQuantityBased = table.Column(type: "boolean", nullable: false), + ImageUrl = table.Column(type: "character varying(512)", maxLength: 512, nullable: true, collation: "tr-x-icu"), + 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 => + { + table.PrimaryKey("PK_Sas_H_Product", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Sas_H_Route", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + Key = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, collation: "tr-x-icu"), + Path = table.Column(type: "character varying(256)", maxLength: 256, nullable: false, collation: "tr-x-icu"), + ComponentPath = table.Column(type: "character varying(256)", maxLength: 256, nullable: false, collation: "tr-x-icu"), + RouteType = table.Column(type: "character varying(64)", maxLength: 64, nullable: true, collation: "tr-x-icu"), + Authority = table.Column(type: "text", 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 => + { + table.PrimaryKey("PK_Sas_H_Route", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Sas_H_Service", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + Icon = table.Column(type: "character varying(64)", maxLength: 64, nullable: true, collation: "tr-x-icu"), + Title = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, collation: "tr-x-icu"), + Description = table.Column(type: "character varying(512)", maxLength: 512, nullable: true, collation: "tr-x-icu"), + Type = table.Column(type: "character varying(64)", maxLength: 64, nullable: true, collation: "tr-x-icu"), + Features = table.Column(type: "text", 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 => + { + table.PrimaryKey("PK_Sas_H_Service", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Sas_H_SettingDefinition", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + Code = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, collation: "tr-x-icu"), + NameKey = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, collation: "tr-x-icu"), + DescriptionKey = table.Column(type: "character varying(512)", maxLength: 512, nullable: true, collation: "tr-x-icu"), + DefaultValue = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: true, collation: "tr-x-icu"), + IsVisibleToClients = table.Column(type: "boolean", nullable: false), + Providers = table.Column(type: "character varying(64)", maxLength: 64, nullable: true, collation: "tr-x-icu"), + IsInherited = table.Column(type: "boolean", nullable: false), + IsEncrypted = table.Column(type: "boolean", nullable: false), + MainGroupKey = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, collation: "tr-x-icu"), + SubGroupKey = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, collation: "tr-x-icu"), + RequiredPermissionName = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, collation: "tr-x-icu"), + DataType = table.Column(type: "character varying(16)", maxLength: 16, nullable: false, collation: "tr-x-icu"), + SelectOptions = table.Column(type: "text", nullable: true), + Order = table.Column(type: "integer", nullable: false), + 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 => + { + table.PrimaryKey("PK_Sas_H_SettingDefinition", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Sas_H_SkillType", + columns: table => new + { + Id = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, collation: "tr-x-icu"), + Name = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, collation: "tr-x-icu"), + 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 => + { + table.PrimaryKey("PK_Sas_H_SkillType", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Sas_H_UomCategory", + columns: table => new + { + Id = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, collation: "tr-x-icu"), + Name = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, collation: "tr-x-icu"), + 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 => + { + table.PrimaryKey("PK_Sas_H_UomCategory", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Sas_T_Branch", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + Code = table.Column(type: "character varying(64)", maxLength: 64, nullable: false, collation: "tr-x-icu"), + Name = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, collation: "tr-x-icu"), + VknTckn = table.Column(type: "bigint", nullable: false), + TaxOffice = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, collation: "tr-x-icu"), + Country = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, collation: "tr-x-icu"), + City = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, collation: "tr-x-icu"), + District = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, collation: "tr-x-icu"), + Township = table.Column(type: "character varying(256)", maxLength: 256, nullable: true, collation: "tr-x-icu"), + Address1 = table.Column(type: "character varying(512)", maxLength: 512, nullable: true, collation: "tr-x-icu"), + Address2 = table.Column(type: "character varying(512)", maxLength: 512, nullable: true, collation: "tr-x-icu"), + PostalCode = table.Column(type: "character varying(16)", maxLength: 16, nullable: true, collation: "tr-x-icu"), + MobileNumber = table.Column(type: "character varying(20)", maxLength: 20, nullable: false, collation: "tr-x-icu"), + PhoneNumber = table.Column(type: "character varying(20)", maxLength: 20, nullable: true, collation: "tr-x-icu"), + FaxNumber = table.Column(type: "character varying(20)", maxLength: 20, nullable: true, collation: "tr-x-icu"), + Email = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, collation: "tr-x-icu"), + Website = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, collation: "tr-x-icu"), + IsActive = table.Column(type: "boolean", nullable: true, defaultValue: 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 => + { + table.PrimaryKey("PK_Sas_T_Branch", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Sas_T_ForumCategory", + columns: table => new + { + 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, collation: "tr-x-icu"), + Slug = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, collation: "tr-x-icu"), + Description = table.Column(type: "character varying(512)", maxLength: 512, nullable: true, collation: "tr-x-icu"), + Icon = table.Column(type: "character varying(64)", maxLength: 64, nullable: true, collation: "tr-x-icu"), + DisplayOrder = table.Column(type: "integer", nullable: false), + IsActive = table.Column(type: "boolean", nullable: false), + IsLocked = table.Column(type: "boolean", nullable: false), + TopicCount = table.Column(type: "integer", nullable: true), + PostCount = table.Column(type: "integer", nullable: true), + LastPostId = table.Column(type: "uuid", nullable: true), + LastPostDate = table.Column(type: "timestamp with time zone", nullable: true), + LastPostUserId = table.Column(type: "uuid", nullable: true), + LastPostUserName = table.Column(type: "character varying(256)", maxLength: 256, nullable: true, collation: "tr-x-icu"), + 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 => + { + table.PrimaryKey("PK_Sas_T_ForumCategory", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Sas_T_GlobalSearch", + columns: table => new + { + Id = table.Column(type: "integer", nullable: false) + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), + TenantId = table.Column(type: "uuid", nullable: true), + System = table.Column(type: "character varying(64)", maxLength: 64, nullable: true, collation: "tr-x-icu"), + Group = table.Column(type: "character varying(64)", maxLength: 64, nullable: true, collation: "tr-x-icu"), + Term = table.Column(type: "character varying(256)", maxLength: 256, nullable: false, collation: "tr-x-icu"), + Weight = table.Column(type: "character varying(64)", maxLength: 64, nullable: true, collation: "tr-x-icu"), + Url = table.Column(type: "character varying(512)", maxLength: 512, nullable: true, collation: "tr-x-icu") + }, + constraints: table => + { + table.PrimaryKey("PK_Sas_T_GlobalSearch", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpAuditLogActions", + columns: table => new + { + 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, collation: "tr-x-icu"), + MethodName = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, collation: "tr-x-icu"), + Parameters = table.Column(type: "character varying(2000)", maxLength: 2000, nullable: true, collation: "tr-x-icu"), + 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 => + { + table.PrimaryKey("PK_AbpAuditLogActions", x => x.Id); + table.ForeignKey( + name: "FK_AbpAuditLogActions_AbpAuditLogs_AuditLogId", + column: x => x.AuditLogId, + principalTable: "AbpAuditLogs", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpEntityChanges", + columns: table => new + { + 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: true, collation: "tr-x-icu"), + EntityTypeFullName = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, collation: "tr-x-icu"), + ExtraProperties = table.Column(type: "text", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpEntityChanges", x => x.Id); + table.ForeignKey( + name: "FK_AbpEntityChanges_AbpAuditLogs_AuditLogId", + column: x => x.AuditLogId, + principalTable: "AbpAuditLogs", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpOrganizationUnitRoles", + columns: table => new + { + 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_OrganizationU~", + column: x => x.OrganizationUnitId, + principalTable: "AbpOrganizationUnits", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_AbpOrganizationUnitRoles_AbpRoles_RoleId", + column: x => x.RoleId, + principalTable: "AbpRoles", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpRoleClaims", + columns: table => new + { + 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, collation: "tr-x-icu"), + ClaimValue = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: true, collation: "tr-x-icu") + }, + constraints: table => + { + table.PrimaryKey("PK_AbpRoleClaims", x => x.Id); + table.ForeignKey( + name: "FK_AbpRoleClaims_AbpRoles_RoleId", + column: x => x.RoleId, + principalTable: "AbpRoles", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpTenantConnectionStrings", + columns: table => new + { + TenantId = table.Column(type: "uuid", nullable: false), + Name = table.Column(type: "character varying(64)", maxLength: 64, nullable: false, collation: "tr-x-icu"), + Value = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: false, collation: "tr-x-icu") + }, + constraints: table => + { + table.PrimaryKey("PK_AbpTenantConnectionStrings", x => new { x.TenantId, x.Name }); + table.ForeignKey( + name: "FK_AbpTenantConnectionStrings_AbpTenants_TenantId", + column: x => x.TenantId, + principalTable: "AbpTenants", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpUserClaims", + columns: table => new + { + 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, collation: "tr-x-icu"), + ClaimValue = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: true, collation: "tr-x-icu") + }, + constraints: table => + { + table.PrimaryKey("PK_AbpUserClaims", x => x.Id); + table.ForeignKey( + name: "FK_AbpUserClaims_AbpUsers_UserId", + column: x => x.UserId, + principalTable: "AbpUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpUserLogins", + columns: table => new + { + UserId = table.Column(type: "uuid", nullable: false), + LoginProvider = table.Column(type: "character varying(64)", maxLength: 64, nullable: false, collation: "tr-x-icu"), + TenantId = table.Column(type: "uuid", nullable: true), + ProviderKey = table.Column(type: "character varying(196)", maxLength: 196, nullable: false, collation: "tr-x-icu"), + ProviderDisplayName = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, collation: "tr-x-icu") + }, + constraints: table => + { + table.PrimaryKey("PK_AbpUserLogins", x => new { x.UserId, x.LoginProvider }); + table.ForeignKey( + name: "FK_AbpUserLogins_AbpUsers_UserId", + column: x => x.UserId, + principalTable: "AbpUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpUserOrganizationUnits", + columns: table => new + { + 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_OrganizationU~", + column: x => x.OrganizationUnitId, + principalTable: "AbpOrganizationUnits", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_AbpUserOrganizationUnits_AbpUsers_UserId", + column: x => x.UserId, + principalTable: "AbpUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpUserRoles", + columns: table => new + { + UserId = table.Column(type: "uuid", nullable: false), + RoleId = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpUserRoles", x => new { x.UserId, x.RoleId }); + table.ForeignKey( + name: "FK_AbpUserRoles_AbpRoles_RoleId", + column: x => x.RoleId, + principalTable: "AbpRoles", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_AbpUserRoles_AbpUsers_UserId", + column: x => x.UserId, + principalTable: "AbpUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpUserTokens", + columns: table => new + { + UserId = table.Column(type: "uuid", nullable: false), + LoginProvider = table.Column(type: "character varying(64)", maxLength: 64, nullable: false, collation: "tr-x-icu"), + Name = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, collation: "tr-x-icu"), + TenantId = table.Column(type: "uuid", nullable: true), + Value = table.Column(type: "text", nullable: true, collation: "tr-x-icu") + }, + constraints: table => + { + table.PrimaryKey("PK_AbpUserTokens", x => new { x.UserId, x.LoginProvider, x.Name }); + table.ForeignKey( + name: "FK_AbpUserTokens_AbpUsers_UserId", + column: x => x.UserId, + principalTable: "AbpUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "Adm_T_JobPosition", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + Name = table.Column(type: "character varying(64)", maxLength: 64, nullable: false, collation: "tr-x-icu"), + DepartmentId = table.Column(type: "uuid", nullable: false), + ParentId = table.Column(type: "uuid", 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 => + { + table.PrimaryKey("PK_Adm_T_JobPosition", x => x.Id); + table.ForeignKey( + name: "FK_Adm_T_JobPosition_Adm_T_Department_DepartmentId", + column: x => x.DepartmentId, + principalTable: "Adm_T_Department", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateTable( + name: "Adm_T_Event", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + CategoryId = table.Column(type: "uuid", nullable: false), + TypeId = table.Column(type: "uuid", nullable: false), + Date = table.Column(type: "timestamp with time zone", nullable: false), + Name = table.Column(type: "character varying(256)", maxLength: 256, nullable: false, collation: "tr-x-icu"), + Description = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: true, collation: "tr-x-icu"), + Place = table.Column(type: "character varying(256)", maxLength: 256, nullable: true, collation: "tr-x-icu"), + Status = table.Column(type: "character varying(20)", maxLength: 20, nullable: true, collation: "tr-x-icu"), + UserId = table.Column(type: "uuid", nullable: true), + ParticipantsCount = table.Column(type: "integer", nullable: false), + Likes = table.Column(type: "integer", nullable: false), + isPublished = table.Column(type: "boolean", nullable: false, defaultValue: false), + Photos = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + 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 => + { + table.PrimaryKey("PK_Adm_T_Event", x => x.Id); + table.ForeignKey( + name: "FK_Adm_T_Event_Adm_T_EventCategory_CategoryId", + column: x => x.CategoryId, + principalTable: "Adm_T_EventCategory", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_Adm_T_Event_Adm_T_EventType_TypeId", + column: x => x.TypeId, + principalTable: "Adm_T_EventType", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateTable( + name: "Adm_T_ReportTemplate", + columns: table => new + { + 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, collation: "tr-x-icu"), + Description = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: true, collation: "tr-x-icu"), + HtmlContent = table.Column(type: "text", nullable: false, collation: "tr-x-icu"), + CategoryId = table.Column(type: "uuid", nullable: false), + Status = table.Column(type: "character varying(20)", maxLength: 20, nullable: true, collation: "tr-x-icu"), + 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 => + { + table.PrimaryKey("PK_Adm_T_ReportTemplate", x => x.Id); + table.ForeignKey( + name: "FK_Adm_T_ReportTemplate_Adm_T_ReportCategory_CategoryId", + column: x => x.CategoryId, + principalTable: "Adm_T_ReportCategory", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "Adm_T_SocialComment", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + SocialPostId = table.Column(type: "uuid", nullable: false), + UserId = table.Column(type: "uuid", nullable: true), + Content = table.Column(type: "character varying(8192)", maxLength: 8192, nullable: false, collation: "tr-x-icu"), + 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 => + { + table.PrimaryKey("PK_Adm_T_SocialComment", x => x.Id); + table.ForeignKey( + name: "FK_Adm_T_SocialComment_Adm_T_SocialPost_SocialPostId", + column: x => x.SocialPostId, + principalTable: "Adm_T_SocialPost", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "Adm_T_SocialLike", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + SocialPostId = table.Column(type: "uuid", nullable: false), + UserId = table.Column(type: "uuid", 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 => + { + table.PrimaryKey("PK_Adm_T_SocialLike", x => x.Id); + table.ForeignKey( + name: "FK_Adm_T_SocialLike_Adm_T_SocialPost_SocialPostId", + column: x => x.SocialPostId, + principalTable: "Adm_T_SocialPost", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "Adm_T_SocialLocation", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + SocialPostId = table.Column(type: "uuid", nullable: false), + Name = table.Column(type: "character varying(256)", maxLength: 256, nullable: false, collation: "tr-x-icu"), + Address = table.Column(type: "character varying(512)", maxLength: 512, nullable: true, collation: "tr-x-icu"), + Lat = table.Column(type: "double precision", nullable: true), + Lng = table.Column(type: "double precision", nullable: true), + PlaceId = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, collation: "tr-x-icu"), + 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 => + { + table.PrimaryKey("PK_Adm_T_SocialLocation", x => x.Id); + table.ForeignKey( + name: "FK_Adm_T_SocialLocation_Adm_T_SocialPost_SocialPostId", + column: x => x.SocialPostId, + principalTable: "Adm_T_SocialPost", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "Adm_T_SocialMedia", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + SocialPostId = table.Column(type: "uuid", nullable: false), + Type = table.Column(type: "character varying(64)", maxLength: 64, nullable: false, collation: "tr-x-icu"), + Urls = table.Column(type: "text[]", nullable: true), + PollQuestion = table.Column(type: "character varying(512)", maxLength: 512, nullable: true, collation: "tr-x-icu"), + PollTotalVotes = table.Column(type: "integer", nullable: true), + PollEndsAt = table.Column(type: "timestamp with time zone", nullable: true), + PollUserVoteId = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, collation: "tr-x-icu"), + 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 => + { + table.PrimaryKey("PK_Adm_T_SocialMedia", x => x.Id); + table.ForeignKey( + name: "FK_Adm_T_SocialMedia_Adm_T_SocialPost_SocialPostId", + column: x => x.SocialPostId, + principalTable: "Adm_T_SocialPost", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "Adm_T_SurveyQuestion", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + SurveyId = table.Column(type: "uuid", nullable: false), + QuestionText = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: false, collation: "tr-x-icu"), + Type = table.Column(type: "character varying(64)", maxLength: 64, nullable: false, collation: "tr-x-icu"), + Order = table.Column(type: "integer", nullable: false), + IsRequired = table.Column(type: "boolean", nullable: false), + 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 => + { + table.PrimaryKey("PK_Adm_T_SurveyQuestion", x => x.Id); + table.ForeignKey( + name: "FK_Adm_T_SurveyQuestion_Adm_T_Survey_SurveyId", + column: x => x.SurveyId, + principalTable: "Adm_T_Survey", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "Adm_T_SurveyResponse", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + SurveyId = table.Column(type: "uuid", nullable: false), + UserId = table.Column(type: "uuid", nullable: true), + SubmissionTime = table.Column(type: "timestamp with time zone", nullable: false), + 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 => + { + table.PrimaryKey("PK_Adm_T_SurveyResponse", x => x.Id); + table.ForeignKey( + name: "FK_Adm_T_SurveyResponse_Adm_T_Survey_SurveyId", + column: x => x.SurveyId, + principalTable: "Adm_T_Survey", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "Adm_T_VideoroomAttandance", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + BranchId = table.Column(type: "uuid", nullable: true), + SessionId = table.Column(type: "uuid", nullable: false), + StudentId = table.Column(type: "uuid", nullable: true), + StudentName = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, collation: "tr-x-icu"), + JoinTime = table.Column(type: "timestamp with time zone", nullable: false), + LeaveTime = table.Column(type: "timestamp with time zone", nullable: true), + TotalDurationMinutes = table.Column(type: "integer", nullable: false), + 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 => + { + table.PrimaryKey("PK_Adm_T_VideoroomAttandance", x => x.Id); + table.ForeignKey( + name: "FK_Adm_T_VideoroomAttandance_Adm_T_Videoroom_SessionId", + column: x => x.SessionId, + principalTable: "Adm_T_Videoroom", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "Adm_T_VideoroomChat", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + BranchId = table.Column(type: "uuid", nullable: true), + SessionId = table.Column(type: "uuid", nullable: false), + SenderId = table.Column(type: "uuid", nullable: true), + SenderName = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, collation: "tr-x-icu"), + Message = table.Column(type: "character varying(2048)", maxLength: 2048, nullable: false, collation: "tr-x-icu"), + Timestamp = table.Column(type: "timestamp with time zone", nullable: false), + RecipientId = table.Column(type: "uuid", nullable: true), + RecipientName = table.Column(type: "character varying(256)", maxLength: 256, nullable: true, collation: "tr-x-icu"), + IsTeacher = table.Column(type: "boolean", nullable: false), + MessageType = table.Column(type: "character varying(64)", maxLength: 64, nullable: true, collation: "tr-x-icu"), + 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 => + { + table.PrimaryKey("PK_Adm_T_VideoroomChat", x => x.Id); + table.ForeignKey( + name: "FK_Adm_T_VideoroomChat_Adm_T_Videoroom_SessionId", + column: x => x.SessionId, + principalTable: "Adm_T_Videoroom", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "Adm_T_VideoroomParticipant", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + BranchId = table.Column(type: "uuid", nullable: true), + SessionId = table.Column(type: "uuid", nullable: false), + UserId = table.Column(type: "uuid", nullable: true), + UserName = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, collation: "tr-x-icu"), + IsTeacher = table.Column(type: "boolean", nullable: false), + IsAudioMuted = table.Column(type: "boolean", nullable: false), + IsVideoMuted = table.Column(type: "boolean", nullable: false), + IsHandRaised = table.Column(type: "boolean", nullable: false), + IsKicked = table.Column(type: "boolean", nullable: false, defaultValue: false), + IsActive = table.Column(type: "boolean", nullable: false, defaultValue: true), + JoinTime = table.Column(type: "timestamp with time zone", nullable: false), + ConnectionId = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, collation: "tr-x-icu"), + 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 => + { + table.PrimaryKey("PK_Adm_T_VideoroomParticipant", x => x.Id); + table.ForeignKey( + name: "FK_Adm_T_VideoroomParticipant_Adm_T_Videoroom_SessionId", + column: x => x.SessionId, + principalTable: "Adm_T_Videoroom", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "OpenIddictAuthorizations", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + ApplicationId = table.Column(type: "uuid", nullable: true), + CreationDate = table.Column(type: "timestamp with time zone", nullable: true), + Properties = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + Scopes = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + Status = table.Column(type: "character varying(50)", maxLength: 50, nullable: true, collation: "tr-x-icu"), + Subject = table.Column(type: "character varying(400)", maxLength: 400, nullable: true, collation: "tr-x-icu"), + Type = table.Column(type: "character varying(50)", maxLength: 50, nullable: true, collation: "tr-x-icu"), + ExtraProperties = table.Column(type: "text", nullable: false), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: false, collation: "tr-x-icu") + }, + constraints: table => + { + table.PrimaryKey("PK_OpenIddictAuthorizations", x => x.Id); + table.ForeignKey( + name: "FK_OpenIddictAuthorizations_OpenIddictApplications_Application~", + column: x => x.ApplicationId, + principalTable: "OpenIddictApplications", + principalColumn: "Id"); + }); + + migrationBuilder.CreateTable( + name: "Sas_H_BackgroundWorker_MailQueue", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + TemplateId = table.Column(type: "uuid", nullable: false), + From = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, collation: "tr-x-icu"), + To = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, collation: "tr-x-icu"), + MailParameter = table.Column(type: "character varying(8192)", maxLength: 8192, nullable: true, collation: "tr-x-icu"), + TableName = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, collation: "tr-x-icu"), + TableParameter = table.Column(type: "character varying(512)", maxLength: 512, nullable: true, collation: "tr-x-icu"), + Attachment = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, collation: "tr-x-icu"), + AttachmentParameter = table.Column(type: "character varying(512)", maxLength: 512, nullable: true, collation: "tr-x-icu"), + SendStatus = table.Column(type: "boolean", nullable: false), + SendTime = table.Column(type: "timestamp with time zone", nullable: true), + AwsMessageId = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, collation: "tr-x-icu"), + RelatedRecordId = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, collation: "tr-x-icu"), + 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 => + { + table.PrimaryKey("PK_Sas_H_BackgroundWorker_MailQueue", x => x.Id); + table.UniqueConstraint("AK_Sas_H_BackgroundWorker_MailQueue_AwsMessageId", x => x.AwsMessageId); + table.ForeignKey( + name: "FK_Sas_H_BackgroundWorker_MailQueue_Sas_H_BackgroundWorker_Mai~", + column: x => x.TableName, + principalTable: "Sas_H_BackgroundWorker_MailQueueTableFormat", + principalColumn: "TableName", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "Sas_H_BlogPost", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + Title = table.Column(type: "character varying(256)", maxLength: 256, nullable: false, collation: "tr-x-icu"), + Slug = table.Column(type: "character varying(256)", maxLength: 256, nullable: false, collation: "tr-x-icu"), + ContentTr = table.Column(type: "text", nullable: false, collation: "tr-x-icu"), + ContentEn = table.Column(type: "text", nullable: false, collation: "tr-x-icu"), + Summary = table.Column(type: "character varying(512)", maxLength: 512, nullable: false, collation: "tr-x-icu"), + CoverImage = table.Column(type: "character varying(512)", maxLength: 512, nullable: true, collation: "tr-x-icu"), + ReadTime = table.Column(type: "character varying(64)", maxLength: 64, nullable: true, collation: "tr-x-icu"), + CategoryId = table.Column(type: "uuid", nullable: false), + Author = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + ViewCount = table.Column(type: "integer", nullable: true), + LikeCount = table.Column(type: "integer", nullable: true), + CommentCount = table.Column(type: "integer", nullable: true), + IsPublished = table.Column(type: "boolean", nullable: false), + PublishedAt = table.Column(type: "timestamp with time zone", 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 => + { + table.PrimaryKey("PK_Sas_H_BlogPost", x => x.Id); + table.ForeignKey( + name: "FK_Sas_H_BlogPost_Sas_H_BlogCategory_CategoryId", + column: x => x.CategoryId, + principalTable: "Sas_H_BlogCategory", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateTable( + name: "Sas_H_Country", + columns: table => new + { + Id = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, collation: "tr-x-icu"), + Name = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, collation: "tr-x-icu"), + GroupName = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, collation: "tr-x-icu"), + Currency = table.Column(type: "character varying(8)", maxLength: 8, nullable: false, collation: "tr-x-icu"), + PhoneCode = table.Column(type: "integer", nullable: false), + TaxLabel = table.Column(type: "character varying(64)", maxLength: 64, nullable: true, collation: "tr-x-icu"), + ZipRequired = table.Column(type: "boolean", nullable: false), + StateRequired = table.Column(type: "boolean", nullable: false), + 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 => + { + table.PrimaryKey("PK_Sas_H_Country", x => x.Id); + table.ForeignKey( + name: "FK_Sas_H_Country_Sas_H_CountryGroup_GroupName", + column: x => x.GroupName, + principalTable: "Sas_H_CountryGroup", + principalColumn: "Name", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateTable( + name: "Sas_H_LanguageText", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + CultureName = table.Column(type: "character varying(10)", maxLength: 10, nullable: false, collation: "tr-x-icu"), + Key = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, collation: "tr-x-icu"), + ResourceName = table.Column(type: "character varying(64)", maxLength: 64, nullable: true, collation: "tr-x-icu"), + Value = table.Column(type: "character varying(4096)", maxLength: 4096, nullable: false, collation: "tr-x-icu") + }, + constraints: table => + { + table.PrimaryKey("PK_Sas_H_LanguageText", x => x.Id); + table.ForeignKey( + name: "FK_Sas_H_LanguageText_Sas_H_LanguageKey_ResourceName_Key", + columns: x => new { x.ResourceName, x.Key }, + principalTable: "Sas_H_LanguageKey", + principalColumns: new[] { "ResourceName", "Key" }, + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_Sas_H_LanguageText_Sas_H_Language_CultureName", + column: x => x.CultureName, + principalTable: "Sas_H_Language", + principalColumn: "CultureName", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "Sas_H_ListFormCustomization", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + ListFormCode = table.Column(type: "character varying(64)", maxLength: 64, nullable: false, collation: "tr-x-icu"), + UserId = table.Column(type: "character varying(256)", maxLength: 256, nullable: true, collation: "tr-x-icu"), + RoleId = table.Column(type: "character varying(256)", maxLength: 256, nullable: true, collation: "tr-x-icu"), + FilterName = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, collation: "tr-x-icu"), + CustomizationData = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + CustomizationType = table.Column(type: "integer", nullable: false), + 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 => + { + table.PrimaryKey("PK_Sas_H_ListFormCustomization", x => x.Id); + table.ForeignKey( + name: "FK_Sas_H_ListFormCustomization_Sas_H_ListForm_ListFormCode", + column: x => x.ListFormCode, + principalTable: "Sas_H_ListForm", + principalColumn: "ListFormCode", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "Sas_H_ListFormField", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + ListFormCode = table.Column(type: "character varying(64)", maxLength: 64, nullable: false, collation: "tr-x-icu"), + UserId = table.Column(type: "character varying(256)", maxLength: 256, nullable: true, collation: "tr-x-icu"), + RoleId = table.Column(type: "character varying(256)", maxLength: 256, nullable: true, collation: "tr-x-icu"), + CultureName = table.Column(type: "character varying(10)", maxLength: 10, nullable: false, collation: "tr-x-icu"), + FieldName = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, collation: "tr-x-icu"), + CaptionName = table.Column(type: "character varying(256)", maxLength: 256, nullable: true, collation: "tr-x-icu"), + PlaceHolder = table.Column(type: "character varying(256)", maxLength: 256, nullable: true, collation: "tr-x-icu"), + Visible = table.Column(type: "boolean", nullable: true, defaultValue: true), + IsActive = table.Column(type: "boolean", nullable: true, defaultValue: true), + Width = table.Column(type: "integer", nullable: true, defaultValue: 100), + ListOrderNo = table.Column(type: "integer", nullable: true, defaultValue: 30), + SourceDbType = table.Column(type: "integer", nullable: false), + SortIndex = table.Column(type: "integer", nullable: true), + SortDirection = table.Column(type: "character varying(10)", maxLength: 10, nullable: true, collation: "tr-x-icu"), + AllowSearch = table.Column(type: "boolean", nullable: true, defaultValue: false), + AllowEditing = table.Column(type: "boolean", nullable: true, defaultValue: true), + AllowAdding = table.Column(type: "boolean", nullable: true, defaultValue: true), + BandName = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, collation: "tr-x-icu"), + ColumnFilterJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + ColumnHeaderJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + GroupingJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + ColumnCustomizationJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + TotalSummaryJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + GroupSummaryJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + ColumnCssClass = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, collation: "tr-x-icu"), + ColumnCssValue = table.Column(type: "character varying(256)", maxLength: 256, nullable: true, collation: "tr-x-icu"), + JoinTableJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + LookupJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + ValidationRuleJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + ColumnStylingJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + PermissionJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + PivotSettingsJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + Alignment = table.Column(type: "character varying(20)", maxLength: 20, nullable: true, defaultValue: "left", collation: "tr-x-icu"), + Format = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, collation: "tr-x-icu"), + EditorOptions = table.Column(type: "text", nullable: true, collation: "tr-x-icu") + }, + constraints: table => + { + table.PrimaryKey("PK_Sas_H_ListFormField", x => x.Id); + table.ForeignKey( + name: "FK_Sas_H_ListFormField_Sas_H_ListForm_ListFormCode", + column: x => x.ListFormCode, + principalTable: "Sas_H_ListForm", + principalColumn: "ListFormCode", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "Sas_H_ListFormImport", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + ListFormCode = table.Column(type: "character varying(64)", maxLength: 64, nullable: false, collation: "tr-x-icu"), + BlobName = table.Column(type: "character varying(256)", maxLength: 256, nullable: false, collation: "tr-x-icu"), + Status = table.Column(type: "character varying(64)", maxLength: 64, nullable: false, collation: "tr-x-icu"), + TotalRows = table.Column(type: "integer", nullable: false), + 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 => + { + table.PrimaryKey("PK_Sas_H_ListFormImport", x => x.Id); + table.ForeignKey( + name: "FK_Sas_H_ListFormImport_Sas_H_ListForm_ListFormCode", + column: x => x.ListFormCode, + principalTable: "Sas_H_ListForm", + principalColumn: "ListFormCode", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "Sas_H_NotificationRule", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + NotificationTypeId = table.Column(type: "uuid", nullable: false), + RecipientType = table.Column(type: "character varying(64)", maxLength: 64, nullable: false, collation: "tr-x-icu"), + RecipientId = table.Column(type: "character varying(256)", maxLength: 256, nullable: true, collation: "tr-x-icu"), + Channel = table.Column(type: "character varying(64)", maxLength: 64, nullable: false, collation: "tr-x-icu"), + IsActive = table.Column(type: "boolean", nullable: false), + IsFixed = table.Column(type: "boolean", nullable: false), + IsCustomized = table.Column(type: "boolean", nullable: false), + 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 => + { + table.PrimaryKey("PK_Sas_H_NotificationRule", x => x.Id); + table.ForeignKey( + name: "FK_Sas_H_NotificationRule_Sas_H_NotificationType_NotificationT~", + column: x => x.NotificationTypeId, + principalTable: "Sas_H_NotificationType", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateTable( + name: "Sas_H_OrderItem", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + OrderId = table.Column(type: "uuid", nullable: false), + ProductId = table.Column(type: "uuid", nullable: false), + ProductName = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, collation: "tr-x-icu"), + BillingCycle = table.Column(type: "character varying(32)", maxLength: 32, nullable: false, collation: "tr-x-icu"), + Quantity = table.Column(type: "integer", nullable: false), + TotalPrice = table.Column(type: "numeric(18,2)", precision: 18, scale: 2, nullable: false), + 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 => + { + table.PrimaryKey("PK_Sas_H_OrderItem", x => x.Id); + table.ForeignKey( + name: "FK_Sas_H_OrderItem_Sas_H_Order_OrderId", + column: x => x.OrderId, + principalTable: "Sas_H_Order", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "Sas_H_Skill", + columns: table => new + { + Id = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, collation: "tr-x-icu"), + SkillTypeId = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, collation: "tr-x-icu"), + Name = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, collation: "tr-x-icu"), + 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 => + { + table.PrimaryKey("PK_Sas_H_Skill", x => x.Id); + table.ForeignKey( + name: "FK_Sas_H_Skill_Sas_H_SkillType_SkillTypeId", + column: x => x.SkillTypeId, + principalTable: "Sas_H_SkillType", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "Sas_H_SkillLevel", + columns: table => new + { + Id = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, collation: "tr-x-icu"), + SkillTypeId = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, collation: "tr-x-icu"), + Name = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, collation: "tr-x-icu"), + Progress = table.Column(type: "integer", nullable: false, defaultValue: 0), + IsDefault = table.Column(type: "boolean", nullable: false, defaultValue: false), + 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 => + { + table.PrimaryKey("PK_Sas_H_SkillLevel", x => x.Id); + table.ForeignKey( + name: "FK_Sas_H_SkillLevel_Sas_H_SkillType_SkillTypeId", + column: x => x.SkillTypeId, + principalTable: "Sas_H_SkillType", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "Sas_H_Uom", + columns: table => new + { + Id = table.Column(type: "character varying(64)", maxLength: 64, nullable: false, collation: "tr-x-icu"), + UomCategoryId = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, collation: "tr-x-icu"), + Name = table.Column(type: "character varying(64)", maxLength: 64, nullable: false, collation: "tr-x-icu"), + Type = table.Column(type: "character varying(32)", maxLength: 32, nullable: false, collation: "tr-x-icu"), + Ratio = table.Column(type: "numeric(18,6)", precision: 18, scale: 6, nullable: false), + IsActive = table.Column(type: "boolean", nullable: false), + Rounding = table.Column(type: "numeric(18,6)", precision: 18, scale: 6, nullable: false), + 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 => + { + table.PrimaryKey("PK_Sas_H_Uom", x => x.Id); + table.ForeignKey( + name: "FK_Sas_H_Uom_Sas_H_UomCategory_UomCategoryId", + column: x => x.UomCategoryId, + principalTable: "Sas_H_UomCategory", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateTable( + name: "Sas_T_BranchUsers", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + BranchId = table.Column(type: "uuid", nullable: false), + UserId = table.Column(type: "uuid", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Sas_T_BranchUsers", x => x.Id); + table.ForeignKey( + name: "FK_Sas_T_BranchUsers_Sas_T_Branch_BranchId", + column: x => x.BranchId, + principalTable: "Sas_T_Branch", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateTable( + name: "Sas_T_ForumTopic", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + Title = table.Column(type: "character varying(256)", maxLength: 256, nullable: false, collation: "tr-x-icu"), + Content = table.Column(type: "text", nullable: false, collation: "tr-x-icu"), + CategoryId = table.Column(type: "uuid", nullable: false), + AuthorId = table.Column(type: "uuid", nullable: false), + AuthorName = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, collation: "tr-x-icu"), + ViewCount = table.Column(type: "integer", nullable: false), + ReplyCount = table.Column(type: "integer", nullable: false), + LikeCount = table.Column(type: "integer", nullable: false), + IsPinned = table.Column(type: "boolean", nullable: false), + IsLocked = table.Column(type: "boolean", nullable: false), + IsSolved = table.Column(type: "boolean", nullable: false), + LastPostId = table.Column(type: "uuid", nullable: true), + LastPostDate = table.Column(type: "timestamp with time zone", nullable: true), + LastPostUserId = table.Column(type: "uuid", nullable: true), + LastPostUserName = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, collation: "tr-x-icu"), + TenantId = table.Column(type: "uuid", 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 => + { + 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 + { + 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, collation: "tr-x-icu"), + OriginalValue = table.Column(type: "character varying(512)", maxLength: 512, nullable: true, collation: "tr-x-icu"), + PropertyName = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, collation: "tr-x-icu"), + PropertyTypeFullName = table.Column(type: "character varying(64)", maxLength: 64, nullable: false, collation: "tr-x-icu") + }, + constraints: table => + { + table.PrimaryKey("PK_AbpEntityPropertyChanges", x => x.Id); + table.ForeignKey( + name: "FK_AbpEntityPropertyChanges_AbpEntityChanges_EntityChangeId", + column: x => x.EntityChangeId, + principalTable: "AbpEntityChanges", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "Adm_T_EventComment", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + EventId = table.Column(type: "uuid", nullable: false), + UserId = table.Column(type: "uuid", nullable: false), + Content = table.Column(type: "character varying(512)", maxLength: 512, nullable: true, collation: "tr-x-icu"), + Likes = table.Column(type: "integer", nullable: false, defaultValue: 0), + 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 => + { + table.PrimaryKey("PK_Adm_T_EventComment", x => x.Id); + table.ForeignKey( + name: "FK_Adm_T_EventComment_Adm_T_Event_EventId", + column: x => x.EventId, + principalTable: "Adm_T_Event", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "Adm_T_EventLike", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + EventId = table.Column(type: "uuid", nullable: false), + UserId = table.Column(type: "uuid", 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 => + { + table.PrimaryKey("PK_Adm_T_EventLike", x => x.Id); + table.ForeignKey( + name: "FK_Adm_T_EventLike_Adm_T_Event_EventId", + column: x => x.EventId, + principalTable: "Adm_T_Event", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "Adm_T_SocialPollOption", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + SocialMediaId = table.Column(type: "uuid", nullable: false), + Text = table.Column(type: "character varying(512)", maxLength: 512, nullable: false, collation: "tr-x-icu"), + Votes = table.Column(type: "integer", nullable: false), + 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 => + { + table.PrimaryKey("PK_Adm_T_SocialPollOption", x => x.Id); + table.ForeignKey( + name: "FK_Adm_T_SocialPollOption_Adm_T_SocialMedia_SocialMediaId", + column: x => x.SocialMediaId, + principalTable: "Adm_T_SocialMedia", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "Adm_T_SurveyQuestionOption", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + QuestionId = table.Column(type: "uuid", nullable: false), + Text = table.Column(type: "character varying(512)", maxLength: 512, nullable: false, collation: "tr-x-icu"), + Order = table.Column(type: "integer", nullable: false), + 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 => + { + table.PrimaryKey("PK_Adm_T_SurveyQuestionOption", x => x.Id); + table.ForeignKey( + name: "FK_Adm_T_SurveyQuestionOption_Adm_T_SurveyQuestion_QuestionId", + column: x => x.QuestionId, + principalTable: "Adm_T_SurveyQuestion", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "Adm_T_SurveyAnswer", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + ResponseId = table.Column(type: "uuid", nullable: false), + QuestionId = table.Column(type: "uuid", nullable: false), + QuestionType = table.Column(type: "character varying(64)", maxLength: 64, nullable: false, collation: "tr-x-icu"), + Value = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: false, collation: "tr-x-icu"), + 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 => + { + table.PrimaryKey("PK_Adm_T_SurveyAnswer", x => x.Id); + table.ForeignKey( + name: "FK_Adm_T_SurveyAnswer_Adm_T_SurveyQuestion_QuestionId", + column: x => x.QuestionId, + principalTable: "Adm_T_SurveyQuestion", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + table.ForeignKey( + name: "FK_Adm_T_SurveyAnswer_Adm_T_SurveyResponse_ResponseId", + column: x => x.ResponseId, + principalTable: "Adm_T_SurveyResponse", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "OpenIddictTokens", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + ApplicationId = table.Column(type: "uuid", nullable: true), + AuthorizationId = table.Column(type: "uuid", nullable: true), + CreationDate = table.Column(type: "timestamp with time zone", nullable: true), + ExpirationDate = table.Column(type: "timestamp with time zone", nullable: true), + Payload = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + Properties = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + RedemptionDate = table.Column(type: "timestamp with time zone", nullable: true), + ReferenceId = table.Column(type: "character varying(100)", maxLength: 100, nullable: true, collation: "tr-x-icu"), + Status = table.Column(type: "character varying(50)", maxLength: 50, nullable: true, collation: "tr-x-icu"), + Subject = table.Column(type: "character varying(400)", maxLength: 400, nullable: true, collation: "tr-x-icu"), + Type = table.Column(type: "character varying(150)", maxLength: 150, nullable: true, collation: "tr-x-icu"), + ExtraProperties = table.Column(type: "text", nullable: false), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: false, collation: "tr-x-icu") + }, + constraints: table => + { + table.PrimaryKey("PK_OpenIddictTokens", x => x.Id); + table.ForeignKey( + name: "FK_OpenIddictTokens_OpenIddictApplications_ApplicationId", + column: x => x.ApplicationId, + principalTable: "OpenIddictApplications", + principalColumn: "Id"); + table.ForeignKey( + name: "FK_OpenIddictTokens_OpenIddictAuthorizations_AuthorizationId", + column: x => x.AuthorizationId, + principalTable: "OpenIddictAuthorizations", + principalColumn: "Id"); + }); + + migrationBuilder.CreateTable( + name: "Sas_H_BackgroundWorker_MailQueueEvents", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + AwsMessageId = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, collation: "tr-x-icu"), + EventDate = table.Column(type: "timestamp with time zone", nullable: true), + Event = table.Column(type: "character varying(20)", maxLength: 20, nullable: true, collation: "tr-x-icu"), + MailAddress = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, collation: "tr-x-icu"), + ResponseDescription = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + 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 => + { + table.PrimaryKey("PK_Sas_H_BackgroundWorker_MailQueueEvents", x => x.Id); + table.ForeignKey( + name: "FK_Sas_H_BackgroundWorker_MailQueueEvents_Sas_H_BackgroundWork~", + column: x => x.AwsMessageId, + principalTable: "Sas_H_BackgroundWorker_MailQueue", + principalColumn: "AwsMessageId", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "Sas_H_City", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + Country = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, collation: "tr-x-icu"), + Name = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, collation: "tr-x-icu"), + PlateCode = table.Column(type: "character varying(20)", maxLength: 20, nullable: true, collation: "tr-x-icu"), + CountryId = table.Column(type: "character varying(128)", nullable: true, collation: "tr-x-icu"), + 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 => + { + table.PrimaryKey("PK_Sas_H_City", x => x.Id); + table.ForeignKey( + name: "FK_Sas_H_City_Sas_H_Country_CountryId", + column: x => x.CountryId, + principalTable: "Sas_H_Country", + principalColumn: "Id"); + }); + + migrationBuilder.CreateTable( + name: "Sas_H_ListFormImportLog", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + ImportId = table.Column(type: "uuid", nullable: false), + BlobName = table.Column(type: "character varying(256)", maxLength: 256, nullable: false, collation: "tr-x-icu"), + Status = table.Column(type: "character varying(64)", maxLength: 64, nullable: false, collation: "tr-x-icu"), + ExecRows = table.Column(type: "integer", nullable: false), + ValidRows = table.Column(type: "integer", nullable: false), + ErrorRows = table.Column(type: "integer", nullable: false), + Progress = table.Column(type: "double precision", nullable: false), + ErrorsJson = table.Column(type: "text", nullable: true, collation: "tr-x-icu"), + 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 => + { + table.PrimaryKey("PK_Sas_H_ListFormImportLog", x => x.Id); + table.ForeignKey( + name: "FK_Sas_H_ListFormImportLog_Sas_H_ListFormImport_ImportId", + column: x => x.ImportId, + principalTable: "Sas_H_ListFormImport", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "Sas_H_Notification", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + NotificationRuleId = table.Column(type: "uuid", nullable: false), + NotificationChannel = table.Column(type: "character varying(64)", maxLength: 64, nullable: false, collation: "tr-x-icu"), + NotificationTypeId = table.Column(type: "uuid", nullable: false), + Identifier = table.Column(type: "character varying(256)", maxLength: 256, nullable: false, collation: "tr-x-icu"), + UserId = table.Column(type: "uuid", nullable: true), + Message = table.Column(type: "character varying(2048)", maxLength: 2048, nullable: false, collation: "tr-x-icu"), + IsSent = table.Column(type: "boolean", nullable: false), + IsRead = table.Column(type: "boolean", nullable: false), + ReadTime = table.Column(type: "timestamp with time zone", 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 => + { + table.PrimaryKey("PK_Sas_H_Notification", x => x.Id); + table.ForeignKey( + name: "FK_Sas_H_Notification_Sas_H_NotificationRule_NotificationRuleId", + column: x => x.NotificationRuleId, + principalTable: "Sas_H_NotificationRule", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_Sas_H_Notification_Sas_H_NotificationType_NotificationTypeId", + column: x => x.NotificationTypeId, + principalTable: "Sas_H_NotificationType", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateTable( + name: "Sas_T_ForumPost", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + TopicId = table.Column(type: "uuid", nullable: false), + Content = table.Column(type: "text", nullable: false, collation: "tr-x-icu"), + AuthorId = table.Column(type: "uuid", nullable: false), + AuthorName = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, collation: "tr-x-icu"), + LikeCount = table.Column(type: "integer", nullable: true), + IsAcceptedAnswer = table.Column(type: "boolean", nullable: true), + ParentPostId = table.Column(type: "uuid", nullable: true), + TenantId = table.Column(type: "uuid", 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 => + { + 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: "Sas_H_District", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + Country = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, collation: "tr-x-icu"), + City = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, collation: "tr-x-icu"), + Name = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, collation: "tr-x-icu"), + Township = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, collation: "tr-x-icu"), + CityId = table.Column(type: "uuid", 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 => + { + table.PrimaryKey("PK_Sas_H_District", x => x.Id); + table.ForeignKey( + name: "FK_Sas_H_District_Sas_H_City_CityId", + column: x => x.CityId, + principalTable: "Sas_H_City", + principalColumn: "Id"); + }); + + migrationBuilder.CreateIndex( + name: "IX_AbpAuditLogActions_AuditLogId", + table: "AbpAuditLogActions", + column: "AuditLogId"); + + migrationBuilder.CreateIndex( + name: "IX_AbpAuditLogActions_TenantId_ServiceName_MethodName_Executio~", + table: "AbpAuditLogActions", + columns: new[] { "TenantId", "ServiceName", "MethodName", "ExecutionTime" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpAuditLogs_TenantId_ExecutionTime", + table: "AbpAuditLogs", + columns: new[] { "TenantId", "ExecutionTime" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpAuditLogs_TenantId_UserId_ExecutionTime", + table: "AbpAuditLogs", + columns: new[] { "TenantId", "UserId", "ExecutionTime" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpBackgroundJobs_IsAbandoned_NextTryTime", + table: "AbpBackgroundJobs", + columns: new[] { "IsAbandoned", "NextTryTime" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpEntityChanges_AuditLogId", + table: "AbpEntityChanges", + column: "AuditLogId"); + + migrationBuilder.CreateIndex( + name: "IX_AbpEntityChanges_TenantId_EntityTypeFullName_EntityId", + table: "AbpEntityChanges", + columns: new[] { "TenantId", "EntityTypeFullName", "EntityId" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpEntityPropertyChanges_EntityChangeId", + table: "AbpEntityPropertyChanges", + column: "EntityChangeId"); + + migrationBuilder.CreateIndex( + name: "IX_AbpFeatureGroups_Name", + table: "AbpFeatureGroups", + column: "Name", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_AbpFeatures_GroupName", + table: "AbpFeatures", + column: "GroupName"); + + migrationBuilder.CreateIndex( + name: "IX_AbpFeatures_Name", + table: "AbpFeatures", + column: "Name", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_AbpFeatureValues_Name_ProviderName_ProviderKey", + table: "AbpFeatureValues", + columns: new[] { "Name", "ProviderName", "ProviderKey" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_AbpLinkUsers_SourceUserId_SourceTenantId_TargetUserId_Targe~", + table: "AbpLinkUsers", + columns: new[] { "SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_AbpOrganizationUnitRoles_RoleId_OrganizationUnitId", + table: "AbpOrganizationUnitRoles", + columns: new[] { "RoleId", "OrganizationUnitId" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpOrganizationUnits_Code", + table: "AbpOrganizationUnits", + column: "Code"); + + migrationBuilder.CreateIndex( + name: "IX_AbpOrganizationUnits_ParentId", + table: "AbpOrganizationUnits", + column: "ParentId"); + + migrationBuilder.CreateIndex( + name: "IX_AbpPermissionGrants_TenantId_Name_ProviderName_ProviderKey", + table: "AbpPermissionGrants", + columns: new[] { "TenantId", "Name", "ProviderName", "ProviderKey" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_AbpPermissionGroups_Name", + table: "AbpPermissionGroups", + column: "Name", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_AbpPermissions_GroupName", + table: "AbpPermissions", + column: "GroupName"); + + migrationBuilder.CreateIndex( + name: "IX_AbpPermissions_Name", + table: "AbpPermissions", + column: "Name", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_AbpRoleClaims_RoleId", + table: "AbpRoleClaims", + column: "RoleId"); + + migrationBuilder.CreateIndex( + name: "IX_AbpRoles_NormalizedName", + table: "AbpRoles", + column: "NormalizedName"); + + migrationBuilder.CreateIndex( + name: "IX_AbpSecurityLogs_TenantId_Action", + table: "AbpSecurityLogs", + columns: new[] { "TenantId", "Action" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpSecurityLogs_TenantId_ApplicationName", + table: "AbpSecurityLogs", + columns: new[] { "TenantId", "ApplicationName" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpSecurityLogs_TenantId_Identity", + table: "AbpSecurityLogs", + columns: new[] { "TenantId", "Identity" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpSecurityLogs_TenantId_UserId", + table: "AbpSecurityLogs", + columns: new[] { "TenantId", "UserId" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpSessions_Device", + table: "AbpSessions", + column: "Device"); + + migrationBuilder.CreateIndex( + name: "IX_AbpSessions_SessionId", + table: "AbpSessions", + column: "SessionId"); + + migrationBuilder.CreateIndex( + name: "IX_AbpSessions_TenantId_UserId", + table: "AbpSessions", + columns: new[] { "TenantId", "UserId" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpSettingDefinitions_Name", + table: "AbpSettingDefinitions", + column: "Name", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_AbpSettings_Name_ProviderName_ProviderKey", + table: "AbpSettings", + columns: new[] { "Name", "ProviderName", "ProviderKey" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_AbpTenants_Name", + table: "AbpTenants", + column: "Name"); + + migrationBuilder.CreateIndex( + name: "IX_AbpTenants_NormalizedName", + table: "AbpTenants", + column: "NormalizedName"); + + migrationBuilder.CreateIndex( + name: "IX_AbpUserClaims_UserId", + table: "AbpUserClaims", + column: "UserId"); + + migrationBuilder.CreateIndex( + name: "IX_AbpUserLogins_LoginProvider_ProviderKey", + table: "AbpUserLogins", + columns: new[] { "LoginProvider", "ProviderKey" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpUserOrganizationUnits_UserId_OrganizationUnitId", + table: "AbpUserOrganizationUnits", + columns: new[] { "UserId", "OrganizationUnitId" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpUserRoles_RoleId_UserId", + table: "AbpUserRoles", + columns: new[] { "RoleId", "UserId" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpUsers_Email", + table: "AbpUsers", + column: "Email"); + + migrationBuilder.CreateIndex( + name: "IX_AbpUsers_NormalizedEmail", + table: "AbpUsers", + column: "NormalizedEmail"); + + migrationBuilder.CreateIndex( + name: "IX_AbpUsers_NormalizedUserName", + table: "AbpUsers", + column: "NormalizedUserName"); + + migrationBuilder.CreateIndex( + name: "IX_AbpUsers_UserName", + table: "AbpUsers", + column: "UserName"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_Announcement_TenantId_Title", + table: "Adm_T_Announcement", + columns: new[] { "TenantId", "Title" }, + unique: true, + filter: "\"IsDeleted\" = FALSE"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_Department_TenantId_Name", + table: "Adm_T_Department", + columns: new[] { "TenantId", "Name" }, + unique: true, + filter: "\"IsDeleted\" = FALSE"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_Event_CategoryId", + table: "Adm_T_Event", + column: "CategoryId"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_Event_TenantId_CategoryId_TypeId_Name", + table: "Adm_T_Event", + columns: new[] { "TenantId", "CategoryId", "TypeId", "Name" }, + unique: true, + filter: "\"IsDeleted\" = FALSE"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_Event_TypeId", + table: "Adm_T_Event", + column: "TypeId"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_EventCategory_TenantId_Name", + table: "Adm_T_EventCategory", + columns: new[] { "TenantId", "Name" }, + unique: true, + filter: "\"IsDeleted\" = FALSE"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_EventComment_EventId", + table: "Adm_T_EventComment", + column: "EventId"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_EventLike_EventId", + table: "Adm_T_EventLike", + column: "EventId"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_EventType_TenantId_Name", + table: "Adm_T_EventType", + columns: new[] { "TenantId", "Name" }, + unique: true, + filter: "\"IsDeleted\" = FALSE"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_IpRestriction_TenantId_ResourceType_ResourceId_IP", + table: "Adm_T_IpRestriction", + columns: new[] { "TenantId", "ResourceType", "ResourceId", "IP" }, + unique: true, + filter: "\"IsDeleted\" = FALSE"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_JobPosition_DepartmentId", + table: "Adm_T_JobPosition", + column: "DepartmentId"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_JobPosition_TenantId_Name_DepartmentId", + table: "Adm_T_JobPosition", + columns: new[] { "TenantId", "Name", "DepartmentId" }, + unique: true, + filter: "\"IsDeleted\" = FALSE"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_ReportCategory_TenantId_Name", + table: "Adm_T_ReportCategory", + columns: new[] { "TenantId", "Name" }, + unique: true, + filter: "\"IsDeleted\" = FALSE"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_ReportTemplate_CategoryId", + table: "Adm_T_ReportTemplate", + column: "CategoryId"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_ReportTemplate_TenantId_Name", + table: "Adm_T_ReportTemplate", + columns: new[] { "TenantId", "Name" }, + unique: true, + filter: "\"IsDeleted\" = FALSE"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_Sector_TenantId_Name", + table: "Adm_T_Sector", + columns: new[] { "TenantId", "Name" }, + unique: true, + filter: "\"IsDeleted\" = FALSE"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_Sequence_TenantId_Name", + table: "Adm_T_Sequence", + columns: new[] { "TenantId", "Name" }, + unique: true, + filter: "\"IsDeleted\" = FALSE"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_SocialComment_SocialPostId", + table: "Adm_T_SocialComment", + column: "SocialPostId"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_SocialLike_SocialPostId", + table: "Adm_T_SocialLike", + column: "SocialPostId"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_SocialLocation_SocialPostId", + table: "Adm_T_SocialLocation", + column: "SocialPostId", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_SocialMedia_SocialPostId", + table: "Adm_T_SocialMedia", + column: "SocialPostId", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_SocialPollOption_SocialMediaId", + table: "Adm_T_SocialPollOption", + column: "SocialMediaId"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_Survey_TenantId_Title", + table: "Adm_T_Survey", + columns: new[] { "TenantId", "Title" }, + unique: true, + filter: "\"IsDeleted\" = FALSE"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_SurveyAnswer_QuestionId", + table: "Adm_T_SurveyAnswer", + column: "QuestionId"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_SurveyAnswer_ResponseId", + table: "Adm_T_SurveyAnswer", + column: "ResponseId"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_SurveyQuestion_SurveyId", + table: "Adm_T_SurveyQuestion", + column: "SurveyId"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_SurveyQuestionOption_QuestionId", + table: "Adm_T_SurveyQuestionOption", + column: "QuestionId"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_SurveyResponse_SurveyId", + table: "Adm_T_SurveyResponse", + column: "SurveyId"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_Videoroom_TenantId_BranchId_Name", + table: "Adm_T_Videoroom", + columns: new[] { "TenantId", "BranchId", "Name" }, + unique: true, + filter: "\"IsDeleted\" = FALSE"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_VideoroomAttandance_SessionId", + table: "Adm_T_VideoroomAttandance", + column: "SessionId"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_VideoroomChat_SessionId", + table: "Adm_T_VideoroomChat", + column: "SessionId"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_VideoroomParticipant_SessionId", + table: "Adm_T_VideoroomParticipant", + column: "SessionId"); + + migrationBuilder.CreateIndex( + name: "IX_Adm_T_WorkHour_TenantId_Name", + table: "Adm_T_WorkHour", + columns: new[] { "TenantId", "Name" }, + unique: true, + filter: "\"IsDeleted\" = FALSE"); + + migrationBuilder.CreateIndex( + name: "IX_OpenIddictApplications_ClientId", + table: "OpenIddictApplications", + column: "ClientId"); + + migrationBuilder.CreateIndex( + name: "IX_OpenIddictAuthorizations_ApplicationId_Status_Subject_Type", + table: "OpenIddictAuthorizations", + columns: new[] { "ApplicationId", "Status", "Subject", "Type" }); + + migrationBuilder.CreateIndex( + name: "IX_OpenIddictScopes_Name", + table: "OpenIddictScopes", + column: "Name"); + + migrationBuilder.CreateIndex( + name: "IX_OpenIddictTokens_ApplicationId_Status_Subject_Type", + table: "OpenIddictTokens", + columns: new[] { "ApplicationId", "Status", "Subject", "Type" }); + + migrationBuilder.CreateIndex( + name: "IX_OpenIddictTokens_AuthorizationId", + table: "OpenIddictTokens", + column: "AuthorizationId"); + + migrationBuilder.CreateIndex( + name: "IX_OpenIddictTokens_ReferenceId", + table: "OpenIddictTokens", + column: "ReferenceId"); + + migrationBuilder.CreateIndex( + name: "IX_Sas_H_AiBot_Name", + table: "Sas_H_AiBot", + column: "Name", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Sas_H_BackgroundWorker_Name", + table: "Sas_H_BackgroundWorker", + column: "Name", + unique: true, + filter: "\"IsDeleted\" = FALSE"); + + migrationBuilder.CreateIndex( + name: "IX_Sas_H_BackgroundWorker_MailQueue_TableName", + table: "Sas_H_BackgroundWorker_MailQueue", + column: "TableName"); + + migrationBuilder.CreateIndex( + name: "IX_Sas_H_BackgroundWorker_MailQueueEvents_AwsMessageId", + table: "Sas_H_BackgroundWorker_MailQueueEvents", + column: "AwsMessageId"); + + migrationBuilder.CreateIndex( + name: "IX_MailQueueTableFormat", + table: "Sas_H_BackgroundWorker_MailQueueTableFormat", + columns: new[] { "TableName", "Order" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Sas_H_BlogCategory_Name", + table: "Sas_H_BlogCategory", + column: "Name", + unique: true, + filter: "\"IsDeleted\" = FALSE"); + + migrationBuilder.CreateIndex( + name: "IX_Sas_H_BlogPost_CategoryId_Title", + table: "Sas_H_BlogPost", + columns: new[] { "CategoryId", "Title" }, + unique: true, + filter: "\"IsDeleted\" = FALSE"); + + migrationBuilder.CreateIndex( + name: "IX_Sas_H_City_Country_Name", + table: "Sas_H_City", + columns: new[] { "Country", "Name" }, + unique: true, + filter: "\"IsDeleted\" = FALSE"); + + migrationBuilder.CreateIndex( + name: "IX_Sas_H_City_CountryId", + table: "Sas_H_City", + column: "CountryId"); + + migrationBuilder.CreateIndex( + name: "IX_Sas_H_ContactTitle_Title", + table: "Sas_H_ContactTitle", + column: "Title", + unique: true, + filter: "\"IsDeleted\" = FALSE"); + + migrationBuilder.CreateIndex( + name: "IX_Sas_H_Country_GroupName", + table: "Sas_H_Country", + column: "GroupName"); + + migrationBuilder.CreateIndex( + name: "IX_Sas_H_Country_Name", + table: "Sas_H_Country", + column: "Name", + unique: true, + filter: "\"IsDeleted\" = FALSE"); + + migrationBuilder.CreateIndex( + name: "IX_Sas_H_CountryGroup_Name", + table: "Sas_H_CountryGroup", + column: "Name", + unique: true, + filter: "\"IsDeleted\" = FALSE"); + + migrationBuilder.CreateIndex( + name: "IX_Sas_H_CrudEndpoint_TenantId_EntityName_Method_Path", + table: "Sas_H_CrudEndpoint", + columns: new[] { "TenantId", "EntityName", "Method", "Path" }, + unique: true, + filter: "\"IsDeleted\" = FALSE"); + + migrationBuilder.CreateIndex( + name: "IX_Sas_H_Currency_Id_Name", + table: "Sas_H_Currency", + columns: new[] { "Id", "Name" }, + unique: true, + filter: "\"IsDeleted\" = FALSE"); + + migrationBuilder.CreateIndex( + name: "IX_Sas_H_CustomComponent_TenantId_Name", + table: "Sas_H_CustomComponent", + columns: new[] { "TenantId", "Name" }, + unique: true, + filter: "\"IsDeleted\" = FALSE"); + + migrationBuilder.CreateIndex( + name: "IX_Sas_H_CustomEndpoint_TenantId_Name", + table: "Sas_H_CustomEndpoint", + columns: new[] { "TenantId", "Name" }, + unique: true, + filter: "\"IsDeleted\" = FALSE"); + + migrationBuilder.CreateIndex( + name: "IX_Sas_H_DataSource_Code", + table: "Sas_H_DataSource", + column: "Code", + unique: true, + filter: "\"IsDeleted\" = FALSE"); + + migrationBuilder.CreateIndex( + name: "IX_Sas_H_District_CityId", + table: "Sas_H_District", + column: "CityId"); + + migrationBuilder.CreateIndex( + name: "IX_Sas_H_District_Country_City_Name_Township", + table: "Sas_H_District", + columns: new[] { "Country", "City", "Name", "Township" }, + unique: true, + filter: "\"IsDeleted\" = FALSE"); + + migrationBuilder.CreateIndex( + name: "IX_Sas_H_DynamicService_TenantId_Name", + table: "Sas_H_DynamicService", + columns: new[] { "TenantId", "Name" }, + unique: true, + filter: "\"IsDeleted\" = FALSE"); + + migrationBuilder.CreateIndex( + name: "IX_Sas_H_InstallmentOption_Name", + table: "Sas_H_InstallmentOption", + column: "Name", + unique: true, + filter: "\"IsDeleted\" = FALSE"); + + migrationBuilder.CreateIndex( + name: "IX_Sas_H_LanguageKey_ResourceName_Key", + table: "Sas_H_LanguageKey", + columns: new[] { "ResourceName", "Key" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Sas_H_LanguageText_CultureName", + table: "Sas_H_LanguageText", + column: "CultureName"); + + migrationBuilder.CreateIndex( + name: "IX_Sas_H_LanguageText_ResourceName_Key", + table: "Sas_H_LanguageText", + columns: new[] { "ResourceName", "Key" }); + + migrationBuilder.CreateIndex( + name: "IX_Sas_H_ListForm_ListFormCode", + table: "Sas_H_ListForm", + column: "ListFormCode", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Sas_H_ListFormCustomization_ListFormCode", + table: "Sas_H_ListFormCustomization", + column: "ListFormCode"); + + migrationBuilder.CreateIndex( + name: "IX_Sas_H_ListFormField_ListFormCode_UserId_RoleId_CultureName_~", + table: "Sas_H_ListFormField", + columns: new[] { "ListFormCode", "UserId", "RoleId", "CultureName", "FieldName" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Sas_H_ListFormImport_ListFormCode", + table: "Sas_H_ListFormImport", + column: "ListFormCode"); + + migrationBuilder.CreateIndex( + name: "IX_Sas_H_ListFormImportLog_ImportId", + table: "Sas_H_ListFormImportLog", + column: "ImportId"); + + migrationBuilder.CreateIndex( + name: "IX_Sas_H_Menu_Code", + table: "Sas_H_Menu", + column: "Code", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Sas_H_MenuGroup_Name", + table: "Sas_H_MenuGroup", + column: "Name", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Sas_H_Notification_NotificationRuleId", + table: "Sas_H_Notification", + column: "NotificationRuleId"); + + migrationBuilder.CreateIndex( + name: "IX_Sas_H_Notification_NotificationTypeId", + table: "Sas_H_Notification", + column: "NotificationTypeId"); + + migrationBuilder.CreateIndex( + name: "IX_Sas_H_NotificationRule_NotificationTypeId", + table: "Sas_H_NotificationRule", + column: "NotificationTypeId"); + + migrationBuilder.CreateIndex( + name: "IX_Sas_H_OrderItem_OrderId", + table: "Sas_H_OrderItem", + column: "OrderId"); + + migrationBuilder.CreateIndex( + name: "IX_Sas_H_PaymentMethod_Name", + table: "Sas_H_PaymentMethod", + column: "Name", + unique: true, + filter: "\"IsDeleted\" = FALSE"); + + migrationBuilder.CreateIndex( + name: "IX_Sas_H_Product_Name", + table: "Sas_H_Product", + column: "Name", + unique: true, + filter: "\"IsDeleted\" = FALSE"); + + migrationBuilder.CreateIndex( + name: "IX_Sas_H_Route_Key", + table: "Sas_H_Route", + column: "Key", + unique: true, + filter: "\"IsDeleted\" = FALSE"); + + migrationBuilder.CreateIndex( + name: "IX_Sas_H_Route_Path", + table: "Sas_H_Route", + column: "Path", + unique: true, + filter: "\"IsDeleted\" = FALSE"); + + migrationBuilder.CreateIndex( + name: "IX_Sas_H_Service_Title", + table: "Sas_H_Service", + column: "Title", + unique: true, + filter: "\"IsDeleted\" = FALSE"); + + migrationBuilder.CreateIndex( + name: "IX_Sas_H_Skill_SkillTypeId_Name", + table: "Sas_H_Skill", + columns: new[] { "SkillTypeId", "Name" }, + unique: true, + filter: "\"IsDeleted\" = FALSE"); + + migrationBuilder.CreateIndex( + name: "IX_Sas_H_SkillLevel_SkillTypeId_Name", + table: "Sas_H_SkillLevel", + columns: new[] { "SkillTypeId", "Name" }, + unique: true, + filter: "\"IsDeleted\" = FALSE"); + + migrationBuilder.CreateIndex( + name: "IX_Sas_H_SkillType_Name", + table: "Sas_H_SkillType", + column: "Name", + unique: true, + filter: "\"IsDeleted\" = FALSE"); + + migrationBuilder.CreateIndex( + name: "IX_Sas_H_Uom_Name_UomCategoryId", + table: "Sas_H_Uom", + columns: new[] { "Name", "UomCategoryId" }, + unique: true, + filter: "\"IsDeleted\" = FALSE"); + + migrationBuilder.CreateIndex( + name: "IX_Sas_H_Uom_UomCategoryId", + table: "Sas_H_Uom", + column: "UomCategoryId"); + + migrationBuilder.CreateIndex( + name: "IX_Sas_H_UomCategory_Name", + table: "Sas_H_UomCategory", + column: "Name", + unique: true, + filter: "\"IsDeleted\" = FALSE"); + + migrationBuilder.CreateIndex( + name: "IX_Sas_T_Branch_Code", + table: "Sas_T_Branch", + column: "Code", + unique: true, + filter: "\"IsDeleted\" = FALSE"); + + migrationBuilder.CreateIndex( + name: "IX_Sas_T_BranchUsers_BranchId", + table: "Sas_T_BranchUsers", + column: "BranchId"); + + migrationBuilder.CreateIndex( + name: "IX_Sas_T_BranchUsers_TenantId_BranchId_UserId", + table: "Sas_T_BranchUsers", + columns: new[] { "TenantId", "BranchId", "UserId" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Sas_T_ForumCategory_Name", + table: "Sas_T_ForumCategory", + column: "Name", + unique: true, + filter: "\"IsDeleted\" = FALSE"); + + migrationBuilder.CreateIndex( + name: "IX_Sas_T_ForumPost_ParentPostId", + table: "Sas_T_ForumPost", + column: "ParentPostId"); + + migrationBuilder.CreateIndex( + name: "IX_Sas_T_ForumPost_TopicId", + table: "Sas_T_ForumPost", + column: "TopicId"); + + migrationBuilder.CreateIndex( + name: "IX_Sas_T_ForumTopic_CategoryId", + table: "Sas_T_ForumTopic", + column: "CategoryId"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "AbpAuditLogActions"); + + migrationBuilder.DropTable( + name: "AbpAuditLogExcelFiles"); + + migrationBuilder.DropTable( + name: "AbpBackgroundJobs"); + + migrationBuilder.DropTable( + name: "AbpClaimTypes"); + + migrationBuilder.DropTable( + name: "AbpEntityPropertyChanges"); + + migrationBuilder.DropTable( + name: "AbpFeatureGroups"); + + migrationBuilder.DropTable( + name: "AbpFeatures"); + + migrationBuilder.DropTable( + name: "AbpFeatureValues"); + + migrationBuilder.DropTable( + name: "AbpLinkUsers"); + + migrationBuilder.DropTable( + name: "AbpOrganizationUnitRoles"); + + migrationBuilder.DropTable( + name: "AbpPermissionGrants"); + + migrationBuilder.DropTable( + name: "AbpPermissionGroups"); + + migrationBuilder.DropTable( + name: "AbpPermissions"); + + migrationBuilder.DropTable( + name: "AbpRoleClaims"); + + migrationBuilder.DropTable( + name: "AbpSecurityLogs"); + + migrationBuilder.DropTable( + name: "AbpSessions"); + + migrationBuilder.DropTable( + name: "AbpSettingDefinitions"); + + migrationBuilder.DropTable( + name: "AbpSettings"); + + migrationBuilder.DropTable( + name: "AbpTenantConnectionStrings"); + + migrationBuilder.DropTable( + name: "AbpUserClaims"); + + migrationBuilder.DropTable( + name: "AbpUserDelegations"); + + migrationBuilder.DropTable( + name: "AbpUserLogins"); + + migrationBuilder.DropTable( + name: "AbpUserOrganizationUnits"); + + migrationBuilder.DropTable( + name: "AbpUserRoles"); + + migrationBuilder.DropTable( + name: "AbpUserTokens"); + + migrationBuilder.DropTable( + name: "Adm_T_Announcement"); + + migrationBuilder.DropTable( + name: "Adm_T_EventComment"); + + migrationBuilder.DropTable( + name: "Adm_T_EventLike"); + + migrationBuilder.DropTable( + name: "Adm_T_IpRestriction"); + + migrationBuilder.DropTable( + name: "Adm_T_JobPosition"); + + migrationBuilder.DropTable( + name: "Adm_T_Note"); + + migrationBuilder.DropTable( + name: "Adm_T_ReportTemplate"); + + migrationBuilder.DropTable( + name: "Adm_T_Sector"); + + migrationBuilder.DropTable( + name: "Adm_T_Sequence"); + + migrationBuilder.DropTable( + name: "Adm_T_SocialComment"); + + migrationBuilder.DropTable( + name: "Adm_T_SocialLike"); + + migrationBuilder.DropTable( + name: "Adm_T_SocialLocation"); + + migrationBuilder.DropTable( + name: "Adm_T_SocialPollOption"); + + migrationBuilder.DropTable( + name: "Adm_T_SurveyAnswer"); + + migrationBuilder.DropTable( + name: "Adm_T_SurveyQuestionOption"); + + migrationBuilder.DropTable( + name: "Adm_T_VideoroomAttandance"); + + migrationBuilder.DropTable( + name: "Adm_T_VideoroomChat"); + + migrationBuilder.DropTable( + name: "Adm_T_VideoroomParticipant"); + + migrationBuilder.DropTable( + name: "Adm_T_WorkHour"); + + migrationBuilder.DropTable( + name: "OpenIddictScopes"); + + migrationBuilder.DropTable( + name: "OpenIddictTokens"); + + migrationBuilder.DropTable( + name: "Sas_H_About"); + + migrationBuilder.DropTable( + name: "Sas_H_AiBot"); + + migrationBuilder.DropTable( + name: "Sas_H_BackgroundWorker"); + + migrationBuilder.DropTable( + name: "Sas_H_BackgroundWorker_MailQueueEvents"); + + migrationBuilder.DropTable( + name: "Sas_H_BlogPost"); + + migrationBuilder.DropTable( + name: "Sas_H_Contact"); + + migrationBuilder.DropTable( + name: "Sas_H_ContactTitle"); + + migrationBuilder.DropTable( + name: "Sas_H_CrudEndpoint"); + + migrationBuilder.DropTable( + name: "Sas_H_Currency"); + + migrationBuilder.DropTable( + name: "Sas_H_CustomComponent"); + + migrationBuilder.DropTable( + name: "Sas_H_CustomEndpoint"); + + migrationBuilder.DropTable( + name: "Sas_H_DataSource"); + + migrationBuilder.DropTable( + name: "Sas_H_Demo"); + + migrationBuilder.DropTable( + name: "Sas_H_District"); + + migrationBuilder.DropTable( + name: "Sas_H_DynamicService"); + + migrationBuilder.DropTable( + name: "Sas_H_Home"); + + migrationBuilder.DropTable( + name: "Sas_H_InstallmentOption"); + + migrationBuilder.DropTable( + name: "Sas_H_LanguageText"); + + migrationBuilder.DropTable( + name: "Sas_H_ListFormCustomization"); + + migrationBuilder.DropTable( + name: "Sas_H_ListFormField"); + + migrationBuilder.DropTable( + name: "Sas_H_ListFormImportLog"); + + migrationBuilder.DropTable( + name: "Sas_H_ListFormWorkflow"); + + migrationBuilder.DropTable( + name: "Sas_H_LogEntry"); + + migrationBuilder.DropTable( + name: "Sas_H_Menu"); + + migrationBuilder.DropTable( + name: "Sas_H_MenuGroup"); + + migrationBuilder.DropTable( + name: "Sas_H_Notification"); + + migrationBuilder.DropTable( + name: "Sas_H_OrderItem"); + + migrationBuilder.DropTable( + name: "Sas_H_PaymentMethod"); + + migrationBuilder.DropTable( + name: "Sas_H_Product"); + + migrationBuilder.DropTable( + name: "Sas_H_Route"); + + migrationBuilder.DropTable( + name: "Sas_H_Service"); + + migrationBuilder.DropTable( + name: "Sas_H_SettingDefinition"); + + migrationBuilder.DropTable( + name: "Sas_H_Skill"); + + migrationBuilder.DropTable( + name: "Sas_H_SkillLevel"); + + migrationBuilder.DropTable( + name: "Sas_H_Uom"); + + migrationBuilder.DropTable( + name: "Sas_T_BranchUsers"); + + migrationBuilder.DropTable( + name: "Sas_T_ForumPost"); + + migrationBuilder.DropTable( + name: "Sas_T_GlobalSearch"); + + migrationBuilder.DropTable( + name: "AbpEntityChanges"); + + migrationBuilder.DropTable( + name: "AbpTenants"); + + migrationBuilder.DropTable( + name: "AbpOrganizationUnits"); + + migrationBuilder.DropTable( + name: "AbpRoles"); + + migrationBuilder.DropTable( + name: "AbpUsers"); + + migrationBuilder.DropTable( + name: "Adm_T_Event"); + + migrationBuilder.DropTable( + name: "Adm_T_Department"); + + migrationBuilder.DropTable( + name: "Adm_T_ReportCategory"); + + migrationBuilder.DropTable( + name: "Adm_T_SocialMedia"); + + migrationBuilder.DropTable( + name: "Adm_T_SurveyResponse"); + + migrationBuilder.DropTable( + name: "Adm_T_SurveyQuestion"); + + migrationBuilder.DropTable( + name: "Adm_T_Videoroom"); + + migrationBuilder.DropTable( + name: "OpenIddictAuthorizations"); + + migrationBuilder.DropTable( + name: "Sas_H_BackgroundWorker_MailQueue"); + + migrationBuilder.DropTable( + name: "Sas_H_BlogCategory"); + + migrationBuilder.DropTable( + name: "Sas_H_City"); + + migrationBuilder.DropTable( + name: "Sas_H_LanguageKey"); + + migrationBuilder.DropTable( + name: "Sas_H_Language"); + + migrationBuilder.DropTable( + name: "Sas_H_ListFormImport"); + + migrationBuilder.DropTable( + name: "Sas_H_NotificationRule"); + + migrationBuilder.DropTable( + name: "Sas_H_Order"); + + migrationBuilder.DropTable( + name: "Sas_H_SkillType"); + + migrationBuilder.DropTable( + name: "Sas_H_UomCategory"); + + migrationBuilder.DropTable( + name: "Sas_T_Branch"); + + migrationBuilder.DropTable( + name: "Sas_T_ForumTopic"); + + migrationBuilder.DropTable( + name: "AbpAuditLogs"); + + migrationBuilder.DropTable( + name: "Adm_T_EventCategory"); + + migrationBuilder.DropTable( + name: "Adm_T_EventType"); + + migrationBuilder.DropTable( + name: "Adm_T_SocialPost"); + + migrationBuilder.DropTable( + name: "Adm_T_Survey"); + + migrationBuilder.DropTable( + name: "OpenIddictApplications"); + + migrationBuilder.DropTable( + name: "Sas_H_BackgroundWorker_MailQueueTableFormat"); + + migrationBuilder.DropTable( + name: "Sas_H_Country"); + + migrationBuilder.DropTable( + name: "Sas_H_ListForm"); + + migrationBuilder.DropTable( + name: "Sas_H_NotificationType"); + + migrationBuilder.DropTable( + name: "Sas_T_ForumCategory"); + + migrationBuilder.DropTable( + name: "Sas_H_CountryGroup"); + } + } +} diff --git a/api/src/Sozsoft.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs b/api/src/Sozsoft.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs index 990af2d..9ab7aa0 100644 --- a/api/src/Sozsoft.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs +++ b/api/src/Sozsoft.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs @@ -2,8 +2,8 @@ using System; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; using Sozsoft.Platform.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore; @@ -18,72 +18,75 @@ namespace Sozsoft.Platform.Migrations { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.PostgreSql) .HasAnnotation("ProductVersion", "10.0.4") - .HasAnnotation("Relational:MaxIdentifierLength", 128); + .HasAnnotation("Relational:MaxIdentifierLength", 63); - SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); modelBuilder.Entity("Sequence", b => { b.Property("Id") - .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("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("FormatTemplate") .IsRequired() .ValueGeneratedOnAdd() .HasMaxLength(256) - .HasColumnType("nvarchar(256)") - .HasDefaultValue("{Prefix}{Number}{Suffix}"); + .HasColumnType("character varying(256)") + .HasDefaultValue("{Prefix}{Number}{Suffix}") + .UseCollation("tr-x-icu"); b.Property("IncrementStep") .ValueGeneratedOnAdd() - .HasColumnType("int") + .HasColumnType("integer") .HasDefaultValue(1); b.Property("IsActive") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(true); 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("LastPeriodKey") .HasMaxLength(20) - .HasColumnType("nvarchar(20)"); + .HasColumnType("character varying(20)") + .UseCollation("tr-x-icu"); b.Property("Name") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("NextNumber") .ValueGeneratedOnAdd() @@ -92,16 +95,17 @@ namespace Sozsoft.Platform.Migrations b.Property("PaddingSize") .ValueGeneratedOnAdd() - .HasColumnType("int") + .HasColumnType("integer") .HasDefaultValue(6); b.Property("Prefix") .HasMaxLength(32) - .HasColumnType("nvarchar(32)"); + .HasColumnType("character varying(32)") + .UseCollation("tr-x-icu"); b.Property("ResetPeriod") .ValueGeneratedOnAdd() - .HasColumnType("int") + .HasColumnType("integer") .HasDefaultValue(0); b.Property("StartNumber") @@ -109,17 +113,18 @@ namespace Sozsoft.Platform.Migrations b.Property("Suffix") .HasMaxLength(32) - .HasColumnType("nvarchar(32)"); + .HasColumnType("character varying(32)") + .UseCollation("tr-x-icu"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); b.HasIndex("TenantId", "Name") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Adm_T_Sequence", (string)null); }); @@ -128,30 +133,34 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("CultureName") .IsRequired() .HasMaxLength(10) - .HasColumnType("nvarchar(10)"); + .HasColumnType("character varying(10)") + .UseCollation("tr-x-icu"); b.Property("DisplayName") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("IsEnabled") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("TwoLetterISOLanguageName") .IsRequired() .HasMaxLength(2) - .HasColumnType("nvarchar(2)"); + .HasColumnType("character varying(2)") + .UseCollation("tr-x-icu"); b.Property("UiCultureName") .IsRequired() .HasMaxLength(10) - .HasColumnType("nvarchar(10)"); + .HasColumnType("character varying(10)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -162,17 +171,19 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Key") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("ResourceName") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -186,25 +197,29 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("CultureName") .IsRequired() .HasMaxLength(10) - .HasColumnType("nvarchar(10)"); + .HasColumnType("character varying(10)") + .UseCollation("tr-x-icu"); b.Property("Key") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("ResourceName") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("Value") .IsRequired() .HasMaxLength(4096) - .HasColumnType("nvarchar(max)"); + .HasColumnType("character varying(4096)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -219,85 +234,94 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Attachment") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("AttachmentParameter") .HasMaxLength(512) - .HasColumnType("nvarchar(512)"); + .HasColumnType("character varying(512)") + .UseCollation("tr-x-icu"); b.Property("AwsMessageId") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); 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("From") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); 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("MailParameter") .HasMaxLength(8192) - .HasColumnType("nvarchar(max)"); + .HasColumnType("character varying(8192)") + .UseCollation("tr-x-icu"); b.Property("RelatedRecordId") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("SendStatus") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("SendTime") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("TableName") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("TableParameter") .HasMaxLength(512) - .HasColumnType("nvarchar(512)"); + .HasColumnType("character varying(512)") + .UseCollation("tr-x-icu"); b.Property("TemplateId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("To") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -310,56 +334,60 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("AwsMessageId") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); 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("Event") .HasMaxLength(20) - .HasColumnType("nvarchar(20)"); + .HasColumnType("character varying(20)") + .UseCollation("tr-x-icu"); b.Property("EventDate") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); 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("MailAddress") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("ResponseDescription") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -372,58 +400,67 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("int"); + .HasColumnType("integer"); - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("Caption") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("ColumnName") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("Css") .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); + .HasColumnType("character varying(1024)") + .UseCollation("tr-x-icu"); b.Property("DataFormat") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("DataType") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("FooterCss") .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); + .HasColumnType("character varying(1024)") + .UseCollation("tr-x-icu"); b.Property("HeaderCss") .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); + .HasColumnType("character varying(1024)") + .UseCollation("tr-x-icu"); b.Property("IsHidden") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("IsProtected") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("Order") .HasColumnType("smallint"); b.Property("SubTotal") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("TableName") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("Width") - .HasColumnType("int"); + .HasColumnType("integer"); b.HasKey("Id"); @@ -438,70 +475,73 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .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("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("Identifier") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("IsRead") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("IsSent") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("LastModificationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("Message") .IsRequired() .HasMaxLength(2048) - .HasColumnType("nvarchar(2048)"); + .HasColumnType("character varying(2048)") + .UseCollation("tr-x-icu"); b.Property("NotificationChannel") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("NotificationRuleId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("NotificationTypeId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("ReadTime") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("UserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.HasKey("Id"); @@ -516,63 +556,66 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Channel") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); 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("IsActive") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("IsCustomized") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("IsFixed") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("LastModificationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("NotificationTypeId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("RecipientId") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("RecipientType") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -585,42 +628,43 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .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("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); 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(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -630,46 +674,49 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.About", b => { b.Property("Id") - .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("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("DescriptionsJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); 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("SectionsJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("StatsJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -679,23 +726,26 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.AiBot", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("ApiUrl") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("Description") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("IsActive") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("Name") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -708,91 +758,97 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.Announcement", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Attachments") .HasMaxLength(2048) - .HasColumnType("nvarchar(2048)"); + .HasColumnType("character varying(2048)") + .UseCollation("tr-x-icu"); b.Property("Category") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("Content") .IsRequired() .HasMaxLength(4096) - .HasColumnType("nvarchar(max)"); + .HasColumnType("character varying(4096)") + .UseCollation("tr-x-icu"); 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("Excerpt") .IsRequired() .HasMaxLength(512) - .HasColumnType("nvarchar(512)"); + .HasColumnType("character varying(512)") + .UseCollation("tr-x-icu"); b.Property("ExpiryDate") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("ImageUrl") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("IsPinned") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("LastModificationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("PublishDate") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("Title") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("UserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("ViewCount") .ValueGeneratedOnAdd() - .HasColumnType("int") + .HasColumnType("integer") .HasDefaultValue(0); b.HasKey("Id"); b.HasIndex("TenantId", "Title") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Adm_T_Announcement", (string)null); }); @@ -800,76 +856,82 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.BackgroundWorker", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("AfterSp") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("BeforeSp") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("CreationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("Cron") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("DataSourceCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("IsActive") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(true); 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(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("Options") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("WorkerType") - .HasColumnType("int"); + .HasColumnType("integer"); b.HasKey("Id"); b.HasIndex("Name") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Sas_H_BackgroundWorker", (string)null); }); @@ -877,70 +939,74 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.BlogCategory", b => { b.Property("Id") - .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("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("Description") .HasMaxLength(512) - .HasColumnType("nvarchar(512)"); + .HasColumnType("character varying(512)") + .UseCollation("tr-x-icu"); b.Property("DisplayOrder") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("Icon") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("IsActive") - .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("Name") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("PostCount") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("Slug") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); b.HasIndex("Name") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Sas_H_BlogCategory", (string)null); }); @@ -948,95 +1014,103 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.BlogPost", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Author") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("CategoryId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("CommentCount") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("ContentEn") .IsRequired() - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("ContentTr") .IsRequired() - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("CoverImage") .HasMaxLength(512) - .HasColumnType("nvarchar(512)"); + .HasColumnType("character varying(512)") + .UseCollation("tr-x-icu"); 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("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("IsPublished") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("LastModificationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("LikeCount") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("PublishedAt") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("ReadTime") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("Slug") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("Summary") .IsRequired() .HasMaxLength(512) - .HasColumnType("nvarchar(512)"); + .HasColumnType("character varying(512)") + .UseCollation("tr-x-icu"); b.Property("Title") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("ViewCount") - .HasColumnType("int"); + .HasColumnType("integer"); b.HasKey("Id"); b.HasIndex("CategoryId", "Title") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Sas_H_BlogPost", (string)null); }); @@ -1044,117 +1118,132 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.Branch", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Address1") .HasMaxLength(512) - .HasColumnType("nvarchar(512)"); + .HasColumnType("character varying(512)") + .UseCollation("tr-x-icu"); b.Property("Address2") .HasMaxLength(512) - .HasColumnType("nvarchar(512)"); + .HasColumnType("character varying(512)") + .UseCollation("tr-x-icu"); b.Property("City") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("Code") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("Country") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); 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("District") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("Email") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("FaxNumber") .HasMaxLength(20) - .HasColumnType("nvarchar(20)"); + .HasColumnType("character varying(20)") + .UseCollation("tr-x-icu"); b.Property("IsActive") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(true); 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("MobileNumber") .IsRequired() .HasMaxLength(20) - .HasColumnType("nvarchar(20)"); + .HasColumnType("character varying(20)") + .UseCollation("tr-x-icu"); b.Property("Name") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("PhoneNumber") .HasMaxLength(20) - .HasColumnType("nvarchar(20)"); + .HasColumnType("character varying(20)") + .UseCollation("tr-x-icu"); b.Property("PostalCode") .HasMaxLength(16) - .HasColumnType("nvarchar(16)"); + .HasColumnType("character varying(16)") + .UseCollation("tr-x-icu"); b.Property("TaxOffice") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Township") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("VknTckn") .HasColumnType("bigint"); b.Property("Website") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); b.HasIndex("Code") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Sas_T_Branch", (string)null); }); @@ -1162,17 +1251,17 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.BranchUsers", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("BranchId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("UserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.HasKey("Id"); @@ -1187,53 +1276,57 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.City", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Country") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("CountryId") - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); 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("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(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("PlateCode") .HasMaxLength(20) - .HasColumnType("nvarchar(20)"); + .HasColumnType("character varying(20)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -1241,7 +1334,7 @@ namespace Sozsoft.Platform.Migrations b.HasIndex("Country", "Name") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Sas_H_City", (string)null); }); @@ -1249,65 +1342,72 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.Contact", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Address") .HasMaxLength(512) - .HasColumnType("nvarchar(512)"); + .HasColumnType("character varying(512)") + .UseCollation("tr-x-icu"); b.Property("BankJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); 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") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); 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("Location") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("MapJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("PhoneNumber") .HasMaxLength(20) - .HasColumnType("nvarchar(20)"); + .HasColumnType("character varying(20)") + .UseCollation("tr-x-icu"); b.Property("TaxNumber") .HasColumnType("bigint"); b.Property("WorkHoursJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -1317,52 +1417,54 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.ContactTitle", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Abbreviation") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); 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("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("Title") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); b.HasIndex("Title") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Sas_H_ContactTitle", (string)null); }); @@ -1371,64 +1473,69 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("CreationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("Currency") .IsRequired() .HasMaxLength(8) - .HasColumnType("nvarchar(8)"); + .HasColumnType("character varying(8)") + .UseCollation("tr-x-icu"); b.Property("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("GroupName") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); 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(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("PhoneCode") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("StateRequired") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("TaxLabel") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("ZipRequired") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.HasKey("Id"); @@ -1436,7 +1543,7 @@ namespace Sozsoft.Platform.Migrations b.HasIndex("Name") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Sas_H_Country", (string)null); }); @@ -1444,48 +1551,50 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.CountryGroup", b => { b.Property("Id") - .HasColumnType("nvarchar(450)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); 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("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(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); b.HasIndex("Name") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Sas_H_CountryGroup", (string)null); }); @@ -1493,74 +1602,79 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.CrudEndpoint", b => { b.Property("Id") - .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("CsharpCode") .IsRequired() - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("EntityName") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("IsActive") - .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("Method") .IsRequired() .HasMaxLength(10) - .HasColumnType("nvarchar(10)"); + .HasColumnType("character varying(10)") + .UseCollation("tr-x-icu"); b.Property("OperationType") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("Path") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); b.HasIndex("TenantId", "EntityName", "Method", "Path") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Sas_H_CrudEndpoint", (string)null); }); @@ -1569,64 +1683,67 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); 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("IsActive") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(true); 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("LastUpdated") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("Name") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("Rate") .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)"); + .HasColumnType("numeric(18,6)"); b.Property("Symbol") .HasMaxLength(8) - .HasColumnType("nvarchar(8)"); + .HasColumnType("character varying(8)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); b.HasIndex("Id", "Name") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Sas_H_Currency", (string)null); }); @@ -1634,71 +1751,76 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.CustomComponent", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Code") .IsRequired() - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); 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("Dependencies") .HasMaxLength(2048) - .HasColumnType("nvarchar(2048)"); + .HasColumnType("character varying(2048)") + .UseCollation("tr-x-icu"); b.Property("Description") .HasMaxLength(512) - .HasColumnType("nvarchar(512)"); + .HasColumnType("character varying(512)") + .UseCollation("tr-x-icu"); b.Property("IsActive") - .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("Name") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("Props") .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); + .HasColumnType("character varying(1024)") + .UseCollation("tr-x-icu"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); b.HasIndex("TenantId", "Name") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Sas_H_CustomComponent", (string)null); }); @@ -1706,81 +1828,89 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.CustomEndpoint", b => { b.Property("Id") - .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("DataSourceCode") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); 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(512) - .HasColumnType("nvarchar(512)"); + .HasColumnType("character varying(512)") + .UseCollation("tr-x-icu"); 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("Method") .IsRequired() .HasMaxLength(10) - .HasColumnType("nvarchar(10)"); + .HasColumnType("character varying(10)") + .UseCollation("tr-x-icu"); b.Property("Name") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("ParametersJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("PermissionsJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("Sql") .IsRequired() - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("Url") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); b.HasIndex("TenantId", "Name") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Sas_H_CustomEndpoint", (string)null); }); @@ -1788,55 +1918,57 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.DataSource", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Code") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("ConnectionString") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("CreationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("DataSourceType") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); 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.HasKey("Id"); b.HasIndex("Code") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Sas_H_DataSource", (string)null); }); @@ -1844,73 +1976,79 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.Demo", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Address") .IsRequired() .HasMaxLength(512) - .HasColumnType("nvarchar(512)"); + .HasColumnType("character varying(512)") + .UseCollation("tr-x-icu"); 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)") + .UseCollation("tr-x-icu"); 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("Message") .IsRequired() .HasMaxLength(2048) - .HasColumnType("nvarchar(2048)"); + .HasColumnType("character varying(2048)") + .UseCollation("tr-x-icu"); b.Property("Name") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("NumberOfBranches") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("NumberOfUsers") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("OrganizationName") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("PhoneNumber") .IsRequired() .HasMaxLength(20) - .HasColumnType("nvarchar(20)"); + .HasColumnType("character varying(20)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -1920,55 +2058,56 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.Department", b => { b.Property("Id") - .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("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); 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(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("ParentId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); b.HasIndex("TenantId", "Name") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Adm_T_Department", (string)null); }); @@ -1976,58 +2115,62 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.District", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("City") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("CityId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Country") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); 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("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(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("Township") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -2035,7 +2178,7 @@ namespace Sozsoft.Platform.Migrations b.HasIndex("Country", "City", "Name", "Township") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Sas_H_District", (string)null); }); @@ -2043,97 +2186,105 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.DynamicService", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Code") .IsRequired() - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("CodeHash") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("CompilationStatus") .IsRequired() .HasMaxLength(20) - .HasColumnType("nvarchar(20)"); + .HasColumnType("character varying(20)"); b.Property("ControllerName") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); 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(2048) - .HasColumnType("nvarchar(2048)"); + .HasColumnType("character varying(2048)") + .UseCollation("tr-x-icu"); b.Property("DisplayName") .HasMaxLength(512) - .HasColumnType("nvarchar(512)"); + .HasColumnType("character varying(512)") + .UseCollation("tr-x-icu"); b.Property("IsActive") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(true); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("LastCompilationError") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("LastModificationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("LastSuccessfulCompilation") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("Name") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("PrimaryEntityType") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("Version") .ValueGeneratedOnAdd() - .HasColumnType("int") + .HasColumnType("integer") .HasDefaultValue(1); b.HasKey("Id"); b.HasIndex("TenantId", "Name") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Sas_H_DynamicService", (string)null); }); @@ -2141,83 +2292,88 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.Event", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("CategoryId") - .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("Date") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); 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(1024) - .HasColumnType("nvarchar(1024)"); + .HasColumnType("character varying(1024)") + .UseCollation("tr-x-icu"); 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("Likes") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("Name") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("ParticipantsCount") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("Photos") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("Place") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("Status") .HasMaxLength(20) - .HasColumnType("nvarchar(20)"); + .HasColumnType("character varying(20)") + .UseCollation("tr-x-icu"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("TypeId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("UserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("isPublished") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false); b.HasKey("Id"); @@ -2228,7 +2384,7 @@ namespace Sozsoft.Platform.Migrations b.HasIndex("TenantId", "CategoryId", "TypeId", "Name") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Adm_T_Event", (string)null); }); @@ -2236,52 +2392,53 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.EventCategory", b => { b.Property("Id") - .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("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); 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(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); b.HasIndex("TenantId", "Name") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Adm_T_EventCategory", (string)null); }); @@ -2289,56 +2446,57 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.EventComment", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Content") .HasMaxLength(512) - .HasColumnType("nvarchar(512)"); + .HasColumnType("character varying(512)") + .UseCollation("tr-x-icu"); 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("EventId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); 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("Likes") .ValueGeneratedOnAdd() - .HasColumnType("int") + .HasColumnType("integer") .HasDefaultValue(0); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("UserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.HasKey("Id"); @@ -2350,47 +2508,47 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.EventLike", b => { b.Property("Id") - .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("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("EventId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); 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("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("UserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.HasKey("Id"); @@ -2402,52 +2560,53 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.EventType", b => { b.Property("Id") - .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("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); 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(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); b.HasIndex("TenantId", "Name") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Adm_T_EventType", (string)null); }); @@ -2456,34 +2615,39 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("int"); + .HasColumnType("integer"); - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("Group") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("System") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("Term") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("Url") .HasMaxLength(512) - .HasColumnType("nvarchar(512)"); + .HasColumnType("character varying(512)") + .UseCollation("tr-x-icu"); b.Property("Weight") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -2493,86 +2657,99 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.Home", b => { b.Property("Id") - .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("CtaButtonLabelKey") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("CtaSubtitleKey") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("CtaTitleKey") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("FeaturesJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("FeaturesSubtitleKey") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("FeaturesTitleKey") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("HeroBackgroundImageKey") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("HeroPrimaryCtaKey") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("HeroSecondaryCtaKey") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); 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("SlidesJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("SolutionsJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("SolutionsSubtitleKey") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("SolutionsTitleKey") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -2582,58 +2759,59 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.InstallmentOption", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Commission") .HasPrecision(5, 3) - .HasColumnType("decimal(5,3)"); + .HasColumnType("numeric(5,3)"); 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("Installment") - .HasColumnType("int"); + .HasColumnType("integer"); 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(32) - .HasColumnType("nvarchar(32)"); + .HasColumnType("character varying(32)") + .UseCollation("tr-x-icu"); b.Property("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.HasKey("Id"); b.HasIndex("Name") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Sas_H_InstallmentOption", (string)null); }); @@ -2641,61 +2819,64 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.IpRestriction", b => { b.Property("Id") - .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("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("IP") .IsRequired() .HasMaxLength(32) - .HasColumnType("nvarchar(32)"); + .HasColumnType("character varying(32)") + .UseCollation("tr-x-icu"); 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("ResourceId") .HasMaxLength(32) - .HasColumnType("nvarchar(32)"); + .HasColumnType("character varying(32)") + .UseCollation("tr-x-icu"); b.Property("ResourceType") .IsRequired() .HasMaxLength(10) - .HasColumnType("nvarchar(10)"); + .HasColumnType("character varying(10)") + .UseCollation("tr-x-icu"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); b.HasIndex("TenantId", "ResourceType", "ResourceId", "IP") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Adm_T_IpRestriction", (string)null); }); @@ -2703,51 +2884,52 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.JobPosition", b => { b.Property("Id") - .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("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("DepartmentId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); 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(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("ParentId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -2756,7 +2938,7 @@ namespace Sozsoft.Platform.Migrations b.HasIndex("TenantId", "Name", "DepartmentId") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Adm_T_JobPosition", (string)null); }); @@ -2764,297 +2946,376 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.ListForm", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("AdaptiveLayoutJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("AnimationJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("AnnotationsJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("ArgumentAxisJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("ColumnOptionJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("CommandColumnJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("CommonAnnotationsSettingsJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("CommonAxisSettingsJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("CommonJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("CommonPaneSettingsJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("CommonSeriesSettingsJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("CrosshairJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("CultureName") .IsRequired() .HasMaxLength(10) - .HasColumnType("nvarchar(10)"); + .HasColumnType("character varying(10)") + .UseCollation("tr-x-icu"); b.Property("CustomJsSourcesJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("CustomStyleSourcesJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("DataSourceCode") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("DataSourceJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("DefaultFilter") .IsUnicode(true) - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("DeleteAfterCommand") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("DeleteBeforeCommand") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("DeleteCommand") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("DeleteFieldsDefaultValueJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("DeleteServiceAddress") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("Description") .HasMaxLength(512) - .HasColumnType("nvarchar(512)"); + .HasColumnType("character varying(512)") + .UseCollation("tr-x-icu"); b.Property("EditingFormJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("EditingOptionJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("ExportJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("ExtraFilterJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("FilterPanelJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("FilterRowJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("FormFieldsDefaultValueJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("FullHeight") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("GanttOptionJson") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("GroupPanelJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("HeaderFilterJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("Height") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("InsertAfterCommand") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("InsertBeforeCommand") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("InsertCommand") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("InsertFieldsDefaultValueJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("InsertServiceAddress") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("IsBranch") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("IsOrganizationUnit") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("IsSubForm") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("IsTenant") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("KeyFieldDbSourceType") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("KeyFieldName") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("LayoutJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("LegendJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("ListFormCode") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("ListFormType") .HasMaxLength(20) - .HasColumnType("nvarchar(20)"); + .HasColumnType("character varying(20)") + .UseCollation("tr-x-icu"); b.Property("MarginJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("Name") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("PageSize") .ValueGeneratedOnAdd() - .HasColumnType("int") + .HasColumnType("integer") .HasDefaultValue(50); b.Property("PagerOptionJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("PanesJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("PermissionJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("PivotOptionJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("RoleId") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("RowJson") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("SchedulerOptionJson") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("ScrollBarJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("SearchPanelJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("SelectCommand") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("SelectCommandType") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("SelectFieldsDefaultValueJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("SelectionJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("SeriesJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("ShowNote") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("SizeJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("SortMode") .HasMaxLength(20) - .HasColumnType("nvarchar(20)"); + .HasColumnType("character varying(20)") + .UseCollation("tr-x-icu"); b.Property("StateStoringJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("SubFormsJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("SubFormsListFormType") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("TableName") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("Title") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("TitleJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("TooltipJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("TreeOptionJson") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("UpdateAfterCommand") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("UpdateBeforeCommand") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("UpdateCommand") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("UpdateFieldsDefaultValueJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("UpdateServiceAddress") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("UserId") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("ValueAxisJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("WidgetsJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("Width") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("WorkflowJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("ZoomAndPanJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -3067,60 +3328,65 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.ListFormCustomization", b => { b.Property("Id") - .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("CustomizationData") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("CustomizationType") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("FilterName") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); 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("ListFormCode") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("RoleId") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("UserId") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -3132,143 +3398,169 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.ListFormField", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Alignment") .ValueGeneratedOnAdd() .HasMaxLength(20) - .HasColumnType("nvarchar(20)") - .HasDefaultValue("left"); + .HasColumnType("character varying(20)") + .HasDefaultValue("left") + .UseCollation("tr-x-icu"); b.Property("AllowAdding") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(true); b.Property("AllowEditing") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(true); b.Property("AllowSearch") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false); b.Property("BandName") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("CaptionName") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("ColumnCssClass") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("ColumnCssValue") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("ColumnCustomizationJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("ColumnFilterJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("ColumnHeaderJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("ColumnStylingJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("CultureName") .IsRequired() .HasMaxLength(10) - .HasColumnType("nvarchar(10)"); + .HasColumnType("character varying(10)") + .UseCollation("tr-x-icu"); b.Property("EditorOptions") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("FieldName") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("Format") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("GroupSummaryJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("GroupingJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("IsActive") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(true); b.Property("JoinTableJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("ListFormCode") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("ListOrderNo") .ValueGeneratedOnAdd() - .HasColumnType("int") + .HasColumnType("integer") .HasDefaultValue(30); b.Property("LookupJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("PermissionJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("PivotSettingsJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("PlaceHolder") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("RoleId") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("SortDirection") .HasMaxLength(10) - .HasColumnType("nvarchar(10)"); + .HasColumnType("character varying(10)") + .UseCollation("tr-x-icu"); b.Property("SortIndex") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("SourceDbType") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("TotalSummaryJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("UserId") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("ValidationRuleJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("Visible") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(true); b.Property("Width") .ValueGeneratedOnAdd() - .HasColumnType("int") + .HasColumnType("integer") .HasDefaultValue(100); b.HasKey("Id"); @@ -3282,55 +3574,58 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.ListFormImport", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("BlobName") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); 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("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("ListFormCode") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("Status") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("TotalRows") - .HasColumnType("int"); + .HasColumnType("integer"); b.HasKey("Id"); @@ -3342,65 +3637,68 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.ListFormImportLog", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("BlobName") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); 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("ErrorRows") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("ErrorsJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("ExecRows") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("ImportId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); 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("Progress") - .HasColumnType("float"); + .HasColumnType("double precision"); b.Property("Status") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("ValidRows") - .HasColumnType("int"); + .HasColumnType("integer"); b.HasKey("Id"); @@ -3413,75 +3711,88 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + .HasColumnType("character varying(50)") + .UseCollation("tr-x-icu"); b.Property("Approver") .IsRequired() .HasMaxLength(250) - .HasColumnType("nvarchar(250)"); + .HasColumnType("character varying(250)") + .UseCollation("tr-x-icu"); b.Property("CompareColumn") .IsRequired() .HasMaxLength(100) - .HasColumnType("nvarchar(100)"); + .HasColumnType("character varying(100)") + .UseCollation("tr-x-icu"); b.Property("CompareOperator") .IsRequired() .HasMaxLength(20) - .HasColumnType("nvarchar(20)"); + .HasColumnType("character varying(20)") + .UseCollation("tr-x-icu"); b.Property("CompareOutcomesJson") - .HasColumnType("text"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("CompareValue") .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); + .HasColumnType("numeric(18,2)"); b.Property("Kind") .IsRequired() .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + .HasColumnType("character varying(50)") + .UseCollation("tr-x-icu"); b.Property("ListFormCode") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("NextOnApprove") .IsRequired() .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + .HasColumnType("character varying(50)") + .UseCollation("tr-x-icu"); b.Property("NextOnFalse") .IsRequired() .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + .HasColumnType("character varying(50)") + .UseCollation("tr-x-icu"); b.Property("NextOnReject") .IsRequired() .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + .HasColumnType("character varying(50)") + .UseCollation("tr-x-icu"); b.Property("NextOnStart") .IsRequired() .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + .HasColumnType("character varying(50)") + .UseCollation("tr-x-icu"); b.Property("NextOnTrue") .IsRequired() .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + .HasColumnType("character varying(50)") + .UseCollation("tr-x-icu"); b.Property("PositionX") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("PositionY") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("Title") .IsRequired() .HasMaxLength(250) - .HasColumnType("nvarchar(250)"); + .HasColumnType("character varying(250)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -3491,25 +3802,30 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.LogEntry", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Exception") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("Level") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("Message") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("MessageTemplate") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("Properties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("TimeStamp") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.HasKey("Id"); @@ -3519,66 +3835,79 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.Menu", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Code") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("CssClass") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("CultureName") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("DisplayName") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("ElementId") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("Icon") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("IsDisabled") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("Order") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("ParentCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("RequiredPermissionName") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("RoleId") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("ShortName") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("Target") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("Url") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("UserId") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -3591,12 +3920,14 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.MenuGroup", b => { b.Property("Id") - .HasColumnType("nvarchar(450)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("Name") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -3609,69 +3940,75 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.Note", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Content") .IsRequired() .HasMaxLength(2048) - .HasColumnType("nvarchar(2048)"); + .HasColumnType("character varying(2048)") + .UseCollation("tr-x-icu"); 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("EntityId") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("EntityName") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("FilesJson") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); 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("Subject") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("Type") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -3681,129 +4018,146 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.Order", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Address1") .HasMaxLength(512) - .HasColumnType("nvarchar(512)"); + .HasColumnType("character varying(512)") + .UseCollation("tr-x-icu"); b.Property("Address2") .HasMaxLength(512) - .HasColumnType("nvarchar(512)"); + .HasColumnType("character varying(512)") + .UseCollation("tr-x-icu"); b.Property("City") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("Commission") .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); + .HasColumnType("numeric(18,2)"); b.Property("Country") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); 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("District") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("Email") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("FaxNumber") .HasMaxLength(20) - .HasColumnType("nvarchar(20)"); + .HasColumnType("character varying(20)") + .UseCollation("tr-x-icu"); b.Property("Founder") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("Installment") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("IsActive") - .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("MenuGroup") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("MobileNumber") .HasMaxLength(20) - .HasColumnType("nvarchar(20)"); + .HasColumnType("character varying(20)") + .UseCollation("tr-x-icu"); b.Property("Name") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("OrganizationName") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("PaymentDataJson") .HasMaxLength(4096) - .HasColumnType("nvarchar(max)"); + .HasColumnType("character varying(4096)") + .UseCollation("tr-x-icu"); b.Property("PaymentMethodId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("PhoneNumber") .HasMaxLength(20) - .HasColumnType("nvarchar(20)"); + .HasColumnType("character varying(20)") + .UseCollation("tr-x-icu"); b.Property("PostalCode") .HasMaxLength(16) - .HasColumnType("nvarchar(16)"); + .HasColumnType("character varying(16)") + .UseCollation("tr-x-icu"); b.Property("Subtotal") .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); + .HasColumnType("numeric(18,2)"); b.Property("TaxOffice") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("Total") .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); + .HasColumnType("numeric(18,2)"); b.Property("VknTckn") .HasColumnType("bigint"); b.Property("Website") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -3813,60 +4167,62 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.OrderItem", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("BillingCycle") .IsRequired() .HasMaxLength(32) - .HasColumnType("nvarchar(32)"); + .HasColumnType("character varying(32)") + .UseCollation("tr-x-icu"); 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("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("OrderId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("ProductId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("ProductName") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("Quantity") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("TotalPrice") .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); + .HasColumnType("numeric(18,2)"); b.HasKey("Id"); @@ -3878,56 +4234,58 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.PaymentMethod", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Commission") .HasPrecision(5, 3) - .HasColumnType("decimal(5,3)"); + .HasColumnType("numeric(5,3)"); 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("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("Logo") .HasMaxLength(32) - .HasColumnType("nvarchar(32)"); + .HasColumnType("character varying(32)") + .UseCollation("tr-x-icu"); b.Property("Name") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); b.HasIndex("Name") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Sas_H_PaymentMethod", (string)null); }); @@ -3935,75 +4293,79 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.Product", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Category") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); 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(1024) - .HasColumnType("nvarchar(1024)"); + .HasColumnType("character varying(1024)") + .UseCollation("tr-x-icu"); b.Property("ImageUrl") .HasMaxLength(512) - .HasColumnType("nvarchar(512)"); + .HasColumnType("character varying(512)") + .UseCollation("tr-x-icu"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("IsQuantityBased") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("LastModificationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("MonthlyPrice") .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); + .HasColumnType("numeric(18,2)"); b.Property("Name") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("Order") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("YearlyPrice") .HasPrecision(18, 2) - .HasColumnType("decimal(18,2)"); + .HasColumnType("numeric(18,2)"); b.HasKey("Id"); b.HasIndex("Name") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Sas_H_Product", (string)null); }); @@ -4011,60 +4373,63 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.ReportCategory", b => { b.Property("Id") - .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("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("Description") .HasMaxLength(4096) - .HasColumnType("nvarchar(max)"); + .HasColumnType("character varying(4096)") + .UseCollation("tr-x-icu"); b.Property("Icon") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); 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(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); b.HasIndex("TenantId", "Name") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Adm_T_ReportCategory", (string)null); }); @@ -4072,60 +4437,64 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.ReportTemplate", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("CategoryId") - .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("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("Description") .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); + .HasColumnType("character varying(1024)") + .UseCollation("tr-x-icu"); b.Property("HtmlContent") .IsRequired() - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); 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(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("Status") .HasMaxLength(20) - .HasColumnType("nvarchar(20)"); + .HasColumnType("character varying(20)") + .UseCollation("tr-x-icu"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -4134,7 +4503,7 @@ namespace Sozsoft.Platform.Migrations b.HasIndex("TenantId", "Name") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Adm_T_ReportTemplate", (string)null); }); @@ -4142,69 +4511,73 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.Route", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Authority") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text"); b.Property("ComponentPath") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); 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("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("Key") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("LastModificationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("Path") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("RouteType") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); b.HasIndex("Key") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.HasIndex("Path") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Sas_H_Route", (string)null); }); @@ -4212,52 +4585,53 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.Sector", b => { b.Property("Id") - .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("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); 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(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); b.HasIndex("TenantId", "Name") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Adm_T_Sector", (string)null); }); @@ -4265,63 +4639,67 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.Service", b => { b.Property("Id") - .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("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("Description") .HasMaxLength(512) - .HasColumnType("nvarchar(512)"); + .HasColumnType("character varying(512)") + .UseCollation("tr-x-icu"); b.Property("Features") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text"); b.Property("Icon") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); 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("Title") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("Type") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); b.HasIndex("Title") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Sas_H_Service", (string)null); }); @@ -4330,53 +4708,56 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); 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("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(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("SkillTypeId") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); b.HasIndex("SkillTypeId", "Name") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Sas_H_Skill", (string)null); }); @@ -4385,63 +4766,66 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); 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("IsDefault") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false); 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(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("Progress") .ValueGeneratedOnAdd() - .HasColumnType("int") + .HasColumnType("integer") .HasDefaultValue(0); b.Property("SkillTypeId") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); b.HasIndex("SkillTypeId", "Name") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Sas_H_SkillLevel", (string)null); }); @@ -4450,48 +4834,50 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); 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("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(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); b.HasIndex("Name") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Sas_H_SkillType", (string)null); }); @@ -4499,52 +4885,53 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.SocialComment", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Content") .IsRequired() .HasMaxLength(8192) - .HasColumnType("nvarchar(max)"); + .HasColumnType("character varying(8192)") + .UseCollation("tr-x-icu"); 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("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("SocialPostId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("UserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.HasKey("Id"); @@ -4556,47 +4943,47 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.SocialLike", b => { b.Property("Id") - .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("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); 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("SocialPostId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("UserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.HasKey("Id"); @@ -4608,62 +4995,65 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.SocialLocation", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Address") .HasMaxLength(512) - .HasColumnType("nvarchar(512)"); + .HasColumnType("character varying(512)") + .UseCollation("tr-x-icu"); 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("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("Lat") - .HasColumnType("float"); + .HasColumnType("double precision"); b.Property("Lng") - .HasColumnType("float"); + .HasColumnType("double precision"); b.Property("Name") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("PlaceId") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("SocialPostId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -4677,66 +5067,69 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.SocialMedia", b => { b.Property("Id") - .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("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); 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("PollEndsAt") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("PollQuestion") .HasMaxLength(512) - .HasColumnType("nvarchar(512)"); + .HasColumnType("character varying(512)") + .UseCollation("tr-x-icu"); b.Property("PollTotalVotes") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("PollUserVoteId") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("SocialPostId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("Type") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); - b.PrimitiveCollection("Urls") - .HasColumnType("nvarchar(max)"); + b.PrimitiveCollection("Urls") + .HasColumnType("text[]"); b.HasKey("Id"); @@ -4749,52 +5142,53 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.SocialPollOption", b => { b.Property("Id") - .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("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); 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("SocialMediaId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("Text") .IsRequired() .HasMaxLength(512) - .HasColumnType("nvarchar(512)"); + .HasColumnType("character varying(512)") + .UseCollation("tr-x-icu"); b.Property("Votes") - .HasColumnType("int"); + .HasColumnType("integer"); b.HasKey("Id"); @@ -4806,64 +5200,65 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.SocialPost", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Content") .IsRequired() .HasMaxLength(4096) - .HasColumnType("nvarchar(max)"); + .HasColumnType("character varying(4096)") + .UseCollation("tr-x-icu"); 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("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("IsLiked") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false); b.Property("IsOwnPost") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false); b.Property("LastModificationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("LikeCount") .ValueGeneratedOnAdd() - .HasColumnType("int") + .HasColumnType("integer") .HasDefaultValue(0); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("UserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.HasKey("Id"); @@ -4873,72 +5268,75 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.Survey", b => { b.Property("Id") - .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("Deadline") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); 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(2048) - .HasColumnType("nvarchar(2048)"); + .HasColumnType("character varying(2048)") + .UseCollation("tr-x-icu"); b.Property("IsAnonymous") - .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("Responses") .ValueGeneratedOnAdd() - .HasColumnType("int") + .HasColumnType("integer") .HasDefaultValue(0); b.Property("Status") .IsRequired() .HasMaxLength(10) - .HasColumnType("nvarchar(10)"); + .HasColumnType("character varying(10)") + .UseCollation("tr-x-icu"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("Title") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); b.HasIndex("TenantId", "Title") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Adm_T_Survey", (string)null); }); @@ -4946,57 +5344,59 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.SurveyAnswer", b => { b.Property("Id") - .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("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); 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("QuestionId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("QuestionType") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("ResponseId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("Value") .IsRequired() .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); + .HasColumnType("character varying(1024)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -5010,60 +5410,62 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.SurveyQuestion", b => { b.Property("Id") - .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("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("IsRequired") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("LastModificationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("Order") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("QuestionText") .IsRequired() .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); + .HasColumnType("character varying(1024)") + .UseCollation("tr-x-icu"); b.Property("SurveyId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("Type") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -5075,52 +5477,53 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.SurveyQuestionOption", b => { b.Property("Id") - .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("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); 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("Order") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("QuestionId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("Text") .IsRequired() .HasMaxLength(512) - .HasColumnType("nvarchar(512)"); + .HasColumnType("character varying(512)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -5132,50 +5535,50 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.SurveyResponse", b => { b.Property("Id") - .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("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); 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("SubmissionTime") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("SurveyId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("UserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.HasKey("Id"); @@ -5188,63 +5591,67 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); 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("IsActive") - .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("Name") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("Ratio") .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)"); + .HasColumnType("numeric(18,6)"); b.Property("Rounding") .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)"); + .HasColumnType("numeric(18,6)"); b.Property("Type") .IsRequired() .HasMaxLength(32) - .HasColumnType("nvarchar(32)"); + .HasColumnType("character varying(32)") + .UseCollation("tr-x-icu"); b.Property("UomCategoryId") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -5252,7 +5659,7 @@ namespace Sozsoft.Platform.Migrations b.HasIndex("Name", "UomCategoryId") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Sas_H_Uom", (string)null); }); @@ -5261,48 +5668,50 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); 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("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(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); b.HasIndex("Name") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Sas_H_UomCategory", (string)null); }); @@ -5310,95 +5719,100 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.Videoroom", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("ActualEndTime") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("ActualStartTime") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("BranchId") - .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("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("Description") .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); + .HasColumnType("character varying(1024)") + .UseCollation("tr-x-icu"); b.Property("Duration") - .HasColumnType("int"); + .HasColumnType("integer"); 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("MaxParticipants") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("Name") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("ParticipantCount") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("ScheduledEndTime") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("ScheduledStartTime") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("SettingsJson") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("Subject") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("TeacherId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("TeacherName") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); b.HasIndex("TenantId", "BranchId", "Name") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Adm_T_Videoroom", (string)null); }); @@ -5406,64 +5820,65 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.VideoroomAttandance", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("BranchId") - .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("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("JoinTime") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("LastModificationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("LeaveTime") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("SessionId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("StudentId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("StudentName") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("TotalDurationMinutes") - .HasColumnType("int"); + .HasColumnType("integer"); b.HasKey("Id"); @@ -5475,77 +5890,81 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.VideoroomChat", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("BranchId") - .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("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("IsTeacher") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("LastModificationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("Message") .IsRequired() .HasMaxLength(2048) - .HasColumnType("nvarchar(2048)"); + .HasColumnType("character varying(2048)") + .UseCollation("tr-x-icu"); b.Property("MessageType") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("RecipientId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("RecipientName") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("SenderId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("SenderName") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("SessionId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("Timestamp") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.HasKey("Id"); @@ -5557,84 +5976,86 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.VideoroomParticipant", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("BranchId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("ConnectionId") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); 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("IsActive") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(true); b.Property("IsAudioMuted") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("IsHandRaised") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("IsKicked") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false); b.Property("IsTeacher") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("IsVideoMuted") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("JoinTime") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("LastModificationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("SessionId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("UserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("UserName") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -5646,81 +6067,82 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Entities.WorkHour", b => { b.Property("Id") - .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("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("EndTime") .HasMaxLength(8) - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("Friday") - .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("Monday") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("Name") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("Saturday") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("StartTime") .HasMaxLength(8) - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("Sunday") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("Thursday") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("Tuesday") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("Wednesday") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.HasKey("Id"); b.HasIndex("TenantId", "Name") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Adm_T_WorkHour", (string)null); }); @@ -5728,92 +6150,97 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Forum.ForumCategory", b => { b.Property("Id") - .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("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("Description") .HasMaxLength(512) - .HasColumnType("nvarchar(512)"); + .HasColumnType("character varying(512)") + .UseCollation("tr-x-icu"); b.Property("DisplayOrder") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("Icon") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("IsActive") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("IsLocked") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("LastModificationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("LastPostDate") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("LastPostId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("LastPostUserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("LastPostUserName") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("Name") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("PostCount") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("Slug") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("TopicCount") - .HasColumnType("int"); + .HasColumnType("integer"); b.HasKey("Id"); b.HasIndex("Name") .IsUnique() - .HasFilter("[IsDeleted] = 0"); + .HasFilter("\"IsDeleted\" = FALSE"); b.ToTable("Sas_T_ForumCategory", (string)null); }); @@ -5821,63 +6248,65 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Forum.ForumPost", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("AuthorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("AuthorName") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("Content") .IsRequired() - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); 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("IsAcceptedAnswer") - .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("LikeCount") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("ParentPostId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("TopicId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.HasKey("Id"); @@ -5891,90 +6320,94 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Sozsoft.Platform.Forum.ForumTopic", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("AuthorId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("AuthorName") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("CategoryId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Content") .IsRequired() - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); 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("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("IsLocked") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("IsPinned") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("IsSolved") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("LastModificationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("LastPostDate") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("LastPostId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("LastPostUserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("LastPostUserName") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("LikeCount") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("ReplyCount") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Title") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("ViewCount") - .HasColumnType("int"); + .HasColumnType("integer"); b.HasKey("Id"); @@ -5987,93 +6420,102 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Code") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("CreationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("DataType") .IsRequired() .HasMaxLength(16) - .HasColumnType("nvarchar(16)"); + .HasColumnType("character varying(16)") + .UseCollation("tr-x-icu"); b.Property("DefaultValue") .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); + .HasColumnType("character varying(1024)") + .UseCollation("tr-x-icu"); b.Property("DeleterId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("DescriptionKey") .HasMaxLength(512) - .HasColumnType("nvarchar(512)"); + .HasColumnType("character varying(512)") + .UseCollation("tr-x-icu"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("IsEncrypted") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("IsInherited") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("IsVisibleToClients") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("LastModificationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("MainGroupKey") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("NameKey") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("Order") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("Providers") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("RequiredPermissionName") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("SelectOptions") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text"); b.Property("SubGroupKey") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -6084,114 +6526,129 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("ApplicationName") .HasMaxLength(96) - .HasColumnType("nvarchar(96)") - .HasColumnName("ApplicationName"); + .HasColumnType("character varying(96)") + .HasColumnName("ApplicationName") + .UseCollation("tr-x-icu"); b.Property("BrowserInfo") .HasMaxLength(512) - .HasColumnType("nvarchar(512)") - .HasColumnName("BrowserInfo"); + .HasColumnType("character varying(512)") + .HasColumnName("BrowserInfo") + .UseCollation("tr-x-icu"); b.Property("ClientId") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ClientId"); + .HasColumnType("character varying(64)") + .HasColumnName("ClientId") + .UseCollation("tr-x-icu"); b.Property("ClientIpAddress") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ClientIpAddress"); + .HasColumnType("character varying(64)") + .HasColumnName("ClientIpAddress") + .UseCollation("tr-x-icu"); b.Property("ClientName") .HasMaxLength(128) - .HasColumnType("nvarchar(128)") - .HasColumnName("ClientName"); + .HasColumnType("character varying(128)") + .HasColumnName("ClientName") + .UseCollation("tr-x-icu"); b.Property("Comments") .HasMaxLength(256) - .HasColumnType("nvarchar(256)") - .HasColumnName("Comments"); + .HasColumnType("character varying(256)") + .HasColumnName("Comments") + .UseCollation("tr-x-icu"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp") + .UseCollation("tr-x-icu"); b.Property("CorrelationId") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("CorrelationId"); + .HasColumnType("character varying(64)") + .HasColumnName("CorrelationId") + .UseCollation("tr-x-icu"); b.Property("Exceptions") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("ExecutionDuration") - .HasColumnType("int") + .HasColumnType("integer") .HasColumnName("ExecutionDuration"); b.Property("ExecutionTime") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("ExtraProperties") .IsRequired() - .HasColumnType("nvarchar(max)") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("HttpMethod") .HasMaxLength(16) - .HasColumnType("nvarchar(16)") - .HasColumnName("HttpMethod"); + .HasColumnType("character varying(16)") + .HasColumnName("HttpMethod") + .UseCollation("tr-x-icu"); b.Property("HttpStatusCode") - .HasColumnType("int") + .HasColumnType("integer") .HasColumnName("HttpStatusCode"); b.Property("ImpersonatorTenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("ImpersonatorTenantId"); b.Property("ImpersonatorTenantName") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ImpersonatorTenantName"); + .HasColumnType("character varying(64)") + .HasColumnName("ImpersonatorTenantName") + .UseCollation("tr-x-icu"); b.Property("ImpersonatorUserId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("ImpersonatorUserId"); b.Property("ImpersonatorUserName") .HasMaxLength(256) - .HasColumnType("nvarchar(256)") - .HasColumnName("ImpersonatorUserName"); + .HasColumnType("character varying(256)") + .HasColumnName("ImpersonatorUserName") + .UseCollation("tr-x-icu"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("TenantName") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("TenantName"); + .HasColumnType("character varying(64)") + .HasColumnName("TenantName") + .UseCollation("tr-x-icu"); b.Property("Url") .HasMaxLength(256) - .HasColumnType("nvarchar(256)") - .HasColumnName("Url"); + .HasColumnType("character varying(256)") + .HasColumnName("Url") + .UseCollation("tr-x-icu"); b.Property("UserId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("UserId"); b.Property("UserName") .HasMaxLength(256) - .HasColumnType("nvarchar(256)") - .HasColumnName("UserName"); + .HasColumnType("character varying(256)") + .HasColumnName("UserName") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -6206,41 +6663,44 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .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)") - .HasColumnName("MethodName"); + .HasColumnType("character varying(128)") + .HasColumnName("MethodName") + .UseCollation("tr-x-icu"); b.Property("Parameters") .HasMaxLength(2000) - .HasColumnType("nvarchar(2000)") - .HasColumnName("Parameters"); + .HasColumnType("character varying(2000)") + .HasColumnName("Parameters") + .UseCollation("tr-x-icu"); b.Property("ServiceName") .HasMaxLength(256) - .HasColumnType("nvarchar(256)") - .HasColumnName("ServiceName"); + .HasColumnType("character varying(256)") + .HasColumnName("ServiceName") + .UseCollation("tr-x-icu"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -6256,23 +6716,24 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .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("FileName") .HasMaxLength(256) - .HasColumnType("nvarchar(256)") - .HasColumnName("FileName"); + .HasColumnType("character varying(256)") + .HasColumnName("FileName") + .UseCollation("tr-x-icu"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -6284,40 +6745,42 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .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") .HasMaxLength(128) - .HasColumnType("nvarchar(128)") - .HasColumnName("EntityId"); + .HasColumnType("character varying(128)") + .HasColumnName("EntityId") + .UseCollation("tr-x-icu"); b.Property("EntityTenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("EntityTypeFullName") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)") - .HasColumnName("EntityTypeFullName"); + .HasColumnType("character varying(128)") + .HasColumnName("EntityTypeFullName") + .UseCollation("tr-x-icu"); b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -6333,35 +6796,39 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("EntityChangeId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("NewValue") .HasMaxLength(512) - .HasColumnType("nvarchar(512)") - .HasColumnName("NewValue"); + .HasColumnType("character varying(512)") + .HasColumnName("NewValue") + .UseCollation("tr-x-icu"); b.Property("OriginalValue") .HasMaxLength(512) - .HasColumnType("nvarchar(512)") - .HasColumnName("OriginalValue"); + .HasColumnType("character varying(512)") + .HasColumnName("OriginalValue") + .UseCollation("tr-x-icu"); b.Property("PropertyName") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)") - .HasColumnName("PropertyName"); + .HasColumnType("character varying(128)") + .HasColumnName("PropertyName") + .UseCollation("tr-x-icu"); b.Property("PropertyTypeFullName") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PropertyTypeFullName"); + .HasColumnType("character varying(64)") + .HasColumnName("PropertyTypeFullName") + .UseCollation("tr-x-icu"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -6375,52 +6842,56 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("ApplicationName") .HasMaxLength(96) - .HasColumnType("nvarchar(96)"); + .HasColumnType("character varying(96)") + .UseCollation("tr-x-icu"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp") + .UseCollation("tr-x-icu"); b.Property("CreationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("ExtraProperties") .IsRequired() - .HasColumnType("nvarchar(max)") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("IsAbandoned") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false); b.Property("JobArgs") .IsRequired() .HasMaxLength(1048576) - .HasColumnType("nvarchar(max)"); + .HasColumnType("character varying(1048576)") + .UseCollation("tr-x-icu"); b.Property("JobName") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("LastTryTime") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("NextTryTime") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("Priority") .ValueGeneratedOnAdd() - .HasColumnType("tinyint") + .HasColumnType("smallint") .HasDefaultValue((byte)15); b.Property("TryCount") @@ -6439,52 +6910,60 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("AllowedProviders") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("DefaultValue") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("Description") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("DisplayName") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("GroupName") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("IsAvailableToHost") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("IsVisibleToClients") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("Name") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("ParentName") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("ValueType") .HasMaxLength(2048) - .HasColumnType("nvarchar(2048)"); + .HasColumnType("character varying(2048)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -6500,21 +6979,23 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("DisplayName") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("Name") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -6528,31 +7009,34 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Name") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("ProviderKey") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("ProviderName") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("Value") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); b.HasIndex("Name", "ProviderName", "ProviderKey") - .IsUnique() - .HasFilter("[ProviderName] IS NOT NULL AND [ProviderKey] IS NOT NULL"); + .IsUnique(); b.ToTable("AbpFeatureValues", (string)null); }); @@ -6560,49 +7044,54 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp") + .UseCollation("tr-x-icu"); b.Property("CreationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("Description") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("ExtraProperties") .IsRequired() - .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)") + .UseCollation("tr-x-icu"); b.Property("Regex") .HasMaxLength(512) - .HasColumnType("nvarchar(512)"); + .HasColumnType("character varying(512)") + .UseCollation("tr-x-icu"); b.Property("RegexDescription") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("Required") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("ValueType") - .HasColumnType("int"); + .HasColumnType("integer"); b.HasKey("Id"); @@ -6612,25 +7101,24 @@ namespace Sozsoft.Platform.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); }); @@ -6638,51 +7126,54 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp") + .UseCollation("tr-x-icu"); b.Property("CreationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("EntityVersion") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("ExtraProperties") .IsRequired() - .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)") + .UseCollation("tr-x-icu"); b.Property("NormalizedName") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -6695,22 +7186,24 @@ namespace Sozsoft.Platform.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)") + .UseCollation("tr-x-icu"); b.Property("ClaimValue") .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); + .HasColumnType("character varying(1024)") + .UseCollation("tr-x-icu"); b.Property("RoleId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -6723,65 +7216,75 @@ namespace Sozsoft.Platform.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)") + .UseCollation("tr-x-icu"); b.Property("ApplicationName") .HasMaxLength(96) - .HasColumnType("nvarchar(96)"); + .HasColumnType("character varying(96)") + .UseCollation("tr-x-icu"); b.Property("BrowserInfo") .HasMaxLength(512) - .HasColumnType("nvarchar(512)"); + .HasColumnType("character varying(512)") + .UseCollation("tr-x-icu"); b.Property("ClientId") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("ClientIpAddress") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp") + .UseCollation("tr-x-icu"); b.Property("CorrelationId") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("CreationTime") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("ExtraProperties") .IsRequired() - .HasColumnType("nvarchar(max)") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("Identity") .HasMaxLength(96) - .HasColumnType("nvarchar(96)"); + .HasColumnType("character varying(96)") + .UseCollation("tr-x-icu"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("TenantName") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("UserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("UserName") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -6799,46 +7302,51 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentitySession", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("ClientId") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("Device") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("DeviceInfo") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("IpAddresses") .HasMaxLength(2048) - .HasColumnType("nvarchar(2048)"); + .HasColumnType("character varying(2048)") + .UseCollation("tr-x-icu"); b.Property("LastAccessed") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("SessionId") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("SignedIn") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("UserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.HasKey("Id"); @@ -6854,266 +7362,297 @@ namespace Sozsoft.Platform.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("BirthDate") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("BirthPlace") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("BloodType") .HasMaxLength(16) - .HasColumnType("nvarchar(16)"); + .HasColumnType("character varying(16)") + .UseCollation("tr-x-icu"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp") + .UseCollation("tr-x-icu"); 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("DepartmentId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("District") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("EducationLevel") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("Email") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)") - .HasColumnName("Email"); + .HasColumnType("character varying(256)") + .HasColumnName("Email") + .UseCollation("tr-x-icu"); b.Property("EmailConfirmed") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("EmailConfirmed"); b.Property("EntityVersion") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("ExtraProperties") .IsRequired() - .HasColumnType("nvarchar(max)") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("FamilySequenceNo") .HasMaxLength(32) - .HasColumnType("nvarchar(32)"); + .HasColumnType("character varying(32)") + .UseCollation("tr-x-icu"); b.Property("FatherName") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("GraduationSchool") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("HireDate") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("HomeAddress") .HasMaxLength(512) - .HasColumnType("nvarchar(512)"); + .HasColumnType("character varying(512)") + .UseCollation("tr-x-icu"); b.Property("IdentityNumber") .HasMaxLength(15) - .HasColumnType("nvarchar(15)"); + .HasColumnType("character varying(15)") + .UseCollation("tr-x-icu"); b.Property("IsActive") - .HasColumnType("bit") + .HasColumnType("boolean") .HasColumnName("IsActive"); 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("IsVerified") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false); b.Property("IssuedDate") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("IssuedPlace") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("JobPositionId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("LastModificationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("LastPasswordChangeTime") - .HasColumnType("datetimeoffset"); + .HasColumnType("timestamp with time zone"); b.Property("LockoutEnabled") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("LockoutEnabled"); b.Property("LockoutEnd") - .HasColumnType("datetimeoffset"); + .HasColumnType("timestamp with time zone"); b.Property("LoginEndDate") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("MaritalStatus") .HasMaxLength(32) - .HasColumnType("nvarchar(32)"); + .HasColumnType("character varying(32)") + .UseCollation("tr-x-icu"); b.Property("MarriageDate") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("MotherName") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("Name") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Name"); + .HasColumnType("character varying(64)") + .HasColumnName("Name") + .UseCollation("tr-x-icu"); b.Property("Nationality") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("NormalizedEmail") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)") - .HasColumnName("NormalizedEmail"); + .HasColumnType("character varying(256)") + .HasColumnName("NormalizedEmail") + .UseCollation("tr-x-icu"); b.Property("NormalizedUserName") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)") - .HasColumnName("NormalizedUserName"); + .HasColumnType("character varying(256)") + .HasColumnName("NormalizedUserName") + .UseCollation("tr-x-icu"); b.Property("PasswordHash") .HasMaxLength(256) - .HasColumnType("nvarchar(256)") - .HasColumnName("PasswordHash"); + .HasColumnType("character varying(256)") + .HasColumnName("PasswordHash") + .UseCollation("tr-x-icu"); b.Property("PhoneNumber") .HasMaxLength(16) - .HasColumnType("nvarchar(16)") - .HasColumnName("PhoneNumber"); + .HasColumnType("character varying(16)") + .HasColumnName("PhoneNumber") + .UseCollation("tr-x-icu"); b.Property("PhoneNumberConfirmed") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("PhoneNumberConfirmed"); b.Property("Province") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("RocketUsername") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("SecurityStamp") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)") - .HasColumnName("SecurityStamp"); + .HasColumnType("character varying(256)") + .HasColumnName("SecurityStamp") + .UseCollation("tr-x-icu"); b.Property("SequenceNo") .HasMaxLength(32) - .HasColumnType("nvarchar(32)"); + .HasColumnType("character varying(32)") + .UseCollation("tr-x-icu"); b.Property("SerialNo") .HasMaxLength(32) - .HasColumnType("nvarchar(32)"); + .HasColumnType("character varying(32)") + .UseCollation("tr-x-icu"); b.Property("ShouldChangePasswordOnNextLogin") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("SskNo") .HasMaxLength(32) - .HasColumnType("nvarchar(32)"); + .HasColumnType("character varying(32)") + .UseCollation("tr-x-icu"); b.Property("Surname") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Surname"); + .HasColumnType("character varying(64)") + .HasColumnName("Surname") + .UseCollation("tr-x-icu"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("TerminationDate") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("TwoFactorEnabled") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("TwoFactorEnabled"); b.Property("UserName") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)") - .HasColumnName("UserName"); + .HasColumnType("character varying(256)") + .HasColumnName("UserName") + .UseCollation("tr-x-icu"); b.Property("Village") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("VolumeNo") .HasMaxLength(32) - .HasColumnType("nvarchar(32)"); + .HasColumnType("character varying(32)") + .UseCollation("tr-x-icu"); b.Property("WorkHour") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -7131,23 +7670,25 @@ namespace Sozsoft.Platform.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)") + .UseCollation("tr-x-icu"); b.Property("ClaimValue") .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); + .HasColumnType("character varying(1024)") + .UseCollation("tr-x-icu"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("UserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.HasKey("Id"); @@ -7159,22 +7700,22 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUserDelegation", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("EndTime") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("SourceUserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("StartTime") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("TargetUserId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -7185,23 +7726,26 @@ namespace Sozsoft.Platform.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)") + .UseCollation("tr-x-icu"); b.Property("ProviderDisplayName") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("ProviderKey") .IsRequired() .HasMaxLength(196) - .HasColumnType("nvarchar(196)"); + .HasColumnType("character varying(196)") + .UseCollation("tr-x-icu"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("UserId", "LoginProvider"); @@ -7214,21 +7758,21 @@ namespace Sozsoft.Platform.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"); @@ -7241,13 +7785,13 @@ namespace Sozsoft.Platform.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"); @@ -7260,22 +7804,25 @@ namespace Sozsoft.Platform.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)") + .UseCollation("tr-x-icu"); b.Property("Name") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("Value") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.HasKey("UserId", "LoginProvider", "Name"); @@ -7285,70 +7832,73 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Code") .IsRequired() .HasMaxLength(95) - .HasColumnType("nvarchar(95)") - .HasColumnName("Code"); + .HasColumnType("character varying(95)") + .HasColumnName("Code") + .UseCollation("tr-x-icu"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp") + .UseCollation("tr-x-icu"); 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)") - .HasColumnName("DisplayName"); + .HasColumnType("character varying(128)") + .HasColumnName("DisplayName") + .UseCollation("tr-x-icu"); b.Property("EntityVersion") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("ExtraProperties") .IsRequired() - .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"); @@ -7363,21 +7913,21 @@ namespace Sozsoft.Platform.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"); @@ -7391,104 +7941,122 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("ApplicationType") .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + .HasColumnType("character varying(50)") + .UseCollation("tr-x-icu"); b.Property("ClientId") .HasMaxLength(100) - .HasColumnType("nvarchar(100)"); + .HasColumnType("character varying(100)") + .UseCollation("tr-x-icu"); b.Property("ClientSecret") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("ClientType") .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + .HasColumnType("character varying(50)") + .UseCollation("tr-x-icu"); b.Property("ClientUri") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp") + .UseCollation("tr-x-icu"); b.Property("ConsentType") .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + .HasColumnType("character varying(50)") + .UseCollation("tr-x-icu"); 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") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("DisplayNames") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("ExtraProperties") .IsRequired() - .HasColumnType("nvarchar(max)") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("FrontChannelLogoutUri") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("JsonWebKeySet") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("LastModificationTime") - .HasColumnType("datetime2") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("LogoUri") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("Permissions") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("PostLogoutRedirectUris") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("Properties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("RedirectUris") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("Requirements") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("Settings") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -7501,43 +8069,49 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("ApplicationId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp") + .UseCollation("tr-x-icu"); b.Property("CreationDate") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("ExtraProperties") .IsRequired() - .HasColumnType("nvarchar(max)") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("Properties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("Scopes") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("Status") .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + .HasColumnType("character varying(50)") + .UseCollation("tr-x-icu"); b.Property("Subject") .HasMaxLength(400) - .HasColumnType("nvarchar(400)"); + .HasColumnType("character varying(400)") + .UseCollation("tr-x-icu"); b.Property("Type") .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + .HasColumnType("character varying(50)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -7550,71 +8124,79 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp") + .UseCollation("tr-x-icu"); 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") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("Descriptions") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("DisplayName") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("DisplayNames") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("ExtraProperties") .IsRequired() - .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") .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); + .HasColumnType("character varying(200)") + .UseCollation("tr-x-icu"); b.Property("Properties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("Resources") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -7627,56 +8209,63 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("ApplicationId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("AuthorizationId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp") + .UseCollation("tr-x-icu"); b.Property("CreationDate") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("ExpirationDate") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("ExtraProperties") .IsRequired() - .HasColumnType("nvarchar(max)") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("Payload") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("Properties") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("RedemptionDate") - .HasColumnType("datetime2"); + .HasColumnType("timestamp with time zone"); b.Property("ReferenceId") .HasMaxLength(100) - .HasColumnType("nvarchar(100)"); + .HasColumnType("character varying(100)") + .UseCollation("tr-x-icu"); b.Property("Status") .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + .HasColumnType("character varying(50)") + .UseCollation("tr-x-icu"); b.Property("Subject") .HasMaxLength(400) - .HasColumnType("nvarchar(400)"); + .HasColumnType("character varying(400)") + .UseCollation("tr-x-icu"); b.Property("Type") .HasMaxLength(150) - .HasColumnType("nvarchar(150)"); + .HasColumnType("character varying(150)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -7693,48 +8282,55 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("DisplayName") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("GroupName") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("IsEnabled") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("MenuGroup") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("MultiTenancySide") - .HasColumnType("tinyint"); + .HasColumnType("smallint"); b.Property("Name") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("ParentName") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("Providers") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("StateCheckers") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -7750,32 +8346,34 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Name") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("ProviderKey") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("ProviderName") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("TenantId") - .HasColumnType("uniqueidentifier") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); b.HasIndex("TenantId", "Name", "ProviderName", "ProviderKey") - .IsUnique() - .HasFilter("[TenantId] IS NOT NULL"); + .IsUnique(); b.ToTable("AbpPermissionGrants", (string)null); }); @@ -7784,21 +8382,23 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("DisplayName") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("Name") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -7812,31 +8412,34 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Name") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("ProviderKey") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("ProviderName") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("Value") .IsRequired() .HasMaxLength(2048) - .HasColumnType("nvarchar(2048)"); + .HasColumnType("character varying(2048)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); b.HasIndex("Name", "ProviderName", "ProviderKey") - .IsUnique() - .HasFilter("[ProviderName] IS NOT NULL AND [ProviderKey] IS NOT NULL"); + .IsUnique(); b.ToTable("AbpSettings", (string)null); }); @@ -7845,42 +8448,47 @@ namespace Sozsoft.Platform.Migrations { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("DefaultValue") .HasMaxLength(2048) - .HasColumnType("nvarchar(2048)"); + .HasColumnType("character varying(2048)") + .UseCollation("tr-x-icu"); b.Property("Description") .HasMaxLength(512) - .HasColumnType("nvarchar(512)"); + .HasColumnType("character varying(512)") + .UseCollation("tr-x-icu"); b.Property("DisplayName") .IsRequired() .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("IsEncrypted") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("IsInherited") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("IsVisibleToClients") - .HasColumnType("bit"); + .HasColumnType("boolean"); b.Property("Name") .IsRequired() .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("Providers") .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); + .HasColumnType("character varying(1024)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -7893,138 +8501,157 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => { b.Property("Id") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Address1") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("Address2") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("City") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp") + .UseCollation("tr-x-icu"); b.Property("Country") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); 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("District") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("Email") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.Property("EntityVersion") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("ExtraProperties") .IsRequired() - .HasColumnType("nvarchar(max)") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("FaxNumber") .HasMaxLength(20) - .HasColumnType("nvarchar(20)"); + .HasColumnType("character varying(20)") + .UseCollation("tr-x-icu"); b.Property("Founder") - .HasColumnType("nvarchar(max)"); + .HasColumnType("text") + .UseCollation("tr-x-icu"); b.Property("IsActive") .ValueGeneratedOnAdd() - .HasColumnType("bit") + .HasColumnType("boolean") .HasDefaultValue(true); 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("MaxConcurrentUsers") .ValueGeneratedOnAdd() - .HasColumnType("int") + .HasColumnType("integer") .HasDefaultValue(0); b.Property("MenuGroup") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("MobileNumber") .HasMaxLength(20) - .HasColumnType("nvarchar(20)"); + .HasColumnType("character varying(20)") + .UseCollation("tr-x-icu"); b.Property("Name") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("NormalizedName") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("OrganizationName") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("PhoneNumber") .HasMaxLength(20) - .HasColumnType("nvarchar(20)"); + .HasColumnType("character varying(20)") + .UseCollation("tr-x-icu"); b.Property("PostalCode") .HasMaxLength(10) - .HasColumnType("nvarchar(10)"); + .HasColumnType("character varying(10)") + .UseCollation("tr-x-icu"); b.Property("TaxOffice") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("Township") .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasColumnType("character varying(128)") + .UseCollation("tr-x-icu"); b.Property("VknTckn") .HasColumnType("bigint"); b.Property("Website") .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasColumnType("character varying(256)") + .UseCollation("tr-x-icu"); b.HasKey("Id"); @@ -8038,16 +8665,18 @@ namespace Sozsoft.Platform.Migrations modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => { b.Property("TenantId") - .HasColumnType("uniqueidentifier"); + .HasColumnType("uuid"); b.Property("Name") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("character varying(64)") + .UseCollation("tr-x-icu"); b.Property("Value") .IsRequired() .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); + .HasColumnType("character varying(1024)") + .UseCollation("tr-x-icu"); b.HasKey("TenantId", "Name"); diff --git a/api/src/Sozsoft.Platform.EntityFrameworkCore/Seeds/TenantData.json b/api/src/Sozsoft.Platform.EntityFrameworkCore/Seeds/TenantData.json index f77fc50..d21142b 100644 --- a/api/src/Sozsoft.Platform.EntityFrameworkCore/Seeds/TenantData.json +++ b/api/src/Sozsoft.Platform.EntityFrameworkCore/Seeds/TenantData.json @@ -202,7 +202,7 @@ "Summary": "blog.posts.ai.excerpt", "CoverImage": "https://images.pexels.com/photos/8386434/pexels-photo-8386434.jpeg?auto=compress&cs=tinysrgb&w=1920", "CategoryName": "blog.categories.technology", - "Author": "system@sozsoft.com" + "Author": "SYSTEM@SOZSOFT.COM" }, { "Title": "blog.posts.web.title", @@ -213,7 +213,7 @@ "Summary": "blog.posts.web.excerpt", "CoverImage": "https://images.pexels.com/photos/11035471/pexels-photo-11035471.jpeg?auto=compress&cs=tinysrgb&w=1920", "CategoryName": "blog.categories.webdev", - "Author": "system@sozsoft.com" + "Author": "SYSTEM@SOZSOFT.COM" }, { "Title": "blog.posts.security.title", @@ -224,7 +224,7 @@ "Summary": "blog.posts.security.excerpt", "CoverImage": "https://images.pexels.com/photos/5380642/pexels-photo-5380642.jpeg?auto=compress&cs=tinysrgb&w=1920", "CategoryName": "blog.categories.security", - "Author": "system@sozsoft.com" + "Author": "SYSTEM@SOZSOFT.COM" }, { "Title": "blog.posts.mobile.title", @@ -235,7 +235,7 @@ "ReadTime": "4 dk", "CoverImage": "https://images.pexels.com/photos/13017583/pexels-photo-13017583.jpeg?auto=compress&cs=tinysrgb&w=1920", "CategoryName": "blog.categories.mobile", - "Author": "system@sozsoft.com" + "Author": "SYSTEM@SOZSOFT.COM" }, { "Title": "blog.posts.database.title", @@ -246,7 +246,7 @@ "ReadTime": "8 dk", "CoverImage": "https://images.pexels.com/photos/325229/pexels-photo-325229.jpeg?auto=compress&cs=tinysrgb&w=1920", "CategoryName": "blog.categories.database", - "Author": "system@sozsoft.com" + "Author": "SYSTEM@SOZSOFT.COM" }, { "Title": "blog.posts.digital.title", @@ -257,7 +257,7 @@ "ReadTime": "6 dk", "CoverImage": "https://images.pexels.com/photos/7681091/pexels-photo-7681091.jpeg?auto=compress&cs=tinysrgb&w=1920", "CategoryName": "blog.categories.digital", - "Author": "system@sozsoft.com" + "Author": "SYSTEM@SOZSOFT.COM" } ], "GlobalSearch": [ @@ -341,7 +341,7 @@ "PermissionsJson": [ { "ResourceType": "User", - "ResourceId": "system@sozsoft.com" + "ResourceId": "SYSTEM@SOZSOFT.COM" } ] } @@ -1298,7 +1298,7 @@ "content": "Ankara ofisimiz 1 Kasım tarihinde hizmete başlıyor! Tüm çalışanlarımızı açılış törenimize davet ediyoruz.", "excerpt": "Ankara ofisimiz 1 Kasım tarihinde hizmete başlıyor!", "category": "general", - "userName": "system@sozsoft.com", + "userName": "SYSTEM@SOZSOFT.COM", "publishDate": "12-10-2024", "isPinned": true, "viewCount": 0, @@ -1309,7 +1309,7 @@ "content": "Yıl sonu performans değerlendirmelerimiz 20 Ekim - 5 Kasım tarihleri arasında gerçekleştirilecektir. Lütfen formları zamanında doldurunuz.", "excerpt": "Yıl sonu performans değerlendirmeleri başlıyor.", "category": "event", - "userName": "system@sozsoft.com", + "userName": "SYSTEM@SOZSOFT.COM", "publishDate": "08-10-2024", "expiryDate": "05-11-2024", "isPinned": true, @@ -1320,7 +1320,7 @@ "content": "Bu Cumartesi saat 02: 00 - 06: 00 arası sistemlerimizde bakım çalışması yapılacaktır. Bu süre içinde sistemlere erişim sağlanamayacaktır.", "excerpt": "Cumartesi gecesi planlı bakım çalışması", "category": "urgent", - "userName": "system@sozsoft.com", + "userName": "SYSTEM@SOZSOFT.COM", "publishDate": "08-10-2024", "isPinned": false, "viewCount": 0 @@ -1330,7 +1330,7 @@ "content": "Yazılım Geliştirme ekibimiz için React İleri Seviye eğitimi 25-26 Ekim tarihlerinde düzenlenecektir. Katılım için IK birimine başvurunuz.", "excerpt": "React İleri Seviye eğitimi kayıtları başladı", "category": "event", - "userName": "system@sozsoft.com", + "userName": "SYSTEM@SOZSOFT.COM", "publishDate": "09-10-2024", "isPinned": false, "viewCount": 0 @@ -1340,7 +1340,7 @@ "content": "Bilgi güvenliği politikamız güncellenmiştir. Tüm çalışanlarımızın yeni politikayı okuması ve onaylaması gerekmektedir.", "excerpt": "Güvenlik politikası güncellendi - Onay gerekli", "category": "urgent", - "userName": "system@sozsoft.com", + "userName": "SYSTEM@SOZSOFT.COM", "publishDate": "04-10-2024", "isPinned": true, "viewCount": 0 @@ -1514,42 +1514,42 @@ "SocialPosts": [ { "content": "Yeni proje üzerinde çalışıyoruz! React ve TypeScript ile harika bir deneyim oluşturuyoruz. Ekip çalışması harika gidiyor! 🚀", - "userName": "system@sozsoft.com", + "userName": "SYSTEM@SOZSOFT.COM", "likeCount": 0, "isLiked": false, "isOwnPost": true }, { "content": "Bu hafta sprint planlamasını yaptık. Ekibimizle birlikte yeni özellikleri değerlendirdik. Heyecan verici bir hafta olacak!", - "userName": "system@sozsoft.com", + "userName": "SYSTEM@SOZSOFT.COM", "likeCount": 0, "isLiked": false, "isOwnPost": true }, { "content": "Yeni tasarım sistemimizin ilk prototipini hazırladık! Kullanıcı deneyimini iyileştirmek için çok çalıştık. Geri bildirimlerinizi bekliyorum! 🎨", - "userName": "system@sozsoft.com", + "userName": "SYSTEM@SOZSOFT.COM", "likeCount": 0, "isLiked": false, "isOwnPost": true }, { "content": "CI/CD pipeline güncellememiz tamamlandı! Deployment süremiz %40 azaldı. Otomasyonun gücü 💪", - "userName": "system@sozsoft.com", + "userName": "SYSTEM@SOZSOFT.COM", "likeCount": 0, "isLiked": false, "isOwnPost": true }, { "content": "Ekip üyelerimize yeni eğitim programımızı duyurmak istiyorum! 🎓 React, TypeScript ve Modern Web Geliştirme konularında kapsamlı bir program hazırladık.", - "userName": "system@sozsoft.com", + "userName": "SYSTEM@SOZSOFT.COM", "likeCount": 0, "isLiked": false, "isOwnPost": true }, { "content": "Bugün müşteri ile harika bir toplantı yaptık! Yeni projenin detaylarını konuştuk. 🎯", - "userName": "system@sozsoft.com", + "userName": "SYSTEM@SOZSOFT.COM", "likeCount": 0, "isLiked": false, "isOwnPost": true @@ -1635,53 +1635,53 @@ "SocialComments": [ { "postContent": "Yeni proje üzerinde çalışıyoruz! React ve TypeScript ile harika bir deneyim oluşturuyoruz. Ekip çalışması harika gidiyor! 🚀", - "userName": "system@sozsoft.com", + "userName": "SYSTEM@SOZSOFT.COM", "content": "Harika görünüyor! Başarılar 👏" }, { "postContent": "Yeni proje üzerinde çalışıyoruz! React ve TypeScript ile harika bir deneyim oluşturuyoruz. Ekip çalışması harika gidiyor! 🚀", - "userName": "system@sozsoft.com", + "userName": "SYSTEM@SOZSOFT.COM", "content": "TypeScript gerçekten fark yaratıyor!" }, { "postContent": "Bu hafta sprint planlamasını yaptık. Ekibimizle birlikte yeni özellikleri değerlendirdik. Heyecan verici bir hafta olacak!", - "userName": "system@sozsoft.com", + "userName": "SYSTEM@SOZSOFT.COM", "content": "Mesajlaşma özelliğine kesinlikle ihtiyacımız var!" }, { "postContent": "Yeni tasarım sistemimizin ilk prototipini hazırladık! Kullanıcı deneyimini iyileştirmek için çok çalıştık. Geri bildirimlerinizi bekliyorum! 🎨", - "userName": "system@sozsoft.com", + "userName": "SYSTEM@SOZSOFT.COM", "content": "Tasarımlar çok şık! Renk paleti özellikle güzel 😍" }, { "postContent": "Yeni tasarım sistemimizin ilk prototipini hazırladık! Kullanıcı deneyimini iyileştirmek için çok çalıştık. Geri bildirimlerinizi bekliyorum! 🎨", - "userName": "system@sozsoft.com", + "userName": "SYSTEM@SOZSOFT.COM", "content": "Dark mode opsiyonu da olacak mı?" }, { "postContent": "CI/CD pipeline güncellememiz tamamlandı! Deployment süremiz %40 azaldı. Otomasyonun gücü 💪", - "userName": "system@sozsoft.com", + "userName": "SYSTEM@SOZSOFT.COM", "content": "Harika iş! Detayları paylaşabilir misin?" }, { "postContent": "Ekip üyelerimize yeni eğitim programımızı duyurmak istiyorum! 🎓 React, TypeScript ve Modern Web Geliştirme konularında kapsamlı bir program hazırladık.", - "userName": "system@sozsoft.com", + "userName": "SYSTEM@SOZSOFT.COM", "content": "Ne zaman başlıyor?" }, { "postContent": "Ekip üyelerimize yeni eğitim programımızı duyurmak istiyorum! 🎓 React, TypeScript ve Modern Web Geliştirme konularında kapsamlı bir program hazırladık.", - "userName": "system@sozsoft.com", + "userName": "SYSTEM@SOZSOFT.COM", "content": "Gelecek hafta başlıyoruz! Kayıt linki mail ile paylaşılacak." } ], "SocialLikes": [ { "postContent": "Yeni proje üzerinde çalışıyoruz! React ve TypeScript ile harika bir deneyim oluşturuyoruz. Ekip çalışması harika gidiyor! 🚀", - "userName": "system@sozsoft.com" + "userName": "SYSTEM@SOZSOFT.COM" }, { "postContent": "Yeni tasarım sistemimizin ilk prototipini hazırladık! Kullanıcı deneyimini iyileştirmek için çok çalıştık. Geri bildirimlerinizi bekliyorum! 🎨", - "userName": "system@sozsoft.com" + "userName": "SYSTEM@SOZSOFT.COM" } ], "EventTypes": [ @@ -1862,7 +1862,7 @@ "Description": "Tüm departmanların katılımıyla düzenlenen geleneksel yaz futbol turnuvası.", "Place": "Şirket Kampüsü Spor Alanı", "Status": "published", - "UserName": "system@sozsoft.com", + "UserName": "SYSTEM@SOZSOFT.COM", "ParticipantsCount": 64, "IsPublished": true, "Likes": 0, @@ -1877,7 +1877,7 @@ "Description": "Çalışanlarımıza özel, rehber eşliğinde 2 günlük kültürel gezi.", "Place": "Kapadokya, Nevşehir", "Status": "published", - "UserName": "system@sozsoft.com", + "UserName": "SYSTEM@SOZSOFT.COM", "ParticipantsCount": 25, "IsPublished": true, "Likes": 0, @@ -1892,7 +1892,7 @@ "Description": "Caz müziğinin en güzel örneklerinin canlı performanslarla sunulacağı özel akşam.", "Place": "Şirket Konferans Salonu", "Status": "published", - "UserName": "system@sozsoft.com", + "UserName": "SYSTEM@SOZSOFT.COM", "ParticipantsCount": 40, "IsPublished": true, "Likes": 0, @@ -1903,55 +1903,55 @@ "EventComments": [ { "EventName": "Yaz Futbol Turnuvası 2025", - "UserName": "system@sozsoft.com", + "UserName": "SYSTEM@SOZSOFT.COM", "Content": "Muhteşem bir gündü! Yılın en güzel etkinliği 🎉", "Likes": 12 }, { "EventName": "Yaz Futbol Turnuvası 2025", - "UserName": "system@sozsoft.com", + "UserName": "SYSTEM@SOZSOFT.COM", "Content": "Voleybol turnuvası harikaydı, gelecek yıl yine yapalım!", "Likes": 8 }, { "EventName": "Kültür Gezisi: Kapadokya", - "UserName": "system@sozsoft.com", + "UserName": "SYSTEM@SOZSOFT.COM", "Content": "Ekibimiz 2. oldu! Çok gurur duydum herkesle 💪", "Likes": 15 }, { "EventName": "Kültür Gezisi: Kapadokya", - "UserName": "system@sozsoft.com", + "UserName": "SYSTEM@SOZSOFT.COM", "Content": "Gece boyunca kod yazmak ve pizza yemek priceless! 🍕", "Likes": 10 }, { "EventName": "Müzik Dinletisi: Jazz Akşamı", - "UserName": "system@sozsoft.com", + "UserName": "SYSTEM@SOZSOFT.COM", "Content": "İT departmanı şampiyon oldu! Gelecek sene kupayı koruyacağız 🏆", "Likes": 18 }, { "EventName": "Müzik Dinletisi: Jazz Akşamı", - "UserName": "system@sozsoft.com", + "UserName": "SYSTEM@SOZSOFT.COM", "Content": "Yılın en şık gecesi! Organizasyon mükemmeldi 👏", "Likes": 25 }, { "EventName": "Müzik Dinletisi: Jazz Akşamı", - "UserName": "system@sozsoft.com", + "UserName": "SYSTEM@SOZSOFT.COM", "Content": "Tombala hediyelerim harika, çok teşekkürler! 🎁", "Likes": 14 }, { "EventName": "Müzik Dinletisi: Jazz Akşamı", - "UserName": "system@sozsoft.com", + "UserName": "SYSTEM@SOZSOFT.COM", "Content": "Müzik grubunuz süperdi, dans pistinden ayrılamadık! 🎵", "Likes": 19 }, { "EventName": "Müzik Dinletisi: Jazz Akşamı", - "UserName": "system@sozsoft.com", + "UserName": "SYSTEM@SOZSOFT.COM", "Content": "İlk defa ebru yaptım, çok huzurlu bir deneyimdi 🎨", "Likes": 11 } diff --git a/api/src/Sozsoft.Platform.HttpApi.Host/DbStartup/SetupAppRunner.cs b/api/src/Sozsoft.Platform.HttpApi.Host/DbStartup/SetupAppRunner.cs index 8649147..391ed04 100644 --- a/api/src/Sozsoft.Platform.HttpApi.Host/DbStartup/SetupAppRunner.cs +++ b/api/src/Sozsoft.Platform.HttpApi.Host/DbStartup/SetupAppRunner.cs @@ -10,6 +10,7 @@ using Microsoft.Data.SqlClient; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; +using Npgsql; using Serilog; using static Sozsoft.Settings.SettingsConsts; @@ -38,9 +39,10 @@ internal static class SetupAppRunner if (DefaultDatabaseProvider == DatabaseProvider.SqlServer) return SqlServerIsReady(connectionString); -#pragma warning disable CS0162 - return true; // Diğer sağlayıcılar için geçici — ileride PostgreSQL desteği eklenecek -#pragma warning restore CS0162 + if (DefaultDatabaseProvider == DatabaseProvider.PostgreSql) + return PostgreSqlIsReady(connectionString); + + return false; } catch (Exception ex) { @@ -83,6 +85,46 @@ internal static class SetupAppRunner return (int)tableCheck.ExecuteScalar() > 0; } + private static bool PostgreSqlIsReady(string connectionString) + { + var csb = new NpgsqlConnectionStringBuilder(connectionString); + var dbName = csb.Database; + if (string.IsNullOrEmpty(dbName)) + return false; + + var maintenanceCsb = new NpgsqlConnectionStringBuilder(connectionString) + { + Database = "postgres", + Timeout = 8, + CommandTimeout = 8 + }; + + using var maintenanceConn = new NpgsqlConnection(maintenanceCsb.ConnectionString); + maintenanceConn.Open(); + + using var dbCheck = new NpgsqlCommand( + "SELECT COUNT(1) FROM pg_database WHERE datname = @n", + maintenanceConn); + dbCheck.Parameters.AddWithValue("n", dbName); + if (Convert.ToInt32(dbCheck.ExecuteScalar()) == 0) + return false; + + csb.Timeout = 8; + csb.CommandTimeout = 8; + using var dbConn = new NpgsqlConnection(csb.ConnectionString); + dbConn.Open(); + + using var tableCheck = new NpgsqlCommand( + """ + SELECT COUNT(1) + FROM information_schema.tables + WHERE table_schema NOT IN ('pg_catalog', 'information_schema') + AND lower(table_name) = lower('AbpRoles') + """, + dbConn); + return Convert.ToInt32(tableCheck.ExecuteScalar()) > 0; + } + // Minimal Kurulum Uygulaması public static async Task RunAsync(string[] args, IConfiguration configuration) diff --git a/api/src/Sozsoft.Platform.HttpApi.Host/PlatformHttpApiHostModule.cs b/api/src/Sozsoft.Platform.HttpApi.Host/PlatformHttpApiHostModule.cs index a410152..390a8c5 100644 --- a/api/src/Sozsoft.Platform.HttpApi.Host/PlatformHttpApiHostModule.cs +++ b/api/src/Sozsoft.Platform.HttpApi.Host/PlatformHttpApiHostModule.cs @@ -337,6 +337,12 @@ public class PlatformHttpApiHostModule : AbpModule private void ConfigureHangfire(ServiceConfigurationContext context, IConfiguration configuration) { + var connectionString = configuration.GetConnectionString(DefaultDatabaseProvider); + if (connectionString.IsNullOrWhiteSpace() || !SetupAppRunner.DatabaseIsReady(configuration)) + { + return; + } + Configure(options => { options.ServerOptions = new BackgroundJobServerOptions @@ -345,31 +351,25 @@ public class PlatformHttpApiHostModule : AbpModule }; }); - // Configure Hangfire storage based on database provider - // Note: Currently DefaultDatabaseProvider is set to SqlServer in SettingsConsts.cs - // PostgreSQL configuration is preserved for potential future use #pragma warning disable CS0162 // Unreachable code detected -#pragma warning disable CS0618 // Type or member is obsolete if (DefaultDatabaseProvider == DatabaseProvider.PostgreSql) { context.Services.AddHangfire(options => { options.UsePostgreSqlStorage( - configuration.GetConnectionString(DefaultDatabaseProvider), + storageOptions => storageOptions.UseNpgsqlConnection(connectionString), new PostgreSqlStorageOptions { PrepareSchemaIfNecessary = true - }); + }); }); } -#pragma warning restore CS0618 -#pragma warning restore CS0162 else if (DefaultDatabaseProvider == DatabaseProvider.SqlServer) { context.Services.AddHangfire(options => { options.UseSqlServerStorage( - configuration.GetConnectionString(DefaultDatabaseProvider), + connectionString, new SqlServerStorageOptions { PrepareSchemaIfNecessary = true, @@ -379,9 +379,10 @@ public class PlatformHttpApiHostModule : AbpModule QueuePollInterval = TimeSpan.Zero, UseRecommendedIsolationLevel = true, DisableGlobalLocks = true - }); + }); }); } +#pragma warning restore CS0162 } diff --git a/api/src/Sozsoft.Platform.HttpApi.Host/Program.cs b/api/src/Sozsoft.Platform.HttpApi.Host/Program.cs index 9dde959..a2dc9fe 100644 --- a/api/src/Sozsoft.Platform.HttpApi.Host/Program.cs +++ b/api/src/Sozsoft.Platform.HttpApi.Host/Program.cs @@ -19,6 +19,8 @@ public class Program { public async static Task Main(string[] args) { + ConfigurePostgreSqlCompatibility(); + var configuration = new ConfigurationBuilder() .SetBasePath(Directory.GetCurrentDirectory()) .AddJsonFile("appsettings.json") @@ -191,6 +193,14 @@ public class Program Log.CloseAndFlush(); } } + + private static void ConfigurePostgreSqlCompatibility() + { + if (DefaultDatabaseProvider == DatabaseProvider.PostgreSql) + { + AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true); + } + } } diff --git a/configs/docker/start_postgres.bat b/configs/docker/start_postgres.bat new file mode 100644 index 0000000..ebc9af9 --- /dev/null +++ b/configs/docker/start_postgres.bat @@ -0,0 +1 @@ +docker compose -f .\docker-compose-data.yml --profile postgres up -d \ No newline at end of file diff --git a/configs/docker/start.bat b/configs/docker/start_sql.bat similarity index 100% rename from configs/docker/start.bat rename to configs/docker/start_sql.bat diff --git a/configs/docker/stop_postgres.bat b/configs/docker/stop_postgres.bat new file mode 100644 index 0000000..d2b11dd --- /dev/null +++ b/configs/docker/stop_postgres.bat @@ -0,0 +1 @@ +docker compose -f .\docker-compose-data.yml --profile postgres down -v \ No newline at end of file diff --git a/configs/docker/stop_sql.bat b/configs/docker/stop_sql.bat new file mode 100644 index 0000000..4f824e9 --- /dev/null +++ b/configs/docker/stop_sql.bat @@ -0,0 +1 @@ +docker compose -f .\docker-compose-data.yml --profile sql down -v \ No newline at end of file diff --git a/ui/public/version.json b/ui/public/version.json index e2b3ab3..b69fd0c 100644 --- a/ui/public/version.json +++ b/ui/public/version.json @@ -1,6 +1,17 @@ { - "commit": "8f3932b", + "commit": "0b5eb3d", "releases": [ + { + "version": "1.1.01", + "buildDate": "2026-05-24", + "commit": "6262baa6f12d695a25d83304af985092715d439a", + "changeLog": [ + "- Workflow tanımlaması yapılabilir.", + "- Dark mod için uygulama güncellemesi", + "- Form Field kısmında düzenleme", + "- Hangfire Recurring Job düzenlemesi." + ] + }, { "version": "1.0.10", "buildDate": "2026-05-11", diff --git a/ui/src/proxy/sql-query-manager/models.ts b/ui/src/proxy/sql-query-manager/models.ts index cf76063..91d1d29 100644 --- a/ui/src/proxy/sql-query-manager/models.ts +++ b/ui/src/proxy/sql-query-manager/models.ts @@ -27,12 +27,14 @@ export interface SqlTemplateDto { export interface DatabaseTableDto { schemaName: string tableName: string + dataSourceType?: string fullName: string } export interface SqlNativeObjectDto { schemaName: string objectName: string + dataSourceType?: string fullName: string } diff --git a/ui/src/services/sql-query-manager.service.ts b/ui/src/services/sql-query-manager.service.ts index 0412a58..e05ddf4 100644 --- a/ui/src/services/sql-query-manager.service.ts +++ b/ui/src/services/sql-query-manager.service.ts @@ -39,6 +39,16 @@ export class SqlObjectManagerService { { apiName: this.apiName, ...config }, ) + getTableCreateScript = (dataSourceCode: string, schemaName: string, tableName: string, config?: Partial) => + apiService.fetchData( + { + method: 'GET', + url: '/api/app/sql-object-manager/table-create-script', + params: { dataSourceCode, schemaName, tableName }, + }, + { apiName: this.apiName, ...config }, + ) + getNativeObjectDefinition = (dataSourceCode: string, schemaName: string, objectName: string, config?: Partial) => apiService.fetchData( { diff --git a/ui/src/views/developerKit/SqlObjectExplorer.tsx b/ui/src/views/developerKit/SqlObjectExplorer.tsx index 75661b1..cd6e6bd 100644 --- a/ui/src/views/developerKit/SqlObjectExplorer.tsx +++ b/ui/src/views/developerKit/SqlObjectExplorer.tsx @@ -13,6 +13,7 @@ import { FaTrash, } from 'react-icons/fa' import type { DatabaseTableDto, SqlNativeObjectDto } from '@/proxy/sql-query-manager/models' +import { DataSourceTypeEnum } from '@/proxy/form/models' import { sqlObjectManagerService } from '@/services/sql-query-manager.service' import { useLocalization } from '@/utils/hooks/useLocalization' @@ -29,6 +30,7 @@ interface TreeNode { interface SqlObjectExplorerProps { dataSource: string | null + dataSourceType?: DataSourceTypeEnum onTemplateSelect?: (template: string, templateType: string) => void onViewDefinition?: (schemaName: string, objectName: string) => void onGenerateTableScript?: (schemaName: string, tableName: string) => void @@ -55,6 +57,7 @@ const FOLDER_META: Record = { const SqlObjectExplorer = ({ dataSource, + dataSourceType, onTemplateSelect, onViewDefinition, onGenerateTableScript, @@ -64,6 +67,7 @@ const SqlObjectExplorer = ({ refreshTrigger, }: SqlObjectExplorerProps) => { const { translate } = useLocalization() + const isPostgreSql = dataSourceType === DataSourceTypeEnum.Postgresql const [treeData, setTreeData] = useState([]) const [expandedNodes, setExpandedNodes] = useState>(new Set(['root'])) const [loading, setLoading] = useState(false) @@ -182,7 +186,13 @@ const SqlObjectExplorer = ({ if (node.folder === 'tables') { // Generate SELECT template for tables const t = node.data as DatabaseTableDto - onTemplateSelect?.(`SELECT TOP 10 *\nFROM ${t.fullName ?? `[${t.schemaName}].[${t.tableName}]`};`, 'table-select') + const fullName = t.fullName ?? (isPostgreSql ? `"${t.schemaName}"."${t.tableName}"` : `[${t.schemaName}].[${t.tableName}]`) + onTemplateSelect?.( + isPostgreSql + ? `SELECT *\nFROM ${fullName}\nLIMIT 10;` + : `SELECT TOP 10 *\nFROM ${fullName};`, + 'table-select', + ) } else { // Load native object definition into editor const obj = node.data as SqlNativeObjectDto @@ -250,14 +260,16 @@ const SqlObjectExplorer = ({ const buildDropSql = (node: TreeNode): string => { if (node.folder === 'tables') { const t = node.data as DatabaseTableDto - return `DROP TABLE ${t.fullName ?? `[${t.schemaName}].[${t.tableName}]`};` + const fullName = t.fullName ?? (isPostgreSql ? `"${t.schemaName}"."${t.tableName}"` : `[${t.schemaName}].[${t.tableName}]`) + return isPostgreSql ? `DROP TABLE IF EXISTS ${fullName};` : `DROP TABLE ${fullName};` } const obj = node.data as SqlNativeObjectDto + const fullName = obj.fullName ?? (isPostgreSql ? `"${obj.schemaName}"."${obj.objectName}"` : `[${obj.schemaName}].[${obj.objectName}]`) const keyword = node.folder === 'views' ? 'VIEW' : node.folder === 'procedures' ? 'PROCEDURE' : 'FUNCTION' - return `DROP ${keyword} ${obj.fullName ?? `[${obj.schemaName}].[${obj. objectName}]`};` + return isPostgreSql ? `DROP ${keyword} IF EXISTS ${fullName};` : `DROP ${keyword} ${fullName};` } const getSqlDataFileCandidates = (node: TreeNode): string[] => { diff --git a/ui/src/views/developerKit/SqlQueryManager.tsx b/ui/src/views/developerKit/SqlQueryManager.tsx index 4321ad8..700031c 100644 --- a/ui/src/views/developerKit/SqlQueryManager.tsx +++ b/ui/src/views/developerKit/SqlQueryManager.tsx @@ -4,6 +4,7 @@ import Container from '@/components/shared/Container' import ConfirmDialog from '@/components/shared/ConfirmDialog' import { getDataSources } from '@/services/data-source.service' import type { DataSourceDto } from '@/proxy/data-source' +import { DataSourceTypeEnum } from '@/proxy/form/models' import type { SqlQueryExecutionResultDto } from '@/proxy/sql-query-manager/models' import { sqlObjectManagerService } from '@/services/sql-query-manager.service' import { FaDatabase, FaPlay, FaFileAlt, FaCopy, FaExclamationTriangle } from 'react-icons/fa' @@ -139,9 +140,16 @@ const SqlQueryManager = () => { const escapeSqlLiteral = (value: string) => value.replace(/'/g, "''") const escapeSqlIdentifier = (value: string) => value.replace(/]/g, ']]') + const escapePgIdentifier = (value: string) => value.replace(/"/g, '""') const getSafeFullName = (schemaName: string, objectName: string) => `[${escapeSqlIdentifier(schemaName)}].[${escapeSqlIdentifier(objectName)}]` + const getSafePgFullName = (schemaName: string, objectName: string) => + `"${escapePgIdentifier(schemaName)}"."${escapePgIdentifier(objectName)}"` + const selectedDataSourceType = state.dataSources.find( + (item) => item.code === state.selectedDataSource, + )?.dataSourceType + const isPostgreSql = selectedDataSourceType === DataSourceTypeEnum.Postgresql const buildTableScriptQuery = (schemaName: string, tableName: string) => { const fullName = getSafeFullName(schemaName, tableName) @@ -231,23 +239,40 @@ SELECT const getTableCreateScript = async (schemaName: string, tableName: string): Promise => { if (!state.selectedDataSource) return '' - const result = await sqlObjectManagerService.executeQuery({ - queryText: buildTableScriptQuery(schemaName, tableName), - dataSourceCode: state.selectedDataSource, - }) + const result = await sqlObjectManagerService.getTableCreateScript( + state.selectedDataSource, + schemaName, + tableName, + ) - const firstRow = result.data?.data?.[0] - if (!firstRow) return '' - - return firstRow.Script || firstRow.script || '' + return result.data || '' } const normalizeNativeDefinitionToCreate = (definition: string) => { if (!definition?.trim()) return '' + if (isPostgreSql) return definition return definition.replace(/^\s*(?:CREATE|ALTER)\s+(?:OR\s+ALTER\s+)?/i, 'CREATE OR ALTER ') } const buildDropIfExistsScript = (obj: SqlExplorerSelectedObject) => { + if (isPostgreSql) { + const fullName = getSafePgFullName(obj.schemaName, obj.objectName) + + if (obj.objectType === 'table') { + return `DROP TABLE IF EXISTS ${fullName};` + } + + if (obj.objectType === 'view') { + return `DROP VIEW IF EXISTS ${fullName};` + } + + if (obj.objectType === 'procedure') { + return `DROP PROCEDURE IF EXISTS ${fullName};` + } + + return `DROP FUNCTION IF EXISTS ${fullName};` + } + const fullName = getSafeFullName(obj.schemaName, obj.objectName) if (obj.objectType === 'table') { @@ -266,6 +291,33 @@ SELECT } const buildObjectExistsCheckQuery = (obj: SqlExplorerSelectedObject) => { + if (isPostgreSql) { + const schema = escapeSqlLiteral(obj.schemaName) + const name = escapeSqlLiteral(obj.objectName) + + if (obj.objectType === 'table') { + return `SELECT CASE WHEN EXISTS ( + SELECT 1 FROM information_schema.tables + WHERE table_schema = '${schema}' AND table_name = '${name}' AND table_type = 'BASE TABLE' +) THEN 1 ELSE 0 END AS "ExistsFlag";` + } + + if (obj.objectType === 'view') { + return `SELECT CASE WHEN EXISTS ( + SELECT 1 FROM information_schema.views + WHERE table_schema = '${schema}' AND table_name = '${name}' +) THEN 1 ELSE 0 END AS "ExistsFlag";` + } + + const proKind = obj.objectType === 'procedure' ? 'p' : 'f' + return `SELECT CASE WHEN EXISTS ( + SELECT 1 + FROM pg_proc p + INNER JOIN pg_namespace n ON n.oid = p.pronamespace + WHERE n.nspname = '${schema}' AND p.proname = '${name}' AND p.prokind = '${proKind}' +) THEN 1 ELSE 0 END AS "ExistsFlag";` + } + const fullName = getSafeFullName(obj.schemaName, obj.objectName) const escapedFullName = escapeSqlLiteral(fullName) @@ -299,6 +351,88 @@ SELECT } const getTemplateContent = (templateType: string): string => { + if (isPostgreSql) { + const pgTemplates: Record = { + select: `-- Basic SELECT query +SELECT + "Column1", + "Column2", + "Column3" +FROM + "public"."TableName" +WHERE + "Column1" = 'value' +ORDER BY + "Column1" ASC +LIMIT 100;`, + + insert: `-- Basic INSERT query +INSERT INTO "public"."TableName" ("Column1", "Column2", "Column3") +VALUES + ('Value1', 'Value2', 'Value3');`, + + update: `-- Basic UPDATE query +UPDATE "public"."TableName" +SET + "Column1" = 'NewValue1', + "Column2" = 'NewValue2' +WHERE + "Id" = '00000000-0000-0000-0000-000000000000';`, + + delete: `-- Basic DELETE query +DELETE FROM "public"."TableName" +WHERE + "Id" = '00000000-0000-0000-0000-000000000000';`, + + 'create-procedure': `-- Create Stored Procedure +CREATE OR REPLACE PROCEDURE "public"."ProcedureName"( + "Parameter1" integer, + "Parameter2" varchar +) +LANGUAGE plpgsql +AS $$ +BEGIN + -- Add your logic here +END; +$$;`, + + 'create-view': `-- Create View +CREATE OR REPLACE VIEW "public"."ViewName" AS +SELECT + t1."Column1", + t1."Column2" +FROM "public"."TableName1" t1 +WHERE t1."IsActive" = TRUE;`, + + 'create-scalar-function': `-- Create Scalar Function +CREATE OR REPLACE FUNCTION "public"."ScalarFunctionName"( + "Parameter1" integer, + "Parameter2" varchar +) +RETURNS varchar +LANGUAGE plpgsql +AS $$ +BEGIN + RETURN "Parameter2"; +END; +$$;`, + + 'create-table-function': `-- Create Table-Valued Function +CREATE OR REPLACE FUNCTION "public"."TableFunctionName"( + "Parameter1" integer +) +RETURNS TABLE("Column1" integer, "Column2" varchar) +LANGUAGE sql +AS $$ + SELECT t."Column1", t."Column2" + FROM "public"."TableName" t + WHERE t."Id" = "Parameter1"; +$$;`, + } + + return pgTemplates[templateType] || pgTemplates.select + } + const templates: Record = { select: `-- Basic SELECT query SELECT @@ -981,6 +1115,7 @@ GO`,
= ({ post, onLike, onComment, onDelete, const [hoveredCommentAuthor, setHoveredCommentAuthor] = useState(null) const videoRef = useRef(null) const { user } = useStoreState((state) => state.auth) + const postUser = post.user ?? user ?? {} + const postComments = post.comments ?? [] + const postLikeCount = post.likeCount ?? 0 + const postUserId = postUser.id ?? '' + const postUserTenantId = postUser.tenantId ?? '' + const postUserFullName = + postUser.fullName || [postUser.name, postUser.surname].filter(Boolean).join(' ') || '-' + const postUserTitle = postUser.jobPositions?.[0]?.name || '' // Intersection Observer for video autoplay/pause useEffect(() => { @@ -177,7 +185,8 @@ const PostItem: React.FC = ({ post, onLike, onComment, onDelete, case 'poll': if (post.media.pollQuestion && post.media.pollOptions) { - const isExpired = post.media.pollEndsAt ? new Date() > post.media.pollEndsAt : false + const pollEndsAt = post.media.pollEndsAt ? new Date(post.media.pollEndsAt) : null + const isExpired = pollEndsAt ? new Date() > pollEndsAt : false const hasVoted = !!post.media.pollUserVoteId const totalVotes = post.media.pollTotalVotes || 0 const pollUserVoteId = post.media.pollUserVoteId @@ -189,13 +198,13 @@ const PostItem: React.FC = ({ post, onLike, onComment, onDelete,
{post.media.pollOptions.map((option) => { - const percentage = totalVotes > 0 ? (option.votes / totalVotes) * 100 : 0 + const percentage = totalVotes > 0 ? ((option.votes ?? 0) / totalVotes) * 100 : 0 const isSelected = pollUserVoteId === option.id return (
@@ -259,18 +268,18 @@ const PostItem: React.FC = ({ post, onLike, onComment, onDelete, onMouseEnter={() => setShowUserCard(true)} onMouseLeave={() => setShowUserCard(false)} > - + {showUserCard && ( @@ -278,9 +287,9 @@ const PostItem: React.FC = ({ post, onLike, onComment, onDelete,
-

{post.user.fullName}

+

{postUserFullName}

- {post.user.jobPositions?.[0]?.name || ''} • {dayjs(post.creationTime).fromNow()} + {postUserTitle} • {dayjs(post.creationTime).fromNow()}

@@ -313,7 +322,7 @@ const PostItem: React.FC = ({ post, onLike, onComment, onDelete, )} > {post.isLiked ? : } - {post.likeCount} + {postLikeCount} @@ -358,7 +367,7 @@ const PostItem: React.FC = ({ post, onLike, onComment, onDelete, {/* Comments List */}
- {post.comments.map((comment) => ( + {postComments.map((comment) => (
= ({ post, onLike, onComment, onDelete, {hoveredCommentAuthor === comment.id && ( @@ -387,7 +396,7 @@ const PostItem: React.FC = ({ post, onLike, onComment, onDelete,

- {comment.user.fullName} + {comment.user?.fullName || '-'}

{comment.content}

diff --git a/ui/src/views/intranet/widgets/AnnouncementModal.tsx b/ui/src/views/intranet/widgets/AnnouncementModal.tsx index 3d45c69..884a771 100644 --- a/ui/src/views/intranet/widgets/AnnouncementModal.tsx +++ b/ui/src/views/intranet/widgets/AnnouncementModal.tsx @@ -38,7 +38,14 @@ const AnnouncementModal: React.FC = ({ announcement, onC intranetService.incrementAnnouncementViewCount(announcement.id) }, [announcement.id]) + const announcementUser = announcement.user ?? {} + const announcementUserName = + announcementUser.fullName || + [announcementUser.name, announcementUser.surname].filter(Boolean).join(' ') || + '-' const images = announcement.imageUrl ? announcement.imageUrl.split('|').filter(Boolean) : [] + const attachments = Array.isArray(announcement.attachments) ? announcement.attachments : [] + const category = announcement.category || 'general' const imgSrc = (img: string) => img.startsWith('data:') || img.startsWith('http://') || img.startsWith('https://') || img.startsWith('/') @@ -79,17 +86,17 @@ const AnnouncementModal: React.FC = ({ announcement, onC
- {announcement.category === 'general' && + {category === 'general' && `📢 ${translate('::App.Platform.Intranet.AnnouncementDetailModal.Category.General')}`} - {announcement.category === 'hr' && + {category === 'hr' && `👥 ${translate('::App.Platform.Intranet.AnnouncementDetailModal.Category.HR')}`} - {announcement.category === 'it' && + {category === 'it' && `💻 ${translate('::App.Platform.Intranet.AnnouncementDetailModal.Category.IT')}`} - {announcement.category === 'event' && + {category === 'event' && `🎉 ${translate('::App.Platform.Intranet.AnnouncementDetailModal.Category.Event')}`} - {announcement.category === 'urgent' && + {category === 'urgent' && `🚨 ${translate('::App.Platform.Intranet.AnnouncementDetailModal.Category.Urgent')}`} {announcement.isPinned && ( @@ -115,11 +122,11 @@ const AnnouncementModal: React.FC = ({ announcement, onC

- {announcement.user.fullName} + {announcementUserName}

{currentLocalDate(announcement.publishDate, currentLocale || 'tr')} @@ -174,15 +181,15 @@ const AnnouncementModal: React.FC = ({ announcement, onC
{/* Attachments */} - {announcement.attachments && announcement.attachments.length > 0 && ( + {attachments.length > 0 && (

{translate('::App.Platform.Intranet.AnnouncementDetailModal.Attachments')} ( - {announcement.attachments.length}) + {attachments.length})

- {announcement.attachments.map((attachment, idx) => ( + {attachments.map((attachment, idx) => ( = ({ announcements, onAnnouncementClick }) => { - const pinnedAnnouncements = announcements.filter((a) => a.isPinned).slice(0, 3) + const safeAnnouncements = announcements ?? [] + const pinnedAnnouncements = safeAnnouncements.filter((a) => a?.isPinned).slice(0, 3) const { translate } = useLocalization() const getCategoryColor = (category: string) => { @@ -26,6 +27,15 @@ const Announcements: React.FC = ({ announcements, onAnnounce return colors[category] || colors.general } + const getUserName = (announcement: AnnouncementDto) => { + const announcementUser = announcement.user + return ( + announcementUser?.fullName || + [announcementUser?.name, announcementUser?.surname].filter(Boolean).join(' ') || + '-' + ) + } + return (
@@ -47,11 +57,11 @@ const Announcements: React.FC = ({ announcements, onAnnounce

- {announcement.title} + {announcement.title || '-'}

{announcement.category && ( {(() => { const key = `::App.Platform.Intranet.Widgets.Announcements.Category.${announcement.category.charAt(0).toUpperCase() + announcement.category.slice(1)}` @@ -62,21 +72,21 @@ const Announcements: React.FC = ({ announcements, onAnnounce )}

- {announcement.excerpt} + {announcement.excerpt || ''}

- {announcement.user.fullName} + {getUserName(announcement)} {dayjs(announcement.publishDate).fromNow()} - {announcement.viewCount} + {announcement.viewCount ?? 0}
diff --git a/ui/src/views/intranet/widgets/UpcomingEvents.tsx b/ui/src/views/intranet/widgets/UpcomingEvents.tsx index 4e0f4ad..5e28276 100644 --- a/ui/src/views/intranet/widgets/UpcomingEvents.tsx +++ b/ui/src/views/intranet/widgets/UpcomingEvents.tsx @@ -35,10 +35,16 @@ const UpcomingEvents: React.FC = ({ events, onEventClick }) const { translate } = useLocalization() const now = dayjs() - const upcomingEvents = events - .filter((event) => event.isPublished && !dayjs(event.date).isBefore(now, 'day')) + const upcomingEvents = (events ?? []) + .filter((event) => event?.isPublished && !dayjs(event.date).isBefore(now, 'day')) .sort((left, right) => dayjs(left.date).valueOf() - dayjs(right.date).valueOf()) + const getUserName = (event: EventDto) => ( + event.user?.fullName || + [event.user?.name, event.user?.surname].filter(Boolean).join(' ') || + '-' + ) + return (
@@ -72,9 +78,9 @@ const UpcomingEvents: React.FC = ({ events, onEventClick }) - {event.user.fullName} + {getUserName(event)} {dayjs(event.date).fromNow()} {event.likes > 0 && (