Database Provider hem SQL hem Postgre

This commit is contained in:
Sedat ÖZTÜRK 2025-06-10 23:34:46 +03:00
parent 394ad0f800
commit c0314af796
78 changed files with 1757 additions and 96823 deletions

View file

@ -14,4 +14,13 @@ public static class SettingsConsts
public const string DefaultType = SettingDataTypes.Text; public const string DefaultType = SettingDataTypes.Text;
public const string FormNamePrefix = "Setting_"; public const string FormNamePrefix = "Setting_";
public const string DefaultDatabaseProvider = DatabaseProvider.SqlServer;
public static class DatabaseProvider
{
public const string SqlServer = "SqlServer";
public const string PostgreSql = "PostgreSql";
}
} }

View file

@ -1,4 +1,7 @@
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Data;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.Modularity; using Volo.Abp.Modularity;
using Volo.Abp.SettingManagement.EntityFrameworkCore; using Volo.Abp.SettingManagement.EntityFrameworkCore;
@ -14,10 +17,15 @@ public class SettingsEntityFrameworkCoreModule : AbpModule
{ {
context.Services.AddAbpDbContext<SettingsDbContext>(options => context.Services.AddAbpDbContext<SettingsDbContext>(options =>
{ {
/* Add custom repositories here. Example:
* options.AddRepository<Question, EfCoreQuestionRepository>();
*/
options.AddDefaultRepositories(includeAllEntities: true); options.AddDefaultRepositories(includeAllEntities: true);
}); });
var configuration = context.Services.GetConfiguration();
var connectionString = configuration.GetConnectionString(SettingsConsts.DefaultDatabaseProvider);
Configure<AbpDbConnectionOptions>(options =>
{
options.ConnectionStrings.Default = connectionString;
});
} }
} }

View file

@ -1,9 +1,11 @@
using Kurs.Platform.EntityFrameworkCore; using Kurs.Platform.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Hosting;
using Volo.Abp.Autofac; using Volo.Abp.Autofac;
using Volo.Abp.Caching; using Volo.Abp.Caching;
using Volo.Abp.Caching.StackExchangeRedis; using Volo.Abp.Caching.StackExchangeRedis;
using Volo.Abp.Data;
using Volo.Abp.Modularity; using Volo.Abp.Modularity;
using Volo.Abp.VirtualFileSystem; using Volo.Abp.VirtualFileSystem;
@ -23,6 +25,14 @@ public class PlatformDbMigratorModule : AbpModule
ConfigureVirtualFileSystem(context, hostEnvironment); ConfigureVirtualFileSystem(context, hostEnvironment);
Configure<AbpDistributedCacheOptions>(options => { options.KeyPrefix = "Platform:"; }); Configure<AbpDistributedCacheOptions>(options => { options.KeyPrefix = "Platform:"; });
var configuration = context.Services.GetConfiguration();
var connectionString = configuration.GetConnectionString(PlatformConsts.DefaultDatabaseProvider);
Configure<AbpDbConnectionOptions>(options =>
{
options.ConnectionStrings.Default = connectionString;
});
} }
private void ConfigureVirtualFileSystem(ServiceConfigurationContext context, IHostEnvironment hostEnvironment) private void ConfigureVirtualFileSystem(ServiceConfigurationContext context, IHostEnvironment hostEnvironment)

View file

