recreated all migrations

This commit is contained in:
Vashchuk Nikita 2022-07-11 18:33:57 +03:00
parent bc0ad53e8f
commit 5cfb69ae48
88 changed files with 4196 additions and 1498 deletions

View File

@ -11,7 +11,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace ASC.Core.Common.Migrations.MySql.AccountLinkContextMySql
{
[DbContext(typeof(MySqlAccountLinkContext))]
[Migration("20220708104404_AccountLinkContextMySql")]
[Migration("20220711152824_AccountLinkContextMySql")]
partial class AccountLinkContextMySql
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)

View File

@ -11,7 +11,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace ASC.Core.Common.Migrations.MySql.CoreDbContextMySql
{
[DbContext(typeof(MySqlCoreDbContext))]
[Migration("20220708104400_CoreDbContextMySql")]
[Migration("20220711152820_CoreDbContextMySql")]
partial class CoreDbContextMySql
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
@ -102,9 +102,9 @@ namespace ASC.Core.Common.Migrations.MySql.CoreDbContextMySql
.HasColumnName("price")
.HasDefaultValueSql("'0.00'");
b.Property<int>("Visible")
b.Property<bool>("Visible")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnType("tinyint(1)")
.HasColumnName("visible")
.HasDefaultValueSql("'0'");
@ -121,12 +121,12 @@ namespace ASC.Core.Common.Migrations.MySql.CoreDbContextMySql
Tenant = -1,
ActiveUsers = 10000,
AvangateId = "0",
Features = "update",
Features = "domain,audit,controlpanel,healthcheck,ldap,sso,whitelabel,branding,ssbranding,update,support,portals:10000,discencryption,privacyroom,restore",
MaxFileSize = 102400L,
MaxTotalSize = 10995116277760L,
Name = "default",
Price = 0.00m,
Visible = 0
Visible = false
});
});

View File

@ -46,7 +46,7 @@ namespace ASC.Core.Common.Migrations.MySql.CoreDbContextMySql
price = table.Column<decimal>(type: "decimal(10,2)", nullable: false, defaultValueSql: "'0.00'"),
avangate_id = table.Column<string>(type: "varchar(128)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
visible = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'")
visible = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValueSql: "'0'")
},
constraints: table =>
{

View File

@ -100,9 +100,9 @@ namespace ASC.Core.Common.Migrations.MySql.CoreDbContextMySql
.HasColumnName("price")
.HasDefaultValueSql("'0.00'");
b.Property<int>("Visible")
b.Property<bool>("Visible")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnType("tinyint(1)")
.HasColumnName("visible")
.HasDefaultValueSql("'0'");
@ -119,12 +119,12 @@ namespace ASC.Core.Common.Migrations.MySql.CoreDbContextMySql
Tenant = -1,
ActiveUsers = 10000,
AvangateId = "0",
Features = "update",
Features = "domain,audit,controlpanel,healthcheck,ldap,sso,whitelabel,branding,ssbranding,update,support,portals:10000,discencryption,privacyroom,restore",
MaxFileSize = 102400L,
MaxTotalSize = 10995116277760L,
Name = "default",
Price = 0.00m,
Visible = 0
Visible = false
});
});

View File

@ -11,7 +11,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace ASC.Core.Common.Migrations.MySql.DbContextMySql
{
[DbContext(typeof(MySqlDbContext))]
[Migration("20220708104406_DbContextMySql")]
[Migration("20220711152826_DbContextMySql")]
partial class DbContextMySql
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)

View File

@ -10,7 +10,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace ASC.Core.Common.Migrations.MySql.FilesDbContextMySql
{
[DbContext(typeof(MySqlFilesDbContext))]
[Migration("20220708104408_FilesDbContextMySql")]
[Migration("20220711152828_FilesDbContextMySql")]
partial class FilesDbContextMySql
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)

View File

@ -11,7 +11,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace ASC.Core.Common.Migrations.MySql.IntegrationEventLogContextMySql
{
[DbContext(typeof(MySqlIntegrationEventLogContext))]
[Migration("20220708104358_IntegrationEventLogContextMySql")]
[Migration("20220711152818_IntegrationEventLogContextMySql")]
partial class IntegrationEventLogContextMySql
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)

View File

@ -8,10 +8,10 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace ASC.MessagingSystem.Migrations.MySql.MessagesContextMySql
namespace ASC.Core.Common.Migrations.MySql.MessagesContextMySql
{
[DbContext(typeof(MySqlMessagesContext))]
[Migration("20220708104428_MessagesContextMySql")]
[Migration("20220711152816_MessagesContextMySql")]
partial class MessagesContextMySql
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
@ -35,9 +35,9 @@ namespace ASC.MessagingSystem.Migrations.MySql.MessagesContextMySql
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("Calls")
b.Property<bool>("Calls")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnType("tinyint(1)")
.HasColumnName("calls")
.HasDefaultValueSql("'1'");
@ -78,7 +78,6 @@ namespace ASC.MessagingSystem.Migrations.MySql.MessagesContextMySql
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("OwnerId")
.IsRequired()
.HasColumnType("varchar(38)")
.HasColumnName("owner_id")
.UseCollation("utf8_general_ci")
@ -90,9 +89,9 @@ namespace ASC.MessagingSystem.Migrations.MySql.MessagesContextMySql
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("Spam")
b.Property<bool>("Spam")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnType("tinyint(1)")
.HasColumnName("spam")
.HasDefaultValueSql("'1'");
@ -136,6 +135,10 @@ namespace ASC.MessagingSystem.Migrations.MySql.MessagesContextMySql
b.HasKey("Id");
b.HasIndex("Alias")
.IsUnique()
.HasDatabaseName("alias");
b.HasIndex("LastModified")
.HasDatabaseName("last_modified");
@ -154,12 +157,13 @@ namespace ASC.MessagingSystem.Migrations.MySql.MessagesContextMySql
{
Id = 1,
Alias = "localhost",
Calls = 0,
Calls = false,
CreationDateTime = new DateTime(2021, 3, 9, 17, 46, 59, 97, DateTimeKind.Utc).AddTicks(4317),
Industry = 0,
LastModified = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified),
Name = "Web Office",
OwnerId = "66faa6e4-f133-11ea-b126-00ffeec8b4ef",
Spam = 0,
Spam = false,
Status = 0,
TrustedDomainsEnabled = 0,
Version = 0
@ -293,14 +297,14 @@ namespace ASC.MessagingSystem.Migrations.MySql.MessagesContextMySql
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("Removed")
b.Property<bool>("Removed")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnType("tinyint(1)")
.HasColumnName("removed")
.HasDefaultValueSql("'0'");
b.Property<int?>("Sex")
.HasColumnType("int")
b.Property<bool?>("Sex")
.HasColumnType("tinyint(1)")
.HasColumnName("sex");
b.Property<string>("Sid")
@ -378,7 +382,7 @@ namespace ASC.MessagingSystem.Migrations.MySql.MessagesContextMySql
LastModified = new DateTime(2021, 3, 9, 9, 52, 55, 765, DateTimeKind.Utc).AddTicks(1420),
LastName = "",
MobilePhoneActivation = 0,
Removed = 0,
Removed = false,
Status = 1,
Tenant = 1,
UserName = "administrator",
@ -412,9 +416,9 @@ namespace ASC.MessagingSystem.Migrations.MySql.MessagesContextMySql
.HasColumnType("timestamp")
.HasColumnName("last_modified");
b.Property<int>("Removed")
b.Property<bool>("Removed")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnType("tinyint(1)")
.HasColumnName("removed")
.HasDefaultValueSql("'0'");
@ -519,6 +523,10 @@ namespace ASC.MessagingSystem.Migrations.MySql.MessagesContextMySql
.HasColumnType("int")
.HasColumnName("action");
b.Property<bool>("Active")
.HasColumnType("tinyint(1)")
.HasColumnName("active");
b.Property<string>("Browser")
.HasColumnType("varchar(200)")
.HasColumnName("browser")

View File

@ -4,7 +4,7 @@ using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace ASC.MessagingSystem.Migrations.MySql.MessagesContextMySql
namespace ASC.Core.Common.Migrations.MySql.MessagesContextMySql
{
public partial class MessagesContextMySql : Migration
{
@ -58,7 +58,7 @@ namespace ASC.MessagingSystem.Migrations.MySql.MessagesContextMySql
.Annotation("MySql:CharSet", "utf8"),
lastname = table.Column<string>(type: "varchar(64)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
sex = table.Column<int>(type: "int", nullable: true),
sex = table.Column<bool>(type: "tinyint(1)", nullable: true),
bithdate = table.Column<DateTime>(type: "datetime", nullable: true),
status = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'1'"),
activation_status = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
@ -85,7 +85,7 @@ namespace ASC.MessagingSystem.Migrations.MySql.MessagesContextMySql
.Annotation("MySql:CharSet", "utf8"),
sso_session_id = table.Column<string>(type: "varchar(512)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
removed = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
removed = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValueSql: "'0'"),
create_on = table.Column<DateTime>(type: "timestamp", nullable: false),
last_modified = table.Column<DateTime>(type: "datetime", nullable: false)
},
@ -103,6 +103,7 @@ namespace ASC.MessagingSystem.Migrations.MySql.MessagesContextMySql
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
login = table.Column<string>(type: "varchar(200)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
active = table.Column<bool>(type: "tinyint(1)", nullable: false),
ip = table.Column<string>(type: "varchar(50)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
browser = table.Column<string>(type: "varchar(200)", nullable: true, collation: "utf8_general_ci")
@ -149,14 +150,14 @@ namespace ASC.MessagingSystem.Migrations.MySql.MessagesContextMySql
status = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
statuschanged = table.Column<DateTime>(type: "datetime", nullable: true),
creationdatetime = table.Column<DateTime>(type: "datetime", nullable: false),
owner_id = table.Column<string>(type: "varchar(38)", nullable: false, collation: "utf8_general_ci")
owner_id = table.Column<string>(type: "varchar(38)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
payment_id = table.Column<string>(type: "varchar(38)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
industry = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
last_modified = table.Column<DateTime>(type: "timestamp", nullable: false),
spam = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'1'"),
calls = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'1'")
spam = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValueSql: "'1'"),
calls = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValueSql: "'1'")
},
constraints: table =>
{
@ -192,7 +193,7 @@ namespace ASC.MessagingSystem.Migrations.MySql.MessagesContextMySql
groupid = table.Column<string>(type: "varchar(38)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
ref_type = table.Column<int>(type: "int", nullable: false),
removed = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
removed = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValueSql: "'0'"),
last_modified = table.Column<DateTime>(type: "timestamp", nullable: false)
},
constraints: table =>
@ -262,6 +263,12 @@ namespace ASC.MessagingSystem.Migrations.MySql.MessagesContextMySql
table: "login_events",
columns: new[] { "tenant_id", "user_id" });
migrationBuilder.CreateIndex(
name: "alias",
table: "tenants_tenants",
column: "alias",
unique: true);
migrationBuilder.CreateIndex(
name: "last_modified",
table: "tenants_tenants",

View File

@ -7,7 +7,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace ASC.MessagingSystem.Migrations.MySql.MessagesContextMySql
namespace ASC.Core.Common.Migrations.MySql.MessagesContextMySql
{
[DbContext(typeof(MySqlMessagesContext))]
partial class MySqlMessagesContextModelSnapshot : ModelSnapshot
@ -33,9 +33,9 @@ namespace ASC.MessagingSystem.Migrations.MySql.MessagesContextMySql
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("Calls")
b.Property<bool>("Calls")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnType("tinyint(1)")
.HasColumnName("calls")
.HasDefaultValueSql("'1'");
@ -76,7 +76,6 @@ namespace ASC.MessagingSystem.Migrations.MySql.MessagesContextMySql
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("OwnerId")
.IsRequired()
.HasColumnType("varchar(38)")
.HasColumnName("owner_id")
.UseCollation("utf8_general_ci")
@ -88,9 +87,9 @@ namespace ASC.MessagingSystem.Migrations.MySql.MessagesContextMySql
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("Spam")
b.Property<bool>("Spam")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnType("tinyint(1)")
.HasColumnName("spam")
.HasDefaultValueSql("'1'");
@ -134,6 +133,10 @@ namespace ASC.MessagingSystem.Migrations.MySql.MessagesContextMySql
b.HasKey("Id");
b.HasIndex("Alias")
.IsUnique()
.HasDatabaseName("alias");
b.HasIndex("LastModified")
.HasDatabaseName("last_modified");
@ -152,12 +155,13 @@ namespace ASC.MessagingSystem.Migrations.MySql.MessagesContextMySql
{
Id = 1,
Alias = "localhost",
Calls = 0,
Calls = false,
CreationDateTime = new DateTime(2021, 3, 9, 17, 46, 59, 97, DateTimeKind.Utc).AddTicks(4317),
Industry = 0,
LastModified = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified),
Name = "Web Office",
OwnerId = "66faa6e4-f133-11ea-b126-00ffeec8b4ef",
Spam = 0,
Spam = false,
Status = 0,
TrustedDomainsEnabled = 0,
Version = 0
@ -291,14 +295,14 @@ namespace ASC.MessagingSystem.Migrations.MySql.MessagesContextMySql
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("Removed")
b.Property<bool>("Removed")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnType("tinyint(1)")
.HasColumnName("removed")
.HasDefaultValueSql("'0'");
b.Property<int?>("Sex")
.HasColumnType("int")
b.Property<bool?>("Sex")
.HasColumnType("tinyint(1)")
.HasColumnName("sex");
b.Property<string>("Sid")
@ -376,7 +380,7 @@ namespace ASC.MessagingSystem.Migrations.MySql.MessagesContextMySql
LastModified = new DateTime(2021, 3, 9, 9, 52, 55, 765, DateTimeKind.Utc).AddTicks(1420),
LastName = "",
MobilePhoneActivation = 0,
Removed = 0,
Removed = false,
Status = 1,
Tenant = 1,
UserName = "administrator",
@ -410,9 +414,9 @@ namespace ASC.MessagingSystem.Migrations.MySql.MessagesContextMySql
.HasColumnType("timestamp")
.HasColumnName("last_modified");
b.Property<int>("Removed")
b.Property<bool>("Removed")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnType("tinyint(1)")
.HasColumnName("removed")
.HasDefaultValueSql("'0'");
@ -517,6 +521,10 @@ namespace ASC.MessagingSystem.Migrations.MySql.MessagesContextMySql
.HasColumnType("int")
.HasColumnName("action");
b.Property<bool>("Active")
.HasColumnType("tinyint(1)")
.HasColumnName("active");
b.Property<string>("Browser")
.HasColumnType("varchar(200)")
.HasColumnName("browser")
@ -561,10 +569,6 @@ namespace ASC.MessagingSystem.Migrations.MySql.MessagesContextMySql
.HasColumnType("int")
.HasColumnName("tenant_id");
b.Property<int>("Active")
.HasColumnType("int")
.HasColumnName("active");
b.Property<string>("UserId")
.IsRequired()
.HasColumnType("char(38)")

View File

@ -11,7 +11,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace ASC.Core.Common.Migrations.MySql.NotifyDbContextMySql
{
[DbContext(typeof(MySqlNotifyDbContext))]
[Migration("20220708104410_NotifyDbContextMySql")]
[Migration("20220711152830_NotifyDbContextMySql")]
partial class NotifyDbContextMySql
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)

View File

@ -10,7 +10,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace ASC.Core.Common.Migrations.MySql.TelegramDbContextMySql
{
[DbContext(typeof(MySqlTelegramDbContext))]
[Migration("20220708104412_TelegramDbContextMySql")]
[Migration("20220711152832_TelegramDbContextMySql")]
partial class TelegramDbContextMySql
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)

View File

@ -11,7 +11,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace ASC.Core.Common.Migrations.MySql.TenantDbContextMySql
{
[DbContext(typeof(MySqlTenantDbContext))]
[Migration("20220708104414_TenantDbContextMySql")]
[Migration("20220711152834_TenantDbContextMySql")]
partial class TenantDbContextMySql
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
@ -87,9 +87,9 @@ namespace ASC.Core.Common.Migrations.MySql.TenantDbContextMySql
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("Calls")
b.Property<bool>("Calls")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnType("tinyint(1)")
.HasColumnName("calls")
.HasDefaultValueSql("'1'");
@ -130,7 +130,6 @@ namespace ASC.Core.Common.Migrations.MySql.TenantDbContextMySql
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("OwnerId")
.IsRequired()
.HasColumnType("varchar(38)")
.HasColumnName("owner_id")
.UseCollation("utf8_general_ci")
@ -142,9 +141,9 @@ namespace ASC.Core.Common.Migrations.MySql.TenantDbContextMySql
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("Spam")
b.Property<bool>("Spam")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnType("tinyint(1)")
.HasColumnName("spam")
.HasDefaultValueSql("'1'");
@ -188,6 +187,10 @@ namespace ASC.Core.Common.Migrations.MySql.TenantDbContextMySql
b.HasKey("Id");
b.HasIndex("Alias")
.IsUnique()
.HasDatabaseName("alias");
b.HasIndex("LastModified")
.HasDatabaseName("last_modified");
@ -206,12 +209,13 @@ namespace ASC.Core.Common.Migrations.MySql.TenantDbContextMySql
{
Id = 1,
Alias = "localhost",
Calls = 0,
Calls = false,
CreationDateTime = new DateTime(2021, 3, 9, 17, 46, 59, 97, DateTimeKind.Utc).AddTicks(4317),
Industry = 0,
LastModified = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified),
Name = "Web Office",
OwnerId = "66faa6e4-f133-11ea-b126-00ffeec8b4ef",
Spam = 0,
Spam = false,
Status = 0,
TrustedDomainsEnabled = 0,
Version = 0
@ -302,9 +306,9 @@ namespace ASC.Core.Common.Migrations.MySql.TenantDbContextMySql
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("Visible")
b.Property<bool>("Visible")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnType("tinyint(1)")
.HasColumnName("visible")
.HasDefaultValueSql("'0'");

View File

@ -100,14 +100,14 @@ namespace ASC.Core.Common.Migrations.MySql.TenantDbContextMySql
status = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
statuschanged = table.Column<DateTime>(type: "datetime", nullable: true),
creationdatetime = table.Column<DateTime>(type: "datetime", nullable: false),
owner_id = table.Column<string>(type: "varchar(38)", nullable: false, collation: "utf8_general_ci")
owner_id = table.Column<string>(type: "varchar(38)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
payment_id = table.Column<string>(type: "varchar(38)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
industry = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
last_modified = table.Column<DateTime>(type: "timestamp", nullable: false),
spam = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'1'"),
calls = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'1'")
spam = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValueSql: "'1'"),
calls = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValueSql: "'1'")
},
constraints: table =>
{
@ -125,7 +125,7 @@ namespace ASC.Core.Common.Migrations.MySql.TenantDbContextMySql
url = table.Column<string>(type: "varchar(64)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
default_version = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
visible = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'")
visible = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValueSql: "'0'")
},
constraints: table =>
{
@ -162,6 +162,12 @@ namespace ASC.Core.Common.Migrations.MySql.TenantDbContextMySql
table: "tenants_iprestrictions",
column: "tenant");
migrationBuilder.CreateIndex(
name: "alias",
table: "tenants_tenants",
column: "alias",
unique: true);
migrationBuilder.CreateIndex(
name: "last_modified",
table: "tenants_tenants",

View File

@ -85,9 +85,9 @@ namespace ASC.Core.Common.Migrations.MySql.TenantDbContextMySql
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("Calls")
b.Property<bool>("Calls")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnType("tinyint(1)")
.HasColumnName("calls")
.HasDefaultValueSql("'1'");
@ -128,7 +128,6 @@ namespace ASC.Core.Common.Migrations.MySql.TenantDbContextMySql
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("OwnerId")
.IsRequired()
.HasColumnType("varchar(38)")
.HasColumnName("owner_id")
.UseCollation("utf8_general_ci")
@ -140,9 +139,9 @@ namespace ASC.Core.Common.Migrations.MySql.TenantDbContextMySql
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("Spam")
b.Property<bool>("Spam")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnType("tinyint(1)")
.HasColumnName("spam")
.HasDefaultValueSql("'1'");
@ -186,6 +185,10 @@ namespace ASC.Core.Common.Migrations.MySql.TenantDbContextMySql
b.HasKey("Id");
b.HasIndex("Alias")
.IsUnique()
.HasDatabaseName("alias");
b.HasIndex("LastModified")
.HasDatabaseName("last_modified");
@ -204,12 +207,13 @@ namespace ASC.Core.Common.Migrations.MySql.TenantDbContextMySql
{
Id = 1,
Alias = "localhost",
Calls = 0,
Calls = false,
CreationDateTime = new DateTime(2021, 3, 9, 17, 46, 59, 97, DateTimeKind.Utc).AddTicks(4317),
Industry = 0,
LastModified = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified),
Name = "Web Office",
OwnerId = "66faa6e4-f133-11ea-b126-00ffeec8b4ef",
Spam = 0,
Spam = false,
Status = 0,
TrustedDomainsEnabled = 0,
Version = 0
@ -300,9 +304,9 @@ namespace ASC.Core.Common.Migrations.MySql.TenantDbContextMySql
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("Visible")
b.Property<bool>("Visible")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnType("tinyint(1)")
.HasColumnName("visible")
.HasDefaultValueSql("'0'");

View File

@ -11,7 +11,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql
{
[DbContext(typeof(MySqlUserDbContext))]
[Migration("20220708104402_UserDbContextMySql")]
[Migration("20220711152822_UserDbContextMySql")]
partial class UserDbContextMySql
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
@ -621,9 +621,9 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("Removed")
b.Property<bool>("Removed")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnType("tinyint(1)")
.HasColumnName("removed")
.HasDefaultValueSql("'0'");
@ -927,7 +927,7 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql
Source = "13ff36fb-0272-4887-b416-74f52b0d0b02",
Action = "CreateNewContact",
Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0",
Sender = "email.sender"
Sender = "email.sender|messanger.sender"
},
new
{
@ -977,9 +977,9 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("Unsubscribed")
b.Property<bool>("Unsubscribed")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnType("tinyint(1)")
.HasColumnName("unsubscribed")
.HasDefaultValueSql("'0'");
@ -998,7 +998,7 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql
Action = "send_whats_new",
Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1007,7 +1007,7 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql
Action = "new feed",
Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1016,7 +1016,7 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql
Action = "new post",
Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1025,7 +1025,7 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql
Action = "new topic in forum",
Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1034,7 +1034,7 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql
Action = "new photo uploaded",
Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1043,7 +1043,7 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql
Action = "new bookmark created",
Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1052,7 +1052,7 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql
Action = "new wiki page",
Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1061,7 +1061,7 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql
Action = "BirthdayReminder",
Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1070,7 +1070,7 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql
Action = "sharedocument",
Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1079,7 +1079,7 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql
Action = "sharefolder",
Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1088,7 +1088,7 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql
Action = "calendar_sharing",
Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1097,7 +1097,7 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql
Action = "event_alert",
Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1106,7 +1106,7 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql
Action = "admin_notify",
Recipient = "cd84e66b-b803-40fc-99f9-b2969a54a1de",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1115,7 +1115,7 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql
Action = "SetAccess",
Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1124,7 +1124,7 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql
Action = "ResponsibleForTask",
Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1133,7 +1133,7 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql
Action = "AddRelationshipEvent",
Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1142,7 +1142,7 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql
Action = "ExportCompleted",
Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1151,7 +1151,7 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql
Action = "CreateNewContact",
Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1160,7 +1160,7 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql
Action = "ResponsibleForOpportunity",
Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1169,7 +1169,7 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql
Action = "periodic_notify",
Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e",
Object = "",
Unsubscribed = 0
Unsubscribed = false
});
});
@ -1256,14 +1256,14 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("Removed")
b.Property<bool>("Removed")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnType("tinyint(1)")
.HasColumnName("removed")
.HasDefaultValueSql("'0'");
b.Property<int?>("Sex")
.HasColumnType("int")
b.Property<bool?>("Sex")
.HasColumnType("tinyint(1)")
.HasColumnName("sex");
b.Property<string>("Sid")
@ -1341,7 +1341,7 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql
LastModified = new DateTime(2021, 3, 9, 9, 52, 55, 765, DateTimeKind.Utc).AddTicks(1420),
LastName = "",
MobilePhoneActivation = 0,
Removed = 0,
Removed = false,
Status = 1,
Tenant = 1,
UserName = "administrator",
@ -1349,6 +1349,24 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql
});
});
modelBuilder.Entity("ASC.Core.Common.EF.UserDav", b =>
{
b.Property<int>("TenantId")
.HasColumnType("int")
.HasColumnName("tenant_id");
b.Property<string>("UserId")
.HasColumnType("varchar(38)")
.HasColumnName("userid")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.HasKey("TenantId", "UserId")
.HasName("PRIMARY");
b.ToTable("core_userdav", (string)null);
});
modelBuilder.Entity("ASC.Core.Common.EF.UserGroup", b =>
{
b.Property<int>("Tenant")
@ -1375,9 +1393,9 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql
.HasColumnType("timestamp")
.HasColumnName("last_modified");
b.Property<int>("Removed")
b.Property<bool>("Removed")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnType("tinyint(1)")
.HasColumnName("removed")
.HasDefaultValueSql("'0'");
@ -1401,7 +1419,7 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql
GroupId = "cd84e66b-b803-40fc-99f9-b2969a54a1de",
RefType = 0,
LastModified = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified),
Removed = 0
Removed = false
});
});
@ -1453,12 +1471,6 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("PwdHashSha512")
.HasColumnType("varchar(512)")
.HasColumnName("pwdhashsha512")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("Tenant")
.HasColumnType("int")
.HasColumnName("tenant");