@ -1,7 +1,7 @@
{ {
"ConnectionStrings": { "ConnectionStrings": {
// "Default": "Server=sql;Database=KURS;User Id=sa;password=NvQp8s@l;Trusted_Connection=False;TrustServerCertificate=True;" "SqlServer": "Server=sql;Database=KURS;User Id=sa;password=NvQp8s@l;Trusted_Connection=False;TrustServerCertificate=True;",
"Default": "User ID=sa;Password=NvQp8s@l;Host=postgres;Port=5432;Database=KURS;" "PostgreSql": "User ID=sa;Password=NvQp8s@l;Host=postgres;Port=5432;Database=KURS;"
}, },
"Redis": { "Redis": {
"IsEnabled": "true", "IsEnabled": "true",

View file

@ -1,7 +1,7 @@
{ {
"ConnectionStrings": { "ConnectionStrings": {
// "Default": "Server=sql;Database=KURS;User Id=sa;password=NvQp8s@l;Trusted_Connection=False;TrustServerCertificate=True;" "SqlServer": "Server=sql;Database=KURS;User Id=sa;password=NvQp8s@l;Trusted_Connection=False;TrustServerCertificate=True;",
"Default": "User ID=sa;Password=NvQp8s@l;Host=postgres;Port=5432;Database=KURS;" "PostgreSql": "User ID=sa;Password=NvQp8s@l;Host=postgres;Port=5432;Database=KURS;"
}, },
"Redis": { "Redis": {
"IsEnabled": "true", "IsEnabled": "true",

View file

@ -1,8 +1,8 @@
{ {
"Seed": false, "Seed": false,
"ConnectionStrings": { "ConnectionStrings": {
// "Default": "Server=localhost;Database=KURS;User Id=sa;password=NvQp8s@l;Trusted_Connection=False;TrustServerCertificate=True;" "SqlServer": "Server=localhost;Database=KURS;User Id=sa;password=NvQp8s@l;Trusted_Connection=False;TrustServerCertificate=True;",
"Default": "User ID=sa;Password=NvQp8s@l;Host=localhost;Port=5432;Database=KURS;" "PostgreSql": "User ID=sa;Password=NvQp8s@l;Host=localhost;Port=5432;Database=KURS;"
}, },
"Redis": { "Redis": {
"IsEnabled": "true", "IsEnabled": "true",

View file

@ -16,6 +16,13 @@ public static class PlatformConsts
public const string DefaultLanguage = LanguageCodes.En; public const string DefaultLanguage = LanguageCodes.En;
public const string React = "UI"; public const string React = "UI";
public const char MultiValueDelimiter = '|'; public const char MultiValueDelimiter = '|';
public const string DefaultDatabaseProvider = DatabaseProvider.SqlServer;
public static class DatabaseProvider
{
public const string SqlServer = "SqlServer";
public const string PostgreSql = "PostgreSql";
}
public static class Prefix public static class Prefix
{ {

View file

@ -66,7 +66,7 @@ public class DatabaseMigrationEventHandler :
IPermissionGrantRepository permissionGrantRepository, IPermissionGrantRepository permissionGrantRepository,
ITenantRepository tenantRepository) ITenantRepository tenantRepository)
{ {
DatabaseName = "Default"; DatabaseName = PlatformConsts.DefaultDatabaseProvider;
CurrentTenant = currentTenant; CurrentTenant = currentTenant;
UnitOfWorkManager = unitOfWorkManager; UnitOfWorkManager = unitOfWorkManager;

View file

@ -17,12 +17,13 @@ using Volo.Abp.PermissionManagement.EntityFrameworkCore;
using Volo.Abp.TenantManagement; using Volo.Abp.TenantManagement;
using Volo.Abp.TenantManagement.EntityFrameworkCore; using Volo.Abp.TenantManagement.EntityFrameworkCore;
using Kurs.Notifications.EntityFrameworkCore; using Kurs.Notifications.EntityFrameworkCore;
using static Kurs.Platform.PlatformConsts;
namespace Kurs.Platform.EntityFrameworkCore; namespace Kurs.Platform.EntityFrameworkCore;
[ReplaceDbContext(typeof(IIdentityDbContext))] [ReplaceDbContext(typeof(IIdentityDbContext))]
[ReplaceDbContext(typeof(ITenantManagementDbContext))] [ReplaceDbContext(typeof(ITenantManagementDbContext))]
[ConnectionStringName("Default")] [ConnectionStringName(DefaultDatabaseProvider)]
public class PlatformDbContext : public class PlatformDbContext :
AbpDbContext<PlatformDbContext>, AbpDbContext<PlatformDbContext>,
IIdentityDbContext, IIdentityDbContext,
@ -78,8 +79,12 @@ public class PlatformDbContext :
protected override void ConfigureConventions(ModelConfigurationBuilder configurationBuilder) protected override void ConfigureConventions(ModelConfigurationBuilder configurationBuilder)
{ {
base.ConfigureConventions(configurationBuilder); base.ConfigureConventions(configurationBuilder);
if (DefaultDatabaseProvider == DatabaseProvider.PostgreSql)
{
configurationBuilder.Properties<string>().UseCollation("tr-x-icu"); configurationBuilder.Properties<string>().UseCollation("tr-x-icu");
} }
}
protected override void OnModelCreating(ModelBuilder builder) protected override void OnModelCreating(ModelBuilder builder)
{ {

View file

@ -12,19 +12,31 @@ public class PlatformDbContextFactory : IDesignTimeDbContextFactory<PlatformDbCo
{ {
public PlatformDbContext CreateDbContext(string[] args) public PlatformDbContext CreateDbContext(string[] args)
{ {
// AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true); //PGSQL
PlatformEfCoreEntityExtensionMappings.Configure(); PlatformEfCoreEntityExtensionMappings.Configure();
var configuration = BuildConfiguration(); var configuration = BuildConfiguration();
var builder = new DbContextOptionsBuilder<PlatformDbContext>() var builder = new DbContextOptionsBuilder<PlatformDbContext>();
.UseNpgsql(configuration.GetConnectionString("Default")); //PGSQL
// .UseSqlServer(configuration.GetConnectionString("Default")); switch (PlatformConsts.DefaultDatabaseProvider)
{
case PlatformConsts.DatabaseProvider.PostgreSql:
//AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true); // PGSQL
builder.UseNpgsql(configuration.GetConnectionString("PostgreSQL"));
break;
case PlatformConsts.DatabaseProvider.SqlServer:
builder.UseSqlServer(configuration.GetConnectionString("SqlServer"));
break;
default:
throw new InvalidOperationException("Unsupported database provider configured.");
}
return new PlatformDbContext(builder.Options); return new PlatformDbContext(builder.Options);
} }
private static IConfigurationRoot BuildConfiguration() private static IConfigurationRoot BuildConfiguration()
{ {
var builder = new ConfigurationBuilder() var builder = new ConfigurationBuilder()

View file

@ -7,7 +7,7 @@ using Volo.Abp.AuditLogging.EntityFrameworkCore;
using Volo.Abp.BackgroundJobs.EntityFrameworkCore; using Volo.Abp.BackgroundJobs.EntityFrameworkCore;
using Volo.Abp.Dapper; using Volo.Abp.Dapper;
using Volo.Abp.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore;
// using Volo.Abp.EntityFrameworkCore.SqlServer; //PGSQL using Volo.Abp.EntityFrameworkCore.SqlServer;
using Volo.Abp.EntityFrameworkCore.PostgreSql; using Volo.Abp.EntityFrameworkCore.PostgreSql;
using Volo.Abp.FeatureManagement.EntityFrameworkCore; using Volo.Abp.FeatureManagement.EntityFrameworkCore;
using Volo.Abp.Identity.EntityFrameworkCore; using Volo.Abp.Identity.EntityFrameworkCore;
@ -24,7 +24,7 @@ namespace Kurs.Platform.EntityFrameworkCore;
typeof(AbpIdentityEntityFrameworkCoreModule), typeof(AbpIdentityEntityFrameworkCoreModule),
typeof(AbpOpenIddictEntityFrameworkCoreModule), typeof(AbpOpenIddictEntityFrameworkCoreModule),
typeof(AbpPermissionManagementEntityFrameworkCoreModule), typeof(AbpPermissionManagementEntityFrameworkCoreModule),
// typeof(AbpEntityFrameworkCoreSqlServerModule), //PGSQL typeof(AbpEntityFrameworkCoreSqlServerModule),
typeof(AbpEntityFrameworkCorePostgreSqlModule), typeof(AbpEntityFrameworkCorePostgreSqlModule),
typeof(AbpBackgroundJobsEntityFrameworkCoreModule), typeof(AbpBackgroundJobsEntityFrameworkCoreModule),
typeof(AbpAuditLoggingEntityFrameworkCoreModule), typeof(AbpAuditLoggingEntityFrameworkCoreModule),
@ -53,11 +53,21 @@ public class PlatformEntityFrameworkCoreModule : AbpModule
Configure<AbpDbContextOptions>(options => Configure<AbpDbContextOptions>(options =>
{ {
/* The main point to change your DBMS. /* The main point to change your DBMS dynamically. */
* See also PlatformMigrationsDbContextFactory for EF Core tooling. */
// options.UseSqlServer();
options.UseNpgsql(); //PGSQL
});
switch (PlatformConsts.DefaultDatabaseProvider)
{
case PlatformConsts.DatabaseProvider.SqlServer:
options.UseSqlServer();
break;
case PlatformConsts.DatabaseProvider.PostgreSql:
options.UseNpgsql();
break;
default:
throw new InvalidOperationException("Unsupported database provider configured.");
}
});
} }
} }

View file

@ -38,6 +38,13 @@
<None Remove="Migrations-Sql\**" /> <None Remove="Migrations-Sql\**" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Compile Remove="Migrations-Pg\**" />
<Content Remove="Migrations-Pg\**" />
<EmbeddedResource Remove="Migrations-Pg\**" />
<None Remove="Migrations-Pg\**" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<Folder Include="Dashboard\" /> <Folder Include="Dashboard\" />
</ItemGroup> </ItemGroup>

View file

@ -1,434 +0,0 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Kurs.Platform.Migrations
{
/// <inheritdoc />
public partial class PlatformInitial : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<bool>(
name: "IsVerified",
table: "AbpUsers",
type: "bit",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<DateTime>(
name: "LoginEndDate",
table: "AbpUsers",
type: "datetime2",
nullable: true);
migrationBuilder.CreateTable(
name: "PChart",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ChartCode = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
UserId = table.Column<string>(type: "nvarchar(max)", nullable: true),
RoleId = table.Column<string>(type: "nvarchar(max)", nullable: true),
CultureName = table.Column<string>(type: "nvarchar(max)", nullable: false, defaultValue: "en"),
ConnectionString = table.Column<string>(type: "nvarchar(max)", nullable: true),
MenuCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
CommonJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
DataSourceJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
AdaptiveLayoutJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
AnimationJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
AnnotationsJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
ArgumentAxisJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
CommonAnnotationsSettingsJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
CommonAxisSettingsJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
CommonPaneSettingsJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
CommonSeriesSettingsJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
CrosshairJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
ExportJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
LegendJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
MarginJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
PanesJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
ScrollBarJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
SeriesJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
SizeJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
TitleJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
TooltipJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
ValueAxisJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
ZoomAndPanJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
PermissionJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_PChart", x => x.Id);
});
migrationBuilder.CreateTable(
name: "PIpRestriction",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ResourceType = table.Column<string>(type: "nvarchar(10)", maxLength: 10, nullable: false),
ResourceId = table.Column<string>(type: "nvarchar(32)", maxLength: 32, nullable: true),
IP = table.Column<string>(type: "nvarchar(32)", maxLength: 32, nullable: false),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_PIpRestriction", x => x.Id);
});
migrationBuilder.CreateTable(
name: "PLanguage",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CultureName = table.Column<string>(type: "nvarchar(10)", maxLength: 10, nullable: false),
UiCultureName = table.Column<string>(type: "nvarchar(10)", maxLength: 10, nullable: false),
DisplayName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
IsEnabled = table.Column<bool>(type: "bit", nullable: false),
TwoLetterISOLanguageName = table.Column<string>(type: "nvarchar(max)", nullable: true),
MultipleCultures = table.Column<string>(type: "nvarchar(max)", nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_PLanguage", x => x.Id);
});
migrationBuilder.CreateTable(
name: "PLanguageKey",
columns: table => new
{
Key = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
ResourceName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_PLanguageKey", x => new { x.ResourceName, x.Key });
});
migrationBuilder.CreateTable(
name: "PListForm",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ListFormCode = table.Column<string>(type: "nvarchar(450)", nullable: false),
CultureName = table.Column<string>(type: "nvarchar(max)", nullable: true),
ConnectionString = table.Column<string>(type: "nvarchar(max)", nullable: true),
SelectCommandType = table.Column<int>(type: "int", nullable: false),
TableName = table.Column<string>(type: "nvarchar(max)", nullable: true),
SelectCommand = table.Column<string>(type: "nvarchar(max)", nullable: true),
KeyFieldName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
KeyFieldDbSourceType = table.Column<int>(type: "int", nullable: false),
SelectFieldsDefaultValueJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
Name = table.Column<string>(type: "nvarchar(max)", nullable: true),
Description = table.Column<string>(type: "nvarchar(max)", nullable: true),
Title = table.Column<string>(type: "nvarchar(max)", nullable: true),
SortMode = table.Column<string>(type: "nvarchar(max)", nullable: true),
PageSize = table.Column<int>(type: "int", nullable: false, defaultValue: 10),
Width = table.Column<int>(type: "int", nullable: true),
Height = table.Column<int>(type: "int", nullable: true),
DefaultFilter = table.Column<string>(type: "nvarchar(max)", nullable: true),
ColumnOptionJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
FilterRowJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
HeaderFilterJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
FilterPanelJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
SearchPanelJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
GroupPanelJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
SelectionJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
PagerOptionJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
EditingOptionJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
EditingFormJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
PermissionJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
InsertFieldsDefaultValueJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
UpdateFieldsDefaultValueJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
DeleteFieldsDefaultValueJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
CommandColumnJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
StateStoringJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
DeleteCommand = table.Column<string>(type: "nvarchar(max)", nullable: true),
UpdateCommand = table.Column<string>(type: "nvarchar(max)", nullable: true),
InsertCommand = table.Column<string>(type: "nvarchar(max)", nullable: true),
UpdateServiceAddress = table.Column<string>(type: "nvarchar(max)", nullable: true),
InsertServiceAddress = table.Column<string>(type: "nvarchar(max)", nullable: true),
DeleteServiceAddress = table.Column<string>(type: "nvarchar(max)", nullable: true),
MenuCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
CustomJsSourcesJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
CustomStyleSourcesJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
FormFieldsDefaultValueJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_PListForm", x => x.Id);
table.UniqueConstraint("AK_PListForm_ListFormCode", x => x.ListFormCode);
});
migrationBuilder.CreateTable(
name: "PMenu",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Code = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
DisplayName = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
Order = table.Column<int>(type: "int", nullable: false),
Url = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
Icon = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
ParentCode = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
CssClass = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
RequiredPermissionName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
Target = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
IsDisabled = table.Column<bool>(type: "bit", nullable: false),
ElementId = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
UserId = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
RoleId = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
CultureName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_PMenu", x => x.Id);
});
migrationBuilder.CreateTable(
name: "PSettingDefinition",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Code = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
NameKey = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
DescriptionKey = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
DefaultValue = table.Column<string>(type: "nvarchar(2048)", maxLength: 2048, nullable: true),
IsVisibleToClients = table.Column<bool>(type: "bit", nullable: false),
Providers = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
IsInherited = table.Column<bool>(type: "bit", nullable: false),
IsEncrypted = table.Column<bool>(type: "bit", nullable: false),
MainGroupKey = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
SubGroupKey = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
RequiredPermissionName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
DataType = table.Column<string>(type: "nvarchar(16)", maxLength: 16, nullable: false),
SelectOptions = table.Column<string>(type: "nvarchar(max)", nullable: true),
Order = table.Column<int>(type: "int", nullable: false),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_PSettingDefinition", x => x.Id);
});
migrationBuilder.CreateTable(
name: "PLanguageText",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CultureName = table.Column<string>(type: "nvarchar(10)", maxLength: 10, nullable: false),
Key = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
Value = table.Column<string>(type: "nvarchar(250)", maxLength: 250, nullable: false),
ResourceName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_PLanguageText", x => x.Id);
table.ForeignKey(
name: "FK_PLanguageText_PLanguageKey_ResourceName_Key",
columns: x => new { x.ResourceName, x.Key },
principalTable: "PLanguageKey",
principalColumns: new[] { "ResourceName", "Key" },
onDelete: ReferentialAction.SetNull);
});
migrationBuilder.CreateTable(
name: "PListFormCustomization",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ListFormCode = table.Column<string>(type: "nvarchar(450)", nullable: false),
UserId = table.Column<string>(type: "nvarchar(max)", nullable: true),
RoleId = table.Column<string>(type: "nvarchar(max)", nullable: true),
FilterName = table.Column<string>(type: "nvarchar(max)", nullable: true),
CustomizationData = table.Column<string>(type: "nvarchar(max)", nullable: true),
CustomizationType = table.Column<int>(type: "int", nullable: false),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_PListFormCustomization", x => x.Id);
table.ForeignKey(
name: "FK_PListFormCustomization_PListForm_ListFormCode",
column: x => x.ListFormCode,
principalTable: "PListForm",
principalColumn: "ListFormCode",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "PListFormField",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ListFormCode = table.Column<string>(type: "nvarchar(450)", nullable: false),
UserId = table.Column<string>(type: "nvarchar(max)", nullable: true),
RoleId = table.Column<string>(type: "nvarchar(max)", nullable: true),
CultureName = table.Column<string>(type: "nvarchar(max)", nullable: true),
AuthorizationType = table.Column<int>(type: "int", nullable: false, defaultValue: 1),
FieldName = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
CaptionName = table.Column<string>(type: "nvarchar(max)", nullable: true),
Visible = table.Column<bool>(type: "bit", nullable: true, defaultValue: true),
IsActive = table.Column<bool>(type: "bit", nullable: true, defaultValue: true),
Width = table.Column<int>(type: "int", nullable: true, defaultValue: 100),
ListOrderNo = table.Column<int>(type: "int", nullable: true, defaultValue: 30),
SourceDbType = table.Column<int>(type: "int", nullable: false, defaultValue: 16),
SortIndex = table.Column<int>(type: "int", nullable: true),
SortDirection = table.Column<string>(type: "nvarchar(max)", nullable: true),
AllowSearch = table.Column<bool>(type: "bit", nullable: true, defaultValue: false),
BandName = table.Column<string>(type: "nvarchar(max)", nullable: true),
ColumnFilterJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
ColumnHeaderJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
GroupingJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
ColumnCustomizationJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
TotalSummaryJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
GroupSummaryJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
ColumnCssClass = table.Column<string>(type: "nvarchar(max)", nullable: true),
ColumnCssValue = table.Column<string>(type: "nvarchar(max)", nullable: true),
JoinTableJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
EditingJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
LookupJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
ValidationRuleJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
ColumnStylingJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_PListFormField", x => x.Id);
table.ForeignKey(
name: "FK_PListFormField_PListForm_ListFormCode",
column: x => x.ListFormCode,
principalTable: "PListForm",
principalColumn: "ListFormCode",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateIndex(
name: "IX_PLanguageText_ResourceName_Key",
table: "PLanguageText",
columns: new[] { "ResourceName", "Key" });
migrationBuilder.CreateIndex(
name: "IX_PListFormCustomization_ListFormCode",
table: "PListFormCustomization",
column: "ListFormCode");
migrationBuilder.CreateIndex(
name: "IX_PListFormField_ListFormCode",
table: "PListFormField",
column: "ListFormCode");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "PChart");
migrationBuilder.DropTable(
name: "PIpRestriction");
migrationBuilder.DropTable(
name: "PLanguage");
migrationBuilder.DropTable(
name: "PLanguageText");
migrationBuilder.DropTable(
name: "PListFormCustomization");
migrationBuilder.DropTable(
name: "PListFormField");
migrationBuilder.DropTable(
name: "PMenu");
migrationBuilder.DropTable(
name: "PSettingDefinition");
migrationBuilder.DropTable(
name: "PLanguageKey");
migrationBuilder.DropTable(
name: "PListForm");
migrationBuilder.DropColumn(
name: "IsVerified",
table: "AbpUsers");
migrationBuilder.DropColumn(
name: "LoginEndDate",
table: "AbpUsers");
}
}
}

View file

@ -1,28 +0,0 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Kurs.Platform.Migrations
{
/// <inheritdoc />
public partial class AddUserAvatar : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "Avatar",
table: "AbpUsers",
type: "nvarchar(max)",
nullable: true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "Avatar",
table: "AbpUsers");
}
}
}

View file

@ -1,63 +0,0 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Kurs.Platform.Migrations
{
/// <inheritdoc />
public partial class DataSourceEntity : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.RenameColumn(
name: "ConnectionString",
table: "PListForm",
newName: "DataSourceCode");
migrationBuilder.RenameColumn(
name: "ConnectionString",
table: "PChart",
newName: "DataSourceCode");
migrationBuilder.CreateTable(
name: "PDataSource",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Code = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
DataSourceType = table.Column<int>(type: "int", nullable: false),
ConnectionString = table.Column<string>(type: "nvarchar(max)", nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_PDataSource", x => x.Id);
});
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "PDataSource");
migrationBuilder.RenameColumn(
name: "DataSourceCode",
table: "PListForm",
newName: "ConnectionString");
migrationBuilder.RenameColumn(
name: "DataSourceCode",
table: "PChart",
newName: "ConnectionString");
}
}
}

View file

@ -1,38 +0,0 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Kurs.Platform.Migrations
{
/// <inheritdoc />
public partial class RemoveMenuCode : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "MenuCode",
table: "PListForm");
migrationBuilder.DropColumn(
name: "MenuCode",
table: "PChart");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "MenuCode",
table: "PListForm",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "MenuCode",
table: "PChart",
type: "nvarchar(max)",
nullable: true);
}
}
}

View file

@ -1,140 +0,0 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Kurs.Platform.Migrations
{
/// <inheritdoc />
public partial class BackgroundWorker : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "PBackgroundWorker",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Name = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
Cron = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
WorkerType = table.Column<int>(type: "int", nullable: false),
IsActive = table.Column<bool>(type: "bit", nullable: false),
BeforeSp = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
AfterSp = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
Options = table.Column<string>(type: "nvarchar(max)", nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_PBackgroundWorker", x => x.Id);
});
migrationBuilder.CreateTable(
name: "PBackgroundWorker_MailQueue",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TemplateId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
From = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
To = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
MailParameter = table.Column<string>(type: "nvarchar(max)", maxLength: 8000, nullable: true),
Table = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
TableParameter = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
Attachment = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
AttachmentParameter = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
SendStatus = table.Column<bool>(type: "bit", nullable: false),
SendTime = table.Column<DateTime>(type: "datetime", nullable: true),
AwsMessageId = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
RelatedRecordId = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_PBackgroundWorker_MailQueue", x => x.Id);
});
migrationBuilder.CreateTable(
name: "PBackgroundWorker_MailQueueEvents",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
AwsMessageId = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
EventDate = table.Column<DateTime>(type: "datetime", nullable: true),
Event = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
MailAddress = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
ResponseDescription = table.Column<string>(type: "nvarchar(max)", nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_PBackgroundWorker_MailQueueEvents", x => x.Id);
});
migrationBuilder.CreateTable(
name: "PBackgroundWorker_MailQueueTableFormat",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
TableName = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
Order = table.Column<short>(type: "smallint", nullable: false),
ColumnName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
Caption = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
HeaderCss = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
Css = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
FooterCss = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
DataType = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
DataFormat = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
IsHidden = table.Column<bool>(type: "bit", nullable: false),
IsProtected = table.Column<bool>(type: "bit", nullable: false),
SubTotal = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
Width = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_PBackgroundWorker_MailQueueTableFormat", x => x.Id);
});
migrationBuilder.CreateIndex(
name: "IX_MailQueueTableFormat",
table: "PBackgroundWorker_MailQueueTableFormat",
columns: new[] { "TableName", "Order" },
unique: true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "PBackgroundWorker");
migrationBuilder.DropTable(
name: "PBackgroundWorker_MailQueue");
migrationBuilder.DropTable(
name: "PBackgroundWorker_MailQueueEvents");
migrationBuilder.DropTable(
name: "PBackgroundWorker_MailQueueTableFormat");
}
}
}

View file

@ -1,650 +0,0 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Kurs.Platform.Migrations
{
/// <inheritdoc />
public partial class ABP_822 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.RenameColumn(
name: "Type",
table: "OpenIddictApplications",
newName: "ClientType");
migrationBuilder.AlterColumn<string>(
name: "ExtraProperties",
table: "OpenIddictTokens",
type: "nvarchar(max)",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(max)",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "ConcurrencyStamp",
table: "OpenIddictTokens",
type: "nvarchar(40)",
maxLength: 40,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(40)",
oldMaxLength: 40,
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "ExtraProperties",
table: "OpenIddictScopes",
type: "nvarchar(max)",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(max)",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "ConcurrencyStamp",
table: "OpenIddictScopes",
type: "nvarchar(40)",
maxLength: 40,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(40)",
oldMaxLength: 40,
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "ExtraProperties",
table: "OpenIddictAuthorizations",
type: "nvarchar(max)",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(max)",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "ConcurrencyStamp",
table: "OpenIddictAuthorizations",
type: "nvarchar(40)",
maxLength: 40,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(40)",
oldMaxLength: 40,
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "ExtraProperties",
table: "OpenIddictApplications",
type: "nvarchar(max)",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(max)",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "ConcurrencyStamp",
table: "OpenIddictApplications",
type: "nvarchar(40)",
maxLength: 40,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(40)",
oldMaxLength: 40,
oldNullable: true);
migrationBuilder.AddColumn<string>(
name: "ApplicationType",
table: "OpenIddictApplications",
type: "nvarchar(50)",
maxLength: 50,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "JsonWebKeySet",
table: "OpenIddictApplications",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "Settings",
table: "OpenIddictApplications",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AlterColumn<string>(
name: "ExtraProperties",
table: "AbpUsers",
type: "nvarchar(max)",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(max)",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "ConcurrencyStamp",
table: "AbpUsers",
type: "nvarchar(40)",
maxLength: 40,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(40)",
oldMaxLength: 40,
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "ExtraProperties",
table: "AbpTenants",
type: "nvarchar(max)",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(max)",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "ConcurrencyStamp",
table: "AbpTenants",
type: "nvarchar(40)",
maxLength: 40,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(40)",
oldMaxLength: 40,
oldNullable: true);
migrationBuilder.AddColumn<string>(
name: "NormalizedName",
table: "AbpTenants",
type: "nvarchar(64)",
maxLength: 64,
nullable: false,
defaultValue: "");
migrationBuilder.AlterColumn<string>(
name: "ExtraProperties",
table: "AbpSecurityLogs",
type: "nvarchar(max)",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(max)",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "ConcurrencyStamp",
table: "AbpSecurityLogs",
type: "nvarchar(40)",
maxLength: 40,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(40)",
oldMaxLength: 40,
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "ExtraProperties",
table: "AbpRoles",
type: "nvarchar(max)",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(max)",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "ConcurrencyStamp",
table: "AbpRoles",
type: "nvarchar(40)",
maxLength: 40,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(40)",
oldMaxLength: 40,
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "ExtraProperties",
table: "AbpOrganizationUnits",
type: "nvarchar(max)",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(max)",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "ConcurrencyStamp",
table: "AbpOrganizationUnits",
type: "nvarchar(40)",
maxLength: 40,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(40)",
oldMaxLength: 40,
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "EntityId",
table: "AbpEntityChanges",
type: "nvarchar(128)",
maxLength: 128,
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(128)",
oldMaxLength: 128);
migrationBuilder.AlterColumn<string>(
name: "ExtraProperties",
table: "AbpClaimTypes",
type: "nvarchar(max)",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(max)",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "ConcurrencyStamp",
table: "AbpClaimTypes",
type: "nvarchar(40)",
maxLength: 40,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(40)",
oldMaxLength: 40,
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "ExtraProperties",
table: "AbpBackgroundJobs",
type: "nvarchar(max)",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(max)",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "ConcurrencyStamp",
table: "AbpBackgroundJobs",
type: "nvarchar(40)",
maxLength: 40,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(40)",
oldMaxLength: 40,
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "ExtraProperties",
table: "AbpAuditLogs",
type: "nvarchar(max)",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(max)",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "ConcurrencyStamp",
table: "AbpAuditLogs",
type: "nvarchar(40)",
maxLength: 40,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(40)",
oldMaxLength: 40,
oldNullable: true);
migrationBuilder.CreateTable(
name: "AbpSessions",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
SessionId = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
Device = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
DeviceInfo = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
UserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ClientId = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
IpAddresses = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
SignedIn = table.Column<DateTime>(type: "datetime2", nullable: false),
LastAccessed = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_AbpSessions", x => x.Id);
});
migrationBuilder.CreateTable(
name: "AbpSettingDefinitions",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Name = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
DisplayName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
Description = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
DefaultValue = table.Column<string>(type: "nvarchar(2048)", maxLength: 2048, nullable: true),
IsVisibleToClients = table.Column<bool>(type: "bit", nullable: false),
Providers = table.Column<string>(type: "nvarchar(1024)", maxLength: 1024, nullable: true),
IsInherited = table.Column<bool>(type: "bit", nullable: false),
IsEncrypted = table.Column<bool>(type: "bit", nullable: false),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_AbpSettingDefinitions", x => x.Id);
});
migrationBuilder.CreateIndex(
name: "IX_AbpTenants_NormalizedName",
table: "AbpTenants",
column: "NormalizedName");
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);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "AbpSessions");
migrationBuilder.DropTable(
name: "AbpSettingDefinitions");
migrationBuilder.DropIndex(
name: "IX_AbpTenants_NormalizedName",
table: "AbpTenants");
migrationBuilder.DropColumn(
name: "ApplicationType",
table: "OpenIddictApplications");
migrationBuilder.DropColumn(
name: "JsonWebKeySet",
table: "OpenIddictApplications");
migrationBuilder.DropColumn(
name: "Settings",
table: "OpenIddictApplications");
migrationBuilder.DropColumn(
name: "NormalizedName",
table: "AbpTenants");
migrationBuilder.RenameColumn(
name: "ClientType",
table: "OpenIddictApplications",
newName: "Type");
migrationBuilder.AlterColumn<string>(
name: "ExtraProperties",
table: "OpenIddictTokens",
type: "nvarchar(max)",
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(max)");
migrationBuilder.AlterColumn<string>(
name: "ConcurrencyStamp",
table: "OpenIddictTokens",
type: "nvarchar(40)",
maxLength: 40,
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(40)",
oldMaxLength: 40);
migrationBuilder.AlterColumn<string>(
name: "ExtraProperties",
table: "OpenIddictScopes",
type: "nvarchar(max)",
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(max)");
migrationBuilder.AlterColumn<string>(
name: "ConcurrencyStamp",
table: "OpenIddictScopes",
type: "nvarchar(40)",
maxLength: 40,
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(40)",
oldMaxLength: 40);
migrationBuilder.AlterColumn<string>(
name: "ExtraProperties",
table: "OpenIddictAuthorizations",
type: "nvarchar(max)",
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(max)");
migrationBuilder.AlterColumn<string>(
name: "ConcurrencyStamp",
table: "OpenIddictAuthorizations",
type: "nvarchar(40)",
maxLength: 40,
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(40)",
oldMaxLength: 40);
migrationBuilder.AlterColumn<string>(
name: "ExtraProperties",
table: "OpenIddictApplications",
type: "nvarchar(max)",
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(max)");
migrationBuilder.AlterColumn<string>(
name: "ConcurrencyStamp",
table: "OpenIddictApplications",
type: "nvarchar(40)",
maxLength: 40,
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(40)",
oldMaxLength: 40);
migrationBuilder.AlterColumn<string>(
name: "ExtraProperties",
table: "AbpUsers",
type: "nvarchar(max)",
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(max)");
migrationBuilder.AlterColumn<string>(
name: "ConcurrencyStamp",
table: "AbpUsers",
type: "nvarchar(40)",
maxLength: 40,
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(40)",
oldMaxLength: 40);
migrationBuilder.AlterColumn<string>(
name: "ExtraProperties",
table: "AbpTenants",
type: "nvarchar(max)",
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(max)");
migrationBuilder.AlterColumn<string>(
name: "ConcurrencyStamp",
table: "AbpTenants",
type: "nvarchar(40)",
maxLength: 40,
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(40)",
oldMaxLength: 40);
migrationBuilder.AlterColumn<string>(
name: "ExtraProperties",
table: "AbpSecurityLogs",
type: "nvarchar(max)",
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(max)");
migrationBuilder.AlterColumn<string>(
name: "ConcurrencyStamp",
table: "AbpSecurityLogs",
type: "nvarchar(40)",
maxLength: 40,
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(40)",
oldMaxLength: 40);
migrationBuilder.AlterColumn<string>(
name: "ExtraProperties",
table: "AbpRoles",
type: "nvarchar(max)",
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(max)");
migrationBuilder.AlterColumn<string>(
name: "ConcurrencyStamp",
table: "AbpRoles",
type: "nvarchar(40)",
maxLength: 40,
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(40)",
oldMaxLength: 40);
migrationBuilder.AlterColumn<string>(
name: "ExtraProperties",
table: "AbpOrganizationUnits",
type: "nvarchar(max)",
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(max)");
migrationBuilder.AlterColumn<string>(
name: "ConcurrencyStamp",
table: "AbpOrganizationUnits",
type: "nvarchar(40)",
maxLength: 40,
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(40)",
oldMaxLength: 40);
migrationBuilder.AlterColumn<string>(
name: "EntityId",
table: "AbpEntityChanges",
type: "nvarchar(128)",
maxLength: 128,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(128)",
oldMaxLength: 128,
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "ExtraProperties",
table: "AbpClaimTypes",
type: "nvarchar(max)",
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(max)");
migrationBuilder.AlterColumn<string>(
name: "ConcurrencyStamp",
table: "AbpClaimTypes",
type: "nvarchar(40)",
maxLength: 40,
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(40)",
oldMaxLength: 40);
migrationBuilder.AlterColumn<string>(
name: "ExtraProperties",
table: "AbpBackgroundJobs",
type: "nvarchar(max)",
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(max)");
migrationBuilder.AlterColumn<string>(
name: "ConcurrencyStamp",
table: "AbpBackgroundJobs",
type: "nvarchar(40)",
maxLength: 40,
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(40)",
oldMaxLength: 40);
migrationBuilder.AlterColumn<string>(
name: "ExtraProperties",
table: "AbpAuditLogs",
type: "nvarchar(max)",
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(max)");
migrationBuilder.AlterColumn<string>(
name: "ConcurrencyStamp",
table: "AbpAuditLogs",
type: "nvarchar(40)",
maxLength: 40,
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(40)",
oldMaxLength: 40);
}
}
}

View file

@ -1,74 +0,0 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Kurs.Platform.Migrations
{
/// <inheritdoc />
public partial class Add_Notifications : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "PNotification",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
NotificationRuleId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
NotificationChannel = table.Column<string>(type: "nvarchar(10)", maxLength: 10, nullable: false),
NotificationType = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
UserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Message = table.Column<string>(type: "nvarchar(max)", nullable: false),
IsSent = table.Column<bool>(type: "bit", nullable: false),
IsRead = table.Column<bool>(type: "bit", nullable: false),
ReadTime = table.Column<DateTime>(type: "datetime2", nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_PNotification", x => x.Id);
});
migrationBuilder.CreateTable(
name: "PNotificationRule",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
NotificationType = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
UserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
RoleId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Channel = table.Column<string>(type: "nvarchar(10)", maxLength: 10, nullable: false),
IsActive = table.Column<bool>(type: "bit", nullable: false),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_PNotificationRule", x => x.Id);
});
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "PNotification");
migrationBuilder.DropTable(
name: "PNotificationRule");
}
}
}

View file

@ -1,28 +0,0 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Kurs.Platform.Migrations
{
/// <inheritdoc />
public partial class RocketUsername : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "RocketUsername",
table: "AbpUsers",
type: "nvarchar(max)",
nullable: true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "RocketUsername",
table: "AbpUsers");
}
}
}

View file

@ -1,77 +0,0 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Kurs.Platform.Migrations
{
/// <inheritdoc />
public partial class NotificationRule_Customize : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "UserId",
table: "PNotificationRule",
type: "nvarchar(max)",
nullable: true,
oldClrType: typeof(Guid),
oldType: "uniqueidentifier",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "RoleId",
table: "PNotificationRule",
type: "nvarchar(max)",
nullable: true,
oldClrType: typeof(Guid),
oldType: "uniqueidentifier",
oldNullable: true);
migrationBuilder.AddColumn<bool>(
name: "IsCustomized",
table: "PNotificationRule",
type: "bit",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "IsFixed",
table: "PNotificationRule",
type: "bit",
nullable: false,
defaultValue: false);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "IsCustomized",
table: "PNotificationRule");
migrationBuilder.DropColumn(
name: "IsFixed",
table: "PNotificationRule");
migrationBuilder.AlterColumn<Guid>(
name: "UserId",
table: "PNotificationRule",
type: "uniqueidentifier",
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(max)",
oldNullable: true);
migrationBuilder.AlterColumn<Guid>(
name: "RoleId",
table: "PNotificationRule",
type: "uniqueidentifier",
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(max)",
oldNullable: true);
}
}
}