View File

@ -46,7 +46,7 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql
.Annotation("MySql:CharSet", "utf8"),
sid = table.Column<string>(type: "varchar(512)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
removed = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
removed = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValueSql: "'0'"),
last_modified = table.Column<DateTime>(type: "timestamp", nullable: false)
},
constraints: table =>
@ -68,7 +68,7 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql
.Annotation("MySql:CharSet", "utf8"),
@object = table.Column<string>(name: "object", type: "varchar(128)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
unsubscribed = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'")
unsubscribed = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValueSql: "'0'")
},
constraints: table =>
{
@ -109,7 +109,7 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql
.Annotation("MySql:CharSet", "utf8"),
lastname = table.Column<string>(type: "varchar(64)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
sex = table.Column<int>(type: "int", nullable: true),
sex = table.Column<bool>(type: "tinyint(1)", nullable: true),
bithdate = table.Column<DateTime>(type: "datetime", nullable: true),
status = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'1'"),
activation_status = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
@ -136,7 +136,7 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql
.Annotation("MySql:CharSet", "utf8"),
sso_session_id = table.Column<string>(type: "varchar(512)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
removed = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
removed = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValueSql: "'0'"),
create_on = table.Column<DateTime>(type: "timestamp", nullable: false),
last_modified = table.Column<DateTime>(type: "datetime", nullable: false)
},
@ -146,6 +146,20 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql
})
.Annotation("MySql:CharSet", "utf8");
migrationBuilder.CreateTable(
name: "core_userdav",
columns: table => new
{
tenant_id = table.Column<int>(type: "int", nullable: false),
userid = table.Column<string>(type: "varchar(38)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8")
},
constraints: table =>
{
table.PrimaryKey("PRIMARY", x => new { x.tenant_id, x.userid });
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "core_userphoto",
columns: table => new
@ -170,8 +184,6 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql
tenant = table.Column<int>(type: "int", nullable: false),
pwdhash = table.Column<string>(type: "varchar(512)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
pwdhashsha512 = table.Column<string>(type: "varchar(512)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
LastModified = table.Column<DateTime>(type: "timestamp", nullable: false)
},
constraints: table =>
@ -190,7 +202,7 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql
groupid = table.Column<string>(type: "varchar(38)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
ref_type = table.Column<int>(type: "int", nullable: false),
removed = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
removed = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValueSql: "'0'"),
last_modified = table.Column<DateTime>(type: "timestamp", nullable: false)
},
constraints: table =>
@ -311,7 +323,7 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql
values: new object[,]
{
{ "AddRelationshipEvent", "abef62db-11a8-4673-9d32-ef1d8af19dc0", "13ff36fb-0272-4887-b416-74f52b0d0b02", -1, "email.sender|messanger.sender" },
{ "CreateNewContact", "abef62db-11a8-4673-9d32-ef1d8af19dc0", "13ff36fb-0272-4887-b416-74f52b0d0b02", -1, "email.sender" },
{ "CreateNewContact", "abef62db-11a8-4673-9d32-ef1d8af19dc0", "13ff36fb-0272-4887-b416-74f52b0d0b02", -1, "email.sender|messanger.sender" },
{ "ExportCompleted", "abef62db-11a8-4673-9d32-ef1d8af19dc0", "13ff36fb-0272-4887-b416-74f52b0d0b02", -1, "email.sender|messanger.sender" },
{ "ResponsibleForOpportunity", "abef62db-11a8-4673-9d32-ef1d8af19dc0", "13ff36fb-0272-4887-b416-74f52b0d0b02", -1, "email.sender|messanger.sender" },
{ "ResponsibleForTask", "abef62db-11a8-4673-9d32-ef1d8af19dc0", "13ff36fb-0272-4887-b416-74f52b0d0b02", -1, "email.sender|messanger.sender" },
@ -351,8 +363,8 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql
migrationBuilder.InsertData(
table: "core_usersecurity",
columns: new[] { "userid", "LastModified", "pwdhash", "pwdhashsha512", "tenant" },
values: new object[] { "66faa6e4-f133-11ea-b126-00ffeec8b4ef", new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), "jGl25bVBBBW96Qi9Te4V37Fnqchz/Eu4qB9vKrRIqRg=", null, 1 });
columns: new[] { "userid", "LastModified", "pwdhash", "tenant" },
values: new object[] { "66faa6e4-f133-11ea-b126-00ffeec8b4ef", new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), "jGl25bVBBBW96Qi9Te4V37Fnqchz/Eu4qB9vKrRIqRg=", 1 });
migrationBuilder.InsertData(
table: "core_usergroup",
@ -424,6 +436,9 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql
migrationBuilder.DropTable(
name: "core_subscriptionmethod");
migrationBuilder.DropTable(
name: "core_userdav");
migrationBuilder.DropTable(
name: "core_usergroup");

View File

@ -619,9 +619,9 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("Removed")
b.Property<bool>("Removed")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnType("tinyint(1)")
.HasColumnName("removed")
.HasDefaultValueSql("'0'");
@ -925,7 +925,7 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql
Source = "13ff36fb-0272-4887-b416-74f52b0d0b02",
Action = "CreateNewContact",
Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0",
Sender = "email.sender"
Sender = "email.sender|messanger.sender"
},
new
{
@ -975,9 +975,9 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("Unsubscribed")
b.Property<bool>("Unsubscribed")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnType("tinyint(1)")
.HasColumnName("unsubscribed")
.HasDefaultValueSql("'0'");
@ -996,7 +996,7 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql
Action = "send_whats_new",
Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1005,7 +1005,7 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql
Action = "new feed",
Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1014,7 +1014,7 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql
Action = "new post",
Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1023,7 +1023,7 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql
Action = "new topic in forum",
Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1032,7 +1032,7 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql
Action = "new photo uploaded",
Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1041,7 +1041,7 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql
Action = "new bookmark created",
Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1050,7 +1050,7 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql
Action = "new wiki page",
Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1059,7 +1059,7 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql
Action = "BirthdayReminder",
Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1068,7 +1068,7 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql
Action = "sharedocument",
Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1077,7 +1077,7 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql
Action = "sharefolder",
Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1086,7 +1086,7 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql
Action = "calendar_sharing",
Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1095,7 +1095,7 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql
Action = "event_alert",
Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1104,7 +1104,7 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql
Action = "admin_notify",
Recipient = "cd84e66b-b803-40fc-99f9-b2969a54a1de",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1113,7 +1113,7 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql
Action = "SetAccess",
Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1122,7 +1122,7 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql
Action = "ResponsibleForTask",
Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1131,7 +1131,7 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql
Action = "AddRelationshipEvent",
Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1140,7 +1140,7 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql
Action = "ExportCompleted",
Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1149,7 +1149,7 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql
Action = "CreateNewContact",
Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1158,7 +1158,7 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql
Action = "ResponsibleForOpportunity",
Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1167,7 +1167,7 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql
Action = "periodic_notify",
Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e",
Object = "",
Unsubscribed = 0
Unsubscribed = false
});
});
@ -1254,14 +1254,14 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("Removed")
b.Property<bool>("Removed")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnType("tinyint(1)")
.HasColumnName("removed")
.HasDefaultValueSql("'0'");
b.Property<int?>("Sex")
.HasColumnType("int")
b.Property<bool?>("Sex")
.HasColumnType("tinyint(1)")
.HasColumnName("sex");
b.Property<string>("Sid")
@ -1339,7 +1339,7 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql
LastModified = new DateTime(2021, 3, 9, 9, 52, 55, 765, DateTimeKind.Utc).AddTicks(1420),
LastName = "",
MobilePhoneActivation = 0,
Removed = 0,
Removed = false,
Status = 1,
Tenant = 1,
UserName = "administrator",
@ -1347,6 +1347,24 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql
});
});
modelBuilder.Entity("ASC.Core.Common.EF.UserDav", b =>
{
b.Property<int>("TenantId")
.HasColumnType("int")
.HasColumnName("tenant_id");
b.Property<string>("UserId")
.HasColumnType("varchar(38)")
.HasColumnName("userid")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.HasKey("TenantId", "UserId")
.HasName("PRIMARY");
b.ToTable("core_userdav", (string)null);
});
modelBuilder.Entity("ASC.Core.Common.EF.UserGroup", b =>
{
b.Property<int>("Tenant")
@ -1373,9 +1391,9 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql
.HasColumnType("timestamp")
.HasColumnName("last_modified");
b.Property<int>("Removed")
b.Property<bool>("Removed")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnType("tinyint(1)")
.HasColumnName("removed")
.HasDefaultValueSql("'0'");
@ -1399,7 +1417,7 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql
GroupId = "cd84e66b-b803-40fc-99f9-b2969a54a1de",
RefType = 0,
LastModified = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified),
Removed = 0
Removed = false
});
});
@ -1451,12 +1469,6 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("PwdHashSha512")
.HasColumnType("varchar(512)")
.HasColumnName("pwdhashsha512")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("Tenant")
.HasColumnType("int")
.HasColumnName("tenant");

View File

@ -11,7 +11,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace ASC.Core.Common.Migrations.MySql.VoipDbContextMySql
{
[DbContext(typeof(MySqlVoipDbContext))]
[Migration("20220708104416_VoipDbContextMySql")]
[Migration("20220711152836_VoipDbContextMySql")]
partial class VoipDbContextMySql
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
@ -83,8 +83,8 @@ namespace ASC.Core.Common.Migrations.MySql.VoipDbContextMySql
.HasColumnType("tinyint(1)")
.HasColumnName("is_company");
b.Property<sbyte?>("IsShared")
.HasColumnType("tinyint")
b.Property<bool?>("IsShared")
.HasColumnType("tinyint(1)")
.HasColumnName("is_shared");
b.Property<string>("LastModifedBy")

View File

@ -44,7 +44,7 @@ namespace ASC.Core.Common.Migrations.MySql.VoipDbContextMySql
last_modifed_on = table.Column<DateTime>(type: "datetime", nullable: true),
display_name = table.Column<string>(type: "varchar(255)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
is_shared = table.Column<sbyte>(type: "tinyint", nullable: true),
is_shared = table.Column<bool>(type: "tinyint(1)", nullable: true),
currency = table.Column<string>(type: "varchar(3)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8")
},

View File

@ -81,8 +81,8 @@ namespace ASC.Core.Common.Migrations.MySql.VoipDbContextMySql
.HasColumnType("tinyint(1)")
.HasColumnName("is_company");
b.Property<sbyte?>("IsShared")
.HasColumnType("tinyint")
b.Property<bool?>("IsShared")
.HasColumnType("tinyint(1)")
.HasColumnName("is_shared");
b.Property<string>("LastModifedBy")

View File

@ -1,141 +0,0 @@
// <auto-generated />
using System;
using ASC.Core.Common.EF.Context;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace ASC.Core.Common.Migrations.MySql.WebstudioDbContextMySql
{
[DbContext(typeof(MySqlWebstudioDbContext))]
[Migration("20220708104418_WebstudioDbContextMySql")]
partial class WebstudioDbContextMySql
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "6.0.4")
.HasAnnotation("Relational:MaxIdentifierLength", 64);
modelBuilder.Entity("ASC.Core.Common.EF.Model.DbWebstudioIndex", b =>
{
b.Property<string>("IndexName")
.HasColumnType("varchar(50)")
.HasColumnName("index_name")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<DateTime>("LastModified")
.HasColumnType("timestamp")
.HasColumnName("last_modified");
b.HasKey("IndexName")
.HasName("PRIMARY");
b.ToTable("webstudio_index", (string)null);
b.HasAnnotation("MySql:CharSet", "utf8");
});
modelBuilder.Entity("ASC.Core.Common.EF.Model.DbWebstudioSettings", b =>
{
b.Property<int>("TenantId")
.HasColumnType("int")
.HasColumnName("TenantID");
b.Property<string>("Id")
.HasColumnType("varchar(64)")
.HasColumnName("ID")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("UserId")
.HasColumnType("varchar(64)")
.HasColumnName("UserID")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("Data")
.IsRequired()
.HasColumnType("mediumtext")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.HasKey("TenantId", "Id", "UserId")
.HasName("PRIMARY");
b.HasIndex("Id")
.HasDatabaseName("ID");
b.ToTable("webstudio_settings", (string)null);
b.HasAnnotation("MySql:CharSet", "utf8");
b.HasData(
new
{
TenantId = 1,
Id = "9a925891-1f92-4ed7-b277-d6f649739f06",
UserId = "00000000-0000-0000-0000-000000000000",
Data = "{\"Completed\":false}"
});
});
modelBuilder.Entity("ASC.Core.Common.EF.Model.DbWebstudioUserVisit", b =>
{
b.Property<int>("TenantId")
.HasColumnType("int")
.HasColumnName("tenantid");
b.Property<DateTime>("VisitDate")
.HasColumnType("datetime")
.HasColumnName("visitdate");
b.Property<string>("ProductId")
.HasColumnType("varchar(38)")
.HasColumnName("productid")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("UserId")
.HasColumnType("varchar(38)")
.HasColumnName("userid")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<DateTime?>("FirstVisitTime")
.ValueGeneratedOnAdd()
.HasColumnType("datetime")
.HasColumnName("firstvisittime")
.HasDefaultValueSql("NULL");
b.Property<DateTime?>("LastVisitTime")
.ValueGeneratedOnAdd()
.HasColumnType("datetime")
.HasColumnName("lastvisittime")
.HasDefaultValueSql("NULL");
b.Property<int>("VisitCount")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("visitcount")
.HasDefaultValueSql("'0'");
b.HasKey("TenantId", "VisitDate", "ProductId", "UserId")
.HasName("PRIMARY");
b.HasIndex("VisitDate")
.HasDatabaseName("visitdate");
b.ToTable("webstudio_uservisit", (string)null);
b.HasAnnotation("MySql:CharSet", "utf8");
});
#pragma warning restore 612, 618
}
}
}

View File

@ -1,95 +0,0 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace ASC.Core.Common.Migrations.MySql.WebstudioDbContextMySql
{
public partial class WebstudioDbContextMySql : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterDatabase()
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "webstudio_index",
columns: table => new
{
index_name = table.Column<string>(type: "varchar(50)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
last_modified = table.Column<DateTime>(type: "timestamp", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PRIMARY", x => x.index_name);
})
.Annotation("MySql:CharSet", "utf8");
migrationBuilder.CreateTable(
name: "webstudio_settings",
columns: table => new
{
TenantID = table.Column<int>(type: "int", nullable: false),
ID = table.Column<string>(type: "varchar(64)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
UserID = table.Column<string>(type: "varchar(64)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
Data = table.Column<string>(type: "mediumtext", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8")
},
constraints: table =>
{
table.PrimaryKey("PRIMARY", x => new { x.TenantID, x.ID, x.UserID });
})
.Annotation("MySql:CharSet", "utf8");
migrationBuilder.CreateTable(
name: "webstudio_uservisit",
columns: table => new
{
tenantid = table.Column<int>(type: "int", nullable: false),
visitdate = table.Column<DateTime>(type: "datetime", nullable: false),
productid = table.Column<string>(type: "varchar(38)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
userid = table.Column<string>(type: "varchar(38)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
visitcount = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
firstvisittime = table.Column<DateTime>(type: "datetime", nullable: true, defaultValueSql: "NULL"),
lastvisittime = table.Column<DateTime>(type: "datetime", nullable: true, defaultValueSql: "NULL")
},
constraints: table =>
{
table.PrimaryKey("PRIMARY", x => new { x.tenantid, x.visitdate, x.productid, x.userid });
})
.Annotation("MySql:CharSet", "utf8");
migrationBuilder.InsertData(
table: "webstudio_settings",
columns: new[] { "ID", "TenantID", "UserID", "Data" },
values: new object[] { "9a925891-1f92-4ed7-b277-d6f649739f06", 1, "00000000-0000-0000-0000-000000000000", "{\"Completed\":false}" });
migrationBuilder.CreateIndex(
name: "ID",
table: "webstudio_settings",
column: "ID");
migrationBuilder.CreateIndex(
name: "visitdate",
table: "webstudio_uservisit",
column: "visitdate");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "webstudio_index");
migrationBuilder.DropTable(
name: "webstudio_settings");
migrationBuilder.DropTable(
name: "webstudio_uservisit");
}
}
}

View File

@ -0,0 +1,290 @@
// <auto-generated />
using System;
using ASC.Core.Common.EF.Context;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace ASC.Core.Common.Migrations.MySql.WebstudioDbContextMySql
{
[DbContext(typeof(MySqlWebstudioDbContext))]
[Migration("20220711152838_WebstudioDbContextMySql")]
partial class WebstudioDbContextMySql
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "6.0.4")
.HasAnnotation("Relational:MaxIdentifierLength", 64);
modelBuilder.Entity("ASC.Core.Common.EF.Model.DbTenant", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("id");
b.Property<string>("Alias")
.IsRequired()
.HasColumnType("varchar(100)")
.HasColumnName("alias")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<bool>("Calls")
.ValueGeneratedOnAdd()
.HasColumnType("tinyint(1)")
.HasColumnName("calls")
.HasDefaultValueSql("'1'");
b.Property<DateTime>("CreationDateTime")
.HasColumnType("datetime")
.HasColumnName("creationdatetime");
b.Property<int>("Industry")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("industry")
.HasDefaultValueSql("'0'");
b.Property<string>("Language")
.IsRequired()
.ValueGeneratedOnAdd()
.HasColumnType("char(10)")
.HasColumnName("language")
.HasDefaultValueSql("'en-US'")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<DateTime>("LastModified")
.HasColumnType("timestamp")
.HasColumnName("last_modified");
b.Property<string>("MappedDomain")
.HasColumnType("varchar(100)")
.HasColumnName("mappeddomain")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("varchar(255)")
.HasColumnName("name")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("OwnerId")
.HasColumnType("varchar(38)")
.HasColumnName("owner_id")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("PaymentId")
.HasColumnType("varchar(38)")
.HasColumnName("payment_id")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<bool>("Spam")
.ValueGeneratedOnAdd()
.HasColumnType("tinyint(1)")
.HasColumnName("spam")
.HasDefaultValueSql("'1'");
b.Property<int>("Status")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("status")
.HasDefaultValueSql("'0'");
b.Property<DateTime?>("StatusChanged")
.HasColumnType("datetime")
.HasColumnName("statuschanged");
b.Property<string>("TimeZone")
.HasColumnType("varchar(50)")
.HasColumnName("timezone")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("TrustedDomainsEnabled")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("trusteddomainsenabled")
.HasDefaultValueSql("'1'");
b.Property<string>("TrustedDomainsRaw")
.HasColumnType("varchar(1024)")
.HasColumnName("trusteddomains")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("Version")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("version")
.HasDefaultValueSql("'2'");
b.Property<DateTime?>("Version_Changed")
.HasColumnType("datetime")
.HasColumnName("version_changed");
b.HasKey("Id");
b.HasIndex("Alias")
.IsUnique()
.HasDatabaseName("alias");
b.HasIndex("LastModified")
.HasDatabaseName("last_modified");
b.HasIndex("MappedDomain")
.HasDatabaseName("mappeddomain");
b.HasIndex("Version")
.HasDatabaseName("version");
b.ToTable("tenants_tenants", (string)null);
b.HasAnnotation("MySql:CharSet", "utf8");
b.HasData(
new
{
Id = 1,
Alias = "localhost",
Calls = false,
CreationDateTime = new DateTime(2021, 3, 9, 17, 46, 59, 97, DateTimeKind.Utc).AddTicks(4317),
Industry = 0,
LastModified = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified),
Name = "Web Office",
OwnerId = "66faa6e4-f133-11ea-b126-00ffeec8b4ef",
Spam = false,
Status = 0,
TrustedDomainsEnabled = 0,
Version = 0
});
});
modelBuilder.Entity("ASC.Core.Common.EF.Model.DbWebstudioIndex", b =>
{
b.Property<string>("IndexName")
.HasColumnType("varchar(50)")
.HasColumnName("index_name")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<DateTime>("LastModified")
.HasColumnType("timestamp")
.HasColumnName("last_modified");
b.HasKey("IndexName")
.HasName("PRIMARY");
b.ToTable("webstudio_index", (string)null);
b.HasAnnotation("MySql:CharSet", "utf8");
});
modelBuilder.Entity("ASC.Core.Common.EF.Model.DbWebstudioSettings", b =>
{
b.Property<int>("TenantId")
.HasColumnType("int")
.HasColumnName("TenantID");
b.Property<string>("Id")
.HasColumnType("varchar(64)")
.HasColumnName("ID")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("UserId")
.HasColumnType("varchar(64)")
.HasColumnName("UserID")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("Data")
.IsRequired()
.HasColumnType("mediumtext")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.HasKey("TenantId", "Id", "UserId")
.HasName("PRIMARY");
b.HasIndex("Id")
.HasDatabaseName("ID");
b.ToTable("webstudio_settings", (string)null);
b.HasAnnotation("MySql:CharSet", "utf8");
b.HasData(
new
{
TenantId = 1,
Id = "9a925891-1f92-4ed7-b277-d6f649739f06",
UserId = "00000000-0000-0000-0000-000000000000",
Data = "{\"Completed\":false}"
});
});
modelBuilder.Entity("ASC.Core.Common.EF.Model.DbWebstudioUserVisit", b =>
{
b.Property<int>("TenantId")
.HasColumnType("int")
.HasColumnName("tenantid");
b.Property<DateTime>("VisitDate")
.HasColumnType("datetime")
.HasColumnName("visitdate");
b.Property<string>("ProductId")
.HasColumnType("varchar(38)")
.HasColumnName("productid")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("UserId")
.HasColumnType("varchar(38)")
.HasColumnName("userid")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<DateTime?>("FirstVisitTime")
.ValueGeneratedOnAdd()
.HasColumnType("datetime")
.HasColumnName("firstvisittime")
.HasDefaultValueSql("NULL");
b.Property<DateTime?>("LastVisitTime")
.ValueGeneratedOnAdd()
.HasColumnType("datetime")
.HasColumnName("lastvisittime")
.HasDefaultValueSql("NULL");
b.Property<int>("VisitCount")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("visitcount")
.HasDefaultValueSql("'0'");
b.HasKey("TenantId", "VisitDate", "ProductId", "UserId")
.HasName("PRIMARY");
b.HasIndex("VisitDate")
.HasDatabaseName("visitdate");
b.ToTable("webstudio_uservisit", (string)null);
b.HasAnnotation("MySql:CharSet", "utf8");
});
#pragma warning restore 612, 618
}
}
}