View file

@ -1,28 +0,0 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Kurs.Platform.Migrations
{
/// <inheritdoc />
public partial class RemoveAvatar : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "Avatar",
table: "AbpUsers");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "Avatar",
table: "AbpUsers",
type: "nvarchar(max)",
nullable: true);
}
}
}

View file

@ -1,40 +0,0 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Kurs.Platform.Migrations
{
/// <inheritdoc />
public partial class IsTenant : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<bool>(
name: "IsTenant",
table: "PListForm",
type: "bit",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "IsTenant",
table: "PChart",
type: "bit",
nullable: false,
defaultValue: false);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "IsTenant",
table: "PListForm");
migrationBuilder.DropColumn(
name: "IsTenant",
table: "PChart");
}
}
}

View file

@ -1,40 +0,0 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Kurs.Platform.Migrations
{
/// <inheritdoc />
public partial class IsOrganizationUnit : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<bool>(
name: "IsOrganizationUnit",
table: "PListForm",
type: "bit",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "IsOrganizationUnit",
table: "PChart",
type: "bit",
nullable: false,
defaultValue: false);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "IsOrganizationUnit",
table: "PListForm");
migrationBuilder.DropColumn(
name: "IsOrganizationUnit",
table: "PChart");
}
}
}

View file

@ -1,49 +0,0 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Kurs.Platform.Migrations
{
/// <inheritdoc />
public partial class SubForms : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<bool>(
name: "IsSubForm",
table: "PListForm",
type: "bit",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<string>(
name: "ListFormType",
table: "PListForm",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "SubFormsJson",
table: "PListForm",
type: "nvarchar(max)",
nullable: true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "IsSubForm",
table: "PListForm");
migrationBuilder.DropColumn(
name: "ListFormType",
table: "PListForm");
migrationBuilder.DropColumn(
name: "SubFormsJson",
table: "PListForm");
}
}
}

View file

@ -1,39 +0,0 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Kurs.Platform.Migrations
{
/// <inheritdoc />
public partial class ListFormField_Permission : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "AuthorizationType",
table: "PListFormField");
migrationBuilder.AddColumn<string>(
name: "PermissionJson",
table: "PListFormField",
type: "nvarchar(max)",
nullable: true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "PermissionJson",
table: "PListFormField");
migrationBuilder.AddColumn<int>(
name: "AuthorizationType",
table: "PListFormField",
type: "int",
nullable: false,
defaultValue: 1);
}
}
}

View file

@ -1,28 +0,0 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Kurs.Platform.Migrations
{
/// <inheritdoc />
public partial class ListFormField_PivotSettings : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "PivotSettingsJson",
table: "PListFormField",
type: "nvarchar(max)",
nullable: true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "PivotSettingsJson",
table: "PListFormField");
}
}
}

View file

@ -1,48 +0,0 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Kurs.Platform.Migrations
{
/// <inheritdoc />
public partial class ListFormField_FormatveAligment : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "Alignment",
table: "PListFormField",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "EditorOptions",
table: "PListFormField",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "Format",
table: "PListFormField",
type: "nvarchar(max)",
nullable: true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "Alignment",
table: "PListFormField");
migrationBuilder.DropColumn(
name: "EditorOptions",
table: "PListFormField");
migrationBuilder.DropColumn(
name: "Format",
table: "PListFormField");
}
}
}

View file

@ -1,29 +0,0 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Kurs.Platform.Migrations
{
/// <inheritdoc />
public partial class IpRestriction_TenantId : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<Guid>(
name: "TenantId",
table: "PIpRestriction",
type: "uniqueidentifier",
nullable: true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "TenantId",
table: "PIpRestriction");
}
}
}

View file

@ -1,49 +0,0 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Kurs.Platform.Migrations
{
/// <inheritdoc />
public partial class PublicApi : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "PPublicApi",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Name = table.Column<string>(type: "nvarchar(max)", nullable: true),
Description = table.Column<string>(type: "nvarchar(max)", nullable: true),
Url = table.Column<string>(type: "nvarchar(max)", nullable: true),
Method = table.Column<string>(type: "nvarchar(max)", nullable: true),
DataSourceCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
Sql = table.Column<string>(type: "nvarchar(max)", nullable: true),
ParametersJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
PermissionsJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_PPublicApi", x => x.Id);
});
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "PPublicApi");
}
}
}

View file

@ -1,79 +0,0 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Kurs.Platform.Migrations
{
/// <inheritdoc />
public partial class Notification : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "RoleId",
table: "PNotificationRule");
migrationBuilder.RenameColumn(
name: "UserId",
table: "PNotificationRule",
newName: "RecipientId");
migrationBuilder.AddColumn<string>(
name: "RecipientType",
table: "PNotificationRule",
type: "nvarchar(max)",
nullable: false,
defaultValue: "");
migrationBuilder.AlterColumn<Guid>(
name: "UserId",
table: "PNotification",
type: "uniqueidentifier",
nullable: true,
oldClrType: typeof(Guid),
oldType: "uniqueidentifier");
migrationBuilder.AddColumn<string>(
name: "Identifier",
table: "PNotification",
type: "nvarchar(max)",
nullable: false,
defaultValue: "");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "RecipientType",
table: "PNotificationRule");
migrationBuilder.DropColumn(
name: "Identifier",
table: "PNotification");
migrationBuilder.RenameColumn(
name: "RecipientId",
table: "PNotificationRule",
newName: "UserId");
migrationBuilder.AddColumn<string>(
name: "RoleId",
table: "PNotificationRule",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AlterColumn<Guid>(
name: "UserId",
table: "PNotification",
type: "uniqueidentifier",
nullable: false,
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
oldClrType: typeof(Guid),
oldType: "uniqueidentifier",
oldNullable: true);
}
}
}

View file

@ -1,195 +0,0 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Kurs.Platform.Migrations
{
/// <inheritdoc />
public partial class Abp902 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "CreationTime",
table: "OpenIddictTokens");
migrationBuilder.DropColumn(
name: "CreatorId",
table: "OpenIddictTokens");
migrationBuilder.DropColumn(
name: "DeleterId",
table: "OpenIddictTokens");
migrationBuilder.DropColumn(
name: "DeletionTime",
table: "OpenIddictTokens");
migrationBuilder.DropColumn(
name: "IsDeleted",
table: "OpenIddictTokens");
migrationBuilder.DropColumn(
name: "LastModificationTime",
table: "OpenIddictTokens");
migrationBuilder.DropColumn(
name: "LastModifierId",
table: "OpenIddictTokens");
migrationBuilder.DropColumn(
name: "CreationTime",
table: "OpenIddictAuthorizations");
migrationBuilder.DropColumn(
name: "CreatorId",
table: "OpenIddictAuthorizations");
migrationBuilder.DropColumn(
name: "DeleterId",
table: "OpenIddictAuthorizations");
migrationBuilder.DropColumn(
name: "DeletionTime",
table: "OpenIddictAuthorizations");
migrationBuilder.DropColumn(
name: "IsDeleted",
table: "OpenIddictAuthorizations");
migrationBuilder.DropColumn(
name: "LastModificationTime",
table: "OpenIddictAuthorizations");
migrationBuilder.DropColumn(
name: "LastModifierId",
table: "OpenIddictAuthorizations");
migrationBuilder.AlterColumn<string>(
name: "IpAddresses",
table: "AbpSessions",
type: "nvarchar(2048)",
maxLength: 2048,
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(256)",
oldMaxLength: 256,
oldNullable: true);
migrationBuilder.AddColumn<string>(
name: "ExtraProperties",
table: "AbpSessions",
type: "nvarchar(max)",
nullable: true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "ExtraProperties",
table: "AbpSessions");
migrationBuilder.AddColumn<DateTime>(
name: "CreationTime",
table: "OpenIddictTokens",
type: "datetime2",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
migrationBuilder.AddColumn<Guid>(
name: "CreatorId",
table: "OpenIddictTokens",
type: "uniqueidentifier",
nullable: true);
migrationBuilder.AddColumn<Guid>(
name: "DeleterId",
table: "OpenIddictTokens",
type: "uniqueidentifier",
nullable: true);
migrationBuilder.AddColumn<DateTime>(
name: "DeletionTime",
table: "OpenIddictTokens",
type: "datetime2",
nullable: true);
migrationBuilder.AddColumn<bool>(
name: "IsDeleted",
table: "OpenIddictTokens",
type: "bit",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<DateTime>(
name: "LastModificationTime",
table: "OpenIddictTokens",
type: "datetime2",
nullable: true);
migrationBuilder.AddColumn<Guid>(
name: "LastModifierId",
table: "OpenIddictTokens",
type: "uniqueidentifier",
nullable: true);
migrationBuilder.AddColumn<DateTime>(
name: "CreationTime",
table: "OpenIddictAuthorizations",
type: "datetime2",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
migrationBuilder.AddColumn<Guid>(
name: "CreatorId",
table: "OpenIddictAuthorizations",
type: "uniqueidentifier",
nullable: true);
migrationBuilder.AddColumn<Guid>(
name: "DeleterId",
table: "OpenIddictAuthorizations",
type: "uniqueidentifier",
nullable: true);
migrationBuilder.AddColumn<DateTime>(
name: "DeletionTime",
table: "OpenIddictAuthorizations",
type: "datetime2",
nullable: true);
migrationBuilder.AddColumn<bool>(
name: "IsDeleted",
table: "OpenIddictAuthorizations",
type: "bit",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<DateTime>(
name: "LastModificationTime",
table: "OpenIddictAuthorizations",
type: "datetime2",
nullable: true);
migrationBuilder.AddColumn<Guid>(
name: "LastModifierId",
table: "OpenIddictAuthorizations",
type: "uniqueidentifier",
nullable: true);
migrationBuilder.AlterColumn<string>(
name: "IpAddresses",
table: "AbpSessions",
type: "nvarchar(256)",
maxLength: 256,
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(2048)",
oldMaxLength: 2048,
oldNullable: true);
}
}
}

View file

@ -1,40 +0,0 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Kurs.Platform.Migrations
{
/// <inheritdoc />
public partial class GlobalSearch : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "PGlobalSearch",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
System = table.Column<string>(type: "nvarchar(max)", nullable: true),
Group = table.Column<string>(type: "nvarchar(max)", nullable: true),
Term = table.Column<string>(type: "nvarchar(max)", nullable: true),
Weight = table.Column<string>(type: "nvarchar(max)", nullable: true),
Url = table.Column<string>(type: "nvarchar(max)", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_PGlobalSearch", x => x.Id);
});
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "PGlobalSearch");
}
}
}

View file

@ -1,102 +0,0 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Kurs.Platform.Migrations
{
/// <inheritdoc />
public partial class BackgroundWorker_DataSourceCode : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "System",
table: "PGlobalSearch",
type: "character varying(50)",
maxLength: 50,
nullable: true,
collation: "tr-x-icu",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true,
oldCollation: "tr-x-icu");
migrationBuilder.AlterColumn<string>(
name: "Group",
table: "PGlobalSearch",
type: "character varying(50)",
maxLength: 50,
nullable: true,
collation: "tr-x-icu",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true,
oldCollation: "tr-x-icu");
migrationBuilder.AlterColumn<string>(
name: "ConnectionString",
table: "PDataSource",
type: "character varying(200)",
maxLength: 200,
nullable: true,
collation: "tr-x-icu",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true,
oldCollation: "tr-x-icu");
migrationBuilder.AddColumn<string>(
name: "DataSourceCode",
table: "PBackgroundWorker",
type: "character varying(50)",
maxLength: 50,
nullable: true,
collation: "tr-x-icu");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "DataSourceCode",
table: "PBackgroundWorker");
migrationBuilder.AlterColumn<string>(
name: "System",
table: "PGlobalSearch",
type: "text",
nullable: true,
collation: "tr-x-icu",
oldClrType: typeof(string),
oldType: "character varying(50)",
oldMaxLength: 50,
oldNullable: true,
oldCollation: "tr-x-icu");
migrationBuilder.AlterColumn<string>(
name: "Group",
table: "PGlobalSearch",
type: "text",
nullable: true,
collation: "tr-x-icu",
oldClrType: typeof(string),
oldType: "character varying(50)",
oldMaxLength: 50,
oldNullable: true,
oldCollation: "tr-x-icu");
migrationBuilder.AlterColumn<string>(
name: "ConnectionString",
table: "PDataSource",
type: "text",
nullable: true,
collation: "tr-x-icu",
oldClrType: typeof(string),
oldType: "character varying(200)",
oldMaxLength: 200,
oldNullable: true,
oldCollation: "tr-x-icu");
}
}
}

View file

@ -1,34 +0,0 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Kurs.Platform.Migrations
{
/// <inheritdoc />
public partial class AiAgent : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "PAiBot",
columns: table => new
{
Id = table.Column<Guid>(type: "uuid", nullable: false),
BotName = table.Column<string>(type: "text", nullable: true, collation: "tr-x-icu")
},
constraints: table =>
{
table.PrimaryKey("PK_PAiBot", x => x.Id);
});
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "PAiBot");
}
}
}

View file

@ -1,42 +0,0 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Kurs.Platform.Migrations
{
/// <inheritdoc />
public partial class UpdateLanguageTextValueLength : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "Value",
table: "PLanguageText",
type: "character varying(1000)",
maxLength: 1000,
nullable: false,
collation: "tr-x-icu",
oldClrType: typeof(string),
oldType: "character varying(250)",
oldMaxLength: 250,
oldCollation: "tr-x-icu");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "Value",
table: "PLanguageText",
type: "character varying(250)",
maxLength: 250,
nullable: false,
collation: "tr-x-icu",
oldClrType: typeof(string),
oldType: "character varying(1000)",
oldMaxLength: 1000,
oldCollation: "tr-x-icu");
}
}
}

View file

@ -1,29 +0,0 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Kurs.Platform.Migrations
{
/// <inheritdoc />
public partial class TenantIsActive : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<bool>(
name: "IsActive",
table: "AbpTenants",
type: "boolean",
nullable: false,
defaultValue: false);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "IsActive",
table: "AbpTenants");
}
}
}

View file