View File

@ -0,0 +1,164 @@
using System;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace ASC.Core.Common.Migrations.MySql.WebstudioDbContextMySql
{
public partial class WebstudioDbContextMySql : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterDatabase()
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "tenants_tenants",
columns: table => new
{
id = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
name = table.Column<string>(type: "varchar(255)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
alias = table.Column<string>(type: "varchar(100)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
mappeddomain = table.Column<string>(type: "varchar(100)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
version = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'2'"),
version_changed = table.Column<DateTime>(type: "datetime", nullable: true),
language = table.Column<string>(type: "char(10)", nullable: false, defaultValueSql: "'en-US'", collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
timezone = table.Column<string>(type: "varchar(50)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
trusteddomains = table.Column<string>(type: "varchar(1024)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
trusteddomainsenabled = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'1'"),
status = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
statuschanged = table.Column<DateTime>(type: "datetime", nullable: true),
creationdatetime = table.Column<DateTime>(type: "datetime", nullable: false),
owner_id = table.Column<string>(type: "varchar(38)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
payment_id = table.Column<string>(type: "varchar(38)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
industry = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
last_modified = table.Column<DateTime>(type: "timestamp", nullable: false),
spam = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValueSql: "'1'"),
calls = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValueSql: "'1'")
},
constraints: table =>
{
table.PrimaryKey("PK_tenants_tenants", x => x.id);
})
.Annotation("MySql:CharSet", "utf8");
migrationBuilder.CreateTable(
name: "webstudio_index",
columns: table => new
{
index_name = table.Column<string>(type: "varchar(50)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
last_modified = table.Column<DateTime>(type: "timestamp", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PRIMARY", x => x.index_name);
})
.Annotation("MySql:CharSet", "utf8");
migrationBuilder.CreateTable(
name: "webstudio_settings",
columns: table => new
{
TenantID = table.Column<int>(type: "int", nullable: false),
ID = table.Column<string>(type: "varchar(64)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
UserID = table.Column<string>(type: "varchar(64)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
Data = table.Column<string>(type: "mediumtext", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8")
},
constraints: table =>
{
table.PrimaryKey("PRIMARY", x => new { x.TenantID, x.ID, x.UserID });
})
.Annotation("MySql:CharSet", "utf8");
migrationBuilder.CreateTable(
name: "webstudio_uservisit",
columns: table => new
{
tenantid = table.Column<int>(type: "int", nullable: false),
visitdate = table.Column<DateTime>(type: "datetime", nullable: false),
productid = table.Column<string>(type: "varchar(38)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
userid = table.Column<string>(type: "varchar(38)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
visitcount = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
firstvisittime = table.Column<DateTime>(type: "datetime", nullable: true, defaultValueSql: "NULL"),
lastvisittime = table.Column<DateTime>(type: "datetime", nullable: true, defaultValueSql: "NULL")
},
constraints: table =>
{
table.PrimaryKey("PRIMARY", x => new { x.tenantid, x.visitdate, x.productid, x.userid });
})
.Annotation("MySql:CharSet", "utf8");
migrationBuilder.InsertData(
table: "tenants_tenants",
columns: new[] { "id", "alias", "creationdatetime", "last_modified", "mappeddomain", "name", "owner_id", "payment_id", "statuschanged", "timezone", "trusteddomains", "version_changed" },
values: new object[] { 1, "localhost", new DateTime(2021, 3, 9, 17, 46, 59, 97, DateTimeKind.Utc).AddTicks(4317), new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), null, "Web Office", "66faa6e4-f133-11ea-b126-00ffeec8b4ef", null, null, null, null, null });
migrationBuilder.InsertData(
table: "webstudio_settings",
columns: new[] { "ID", "TenantID", "UserID", "Data" },
values: new object[] { "9a925891-1f92-4ed7-b277-d6f649739f06", 1, "00000000-0000-0000-0000-000000000000", "{\"Completed\":false}" });
migrationBuilder.CreateIndex(
name: "alias",
table: "tenants_tenants",
column: "alias",
unique: true);
migrationBuilder.CreateIndex(
name: "last_modified",
table: "tenants_tenants",
column: "last_modified");
migrationBuilder.CreateIndex(
name: "mappeddomain",
table: "tenants_tenants",
column: "mappeddomain");
migrationBuilder.CreateIndex(
name: "version",
table: "tenants_tenants",
column: "version");
migrationBuilder.CreateIndex(
name: "ID",
table: "webstudio_settings",
column: "ID");
migrationBuilder.CreateIndex(
name: "visitdate",
table: "webstudio_uservisit",
column: "visitdate");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "tenants_tenants");
migrationBuilder.DropTable(
name: "webstudio_index");
migrationBuilder.DropTable(
name: "webstudio_settings");
migrationBuilder.DropTable(
name: "webstudio_uservisit");
}
}
}

View File

@ -19,6 +19,155 @@ namespace ASC.Core.Common.Migrations.MySql.WebstudioDbContextMySql
.HasAnnotation("ProductVersion", "6.0.4")
.HasAnnotation("Relational:MaxIdentifierLength", 64);
modelBuilder.Entity("ASC.Core.Common.EF.Model.DbTenant", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("id");
b.Property<string>("Alias")
.IsRequired()
.HasColumnType("varchar(100)")
.HasColumnName("alias")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<bool>("Calls")
.ValueGeneratedOnAdd()
.HasColumnType("tinyint(1)")
.HasColumnName("calls")
.HasDefaultValueSql("'1'");
b.Property<DateTime>("CreationDateTime")
.HasColumnType("datetime")
.HasColumnName("creationdatetime");
b.Property<int>("Industry")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("industry")
.HasDefaultValueSql("'0'");
b.Property<string>("Language")
.IsRequired()
.ValueGeneratedOnAdd()
.HasColumnType("char(10)")
.HasColumnName("language")
.HasDefaultValueSql("'en-US'")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<DateTime>("LastModified")
.HasColumnType("timestamp")
.HasColumnName("last_modified");
b.Property<string>("MappedDomain")
.HasColumnType("varchar(100)")
.HasColumnName("mappeddomain")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("varchar(255)")
.HasColumnName("name")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("OwnerId")
.HasColumnType("varchar(38)")
.HasColumnName("owner_id")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("PaymentId")
.HasColumnType("varchar(38)")
.HasColumnName("payment_id")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<bool>("Spam")
.ValueGeneratedOnAdd()
.HasColumnType("tinyint(1)")
.HasColumnName("spam")
.HasDefaultValueSql("'1'");
b.Property<int>("Status")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("status")
.HasDefaultValueSql("'0'");
b.Property<DateTime?>("StatusChanged")
.HasColumnType("datetime")
.HasColumnName("statuschanged");
b.Property<string>("TimeZone")
.HasColumnType("varchar(50)")
.HasColumnName("timezone")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("TrustedDomainsEnabled")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("trusteddomainsenabled")
.HasDefaultValueSql("'1'");
b.Property<string>("TrustedDomainsRaw")
.HasColumnType("varchar(1024)")
.HasColumnName("trusteddomains")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("Version")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("version")
.HasDefaultValueSql("'2'");
b.Property<DateTime?>("Version_Changed")
.HasColumnType("datetime")
.HasColumnName("version_changed");
b.HasKey("Id");
b.HasIndex("Alias")
.IsUnique()
.HasDatabaseName("alias");
b.HasIndex("LastModified")
.HasDatabaseName("last_modified");
b.HasIndex("MappedDomain")
.HasDatabaseName("mappeddomain");
b.HasIndex("Version")
.HasDatabaseName("version");
b.ToTable("tenants_tenants", (string)null);
b.HasAnnotation("MySql:CharSet", "utf8");
b.HasData(
new
{
Id = 1,
Alias = "localhost",
Calls = false,
CreationDateTime = new DateTime(2021, 3, 9, 17, 46, 59, 97, DateTimeKind.Utc).AddTicks(4317),
Industry = 0,
LastModified = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified),
Name = "Web Office",
OwnerId = "66faa6e4-f133-11ea-b126-00ffeec8b4ef",
Spam = false,
Status = 0,
TrustedDomainsEnabled = 0,
Version = 0
});
});
modelBuilder.Entity("ASC.Core.Common.EF.Model.DbWebstudioIndex", b =>
{
b.Property<string>("IndexName")

View File

@ -11,7 +11,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace ASC.Core.Common.Migrations.PostgreSql.AccountLinkContextPostgreSql
{
[DbContext(typeof(PostgreSqlAccountLinkContext))]
[Migration("20220708104405_AccountLinkContextPostgreSql")]
[Migration("20220711152825_AccountLinkContextPostgreSql")]
partial class AccountLinkContextPostgreSql
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)

View File

@ -11,7 +11,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace ASC.Core.Common.Migrations.PostgreSql.CoreDbContextPostgreSql
{
[DbContext(typeof(PostgreSqlCoreDbContext))]
[Migration("20220708104401_CoreDbContextPostgreSql")]
[Migration("20220711152821_CoreDbContextPostgreSql")]
partial class CoreDbContextPostgreSql
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
@ -102,9 +102,9 @@ namespace ASC.Core.Common.Migrations.PostgreSql.CoreDbContextPostgreSql
.HasColumnName("price")
.HasDefaultValueSql("'0.00'");
b.Property<int>("Visible")
b.Property<bool>("Visible")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnType("tinyint(1)")
.HasColumnName("visible")
.HasDefaultValueSql("'0'");
@ -121,12 +121,12 @@ namespace ASC.Core.Common.Migrations.PostgreSql.CoreDbContextPostgreSql
Tenant = -1,
ActiveUsers = 10000,
AvangateId = "0",
Features = "update",
Features = "domain,audit,controlpanel,healthcheck,ldap,sso,whitelabel,branding,ssbranding,update,support,portals:10000,discencryption,privacyroom,restore",
MaxFileSize = 102400L,
MaxTotalSize = 10995116277760L,
Name = "default",
Price = 0.00m,
Visible = 0
Visible = false
});
});

View File

@ -46,7 +46,7 @@ namespace ASC.Core.Common.Migrations.PostgreSql.CoreDbContextPostgreSql
price = table.Column<decimal>(type: "decimal(10,2)", nullable: false, defaultValueSql: "'0.00'"),
avangate_id = table.Column<string>(type: "varchar(128)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
visible = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'")
visible = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValueSql: "'0'")
},
constraints: table =>
{

View File

@ -100,9 +100,9 @@ namespace ASC.Core.Common.Migrations.PostgreSql.CoreDbContextPostgreSql
.HasColumnName("price")
.HasDefaultValueSql("'0.00'");
b.Property<int>("Visible")
b.Property<bool>("Visible")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnType("tinyint(1)")
.HasColumnName("visible")
.HasDefaultValueSql("'0'");
@ -119,12 +119,12 @@ namespace ASC.Core.Common.Migrations.PostgreSql.CoreDbContextPostgreSql
Tenant = -1,
ActiveUsers = 10000,
AvangateId = "0",
Features = "update",
Features = "domain,audit,controlpanel,healthcheck,ldap,sso,whitelabel,branding,ssbranding,update,support,portals:10000,discencryption,privacyroom,restore",
MaxFileSize = 102400L,
MaxTotalSize = 10995116277760L,
Name = "default",
Price = 0.00m,
Visible = 0
Visible = false
});
});

View File

@ -11,7 +11,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace ASC.Core.Common.Migrations.PostgreSql.DbContextPostgreSql
{
[DbContext(typeof(PostgreSqlDbContext))]
[Migration("20220708104407_DbContextPostgreSql")]
[Migration("20220711152827_DbContextPostgreSql")]
partial class DbContextPostgreSql
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)

View File

@ -10,7 +10,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace ASC.Core.Common.Migrations.PostgreSql.FilesDbContextPostgreSql
{
[DbContext(typeof(PostgreSqlFilesDbContext))]
[Migration("20220708104409_FilesDbContextPostgreSql")]
[Migration("20220711152829_FilesDbContextPostgreSql")]
partial class FilesDbContextPostgreSql
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)

View File

@ -11,7 +11,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace ASC.Core.Common.Migrations.PostgreSql.IntegrationEventLogContextPostgreSql
{
[DbContext(typeof(PostgreSqlIntegrationEventLogContext))]
[Migration("20220708104359_IntegrationEventLogContextPostgreSql")]
[Migration("20220711152819_IntegrationEventLogContextPostgreSql")]
partial class IntegrationEventLogContextPostgreSql
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)

View File

@ -8,10 +8,10 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace ASC.MessagingSystem.Migrations.PostgreSql.MessagesContextPostgreSql
namespace ASC.Core.Common.Migrations.PostgreSql.MessagesContextPostgreSql
{
[DbContext(typeof(PostgreSqlMessagesContext))]
[Migration("20220708104429_MessagesContextPostgreSql")]
[Migration("20220711152817_MessagesContextPostgreSql")]
partial class MessagesContextPostgreSql
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
@ -35,9 +35,9 @@ namespace ASC.MessagingSystem.Migrations.PostgreSql.MessagesContextPostgreSql
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("Calls")
b.Property<bool>("Calls")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnType("tinyint(1)")
.HasColumnName("calls")
.HasDefaultValueSql("'1'");
@ -78,7 +78,6 @@ namespace ASC.MessagingSystem.Migrations.PostgreSql.MessagesContextPostgreSql
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("OwnerId")
.IsRequired()
.HasColumnType("varchar(38)")
.HasColumnName("owner_id")
.UseCollation("utf8_general_ci")
@ -90,9 +89,9 @@ namespace ASC.MessagingSystem.Migrations.PostgreSql.MessagesContextPostgreSql
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("Spam")
b.Property<bool>("Spam")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnType("tinyint(1)")
.HasColumnName("spam")
.HasDefaultValueSql("'1'");
@ -136,6 +135,10 @@ namespace ASC.MessagingSystem.Migrations.PostgreSql.MessagesContextPostgreSql
b.HasKey("Id");
b.HasIndex("Alias")
.IsUnique()
.HasDatabaseName("alias");
b.HasIndex("LastModified")
.HasDatabaseName("last_modified");
@ -154,12 +157,13 @@ namespace ASC.MessagingSystem.Migrations.PostgreSql.MessagesContextPostgreSql
{
Id = 1,
Alias = "localhost",
Calls = 0,
Calls = false,
CreationDateTime = new DateTime(2021, 3, 9, 17, 46, 59, 97, DateTimeKind.Utc).AddTicks(4317),
Industry = 0,
LastModified = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified),
Name = "Web Office",
OwnerId = "66faa6e4-f133-11ea-b126-00ffeec8b4ef",
Spam = 0,
Spam = false,
Status = 0,
TrustedDomainsEnabled = 0,
Version = 0
@ -293,14 +297,14 @@ namespace ASC.MessagingSystem.Migrations.PostgreSql.MessagesContextPostgreSql
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("Removed")
b.Property<bool>("Removed")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnType("tinyint(1)")
.HasColumnName("removed")
.HasDefaultValueSql("'0'");
b.Property<int?>("Sex")
.HasColumnType("int")
b.Property<bool?>("Sex")
.HasColumnType("tinyint(1)")
.HasColumnName("sex");
b.Property<string>("Sid")
@ -378,7 +382,7 @@ namespace ASC.MessagingSystem.Migrations.PostgreSql.MessagesContextPostgreSql
LastModified = new DateTime(2021, 3, 9, 9, 52, 55, 765, DateTimeKind.Utc).AddTicks(1420),
LastName = "",
MobilePhoneActivation = 0,
Removed = 0,
Removed = false,
Status = 1,
Tenant = 1,
UserName = "administrator",
@ -412,9 +416,9 @@ namespace ASC.MessagingSystem.Migrations.PostgreSql.MessagesContextPostgreSql
.HasColumnType("timestamp")
.HasColumnName("last_modified");
b.Property<int>("Removed")
b.Property<bool>("Removed")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnType("tinyint(1)")
.HasColumnName("removed")
.HasDefaultValueSql("'0'");
@ -519,6 +523,10 @@ namespace ASC.MessagingSystem.Migrations.PostgreSql.MessagesContextPostgreSql
.HasColumnType("int")
.HasColumnName("action");
b.Property<bool>("Active")
.HasColumnType("tinyint(1)")
.HasColumnName("active");
b.Property<string>("Browser")
.HasColumnType("varchar(200)")
.HasColumnName("browser")

View File

@ -4,7 +4,7 @@ using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace ASC.MessagingSystem.Migrations.PostgreSql.MessagesContextPostgreSql
namespace ASC.Core.Common.Migrations.PostgreSql.MessagesContextPostgreSql
{
public partial class MessagesContextPostgreSql : Migration
{
@ -58,7 +58,7 @@ namespace ASC.MessagingSystem.Migrations.PostgreSql.MessagesContextPostgreSql
.Annotation("MySql:CharSet", "utf8"),
lastname = table.Column<string>(type: "varchar(64)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
sex = table.Column<int>(type: "int", nullable: true),
sex = table.Column<bool>(type: "tinyint(1)", nullable: true),
bithdate = table.Column<DateTime>(type: "datetime", nullable: true),
status = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'1'"),
activation_status = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
@ -85,7 +85,7 @@ namespace ASC.MessagingSystem.Migrations.PostgreSql.MessagesContextPostgreSql
.Annotation("MySql:CharSet", "utf8"),
sso_session_id = table.Column<string>(type: "varchar(512)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
removed = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
removed = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValueSql: "'0'"),
create_on = table.Column<DateTime>(type: "timestamp", nullable: false),
last_modified = table.Column<DateTime>(type: "datetime", nullable: false)
},
@ -103,6 +103,7 @@ namespace ASC.MessagingSystem.Migrations.PostgreSql.MessagesContextPostgreSql
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
login = table.Column<string>(type: "varchar(200)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
active = table.Column<bool>(type: "tinyint(1)", nullable: false),
ip = table.Column<string>(type: "varchar(50)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
browser = table.Column<string>(type: "varchar(200)", nullable: true, collation: "utf8_general_ci")
@ -149,14 +150,14 @@ namespace ASC.MessagingSystem.Migrations.PostgreSql.MessagesContextPostgreSql
status = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
statuschanged = table.Column<DateTime>(type: "datetime", nullable: true),
creationdatetime = table.Column<DateTime>(type: "datetime", nullable: false),
owner_id = table.Column<string>(type: "varchar(38)", nullable: false, collation: "utf8_general_ci")
owner_id = table.Column<string>(type: "varchar(38)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
payment_id = table.Column<string>(type: "varchar(38)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
industry = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
last_modified = table.Column<DateTime>(type: "timestamp", nullable: false),
spam = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'1'"),
calls = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'1'")
spam = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValueSql: "'1'"),
calls = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValueSql: "'1'")
},
constraints: table =>
{
@ -192,7 +193,7 @@ namespace ASC.MessagingSystem.Migrations.PostgreSql.MessagesContextPostgreSql
groupid = table.Column<string>(type: "varchar(38)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
ref_type = table.Column<int>(type: "int", nullable: false),
removed = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
removed = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValueSql: "'0'"),
last_modified = table.Column<DateTime>(type: "timestamp", nullable: false)
},
constraints: table =>
@ -262,6 +263,12 @@ namespace ASC.MessagingSystem.Migrations.PostgreSql.MessagesContextPostgreSql
table: "login_events",
columns: new[] { "tenant_id", "user_id" });
migrationBuilder.CreateIndex(
name: "alias",
table: "tenants_tenants",
column: "alias",
unique: true);
migrationBuilder.CreateIndex(
name: "last_modified",
table: "tenants_tenants",

View File

@ -11,7 +11,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace ASC.Core.Common.Migrations.PostgreSql.NotifyDbContextPostgreSql
{
[DbContext(typeof(PostgreSqlNotifyDbContext))]
[Migration("20220708104411_NotifyDbContextPostgreSql")]
[Migration("20220711152831_NotifyDbContextPostgreSql")]
partial class NotifyDbContextPostgreSql
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)

View File

@ -10,7 +10,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace ASC.Core.Common.Migrations.PostgreSql.TelegramDbContextPostgreSql
{
[DbContext(typeof(PostgreSqlTelegramDbContext))]
[Migration("20220708104413_TelegramDbContextPostgreSql")]
[Migration("20220711152833_TelegramDbContextPostgreSql")]
partial class TelegramDbContextPostgreSql
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)

View File

@ -11,7 +11,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace ASC.Core.Common.Migrations.PostgreSql.TenantDbContextPostgreSql
{
[DbContext(typeof(PostgreSqlTenantDbContext))]
[Migration("20220708104415_TenantDbContextPostgreSql")]
[Migration("20220711152835_TenantDbContextPostgreSql")]
partial class TenantDbContextPostgreSql
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
@ -87,9 +87,9 @@ namespace ASC.Core.Common.Migrations.PostgreSql.TenantDbContextPostgreSql
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("Calls")
b.Property<bool>("Calls")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnType("tinyint(1)")
.HasColumnName("calls")
.HasDefaultValueSql("'1'");
@ -130,7 +130,6 @@ namespace ASC.Core.Common.Migrations.PostgreSql.TenantDbContextPostgreSql
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("OwnerId")
.IsRequired()
.HasColumnType("varchar(38)")
.HasColumnName("owner_id")
.UseCollation("utf8_general_ci")
@ -142,9 +141,9 @@ namespace ASC.Core.Common.Migrations.PostgreSql.TenantDbContextPostgreSql
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("Spam")
b.Property<bool>("Spam")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnType("tinyint(1)")
.HasColumnName("spam")
.HasDefaultValueSql("'1'");
@ -188,6 +187,10 @@ namespace ASC.Core.Common.Migrations.PostgreSql.TenantDbContextPostgreSql
b.HasKey("Id");
b.HasIndex("Alias")
.IsUnique()
.HasDatabaseName("alias");
b.HasIndex("LastModified")
.HasDatabaseName("last_modified");
@ -206,12 +209,13 @@ namespace ASC.Core.Common.Migrations.PostgreSql.TenantDbContextPostgreSql
{
Id = 1,
Alias = "localhost",
Calls = 0,
Calls = false,
CreationDateTime = new DateTime(2021, 3, 9, 17, 46, 59, 97, DateTimeKind.Utc).AddTicks(4317),
Industry = 0,
LastModified = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified),
Name = "Web Office",
OwnerId = "66faa6e4-f133-11ea-b126-00ffeec8b4ef",
Spam = 0,
Spam = false,
Status = 0,
TrustedDomainsEnabled = 0,
Version = 0
@ -302,9 +306,9 @@ namespace ASC.Core.Common.Migrations.PostgreSql.TenantDbContextPostgreSql
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("Visible")
b.Property<bool>("Visible")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnType("tinyint(1)")
.HasColumnName("visible")
.HasDefaultValueSql("'0'");

View File

@ -100,14 +100,14 @@ namespace ASC.Core.Common.Migrations.PostgreSql.TenantDbContextPostgreSql
status = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
statuschanged = table.Column<DateTime>(type: "datetime", nullable: true),
creationdatetime = table.Column<DateTime>(type: "datetime", nullable: false),
owner_id = table.Column<string>(type: "varchar(38)", nullable: false, collation: "utf8_general_ci")
owner_id = table.Column<string>(type: "varchar(38)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
payment_id = table.Column<string>(type: "varchar(38)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
industry = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
last_modified = table.Column<DateTime>(type: "timestamp", nullable: false),
spam = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'1'"),
calls = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'1'")
spam = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValueSql: "'1'"),
calls = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValueSql: "'1'")
},
constraints: table =>
{
@ -125,7 +125,7 @@ namespace ASC.Core.Common.Migrations.PostgreSql.TenantDbContextPostgreSql
url = table.Column<string>(type: "varchar(64)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
default_version = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
visible = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'")
visible = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValueSql: "'0'")
},
constraints: table =>
{
@ -162,6 +162,12 @@ namespace ASC.Core.Common.Migrations.PostgreSql.TenantDbContextPostgreSql
table: "tenants_iprestrictions",
column: "tenant");
migrationBuilder.CreateIndex(
name: "alias",
table: "tenants_tenants",
column: "alias",
unique: true);
migrationBuilder.CreateIndex(
name: "last_modified",
table: "tenants_tenants",

View File

@ -85,9 +85,9 @@ namespace ASC.Core.Common.Migrations.PostgreSql.TenantDbContextPostgreSql
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("Calls")
b.Property<bool>("Calls")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnType("tinyint(1)")
.HasColumnName("calls")
.HasDefaultValueSql("'1'");
@ -128,7 +128,6 @@ namespace ASC.Core.Common.Migrations.PostgreSql.TenantDbContextPostgreSql
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("OwnerId")
.IsRequired()
.HasColumnType("varchar(38)")
.HasColumnName("owner_id")
.UseCollation("utf8_general_ci")
@ -140,9 +139,9 @@ namespace ASC.Core.Common.Migrations.PostgreSql.TenantDbContextPostgreSql
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("Spam")
b.Property<bool>("Spam")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnType("tinyint(1)")
.HasColumnName("spam")
.HasDefaultValueSql("'1'");
@ -186,6 +185,10 @@ namespace ASC.Core.Common.Migrations.PostgreSql.TenantDbContextPostgreSql
b.HasKey("Id");
b.HasIndex("Alias")
.IsUnique()
.HasDatabaseName("alias");
b.HasIndex("LastModified")
.HasDatabaseName("last_modified");
@ -204,12 +207,13 @@ namespace ASC.Core.Common.Migrations.PostgreSql.TenantDbContextPostgreSql
{
Id = 1,
Alias = "localhost",
Calls = 0,
Calls = false,
CreationDateTime = new DateTime(2021, 3, 9, 17, 46, 59, 97, DateTimeKind.Utc).AddTicks(4317),
Industry = 0,
LastModified = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified),
Name = "Web Office",
OwnerId = "66faa6e4-f133-11ea-b126-00ffeec8b4ef",
Spam = 0,
Spam = false,
Status = 0,
TrustedDomainsEnabled = 0,
Version = 0
@ -300,9 +304,9 @@ namespace ASC.Core.Common.Migrations.PostgreSql.TenantDbContextPostgreSql
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("Visible")
b.Property<bool>("Visible")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnType("tinyint(1)")
.HasColumnName("visible")
.HasDefaultValueSql("'0'");

View File

@ -11,7 +11,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql
{
[DbContext(typeof(PostgreSqlUserDbContext))]
[Migration("20220708104403_UserDbContextPostgreSql")]
[Migration("20220711152823_UserDbContextPostgreSql")]
partial class UserDbContextPostgreSql
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
@ -621,9 +621,9 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("Removed")
b.Property<bool>("Removed")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnType("tinyint(1)")
.HasColumnName("removed")
.HasDefaultValueSql("'0'");
@ -927,7 +927,7 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql
Source = "13ff36fb-0272-4887-b416-74f52b0d0b02",
Action = "CreateNewContact",
Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0",
Sender = "email.sender"
Sender = "email.sender|messanger.sender"
},
new
{
@ -977,9 +977,9 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("Unsubscribed")
b.Property<bool>("Unsubscribed")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnType("tinyint(1)")
.HasColumnName("unsubscribed")
.HasDefaultValueSql("'0'");
@ -998,7 +998,7 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql
Action = "send_whats_new",
Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1007,7 +1007,7 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql
Action = "new feed",
Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1016,7 +1016,7 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql
Action = "new post",
Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1025,7 +1025,7 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql
Action = "new topic in forum",
Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1034,7 +1034,7 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql
Action = "new photo uploaded",
Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1043,7 +1043,7 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql
Action = "new bookmark created",
Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1052,7 +1052,7 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql
Action = "new wiki page",
Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1061,7 +1061,7 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql
Action = "BirthdayReminder",
Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1070,7 +1070,7 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql
Action = "sharedocument",
Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1079,7 +1079,7 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql
Action = "sharefolder",
Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1088,7 +1088,7 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql
Action = "calendar_sharing",
Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1097,7 +1097,7 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql
Action = "event_alert",
Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1106,7 +1106,7 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql
Action = "admin_notify",
Recipient = "cd84e66b-b803-40fc-99f9-b2969a54a1de",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1115,7 +1115,7 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql
Action = "SetAccess",
Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1124,7 +1124,7 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql
Action = "ResponsibleForTask",
Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1133,7 +1133,7 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql
Action = "AddRelationshipEvent",
Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1142,7 +1142,7 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql
Action = "ExportCompleted",
Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1151,7 +1151,7 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql
Action = "CreateNewContact",
Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1160,7 +1160,7 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql
Action = "ResponsibleForOpportunity",
Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1169,7 +1169,7 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql
Action = "periodic_notify",
Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e",
Object = "",
Unsubscribed = 0
Unsubscribed = false
});
});
@ -1256,14 +1256,14 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("Removed")
b.Property<bool>("Removed")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnType("tinyint(1)")
.HasColumnName("removed")
.HasDefaultValueSql("'0'");
b.Property<int?>("Sex")
.HasColumnType("int")
b.Property<bool?>("Sex")
.HasColumnType("tinyint(1)")
.HasColumnName("sex");
b.Property<string>("Sid")
@ -1341,7 +1341,7 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql
LastModified = new DateTime(2021, 3, 9, 9, 52, 55, 765, DateTimeKind.Utc).AddTicks(1420),
LastName = "",
MobilePhoneActivation = 0,
Removed = 0,
Removed = false,
Status = 1,
Tenant = 1,
UserName = "administrator",
@ -1349,6 +1349,24 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql
});
});
modelBuilder.Entity("ASC.Core.Common.EF.UserDav", b =>
{
b.Property<int>("TenantId")
.HasColumnType("int")
.HasColumnName("tenant_id");
b.Property<string>("UserId")
.HasColumnType("varchar(38)")
.HasColumnName("userid")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.HasKey("TenantId", "UserId")
.HasName("PRIMARY");
b.ToTable("core_userdav", (string)null);
});
modelBuilder.Entity("ASC.Core.Common.EF.UserGroup", b =>
{
b.Property<int>("Tenant")
@ -1375,9 +1393,9 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql
.HasColumnType("timestamp")
.HasColumnName("last_modified");
b.Property<int>("Removed")
b.Property<bool>("Removed")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnType("tinyint(1)")
.HasColumnName("removed")
.HasDefaultValueSql("'0'");
@ -1401,7 +1419,7 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql
GroupId = "cd84e66b-b803-40fc-99f9-b2969a54a1de",
RefType = 0,
LastModified = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified),
Removed = 0
Removed = false
});
});
@ -1453,12 +1471,6 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("PwdHashSha512")
.HasColumnType("varchar(512)")
.HasColumnName("pwdhashsha512")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("Tenant")
.HasColumnType("int")
.HasColumnName("tenant");