@ -13,8 +13,8 @@ using Volo.Abp.EntityFrameworkCore;
namespace Kurs.Platform.Migrations namespace Kurs.Platform.Migrations
{ {
[DbContext(typeof(PlatformDbContext))] [DbContext(typeof(PlatformDbContext))]
[Migration("20241231094924_GlobalSearch")] [Migration("20250610202727_Initial")]
partial class GlobalSearch partial class Initial
{ {
/// <inheritdoc /> /// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder) protected override void BuildTargetModel(ModelBuilder modelBuilder)
@ -191,8 +191,8 @@ namespace Kurs.Platform.Migrations
b.Property<string>("Value") b.Property<string>("Value")
.IsRequired() .IsRequired()
.HasMaxLength(250) .HasMaxLength(1000)
.HasColumnType("nvarchar(250)"); .HasColumnType("nvarchar(1000)");
b.HasKey("Id"); b.HasKey("Id");
@ -266,7 +266,7 @@ namespace Kurs.Platform.Migrations
.HasColumnType("bit"); .HasColumnType("bit");
b.Property<DateTime?>("SendTime") b.Property<DateTime?>("SendTime")
.HasColumnType("datetime"); .HasColumnType("datetime2");
b.Property<string>("Table") b.Property<string>("Table")
.HasMaxLength(100) .HasMaxLength(100)
@ -321,7 +321,7 @@ namespace Kurs.Platform.Migrations
.HasColumnType("nvarchar(20)"); .HasColumnType("nvarchar(20)");
b.Property<DateTime?>("EventDate") b.Property<DateTime?>("EventDate")
.HasColumnType("datetime"); .HasColumnType("datetime2");
b.Property<bool>("IsDeleted") b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -555,6 +555,19 @@ namespace Kurs.Platform.Migrations
b.ToTable("PNotificationRule", (string)null); b.ToTable("PNotificationRule", (string)null);
}); });
modelBuilder.Entity("Kurs.Platform.Entities.AiBot", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<string>("BotName")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("PAiBot", (string)null);
});
modelBuilder.Entity("Kurs.Platform.Entities.BackgroundWorker", b => modelBuilder.Entity("Kurs.Platform.Entities.BackgroundWorker", b =>
{ {
b.Property<Guid>("Id") b.Property<Guid>("Id")
@ -581,6 +594,10 @@ namespace Kurs.Platform.Migrations
.HasMaxLength(50) .HasMaxLength(50)
.HasColumnType("nvarchar(50)"); .HasColumnType("nvarchar(50)");
b.Property<string>("DataSourceCode")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<Guid?>("DeleterId") b.Property<Guid?>("DeleterId")
.HasColumnType("uniqueidentifier") .HasColumnType("uniqueidentifier")
.HasColumnName("DeleterId"); .HasColumnName("DeleterId");
@ -768,7 +785,8 @@ namespace Kurs.Platform.Migrations
.HasColumnType("nvarchar(100)"); .HasColumnType("nvarchar(100)");
b.Property<string>("ConnectionString") b.Property<string>("ConnectionString")
.HasColumnType("nvarchar(max)"); .HasMaxLength(200)
.HasColumnType("nvarchar(200)");
b.Property<DateTime>("CreationTime") b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2") .HasColumnType("datetime2")
@ -817,10 +835,12 @@ namespace Kurs.Platform.Migrations
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id")); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<string>("Group") b.Property<string>("Group")
.HasColumnType("nvarchar(max)"); .HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<string>("System") b.Property<string>("System")
.HasColumnType("nvarchar(max)"); .HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<Guid?>("TenantId") b.Property<Guid?>("TenantId")
.HasColumnType("uniqueidentifier") .HasColumnType("uniqueidentifier")
@ -3259,6 +3279,11 @@ namespace Kurs.Platform.Migrations
.HasColumnType("nvarchar(max)") .HasColumnType("nvarchar(max)")
.HasColumnName("ExtraProperties"); .HasColumnName("ExtraProperties");
b.Property<bool>("IsActive")
.ValueGeneratedOnAdd()
.HasColumnType("bit")
.HasDefaultValue(true);
b.Property<bool>("IsDeleted") b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("bit") .HasColumnType("bit")

View file

@ -37,8 +37,8 @@ namespace Kurs.Platform.Migrations
Exceptions = table.Column<string>(type: "nvarchar(max)", nullable: true), Exceptions = table.Column<string>(type: "nvarchar(max)", nullable: true),
Comments = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true), Comments = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
HttpStatusCode = table.Column<int>(type: "int", nullable: true), HttpStatusCode = table.Column<int>(type: "int", nullable: true),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: false),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true) ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: false)
}, },
constraints: table => constraints: table =>
{ {
@ -58,8 +58,8 @@ namespace Kurs.Platform.Migrations
LastTryTime = table.Column<DateTime>(type: "datetime2", nullable: true), LastTryTime = table.Column<DateTime>(type: "datetime2", nullable: true),
IsAbandoned = table.Column<bool>(type: "bit", nullable: false, defaultValue: false), IsAbandoned = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
Priority = table.Column<byte>(type: "tinyint", nullable: false, defaultValue: (byte)15), Priority = table.Column<byte>(type: "tinyint", nullable: false, defaultValue: (byte)15),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: false),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true) ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: false)
}, },
constraints: table => constraints: table =>
{ {
@ -78,8 +78,8 @@ namespace Kurs.Platform.Migrations
RegexDescription = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true), RegexDescription = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
Description = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true), Description = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
ValueType = table.Column<int>(type: "int", nullable: false), ValueType = table.Column<int>(type: "int", nullable: false),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: false),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true) ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: false)
}, },
constraints: table => constraints: table =>
{ {
@ -162,8 +162,8 @@ namespace Kurs.Platform.Migrations
Code = table.Column<string>(type: "nvarchar(95)", maxLength: 95, nullable: false), Code = table.Column<string>(type: "nvarchar(95)", maxLength: 95, nullable: false),
DisplayName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false), DisplayName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
EntityVersion = table.Column<int>(type: "int", nullable: false), EntityVersion = table.Column<int>(type: "int", nullable: false),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: false),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true), ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: false),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false), CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true), LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
@ -243,8 +243,8 @@ namespace Kurs.Platform.Migrations
IsStatic = table.Column<bool>(type: "bit", nullable: false), IsStatic = table.Column<bool>(type: "bit", nullable: false),
IsPublic = table.Column<bool>(type: "bit", nullable: false), IsPublic = table.Column<bool>(type: "bit", nullable: false),
EntityVersion = table.Column<int>(type: "int", nullable: false), EntityVersion = table.Column<int>(type: "int", nullable: false),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: false),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true) ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: false)
}, },
constraints: table => constraints: table =>
{ {
@ -268,14 +268,55 @@ namespace Kurs.Platform.Migrations
ClientIpAddress = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), ClientIpAddress = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
BrowserInfo = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true), BrowserInfo = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false), CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: false),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true) ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: false)
}, },
constraints: table => constraints: table =>
{ {
table.PrimaryKey("PK_AbpSecurityLogs", x => x.Id); table.PrimaryKey("PK_AbpSecurityLogs", x => x.Id);
}); });
migrationBuilder.CreateTable(
name: "AbpSessions",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
SessionId = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
Device = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
DeviceInfo = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
UserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ClientId = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
IpAddresses = table.Column<string>(type: "nvarchar(2048)", maxLength: 2048, nullable: true),
SignedIn = table.Column<DateTime>(type: "datetime2", nullable: false),
LastAccessed = table.Column<DateTime>(type: "datetime2", nullable: true),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_AbpSessions", x => x.Id);
});
migrationBuilder.CreateTable(
name: "AbpSettingDefinitions",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Name = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
DisplayName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
Description = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
DefaultValue = table.Column<string>(type: "nvarchar(2048)", maxLength: 2048, nullable: true),
IsVisibleToClients = table.Column<bool>(type: "bit", nullable: false),
Providers = table.Column<string>(type: "nvarchar(1024)", maxLength: 1024, nullable: true),
IsInherited = table.Column<bool>(type: "bit", nullable: false),
IsEncrypted = table.Column<bool>(type: "bit", nullable: false),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_AbpSettingDefinitions", x => x.Id);
});
migrationBuilder.CreateTable( migrationBuilder.CreateTable(
name: "AbpSettings", name: "AbpSettings",
columns: table => new columns: table => new
@ -297,9 +338,11 @@ namespace Kurs.Platform.Migrations
{ {
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Name = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), Name = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
NormalizedName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
EntityVersion = table.Column<int>(type: "int", nullable: false), EntityVersion = table.Column<int>(type: "int", nullable: false),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), IsActive = table.Column<bool>(type: "bit", nullable: false, defaultValue: true),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true), ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: false),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: false),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false), CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true), LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
@ -355,8 +398,11 @@ namespace Kurs.Platform.Migrations
ShouldChangePasswordOnNextLogin = table.Column<bool>(type: "bit", nullable: false), ShouldChangePasswordOnNextLogin = table.Column<bool>(type: "bit", nullable: false),
EntityVersion = table.Column<int>(type: "int", nullable: false), EntityVersion = table.Column<int>(type: "int", nullable: false),
LastPasswordChangeTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: true), LastPasswordChangeTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: true),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), IsVerified = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true), LoginEndDate = table.Column<DateTime>(type: "datetime2", nullable: true),
RocketUsername = table.Column<string>(type: "nvarchar(max)", nullable: true),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: false),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: false),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false), CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true), LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
@ -375,21 +421,24 @@ namespace Kurs.Platform.Migrations
columns: table => new columns: table => new
{ {
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ApplicationType = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
ClientId = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true), ClientId = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
ClientSecret = table.Column<string>(type: "nvarchar(max)", nullable: true), ClientSecret = table.Column<string>(type: "nvarchar(max)", nullable: true),
ClientType = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
ConsentType = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), ConsentType = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
DisplayName = table.Column<string>(type: "nvarchar(max)", nullable: true), DisplayName = table.Column<string>(type: "nvarchar(max)", nullable: true),
DisplayNames = table.Column<string>(type: "nvarchar(max)", nullable: true), DisplayNames = table.Column<string>(type: "nvarchar(max)", nullable: true),
JsonWebKeySet = table.Column<string>(type: "nvarchar(max)", nullable: true),
Permissions = table.Column<string>(type: "nvarchar(max)", nullable: true), Permissions = table.Column<string>(type: "nvarchar(max)", nullable: true),
PostLogoutRedirectUris = table.Column<string>(type: "nvarchar(max)", nullable: true), PostLogoutRedirectUris = table.Column<string>(type: "nvarchar(max)", nullable: true),
Properties = table.Column<string>(type: "nvarchar(max)", nullable: true), Properties = table.Column<string>(type: "nvarchar(max)", nullable: true),
RedirectUris = table.Column<string>(type: "nvarchar(max)", nullable: true), RedirectUris = table.Column<string>(type: "nvarchar(max)", nullable: true),
Requirements = table.Column<string>(type: "nvarchar(max)", nullable: true), Requirements = table.Column<string>(type: "nvarchar(max)", nullable: true),
Type = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), Settings = table.Column<string>(type: "nvarchar(max)", nullable: true),
ClientUri = table.Column<string>(type: "nvarchar(max)", nullable: true), ClientUri = table.Column<string>(type: "nvarchar(max)", nullable: true),
LogoUri = table.Column<string>(type: "nvarchar(max)", nullable: true), LogoUri = table.Column<string>(type: "nvarchar(max)", nullable: true),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: false),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true), ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: false),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false), CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true), LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
@ -415,8 +464,8 @@ namespace Kurs.Platform.Migrations
Name = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true), Name = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
Properties = table.Column<string>(type: "nvarchar(max)", nullable: true), Properties = table.Column<string>(type: "nvarchar(max)", nullable: true),
Resources = table.Column<string>(type: "nvarchar(max)", nullable: true), Resources = table.Column<string>(type: "nvarchar(max)", nullable: true),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: false),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true), ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: false),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false), CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true), LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
@ -430,6 +479,484 @@ namespace Kurs.Platform.Migrations
table.PrimaryKey("PK_OpenIddictScopes", x => x.Id); table.PrimaryKey("PK_OpenIddictScopes", x => x.Id);
}); });
migrationBuilder.CreateTable(
name: "PAiBot",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
BotName = table.Column<string>(type: "nvarchar(max)", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_PAiBot", x => x.Id);
});
migrationBuilder.CreateTable(
name: "PBackgroundWorker",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Name = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
Cron = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
WorkerType = table.Column<int>(type: "int", nullable: false),
IsActive = table.Column<bool>(type: "bit", nullable: false),
DataSourceCode = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
BeforeSp = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
AfterSp = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
Options = table.Column<string>(type: "nvarchar(max)", nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_PBackgroundWorker", x => x.Id);
});
migrationBuilder.CreateTable(
name: "PBackgroundWorker_MailQueue",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TemplateId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
From = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
To = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
MailParameter = table.Column<string>(type: "nvarchar(max)", maxLength: 8000, nullable: true),
Table = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
TableParameter = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
Attachment = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
AttachmentParameter = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
SendStatus = table.Column<bool>(type: "bit", nullable: false),
SendTime = table.Column<DateTime>(type: "datetime2", nullable: true),
AwsMessageId = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
RelatedRecordId = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_PBackgroundWorker_MailQueue", x => x.Id);
});
migrationBuilder.CreateTable(
name: "PBackgroundWorker_MailQueueEvents",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
AwsMessageId = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
EventDate = table.Column<DateTime>(type: "datetime2", nullable: true),
Event = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
MailAddress = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
ResponseDescription = table.Column<string>(type: "nvarchar(max)", nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_PBackgroundWorker_MailQueueEvents", x => x.Id);
});
migrationBuilder.CreateTable(
name: "PBackgroundWorker_MailQueueTableFormat",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
TableName = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
Order = table.Column<short>(type: "smallint", nullable: false),
ColumnName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
Caption = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
HeaderCss = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
Css = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
FooterCss = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
DataType = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
DataFormat = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
IsHidden = table.Column<bool>(type: "bit", nullable: false),
IsProtected = table.Column<bool>(type: "bit", nullable: false),
SubTotal = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
Width = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_PBackgroundWorker_MailQueueTableFormat", x => x.Id);
});
migrationBuilder.CreateTable(
name: "PChart",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ChartCode = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
DataSourceCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
UserId = table.Column<string>(type: "nvarchar(max)", nullable: true),
RoleId = table.Column<string>(type: "nvarchar(max)", nullable: true),
CultureName = table.Column<string>(type: "nvarchar(max)", nullable: false, defaultValue: "en"),
CommonJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
DataSourceJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
AdaptiveLayoutJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
AnimationJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
AnnotationsJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
ArgumentAxisJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
CommonAnnotationsSettingsJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
CommonAxisSettingsJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
CommonPaneSettingsJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
CommonSeriesSettingsJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
CrosshairJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
ExportJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
LegendJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
MarginJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
PanesJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
ScrollBarJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
SeriesJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
SizeJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
TitleJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
TooltipJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
ValueAxisJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
ZoomAndPanJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
PermissionJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
IsTenant = table.Column<bool>(type: "bit", nullable: false),
IsOrganizationUnit = table.Column<bool>(type: "bit", nullable: false),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_PChart", x => x.Id);
});
migrationBuilder.CreateTable(
name: "PDataSource",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Code = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
DataSourceType = table.Column<int>(type: "int", nullable: false),
ConnectionString = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_PDataSource", x => x.Id);
});
migrationBuilder.CreateTable(
name: "PGlobalSearch",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
System = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
Group = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
Term = table.Column<string>(type: "nvarchar(max)", nullable: true),
Weight = table.Column<string>(type: "nvarchar(max)", nullable: true),
Url = table.Column<string>(type: "nvarchar(max)", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_PGlobalSearch", x => x.Id);
});
migrationBuilder.CreateTable(
name: "PIpRestriction",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ResourceType = table.Column<string>(type: "nvarchar(10)", maxLength: 10, nullable: false),
ResourceId = table.Column<string>(type: "nvarchar(32)", maxLength: 32, nullable: true),
IP = table.Column<string>(type: "nvarchar(32)", maxLength: 32, nullable: false),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_PIpRestriction", x => x.Id);
});
migrationBuilder.CreateTable(
name: "PLanguage",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CultureName = table.Column<string>(type: "nvarchar(10)", maxLength: 10, nullable: false),
UiCultureName = table.Column<string>(type: "nvarchar(10)", maxLength: 10, nullable: false),
DisplayName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
IsEnabled = table.Column<bool>(type: "bit", nullable: false),
TwoLetterISOLanguageName = table.Column<string>(type: "nvarchar(max)", nullable: true),
MultipleCultures = table.Column<string>(type: "nvarchar(max)", nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_PLanguage", x => x.Id);
});
migrationBuilder.CreateTable(
name: "PLanguageKey",
columns: table => new
{
Key = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
ResourceName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_PLanguageKey", x => new { x.ResourceName, x.Key });
});
migrationBuilder.CreateTable(
name: "PListForm",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ListFormCode = table.Column<string>(type: "nvarchar(450)", nullable: false),
CultureName = table.Column<string>(type: "nvarchar(max)", nullable: true),
DataSourceCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
SelectCommandType = table.Column<int>(type: "int", nullable: false),
TableName = table.Column<string>(type: "nvarchar(max)", nullable: true),
SelectCommand = table.Column<string>(type: "nvarchar(max)", nullable: true),
KeyFieldName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
KeyFieldDbSourceType = table.Column<int>(type: "int", nullable: false),
SelectFieldsDefaultValueJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
Name = table.Column<string>(type: "nvarchar(max)", nullable: true),
Description = table.Column<string>(type: "nvarchar(max)", nullable: true),
Title = table.Column<string>(type: "nvarchar(max)", nullable: true),
SortMode = table.Column<string>(type: "nvarchar(max)", nullable: true),
PageSize = table.Column<int>(type: "int", nullable: false, defaultValue: 10),
Width = table.Column<int>(type: "int", nullable: true),
Height = table.Column<int>(type: "int", nullable: true),
DefaultFilter = table.Column<string>(type: "nvarchar(max)", nullable: true),
ColumnOptionJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
FilterRowJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
HeaderFilterJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
FilterPanelJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
SearchPanelJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
GroupPanelJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
SelectionJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
PagerOptionJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
EditingOptionJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
EditingFormJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
PermissionJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
InsertFieldsDefaultValueJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
UpdateFieldsDefaultValueJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
DeleteFieldsDefaultValueJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
CommandColumnJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
StateStoringJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
DeleteCommand = table.Column<string>(type: "nvarchar(max)", nullable: true),
UpdateCommand = table.Column<string>(type: "nvarchar(max)", nullable: true),
InsertCommand = table.Column<string>(type: "nvarchar(max)", nullable: true),
UpdateServiceAddress = table.Column<string>(type: "nvarchar(max)", nullable: true),
InsertServiceAddress = table.Column<string>(type: "nvarchar(max)", nullable: true),
DeleteServiceAddress = table.Column<string>(type: "nvarchar(max)", nullable: true),
CustomJsSourcesJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
CustomStyleSourcesJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
FormFieldsDefaultValueJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
IsTenant = table.Column<bool>(type: "bit", nullable: false),
IsOrganizationUnit = table.Column<bool>(type: "bit", nullable: false),
ListFormType = table.Column<string>(type: "nvarchar(max)", nullable: true),
IsSubForm = table.Column<bool>(type: "bit", nullable: false),
SubFormsJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_PListForm", x => x.Id);
table.UniqueConstraint("AK_PListForm_ListFormCode", x => x.ListFormCode);
});
migrationBuilder.CreateTable(
name: "PMenu",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Code = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
DisplayName = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
Order = table.Column<int>(type: "int", nullable: false),
Url = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
Icon = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
ParentCode = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
CssClass = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
RequiredPermissionName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
Target = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
IsDisabled = table.Column<bool>(type: "bit", nullable: false),
ElementId = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
UserId = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
RoleId = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
CultureName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_PMenu", x => x.Id);
});
migrationBuilder.CreateTable(
name: "PNotification",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
NotificationRuleId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
NotificationChannel = table.Column<string>(type: "nvarchar(10)", maxLength: 10, nullable: false),
NotificationType = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
Identifier = table.Column<string>(type: "nvarchar(max)", nullable: false),
UserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Message = table.Column<string>(type: "nvarchar(max)", nullable: false),
IsSent = table.Column<bool>(type: "bit", nullable: false),
IsRead = table.Column<bool>(type: "bit", nullable: false),
ReadTime = table.Column<DateTime>(type: "datetime2", nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_PNotification", x => x.Id);
});
migrationBuilder.CreateTable(
name: "PNotificationRule",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
NotificationType = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
RecipientType = table.Column<string>(type: "nvarchar(max)", nullable: false),
RecipientId = table.Column<string>(type: "nvarchar(max)", nullable: true),
Channel = table.Column<string>(type: "nvarchar(10)", maxLength: 10, nullable: false),
IsActive = table.Column<bool>(type: "bit", nullable: false),
IsFixed = table.Column<bool>(type: "bit", nullable: false),
IsCustomized = table.Column<bool>(type: "bit", nullable: false),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_PNotificationRule", x => x.Id);
});
migrationBuilder.CreateTable(
name: "PPublicApi",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Name = table.Column<string>(type: "nvarchar(max)", nullable: true),
Description = table.Column<string>(type: "nvarchar(max)", nullable: true),
Url = table.Column<string>(type: "nvarchar(max)", nullable: true),
Method = table.Column<string>(type: "nvarchar(max)", nullable: true),
DataSourceCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
Sql = table.Column<string>(type: "nvarchar(max)", nullable: true),
ParametersJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
PermissionsJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_PPublicApi", x => x.Id);
});
migrationBuilder.CreateTable(
name: "PSettingDefinition",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Code = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
NameKey = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
DescriptionKey = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
DefaultValue = table.Column<string>(type: "nvarchar(2048)", maxLength: 2048, nullable: true),
IsVisibleToClients = table.Column<bool>(type: "bit", nullable: false),
Providers = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
IsInherited = table.Column<bool>(type: "bit", nullable: false),
IsEncrypted = table.Column<bool>(type: "bit", nullable: false),
MainGroupKey = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
SubGroupKey = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
RequiredPermissionName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
DataType = table.Column<string>(type: "nvarchar(16)", maxLength: 16, nullable: false),
SelectOptions = table.Column<string>(type: "nvarchar(max)", nullable: true),
Order = table.Column<int>(type: "int", nullable: false),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_PSettingDefinition", x => x.Id);
});
migrationBuilder.CreateTable( migrationBuilder.CreateTable(
name: "AbpAuditLogActions", name: "AbpAuditLogActions",
columns: table => new columns: table => new
@ -465,7 +992,7 @@ namespace Kurs.Platform.Migrations
ChangeTime = table.Column<DateTime>(type: "datetime2", nullable: false), ChangeTime = table.Column<DateTime>(type: "datetime2", nullable: false),
ChangeType = table.Column<byte>(type: "tinyint", nullable: false), ChangeType = table.Column<byte>(type: "tinyint", nullable: false),
EntityTenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), EntityTenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
EntityId = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false), EntityId = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
EntityTypeFullName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false), EntityTypeFullName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true) ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true)
}, },
@ -674,8 +1201,28 @@ namespace Kurs.Platform.Migrations
Status = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), Status = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
Subject = table.Column<string>(type: "nvarchar(400)", maxLength: 400, nullable: true), Subject = table.Column<string>(type: "nvarchar(400)", maxLength: 400, nullable: true),
Type = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), Type = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: false),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true), ConcurrencyStamp = table.Column<string>(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: "PLanguageText",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CultureName = table.Column<string>(type: "nvarchar(10)", maxLength: 10, nullable: false),
Key = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
Value = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: false),
ResourceName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false), CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true), LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
@ -686,12 +1233,100 @@ namespace Kurs.Platform.Migrations
}, },
constraints: table => constraints: table =>
{ {
table.PrimaryKey("PK_OpenIddictAuthorizations", x => x.Id); table.PrimaryKey("PK_PLanguageText", x => x.Id);
table.ForeignKey( table.ForeignKey(
name: "FK_OpenIddictAuthorizations_OpenIddictApplications_ApplicationId", name: "FK_PLanguageText_PLanguageKey_ResourceName_Key",
column: x => x.ApplicationId, columns: x => new { x.ResourceName, x.Key },
principalTable: "OpenIddictApplications", principalTable: "PLanguageKey",
principalColumn: "Id"); principalColumns: new[] { "ResourceName", "Key" },
onDelete: ReferentialAction.SetNull);
});
migrationBuilder.CreateTable(
name: "PListFormCustomization",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ListFormCode = table.Column<string>(type: "nvarchar(450)", nullable: false),
UserId = table.Column<string>(type: "nvarchar(max)", nullable: true),
RoleId = table.Column<string>(type: "nvarchar(max)", nullable: true),
FilterName = table.Column<string>(type: "nvarchar(max)", nullable: true),
CustomizationData = table.Column<string>(type: "nvarchar(max)", nullable: true),
CustomizationType = table.Column<int>(type: "int", nullable: false),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_PListFormCustomization", x => x.Id);
table.ForeignKey(
name: "FK_PListFormCustomization_PListForm_ListFormCode",
column: x => x.ListFormCode,
principalTable: "PListForm",
principalColumn: "ListFormCode",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "PListFormField",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ListFormCode = table.Column<string>(type: "nvarchar(450)", nullable: false),
UserId = table.Column<string>(type: "nvarchar(max)", nullable: true),
RoleId = table.Column<string>(type: "nvarchar(max)", nullable: true),
CultureName = table.Column<string>(type: "nvarchar(max)", nullable: true),
FieldName = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
CaptionName = table.Column<string>(type: "nvarchar(max)", nullable: true),
Visible = table.Column<bool>(type: "bit", nullable: true, defaultValue: true),
IsActive = table.Column<bool>(type: "bit", nullable: true, defaultValue: true),
Width = table.Column<int>(type: "int", nullable: true, defaultValue: 100),
ListOrderNo = table.Column<int>(type: "int", nullable: true, defaultValue: 30),
SourceDbType = table.Column<int>(type: "int", nullable: false, defaultValue: 16),
SortIndex = table.Column<int>(type: "int", nullable: true),
SortDirection = table.Column<string>(type: "nvarchar(max)", nullable: true),
AllowSearch = table.Column<bool>(type: "bit", nullable: true, defaultValue: false),
BandName = table.Column<string>(type: "nvarchar(max)", nullable: true),
ColumnFilterJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
ColumnHeaderJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
GroupingJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
ColumnCustomizationJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
TotalSummaryJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
GroupSummaryJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
ColumnCssClass = table.Column<string>(type: "nvarchar(max)", nullable: true),
ColumnCssValue = table.Column<string>(type: "nvarchar(max)", nullable: true),
JoinTableJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
EditingJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
LookupJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
ValidationRuleJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
ColumnStylingJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
PermissionJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
PivotSettingsJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
Alignment = table.Column<string>(type: "nvarchar(max)", nullable: true),
Format = table.Column<string>(type: "nvarchar(max)", nullable: true),
EditorOptions = table.Column<string>(type: "nvarchar(max)", nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_PListFormField", x => x.Id);
table.ForeignKey(
name: "FK_PListFormField_PListForm_ListFormCode",
column: x => x.ListFormCode,
principalTable: "PListForm",
principalColumn: "ListFormCode",
onDelete: ReferentialAction.Cascade);
}); });
migrationBuilder.CreateTable( migrationBuilder.CreateTable(
@ -733,15 +1368,8 @@ namespace Kurs.Platform.Migrations
Status = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), Status = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
Subject = table.Column<string>(type: "nvarchar(400)", maxLength: 400, nullable: true), Subject = table.Column<string>(type: "nvarchar(400)", maxLength: 400, nullable: true),
Type = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), Type = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: false),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true), ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: false)
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
}, },
constraints: table => constraints: table =>
{ {
@ -898,6 +1526,27 @@ namespace Kurs.Platform.Migrations
table: "AbpSecurityLogs", table: "AbpSecurityLogs",
columns: new[] { "TenantId", "UserId" }); 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( migrationBuilder.CreateIndex(
name: "IX_AbpSettings_Name_ProviderName_ProviderKey", name: "IX_AbpSettings_Name_ProviderName_ProviderKey",
table: "AbpSettings", table: "AbpSettings",
@ -910,6 +1559,11 @@ namespace Kurs.Platform.Migrations
table: "AbpTenants", table: "AbpTenants",
column: "Name"); column: "Name");
migrationBuilder.CreateIndex(
name: "IX_AbpTenants_NormalizedName",
table: "AbpTenants",
column: "NormalizedName");
migrationBuilder.CreateIndex( migrationBuilder.CreateIndex(
name: "IX_AbpUserClaims_UserId", name: "IX_AbpUserClaims_UserId",
table: "AbpUserClaims", table: "AbpUserClaims",
@ -979,6 +1633,27 @@ namespace Kurs.Platform.Migrations
name: "IX_OpenIddictTokens_ReferenceId", name: "IX_OpenIddictTokens_ReferenceId",
table: "OpenIddictTokens", table: "OpenIddictTokens",
column: "ReferenceId"); column: "ReferenceId");
migrationBuilder.CreateIndex(
name: "IX_MailQueueTableFormat",
table: "PBackgroundWorker_MailQueueTableFormat",
columns: new[] { "TableName", "Order" },
unique: true);
migrationBuilder.CreateIndex(
name: "IX_PLanguageText_ResourceName_Key",
table: "PLanguageText",
columns: new[] { "ResourceName", "Key" });
migrationBuilder.CreateIndex(
name: "IX_PListFormCustomization_ListFormCode",
table: "PListFormCustomization",
column: "ListFormCode");
migrationBuilder.CreateIndex(
name: "IX_PListFormField_ListFormCode",
table: "PListFormField",
column: "ListFormCode");
} }
/// <inheritdoc /> /// <inheritdoc />
@ -1026,6 +1701,12 @@ namespace Kurs.Platform.Migrations
migrationBuilder.DropTable( migrationBuilder.DropTable(
name: "AbpSecurityLogs"); name: "AbpSecurityLogs");
migrationBuilder.DropTable(
name: "AbpSessions");
migrationBuilder.DropTable(
name: "AbpSettingDefinitions");
migrationBuilder.DropTable( migrationBuilder.DropTable(
name: "AbpSettings"); name: "AbpSettings");
@ -1056,6 +1737,60 @@ namespace Kurs.Platform.Migrations
migrationBuilder.DropTable( migrationBuilder.DropTable(
name: "OpenIddictTokens"); name: "OpenIddictTokens");
migrationBuilder.DropTable(
name: "PAiBot");
migrationBuilder.DropTable(
name: "PBackgroundWorker");
migrationBuilder.DropTable(
name: "PBackgroundWorker_MailQueue");
migrationBuilder.DropTable(
name: "PBackgroundWorker_MailQueueEvents");
migrationBuilder.DropTable(
name: "PBackgroundWorker_MailQueueTableFormat");
migrationBuilder.DropTable(
name: "PChart");
migrationBuilder.DropTable(
name: "PDataSource");
migrationBuilder.DropTable(
name: "PGlobalSearch");
migrationBuilder.DropTable(
name: "PIpRestriction");
migrationBuilder.DropTable(
name: "PLanguage");
migrationBuilder.DropTable(
name: "PLanguageText");
migrationBuilder.DropTable(
name: "PListFormCustomization");
migrationBuilder.DropTable(
name: "PListFormField");
migrationBuilder.DropTable(
name: "PMenu");
migrationBuilder.DropTable(
name: "PNotification");
migrationBuilder.DropTable(
name: "PNotificationRule");
migrationBuilder.DropTable(
name: "PPublicApi");
migrationBuilder.DropTable(
name: "PSettingDefinition");
migrationBuilder.DropTable( migrationBuilder.DropTable(
name: "AbpEntityChanges"); name: "AbpEntityChanges");
@ -1074,6 +1809,12 @@ namespace Kurs.Platform.Migrations
migrationBuilder.DropTable( migrationBuilder.DropTable(
name: "OpenIddictAuthorizations"); name: "OpenIddictAuthorizations");
migrationBuilder.DropTable(
name: "PLanguageKey");
migrationBuilder.DropTable(
name: "PListForm");
migrationBuilder.DropTable( migrationBuilder.DropTable(
name: "AbpAuditLogs"); name: "AbpAuditLogs");