View File

@ -46,7 +46,7 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql
.Annotation("MySql:CharSet", "utf8"),
sid = table.Column<string>(type: "varchar(512)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
removed = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
removed = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValueSql: "'0'"),
last_modified = table.Column<DateTime>(type: "timestamp", nullable: false)
},
constraints: table =>
@ -68,7 +68,7 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql
.Annotation("MySql:CharSet", "utf8"),
@object = table.Column<string>(name: "object", type: "varchar(128)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
unsubscribed = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'")
unsubscribed = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValueSql: "'0'")
},
constraints: table =>
{
@ -109,7 +109,7 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql
.Annotation("MySql:CharSet", "utf8"),
lastname = table.Column<string>(type: "varchar(64)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
sex = table.Column<int>(type: "int", nullable: true),
sex = table.Column<bool>(type: "tinyint(1)", nullable: true),
bithdate = table.Column<DateTime>(type: "datetime", nullable: true),
status = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'1'"),
activation_status = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
@ -136,7 +136,7 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql
.Annotation("MySql:CharSet", "utf8"),
sso_session_id = table.Column<string>(type: "varchar(512)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
removed = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
removed = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValueSql: "'0'"),
create_on = table.Column<DateTime>(type: "timestamp", nullable: false),
last_modified = table.Column<DateTime>(type: "datetime", nullable: false)
},
@ -146,6 +146,20 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql
})
.Annotation("MySql:CharSet", "utf8");
migrationBuilder.CreateTable(
name: "core_userdav",
columns: table => new
{
tenant_id = table.Column<int>(type: "int", nullable: false),
userid = table.Column<string>(type: "varchar(38)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8")
},
constraints: table =>
{
table.PrimaryKey("PRIMARY", x => new { x.tenant_id, x.userid });
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "core_userphoto",
columns: table => new
@ -170,8 +184,6 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql
tenant = table.Column<int>(type: "int", nullable: false),
pwdhash = table.Column<string>(type: "varchar(512)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
pwdhashsha512 = table.Column<string>(type: "varchar(512)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
LastModified = table.Column<DateTime>(type: "timestamp", nullable: false)
},
constraints: table =>
@ -190,7 +202,7 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql
groupid = table.Column<string>(type: "varchar(38)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
ref_type = table.Column<int>(type: "int", nullable: false),
removed = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
removed = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValueSql: "'0'"),
last_modified = table.Column<DateTime>(type: "timestamp", nullable: false)
},
constraints: table =>
@ -311,7 +323,7 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql
values: new object[,]
{
{ "AddRelationshipEvent", "abef62db-11a8-4673-9d32-ef1d8af19dc0", "13ff36fb-0272-4887-b416-74f52b0d0b02", -1, "email.sender|messanger.sender" },
{ "CreateNewContact", "abef62db-11a8-4673-9d32-ef1d8af19dc0", "13ff36fb-0272-4887-b416-74f52b0d0b02", -1, "email.sender" },
{ "CreateNewContact", "abef62db-11a8-4673-9d32-ef1d8af19dc0", "13ff36fb-0272-4887-b416-74f52b0d0b02", -1, "email.sender|messanger.sender" },
{ "ExportCompleted", "abef62db-11a8-4673-9d32-ef1d8af19dc0", "13ff36fb-0272-4887-b416-74f52b0d0b02", -1, "email.sender|messanger.sender" },
{ "ResponsibleForOpportunity", "abef62db-11a8-4673-9d32-ef1d8af19dc0", "13ff36fb-0272-4887-b416-74f52b0d0b02", -1, "email.sender|messanger.sender" },
{ "ResponsibleForTask", "abef62db-11a8-4673-9d32-ef1d8af19dc0", "13ff36fb-0272-4887-b416-74f52b0d0b02", -1, "email.sender|messanger.sender" },
@ -351,8 +363,8 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql
migrationBuilder.InsertData(
table: "core_usersecurity",
columns: new[] { "userid", "LastModified", "pwdhash", "pwdhashsha512", "tenant" },
values: new object[] { "66faa6e4-f133-11ea-b126-00ffeec8b4ef", new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), "jGl25bVBBBW96Qi9Te4V37Fnqchz/Eu4qB9vKrRIqRg=", null, 1 });
columns: new[] { "userid", "LastModified", "pwdhash", "tenant" },
values: new object[] { "66faa6e4-f133-11ea-b126-00ffeec8b4ef", new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), "jGl25bVBBBW96Qi9Te4V37Fnqchz/Eu4qB9vKrRIqRg=", 1 });
migrationBuilder.InsertData(
table: "core_usergroup",
@ -424,6 +436,9 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql
migrationBuilder.DropTable(
name: "core_subscriptionmethod");
migrationBuilder.DropTable(
name: "core_userdav");
migrationBuilder.DropTable(
name: "core_usergroup");

View File

@ -619,9 +619,9 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("Removed")
b.Property<bool>("Removed")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnType("tinyint(1)")
.HasColumnName("removed")
.HasDefaultValueSql("'0'");
@ -925,7 +925,7 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql
Source = "13ff36fb-0272-4887-b416-74f52b0d0b02",
Action = "CreateNewContact",
Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0",
Sender = "email.sender"
Sender = "email.sender|messanger.sender"
},
new
{
@ -975,9 +975,9 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("Unsubscribed")
b.Property<bool>("Unsubscribed")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnType("tinyint(1)")
.HasColumnName("unsubscribed")
.HasDefaultValueSql("'0'");
@ -996,7 +996,7 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql
Action = "send_whats_new",
Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1005,7 +1005,7 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql
Action = "new feed",
Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1014,7 +1014,7 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql
Action = "new post",
Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1023,7 +1023,7 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql
Action = "new topic in forum",
Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1032,7 +1032,7 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql
Action = "new photo uploaded",
Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1041,7 +1041,7 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql
Action = "new bookmark created",
Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1050,7 +1050,7 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql
Action = "new wiki page",
Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1059,7 +1059,7 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql
Action = "BirthdayReminder",
Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1068,7 +1068,7 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql
Action = "sharedocument",
Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1077,7 +1077,7 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql
Action = "sharefolder",
Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1086,7 +1086,7 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql
Action = "calendar_sharing",
Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1095,7 +1095,7 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql
Action = "event_alert",
Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1104,7 +1104,7 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql
Action = "admin_notify",
Recipient = "cd84e66b-b803-40fc-99f9-b2969a54a1de",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1113,7 +1113,7 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql
Action = "SetAccess",
Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1122,7 +1122,7 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql
Action = "ResponsibleForTask",
Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1131,7 +1131,7 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql
Action = "AddRelationshipEvent",
Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1140,7 +1140,7 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql
Action = "ExportCompleted",
Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1149,7 +1149,7 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql
Action = "CreateNewContact",
Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1158,7 +1158,7 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql
Action = "ResponsibleForOpportunity",
Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0",
Object = "",
Unsubscribed = 0
Unsubscribed = false
},
new
{
@ -1167,7 +1167,7 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql
Action = "periodic_notify",
Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e",
Object = "",
Unsubscribed = 0
Unsubscribed = false
});
});
@ -1254,14 +1254,14 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("Removed")
b.Property<bool>("Removed")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnType("tinyint(1)")
.HasColumnName("removed")
.HasDefaultValueSql("'0'");
b.Property<int?>("Sex")
.HasColumnType("int")
b.Property<bool?>("Sex")
.HasColumnType("tinyint(1)")
.HasColumnName("sex");
b.Property<string>("Sid")
@ -1339,7 +1339,7 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql
LastModified = new DateTime(2021, 3, 9, 9, 52, 55, 765, DateTimeKind.Utc).AddTicks(1420),
LastName = "",
MobilePhoneActivation = 0,
Removed = 0,
Removed = false,
Status = 1,
Tenant = 1,
UserName = "administrator",
@ -1347,6 +1347,24 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql
});
});
modelBuilder.Entity("ASC.Core.Common.EF.UserDav", b =>
{
b.Property<int>("TenantId")
.HasColumnType("int")
.HasColumnName("tenant_id");
b.Property<string>("UserId")
.HasColumnType("varchar(38)")
.HasColumnName("userid")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.HasKey("TenantId", "UserId")
.HasName("PRIMARY");
b.ToTable("core_userdav", (string)null);
});
modelBuilder.Entity("ASC.Core.Common.EF.UserGroup", b =>
{
b.Property<int>("Tenant")
@ -1373,9 +1391,9 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql
.HasColumnType("timestamp")
.HasColumnName("last_modified");
b.Property<int>("Removed")
b.Property<bool>("Removed")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnType("tinyint(1)")
.HasColumnName("removed")
.HasDefaultValueSql("'0'");
@ -1399,7 +1417,7 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql
GroupId = "cd84e66b-b803-40fc-99f9-b2969a54a1de",
RefType = 0,
LastModified = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified),
Removed = 0
Removed = false
});
});
@ -1451,12 +1469,6 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("PwdHashSha512")
.HasColumnType("varchar(512)")
.HasColumnName("pwdhashsha512")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("Tenant")
.HasColumnType("int")
.HasColumnName("tenant");

View File

@ -11,7 +11,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace ASC.Core.Common.Migrations.PostgreSql.VoipDbContextPostgreSql
{
[DbContext(typeof(PostgreSqlVoipDbContext))]
[Migration("20220708104417_VoipDbContextPostgreSql")]
[Migration("20220711152837_VoipDbContextPostgreSql")]
partial class VoipDbContextPostgreSql
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
@ -83,8 +83,8 @@ namespace ASC.Core.Common.Migrations.PostgreSql.VoipDbContextPostgreSql
.HasColumnType("tinyint(1)")
.HasColumnName("is_company");
b.Property<sbyte?>("IsShared")
.HasColumnType("tinyint")
b.Property<bool?>("IsShared")
.HasColumnType("tinyint(1)")
.HasColumnName("is_shared");
b.Property<string>("LastModifedBy")

View File

@ -44,7 +44,7 @@ namespace ASC.Core.Common.Migrations.PostgreSql.VoipDbContextPostgreSql
last_modifed_on = table.Column<DateTime>(type: "datetime", nullable: true),
display_name = table.Column<string>(type: "varchar(255)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
is_shared = table.Column<sbyte>(type: "tinyint", nullable: true),
is_shared = table.Column<bool>(type: "tinyint(1)", nullable: true),
currency = table.Column<string>(type: "varchar(3)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8")
},

View File

@ -81,8 +81,8 @@ namespace ASC.Core.Common.Migrations.PostgreSql.VoipDbContextPostgreSql
.HasColumnType("tinyint(1)")
.HasColumnName("is_company");
b.Property<sbyte?>("IsShared")
.HasColumnType("tinyint")
b.Property<bool?>("IsShared")
.HasColumnType("tinyint(1)")
.HasColumnName("is_shared");
b.Property<string>("LastModifedBy")

View File

@ -1,141 +0,0 @@
// <auto-generated />
using System;
using ASC.Core.Common.EF.Context;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace ASC.Core.Common.Migrations.PostgreSql.WebstudioDbContextPostgreSql
{
[DbContext(typeof(PostgreSqlWebstudioDbContext))]
[Migration("20220708104419_WebstudioDbContextPostgreSql")]
partial class WebstudioDbContextPostgreSql
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "6.0.4")
.HasAnnotation("Relational:MaxIdentifierLength", 64);
modelBuilder.Entity("ASC.Core.Common.EF.Model.DbWebstudioIndex", b =>
{
b.Property<string>("IndexName")
.HasColumnType("varchar(50)")
.HasColumnName("index_name")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<DateTime>("LastModified")
.HasColumnType("timestamp")
.HasColumnName("last_modified");
b.HasKey("IndexName")
.HasName("PRIMARY");
b.ToTable("webstudio_index", (string)null);
b.HasAnnotation("MySql:CharSet", "utf8");
});
modelBuilder.Entity("ASC.Core.Common.EF.Model.DbWebstudioSettings", b =>
{
b.Property<int>("TenantId")
.HasColumnType("int")
.HasColumnName("TenantID");
b.Property<string>("Id")
.HasColumnType("varchar(64)")
.HasColumnName("ID")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("UserId")
.HasColumnType("varchar(64)")
.HasColumnName("UserID")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("Data")
.IsRequired()
.HasColumnType("mediumtext")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.HasKey("TenantId", "Id", "UserId")
.HasName("PRIMARY");
b.HasIndex("Id")
.HasDatabaseName("ID");
b.ToTable("webstudio_settings", (string)null);
b.HasAnnotation("MySql:CharSet", "utf8");
b.HasData(
new
{
TenantId = 1,
Id = "9a925891-1f92-4ed7-b277-d6f649739f06",
UserId = "00000000-0000-0000-0000-000000000000",
Data = "{\"Completed\":false}"
});
});
modelBuilder.Entity("ASC.Core.Common.EF.Model.DbWebstudioUserVisit", b =>
{
b.Property<int>("TenantId")
.HasColumnType("int")
.HasColumnName("tenantid");
b.Property<DateTime>("VisitDate")
.HasColumnType("datetime")
.HasColumnName("visitdate");
b.Property<string>("ProductId")
.HasColumnType("varchar(38)")
.HasColumnName("productid")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("UserId")
.HasColumnType("varchar(38)")
.HasColumnName("userid")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<DateTime?>("FirstVisitTime")
.ValueGeneratedOnAdd()
.HasColumnType("datetime")
.HasColumnName("firstvisittime")
.HasDefaultValueSql("NULL");
b.Property<DateTime?>("LastVisitTime")
.ValueGeneratedOnAdd()
.HasColumnType("datetime")
.HasColumnName("lastvisittime")
.HasDefaultValueSql("NULL");
b.Property<int>("VisitCount")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("visitcount")
.HasDefaultValueSql("'0'");
b.HasKey("TenantId", "VisitDate", "ProductId", "UserId")
.HasName("PRIMARY");
b.HasIndex("VisitDate")
.HasDatabaseName("visitdate");
b.ToTable("webstudio_uservisit", (string)null);
b.HasAnnotation("MySql:CharSet", "utf8");
});
#pragma warning restore 612, 618
}
}
}

View File

@ -1,95 +0,0 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace ASC.Core.Common.Migrations.PostgreSql.WebstudioDbContextPostgreSql
{
public partial class WebstudioDbContextPostgreSql : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterDatabase()
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "webstudio_index",
columns: table => new
{
index_name = table.Column<string>(type: "varchar(50)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
last_modified = table.Column<DateTime>(type: "timestamp", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PRIMARY", x => x.index_name);
})
.Annotation("MySql:CharSet", "utf8");
migrationBuilder.CreateTable(
name: "webstudio_settings",
columns: table => new
{
TenantID = table.Column<int>(type: "int", nullable: false),
ID = table.Column<string>(type: "varchar(64)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
UserID = table.Column<string>(type: "varchar(64)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
Data = table.Column<string>(type: "mediumtext", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8")
},
constraints: table =>
{
table.PrimaryKey("PRIMARY", x => new { x.TenantID, x.ID, x.UserID });
})
.Annotation("MySql:CharSet", "utf8");
migrationBuilder.CreateTable(
name: "webstudio_uservisit",
columns: table => new
{
tenantid = table.Column<int>(type: "int", nullable: false),
visitdate = table.Column<DateTime>(type: "datetime", nullable: false),
productid = table.Column<string>(type: "varchar(38)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
userid = table.Column<string>(type: "varchar(38)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
visitcount = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
firstvisittime = table.Column<DateTime>(type: "datetime", nullable: true, defaultValueSql: "NULL"),
lastvisittime = table.Column<DateTime>(type: "datetime", nullable: true, defaultValueSql: "NULL")
},
constraints: table =>
{
table.PrimaryKey("PRIMARY", x => new { x.tenantid, x.visitdate, x.productid, x.userid });
})
.Annotation("MySql:CharSet", "utf8");
migrationBuilder.InsertData(
table: "webstudio_settings",
columns: new[] { "ID", "TenantID", "UserID", "Data" },
values: new object[] { "9a925891-1f92-4ed7-b277-d6f649739f06", 1, "00000000-0000-0000-0000-000000000000", "{\"Completed\":false}" });
migrationBuilder.CreateIndex(
name: "ID",
table: "webstudio_settings",
column: "ID");
migrationBuilder.CreateIndex(
name: "visitdate",
table: "webstudio_uservisit",
column: "visitdate");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "webstudio_index");
migrationBuilder.DropTable(
name: "webstudio_settings");
migrationBuilder.DropTable(
name: "webstudio_uservisit");
}
}
}

View File

@ -0,0 +1,290 @@
// <auto-generated />
using System;
using ASC.Core.Common.EF.Context;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace ASC.Core.Common.Migrations.PostgreSql.WebstudioDbContextPostgreSql
{
[DbContext(typeof(PostgreSqlWebstudioDbContext))]
[Migration("20220711152839_WebstudioDbContextPostgreSql")]
partial class WebstudioDbContextPostgreSql
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "6.0.4")
.HasAnnotation("Relational:MaxIdentifierLength", 64);
modelBuilder.Entity("ASC.Core.Common.EF.Model.DbTenant", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("id");
b.Property<string>("Alias")
.IsRequired()
.HasColumnType("varchar(100)")
.HasColumnName("alias")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<bool>("Calls")
.ValueGeneratedOnAdd()
.HasColumnType("tinyint(1)")
.HasColumnName("calls")
.HasDefaultValueSql("'1'");
b.Property<DateTime>("CreationDateTime")
.HasColumnType("datetime")
.HasColumnName("creationdatetime");
b.Property<int>("Industry")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("industry")
.HasDefaultValueSql("'0'");
b.Property<string>("Language")
.IsRequired()
.ValueGeneratedOnAdd()
.HasColumnType("char(10)")
.HasColumnName("language")
.HasDefaultValueSql("'en-US'")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<DateTime>("LastModified")
.HasColumnType("timestamp")
.HasColumnName("last_modified");
b.Property<string>("MappedDomain")
.HasColumnType("varchar(100)")
.HasColumnName("mappeddomain")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("varchar(255)")
.HasColumnName("name")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("OwnerId")
.HasColumnType("varchar(38)")
.HasColumnName("owner_id")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("PaymentId")
.HasColumnType("varchar(38)")
.HasColumnName("payment_id")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<bool>("Spam")
.ValueGeneratedOnAdd()
.HasColumnType("tinyint(1)")
.HasColumnName("spam")
.HasDefaultValueSql("'1'");
b.Property<int>("Status")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("status")
.HasDefaultValueSql("'0'");
b.Property<DateTime?>("StatusChanged")
.HasColumnType("datetime")
.HasColumnName("statuschanged");
b.Property<string>("TimeZone")
.HasColumnType("varchar(50)")
.HasColumnName("timezone")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("TrustedDomainsEnabled")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("trusteddomainsenabled")
.HasDefaultValueSql("'1'");
b.Property<string>("TrustedDomainsRaw")
.HasColumnType("varchar(1024)")
.HasColumnName("trusteddomains")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("Version")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("version")
.HasDefaultValueSql("'2'");
b.Property<DateTime?>("Version_Changed")
.HasColumnType("datetime")
.HasColumnName("version_changed");
b.HasKey("Id");
b.HasIndex("Alias")
.IsUnique()
.HasDatabaseName("alias");
b.HasIndex("LastModified")
.HasDatabaseName("last_modified");
b.HasIndex("MappedDomain")
.HasDatabaseName("mappeddomain");
b.HasIndex("Version")
.HasDatabaseName("version");
b.ToTable("tenants_tenants", (string)null);
b.HasAnnotation("MySql:CharSet", "utf8");
b.HasData(
new
{
Id = 1,
Alias = "localhost",
Calls = false,
CreationDateTime = new DateTime(2021, 3, 9, 17, 46, 59, 97, DateTimeKind.Utc).AddTicks(4317),
Industry = 0,
LastModified = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified),
Name = "Web Office",
OwnerId = "66faa6e4-f133-11ea-b126-00ffeec8b4ef",
Spam = false,
Status = 0,
TrustedDomainsEnabled = 0,
Version = 0
});
});
modelBuilder.Entity("ASC.Core.Common.EF.Model.DbWebstudioIndex", b =>
{
b.Property<string>("IndexName")
.HasColumnType("varchar(50)")
.HasColumnName("index_name")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<DateTime>("LastModified")
.HasColumnType("timestamp")
.HasColumnName("last_modified");
b.HasKey("IndexName")
.HasName("PRIMARY");
b.ToTable("webstudio_index", (string)null);
b.HasAnnotation("MySql:CharSet", "utf8");
});
modelBuilder.Entity("ASC.Core.Common.EF.Model.DbWebstudioSettings", b =>
{
b.Property<int>("TenantId")
.HasColumnType("int")
.HasColumnName("TenantID");
b.Property<string>("Id")
.HasColumnType("varchar(64)")
.HasColumnName("ID")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("UserId")
.HasColumnType("varchar(64)")
.HasColumnName("UserID")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("Data")
.IsRequired()
.HasColumnType("mediumtext")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.HasKey("TenantId", "Id", "UserId")
.HasName("PRIMARY");
b.HasIndex("Id")
.HasDatabaseName("ID");
b.ToTable("webstudio_settings", (string)null);
b.HasAnnotation("MySql:CharSet", "utf8");
b.HasData(
new
{
TenantId = 1,
Id = "9a925891-1f92-4ed7-b277-d6f649739f06",
UserId = "00000000-0000-0000-0000-000000000000",
Data = "{\"Completed\":false}"
});
});
modelBuilder.Entity("ASC.Core.Common.EF.Model.DbWebstudioUserVisit", b =>
{
b.Property<int>("TenantId")
.HasColumnType("int")
.HasColumnName("tenantid");
b.Property<DateTime>("VisitDate")
.HasColumnType("datetime")
.HasColumnName("visitdate");
b.Property<string>("ProductId")
.HasColumnType("varchar(38)")
.HasColumnName("productid")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("UserId")
.HasColumnType("varchar(38)")
.HasColumnName("userid")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<DateTime?>("FirstVisitTime")
.ValueGeneratedOnAdd()
.HasColumnType("datetime")
.HasColumnName("firstvisittime")
.HasDefaultValueSql("NULL");
b.Property<DateTime?>("LastVisitTime")
.ValueGeneratedOnAdd()
.HasColumnType("datetime")
.HasColumnName("lastvisittime")
.HasDefaultValueSql("NULL");
b.Property<int>("VisitCount")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("visitcount")
.HasDefaultValueSql("'0'");
b.HasKey("TenantId", "VisitDate", "ProductId", "UserId")
.HasName("PRIMARY");
b.HasIndex("VisitDate")
.HasDatabaseName("visitdate");
b.ToTable("webstudio_uservisit", (string)null);
b.HasAnnotation("MySql:CharSet", "utf8");
});
#pragma warning restore 612, 618
}
}
}

View File