View file

@ -20,11 +20,12 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="Hangfire.PostgreSql" Version="1.20.10" /> <PackageReference Include="Hangfire.PostgreSql" Version="1.20.10" />
<!-- <PackageReference Include="Hangfire.SqlServer" Version="1.8.17" /> PGSQL --> <PackageReference Include="Hangfire.SqlServer" Version="1.8.17" />
<PackageReference Include="Serilog.AspNetCore" Version="9.0.0" /> <PackageReference Include="Serilog.AspNetCore" Version="9.0.0" />
<PackageReference Include="Serilog.Sinks.Async" Version="2.1.0" /> <PackageReference Include="Serilog.Sinks.Async" Version="2.1.0" />
<PackageReference Include="Serilog.Settings.Configuration" Version="9.0.0" /> <PackageReference Include="Serilog.Settings.Configuration" Version="9.0.0" />
<PackageReference Include="Serilog.Sinks.PostgreSQL" Version="2.3.0" /> <PackageReference Include="Serilog.Sinks.PostgreSQL" Version="2.3.0" />
<PackageReference Include="Serilog.Sinks.MSSqlServer" Version="8.2.0" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View file

@ -16,6 +16,7 @@ using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Cors; using Microsoft.AspNetCore.Cors;
using Microsoft.AspNetCore.Extensions.DependencyInjection; using Microsoft.AspNetCore.Extensions.DependencyInjection;
using Microsoft.AspNetCore.Identity; using Microsoft.AspNetCore.Identity;
using Microsoft.EntityFrameworkCore.Storage;
using Microsoft.Extensions.Caching.StackExchangeRedis; using Microsoft.Extensions.Caching.StackExchangeRedis;
using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
@ -302,9 +303,18 @@ public class PlatformHttpApiHostModule : AbpModule
context.Services.AddHangfire(config => context.Services.AddHangfire(config =>
{ {
switch (DefaultDatabaseProvider)
{
case DatabaseProvider.PostgreSql:
config.UsePostgreSqlStorage(c => config.UsePostgreSqlStorage(c =>
c.UseNpgsqlConnection(configuration.GetConnectionString("Default"))); //PGSQL c.UseNpgsqlConnection(configuration.GetConnectionString("PostgreSQL")));
// config.UseSqlServerStorage(configuration.GetConnectionString("Default")); break;
case DatabaseProvider.SqlServer:
config.UseSqlServerStorage(configuration.GetConnectionString("SqlServer"));
break;
default:
throw new InvalidOperationException("Unsupported database provider configured for Hangfire.");
}
}); });
} }