@ -0,0 +1,164 @@
using System;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace ASC.Core.Common.Migrations.PostgreSql.WebstudioDbContextPostgreSql
{
public partial class WebstudioDbContextPostgreSql : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterDatabase()
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "tenants_tenants",
columns: table => new
{
id = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
name = table.Column<string>(type: "varchar(255)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
alias = table.Column<string>(type: "varchar(100)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
mappeddomain = table.Column<string>(type: "varchar(100)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
version = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'2'"),
version_changed = table.Column<DateTime>(type: "datetime", nullable: true),
language = table.Column<string>(type: "char(10)", nullable: false, defaultValueSql: "'en-US'", collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
timezone = table.Column<string>(type: "varchar(50)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
trusteddomains = table.Column<string>(type: "varchar(1024)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
trusteddomainsenabled = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'1'"),
status = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
statuschanged = table.Column<DateTime>(type: "datetime", nullable: true),
creationdatetime = table.Column<DateTime>(type: "datetime", nullable: false),
owner_id = table.Column<string>(type: "varchar(38)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
payment_id = table.Column<string>(type: "varchar(38)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
industry = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
last_modified = table.Column<DateTime>(type: "timestamp", nullable: false),
spam = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValueSql: "'1'"),
calls = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValueSql: "'1'")
},
constraints: table =>
{
table.PrimaryKey("PK_tenants_tenants", x => x.id);
})
.Annotation("MySql:CharSet", "utf8");
migrationBuilder.CreateTable(
name: "webstudio_index",
columns: table => new
{
index_name = table.Column<string>(type: "varchar(50)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
last_modified = table.Column<DateTime>(type: "timestamp", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PRIMARY", x => x.index_name);
})
.Annotation("MySql:CharSet", "utf8");
migrationBuilder.CreateTable(
name: "webstudio_settings",
columns: table => new
{
TenantID = table.Column<int>(type: "int", nullable: false),
ID = table.Column<string>(type: "varchar(64)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
UserID = table.Column<string>(type: "varchar(64)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
Data = table.Column<string>(type: "mediumtext", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8")
},
constraints: table =>
{
table.PrimaryKey("PRIMARY", x => new { x.TenantID, x.ID, x.UserID });
})
.Annotation("MySql:CharSet", "utf8");
migrationBuilder.CreateTable(
name: "webstudio_uservisit",
columns: table => new
{
tenantid = table.Column<int>(type: "int", nullable: false),
visitdate = table.Column<DateTime>(type: "datetime", nullable: false),
productid = table.Column<string>(type: "varchar(38)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
userid = table.Column<string>(type: "varchar(38)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
visitcount = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
firstvisittime = table.Column<DateTime>(type: "datetime", nullable: true, defaultValueSql: "NULL"),
lastvisittime = table.Column<DateTime>(type: "datetime", nullable: true, defaultValueSql: "NULL")
},
constraints: table =>
{
table.PrimaryKey("PRIMARY", x => new { x.tenantid, x.visitdate, x.productid, x.userid });
})
.Annotation("MySql:CharSet", "utf8");
migrationBuilder.InsertData(
table: "tenants_tenants",
columns: new[] { "id", "alias", "creationdatetime", "last_modified", "mappeddomain", "name", "owner_id", "payment_id", "statuschanged", "timezone", "trusteddomains", "version_changed" },
values: new object[] { 1, "localhost", new DateTime(2021, 3, 9, 17, 46, 59, 97, DateTimeKind.Utc).AddTicks(4317), new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), null, "Web Office", "66faa6e4-f133-11ea-b126-00ffeec8b4ef", null, null, null, null, null });
migrationBuilder.InsertData(
table: "webstudio_settings",
columns: new[] { "ID", "TenantID", "UserID", "Data" },
values: new object[] { "9a925891-1f92-4ed7-b277-d6f649739f06", 1, "00000000-0000-0000-0000-000000000000", "{\"Completed\":false}" });
migrationBuilder.CreateIndex(
name: "alias",
table: "tenants_tenants",
column: "alias",
unique: true);
migrationBuilder.CreateIndex(
name: "last_modified",
table: "tenants_tenants",
column: "last_modified");
migrationBuilder.CreateIndex(
name: "mappeddomain",
table: "tenants_tenants",
column: "mappeddomain");
migrationBuilder.CreateIndex(
name: "version",
table: "tenants_tenants",
column: "version");
migrationBuilder.CreateIndex(
name: "ID",
table: "webstudio_settings",
column: "ID");
migrationBuilder.CreateIndex(
name: "visitdate",
table: "webstudio_uservisit",
column: "visitdate");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "tenants_tenants");
migrationBuilder.DropTable(
name: "webstudio_index");
migrationBuilder.DropTable(
name: "webstudio_settings");
migrationBuilder.DropTable(
name: "webstudio_uservisit");
}
}
}

View File

@ -19,6 +19,155 @@ namespace ASC.Core.Common.Migrations.PostgreSql.WebstudioDbContextPostgreSql
.HasAnnotation("ProductVersion", "6.0.4")
.HasAnnotation("Relational:MaxIdentifierLength", 64);
modelBuilder.Entity("ASC.Core.Common.EF.Model.DbTenant", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("id");
b.Property<string>("Alias")
.IsRequired()
.HasColumnType("varchar(100)")
.HasColumnName("alias")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<bool>("Calls")
.ValueGeneratedOnAdd()
.HasColumnType("tinyint(1)")
.HasColumnName("calls")
.HasDefaultValueSql("'1'");
b.Property<DateTime>("CreationDateTime")
.HasColumnType("datetime")
.HasColumnName("creationdatetime");
b.Property<int>("Industry")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("industry")
.HasDefaultValueSql("'0'");
b.Property<string>("Language")
.IsRequired()
.ValueGeneratedOnAdd()
.HasColumnType("char(10)")
.HasColumnName("language")
.HasDefaultValueSql("'en-US'")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<DateTime>("LastModified")
.HasColumnType("timestamp")
.HasColumnName("last_modified");
b.Property<string>("MappedDomain")
.HasColumnType("varchar(100)")
.HasColumnName("mappeddomain")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("varchar(255)")
.HasColumnName("name")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("OwnerId")
.HasColumnType("varchar(38)")
.HasColumnName("owner_id")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("PaymentId")
.HasColumnType("varchar(38)")
.HasColumnName("payment_id")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<bool>("Spam")
.ValueGeneratedOnAdd()
.HasColumnType("tinyint(1)")
.HasColumnName("spam")
.HasDefaultValueSql("'1'");
b.Property<int>("Status")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("status")
.HasDefaultValueSql("'0'");
b.Property<DateTime?>("StatusChanged")
.HasColumnType("datetime")
.HasColumnName("statuschanged");
b.Property<string>("TimeZone")
.HasColumnType("varchar(50)")
.HasColumnName("timezone")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("TrustedDomainsEnabled")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("trusteddomainsenabled")
.HasDefaultValueSql("'1'");
b.Property<string>("TrustedDomainsRaw")
.HasColumnType("varchar(1024)")
.HasColumnName("trusteddomains")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("Version")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("version")
.HasDefaultValueSql("'2'");
b.Property<DateTime?>("Version_Changed")
.HasColumnType("datetime")
.HasColumnName("version_changed");
b.HasKey("Id");
b.HasIndex("Alias")
.IsUnique()
.HasDatabaseName("alias");
b.HasIndex("LastModified")
.HasDatabaseName("last_modified");
b.HasIndex("MappedDomain")
.HasDatabaseName("mappeddomain");
b.HasIndex("Version")
.HasDatabaseName("version");
b.ToTable("tenants_tenants", (string)null);
b.HasAnnotation("MySql:CharSet", "utf8");
b.HasData(
new
{
Id = 1,
Alias = "localhost",
Calls = false,
CreationDateTime = new DateTime(2021, 3, 9, 17, 46, 59, 97, DateTimeKind.Utc).AddTicks(4317),
Industry = 0,
LastModified = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified),
Name = "Web Office",
OwnerId = "66faa6e4-f133-11ea-b126-00ffeec8b4ef",
Spam = false,
Status = 0,
TrustedDomainsEnabled = 0,
Version = 0
});
});
modelBuilder.Entity("ASC.Core.Common.EF.Model.DbWebstudioIndex", b =>
{
b.Property<string>("IndexName")

View File

@ -0,0 +1,315 @@
// <auto-generated />
using System;
using ASC.Data.Backup.EF.Context;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace ASC.Data.Backup.Core.Migrations.MySql.BackupsContextMySql
{
[DbContext(typeof(MySqlBackupsContext))]
[Migration("20220711152842_BackupsContextMySql")]
partial class BackupsContextMySql
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "6.0.4")
.HasAnnotation("Relational:MaxIdentifierLength", 64);
modelBuilder.Entity("ASC.Core.Common.EF.Model.DbTenant", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("id");
b.Property<string>("Alias")
.IsRequired()
.HasColumnType("varchar(100)")
.HasColumnName("alias")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<bool>("Calls")
.ValueGeneratedOnAdd()
.HasColumnType("tinyint(1)")
.HasColumnName("calls")
.HasDefaultValueSql("'1'");
b.Property<DateTime>("CreationDateTime")
.HasColumnType("datetime")
.HasColumnName("creationdatetime");
b.Property<int>("Industry")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("industry")
.HasDefaultValueSql("'0'");
b.Property<string>("Language")
.IsRequired()
.ValueGeneratedOnAdd()
.HasColumnType("char(10)")
.HasColumnName("language")
.HasDefaultValueSql("'en-US'")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<DateTime>("LastModified")
.HasColumnType("timestamp")
.HasColumnName("last_modified");
b.Property<string>("MappedDomain")
.HasColumnType("varchar(100)")
.HasColumnName("mappeddomain")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("varchar(255)")
.HasColumnName("name")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("OwnerId")
.HasColumnType("varchar(38)")
.HasColumnName("owner_id")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("PaymentId")
.HasColumnType("varchar(38)")
.HasColumnName("payment_id")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<bool>("Spam")
.ValueGeneratedOnAdd()
.HasColumnType("tinyint(1)")
.HasColumnName("spam")
.HasDefaultValueSql("'1'");
b.Property<int>("Status")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("status")
.HasDefaultValueSql("'0'");
b.Property<DateTime?>("StatusChanged")
.HasColumnType("datetime")
.HasColumnName("statuschanged");
b.Property<string>("TimeZone")
.HasColumnType("varchar(50)")
.HasColumnName("timezone")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("TrustedDomainsEnabled")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("trusteddomainsenabled")
.HasDefaultValueSql("'1'");
b.Property<string>("TrustedDomainsRaw")
.HasColumnType("varchar(1024)")
.HasColumnName("trusteddomains")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("Version")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("version")
.HasDefaultValueSql("'2'");
b.Property<DateTime?>("Version_Changed")
.HasColumnType("datetime")
.HasColumnName("version_changed");
b.HasKey("Id");
b.HasIndex("Alias")
.IsUnique()
.HasDatabaseName("alias");
b.HasIndex("LastModified")
.HasDatabaseName("last_modified");
b.HasIndex("MappedDomain")
.HasDatabaseName("mappeddomain");
b.HasIndex("Version")
.HasDatabaseName("version");
b.ToTable("tenants_tenants", (string)null);
b.HasAnnotation("MySql:CharSet", "utf8");
b.HasData(
new
{
Id = 1,
Alias = "localhost",
Calls = false,
CreationDateTime = new DateTime(2021, 3, 9, 17, 46, 59, 97, DateTimeKind.Utc).AddTicks(4317),
Industry = 0,
LastModified = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified),
Name = "Web Office",
OwnerId = "66faa6e4-f133-11ea-b126-00ffeec8b4ef",
Spam = false,
Status = 0,
TrustedDomainsEnabled = 0,
Version = 0
});
});
modelBuilder.Entity("ASC.Data.Backup.EF.Model.BackupRecord", b =>
{
b.Property<string>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(38)")
.HasColumnName("id")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<DateTime>("CreatedOn")
.HasColumnType("datetime")
.HasColumnName("created_on");
b.Property<DateTime>("ExpiresOn")
.ValueGeneratedOnAdd()
.HasColumnType("datetime")
.HasColumnName("expires_on")
.HasDefaultValueSql("'0001-01-01 00:00:00'");
b.Property<string>("Hash")
.IsRequired()
.HasColumnType("varchar(64)")
.HasColumnName("hash")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<bool>("IsScheduled")
.HasColumnType("tinyint(1)")
.HasColumnName("is_scheduled");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("varchar(255)")
.HasColumnName("name")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("StorageBasePath")
.ValueGeneratedOnAdd()
.HasColumnType("varchar(255)")
.HasColumnName("storage_base_path")
.HasDefaultValueSql("NULL")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("StorageParams")
.ValueGeneratedOnAdd()
.HasColumnType("text")
.HasColumnName("storage_params")
.HasDefaultValueSql("NULL")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("StoragePath")
.IsRequired()
.HasColumnType("varchar(255)")
.HasColumnName("storage_path")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("StorageType")
.HasColumnType("int(10)")
.HasColumnName("storage_type");
b.Property<int>("TenantId")
.HasColumnType("int(10)")
.HasColumnName("tenant_id");
b.HasKey("Id")
.HasName("PRIMARY");
b.HasIndex("ExpiresOn")
.HasDatabaseName("expires_on");
b.HasIndex("IsScheduled")
.HasDatabaseName("is_scheduled");
b.HasIndex("TenantId")
.HasDatabaseName("tenant_id");
b.ToTable("backup_backup", (string)null);
b.HasAnnotation("MySql:CharSet", "utf8");
});
modelBuilder.Entity("ASC.Data.Backup.EF.Model.BackupSchedule", b =>
{
b.Property<int>("TenantId")
.HasColumnType("int(10)")
.HasColumnName("tenant_id");
b.Property<bool>("BackupMail")
.ValueGeneratedOnAdd()
.HasColumnType("tinyint(1)")
.HasColumnName("backup_mail")
.HasDefaultValueSql("'0'");
b.Property<int>("BackupsStored")
.HasColumnType("int(10)")
.HasColumnName("backups_stored");
b.Property<string>("Cron")
.IsRequired()
.HasColumnType("varchar(255)")
.HasColumnName("cron")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<DateTime>("LastBackupTime")
.HasColumnType("datetime")
.HasColumnName("last_backup_time");
b.Property<string>("StorageBasePath")
.ValueGeneratedOnAdd()
.HasColumnType("varchar(255)")
.HasColumnName("storage_base_path")
.HasDefaultValueSql("NULL")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("StorageParams")
.ValueGeneratedOnAdd()
.HasColumnType("text")
.HasColumnName("storage_params")
.HasDefaultValueSql("NULL")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("StorageType")
.HasColumnType("int(10)")
.HasColumnName("storage_type");
b.HasKey("TenantId")
.HasName("PRIMARY");
b.ToTable("backup_schedule", (string)null);
b.HasAnnotation("MySql:CharSet", "utf8");
});
#pragma warning restore 612, 618
}
}
}

View File

@ -0,0 +1,159 @@
using System;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace ASC.Data.Backup.Core.Migrations.MySql.BackupsContextMySql
{
public partial class BackupsContextMySql : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterDatabase()
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "backup_backup",
columns: table => new
{
id = table.Column<string>(type: "char(38)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
tenant_id = table.Column<int>(type: "int(10)", nullable: false),
is_scheduled = table.Column<bool>(type: "tinyint(1)", nullable: false),
name = table.Column<string>(type: "varchar(255)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
hash = table.Column<string>(type: "varchar(64)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
storage_type = table.Column<int>(type: "int(10)", nullable: false),
storage_base_path = table.Column<string>(type: "varchar(255)", nullable: true, defaultValueSql: "NULL", collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
storage_path = table.Column<string>(type: "varchar(255)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
created_on = table.Column<DateTime>(type: "datetime", nullable: false),
expires_on = table.Column<DateTime>(type: "datetime", nullable: false, defaultValueSql: "'0001-01-01 00:00:00'"),
storage_params = table.Column<string>(type: "text", nullable: true, defaultValueSql: "NULL", collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8")
},
constraints: table =>
{
table.PrimaryKey("PRIMARY", x => x.id);
})
.Annotation("MySql:CharSet", "utf8");
migrationBuilder.CreateTable(
name: "backup_schedule",
columns: table => new
{
tenant_id = table.Column<int>(type: "int(10)", nullable: false),
backup_mail = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValueSql: "'0'"),
cron = table.Column<string>(type: "varchar(255)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
backups_stored = table.Column<int>(type: "int(10)", nullable: false),
storage_type = table.Column<int>(type: "int(10)", nullable: false),
storage_base_path = table.Column<string>(type: "varchar(255)", nullable: true, defaultValueSql: "NULL", collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
last_backup_time = table.Column<DateTime>(type: "datetime", nullable: false),
storage_params = table.Column<string>(type: "text", nullable: true, defaultValueSql: "NULL", collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8")
},
constraints: table =>
{
table.PrimaryKey("PRIMARY", x => x.tenant_id);
})
.Annotation("MySql:CharSet", "utf8");
migrationBuilder.CreateTable(
name: "tenants_tenants",
columns: table => new
{
id = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
name = table.Column<string>(type: "varchar(255)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
alias = table.Column<string>(type: "varchar(100)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
mappeddomain = table.Column<string>(type: "varchar(100)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
version = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'2'"),
version_changed = table.Column<DateTime>(type: "datetime", nullable: true),
language = table.Column<string>(type: "char(10)", nullable: false, defaultValueSql: "'en-US'", collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
timezone = table.Column<string>(type: "varchar(50)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
trusteddomains = table.Column<string>(type: "varchar(1024)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
trusteddomainsenabled = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'1'"),
status = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
statuschanged = table.Column<DateTime>(type: "datetime", nullable: true),
creationdatetime = table.Column<DateTime>(type: "datetime", nullable: false),
owner_id = table.Column<string>(type: "varchar(38)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
payment_id = table.Column<string>(type: "varchar(38)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
industry = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
last_modified = table.Column<DateTime>(type: "timestamp", nullable: false),
spam = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValueSql: "'1'"),
calls = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValueSql: "'1'")
},
constraints: table =>
{
table.PrimaryKey("PK_tenants_tenants", x => x.id);
})
.Annotation("MySql:CharSet", "utf8");
migrationBuilder.InsertData(
table: "tenants_tenants",
columns: new[] { "id", "alias", "creationdatetime", "last_modified", "mappeddomain", "name", "owner_id", "payment_id", "statuschanged", "timezone", "trusteddomains", "version_changed" },
values: new object[] { 1, "localhost", new DateTime(2021, 3, 9, 17, 46, 59, 97, DateTimeKind.Utc).AddTicks(4317), new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), null, "Web Office", "66faa6e4-f133-11ea-b126-00ffeec8b4ef", null, null, null, null, null });
migrationBuilder.CreateIndex(
name: "expires_on",
table: "backup_backup",
column: "expires_on");
migrationBuilder.CreateIndex(
name: "is_scheduled",
table: "backup_backup",
column: "is_scheduled");
migrationBuilder.CreateIndex(
name: "tenant_id",
table: "backup_backup",
column: "tenant_id");
migrationBuilder.CreateIndex(
name: "alias",
table: "tenants_tenants",
column: "alias",
unique: true);
migrationBuilder.CreateIndex(
name: "last_modified",
table: "tenants_tenants",
column: "last_modified");
migrationBuilder.CreateIndex(
name: "mappeddomain",
table: "tenants_tenants",
column: "mappeddomain");
migrationBuilder.CreateIndex(
name: "version",
table: "tenants_tenants",
column: "version");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "backup_backup");
migrationBuilder.DropTable(
name: "backup_schedule");
migrationBuilder.DropTable(
name: "tenants_tenants");
}
}
}

View File

@ -0,0 +1,313 @@
// <auto-generated />
using System;
using ASC.Data.Backup.EF.Context;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace ASC.Data.Backup.Core.Migrations.MySql.BackupsContextMySql
{
[DbContext(typeof(MySqlBackupsContext))]
partial class MySqlBackupsContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "6.0.4")
.HasAnnotation("Relational:MaxIdentifierLength", 64);
modelBuilder.Entity("ASC.Core.Common.EF.Model.DbTenant", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("id");
b.Property<string>("Alias")
.IsRequired()
.HasColumnType("varchar(100)")
.HasColumnName("alias")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<bool>("Calls")
.ValueGeneratedOnAdd()
.HasColumnType("tinyint(1)")
.HasColumnName("calls")
.HasDefaultValueSql("'1'");
b.Property<DateTime>("CreationDateTime")
.HasColumnType("datetime")
.HasColumnName("creationdatetime");
b.Property<int>("Industry")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("industry")
.HasDefaultValueSql("'0'");
b.Property<string>("Language")
.IsRequired()
.ValueGeneratedOnAdd()
.HasColumnType("char(10)")
.HasColumnName("language")
.HasDefaultValueSql("'en-US'")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<DateTime>("LastModified")
.HasColumnType("timestamp")
.HasColumnName("last_modified");
b.Property<string>("MappedDomain")
.HasColumnType("varchar(100)")
.HasColumnName("mappeddomain")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("varchar(255)")
.HasColumnName("name")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("OwnerId")
.HasColumnType("varchar(38)")
.HasColumnName("owner_id")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("PaymentId")
.HasColumnType("varchar(38)")
.HasColumnName("payment_id")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<bool>("Spam")
.ValueGeneratedOnAdd()
.HasColumnType("tinyint(1)")
.HasColumnName("spam")
.HasDefaultValueSql("'1'");
b.Property<int>("Status")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("status")
.HasDefaultValueSql("'0'");
b.Property<DateTime?>("StatusChanged")
.HasColumnType("datetime")
.HasColumnName("statuschanged");
b.Property<string>("TimeZone")
.HasColumnType("varchar(50)")
.HasColumnName("timezone")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("TrustedDomainsEnabled")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("trusteddomainsenabled")
.HasDefaultValueSql("'1'");
b.Property<string>("TrustedDomainsRaw")
.HasColumnType("varchar(1024)")
.HasColumnName("trusteddomains")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("Version")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("version")
.HasDefaultValueSql("'2'");
b.Property<DateTime?>("Version_Changed")
.HasColumnType("datetime")
.HasColumnName("version_changed");
b.HasKey("Id");
b.HasIndex("Alias")
.IsUnique()
.HasDatabaseName("alias");
b.HasIndex("LastModified")
.HasDatabaseName("last_modified");
b.HasIndex("MappedDomain")
.HasDatabaseName("mappeddomain");
b.HasIndex("Version")
.HasDatabaseName("version");
b.ToTable("tenants_tenants", (string)null);
b.HasAnnotation("MySql:CharSet", "utf8");
b.HasData(
new
{
Id = 1,
Alias = "localhost",
Calls = false,
CreationDateTime = new DateTime(2021, 3, 9, 17, 46, 59, 97, DateTimeKind.Utc).AddTicks(4317),
Industry = 0,
LastModified = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified),
Name = "Web Office",
OwnerId = "66faa6e4-f133-11ea-b126-00ffeec8b4ef",
Spam = false,
Status = 0,
TrustedDomainsEnabled = 0,
Version = 0
});
});
modelBuilder.Entity("ASC.Data.Backup.EF.Model.BackupRecord", b =>
{
b.Property<string>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(38)")
.HasColumnName("id")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<DateTime>("CreatedOn")
.HasColumnType("datetime")
.HasColumnName("created_on");
b.Property<DateTime>("ExpiresOn")
.ValueGeneratedOnAdd()
.HasColumnType("datetime")
.HasColumnName("expires_on")
.HasDefaultValueSql("'0001-01-01 00:00:00'");
b.Property<string>("Hash")
.IsRequired()
.HasColumnType("varchar(64)")
.HasColumnName("hash")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<bool>("IsScheduled")
.HasColumnType("tinyint(1)")
.HasColumnName("is_scheduled");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("varchar(255)")
.HasColumnName("name")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("StorageBasePath")
.ValueGeneratedOnAdd()
.HasColumnType("varchar(255)")
.HasColumnName("storage_base_path")
.HasDefaultValueSql("NULL")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("StorageParams")
.ValueGeneratedOnAdd()
.HasColumnType("text")
.HasColumnName("storage_params")
.HasDefaultValueSql("NULL")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("StoragePath")
.IsRequired()
.HasColumnType("varchar(255)")
.HasColumnName("storage_path")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("StorageType")
.HasColumnType("int(10)")
.HasColumnName("storage_type");
b.Property<int>("TenantId")
.HasColumnType("int(10)")
.HasColumnName("tenant_id");
b.HasKey("Id")
.HasName("PRIMARY");
b.HasIndex("ExpiresOn")
.HasDatabaseName("expires_on");
b.HasIndex("IsScheduled")
.HasDatabaseName("is_scheduled");
b.HasIndex("TenantId")
.HasDatabaseName("tenant_id");
b.ToTable("backup_backup", (string)null);
b.HasAnnotation("MySql:CharSet", "utf8");
});
modelBuilder.Entity("ASC.Data.Backup.EF.Model.BackupSchedule", b =>
{
b.Property<int>("TenantId")
.HasColumnType("int(10)")
.HasColumnName("tenant_id");
b.Property<bool>("BackupMail")
.ValueGeneratedOnAdd()
.HasColumnType("tinyint(1)")
.HasColumnName("backup_mail")
.HasDefaultValueSql("'0'");
b.Property<int>("BackupsStored")
.HasColumnType("int(10)")
.HasColumnName("backups_stored");
b.Property<string>("Cron")
.IsRequired()
.HasColumnType("varchar(255)")
.HasColumnName("cron")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<DateTime>("LastBackupTime")
.HasColumnType("datetime")
.HasColumnName("last_backup_time");
b.Property<string>("StorageBasePath")
.ValueGeneratedOnAdd()
.HasColumnType("varchar(255)")
.HasColumnName("storage_base_path")
.HasDefaultValueSql("NULL")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("StorageParams")
.ValueGeneratedOnAdd()
.HasColumnType("text")
.HasColumnName("storage_params")
.HasDefaultValueSql("NULL")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("StorageType")
.HasColumnType("int(10)")
.HasColumnName("storage_type");
b.HasKey("TenantId")
.HasName("PRIMARY");
b.ToTable("backup_schedule", (string)null);
b.HasAnnotation("MySql:CharSet", "utf8");
});
#pragma warning restore 612, 618
}
}
}

View File

@ -0,0 +1,315 @@
// <auto-generated />
using System;
using ASC.Data.Backup.EF.Context;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace ASC.Data.Backup.Core.Migrations.PostgreSql.BackupsContextPostgreSql
{
[DbContext(typeof(PostgreSqlBackupsContext))]
[Migration("20220711152843_BackupsContextPostgreSql")]
partial class BackupsContextPostgreSql
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "6.0.4")
.HasAnnotation("Relational:MaxIdentifierLength", 64);
modelBuilder.Entity("ASC.Core.Common.EF.Model.DbTenant", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("id");
b.Property<string>("Alias")
.IsRequired()
.HasColumnType("varchar(100)")
.HasColumnName("alias")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<bool>("Calls")
.ValueGeneratedOnAdd()
.HasColumnType("tinyint(1)")
.HasColumnName("calls")
.HasDefaultValueSql("'1'");
b.Property<DateTime>("CreationDateTime")
.HasColumnType("datetime")
.HasColumnName("creationdatetime");
b.Property<int>("Industry")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("industry")
.HasDefaultValueSql("'0'");
b.Property<string>("Language")
.IsRequired()
.ValueGeneratedOnAdd()
.HasColumnType("char(10)")
.HasColumnName("language")
.HasDefaultValueSql("'en-US'")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<DateTime>("LastModified")
.HasColumnType("timestamp")
.HasColumnName("last_modified");
b.Property<string>("MappedDomain")
.HasColumnType("varchar(100)")
.HasColumnName("mappeddomain")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("varchar(255)")
.HasColumnName("name")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("OwnerId")
.HasColumnType("varchar(38)")
.HasColumnName("owner_id")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("PaymentId")
.HasColumnType("varchar(38)")
.HasColumnName("payment_id")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<bool>("Spam")
.ValueGeneratedOnAdd()
.HasColumnType("tinyint(1)")
.HasColumnName("spam")
.HasDefaultValueSql("'1'");
b.Property<int>("Status")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("status")
.HasDefaultValueSql("'0'");
b.Property<DateTime?>("StatusChanged")
.HasColumnType("datetime")
.HasColumnName("statuschanged");
b.Property<string>("TimeZone")
.HasColumnType("varchar(50)")
.HasColumnName("timezone")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("TrustedDomainsEnabled")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("trusteddomainsenabled")
.HasDefaultValueSql("'1'");
b.Property<string>("TrustedDomainsRaw")
.HasColumnType("varchar(1024)")
.HasColumnName("trusteddomains")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("Version")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("version")
.HasDefaultValueSql("'2'");
b.Property<DateTime?>("Version_Changed")
.HasColumnType("datetime")
.HasColumnName("version_changed");
b.HasKey("Id");
b.HasIndex("Alias")
.IsUnique()
.HasDatabaseName("alias");
b.HasIndex("LastModified")
.HasDatabaseName("last_modified");
b.HasIndex("MappedDomain")
.HasDatabaseName("mappeddomain");
b.HasIndex("Version")
.HasDatabaseName("version");
b.ToTable("tenants_tenants", (string)null);
b.HasAnnotation("MySql:CharSet", "utf8");
b.HasData(
new
{
Id = 1,
Alias = "localhost",
Calls = false,
CreationDateTime = new DateTime(2021, 3, 9, 17, 46, 59, 97, DateTimeKind.Utc).AddTicks(4317),
Industry = 0,
LastModified = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified),
Name = "Web Office",
OwnerId = "66faa6e4-f133-11ea-b126-00ffeec8b4ef",
Spam = false,
Status = 0,
TrustedDomainsEnabled = 0,
Version = 0
});
});
modelBuilder.Entity("ASC.Data.Backup.EF.Model.BackupRecord", b =>
{
b.Property<string>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(38)")
.HasColumnName("id")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<DateTime>("CreatedOn")
.HasColumnType("datetime")
.HasColumnName("created_on");
b.Property<DateTime>("ExpiresOn")
.ValueGeneratedOnAdd()
.HasColumnType("datetime")
.HasColumnName("expires_on")
.HasDefaultValueSql("'0001-01-01 00:00:00'");
b.Property<string>("Hash")
.IsRequired()
.HasColumnType("varchar(64)")
.HasColumnName("hash")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<bool>("IsScheduled")
.HasColumnType("tinyint(1)")
.HasColumnName("is_scheduled");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("varchar(255)")
.HasColumnName("name")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("StorageBasePath")
.ValueGeneratedOnAdd()
.HasColumnType("varchar(255)")
.HasColumnName("storage_base_path")
.HasDefaultValueSql("NULL")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("StorageParams")
.ValueGeneratedOnAdd()
.HasColumnType("text")
.HasColumnName("storage_params")
.HasDefaultValueSql("NULL")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("StoragePath")
.IsRequired()
.HasColumnType("varchar(255)")
.HasColumnName("storage_path")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("StorageType")
.HasColumnType("int(10)")
.HasColumnName("storage_type");
b.Property<int>("TenantId")
.HasColumnType("int(10)")
.HasColumnName("tenant_id");
b.HasKey("Id")
.HasName("PRIMARY");
b.HasIndex("ExpiresOn")
.HasDatabaseName("expires_on");
b.HasIndex("IsScheduled")
.HasDatabaseName("is_scheduled");
b.HasIndex("TenantId")
.HasDatabaseName("tenant_id");
b.ToTable("backup_backup", (string)null);
b.HasAnnotation("MySql:CharSet", "utf8");
});
modelBuilder.Entity("ASC.Data.Backup.EF.Model.BackupSchedule", b =>
{
b.Property<int>("TenantId")
.HasColumnType("int(10)")
.HasColumnName("tenant_id");
b.Property<bool>("BackupMail")
.ValueGeneratedOnAdd()
.HasColumnType("tinyint(1)")
.HasColumnName("backup_mail")
.HasDefaultValueSql("'0'");
b.Property<int>("BackupsStored")
.HasColumnType("int(10)")
.HasColumnName("backups_stored");
b.Property<string>("Cron")
.IsRequired()
.HasColumnType("varchar(255)")
.HasColumnName("cron")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<DateTime>("LastBackupTime")
.HasColumnType("datetime")
.HasColumnName("last_backup_time");
b.Property<string>("StorageBasePath")
.ValueGeneratedOnAdd()
.HasColumnType("varchar(255)")
.HasColumnName("storage_base_path")
.HasDefaultValueSql("NULL")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("StorageParams")
.ValueGeneratedOnAdd()
.HasColumnType("text")
.HasColumnName("storage_params")
.HasDefaultValueSql("NULL")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("StorageType")
.HasColumnType("int(10)")
.HasColumnName("storage_type");
b.HasKey("TenantId")
.HasName("PRIMARY");
b.ToTable("backup_schedule", (string)null);
b.HasAnnotation("MySql:CharSet", "utf8");
});
#pragma warning restore 612, 618
}
}
}

View File

@ -0,0 +1,159 @@
using System;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace ASC.Data.Backup.Core.Migrations.PostgreSql.BackupsContextPostgreSql
{
public partial class BackupsContextPostgreSql : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterDatabase()
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "backup_backup",
columns: table => new
{
id = table.Column<string>(type: "char(38)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
tenant_id = table.Column<int>(type: "int(10)", nullable: false),
is_scheduled = table.Column<bool>(type: "tinyint(1)", nullable: false),
name = table.Column<string>(type: "varchar(255)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
hash = table.Column<string>(type: "varchar(64)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
storage_type = table.Column<int>(type: "int(10)", nullable: false),
storage_base_path = table.Column<string>(type: "varchar(255)", nullable: true, defaultValueSql: "NULL", collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
storage_path = table.Column<string>(type: "varchar(255)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
created_on = table.Column<DateTime>(type: "datetime", nullable: false),
expires_on = table.Column<DateTime>(type: "datetime", nullable: false, defaultValueSql: "'0001-01-01 00:00:00'"),
storage_params = table.Column<string>(type: "text", nullable: true, defaultValueSql: "NULL", collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8")
},
constraints: table =>
{
table.PrimaryKey("PRIMARY", x => x.id);
})
.Annotation("MySql:CharSet", "utf8");
migrationBuilder.CreateTable(
name: "backup_schedule",
columns: table => new
{
tenant_id = table.Column<int>(type: "int(10)", nullable: false),
backup_mail = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValueSql: "'0'"),
cron = table.Column<string>(type: "varchar(255)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
backups_stored = table.Column<int>(type: "int(10)", nullable: false),
storage_type = table.Column<int>(type: "int(10)", nullable: false),
storage_base_path = table.Column<string>(type: "varchar(255)", nullable: true, defaultValueSql: "NULL", collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
last_backup_time = table.Column<DateTime>(type: "datetime", nullable: false),
storage_params = table.Column<string>(type: "text", nullable: true, defaultValueSql: "NULL", collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8")
},
constraints: table =>
{
table.PrimaryKey("PRIMARY", x => x.tenant_id);
})
.Annotation("MySql:CharSet", "utf8");
migrationBuilder.CreateTable(
name: "tenants_tenants",
columns: table => new
{
id = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
name = table.Column<string>(type: "varchar(255)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
alias = table.Column<string>(type: "varchar(100)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
mappeddomain = table.Column<string>(type: "varchar(100)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
version = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'2'"),
version_changed = table.Column<DateTime>(type: "datetime", nullable: true),
language = table.Column<string>(type: "char(10)", nullable: false, defaultValueSql: "'en-US'", collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
timezone = table.Column<string>(type: "varchar(50)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
trusteddomains = table.Column<string>(type: "varchar(1024)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
trusteddomainsenabled = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'1'"),
status = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
statuschanged = table.Column<DateTime>(type: "datetime", nullable: true),
creationdatetime = table.Column<DateTime>(type: "datetime", nullable: false),
owner_id = table.Column<string>(type: "varchar(38)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
payment_id = table.Column<string>(type: "varchar(38)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
industry = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
last_modified = table.Column<DateTime>(type: "timestamp", nullable: false),
spam = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValueSql: "'1'"),
calls = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValueSql: "'1'")
},
constraints: table =>
{
table.PrimaryKey("PK_tenants_tenants", x => x.id);
})
.Annotation("MySql:CharSet", "utf8");
migrationBuilder.InsertData(
table: "tenants_tenants",
columns: new[] { "id", "alias", "creationdatetime", "last_modified", "mappeddomain", "name", "owner_id", "payment_id", "statuschanged", "timezone", "trusteddomains", "version_changed" },
values: new object[] { 1, "localhost", new DateTime(2021, 3, 9, 17, 46, 59, 97, DateTimeKind.Utc).AddTicks(4317), new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), null, "Web Office", "66faa6e4-f133-11ea-b126-00ffeec8b4ef", null, null, null, null, null });
migrationBuilder.CreateIndex(
name: "expires_on",
table: "backup_backup",
column: "expires_on");
migrationBuilder.CreateIndex(
name: "is_scheduled",
table: "backup_backup",
column: "is_scheduled");
migrationBuilder.CreateIndex(
name: "tenant_id",
table: "backup_backup",
column: "tenant_id");
migrationBuilder.CreateIndex(
name: "alias",
table: "tenants_tenants",
column: "alias",
unique: true);
migrationBuilder.CreateIndex(
name: "last_modified",
table: "tenants_tenants",
column: "last_modified");
migrationBuilder.CreateIndex(
name: "mappeddomain",
table: "tenants_tenants",
column: "mappeddomain");
migrationBuilder.CreateIndex(
name: "version",
table: "tenants_tenants",
column: "version");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "backup_backup");
migrationBuilder.DropTable(
name: "backup_schedule");
migrationBuilder.DropTable(
name: "tenants_tenants");
}
}
}

View File

@ -0,0 +1,313 @@
// <auto-generated />
using System;
using ASC.Data.Backup.EF.Context;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace ASC.Data.Backup.Core.Migrations.PostgreSql.BackupsContextPostgreSql
{
[DbContext(typeof(PostgreSqlBackupsContext))]
partial class PostgreSqlBackupsContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "6.0.4")
.HasAnnotation("Relational:MaxIdentifierLength", 64);
modelBuilder.Entity("ASC.Core.Common.EF.Model.DbTenant", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("id");
b.Property<string>("Alias")
.IsRequired()
.HasColumnType("varchar(100)")
.HasColumnName("alias")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<bool>("Calls")
.ValueGeneratedOnAdd()
.HasColumnType("tinyint(1)")
.HasColumnName("calls")
.HasDefaultValueSql("'1'");
b.Property<DateTime>("CreationDateTime")
.HasColumnType("datetime")
.HasColumnName("creationdatetime");
b.Property<int>("Industry")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("industry")
.HasDefaultValueSql("'0'");
b.Property<string>("Language")
.IsRequired()
.ValueGeneratedOnAdd()
.HasColumnType("char(10)")
.HasColumnName("language")
.HasDefaultValueSql("'en-US'")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<DateTime>("LastModified")
.HasColumnType("timestamp")
.HasColumnName("last_modified");
b.Property<string>("MappedDomain")
.HasColumnType("varchar(100)")
.HasColumnName("mappeddomain")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("varchar(255)")
.HasColumnName("name")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("OwnerId")
.HasColumnType("varchar(38)")
.HasColumnName("owner_id")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("PaymentId")
.HasColumnType("varchar(38)")
.HasColumnName("payment_id")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<bool>("Spam")
.ValueGeneratedOnAdd()
.HasColumnType("tinyint(1)")
.HasColumnName("spam")
.HasDefaultValueSql("'1'");
b.Property<int>("Status")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("status")
.HasDefaultValueSql("'0'");
b.Property<DateTime?>("StatusChanged")
.HasColumnType("datetime")
.HasColumnName("statuschanged");
b.Property<string>("TimeZone")
.HasColumnType("varchar(50)")
.HasColumnName("timezone")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("TrustedDomainsEnabled")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("trusteddomainsenabled")
.HasDefaultValueSql("'1'");
b.Property<string>("TrustedDomainsRaw")
.HasColumnType("varchar(1024)")
.HasColumnName("trusteddomains")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("Version")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("version")
.HasDefaultValueSql("'2'");
b.Property<DateTime?>("Version_Changed")
.HasColumnType("datetime")
.HasColumnName("version_changed");
b.HasKey("Id");
b.HasIndex("Alias")
.IsUnique()
.HasDatabaseName("alias");
b.HasIndex("LastModified")
.HasDatabaseName("last_modified");
b.HasIndex("MappedDomain")
.HasDatabaseName("mappeddomain");
b.HasIndex("Version")
.HasDatabaseName("version");
b.ToTable("tenants_tenants", (string)null);
b.HasAnnotation("MySql:CharSet", "utf8");
b.HasData(
new
{
Id = 1,
Alias = "localhost",
Calls = false,
CreationDateTime = new DateTime(2021, 3, 9, 17, 46, 59, 97, DateTimeKind.Utc).AddTicks(4317),
Industry = 0,
LastModified = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified),
Name = "Web Office",
OwnerId = "66faa6e4-f133-11ea-b126-00ffeec8b4ef",
Spam = false,
Status = 0,
TrustedDomainsEnabled = 0,
Version = 0
});
});
modelBuilder.Entity("ASC.Data.Backup.EF.Model.BackupRecord", b =>
{
b.Property<string>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(38)")
.HasColumnName("id")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<DateTime>("CreatedOn")
.HasColumnType("datetime")
.HasColumnName("created_on");
b.Property<DateTime>("ExpiresOn")
.ValueGeneratedOnAdd()
.HasColumnType("datetime")
.HasColumnName("expires_on")
.HasDefaultValueSql("'0001-01-01 00:00:00'");
b.Property<string>("Hash")
.IsRequired()
.HasColumnType("varchar(64)")
.HasColumnName("hash")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<bool>("IsScheduled")
.HasColumnType("tinyint(1)")
.HasColumnName("is_scheduled");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("varchar(255)")
.HasColumnName("name")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("StorageBasePath")
.ValueGeneratedOnAdd()
.HasColumnType("varchar(255)")
.HasColumnName("storage_base_path")
.HasDefaultValueSql("NULL")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("StorageParams")
.ValueGeneratedOnAdd()
.HasColumnType("text")
.HasColumnName("storage_params")
.HasDefaultValueSql("NULL")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("StoragePath")
.IsRequired()
.HasColumnType("varchar(255)")
.HasColumnName("storage_path")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("StorageType")
.HasColumnType("int(10)")
.HasColumnName("storage_type");
b.Property<int>("TenantId")
.HasColumnType("int(10)")
.HasColumnName("tenant_id");
b.HasKey("Id")
.HasName("PRIMARY");
b.HasIndex("ExpiresOn")
.HasDatabaseName("expires_on");
b.HasIndex("IsScheduled")
.HasDatabaseName("is_scheduled");
b.HasIndex("TenantId")
.HasDatabaseName("tenant_id");
b.ToTable("backup_backup", (string)null);
b.HasAnnotation("MySql:CharSet", "utf8");
});
modelBuilder.Entity("ASC.Data.Backup.EF.Model.BackupSchedule", b =>
{
b.Property<int>("TenantId")
.HasColumnType("int(10)")
.HasColumnName("tenant_id");
b.Property<bool>("BackupMail")
.ValueGeneratedOnAdd()
.HasColumnType("tinyint(1)")
.HasColumnName("backup_mail")
.HasDefaultValueSql("'0'");
b.Property<int>("BackupsStored")
.HasColumnType("int(10)")
.HasColumnName("backups_stored");
b.Property<string>("Cron")
.IsRequired()
.HasColumnType("varchar(255)")
.HasColumnName("cron")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<DateTime>("LastBackupTime")
.HasColumnType("datetime")
.HasColumnName("last_backup_time");
b.Property<string>("StorageBasePath")
.ValueGeneratedOnAdd()
.HasColumnType("varchar(255)")
.HasColumnName("storage_base_path")
.HasDefaultValueSql("NULL")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("StorageParams")
.ValueGeneratedOnAdd()
.HasColumnType("text")
.HasColumnName("storage_params")
.HasDefaultValueSql("NULL")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("StorageType")
.HasColumnType("int(10)")
.HasColumnName("storage_type");
b.HasKey("TenantId")
.HasName("PRIMARY");
b.ToTable("backup_schedule", (string)null);
b.HasAnnotation("MySql:CharSet", "utf8");
});
#pragma warning restore 612, 618
}
}
}

View File

@ -11,7 +11,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace ASC.EventBus.Extensions.Logger.Migrations.MySql.IntegrationEventLogContextMySql
{
[DbContext(typeof(MySqlIntegrationEventLogContext))]
[Migration("20220708104430_IntegrationEventLogContextMySql")]
[Migration("20220711152848_IntegrationEventLogContextMySql")]
partial class IntegrationEventLogContextMySql
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)

View File

@ -11,7 +11,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace ASC.EventBus.Extensions.Logger.Migrations.PostgreSql.IntegrationEventLogContextPostgreSql
{
[DbContext(typeof(PostgreSqlIntegrationEventLogContext))]
[Migration("20220708104431_IntegrationEventLogContextPostgreSql")]
[Migration("20220711152849_IntegrationEventLogContextPostgreSql")]
partial class IntegrationEventLogContextPostgreSql
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)

View File

@ -11,7 +11,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace ASC.Feed.Migrations.MySql.FeedDbContextMySql
{
[DbContext(typeof(MySqlFeedDbContext))]
[Migration("20220708104424_FeedDbContextMySql")]
[Migration("20220711152844_FeedDbContextMySql")]
partial class FeedDbContextMySql
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)

View File

@ -11,7 +11,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace ASC.Feed.Migrations.PostgreSql.FeedDbContextPostgreSql
{
[DbContext(typeof(PostgreSqlFeedDbContext))]
[Migration("20220708104425_FeedDbContextPostgreSql")]
[Migration("20220711152845_FeedDbContextPostgreSql")]
partial class FeedDbContextPostgreSql
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)

View File

@ -11,7 +11,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace ASC.Webhooks.Core.Migrations.MySql.WebhooksDbContextMySql
{
[DbContext(typeof(MySqlWebhooksDbContext))]
[Migration("20220708104426_WebhooksDbContextMySql")]
[Migration("20220711152846_WebhooksDbContextMySql")]
partial class WebhooksDbContextMySql
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)

View File

@ -11,7 +11,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace ASC.Webhooks.Core.Migrations.PostgreSql.WebhooksDbContextPostgreSql
{
[DbContext(typeof(PostgreSqlWebhooksDbContext))]
[Migration("20220708104427_WebhooksDbContextPostgreSql")]
[Migration("20220711152847_WebhooksDbContextPostgreSql")]
partial class WebhooksDbContextPostgreSql
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)

View File

@ -11,7 +11,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace ASC.Files.Core.Migrations.MySql.FilesDbContextMySql
{
[DbContext(typeof(MySqlFilesDbContext))]
[Migration("20220708104420_FilesDbContextMySql")]
[Migration("20220711152840_FilesDbContextMySql")]
partial class FilesDbContextMySql
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
@ -75,9 +75,9 @@ namespace ASC.Files.Core.Migrations.MySql.FilesDbContextMySql
.HasColumnName("price")
.HasDefaultValueSql("'0.00'");
b.Property<int>("Visible")
b.Property<bool>("Visible")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnType("tinyint(1)")
.HasColumnName("visible")
.HasDefaultValueSql("'0'");
@ -99,7 +99,7 @@ namespace ASC.Files.Core.Migrations.MySql.FilesDbContextMySql
MaxTotalSize = 10995116277760L,
Name = "default",
Price = 0.00m,
Visible = 0
Visible = false
});
});
@ -162,9 +162,9 @@ namespace ASC.Files.Core.Migrations.MySql.FilesDbContextMySql
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("Calls")
b.Property<bool>("Calls")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnType("tinyint(1)")
.HasColumnName("calls")
.HasDefaultValueSql("'1'");
@ -205,7 +205,6 @@ namespace ASC.Files.Core.Migrations.MySql.FilesDbContextMySql
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("OwnerId")
.IsRequired()
.HasColumnType("varchar(38)")
.HasColumnName("owner_id")
.UseCollation("utf8_general_ci")
@ -217,9 +216,9 @@ namespace ASC.Files.Core.Migrations.MySql.FilesDbContextMySql
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("Spam")
b.Property<bool>("Spam")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnType("tinyint(1)")
.HasColumnName("spam")
.HasDefaultValueSql("'1'");
@ -263,6 +262,10 @@ namespace ASC.Files.Core.Migrations.MySql.FilesDbContextMySql
b.HasKey("Id");
b.HasIndex("Alias")
.IsUnique()
.HasDatabaseName("alias");
b.HasIndex("LastModified")
.HasDatabaseName("last_modified");
@ -281,12 +284,13 @@ namespace ASC.Files.Core.Migrations.MySql.FilesDbContextMySql
{
Id = 1,
Alias = "localhost",
Calls = 0,
Calls = false,
CreationDateTime = new DateTime(2021, 3, 9, 17, 46, 59, 97, DateTimeKind.Utc).AddTicks(4317),
Industry = 0,
LastModified = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified),
Name = "Web Office",
OwnerId = "66faa6e4-f133-11ea-b126-00ffeec8b4ef",
Spam = 0,
Spam = false,
Status = 0,
TrustedDomainsEnabled = 0,
Version = 0
@ -308,8 +312,10 @@ namespace ASC.Files.Core.Migrations.MySql.FilesDbContextMySql
.HasColumnName("version");
b.Property<int>("Category")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("category");
.HasColumnName("category")
.HasDefaultValueSql("'0'");
b.Property<string>("Changes")
.HasColumnType("mediumtext")
@ -346,15 +352,15 @@ namespace ASC.Files.Core.Migrations.MySql.FilesDbContextMySql
.HasColumnType("datetime")
.HasColumnName("create_on");
b.Property<int>("CurrentVersion")
b.Property<bool>("CurrentVersion")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnType("tinyint(1)")
.HasColumnName("current_version")
.HasDefaultValueSql("'0'");
b.Property<int>("Encrypted")
b.Property<bool>("Encrypted")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnType("tinyint(1)")
.HasColumnName("encrypted")
.HasDefaultValueSql("'0'");
@ -489,6 +495,30 @@ namespace ASC.Files.Core.Migrations.MySql.FilesDbContextMySql
b.HasAnnotation("MySql:CharSet", "utf8");
});
modelBuilder.Entity("ASC.Files.Core.EF.DbFilesProperties", b =>
{
b.Property<int>("TenantId")
.HasColumnType("int")
.HasColumnName("tenant_id");
b.Property<string>("EntryId")
.HasColumnType("varchar(32)")
.HasColumnName("entry_id")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("Data")
.HasColumnType("mediumtext")
.HasColumnName("data")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.HasKey("TenantId", "EntryId")
.HasName("PRIMARY");
b.ToTable("files_properties", (string)null);
});
modelBuilder.Entity("ASC.Files.Core.EF.DbFilesSecurity", b =>
{
b.Property<int>("TenantId")
@ -566,8 +596,10 @@ namespace ASC.Files.Core.Migrations.MySql.FilesDbContextMySql
.HasColumnName("tenant_id");
b.Property<int>("Type")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("flag");
.HasColumnName("flag")
.HasDefaultValueSql("'0'");
b.HasKey("Id");
@ -640,6 +672,12 @@ namespace ASC.Files.Core.Migrations.MySql.FilesDbContextMySql
.HasColumnType("datetime")
.HasColumnName("create_on");
b.Property<string>("FolderId")
.HasColumnType("text")
.HasColumnName("folder_id")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("FolderType")
.ValueGeneratedOnAdd()
.HasColumnType("int")
@ -662,6 +700,10 @@ namespace ASC.Files.Core.Migrations.MySql.FilesDbContextMySql
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("RoomType")
.HasColumnType("int")
.HasColumnName("room_type");
b.Property<int>("TenantId")
.HasColumnType("int")
.HasColumnName("tenant_id");
@ -701,6 +743,9 @@ namespace ASC.Files.Core.Migrations.MySql.FilesDbContextMySql
b.HasKey("Id");
b.HasIndex("TenantId")
.HasDatabaseName("tenant_id");
b.ToTable("files_thirdparty_account", (string)null);
b.HasAnnotation("MySql:CharSet", "utf8");

View File

@ -37,13 +37,13 @@ namespace ASC.Files.Core.Migrations.MySql.FilesDbContextMySql
version = table.Column<int>(type: "int", nullable: false),
tenant_id = table.Column<int>(type: "int", nullable: false),
version_group = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'1'"),
current_version = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
current_version = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValueSql: "'0'"),
folder_id = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
title = table.Column<string>(type: "varchar(400)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
content_length = table.Column<long>(type: "bigint", nullable: false, defaultValueSql: "'0'"),
file_status = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
category = table.Column<int>(type: "int", nullable: false),
category = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
create_by = table.Column<string>(type: "char(38)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
create_on = table.Column<DateTime>(type: "datetime", nullable: false),
@ -56,7 +56,7 @@ namespace ASC.Files.Core.Migrations.MySql.FilesDbContextMySql
.Annotation("MySql:CharSet", "utf8"),
changes = table.Column<string>(type: "mediumtext", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
encrypted = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
encrypted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValueSql: "'0'"),
forcesave = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
thumb = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'")
},
@ -124,6 +124,22 @@ namespace ASC.Files.Core.Migrations.MySql.FilesDbContextMySql
})
.Annotation("MySql:CharSet", "utf8");
migrationBuilder.CreateTable(
name: "files_properties",
columns: table => new
{
tenant_id = table.Column<int>(type: "int", nullable: false),
entry_id = table.Column<string>(type: "varchar(32)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
data = table.Column<string>(type: "mediumtext", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8")
},
constraints: table =>
{
table.PrimaryKey("PRIMARY", x => new { x.tenant_id, x.entry_id });
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "files_security",
columns: table => new
@ -156,7 +172,7 @@ namespace ASC.Files.Core.Migrations.MySql.FilesDbContextMySql
.Annotation("MySql:CharSet", "utf8"),
owner = table.Column<string>(type: "varchar(38)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
flag = table.Column<int>(type: "int", nullable: false)
flag = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'")
},
constraints: table =>
{
@ -203,10 +219,13 @@ namespace ASC.Files.Core.Migrations.MySql.FilesDbContextMySql
user_id = table.Column<string>(type: "varchar(38)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
folder_type = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
room_type = table.Column<int>(type: "int", nullable: false),
create_on = table.Column<DateTime>(type: "datetime", nullable: false),
url = table.Column<string>(type: "text", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
tenant_id = table.Column<int>(type: "int", nullable: false)
tenant_id = table.Column<int>(type: "int", nullable: false),
folder_id = table.Column<string>(type: "text", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8")
},
constraints: table =>
{
@ -266,7 +285,7 @@ namespace ASC.Files.Core.Migrations.MySql.FilesDbContextMySql
price = table.Column<decimal>(type: "decimal(10,2)", nullable: false, defaultValueSql: "'0.00'"),
avangate_id = table.Column<string>(type: "varchar(128)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
visible = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'")
visible = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValueSql: "'0'")
},
constraints: table =>
{
@ -318,14 +337,14 @@ namespace ASC.Files.Core.Migrations.MySql.FilesDbContextMySql
status = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
statuschanged = table.Column<DateTime>(type: "datetime", nullable: true),
creationdatetime = table.Column<DateTime>(type: "datetime", nullable: false),
owner_id = table.Column<string>(type: "varchar(38)", nullable: false, collation: "utf8_general_ci")
owner_id = table.Column<string>(type: "varchar(38)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
payment_id = table.Column<string>(type: "varchar(38)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
industry = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
last_modified = table.Column<DateTime>(type: "timestamp", nullable: false),
spam = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'1'"),
calls = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'1'")
spam = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValueSql: "'1'"),
calls = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValueSql: "'1'")
},
constraints: table =>
{
@ -408,6 +427,11 @@ namespace ASC.Files.Core.Migrations.MySql.FilesDbContextMySql
table: "files_tag_link",
columns: new[] { "tenant_id", "entry_id", "entry_type" });
migrationBuilder.CreateIndex(
name: "tenant_id",
table: "files_thirdparty_account",
column: "tenant_id");
migrationBuilder.CreateIndex(
name: "index_1",
table: "files_thirdparty_id_mapping",
@ -418,6 +442,12 @@ namespace ASC.Files.Core.Migrations.MySql.FilesDbContextMySql
table: "tenants_tariff",
column: "tenant");
migrationBuilder.CreateIndex(
name: "alias",
table: "tenants_tenants",
column: "alias",
unique: true);
migrationBuilder.CreateIndex(
name: "last_modified",
table: "tenants_tenants",
@ -451,6 +481,9 @@ namespace ASC.Files.Core.Migrations.MySql.FilesDbContextMySql
migrationBuilder.DropTable(
name: "files_link");
migrationBuilder.DropTable(
name: "files_properties");
migrationBuilder.DropTable(
name: "files_security");

View File

@ -73,9 +73,9 @@ namespace ASC.Files.Core.Migrations.MySql.FilesDbContextMySql
.HasColumnName("price")
.HasDefaultValueSql("'0.00'");
b.Property<int>("Visible")
b.Property<bool>("Visible")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnType("tinyint(1)")
.HasColumnName("visible")
.HasDefaultValueSql("'0'");
@ -97,7 +97,7 @@ namespace ASC.Files.Core.Migrations.MySql.FilesDbContextMySql
MaxTotalSize = 10995116277760L,
Name = "default",
Price = 0.00m,
Visible = 0
Visible = false
});
});
@ -160,9 +160,9 @@ namespace ASC.Files.Core.Migrations.MySql.FilesDbContextMySql
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("Calls")
b.Property<bool>("Calls")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnType("tinyint(1)")
.HasColumnName("calls")
.HasDefaultValueSql("'1'");
@ -203,7 +203,6 @@ namespace ASC.Files.Core.Migrations.MySql.FilesDbContextMySql
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("OwnerId")
.IsRequired()
.HasColumnType("varchar(38)")
.HasColumnName("owner_id")
.UseCollation("utf8_general_ci")
@ -215,9 +214,9 @@ namespace ASC.Files.Core.Migrations.MySql.FilesDbContextMySql
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("Spam")
b.Property<bool>("Spam")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnType("tinyint(1)")
.HasColumnName("spam")
.HasDefaultValueSql("'1'");
@ -261,6 +260,10 @@ namespace ASC.Files.Core.Migrations.MySql.FilesDbContextMySql
b.HasKey("Id");
b.HasIndex("Alias")
.IsUnique()
.HasDatabaseName("alias");
b.HasIndex("LastModified")
.HasDatabaseName("last_modified");
@ -279,12 +282,13 @@ namespace ASC.Files.Core.Migrations.MySql.FilesDbContextMySql
{
Id = 1,
Alias = "localhost",
Calls = 0,
Calls = false,
CreationDateTime = new DateTime(2021, 3, 9, 17, 46, 59, 97, DateTimeKind.Utc).AddTicks(4317),
Industry = 0,
LastModified = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified),
Name = "Web Office",
OwnerId = "66faa6e4-f133-11ea-b126-00ffeec8b4ef",
Spam = 0,
Spam = false,
Status = 0,
TrustedDomainsEnabled = 0,
Version = 0
@ -306,8 +310,10 @@ namespace ASC.Files.Core.Migrations.MySql.FilesDbContextMySql
.HasColumnName("version");
b.Property<int>("Category")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("category");
.HasColumnName("category")
.HasDefaultValueSql("'0'");
b.Property<string>("Changes")
.HasColumnType("mediumtext")
@ -344,15 +350,15 @@ namespace ASC.Files.Core.Migrations.MySql.FilesDbContextMySql
.HasColumnType("datetime")
.HasColumnName("create_on");
b.Property<int>("CurrentVersion")
b.Property<bool>("CurrentVersion")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnType("tinyint(1)")
.HasColumnName("current_version")
.HasDefaultValueSql("'0'");
b.Property<int>("Encrypted")
b.Property<bool>("Encrypted")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnType("tinyint(1)")
.HasColumnName("encrypted")
.HasDefaultValueSql("'0'");
@ -487,6 +493,30 @@ namespace ASC.Files.Core.Migrations.MySql.FilesDbContextMySql
b.HasAnnotation("MySql:CharSet", "utf8");
});
modelBuilder.Entity("ASC.Files.Core.EF.DbFilesProperties", b =>
{
b.Property<int>("TenantId")
.HasColumnType("int")
.HasColumnName("tenant_id");
b.Property<string>("EntryId")
.HasColumnType("varchar(32)")
.HasColumnName("entry_id")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("Data")
.HasColumnType("mediumtext")
.HasColumnName("data")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.HasKey("TenantId", "EntryId")
.HasName("PRIMARY");
b.ToTable("files_properties", (string)null);
});
modelBuilder.Entity("ASC.Files.Core.EF.DbFilesSecurity", b =>
{
b.Property<int>("TenantId")
@ -564,8 +594,10 @@ namespace ASC.Files.Core.Migrations.MySql.FilesDbContextMySql
.HasColumnName("tenant_id");
b.Property<int>("Type")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("flag");
.HasColumnName("flag")
.HasDefaultValueSql("'0'");
b.HasKey("Id");
@ -638,6 +670,12 @@ namespace ASC.Files.Core.Migrations.MySql.FilesDbContextMySql
.HasColumnType("datetime")
.HasColumnName("create_on");
b.Property<string>("FolderId")
.HasColumnType("text")
.HasColumnName("folder_id")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("FolderType")
.ValueGeneratedOnAdd()
.HasColumnType("int")
@ -660,6 +698,10 @@ namespace ASC.Files.Core.Migrations.MySql.FilesDbContextMySql
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("RoomType")
.HasColumnType("int")
.HasColumnName("room_type");
b.Property<int>("TenantId")
.HasColumnType("int")
.HasColumnName("tenant_id");
@ -699,6 +741,9 @@ namespace ASC.Files.Core.Migrations.MySql.FilesDbContextMySql
b.HasKey("Id");
b.HasIndex("TenantId")
.HasDatabaseName("tenant_id");
b.ToTable("files_thirdparty_account", (string)null);
b.HasAnnotation("MySql:CharSet", "utf8");

View File

@ -11,7 +11,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace ASC.Files.Core.Migrations.PostgreSql.FilesDbContextPostgreSql
{
[DbContext(typeof(PostgreSqlFilesDbContext))]
[Migration("20220708104421_FilesDbContextPostgreSql")]
[Migration("20220711152841_FilesDbContextPostgreSql")]
partial class FilesDbContextPostgreSql
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
@ -75,9 +75,9 @@ namespace ASC.Files.Core.Migrations.PostgreSql.FilesDbContextPostgreSql
.HasColumnName("price")
.HasDefaultValueSql("'0.00'");
b.Property<int>("Visible")
b.Property<bool>("Visible")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnType("tinyint(1)")
.HasColumnName("visible")
.HasDefaultValueSql("'0'");
@ -99,7 +99,7 @@ namespace ASC.Files.Core.Migrations.PostgreSql.FilesDbContextPostgreSql
MaxTotalSize = 10995116277760L,
Name = "default",
Price = 0.00m,
Visible = 0
Visible = false
});
});
@ -162,9 +162,9 @@ namespace ASC.Files.Core.Migrations.PostgreSql.FilesDbContextPostgreSql
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("Calls")
b.Property<bool>("Calls")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnType("tinyint(1)")
.HasColumnName("calls")
.HasDefaultValueSql("'1'");
@ -205,7 +205,6 @@ namespace ASC.Files.Core.Migrations.PostgreSql.FilesDbContextPostgreSql
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("OwnerId")
.IsRequired()
.HasColumnType("varchar(38)")
.HasColumnName("owner_id")
.UseCollation("utf8_general_ci")
@ -217,9 +216,9 @@ namespace ASC.Files.Core.Migrations.PostgreSql.FilesDbContextPostgreSql
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("Spam")
b.Property<bool>("Spam")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnType("tinyint(1)")
.HasColumnName("spam")
.HasDefaultValueSql("'1'");
@ -263,6 +262,10 @@ namespace ASC.Files.Core.Migrations.PostgreSql.FilesDbContextPostgreSql
b.HasKey("Id");
b.HasIndex("Alias")
.IsUnique()
.HasDatabaseName("alias");
b.HasIndex("LastModified")
.HasDatabaseName("last_modified");
@ -281,12 +284,13 @@ namespace ASC.Files.Core.Migrations.PostgreSql.FilesDbContextPostgreSql
{
Id = 1,
Alias = "localhost",
Calls = 0,
Calls = false,
CreationDateTime = new DateTime(2021, 3, 9, 17, 46, 59, 97, DateTimeKind.Utc).AddTicks(4317),
Industry = 0,
LastModified = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified),
Name = "Web Office",
OwnerId = "66faa6e4-f133-11ea-b126-00ffeec8b4ef",
Spam = 0,
Spam = false,
Status = 0,
TrustedDomainsEnabled = 0,
Version = 0
@ -308,8 +312,10 @@ namespace ASC.Files.Core.Migrations.PostgreSql.FilesDbContextPostgreSql
.HasColumnName("version");
b.Property<int>("Category")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("category");
.HasColumnName("category")
.HasDefaultValueSql("'0'");
b.Property<string>("Changes")
.HasColumnType("mediumtext")
@ -346,15 +352,15 @@ namespace ASC.Files.Core.Migrations.PostgreSql.FilesDbContextPostgreSql
.HasColumnType("datetime")
.HasColumnName("create_on");
b.Property<int>("CurrentVersion")
b.Property<bool>("CurrentVersion")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnType("tinyint(1)")
.HasColumnName("current_version")
.HasDefaultValueSql("'0'");
b.Property<int>("Encrypted")
b.Property<bool>("Encrypted")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnType("tinyint(1)")
.HasColumnName("encrypted")
.HasDefaultValueSql("'0'");
@ -489,6 +495,30 @@ namespace ASC.Files.Core.Migrations.PostgreSql.FilesDbContextPostgreSql
b.HasAnnotation("MySql:CharSet", "utf8");
});
modelBuilder.Entity("ASC.Files.Core.EF.DbFilesProperties", b =>
{
b.Property<int>("TenantId")
.HasColumnType("int")
.HasColumnName("tenant_id");
b.Property<string>("EntryId")
.HasColumnType("varchar(32)")
.HasColumnName("entry_id")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("Data")
.HasColumnType("mediumtext")
.HasColumnName("data")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.HasKey("TenantId", "EntryId")
.HasName("PRIMARY");
b.ToTable("files_properties", (string)null);
});
modelBuilder.Entity("ASC.Files.Core.EF.DbFilesSecurity", b =>
{
b.Property<int>("TenantId")
@ -566,8 +596,10 @@ namespace ASC.Files.Core.Migrations.PostgreSql.FilesDbContextPostgreSql
.HasColumnName("tenant_id");
b.Property<int>("Type")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("flag");
.HasColumnName("flag")
.HasDefaultValueSql("'0'");
b.HasKey("Id");
@ -640,6 +672,12 @@ namespace ASC.Files.Core.Migrations.PostgreSql.FilesDbContextPostgreSql
.HasColumnType("datetime")
.HasColumnName("create_on");
b.Property<string>("FolderId")
.HasColumnType("text")
.HasColumnName("folder_id")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("FolderType")
.ValueGeneratedOnAdd()
.HasColumnType("int")
@ -662,6 +700,10 @@ namespace ASC.Files.Core.Migrations.PostgreSql.FilesDbContextPostgreSql
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("RoomType")
.HasColumnType("int")
.HasColumnName("room_type");
b.Property<int>("TenantId")
.HasColumnType("int")
.HasColumnName("tenant_id");
@ -701,6 +743,9 @@ namespace ASC.Files.Core.Migrations.PostgreSql.FilesDbContextPostgreSql
b.HasKey("Id");
b.HasIndex("TenantId")
.HasDatabaseName("tenant_id");
b.ToTable("files_thirdparty_account", (string)null);
b.HasAnnotation("MySql:CharSet", "utf8");

View File

@ -37,13 +37,13 @@ namespace ASC.Files.Core.Migrations.PostgreSql.FilesDbContextPostgreSql
version = table.Column<int>(type: "int", nullable: false),
tenant_id = table.Column<int>(type: "int", nullable: false),
version_group = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'1'"),
current_version = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
current_version = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValueSql: "'0'"),
folder_id = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
title = table.Column<string>(type: "varchar(400)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
content_length = table.Column<long>(type: "bigint", nullable: false, defaultValueSql: "'0'"),
file_status = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
category = table.Column<int>(type: "int", nullable: false),
category = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
create_by = table.Column<string>(type: "char(38)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
create_on = table.Column<DateTime>(type: "datetime", nullable: false),
@ -56,7 +56,7 @@ namespace ASC.Files.Core.Migrations.PostgreSql.FilesDbContextPostgreSql
.Annotation("MySql:CharSet", "utf8"),
changes = table.Column<string>(type: "mediumtext", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
encrypted = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
encrypted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValueSql: "'0'"),
forcesave = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
thumb = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'")
},
@ -124,6 +124,22 @@ namespace ASC.Files.Core.Migrations.PostgreSql.FilesDbContextPostgreSql
})
.Annotation("MySql:CharSet", "utf8");
migrationBuilder.CreateTable(
name: "files_properties",
columns: table => new
{
tenant_id = table.Column<int>(type: "int", nullable: false),
entry_id = table.Column<string>(type: "varchar(32)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
data = table.Column<string>(type: "mediumtext", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8")
},
constraints: table =>
{
table.PrimaryKey("PRIMARY", x => new { x.tenant_id, x.entry_id });
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "files_security",
columns: table => new
@ -156,7 +172,7 @@ namespace ASC.Files.Core.Migrations.PostgreSql.FilesDbContextPostgreSql
.Annotation("MySql:CharSet", "utf8"),
owner = table.Column<string>(type: "varchar(38)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
flag = table.Column<int>(type: "int", nullable: false)
flag = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'")
},
constraints: table =>
{
@ -203,10 +219,13 @@ namespace ASC.Files.Core.Migrations.PostgreSql.FilesDbContextPostgreSql
user_id = table.Column<string>(type: "varchar(38)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
folder_type = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
room_type = table.Column<int>(type: "int", nullable: false),
create_on = table.Column<DateTime>(type: "datetime", nullable: false),
url = table.Column<string>(type: "text", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
tenant_id = table.Column<int>(type: "int", nullable: false)
tenant_id = table.Column<int>(type: "int", nullable: false),
folder_id = table.Column<string>(type: "text", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8")
},
constraints: table =>
{
@ -266,7 +285,7 @@ namespace ASC.Files.Core.Migrations.PostgreSql.FilesDbContextPostgreSql
price = table.Column<decimal>(type: "decimal(10,2)", nullable: false, defaultValueSql: "'0.00'"),
avangate_id = table.Column<string>(type: "varchar(128)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
visible = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'")
visible = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValueSql: "'0'")
},
constraints: table =>
{
@ -318,14 +337,14 @@ namespace ASC.Files.Core.Migrations.PostgreSql.FilesDbContextPostgreSql
status = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
statuschanged = table.Column<DateTime>(type: "datetime", nullable: true),
creationdatetime = table.Column<DateTime>(type: "datetime", nullable: false),
owner_id = table.Column<string>(type: "varchar(38)", nullable: false, collation: "utf8_general_ci")
owner_id = table.Column<string>(type: "varchar(38)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
payment_id = table.Column<string>(type: "varchar(38)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
industry = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
last_modified = table.Column<DateTime>(type: "timestamp", nullable: false),
spam = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'1'"),
calls = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'1'")
spam = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValueSql: "'1'"),
calls = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValueSql: "'1'")
},
constraints: table =>
{
@ -408,6 +427,11 @@ namespace ASC.Files.Core.Migrations.PostgreSql.FilesDbContextPostgreSql
table: "files_tag_link",
columns: new[] { "tenant_id", "entry_id", "entry_type" });
migrationBuilder.CreateIndex(
name: "tenant_id",
table: "files_thirdparty_account",
column: "tenant_id");
migrationBuilder.CreateIndex(
name: "index_1",
table: "files_thirdparty_id_mapping",
@ -418,6 +442,12 @@ namespace ASC.Files.Core.Migrations.PostgreSql.FilesDbContextPostgreSql
table: "tenants_tariff",
column: "tenant");
migrationBuilder.CreateIndex(
name: "alias",
table: "tenants_tenants",
column: "alias",
unique: true);
migrationBuilder.CreateIndex(
name: "last_modified",
table: "tenants_tenants",
@ -451,6 +481,9 @@ namespace ASC.Files.Core.Migrations.PostgreSql.FilesDbContextPostgreSql
migrationBuilder.DropTable(
name: "files_link");
migrationBuilder.DropTable(
name: "files_properties");
migrationBuilder.DropTable(
name: "files_security");

View File

@ -73,9 +73,9 @@ namespace ASC.Files.Core.Migrations.PostgreSql.FilesDbContextPostgreSql
.HasColumnName("price")
.HasDefaultValueSql("'0.00'");
b.Property<int>("Visible")
b.Property<bool>("Visible")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnType("tinyint(1)")
.HasColumnName("visible")
.HasDefaultValueSql("'0'");
@ -97,7 +97,7 @@ namespace ASC.Files.Core.Migrations.PostgreSql.FilesDbContextPostgreSql
MaxTotalSize = 10995116277760L,
Name = "default",
Price = 0.00m,
Visible = 0
Visible = false
});
});
@ -160,9 +160,9 @@ namespace ASC.Files.Core.Migrations.PostgreSql.FilesDbContextPostgreSql
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("Calls")
b.Property<bool>("Calls")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnType("tinyint(1)")
.HasColumnName("calls")
.HasDefaultValueSql("'1'");
@ -203,7 +203,6 @@ namespace ASC.Files.Core.Migrations.PostgreSql.FilesDbContextPostgreSql
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("OwnerId")
.IsRequired()
.HasColumnType("varchar(38)")
.HasColumnName("owner_id")
.UseCollation("utf8_general_ci")
@ -215,9 +214,9 @@ namespace ASC.Files.Core.Migrations.PostgreSql.FilesDbContextPostgreSql
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("Spam")
b.Property<bool>("Spam")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnType("tinyint(1)")
.HasColumnName("spam")
.HasDefaultValueSql("'1'");
@ -261,6 +260,10 @@ namespace ASC.Files.Core.Migrations.PostgreSql.FilesDbContextPostgreSql
b.HasKey("Id");
b.HasIndex("Alias")
.IsUnique()
.HasDatabaseName("alias");
b.HasIndex("LastModified")
.HasDatabaseName("last_modified");
@ -279,12 +282,13 @@ namespace ASC.Files.Core.Migrations.PostgreSql.FilesDbContextPostgreSql
{
Id = 1,
Alias = "localhost",
Calls = 0,
Calls = false,
CreationDateTime = new DateTime(2021, 3, 9, 17, 46, 59, 97, DateTimeKind.Utc).AddTicks(4317),
Industry = 0,
LastModified = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified),
Name = "Web Office",
OwnerId = "66faa6e4-f133-11ea-b126-00ffeec8b4ef",
Spam = 0,
Spam = false,
Status = 0,
TrustedDomainsEnabled = 0,
Version = 0
@ -306,8 +310,10 @@ namespace ASC.Files.Core.Migrations.PostgreSql.FilesDbContextPostgreSql
.HasColumnName("version");
b.Property<int>("Category")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("category");
.HasColumnName("category")
.HasDefaultValueSql("'0'");
b.Property<string>("Changes")
.HasColumnType("mediumtext")
@ -344,15 +350,15 @@ namespace ASC.Files.Core.Migrations.PostgreSql.FilesDbContextPostgreSql
.HasColumnType("datetime")
.HasColumnName("create_on");
b.Property<int>("CurrentVersion")
b.Property<bool>("CurrentVersion")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnType("tinyint(1)")
.HasColumnName("current_version")
.HasDefaultValueSql("'0'");
b.Property<int>("Encrypted")
b.Property<bool>("Encrypted")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnType("tinyint(1)")
.HasColumnName("encrypted")
.HasDefaultValueSql("'0'");
@ -487,6 +493,30 @@ namespace ASC.Files.Core.Migrations.PostgreSql.FilesDbContextPostgreSql
b.HasAnnotation("MySql:CharSet", "utf8");
});
modelBuilder.Entity("ASC.Files.Core.EF.DbFilesProperties", b =>
{
b.Property<int>("TenantId")
.HasColumnType("int")
.HasColumnName("tenant_id");
b.Property<string>("EntryId")
.HasColumnType("varchar(32)")
.HasColumnName("entry_id")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("Data")
.HasColumnType("mediumtext")
.HasColumnName("data")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.HasKey("TenantId", "EntryId")
.HasName("PRIMARY");
b.ToTable("files_properties", (string)null);
});
modelBuilder.Entity("ASC.Files.Core.EF.DbFilesSecurity", b =>
{
b.Property<int>("TenantId")
@ -564,8 +594,10 @@ namespace ASC.Files.Core.Migrations.PostgreSql.FilesDbContextPostgreSql
.HasColumnName("tenant_id");
b.Property<int>("Type")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("flag");
.HasColumnName("flag")
.HasDefaultValueSql("'0'");
b.HasKey("Id");
@ -638,6 +670,12 @@ namespace ASC.Files.Core.Migrations.PostgreSql.FilesDbContextPostgreSql
.HasColumnType("datetime")
.HasColumnName("create_on");
b.Property<string>("FolderId")
.HasColumnType("text")
.HasColumnName("folder_id")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("FolderType")
.ValueGeneratedOnAdd()
.HasColumnType("int")
@ -660,6 +698,10 @@ namespace ASC.Files.Core.Migrations.PostgreSql.FilesDbContextPostgreSql
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("RoomType")
.HasColumnType("int")
.HasColumnName("room_type");
b.Property<int>("TenantId")
.HasColumnType("int")
.HasColumnName("tenant_id");
@ -699,6 +741,9 @@ namespace ASC.Files.Core.Migrations.PostgreSql.FilesDbContextPostgreSql
b.HasKey("Id");
b.HasIndex("TenantId")
.HasDatabaseName("tenant_id");
b.ToTable("files_thirdparty_account", (string)null);
b.HasAnnotation("MySql:CharSet", "utf8");