View file

@ -32,16 +32,36 @@ public class Program
{ "Properties", new LogEventSerializedColumnWriter() } { "Properties", new LogEventSerializedColumnWriter() }
}; };
Log.Logger = new LoggerConfiguration() var loggerConfig = new LoggerConfiguration()
.MinimumLevel.Information() .MinimumLevel.Information();
.WriteTo.PostgreSQL(
connectionString: configuration.GetConnectionString("Default"), switch (PlatformConsts.DefaultDatabaseProvider)
tableName: "PLogEntry", {
case PlatformConsts.DatabaseProvider.PostgreSql:
loggerConfig = loggerConfig.WriteTo.PostgreSQL(
connectionString: configuration.GetConnectionString("PostgreSQL"),
tableName: PlatformConsts.DbTablePrefix + "LogEntry",
columnOptions: columnWriters, columnOptions: columnWriters,
needAutoCreateTable: true, needAutoCreateTable: true,
respectCase: true respectCase: true
) );
.CreateLogger(); break;
case PlatformConsts.DatabaseProvider.SqlServer:
loggerConfig = loggerConfig.WriteTo.MSSqlServer(
connectionString: configuration.GetConnectionString("SqlServer"),
tableName: PlatformConsts.DbTablePrefix + "LogEntry",
autoCreateSqlTable: true,
columnOptions: new Serilog.Sinks.MSSqlServer.ColumnOptions()
);
break;
default:
throw new InvalidOperationException("Unsupported database provider for logging.");
}
Log.Logger = loggerConfig.CreateLogger();
try try
{ {

View file

@ -8,8 +8,8 @@
"CdnPath": "/etc/api/cdn" "CdnPath": "/etc/api/cdn"
}, },
"ConnectionStrings": { "ConnectionStrings": {
// "Default": "Server=sql;Database=KURS;User Id=sa;password=NvQp8s@l;Trusted_Connection=False;TrustServerCertificate=True;" "SqlServer": "Server=sql;Database=KURS;User Id=sa;password=NvQp8s@l;Trusted_Connection=False;TrustServerCertificate=True;",
"Default": "User ID=sa;Password=NvQp8s@l;Host=postgres;Port=5432;Database=KURS;" "PostgreSql": "User ID=sa;Password=NvQp8s@l;Host=postgres;Port=5432;Database=KURS;"
}, },
"Redis": { "Redis": {
"IsEnabled": "true", "IsEnabled": "true",

View file

@ -8,8 +8,8 @@
"CdnPath": "/etc/api/cdn" "CdnPath": "/etc/api/cdn"
}, },
"ConnectionStrings": { "ConnectionStrings": {
// "Default": "Server=sql;Database=KURS;User Id=sa;password=NvQp8s@l;Trusted_Connection=False;TrustServerCertificate=True;" "SqlServer": "Server=sql;Database=KURS;User Id=sa;password=NvQp8s@l;Trusted_Connection=False;TrustServerCertificate=True;",
"Default": "User ID=sa;Password=NvQp8s@l;Host=postgres;Port=5432;Database=KURS;" "PostgreSql": "User ID=sa;Password=NvQp8s@l;Host=postgres;Port=5432;Database=KURS;"
}, },
"Redis": { "Redis": {
"IsEnabled": "true", "IsEnabled": "true",

View file

@ -9,8 +9,8 @@
"Version": "1.0.4" "Version": "1.0.4"
}, },
"ConnectionStrings": { "ConnectionStrings": {
// "Default": "Server=localhost;Database=KURS;User Id=sa;password=NvQp8s@l;Trusted_Connection=False;TrustServerCertificate=True;" "SqlServer": "Server=localhost;Database=KURS;User Id=sa;password=NvQp8s@l;Trusted_Connection=False;TrustServerCertificate=True;",
"Default": "User ID=sa;Password=NvQp8s@l;Host=localhost;Port=5432;Database=KURS;" "PostgreSql": "User ID=sa;Password=NvQp8s@l;Host=localhost;Port=5432;Database=KURS;"
}, },
"Redis": { "Redis": {
"IsEnabled": "true", "IsEnabled": "true",

View file

@ -6,7 +6,8 @@ networks:
external: false external: false
volumes: volumes:
sql-pg: pg:
mssql:
services: services:
redis: redis:
@ -24,11 +25,23 @@ services:
ports: ports:
- 5432:5432 - 5432:5432
volumes: volumes:
- sql-pg:/var/lib/postgresql/data - pg:/var/lib/postgresql/data
environment: environment:
- POSTGRES_PASSWORD=NvQp8s@l - POSTGRES_PASSWORD=NvQp8s@l
- POSTGRES_USER=sa - POSTGRES_USER=sa
- POSTGRES_DB=postgres - POSTGRES_DB=postgres
networks: networks:
- db - db
restart: always sql:
image: mcr.microsoft.com/mssql/server:2022-CU19-ubuntu-22.04
user: root
environment:
- SA_PASSWORD=NvQp8s@l
- ACCEPT_EULA=Y
- MSSQL_PID=Web
ports:
- 1433:1433
volumes:
- mssql:/var/opt/mssql
networks:
- db

View file

@ -15,26 +15,6 @@ volumes:
n8n_data: n8n_data:
services: services:
# nginx:
# image: nginx:1.27-alpine
# container_name: nginx-devops
# restart: always
# ports:
# - 80:80
# - 443:443
# volumes:
# - ./configs/nginx-devops.conf:/etc/nginx/conf.d/default.conf
# - ~/sozsoft.com:/etc/ssl/sozsoft.com:ro
# networks:
# - forgejo
# - rocket
# - n8n
# depends_on:
# - forgejo
# - rocket_chat
# - n8n
forgejo: forgejo:
image: codeberg.org/forgejo/forgejo:9 image: codeberg.org/forgejo/forgejo:9
container_name: forgejo container_name: forgejo

View file

@ -2,7 +2,8 @@
name: kurs-platform name: kurs-platform
volumes: volumes:
sql-pg: pg:
mssql:
services: services:
redis: redis:
@ -25,10 +26,21 @@ services:
ports: ports:
- 5432:5432 - 5432:5432
volumes: volumes:
- sql-pg:/var/lib/postgresql/data - pg:/var/lib/postgresql/data
environment: environment:
- POSTGRES_PASSWORD=NvQp8s@l - POSTGRES_PASSWORD=NvQp8s@l
- POSTGRES_USER=sa - POSTGRES_USER=sa
- POSTGRES_DB=postgres - POSTGRES_DB=postgres
- TZ=UTC - TZ=UTC
- PGTZ=UTC - PGTZ=UTC
sql:
image: mcr.microsoft.com/mssql/server:2022-CU19-ubuntu-22.04
user: root
environment:
- SA_PASSWORD=NvQp8s@l
- ACCEPT_EULA=Y
- MSSQL_PID=Web
ports:
- 1433:1433
volumes:
- mssql:/var/opt/mssql

View file

@ -82,7 +82,7 @@ define(['./workbox-54d0af47'], (function (workbox) { 'use strict';
"revision": "3ca0b8505b4bec776b69afdba2768812" "revision": "3ca0b8505b4bec776b69afdba2768812"
}, { }, {
"url": "index.html", "url": "index.html",
"revision": "0.ahaqbcsu15g" "revision": "0.05gfa4u7tj8"
}], {}); }], {});
workbox.cleanupOutdatedCaches(); workbox.cleanupOutdatedCaches();
workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), { workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), {