Quota: migration
This commit is contained in:
parent
b43ca7368e
commit
d24f9db4c7
@ -239,7 +239,7 @@ public static class DbUserExtension
|
|||||||
|
|
||||||
entity.Property(e => e.QuotaLimit)
|
entity.Property(e => e.QuotaLimit)
|
||||||
.HasColumnName("quota_limit")
|
.HasColumnName("quota_limit")
|
||||||
.HasDefaultValueSql("'0'");
|
.HasDefaultValueSql("'-1'");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -354,7 +354,7 @@ public static class DbUserExtension
|
|||||||
|
|
||||||
entity.Property(e => e.QuotaLimit)
|
entity.Property(e => e.QuotaLimit)
|
||||||
.HasColumnName("quota_limit")
|
.HasColumnName("quota_limit")
|
||||||
.HasDefaultValueSql("'0'");
|
.HasDefaultValueSql("'-1'");
|
||||||
|
|
||||||
entity.Property(e => e.WorkFromDate).HasColumnName("workfromdate");
|
entity.Property(e => e.WorkFromDate).HasColumnName("workfromdate");
|
||||||
});
|
});
|
||||||
|
@ -1,64 +0,0 @@
|
|||||||
// <auto-generated />
|
|
||||||
using System;
|
|
||||||
using ASC.Core.Common.EF;
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace ASC.Migrations.MySql.Migrations.CoreDb
|
|
||||||
{
|
|
||||||
[DbContext(typeof(CoreDbContext))]
|
|
||||||
[Migration("20220909155356_CoreDbContext_Upgrade1")]
|
|
||||||
partial class CoreDbContext_Upgrade1
|
|
||||||
{
|
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
||||||
{
|
|
||||||
#pragma warning disable 612, 618
|
|
||||||
modelBuilder
|
|
||||||
.HasAnnotation("ProductVersion", "6.0.7")
|
|
||||||
.HasAnnotation("Relational:MaxIdentifierLength", 64);
|
|
||||||
|
|
||||||
modelBuilder.Entity("ASC.Core.Common.EF.DbUsersQuotaRow", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Tenant")
|
|
||||||
.HasColumnType("int")
|
|
||||||
.HasColumnName("tenant");
|
|
||||||
|
|
||||||
b.Property<string>("UserId")
|
|
||||||
.HasColumnType("varchar(36)")
|
|
||||||
.HasColumnName("user_id")
|
|
||||||
.UseCollation("utf8_general_ci")
|
|
||||||
.HasAnnotation("MySql:CharSet", "utf8");
|
|
||||||
|
|
||||||
b.Property<string>("Path")
|
|
||||||
.HasColumnType("varchar(255)")
|
|
||||||
.HasColumnName("path")
|
|
||||||
.UseCollation("utf8_general_ci")
|
|
||||||
.HasAnnotation("MySql:CharSet", "utf8");
|
|
||||||
|
|
||||||
b.Property<long>("Counter")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("bigint")
|
|
||||||
.HasColumnName("counter")
|
|
||||||
.HasDefaultValueSql("'0'");
|
|
||||||
|
|
||||||
b.Property<string>("Tag")
|
|
||||||
.HasColumnType("varchar(36)")
|
|
||||||
.HasColumnName("tag")
|
|
||||||
.UseCollation("utf8_general_ci")
|
|
||||||
.HasAnnotation("MySql:CharSet", "utf8");
|
|
||||||
|
|
||||||
b.HasKey("Tenant", "UserId", "Path")
|
|
||||||
.HasName("PRIMARY");
|
|
||||||
|
|
||||||
b.ToTable("users_quotarow", (string)null);
|
|
||||||
|
|
||||||
b.HasAnnotation("MySql:CharSet", "utf8");
|
|
||||||
});
|
|
||||||
#pragma warning restore 612, 618
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
255
migrations/mysql/CoreDbContext/20220913140010_CoreDbContext_Upgrade1.Designer.cs
generated
Normal file
255
migrations/mysql/CoreDbContext/20220913140010_CoreDbContext_Upgrade1.Designer.cs
generated
Normal file
@ -0,0 +1,255 @@
|
|||||||
|
// <auto-generated />
|
||||||
|
using System;
|
||||||
|
using ASC.Core.Common.EF;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace ASC.Migrations.MySql.Migrations.CoreDb
|
||||||
|
{
|
||||||
|
[DbContext(typeof(CoreDbContext))]
|
||||||
|
[Migration("20220913140010_CoreDbContext_Upgrade1")]
|
||||||
|
partial class CoreDbContext_Upgrade1
|
||||||
|
{
|
||||||
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||||
|
{
|
||||||
|
#pragma warning disable 612, 618
|
||||||
|
modelBuilder
|
||||||
|
.HasAnnotation("ProductVersion", "6.0.7")
|
||||||
|
.HasAnnotation("Relational:MaxIdentifierLength", 64);
|
||||||
|
|
||||||
|
modelBuilder.Entity("ASC.Core.Common.EF.DbButton", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("TariffId")
|
||||||
|
.HasColumnType("int")
|
||||||
|
.HasColumnName("tariff_id");
|
||||||
|
|
||||||
|
b.Property<string>("PartnerId")
|
||||||
|
.HasColumnType("varchar(50)")
|
||||||
|
.HasColumnName("partner_id")
|
||||||
|
.UseCollation("utf8_general_ci")
|
||||||
|
.HasAnnotation("MySql:CharSet", "utf8");
|
||||||
|
|
||||||
|
b.Property<string>("ButtonUrl")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text")
|
||||||
|
.HasColumnName("button_url")
|
||||||
|
.UseCollation("utf8_general_ci")
|
||||||
|
.HasAnnotation("MySql:CharSet", "utf8");
|
||||||
|
|
||||||
|
b.HasKey("TariffId", "PartnerId")
|
||||||
|
.HasName("PRIMARY");
|
||||||
|
|
||||||
|
b.ToTable("tenants_buttons", (string)null);
|
||||||
|
|
||||||
|
b.HasAnnotation("MySql:CharSet", "utf8");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("ASC.Core.Common.EF.DbQuota", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Tenant")
|
||||||
|
.HasColumnType("int")
|
||||||
|
.HasColumnName("tenant");
|
||||||
|
|
||||||
|
b.Property<int>("ActiveUsers")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("int")
|
||||||
|
.HasColumnName("active_users")
|
||||||
|
.HasDefaultValueSql("'0'");
|
||||||
|
|
||||||
|
b.Property<string>("AvangateId")
|
||||||
|
.HasColumnType("varchar(128)")
|
||||||
|
.HasColumnName("avangate_id")
|
||||||
|
.UseCollation("utf8_general_ci")
|
||||||
|
.HasAnnotation("MySql:CharSet", "utf8");
|
||||||
|
|
||||||
|
b.Property<string>("Description")
|
||||||
|
.HasColumnType("varchar(128)")
|
||||||
|
.HasColumnName("description")
|
||||||
|
.UseCollation("utf8_general_ci")
|
||||||
|
.HasAnnotation("MySql:CharSet", "utf8");
|
||||||
|
|
||||||
|
b.Property<string>("Features")
|
||||||
|
.HasColumnType("text")
|
||||||
|
.HasColumnName("features");
|
||||||
|
|
||||||
|
b.Property<long>("MaxFileSize")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("bigint")
|
||||||
|
.HasColumnName("max_file_size")
|
||||||
|
.HasDefaultValueSql("'0'");
|
||||||
|
|
||||||
|
b.Property<long>("MaxTotalSize")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("bigint")
|
||||||
|
.HasColumnName("max_total_size")
|
||||||
|
.HasDefaultValueSql("'0'");
|
||||||
|
|
||||||
|
b.Property<string>("Name")
|
||||||
|
.HasColumnType("varchar(128)")
|
||||||
|
.HasColumnName("name")
|
||||||
|
.UseCollation("utf8_general_ci")
|
||||||
|
.HasAnnotation("MySql:CharSet", "utf8");
|
||||||
|
|
||||||
|
b.Property<decimal>("Price")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("decimal(10,2)")
|
||||||
|
.HasColumnName("price")
|
||||||
|
.HasDefaultValueSql("'0.00'");
|
||||||
|
|
||||||
|
b.Property<bool>("Visible")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("tinyint(1)")
|
||||||
|
.HasColumnName("visible")
|
||||||
|
.HasDefaultValueSql("'0'");
|
||||||
|
|
||||||
|
b.HasKey("Tenant")
|
||||||
|
.HasName("PRIMARY");
|
||||||
|
|
||||||
|
b.ToTable("tenants_quota", (string)null);
|
||||||
|
|
||||||
|
b.HasAnnotation("MySql:CharSet", "utf8");
|
||||||
|
|
||||||
|
b.HasData(
|
||||||
|
new
|
||||||
|
{
|
||||||
|
Tenant = -1,
|
||||||
|
ActiveUsers = 10000,
|
||||||
|
AvangateId = "0",
|
||||||
|
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 = false
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("ASC.Core.Common.EF.DbQuotaRow", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Tenant")
|
||||||
|
.HasColumnType("int")
|
||||||
|
.HasColumnName("tenant");
|
||||||
|
|
||||||
|
b.Property<string>("Path")
|
||||||
|
.HasColumnType("varchar(255)")
|
||||||
|
.HasColumnName("path")
|
||||||
|
.UseCollation("utf8_general_ci")
|
||||||
|
.HasAnnotation("MySql:CharSet", "utf8");
|
||||||
|
|
||||||
|
b.Property<long>("Counter")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("bigint")
|
||||||
|
.HasColumnName("counter")
|
||||||
|
.HasDefaultValueSql("'0'");
|
||||||
|
|
||||||
|
b.Property<DateTime>("LastModified")
|
||||||
|
.HasColumnType("timestamp")
|
||||||
|
.HasColumnName("last_modified");
|
||||||
|
|
||||||
|
b.Property<string>("Tag")
|
||||||
|
.HasColumnType("varchar(1024)")
|
||||||
|
.HasColumnName("tag")
|
||||||
|
.UseCollation("utf8_general_ci")
|
||||||
|
.HasAnnotation("MySql:CharSet", "utf8");
|
||||||
|
|
||||||
|
b.HasKey("Tenant", "Path")
|
||||||
|
.HasName("PRIMARY");
|
||||||
|
|
||||||
|
b.HasIndex("LastModified")
|
||||||
|
.HasDatabaseName("last_modified");
|
||||||
|
|
||||||
|
b.ToTable("tenants_quotarow", (string)null);
|
||||||
|
|
||||||
|
b.HasAnnotation("MySql:CharSet", "utf8");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("ASC.Core.Common.EF.DbTariff", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("int")
|
||||||
|
.HasColumnName("id");
|
||||||
|
|
||||||
|
b.Property<string>("Comment")
|
||||||
|
.HasColumnType("varchar(255)")
|
||||||
|
.HasColumnName("comment")
|
||||||
|
.UseCollation("utf8_general_ci")
|
||||||
|
.HasAnnotation("MySql:CharSet", "utf8");
|
||||||
|
|
||||||
|
b.Property<DateTime>("CreateOn")
|
||||||
|
.HasColumnType("timestamp")
|
||||||
|
.HasColumnName("create_on");
|
||||||
|
|
||||||
|
b.Property<int>("Quantity")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("int")
|
||||||
|
.HasColumnName("quantity")
|
||||||
|
.HasDefaultValueSql("'1'");
|
||||||
|
|
||||||
|
b.Property<DateTime>("Stamp")
|
||||||
|
.HasColumnType("datetime")
|
||||||
|
.HasColumnName("stamp");
|
||||||
|
|
||||||
|
b.Property<int>("Tariff")
|
||||||
|
.HasColumnType("int")
|
||||||
|
.HasColumnName("tariff");
|
||||||
|
|
||||||
|
b.Property<int>("Tenant")
|
||||||
|
.HasColumnType("int")
|
||||||
|
.HasColumnName("tenant");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("Tenant")
|
||||||
|
.HasDatabaseName("tenant");
|
||||||
|
|
||||||
|
b.ToTable("tenants_tariff", (string)null);
|
||||||
|
|
||||||
|
b.HasAnnotation("MySql:CharSet", "utf8");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("ASC.Core.Common.EF.DbUsersQuotaRow", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Tenant")
|
||||||
|
.HasColumnType("int")
|
||||||
|
.HasColumnName("tenant");
|
||||||
|
|
||||||
|
b.Property<string>("UserId")
|
||||||
|
.HasColumnType("varchar(36)")
|
||||||
|
.HasColumnName("user_id")
|
||||||
|
.UseCollation("utf8_general_ci")
|
||||||
|
.HasAnnotation("MySql:CharSet", "utf8");
|
||||||
|
|
||||||
|
b.Property<string>("Path")
|
||||||
|
.HasColumnType("varchar(255)")
|
||||||
|
.HasColumnName("path")
|
||||||
|
.UseCollation("utf8_general_ci")
|
||||||
|
.HasAnnotation("MySql:CharSet", "utf8");
|
||||||
|
|
||||||
|
b.Property<long>("Counter")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("bigint")
|
||||||
|
.HasColumnName("counter")
|
||||||
|
.HasDefaultValueSql("'0'");
|
||||||
|
|
||||||
|
b.Property<string>("Tag")
|
||||||
|
.HasColumnType("varchar(36)")
|
||||||
|
.HasColumnName("tag")
|
||||||
|
.UseCollation("utf8_general_ci")
|
||||||
|
.HasAnnotation("MySql:CharSet", "utf8");
|
||||||
|
|
||||||
|
b.HasKey("Tenant", "UserId", "Path")
|
||||||
|
.HasName("PRIMARY");
|
||||||
|
|
||||||
|
b.ToTable("users_quotarow", (string)null);
|
||||||
|
|
||||||
|
b.HasAnnotation("MySql:CharSet", "utf8");
|
||||||
|
});
|
||||||
|
#pragma warning restore 612, 618
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,37 +1,37 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
namespace ASC.Migrations.MySql.Migrations.CoreDb
|
namespace ASC.Migrations.MySql.Migrations.CoreDb
|
||||||
{
|
{
|
||||||
public partial class CoreDbContext_Upgrade1 : Migration
|
public partial class CoreDbContext_Upgrade1 : Migration
|
||||||
{
|
{
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
{
|
{
|
||||||
migrationBuilder.CreateTable(
|
migrationBuilder.CreateTable(
|
||||||
name: "users_quotarow",
|
name: "users_quotarow",
|
||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
tenant = table.Column<int>(type: "int", nullable: false),
|
tenant = table.Column<int>(type: "int", nullable: false),
|
||||||
user_id = table.Column<string>(type: "varchar(36)", nullable: false, collation: "utf8_general_ci")
|
user_id = table.Column<string>(type: "varchar(36)", nullable: false, collation: "utf8_general_ci")
|
||||||
.Annotation("MySql:CharSet", "utf8"),
|
.Annotation("MySql:CharSet", "utf8"),
|
||||||
path = table.Column<string>(type: "varchar(255)", nullable: false, collation: "utf8_general_ci")
|
path = table.Column<string>(type: "varchar(255)", nullable: false, collation: "utf8_general_ci")
|
||||||
.Annotation("MySql:CharSet", "utf8"),
|
.Annotation("MySql:CharSet", "utf8"),
|
||||||
counter = table.Column<long>(type: "bigint", nullable: false, defaultValueSql: "'0'"),
|
counter = table.Column<long>(type: "bigint", nullable: false, defaultValueSql: "'0'"),
|
||||||
tag = table.Column<string>(type: "varchar(36)", nullable: true, collation: "utf8_general_ci")
|
tag = table.Column<string>(type: "varchar(36)", nullable: true, collation: "utf8_general_ci")
|
||||||
.Annotation("MySql:CharSet", "utf8")
|
.Annotation("MySql:CharSet", "utf8")
|
||||||
},
|
},
|
||||||
constraints: table =>
|
constraints: table =>
|
||||||
{
|
{
|
||||||
table.PrimaryKey("PRIMARY", x => new { x.tenant, x.user_id, x.path });
|
table.PrimaryKey("PRIMARY", x => new { x.tenant, x.user_id, x.path });
|
||||||
})
|
})
|
||||||
.Annotation("MySql:CharSet", "utf8");
|
.Annotation("MySql:CharSet", "utf8");
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
{
|
{
|
||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
||||||
name: "users_quotarow");
|
name: "users_quotarow");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
559
migrations/mysql/MessagesContext/20220913140009_MessagesContext_Upgrade1.Designer.cs
generated
Normal file
559
migrations/mysql/MessagesContext/20220913140009_MessagesContext_Upgrade1.Designer.cs
generated
Normal file
@ -0,0 +1,559 @@
|
|||||||
|
// <auto-generated />
|
||||||
|
using System;
|
||||||
|
using ASC.MessagingSystem.EF.Context;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace ASC.Migrations.MySql.Migrations.Messages
|
||||||
|
{
|
||||||
|
[DbContext(typeof(MessagesContext))]
|
||||||
|
[Migration("20220913140009_MessagesContext_Upgrade1")]
|
||||||
|
partial class MessagesContext_Upgrade1
|
||||||
|
{
|
||||||
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||||
|
{
|
||||||
|
#pragma warning disable 612, 618
|
||||||
|
modelBuilder
|
||||||
|
.HasAnnotation("ProductVersion", "6.0.7")
|
||||||
|
.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.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.User", b =>
|
||||||
|
{
|
||||||
|
b.Property<string>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("varchar(38)")
|
||||||
|
.HasColumnName("id")
|
||||||
|
.UseCollation("utf8_general_ci")
|
||||||
|
.HasAnnotation("MySql:CharSet", "utf8");
|
||||||
|
|
||||||
|
b.Property<int>("ActivationStatus")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("int")
|
||||||
|
.HasColumnName("activation_status")
|
||||||
|
.HasDefaultValueSql("'0'");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("BirthDate")
|
||||||
|
.HasColumnType("datetime")
|
||||||
|
.HasColumnName("bithdate");
|
||||||
|
|
||||||
|
b.Property<string>("Contacts")
|
||||||
|
.HasColumnType("varchar(1024)")
|
||||||
|
.HasColumnName("contacts")
|
||||||
|
.UseCollation("utf8_general_ci")
|
||||||
|
.HasAnnotation("MySql:CharSet", "utf8");
|
||||||
|
|
||||||
|
b.Property<DateTime>("CreateDate")
|
||||||
|
.HasColumnType("timestamp")
|
||||||
|
.HasColumnName("create_on");
|
||||||
|
|
||||||
|
b.Property<string>("CultureName")
|
||||||
|
.HasColumnType("varchar(20)")
|
||||||
|
.HasColumnName("culture")
|
||||||
|
.UseCollation("utf8_general_ci")
|
||||||
|
.HasAnnotation("MySql:CharSet", "utf8");
|
||||||
|
|
||||||
|
b.Property<string>("Email")
|
||||||
|
.HasColumnType("varchar(255)")
|
||||||
|
.HasColumnName("email")
|
||||||
|
.UseCollation("utf8_general_ci")
|
||||||
|
.HasAnnotation("MySql:CharSet", "utf8");
|
||||||
|
|
||||||
|
b.Property<string>("FirstName")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("varchar(64)")
|
||||||
|
.HasColumnName("firstname")
|
||||||
|
.UseCollation("utf8_general_ci")
|
||||||
|
.HasAnnotation("MySql:CharSet", "utf8");
|
||||||
|
|
||||||
|
b.Property<DateTime>("LastModified")
|
||||||
|
.HasColumnType("datetime")
|
||||||
|
.HasColumnName("last_modified");
|
||||||
|
|
||||||
|
b.Property<string>("LastName")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("varchar(64)")
|
||||||
|
.HasColumnName("lastname")
|
||||||
|
.UseCollation("utf8_general_ci")
|
||||||
|
.HasAnnotation("MySql:CharSet", "utf8");
|
||||||
|
|
||||||
|
b.Property<string>("Location")
|
||||||
|
.HasColumnType("varchar(255)")
|
||||||
|
.HasColumnName("location")
|
||||||
|
.UseCollation("utf8_general_ci")
|
||||||
|
.HasAnnotation("MySql:CharSet", "utf8");
|
||||||
|
|
||||||
|
b.Property<string>("MobilePhone")
|
||||||
|
.HasColumnType("varchar(255)")
|
||||||
|
.HasColumnName("phone")
|
||||||
|
.UseCollation("utf8_general_ci")
|
||||||
|
.HasAnnotation("MySql:CharSet", "utf8");
|
||||||
|
|
||||||
|
b.Property<int>("MobilePhoneActivation")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("int")
|
||||||
|
.HasColumnName("phone_activation")
|
||||||
|
.HasDefaultValueSql("'0'");
|
||||||
|
|
||||||
|
b.Property<string>("Notes")
|
||||||
|
.HasColumnType("varchar(512)")
|
||||||
|
.HasColumnName("notes")
|
||||||
|
.UseCollation("utf8_general_ci")
|
||||||
|
.HasAnnotation("MySql:CharSet", "utf8");
|
||||||
|
|
||||||
|
b.Property<long>("QuotaLimit")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("bigint")
|
||||||
|
.HasColumnName("quota_limit")
|
||||||
|
.HasDefaultValueSql("'-1'");
|
||||||
|
|
||||||
|
b.Property<bool>("Removed")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("tinyint(1)")
|
||||||
|
.HasColumnName("removed")
|
||||||
|
.HasDefaultValueSql("'0'");
|
||||||
|
|
||||||
|
b.Property<bool?>("Sex")
|
||||||
|
.HasColumnType("tinyint(1)")
|
||||||
|
.HasColumnName("sex");
|
||||||
|
|
||||||
|
b.Property<string>("Sid")
|
||||||
|
.HasColumnType("varchar(512)")
|
||||||
|
.HasColumnName("sid")
|
||||||
|
.UseCollation("utf8_general_ci")
|
||||||
|
.HasAnnotation("MySql:CharSet", "utf8");
|
||||||
|
|
||||||
|
b.Property<string>("SsoNameId")
|
||||||
|
.HasColumnType("varchar(512)")
|
||||||
|
.HasColumnName("sso_name_id")
|
||||||
|
.UseCollation("utf8_general_ci")
|
||||||
|
.HasAnnotation("MySql:CharSet", "utf8");
|
||||||
|
|
||||||
|
b.Property<string>("SsoSessionId")
|
||||||
|
.HasColumnType("varchar(512)")
|
||||||
|
.HasColumnName("sso_session_id")
|
||||||
|
.UseCollation("utf8_general_ci")
|
||||||
|
.HasAnnotation("MySql:CharSet", "utf8");
|
||||||
|
|
||||||
|
b.Property<int>("Status")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("int")
|
||||||
|
.HasColumnName("status")
|
||||||
|
.HasDefaultValueSql("'1'");
|
||||||
|
|
||||||
|
b.Property<int>("Tenant")
|
||||||
|
.HasColumnType("int")
|
||||||
|
.HasColumnName("tenant");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("TerminatedDate")
|
||||||
|
.HasColumnType("datetime")
|
||||||
|
.HasColumnName("terminateddate");
|
||||||
|
|
||||||
|
b.Property<string>("Title")
|
||||||
|
.HasColumnType("varchar(64)")
|
||||||
|
.HasColumnName("title")
|
||||||
|
.UseCollation("utf8_general_ci")
|
||||||
|
.HasAnnotation("MySql:CharSet", "utf8");
|
||||||
|
|
||||||
|
b.Property<string>("UserName")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("varchar(255)")
|
||||||
|
.HasColumnName("username")
|
||||||
|
.UseCollation("utf8_general_ci")
|
||||||
|
.HasAnnotation("MySql:CharSet", "utf8");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("WorkFromDate")
|
||||||
|
.HasColumnType("datetime")
|
||||||
|
.HasColumnName("workfromdate");
|
||||||
|
|
||||||
|
b.HasKey("Id")
|
||||||
|
.HasName("PRIMARY");
|
||||||
|
|
||||||
|
b.HasIndex("Email")
|
||||||
|
.HasDatabaseName("email");
|
||||||
|
|
||||||
|
b.HasIndex("LastModified")
|
||||||
|
.HasDatabaseName("last_modified");
|
||||||
|
|
||||||
|
b.HasIndex("Tenant", "UserName")
|
||||||
|
.HasDatabaseName("username");
|
||||||
|
|
||||||
|
b.ToTable("core_user", (string)null);
|
||||||
|
|
||||||
|
b.HasAnnotation("MySql:CharSet", "utf8");
|
||||||
|
|
||||||
|
b.HasData(
|
||||||
|
new
|
||||||
|
{
|
||||||
|
Id = "66faa6e4-f133-11ea-b126-00ffeec8b4ef",
|
||||||
|
ActivationStatus = 0,
|
||||||
|
CreateDate = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
|
Email = "",
|
||||||
|
FirstName = "Administrator",
|
||||||
|
LastModified = new DateTime(2021, 3, 9, 9, 52, 55, 765, DateTimeKind.Utc).AddTicks(1420),
|
||||||
|
LastName = "",
|
||||||
|
MobilePhoneActivation = 0,
|
||||||
|
QuotaLimit = 0L,
|
||||||
|
Removed = false,
|
||||||
|
Status = 1,
|
||||||
|
Tenant = 1,
|
||||||
|
UserName = "administrator",
|
||||||
|
WorkFromDate = new DateTime(2021, 3, 9, 9, 52, 55, 764, DateTimeKind.Utc).AddTicks(9157)
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("ASC.MessagingSystem.EF.Model.AuditEvent", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("int")
|
||||||
|
.HasColumnName("id");
|
||||||
|
|
||||||
|
b.Property<int?>("Action")
|
||||||
|
.HasColumnType("int")
|
||||||
|
.HasColumnName("action");
|
||||||
|
|
||||||
|
b.Property<string>("Browser")
|
||||||
|
.HasColumnType("varchar(200)")
|
||||||
|
.HasColumnName("browser")
|
||||||
|
.UseCollation("utf8_general_ci")
|
||||||
|
.HasAnnotation("MySql:CharSet", "utf8");
|
||||||
|
|
||||||
|
b.Property<DateTime>("Date")
|
||||||
|
.HasColumnType("datetime")
|
||||||
|
.HasColumnName("date");
|
||||||
|
|
||||||
|
b.Property<string>("DescriptionRaw")
|
||||||
|
.HasColumnType("varchar(20000)")
|
||||||
|
.HasColumnName("description")
|
||||||
|
.UseCollation("utf8_general_ci")
|
||||||
|
.HasAnnotation("MySql:CharSet", "utf8");
|
||||||
|
|
||||||
|
b.Property<string>("Initiator")
|
||||||
|
.HasColumnType("varchar(200)")
|
||||||
|
.HasColumnName("initiator")
|
||||||
|
.UseCollation("utf8_general_ci")
|
||||||
|
.HasAnnotation("MySql:CharSet", "utf8");
|
||||||
|
|
||||||
|
b.Property<string>("Ip")
|
||||||
|
.HasColumnType("varchar(50)")
|
||||||
|
.HasColumnName("ip")
|
||||||
|
.UseCollation("utf8_general_ci")
|
||||||
|
.HasAnnotation("MySql:CharSet", "utf8");
|
||||||
|
|
||||||
|
b.Property<string>("Page")
|
||||||
|
.HasColumnType("varchar(300)")
|
||||||
|
.HasColumnName("page")
|
||||||
|
.UseCollation("utf8_general_ci")
|
||||||
|
.HasAnnotation("MySql:CharSet", "utf8");
|
||||||
|
|
||||||
|
b.Property<string>("Platform")
|
||||||
|
.HasColumnType("varchar(200)")
|
||||||
|
.HasColumnName("platform")
|
||||||
|
.UseCollation("utf8_general_ci")
|
||||||
|
.HasAnnotation("MySql:CharSet", "utf8");
|
||||||
|
|
||||||
|
b.Property<string>("Target")
|
||||||
|
.HasColumnType("text")
|
||||||
|
.HasColumnName("target")
|
||||||
|
.UseCollation("utf8_general_ci")
|
||||||
|
.HasAnnotation("MySql:CharSet", "utf8");
|
||||||
|
|
||||||
|
b.Property<int>("TenantId")
|
||||||
|
.HasColumnType("int")
|
||||||
|
.HasColumnName("tenant_id");
|
||||||
|
|
||||||
|
b.Property<string>("UserId")
|
||||||
|
.HasColumnType("char(38)")
|
||||||
|
.HasColumnName("user_id")
|
||||||
|
.UseCollation("utf8_general_ci")
|
||||||
|
.HasAnnotation("MySql:CharSet", "utf8");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("TenantId", "Date")
|
||||||
|
.HasDatabaseName("date");
|
||||||
|
|
||||||
|
b.ToTable("audit_events", (string)null);
|
||||||
|
|
||||||
|
b.HasAnnotation("MySql:CharSet", "utf8");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("ASC.MessagingSystem.EF.Model.LoginEvent", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("int")
|
||||||
|
.HasColumnName("id");
|
||||||
|
|
||||||
|
b.Property<int?>("Action")
|
||||||
|
.HasColumnType("int")
|
||||||
|
.HasColumnName("action");
|
||||||
|
|
||||||
|
b.Property<bool>("Active")
|
||||||
|
.HasColumnType("tinyint(1)")
|
||||||
|
.HasColumnName("active");
|
||||||
|
|
||||||
|
b.Property<string>("Browser")
|
||||||
|
.HasColumnType("varchar(200)")
|
||||||
|
.HasColumnName("browser")
|
||||||
|
.UseCollation("utf8_general_ci")
|
||||||
|
.HasAnnotation("MySql:CharSet", "utf8");
|
||||||
|
|
||||||
|
b.Property<DateTime>("Date")
|
||||||
|
.HasColumnType("datetime")
|
||||||
|
.HasColumnName("date");
|
||||||
|
|
||||||
|
b.Property<string>("DescriptionRaw")
|
||||||
|
.HasColumnType("varchar(500)")
|
||||||
|
.HasColumnName("description")
|
||||||
|
.UseCollation("utf8_general_ci")
|
||||||
|
.HasAnnotation("MySql:CharSet", "utf8");
|
||||||
|
|
||||||
|
b.Property<string>("Ip")
|
||||||
|
.HasColumnType("varchar(50)")
|
||||||
|
.HasColumnName("ip")
|
||||||
|
.UseCollation("utf8_general_ci")
|
||||||
|
.HasAnnotation("MySql:CharSet", "utf8");
|
||||||
|
|
||||||
|
b.Property<string>("Login")
|
||||||
|
.HasColumnType("varchar(200)")
|
||||||
|
.HasColumnName("login")
|
||||||
|
.UseCollation("utf8_general_ci")
|
||||||
|
.HasAnnotation("MySql:CharSet", "utf8");
|
||||||
|
|
||||||
|
b.Property<string>("Page")
|
||||||
|
.HasColumnType("varchar(300)")
|
||||||
|
.HasColumnName("page")
|
||||||
|
.UseCollation("utf8_general_ci")
|
||||||
|
.HasAnnotation("MySql:CharSet", "utf8");
|
||||||
|
|
||||||
|
b.Property<string>("Platform")
|
||||||
|
.HasColumnType("varchar(200)")
|
||||||
|
.HasColumnName("platform")
|
||||||
|
.UseCollation("utf8_general_ci")
|
||||||
|
.HasAnnotation("MySql:CharSet", "utf8");
|
||||||
|
|
||||||
|
b.Property<int>("TenantId")
|
||||||
|
.HasColumnType("int")
|
||||||
|
.HasColumnName("tenant_id");
|
||||||
|
|
||||||
|
b.Property<string>("UserId")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("char(38)")
|
||||||
|
.HasColumnName("user_id")
|
||||||
|
.UseCollation("utf8_general_ci")
|
||||||
|
.HasAnnotation("MySql:CharSet", "utf8");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("Date")
|
||||||
|
.HasDatabaseName("date");
|
||||||
|
|
||||||
|
b.HasIndex("TenantId", "UserId")
|
||||||
|
.HasDatabaseName("tenant_id");
|
||||||
|
|
||||||
|
b.ToTable("login_events", (string)null);
|
||||||
|
|
||||||
|
b.HasAnnotation("MySql:CharSet", "utf8");
|
||||||
|
});
|
||||||
|
#pragma warning restore 612, 618
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,190 @@
|
|||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore.Metadata;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace ASC.Migrations.MySql.Migrations.Messages
|
||||||
|
{
|
||||||
|
public partial class MessagesContext_Upgrade1 : Migration
|
||||||
|
{
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "core_user",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
id = table.Column<string>(type: "varchar(38)", nullable: false, collation: "utf8_general_ci")
|
||||||
|
.Annotation("MySql:CharSet", "utf8"),
|
||||||
|
tenant = table.Column<int>(type: "int", nullable: false),
|
||||||
|
username = table.Column<string>(type: "varchar(255)", nullable: false, collation: "utf8_general_ci")
|
||||||
|
.Annotation("MySql:CharSet", "utf8"),
|
||||||
|
firstname = table.Column<string>(type: "varchar(64)", nullable: false, collation: "utf8_general_ci")
|
||||||
|
.Annotation("MySql:CharSet", "utf8"),
|
||||||
|
lastname = table.Column<string>(type: "varchar(64)", nullable: false, collation: "utf8_general_ci")
|
||||||
|
.Annotation("MySql:CharSet", "utf8"),
|
||||||
|
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'"),
|
||||||
|
email = table.Column<string>(type: "varchar(255)", nullable: true, collation: "utf8_general_ci")
|
||||||
|
.Annotation("MySql:CharSet", "utf8"),
|
||||||
|
workfromdate = table.Column<DateTime>(type: "datetime", nullable: true),
|
||||||
|
terminateddate = table.Column<DateTime>(type: "datetime", nullable: true),
|
||||||
|
title = table.Column<string>(type: "varchar(64)", nullable: true, collation: "utf8_general_ci")
|
||||||
|
.Annotation("MySql:CharSet", "utf8"),
|
||||||
|
culture = table.Column<string>(type: "varchar(20)", nullable: true, collation: "utf8_general_ci")
|
||||||
|
.Annotation("MySql:CharSet", "utf8"),
|
||||||
|
contacts = table.Column<string>(type: "varchar(1024)", nullable: true, collation: "utf8_general_ci")
|
||||||
|
.Annotation("MySql:CharSet", "utf8"),
|
||||||
|
phone = table.Column<string>(type: "varchar(255)", nullable: true, collation: "utf8_general_ci")
|
||||||
|
.Annotation("MySql:CharSet", "utf8"),
|
||||||
|
phone_activation = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
|
||||||
|
location = table.Column<string>(type: "varchar(255)", nullable: true, collation: "utf8_general_ci")
|
||||||
|
.Annotation("MySql:CharSet", "utf8"),
|
||||||
|
notes = table.Column<string>(type: "varchar(512)", nullable: true, collation: "utf8_general_ci")
|
||||||
|
.Annotation("MySql:CharSet", "utf8"),
|
||||||
|
sid = table.Column<string>(type: "varchar(512)", nullable: true, collation: "utf8_general_ci")
|
||||||
|
.Annotation("MySql:CharSet", "utf8"),
|
||||||
|
sso_name_id = table.Column<string>(type: "varchar(512)", nullable: true, collation: "utf8_general_ci")
|
||||||
|
.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<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),
|
||||||
|
quota_limit = table.Column<long>(type: "bigint", nullable: false, defaultValueSql: "'-1'")
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PRIMARY", x => x.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.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.InsertData(
|
||||||
|
table: "core_user",
|
||||||
|
columns: new[] { "id", "bithdate", "contacts", "create_on", "culture", "email", "firstname", "last_modified", "lastname", "location", "phone", "notes", "sex", "sid", "sso_name_id", "sso_session_id", "status", "tenant", "terminateddate", "title", "username", "workfromdate" },
|
||||||
|
values: new object[] { "66faa6e4-f133-11ea-b126-00ffeec8b4ef", null, null, new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), null, "", "Administrator", new DateTime(2021, 3, 9, 9, 52, 55, 765, DateTimeKind.Utc).AddTicks(1420), "", null, null, null, null, null, null, null, 1, 1, null, null, "administrator", new DateTime(2021, 3, 9, 9, 52, 55, 764, DateTimeKind.Utc).AddTicks(9157) });
|
||||||
|
|
||||||
|
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: "email",
|
||||||
|
table: "core_user",
|
||||||
|
column: "email");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "last_modified",
|
||||||
|
table: "core_user",
|
||||||
|
column: "last_modified");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "username",
|
||||||
|
table: "core_user",
|
||||||
|
columns: new[] { "tenant", "username" });
|
||||||
|
|
||||||
|
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");
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "core_user");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "tenants_tenants");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "webstudio_settings");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -19,6 +19,383 @@ namespace ASC.Migrations.MySql.Migrations
|
|||||||
.HasAnnotation("ProductVersion", "6.0.7")
|
.HasAnnotation("ProductVersion", "6.0.7")
|
||||||
.HasAnnotation("Relational:MaxIdentifierLength", 64);
|
.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.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.User", b =>
|
||||||
|
{
|
||||||
|
b.Property<string>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("varchar(38)")
|
||||||
|
.HasColumnName("id")
|
||||||
|
.UseCollation("utf8_general_ci")
|
||||||
|
.HasAnnotation("MySql:CharSet", "utf8");
|
||||||
|
|
||||||
|
b.Property<int>("ActivationStatus")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("int")
|
||||||
|
.HasColumnName("activation_status")
|
||||||
|
.HasDefaultValueSql("'0'");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("BirthDate")
|
||||||
|
.HasColumnType("datetime")
|
||||||
|
.HasColumnName("bithdate");
|
||||||
|
|
||||||
|
b.Property<string>("Contacts")
|
||||||
|
.HasColumnType("varchar(1024)")
|
||||||
|
.HasColumnName("contacts")
|
||||||
|
.UseCollation("utf8_general_ci")
|
||||||
|
.HasAnnotation("MySql:CharSet", "utf8");
|
||||||
|
|
||||||
|
b.Property<DateTime>("CreateDate")
|
||||||
|
.HasColumnType("timestamp")
|
||||||
|
.HasColumnName("create_on");
|
||||||
|
|
||||||
|
b.Property<string>("CultureName")
|
||||||
|
.HasColumnType("varchar(20)")
|
||||||
|
.HasColumnName("culture")
|
||||||
|
.UseCollation("utf8_general_ci")
|
||||||
|
.HasAnnotation("MySql:CharSet", "utf8");
|
||||||
|
|
||||||
|
b.Property<string>("Email")
|
||||||
|
.HasColumnType("varchar(255)")
|
||||||
|
.HasColumnName("email")
|
||||||
|
.UseCollation("utf8_general_ci")
|
||||||
|
.HasAnnotation("MySql:CharSet", "utf8");
|
||||||
|
|
||||||
|
b.Property<string>("FirstName")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("varchar(64)")
|
||||||
|
.HasColumnName("firstname")
|
||||||
|
.UseCollation("utf8_general_ci")
|
||||||
|
.HasAnnotation("MySql:CharSet", "utf8");
|
||||||
|
|
||||||
|
b.Property<DateTime>("LastModified")
|
||||||
|
.HasColumnType("datetime")
|
||||||
|
.HasColumnName("last_modified");
|
||||||
|
|
||||||
|
b.Property<string>("LastName")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("varchar(64)")
|
||||||
|
.HasColumnName("lastname")
|
||||||
|
.UseCollation("utf8_general_ci")
|
||||||
|
.HasAnnotation("MySql:CharSet", "utf8");
|
||||||
|
|
||||||
|
b.Property<string>("Location")
|
||||||
|
.HasColumnType("varchar(255)")
|
||||||
|
.HasColumnName("location")
|
||||||
|
.UseCollation("utf8_general_ci")
|
||||||
|
.HasAnnotation("MySql:CharSet", "utf8");
|
||||||
|
|
||||||
|
b.Property<string>("MobilePhone")
|
||||||
|
.HasColumnType("varchar(255)")
|
||||||
|
.HasColumnName("phone")
|
||||||
|
.UseCollation("utf8_general_ci")
|
||||||
|
.HasAnnotation("MySql:CharSet", "utf8");
|
||||||
|
|
||||||
|
b.Property<int>("MobilePhoneActivation")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("int")
|
||||||
|
.HasColumnName("phone_activation")
|
||||||
|
.HasDefaultValueSql("'0'");
|
||||||
|
|
||||||
|
b.Property<string>("Notes")
|
||||||
|
.HasColumnType("varchar(512)")
|
||||||
|
.HasColumnName("notes")
|
||||||
|
.UseCollation("utf8_general_ci")
|
||||||
|
.HasAnnotation("MySql:CharSet", "utf8");
|
||||||
|
|
||||||
|
b.Property<long>("QuotaLimit")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("bigint")
|
||||||
|
.HasColumnName("quota_limit")
|
||||||
|
.HasDefaultValueSql("'-1'");
|
||||||
|
|
||||||
|
b.Property<bool>("Removed")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("tinyint(1)")
|
||||||
|
.HasColumnName("removed")
|
||||||
|
.HasDefaultValueSql("'0'");
|
||||||
|
|
||||||
|
b.Property<bool?>("Sex")
|
||||||
|
.HasColumnType("tinyint(1)")
|
||||||
|
.HasColumnName("sex");
|
||||||
|
|
||||||
|
b.Property<string>("Sid")
|
||||||
|
.HasColumnType("varchar(512)")
|
||||||
|
.HasColumnName("sid")
|
||||||
|
.UseCollation("utf8_general_ci")
|
||||||
|
.HasAnnotation("MySql:CharSet", "utf8");
|
||||||
|
|
||||||
|
b.Property<string>("SsoNameId")
|
||||||
|
.HasColumnType("varchar(512)")
|
||||||
|
.HasColumnName("sso_name_id")
|
||||||
|
.UseCollation("utf8_general_ci")
|
||||||
|
.HasAnnotation("MySql:CharSet", "utf8");
|
||||||
|
|
||||||
|
b.Property<string>("SsoSessionId")
|
||||||
|
.HasColumnType("varchar(512)")
|
||||||
|
.HasColumnName("sso_session_id")
|
||||||
|
.UseCollation("utf8_general_ci")
|
||||||
|
.HasAnnotation("MySql:CharSet", "utf8");
|
||||||
|
|
||||||
|
b.Property<int>("Status")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("int")
|
||||||
|
.HasColumnName("status")
|
||||||
|
.HasDefaultValueSql("'1'");
|
||||||
|
|
||||||
|
b.Property<int>("Tenant")
|
||||||
|
.HasColumnType("int")
|
||||||
|
.HasColumnName("tenant");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("TerminatedDate")
|
||||||
|
.HasColumnType("datetime")
|
||||||
|
.HasColumnName("terminateddate");
|
||||||
|
|
||||||
|
b.Property<string>("Title")
|
||||||
|
.HasColumnType("varchar(64)")
|
||||||
|
.HasColumnName("title")
|
||||||
|
.UseCollation("utf8_general_ci")
|
||||||
|
.HasAnnotation("MySql:CharSet", "utf8");
|
||||||
|
|
||||||
|
b.Property<string>("UserName")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("varchar(255)")
|
||||||
|
.HasColumnName("username")
|
||||||
|
.UseCollation("utf8_general_ci")
|
||||||
|
.HasAnnotation("MySql:CharSet", "utf8");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("WorkFromDate")
|
||||||
|
.HasColumnType("datetime")
|
||||||
|
.HasColumnName("workfromdate");
|
||||||
|
|
||||||
|
b.HasKey("Id")
|
||||||
|
.HasName("PRIMARY");
|
||||||
|
|
||||||
|
b.HasIndex("Email")
|
||||||
|
.HasDatabaseName("email");
|
||||||
|
|
||||||
|
b.HasIndex("LastModified")
|
||||||
|
.HasDatabaseName("last_modified");
|
||||||
|
|
||||||
|
b.HasIndex("Tenant", "UserName")
|
||||||
|
.HasDatabaseName("username");
|
||||||
|
|
||||||
|
b.ToTable("core_user", (string)null);
|
||||||
|
|
||||||
|
b.HasAnnotation("MySql:CharSet", "utf8");
|
||||||
|
|
||||||
|
b.HasData(
|
||||||
|
new
|
||||||
|
{
|
||||||
|
Id = "66faa6e4-f133-11ea-b126-00ffeec8b4ef",
|
||||||
|
ActivationStatus = 0,
|
||||||
|
CreateDate = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
|
Email = "",
|
||||||
|
FirstName = "Administrator",
|
||||||
|
LastModified = new DateTime(2021, 3, 9, 9, 52, 55, 765, DateTimeKind.Utc).AddTicks(1420),
|
||||||
|
LastName = "",
|
||||||
|
MobilePhoneActivation = 0,
|
||||||
|
QuotaLimit = 0L,
|
||||||
|
Removed = false,
|
||||||
|
Status = 1,
|
||||||
|
Tenant = 1,
|
||||||
|
UserName = "administrator",
|
||||||
|
WorkFromDate = new DateTime(2021, 3, 9, 9, 52, 55, 764, DateTimeKind.Utc).AddTicks(9157)
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("ASC.MessagingSystem.EF.Model.AuditEvent", b =>
|
modelBuilder.Entity("ASC.MessagingSystem.EF.Model.AuditEvent", b =>
|
||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,27 +1,26 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
namespace ASC.Migrations.MySql.Migrations.UserDb
|
namespace ASC.Migrations.MySql.Migrations.UserDb
|
||||||
{
|
{
|
||||||
public partial class UserDbContext_Upgrade1 : Migration
|
public partial class UserDbContext_Upgrade1 : Migration
|
||||||
{
|
{
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
{
|
{
|
||||||
migrationBuilder.AddColumn<string>(
|
migrationBuilder.AddColumn<long>(
|
||||||
name: "quota_limit",
|
name: "quota_limit",
|
||||||
table: "core_user",
|
table: "core_user",
|
||||||
type: "longtext",
|
type: "bigint",
|
||||||
nullable: true,
|
nullable: false,
|
||||||
defaultValueSql: "'0'")
|
defaultValueSql: "'-1'");
|
||||||
.Annotation("MySql:CharSet", "utf8");
|
}
|
||||||
}
|
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
{
|
||||||
{
|
migrationBuilder.DropColumn(
|
||||||
migrationBuilder.DropColumn(
|
name: "quota_limit",
|
||||||
name: "quota_limit",
|
table: "core_user");
|
||||||
table: "core_user");
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
@ -1262,11 +1262,11 @@ namespace ASC.Migrations.MySql.Migrations
|
|||||||
.UseCollation("utf8_general_ci")
|
.UseCollation("utf8_general_ci")
|
||||||
.HasAnnotation("MySql:CharSet", "utf8");
|
.HasAnnotation("MySql:CharSet", "utf8");
|
||||||
|
|
||||||
b.Property<string>("QuotaLimit")
|
b.Property<long>("QuotaLimit")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("longtext")
|
.HasColumnType("bigint")
|
||||||
.HasColumnName("quota_limit")
|
.HasColumnName("quota_limit")
|
||||||
.HasDefaultValueSql("'0'");
|
.HasDefaultValueSql("'-1'");
|
||||||
|
|
||||||
b.Property<bool>("Removed")
|
b.Property<bool>("Removed")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
@ -1354,6 +1354,7 @@ namespace ASC.Migrations.MySql.Migrations
|
|||||||
LastModified = new DateTime(2021, 3, 9, 9, 52, 55, 765, DateTimeKind.Utc).AddTicks(1420),
|
LastModified = new DateTime(2021, 3, 9, 9, 52, 55, 765, DateTimeKind.Utc).AddTicks(1420),
|
||||||
LastName = "",
|
LastName = "",
|
||||||
MobilePhoneActivation = 0,
|
MobilePhoneActivation = 0,
|
||||||
|
QuotaLimit = 0L,
|
||||||
Removed = false,
|
Removed = false,
|
||||||
Status = 1,
|
Status = 1,
|
||||||
Tenant = 1,
|
Tenant = 1,
|
||||||
|
@ -1,61 +0,0 @@
|
|||||||
// <auto-generated />
|
|
||||||
using System;
|
|
||||||
using ASC.Core.Common.EF;
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
||||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace ASC.Migrations.PostgreSql.Migrations.CoreDb
|
|
||||||
{
|
|
||||||
[DbContext(typeof(CoreDbContext))]
|
|
||||||
[Migration("20220909155356_CoreDbContext_Upgrade1")]
|
|
||||||
partial class CoreDbContext_Upgrade1
|
|
||||||
{
|
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
||||||
{
|
|
||||||
#pragma warning disable 612, 618
|
|
||||||
modelBuilder
|
|
||||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn)
|
|
||||||
.HasAnnotation("ProductVersion", "6.0.7")
|
|
||||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
|
||||||
|
|
||||||
modelBuilder.Entity("ASC.Core.Common.EF.DbUsersQuotaRow", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Tenant")
|
|
||||||
.HasColumnType("integer")
|
|
||||||
.HasColumnName("tenant");
|
|
||||||
|
|
||||||
b.Property<string>("UserId")
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<string>("Path")
|
|
||||||
.HasMaxLength(255)
|
|
||||||
.HasColumnType("character varying(255)")
|
|
||||||
.HasColumnName("path");
|
|
||||||
|
|
||||||
b.Property<long>("Counter")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("bigint")
|
|
||||||
.HasColumnName("counter")
|
|
||||||
.HasDefaultValueSql("'0'");
|
|
||||||
|
|
||||||
b.Property<string>("Tag")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasMaxLength(36)
|
|
||||||
.HasColumnType("character varying(36)")
|
|
||||||
.HasColumnName("tag")
|
|
||||||
.HasDefaultValueSql("'0'");
|
|
||||||
|
|
||||||
b.HasKey("Tenant", "UserId", "Path")
|
|
||||||
.HasName("tenants_userquotarow_pkey");
|
|
||||||
|
|
||||||
b.ToTable("users_quotarow", "onlyoffice");
|
|
||||||
});
|
|
||||||
#pragma warning restore 612, 618
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
238
migrations/postgre/CoreDbContext/20220913140010_CoreDbContext_Upgrade1.Designer.cs
generated
Normal file
238
migrations/postgre/CoreDbContext/20220913140010_CoreDbContext_Upgrade1.Designer.cs
generated
Normal file
@ -0,0 +1,238 @@
|
|||||||
|
// <auto-generated />
|
||||||
|
using System;
|
||||||
|
using ASC.Core.Common.EF;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace ASC.Migrations.PostgreSql.Migrations.CoreDb
|
||||||
|
{
|
||||||
|
[DbContext(typeof(CoreDbContext))]
|
||||||
|
[Migration("20220913140010_CoreDbContext_Upgrade1")]
|
||||||
|
partial class CoreDbContext_Upgrade1
|
||||||
|
{
|
||||||
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||||
|
{
|
||||||
|
#pragma warning disable 612, 618
|
||||||
|
modelBuilder
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn)
|
||||||
|
.HasAnnotation("ProductVersion", "6.0.7")
|
||||||
|
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||||
|
|
||||||
|
modelBuilder.Entity("ASC.Core.Common.EF.DbButton", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("TariffId")
|
||||||
|
.HasColumnType("integer")
|
||||||
|
.HasColumnName("tariff_id");
|
||||||
|
|
||||||
|
b.Property<string>("PartnerId")
|
||||||
|
.HasMaxLength(50)
|
||||||
|
.HasColumnType("character varying(50)")
|
||||||
|
.HasColumnName("partner_id");
|
||||||
|
|
||||||
|
b.Property<string>("ButtonUrl")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text")
|
||||||
|
.HasColumnName("button_url");
|
||||||
|
|
||||||
|
b.HasKey("TariffId", "PartnerId")
|
||||||
|
.HasName("tenants_buttons_pkey");
|
||||||
|
|
||||||
|
b.ToTable("tenants_buttons", "onlyoffice");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("ASC.Core.Common.EF.DbQuota", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Tenant")
|
||||||
|
.HasColumnType("integer")
|
||||||
|
.HasColumnName("tenant");
|
||||||
|
|
||||||
|
b.Property<int>("ActiveUsers")
|
||||||
|
.HasColumnType("integer")
|
||||||
|
.HasColumnName("active_users");
|
||||||
|
|
||||||
|
b.Property<string>("AvangateId")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasMaxLength(128)
|
||||||
|
.HasColumnType("character varying(128)")
|
||||||
|
.HasColumnName("avangate_id")
|
||||||
|
.HasDefaultValueSql("NULL");
|
||||||
|
|
||||||
|
b.Property<string>("Description")
|
||||||
|
.HasColumnType("character varying")
|
||||||
|
.HasColumnName("description");
|
||||||
|
|
||||||
|
b.Property<string>("Features")
|
||||||
|
.HasColumnType("text")
|
||||||
|
.HasColumnName("features");
|
||||||
|
|
||||||
|
b.Property<long>("MaxFileSize")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("bigint")
|
||||||
|
.HasColumnName("max_file_size")
|
||||||
|
.HasDefaultValueSql("'0'");
|
||||||
|
|
||||||
|
b.Property<long>("MaxTotalSize")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("bigint")
|
||||||
|
.HasColumnName("max_total_size")
|
||||||
|
.HasDefaultValueSql("'0'");
|
||||||
|
|
||||||
|
b.Property<string>("Name")
|
||||||
|
.HasColumnType("character varying")
|
||||||
|
.HasColumnName("name");
|
||||||
|
|
||||||
|
b.Property<decimal>("Price")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("numeric(10,2)")
|
||||||
|
.HasColumnName("price")
|
||||||
|
.HasDefaultValueSql("0.00");
|
||||||
|
|
||||||
|
b.Property<bool>("Visible")
|
||||||
|
.HasColumnType("boolean")
|
||||||
|
.HasColumnName("visible");
|
||||||
|
|
||||||
|
b.HasKey("Tenant")
|
||||||
|
.HasName("tenants_quota_pkey");
|
||||||
|
|
||||||
|
b.ToTable("tenants_quota", "onlyoffice");
|
||||||
|
|
||||||
|
b.HasData(
|
||||||
|
new
|
||||||
|
{
|
||||||
|
Tenant = -1,
|
||||||
|
ActiveUsers = 10000,
|
||||||
|
AvangateId = "0",
|
||||||
|
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 = false
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("ASC.Core.Common.EF.DbQuotaRow", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Tenant")
|
||||||
|
.HasColumnType("integer")
|
||||||
|
.HasColumnName("tenant");
|
||||||
|
|
||||||
|
b.Property<string>("Path")
|
||||||
|
.HasMaxLength(255)
|
||||||
|
.HasColumnType("character varying(255)")
|
||||||
|
.HasColumnName("path");
|
||||||
|
|
||||||
|
b.Property<long>("Counter")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("bigint")
|
||||||
|
.HasColumnName("counter")
|
||||||
|
.HasDefaultValueSql("'0'");
|
||||||
|
|
||||||
|
b.Property<DateTime>("LastModified")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("timestamp with time zone")
|
||||||
|
.HasColumnName("last_modified")
|
||||||
|
.HasDefaultValueSql("CURRENT_TIMESTAMP");
|
||||||
|
|
||||||
|
b.Property<string>("Tag")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasMaxLength(1024)
|
||||||
|
.HasColumnType("character varying(1024)")
|
||||||
|
.HasColumnName("tag")
|
||||||
|
.HasDefaultValueSql("'0'");
|
||||||
|
|
||||||
|
b.HasKey("Tenant", "Path")
|
||||||
|
.HasName("tenants_quotarow_pkey");
|
||||||
|
|
||||||
|
b.HasIndex("LastModified")
|
||||||
|
.HasDatabaseName("last_modified_tenants_quotarow");
|
||||||
|
|
||||||
|
b.ToTable("tenants_quotarow", "onlyoffice");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("ASC.Core.Common.EF.DbTariff", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("integer")
|
||||||
|
.HasColumnName("id")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
|
b.Property<string>("Comment")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasMaxLength(255)
|
||||||
|
.HasColumnType("character varying(255)")
|
||||||
|
.HasColumnName("comment")
|
||||||
|
.HasDefaultValueSql("NULL");
|
||||||
|
|
||||||
|
b.Property<DateTime>("CreateOn")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("timestamp with time zone")
|
||||||
|
.HasColumnName("create_on")
|
||||||
|
.HasDefaultValueSql("CURRENT_TIMESTAMP");
|
||||||
|
|
||||||
|
b.Property<int>("Quantity")
|
||||||
|
.HasColumnType("integer")
|
||||||
|
.HasColumnName("quantity");
|
||||||
|
|
||||||
|
b.Property<DateTime>("Stamp")
|
||||||
|
.HasColumnType("timestamp with time zone")
|
||||||
|
.HasColumnName("stamp");
|
||||||
|
|
||||||
|
b.Property<int>("Tariff")
|
||||||
|
.HasColumnType("integer")
|
||||||
|
.HasColumnName("tariff");
|
||||||
|
|
||||||
|
b.Property<int>("Tenant")
|
||||||
|
.HasColumnType("integer")
|
||||||
|
.HasColumnName("tenant");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("Tenant")
|
||||||
|
.HasDatabaseName("tenant_tenants_tariff");
|
||||||
|
|
||||||
|
b.ToTable("tenants_tariff", "onlyoffice");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("ASC.Core.Common.EF.DbUsersQuotaRow", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Tenant")
|
||||||
|
.HasColumnType("integer")
|
||||||
|
.HasColumnName("tenant");
|
||||||
|
|
||||||
|
b.Property<Guid>("UserId")
|
||||||
|
.HasColumnType("uuid");
|
||||||
|
|
||||||
|
b.Property<string>("Path")
|
||||||
|
.HasMaxLength(255)
|
||||||
|
.HasColumnType("character varying(255)")
|
||||||
|
.HasColumnName("path");
|
||||||
|
|
||||||
|
b.Property<long>("Counter")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("bigint")
|
||||||
|
.HasColumnName("counter")
|
||||||
|
.HasDefaultValueSql("'0'");
|
||||||
|
|
||||||
|
b.Property<string>("Tag")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasMaxLength(36)
|
||||||
|
.HasColumnType("character varying(36)")
|
||||||
|
.HasColumnName("tag")
|
||||||
|
.HasDefaultValueSql("'0'");
|
||||||
|
|
||||||
|
b.HasKey("Tenant", "UserId", "Path")
|
||||||
|
.HasName("tenants_userquotarow_pkey");
|
||||||
|
|
||||||
|
b.ToTable("users_quotarow", "onlyoffice");
|
||||||
|
});
|
||||||
|
#pragma warning restore 612, 618
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,35 +1,36 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
#nullable disable
|
|
||||||
|
#nullable disable
|
||||||
namespace ASC.Migrations.PostgreSql.Migrations.CoreDb
|
|
||||||
{
|
namespace ASC.Migrations.PostgreSql.Migrations.CoreDb
|
||||||
public partial class CoreDbContext_Upgrade1 : Migration
|
{
|
||||||
{
|
public partial class CoreDbContext_Upgrade1 : Migration
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
{
|
||||||
{
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
migrationBuilder.CreateTable(
|
{
|
||||||
name: "users_quotarow",
|
migrationBuilder.CreateTable(
|
||||||
schema: "onlyoffice",
|
name: "users_quotarow",
|
||||||
columns: table => new
|
schema: "onlyoffice",
|
||||||
{
|
columns: table => new
|
||||||
tenant = table.Column<int>(type: "integer", nullable: false),
|
{
|
||||||
UserId = table.Column<string>(type: "text", nullable: false),
|
tenant = table.Column<int>(type: "integer", nullable: false),
|
||||||
path = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: false),
|
UserId = table.Column<Guid>(type: "uuid", nullable: false),
|
||||||
counter = table.Column<long>(type: "bigint", nullable: false, defaultValueSql: "'0'"),
|
path = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: false),
|
||||||
tag = table.Column<string>(type: "character varying(36)", maxLength: 36, nullable: true, defaultValueSql: "'0'")
|
counter = table.Column<long>(type: "bigint", nullable: false, defaultValueSql: "'0'"),
|
||||||
},
|
tag = table.Column<string>(type: "character varying(36)", maxLength: 36, nullable: true, defaultValueSql: "'0'")
|
||||||
constraints: table =>
|
},
|
||||||
{
|
constraints: table =>
|
||||||
table.PrimaryKey("tenants_userquotarow_pkey", x => new { x.tenant, x.UserId, x.path });
|
{
|
||||||
});
|
table.PrimaryKey("tenants_userquotarow_pkey", x => new { x.tenant, x.UserId, x.path });
|
||||||
}
|
});
|
||||||
|
}
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
migrationBuilder.DropTable(
|
{
|
||||||
name: "users_quotarow",
|
migrationBuilder.DropTable(
|
||||||
schema: "onlyoffice");
|
name: "users_quotarow",
|
||||||
}
|
schema: "onlyoffice");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
@ -204,8 +204,8 @@ namespace ASC.Migrations.PostgreSql.Migrations
|
|||||||
.HasColumnType("integer")
|
.HasColumnType("integer")
|
||||||
.HasColumnName("tenant");
|
.HasColumnName("tenant");
|
||||||
|
|
||||||
b.Property<string>("UserId")
|
b.Property<Guid>("UserId")
|
||||||
.HasColumnType("text");
|
.HasColumnType("uuid");
|
||||||
|
|
||||||
b.Property<string>("Path")
|
b.Property<string>("Path")
|
||||||
.HasMaxLength(255)
|
.HasMaxLength(255)
|
||||||
|
603
migrations/postgre/MessagesContext/20220913140009_MessagesContext_Upgrade1.Designer.cs
generated
Normal file
603
migrations/postgre/MessagesContext/20220913140009_MessagesContext_Upgrade1.Designer.cs
generated
Normal file
@ -0,0 +1,603 @@
|
|||||||
|
// <auto-generated />
|
||||||
|
using System;
|
||||||
|
using ASC.MessagingSystem.EF.Context;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace ASC.Migrations.PostgreSql.Migrations.Messages
|
||||||
|
{
|
||||||
|
[DbContext(typeof(MessagesContext))]
|
||||||
|
[Migration("20220913140009_MessagesContext_Upgrade1")]
|
||||||
|
partial class MessagesContext_Upgrade1
|
||||||
|
{
|
||||||
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||||
|
{
|
||||||
|
#pragma warning disable 612, 618
|
||||||
|
modelBuilder
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn)
|
||||||
|
.HasAnnotation("ProductVersion", "6.0.7")
|
||||||
|
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||||
|
|
||||||
|
modelBuilder.Entity("ASC.Core.Common.EF.Model.DbTenant", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("integer")
|
||||||
|
.HasColumnName("id")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
|
b.Property<string>("Alias")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(100)
|
||||||
|
.HasColumnType("character varying(100)")
|
||||||
|
.HasColumnName("alias");
|
||||||
|
|
||||||
|
b.Property<bool>("Calls")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("boolean")
|
||||||
|
.HasColumnName("calls")
|
||||||
|
.HasDefaultValueSql("true");
|
||||||
|
|
||||||
|
b.Property<DateTime>("CreationDateTime")
|
||||||
|
.HasColumnType("timestamp with time zone")
|
||||||
|
.HasColumnName("creationdatetime");
|
||||||
|
|
||||||
|
b.Property<int>("Industry")
|
||||||
|
.HasColumnType("integer")
|
||||||
|
.HasColumnName("industry");
|
||||||
|
|
||||||
|
b.Property<string>("Language")
|
||||||
|
.IsRequired()
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasMaxLength(10)
|
||||||
|
.HasColumnType("character(10)")
|
||||||
|
.HasColumnName("language")
|
||||||
|
.HasDefaultValueSql("'en-US'")
|
||||||
|
.IsFixedLength();
|
||||||
|
|
||||||
|
b.Property<DateTime>("LastModified")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("timestamp with time zone")
|
||||||
|
.HasColumnName("last_modified")
|
||||||
|
.HasDefaultValueSql("CURRENT_TIMESTAMP");
|
||||||
|
|
||||||
|
b.Property<string>("MappedDomain")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasMaxLength(100)
|
||||||
|
.HasColumnType("character varying(100)")
|
||||||
|
.HasColumnName("mappeddomain")
|
||||||
|
.HasDefaultValueSql("NULL");
|
||||||
|
|
||||||
|
b.Property<string>("Name")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(255)
|
||||||
|
.HasColumnType("character varying(255)")
|
||||||
|
.HasColumnName("name");
|
||||||
|
|
||||||
|
b.Property<Guid?>("OwnerId")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasMaxLength(38)
|
||||||
|
.HasColumnType("uuid")
|
||||||
|
.HasColumnName("owner_id")
|
||||||
|
.HasDefaultValueSql("NULL");
|
||||||
|
|
||||||
|
b.Property<string>("PaymentId")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasMaxLength(38)
|
||||||
|
.HasColumnType("character varying(38)")
|
||||||
|
.HasColumnName("payment_id")
|
||||||
|
.HasDefaultValueSql("NULL");
|
||||||
|
|
||||||
|
b.Property<bool>("Spam")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("boolean")
|
||||||
|
.HasColumnName("spam")
|
||||||
|
.HasDefaultValueSql("true");
|
||||||
|
|
||||||
|
b.Property<int>("Status")
|
||||||
|
.HasColumnType("integer")
|
||||||
|
.HasColumnName("status");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("StatusChanged")
|
||||||
|
.HasColumnType("timestamp with time zone")
|
||||||
|
.HasColumnName("statuschanged");
|
||||||
|
|
||||||
|
b.Property<string>("TimeZone")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasMaxLength(50)
|
||||||
|
.HasColumnType("character varying(50)")
|
||||||
|
.HasColumnName("timezone")
|
||||||
|
.HasDefaultValueSql("NULL");
|
||||||
|
|
||||||
|
b.Property<int>("TrustedDomainsEnabled")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("integer")
|
||||||
|
.HasColumnName("trusteddomainsenabled")
|
||||||
|
.HasDefaultValueSql("1");
|
||||||
|
|
||||||
|
b.Property<string>("TrustedDomainsRaw")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasMaxLength(1024)
|
||||||
|
.HasColumnType("character varying(1024)")
|
||||||
|
.HasColumnName("trusteddomains")
|
||||||
|
.HasDefaultValueSql("NULL");
|
||||||
|
|
||||||
|
b.Property<int>("Version")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("integer")
|
||||||
|
.HasColumnName("version")
|
||||||
|
.HasDefaultValueSql("2");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("Version_Changed")
|
||||||
|
.HasColumnType("timestamp with time zone")
|
||||||
|
.HasColumnName("version_changed");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("Alias")
|
||||||
|
.IsUnique()
|
||||||
|
.HasDatabaseName("alias");
|
||||||
|
|
||||||
|
b.HasIndex("LastModified")
|
||||||
|
.HasDatabaseName("last_modified_tenants_tenants");
|
||||||
|
|
||||||
|
b.HasIndex("MappedDomain")
|
||||||
|
.HasDatabaseName("mappeddomain");
|
||||||
|
|
||||||
|
b.HasIndex("Version")
|
||||||
|
.HasDatabaseName("version");
|
||||||
|
|
||||||
|
b.ToTable("tenants_tenants", "onlyoffice");
|
||||||
|
|
||||||
|
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 = new Guid("66faa6e4-f133-11ea-b126-00ffeec8b4ef"),
|
||||||
|
Spam = false,
|
||||||
|
Status = 0,
|
||||||
|
TrustedDomainsEnabled = 0,
|
||||||
|
Version = 0
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("ASC.Core.Common.EF.Model.DbWebstudioSettings", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("TenantId")
|
||||||
|
.HasColumnType("integer")
|
||||||
|
.HasColumnName("TenantID");
|
||||||
|
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.HasMaxLength(64)
|
||||||
|
.HasColumnType("uuid")
|
||||||
|
.HasColumnName("ID");
|
||||||
|
|
||||||
|
b.Property<Guid>("UserId")
|
||||||
|
.HasMaxLength(64)
|
||||||
|
.HasColumnType("uuid")
|
||||||
|
.HasColumnName("UserID");
|
||||||
|
|
||||||
|
b.Property<string>("Data")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.HasKey("TenantId", "Id", "UserId")
|
||||||
|
.HasName("webstudio_settings_pkey");
|
||||||
|
|
||||||
|
b.HasIndex("Id")
|
||||||
|
.HasDatabaseName("ID");
|
||||||
|
|
||||||
|
b.ToTable("webstudio_settings", "onlyoffice");
|
||||||
|
|
||||||
|
b.HasData(
|
||||||
|
new
|
||||||
|
{
|
||||||
|
TenantId = 1,
|
||||||
|
Id = new Guid("9a925891-1f92-4ed7-b277-d6f649739f06"),
|
||||||
|
UserId = new Guid("00000000-0000-0000-0000-000000000000"),
|
||||||
|
Data = "{\"Completed\":false}"
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("ASC.Core.Common.EF.User", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasMaxLength(38)
|
||||||
|
.HasColumnType("uuid")
|
||||||
|
.HasColumnName("id");
|
||||||
|
|
||||||
|
b.Property<int>("ActivationStatus")
|
||||||
|
.HasColumnType("integer")
|
||||||
|
.HasColumnName("activation_status");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("BirthDate")
|
||||||
|
.HasColumnType("timestamp with time zone")
|
||||||
|
.HasColumnName("bithdate");
|
||||||
|
|
||||||
|
b.Property<string>("Contacts")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasMaxLength(1024)
|
||||||
|
.HasColumnType("character varying(1024)")
|
||||||
|
.HasColumnName("contacts")
|
||||||
|
.HasDefaultValueSql("NULL");
|
||||||
|
|
||||||
|
b.Property<DateTime>("CreateDate")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("timestamp with time zone")
|
||||||
|
.HasColumnName("create_on")
|
||||||
|
.HasDefaultValueSql("CURRENT_TIMESTAMP");
|
||||||
|
|
||||||
|
b.Property<string>("CultureName")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasMaxLength(20)
|
||||||
|
.HasColumnType("character varying(20)")
|
||||||
|
.HasColumnName("culture")
|
||||||
|
.HasDefaultValueSql("NULL");
|
||||||
|
|
||||||
|
b.Property<string>("Email")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasMaxLength(255)
|
||||||
|
.HasColumnType("character varying(255)")
|
||||||
|
.HasColumnName("email")
|
||||||
|
.HasDefaultValueSql("NULL");
|
||||||
|
|
||||||
|
b.Property<string>("FirstName")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(64)
|
||||||
|
.HasColumnType("character varying(64)")
|
||||||
|
.HasColumnName("firstname");
|
||||||
|
|
||||||
|
b.Property<DateTime>("LastModified")
|
||||||
|
.HasColumnType("timestamp with time zone")
|
||||||
|
.HasColumnName("last_modified");
|
||||||
|
|
||||||
|
b.Property<string>("LastName")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(64)
|
||||||
|
.HasColumnType("character varying(64)")
|
||||||
|
.HasColumnName("lastname");
|
||||||
|
|
||||||
|
b.Property<string>("Location")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasMaxLength(255)
|
||||||
|
.HasColumnType("character varying(255)")
|
||||||
|
.HasColumnName("location")
|
||||||
|
.HasDefaultValueSql("NULL");
|
||||||
|
|
||||||
|
b.Property<string>("MobilePhone")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasMaxLength(255)
|
||||||
|
.HasColumnType("character varying(255)")
|
||||||
|
.HasColumnName("phone")
|
||||||
|
.HasDefaultValueSql("NULL");
|
||||||
|
|
||||||
|
b.Property<int>("MobilePhoneActivation")
|
||||||
|
.HasColumnType("integer")
|
||||||
|
.HasColumnName("phone_activation");
|
||||||
|
|
||||||
|
b.Property<string>("Notes")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasMaxLength(512)
|
||||||
|
.HasColumnType("character varying(512)")
|
||||||
|
.HasColumnName("notes")
|
||||||
|
.HasDefaultValueSql("NULL");
|
||||||
|
|
||||||
|
b.Property<long>("QuotaLimit")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("bigint")
|
||||||
|
.HasColumnName("quota_limit")
|
||||||
|
.HasDefaultValueSql("'-1'");
|
||||||
|
|
||||||
|
b.Property<bool>("Removed")
|
||||||
|
.HasColumnType("boolean")
|
||||||
|
.HasColumnName("removed");
|
||||||
|
|
||||||
|
b.Property<bool?>("Sex")
|
||||||
|
.HasColumnType("boolean")
|
||||||
|
.HasColumnName("sex");
|
||||||
|
|
||||||
|
b.Property<string>("Sid")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasMaxLength(512)
|
||||||
|
.HasColumnType("character varying(512)")
|
||||||
|
.HasColumnName("sid")
|
||||||
|
.HasDefaultValueSql("NULL");
|
||||||
|
|
||||||
|
b.Property<string>("SsoNameId")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasMaxLength(512)
|
||||||
|
.HasColumnType("character varying(512)")
|
||||||
|
.HasColumnName("sso_name_id")
|
||||||
|
.HasDefaultValueSql("NULL");
|
||||||
|
|
||||||
|
b.Property<string>("SsoSessionId")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasMaxLength(512)
|
||||||
|
.HasColumnType("character varying(512)")
|
||||||
|
.HasColumnName("sso_session_id")
|
||||||
|
.HasDefaultValueSql("NULL");
|
||||||
|
|
||||||
|
b.Property<int>("Status")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("integer")
|
||||||
|
.HasColumnName("status")
|
||||||
|
.HasDefaultValueSql("1");
|
||||||
|
|
||||||
|
b.Property<int>("Tenant")
|
||||||
|
.HasColumnType("integer")
|
||||||
|
.HasColumnName("tenant");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("TerminatedDate")
|
||||||
|
.HasColumnType("timestamp with time zone")
|
||||||
|
.HasColumnName("terminateddate");
|
||||||
|
|
||||||
|
b.Property<string>("Title")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasMaxLength(64)
|
||||||
|
.HasColumnType("character varying(64)")
|
||||||
|
.HasColumnName("title")
|
||||||
|
.HasDefaultValueSql("NULL");
|
||||||
|
|
||||||
|
b.Property<string>("UserName")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(255)
|
||||||
|
.HasColumnType("character varying(255)")
|
||||||
|
.HasColumnName("username");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("WorkFromDate")
|
||||||
|
.HasColumnType("timestamp with time zone")
|
||||||
|
.HasColumnName("workfromdate");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("Email")
|
||||||
|
.HasDatabaseName("email");
|
||||||
|
|
||||||
|
b.HasIndex("LastModified")
|
||||||
|
.HasDatabaseName("last_modified_core_user");
|
||||||
|
|
||||||
|
b.HasIndex("UserName", "Tenant")
|
||||||
|
.HasDatabaseName("username");
|
||||||
|
|
||||||
|
b.ToTable("core_user", "onlyoffice");
|
||||||
|
|
||||||
|
b.HasData(
|
||||||
|
new
|
||||||
|
{
|
||||||
|
Id = new Guid("66faa6e4-f133-11ea-b126-00ffeec8b4ef"),
|
||||||
|
ActivationStatus = 0,
|
||||||
|
CreateDate = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
|
Email = "",
|
||||||
|
FirstName = "Administrator",
|
||||||
|
LastModified = new DateTime(2021, 3, 9, 9, 52, 55, 765, DateTimeKind.Utc).AddTicks(1420),
|
||||||
|
LastName = "",
|
||||||
|
MobilePhoneActivation = 0,
|
||||||
|
QuotaLimit = 0L,
|
||||||
|
Removed = false,
|
||||||
|
Status = 1,
|
||||||
|
Tenant = 1,
|
||||||
|
UserName = "administrator",
|
||||||
|
WorkFromDate = new DateTime(2021, 3, 9, 9, 52, 55, 764, DateTimeKind.Utc).AddTicks(9157)
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("ASC.Core.Common.EF.UserGroup", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Tenant")
|
||||||
|
.HasColumnType("integer")
|
||||||
|
.HasColumnName("tenant");
|
||||||
|
|
||||||
|
b.Property<Guid>("Userid")
|
||||||
|
.HasMaxLength(38)
|
||||||
|
.HasColumnType("uuid")
|
||||||
|
.HasColumnName("userid");
|
||||||
|
|
||||||
|
b.Property<Guid>("UserGroupId")
|
||||||
|
.HasMaxLength(38)
|
||||||
|
.HasColumnType("uuid")
|
||||||
|
.HasColumnName("groupid");
|
||||||
|
|
||||||
|
b.Property<int>("RefType")
|
||||||
|
.HasColumnType("integer")
|
||||||
|
.HasColumnName("ref_type");
|
||||||
|
|
||||||
|
b.Property<DateTime>("LastModified")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("timestamp with time zone")
|
||||||
|
.HasColumnName("last_modified")
|
||||||
|
.HasDefaultValueSql("CURRENT_TIMESTAMP");
|
||||||
|
|
||||||
|
b.Property<bool>("Removed")
|
||||||
|
.HasColumnType("boolean")
|
||||||
|
.HasColumnName("removed");
|
||||||
|
|
||||||
|
b.HasKey("Tenant", "Userid", "UserGroupId", "RefType")
|
||||||
|
.HasName("core_usergroup_pkey");
|
||||||
|
|
||||||
|
b.HasIndex("LastModified")
|
||||||
|
.HasDatabaseName("last_modified_core_usergroup");
|
||||||
|
|
||||||
|
b.ToTable("core_usergroup", "onlyoffice");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("ASC.MessagingSystem.EF.Model.AuditEvent", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("integer")
|
||||||
|
.HasColumnName("id")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
|
b.Property<int?>("Action")
|
||||||
|
.HasColumnType("integer")
|
||||||
|
.HasColumnName("action");
|
||||||
|
|
||||||
|
b.Property<string>("Browser")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasMaxLength(200)
|
||||||
|
.HasColumnType("character varying(200)")
|
||||||
|
.HasColumnName("browser")
|
||||||
|
.HasDefaultValueSql("NULL");
|
||||||
|
|
||||||
|
b.Property<DateTime>("Date")
|
||||||
|
.HasColumnType("timestamp with time zone")
|
||||||
|
.HasColumnName("date");
|
||||||
|
|
||||||
|
b.Property<string>("DescriptionRaw")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasMaxLength(20000)
|
||||||
|
.HasColumnType("character varying(20000)")
|
||||||
|
.HasColumnName("description")
|
||||||
|
.HasDefaultValueSql("NULL");
|
||||||
|
|
||||||
|
b.Property<string>("Initiator")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasMaxLength(200)
|
||||||
|
.HasColumnType("character varying(200)")
|
||||||
|
.HasColumnName("initiator")
|
||||||
|
.HasDefaultValueSql("NULL");
|
||||||
|
|
||||||
|
b.Property<string>("Ip")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasMaxLength(50)
|
||||||
|
.HasColumnType("character varying(50)")
|
||||||
|
.HasColumnName("ip")
|
||||||
|
.HasDefaultValueSql("NULL");
|
||||||
|
|
||||||
|
b.Property<string>("Page")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasMaxLength(300)
|
||||||
|
.HasColumnType("character varying(300)")
|
||||||
|
.HasColumnName("page")
|
||||||
|
.HasDefaultValueSql("NULL");
|
||||||
|
|
||||||
|
b.Property<string>("Platform")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasMaxLength(200)
|
||||||
|
.HasColumnType("character varying(200)")
|
||||||
|
.HasColumnName("platform")
|
||||||
|
.HasDefaultValueSql("NULL");
|
||||||
|
|
||||||
|
b.Property<string>("Target")
|
||||||
|
.HasColumnType("text")
|
||||||
|
.HasColumnName("target");
|
||||||
|
|
||||||
|
b.Property<int>("TenantId")
|
||||||
|
.HasColumnType("integer")
|
||||||
|
.HasColumnName("tenant_id");
|
||||||
|
|
||||||
|
b.Property<Guid?>("UserId")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasMaxLength(38)
|
||||||
|
.HasColumnType("uuid")
|
||||||
|
.HasColumnName("user_id")
|
||||||
|
.HasDefaultValueSql("NULL")
|
||||||
|
.IsFixedLength();
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("TenantId", "Date")
|
||||||
|
.HasDatabaseName("date");
|
||||||
|
|
||||||
|
b.ToTable("audit_events", "onlyoffice");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("ASC.MessagingSystem.EF.Model.LoginEvent", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("integer")
|
||||||
|
.HasColumnName("id")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
|
b.Property<int?>("Action")
|
||||||
|
.HasColumnType("integer")
|
||||||
|
.HasColumnName("action");
|
||||||
|
|
||||||
|
b.Property<bool>("Active")
|
||||||
|
.HasColumnType("boolean")
|
||||||
|
.HasColumnName("active");
|
||||||
|
|
||||||
|
b.Property<string>("Browser")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasMaxLength(200)
|
||||||
|
.HasColumnType("character varying(200)")
|
||||||
|
.HasColumnName("browser")
|
||||||
|
.HasDefaultValueSql("NULL::character varying");
|
||||||
|
|
||||||
|
b.Property<DateTime>("Date")
|
||||||
|
.HasColumnType("timestamp with time zone")
|
||||||
|
.HasColumnName("date");
|
||||||
|
|
||||||
|
b.Property<string>("DescriptionRaw")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasMaxLength(500)
|
||||||
|
.HasColumnType("character varying(500)")
|
||||||
|
.HasColumnName("description")
|
||||||
|
.HasDefaultValueSql("NULL");
|
||||||
|
|
||||||
|
b.Property<string>("Ip")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasMaxLength(50)
|
||||||
|
.HasColumnType("character varying(50)")
|
||||||
|
.HasColumnName("ip")
|
||||||
|
.HasDefaultValueSql("NULL");
|
||||||
|
|
||||||
|
b.Property<string>("Login")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasMaxLength(200)
|
||||||
|
.HasColumnType("character varying(200)")
|
||||||
|
.HasColumnName("login")
|
||||||
|
.HasDefaultValueSql("NULL");
|
||||||
|
|
||||||
|
b.Property<string>("Page")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasMaxLength(300)
|
||||||
|
.HasColumnType("character varying(300)")
|
||||||
|
.HasColumnName("page")
|
||||||
|
.HasDefaultValueSql("NULL");
|
||||||
|
|
||||||
|
b.Property<string>("Platform")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasMaxLength(200)
|
||||||
|
.HasColumnType("character varying(200)")
|
||||||
|
.HasColumnName("platform")
|
||||||
|
.HasDefaultValueSql("NULL");
|
||||||
|
|
||||||
|
b.Property<int>("TenantId")
|
||||||
|
.HasColumnType("integer")
|
||||||
|
.HasColumnName("tenant_id");
|
||||||
|
|
||||||
|
b.Property<Guid?>("UserId")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(38)
|
||||||
|
.HasColumnType("uuid")
|
||||||
|
.HasColumnName("user_id")
|
||||||
|
.IsFixedLength();
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("Date")
|
||||||
|
.HasDatabaseName("date_login_events");
|
||||||
|
|
||||||
|
b.HasIndex("UserId", "TenantId")
|
||||||
|
.HasDatabaseName("tenant_id_login_events");
|
||||||
|
|
||||||
|
b.ToTable("login_events", "onlyoffice");
|
||||||
|
});
|
||||||
|
#pragma warning restore 612, 618
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,206 @@
|
|||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace ASC.Migrations.PostgreSql.Migrations.Messages
|
||||||
|
{
|
||||||
|
public partial class MessagesContext_Upgrade1 : Migration
|
||||||
|
{
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "core_user",
|
||||||
|
schema: "onlyoffice",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
id = table.Column<Guid>(type: "uuid", maxLength: 38, nullable: false),
|
||||||
|
tenant = table.Column<int>(type: "integer", nullable: false),
|
||||||
|
username = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: false),
|
||||||
|
firstname = table.Column<string>(type: "character varying(64)", maxLength: 64, nullable: false),
|
||||||
|
lastname = table.Column<string>(type: "character varying(64)", maxLength: 64, nullable: false),
|
||||||
|
sex = table.Column<bool>(type: "boolean", nullable: true),
|
||||||
|
bithdate = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
|
||||||
|
status = table.Column<int>(type: "integer", nullable: false, defaultValueSql: "1"),
|
||||||
|
activation_status = table.Column<int>(type: "integer", nullable: false),
|
||||||
|
email = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: true, defaultValueSql: "NULL"),
|
||||||
|
workfromdate = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
|
||||||
|
terminateddate = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
|
||||||
|
title = table.Column<string>(type: "character varying(64)", maxLength: 64, nullable: true, defaultValueSql: "NULL"),
|
||||||
|
culture = table.Column<string>(type: "character varying(20)", maxLength: 20, nullable: true, defaultValueSql: "NULL"),
|
||||||
|
contacts = table.Column<string>(type: "character varying(1024)", maxLength: 1024, nullable: true, defaultValueSql: "NULL"),
|
||||||
|
phone = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: true, defaultValueSql: "NULL"),
|
||||||
|
phone_activation = table.Column<int>(type: "integer", nullable: false),
|
||||||
|
location = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: true, defaultValueSql: "NULL"),
|
||||||
|
notes = table.Column<string>(type: "character varying(512)", maxLength: 512, nullable: true, defaultValueSql: "NULL"),
|
||||||
|
sid = table.Column<string>(type: "character varying(512)", maxLength: 512, nullable: true, defaultValueSql: "NULL"),
|
||||||
|
sso_name_id = table.Column<string>(type: "character varying(512)", maxLength: 512, nullable: true, defaultValueSql: "NULL"),
|
||||||
|
sso_session_id = table.Column<string>(type: "character varying(512)", maxLength: 512, nullable: true, defaultValueSql: "NULL"),
|
||||||
|
removed = table.Column<bool>(type: "boolean", nullable: false),
|
||||||
|
create_on = table.Column<DateTime>(type: "timestamp with time zone", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP"),
|
||||||
|
last_modified = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
||||||
|
quota_limit = table.Column<long>(type: "bigint", nullable: false, defaultValueSql: "'-1'")
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_core_user", x => x.id);
|
||||||
|
});
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "core_usergroup",
|
||||||
|
schema: "onlyoffice",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
tenant = table.Column<int>(type: "integer", nullable: false),
|
||||||
|
userid = table.Column<Guid>(type: "uuid", maxLength: 38, nullable: false),
|
||||||
|
groupid = table.Column<Guid>(type: "uuid", maxLength: 38, nullable: false),
|
||||||
|
ref_type = table.Column<int>(type: "integer", nullable: false),
|
||||||
|
removed = table.Column<bool>(type: "boolean", nullable: false),
|
||||||
|
last_modified = table.Column<DateTime>(type: "timestamp with time zone", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP")
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("core_usergroup_pkey", x => new { x.tenant, x.userid, x.groupid, x.ref_type });
|
||||||
|
});
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "tenants_tenants",
|
||||||
|
schema: "onlyoffice",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
id = table.Column<int>(type: "integer", nullable: false)
|
||||||
|
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||||
|
name = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: false),
|
||||||
|
alias = table.Column<string>(type: "character varying(100)", maxLength: 100, nullable: false),
|
||||||
|
mappeddomain = table.Column<string>(type: "character varying(100)", maxLength: 100, nullable: true, defaultValueSql: "NULL"),
|
||||||
|
version = table.Column<int>(type: "integer", nullable: false, defaultValueSql: "2"),
|
||||||
|
version_changed = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
|
||||||
|
language = table.Column<string>(type: "character(10)", fixedLength: true, maxLength: 10, nullable: false, defaultValueSql: "'en-US'"),
|
||||||
|
timezone = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true, defaultValueSql: "NULL"),
|
||||||
|
trusteddomains = table.Column<string>(type: "character varying(1024)", maxLength: 1024, nullable: true, defaultValueSql: "NULL"),
|
||||||
|
trusteddomainsenabled = table.Column<int>(type: "integer", nullable: false, defaultValueSql: "1"),
|
||||||
|
status = table.Column<int>(type: "integer", nullable: false),
|
||||||
|
statuschanged = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
|
||||||
|
creationdatetime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
||||||
|
owner_id = table.Column<Guid>(type: "uuid", maxLength: 38, nullable: true, defaultValueSql: "NULL"),
|
||||||
|
payment_id = table.Column<string>(type: "character varying(38)", maxLength: 38, nullable: true, defaultValueSql: "NULL"),
|
||||||
|
industry = table.Column<int>(type: "integer", nullable: false),
|
||||||
|
last_modified = table.Column<DateTime>(type: "timestamp with time zone", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP"),
|
||||||
|
spam = table.Column<bool>(type: "boolean", nullable: false, defaultValueSql: "true"),
|
||||||
|
calls = table.Column<bool>(type: "boolean", nullable: false, defaultValueSql: "true")
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_tenants_tenants", x => x.id);
|
||||||
|
});
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "webstudio_settings",
|
||||||
|
schema: "onlyoffice",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
TenantID = table.Column<int>(type: "integer", nullable: false),
|
||||||
|
ID = table.Column<Guid>(type: "uuid", maxLength: 64, nullable: false),
|
||||||
|
UserID = table.Column<Guid>(type: "uuid", maxLength: 64, nullable: false),
|
||||||
|
Data = table.Column<string>(type: "text", nullable: false)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("webstudio_settings_pkey", x => new { x.TenantID, x.ID, x.UserID });
|
||||||
|
});
|
||||||
|
|
||||||
|
migrationBuilder.InsertData(
|
||||||
|
schema: "onlyoffice",
|
||||||
|
table: "core_user",
|
||||||
|
columns: new[] { "id", "activation_status", "bithdate", "create_on", "email", "firstname", "last_modified", "lastname", "phone_activation", "removed", "sex", "status", "tenant", "terminateddate", "username", "workfromdate" },
|
||||||
|
values: new object[] { new Guid("66faa6e4-f133-11ea-b126-00ffeec8b4ef"), 0, null, new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), "", "Administrator", new DateTime(2021, 3, 9, 9, 52, 55, 765, DateTimeKind.Utc).AddTicks(1420), "", 0, false, null, 1, 1, null, "administrator", new DateTime(2021, 3, 9, 9, 52, 55, 764, DateTimeKind.Utc).AddTicks(9157) });
|
||||||
|
|
||||||
|
migrationBuilder.InsertData(
|
||||||
|
schema: "onlyoffice",
|
||||||
|
table: "tenants_tenants",
|
||||||
|
columns: new[] { "id", "alias", "creationdatetime", "industry", "last_modified", "name", "owner_id", "status", "statuschanged", "version_changed" },
|
||||||
|
values: new object[] { 1, "localhost", new DateTime(2021, 3, 9, 17, 46, 59, 97, DateTimeKind.Utc).AddTicks(4317), 0, new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), "Web Office", new Guid("66faa6e4-f133-11ea-b126-00ffeec8b4ef"), 0, null, null });
|
||||||
|
|
||||||
|
migrationBuilder.InsertData(
|
||||||
|
schema: "onlyoffice",
|
||||||
|
table: "webstudio_settings",
|
||||||
|
columns: new[] { "ID", "TenantID", "UserID", "Data" },
|
||||||
|
values: new object[] { new Guid("9a925891-1f92-4ed7-b277-d6f649739f06"), 1, new Guid("00000000-0000-0000-0000-000000000000"), "{\"Completed\":false}" });
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "email",
|
||||||
|
schema: "onlyoffice",
|
||||||
|
table: "core_user",
|
||||||
|
column: "email");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "last_modified_core_user",
|
||||||
|
schema: "onlyoffice",
|
||||||
|
table: "core_user",
|
||||||
|
column: "last_modified");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "username",
|
||||||
|
schema: "onlyoffice",
|
||||||
|
table: "core_user",
|
||||||
|
columns: new[] { "username", "tenant" });
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "last_modified_core_usergroup",
|
||||||
|
schema: "onlyoffice",
|
||||||
|
table: "core_usergroup",
|
||||||
|
column: "last_modified");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "alias",
|
||||||
|
schema: "onlyoffice",
|
||||||
|
table: "tenants_tenants",
|
||||||
|
column: "alias",
|
||||||
|
unique: true);
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "last_modified_tenants_tenants",
|
||||||
|
schema: "onlyoffice",
|
||||||
|
table: "tenants_tenants",
|
||||||
|
column: "last_modified");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "mappeddomain",
|
||||||
|
schema: "onlyoffice",
|
||||||
|
table: "tenants_tenants",
|
||||||
|
column: "mappeddomain");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "version",
|
||||||
|
schema: "onlyoffice",
|
||||||
|
table: "tenants_tenants",
|
||||||
|
column: "version");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "ID",
|
||||||
|
schema: "onlyoffice",
|
||||||
|
table: "webstudio_settings",
|
||||||
|
column: "ID");
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "core_user",
|
||||||
|
schema: "onlyoffice");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "core_usergroup",
|
||||||
|
schema: "onlyoffice");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "tenants_tenants",
|
||||||
|
schema: "onlyoffice");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "webstudio_settings",
|
||||||
|
schema: "onlyoffice");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -21,6 +21,415 @@ namespace ASC.Migrations.PostgreSql.Migrations
|
|||||||
.HasAnnotation("ProductVersion", "6.0.7")
|
.HasAnnotation("ProductVersion", "6.0.7")
|
||||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||||
|
|
||||||
|
modelBuilder.Entity("ASC.Core.Common.EF.Model.DbTenant", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("integer")
|
||||||
|
.HasColumnName("id")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
|
b.Property<string>("Alias")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(100)
|
||||||
|
.HasColumnType("character varying(100)")
|
||||||
|
.HasColumnName("alias");
|
||||||
|
|
||||||
|
b.Property<bool>("Calls")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("boolean")
|
||||||
|
.HasColumnName("calls")
|
||||||
|
.HasDefaultValueSql("true");
|
||||||
|
|
||||||
|
b.Property<DateTime>("CreationDateTime")
|
||||||
|
.HasColumnType("timestamp with time zone")
|
||||||
|
.HasColumnName("creationdatetime");
|
||||||
|
|
||||||
|
b.Property<int>("Industry")
|
||||||
|
.HasColumnType("integer")
|
||||||
|
.HasColumnName("industry");
|
||||||
|
|
||||||
|
b.Property<string>("Language")
|
||||||
|
.IsRequired()
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasMaxLength(10)
|
||||||
|
.HasColumnType("character(10)")
|
||||||
|
.HasColumnName("language")
|
||||||
|
.HasDefaultValueSql("'en-US'")
|
||||||
|
.IsFixedLength();
|
||||||
|
|
||||||
|
b.Property<DateTime>("LastModified")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("timestamp with time zone")
|
||||||
|
.HasColumnName("last_modified")
|
||||||
|
.HasDefaultValueSql("CURRENT_TIMESTAMP");
|
||||||
|
|
||||||
|
b.Property<string>("MappedDomain")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasMaxLength(100)
|
||||||
|
.HasColumnType("character varying(100)")
|
||||||
|
.HasColumnName("mappeddomain")
|
||||||
|
.HasDefaultValueSql("NULL");
|
||||||
|
|
||||||
|
b.Property<string>("Name")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(255)
|
||||||
|
.HasColumnType("character varying(255)")
|
||||||
|
.HasColumnName("name");
|
||||||
|
|
||||||
|
b.Property<Guid?>("OwnerId")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasMaxLength(38)
|
||||||
|
.HasColumnType("uuid")
|
||||||
|
.HasColumnName("owner_id")
|
||||||
|
.HasDefaultValueSql("NULL");
|
||||||
|
|
||||||
|
b.Property<string>("PaymentId")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasMaxLength(38)
|
||||||
|
.HasColumnType("character varying(38)")
|
||||||
|
.HasColumnName("payment_id")
|
||||||
|
.HasDefaultValueSql("NULL");
|
||||||
|
|
||||||
|
b.Property<bool>("Spam")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("boolean")
|
||||||
|
.HasColumnName("spam")
|
||||||
|
.HasDefaultValueSql("true");
|
||||||
|
|
||||||
|
b.Property<int>("Status")
|
||||||
|
.HasColumnType("integer")
|
||||||
|
.HasColumnName("status");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("StatusChanged")
|
||||||
|
.HasColumnType("timestamp with time zone")
|
||||||
|
.HasColumnName("statuschanged");
|
||||||
|
|
||||||
|
b.Property<string>("TimeZone")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasMaxLength(50)
|
||||||
|
.HasColumnType("character varying(50)")
|
||||||
|
.HasColumnName("timezone")
|
||||||
|
.HasDefaultValueSql("NULL");
|
||||||
|
|
||||||
|
b.Property<int>("TrustedDomainsEnabled")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("integer")
|
||||||
|
.HasColumnName("trusteddomainsenabled")
|
||||||
|
.HasDefaultValueSql("1");
|
||||||
|
|
||||||
|
b.Property<string>("TrustedDomainsRaw")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasMaxLength(1024)
|
||||||
|
.HasColumnType("character varying(1024)")
|
||||||
|
.HasColumnName("trusteddomains")
|
||||||
|
.HasDefaultValueSql("NULL");
|
||||||
|
|
||||||
|
b.Property<int>("Version")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("integer")
|
||||||
|
.HasColumnName("version")
|
||||||
|
.HasDefaultValueSql("2");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("Version_Changed")
|
||||||
|
.HasColumnType("timestamp with time zone")
|
||||||
|
.HasColumnName("version_changed");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("Alias")
|
||||||
|
.IsUnique()
|
||||||
|
.HasDatabaseName("alias");
|
||||||
|
|
||||||
|
b.HasIndex("LastModified")
|
||||||
|
.HasDatabaseName("last_modified_tenants_tenants");
|
||||||
|
|
||||||
|
b.HasIndex("MappedDomain")
|
||||||
|
.HasDatabaseName("mappeddomain");
|
||||||
|
|
||||||
|
b.HasIndex("Version")
|
||||||
|
.HasDatabaseName("version");
|
||||||
|
|
||||||
|
b.ToTable("tenants_tenants", "onlyoffice");
|
||||||
|
|
||||||
|
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 = new Guid("66faa6e4-f133-11ea-b126-00ffeec8b4ef"),
|
||||||
|
Spam = false,
|
||||||
|
Status = 0,
|
||||||
|
TrustedDomainsEnabled = 0,
|
||||||
|
Version = 0
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("ASC.Core.Common.EF.Model.DbWebstudioSettings", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("TenantId")
|
||||||
|
.HasColumnType("integer")
|
||||||
|
.HasColumnName("TenantID");
|
||||||
|
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.HasMaxLength(64)
|
||||||
|
.HasColumnType("uuid")
|
||||||
|
.HasColumnName("ID");
|
||||||
|
|
||||||
|
b.Property<Guid>("UserId")
|
||||||
|
.HasMaxLength(64)
|
||||||
|
.HasColumnType("uuid")
|
||||||
|
.HasColumnName("UserID");
|
||||||
|
|
||||||
|
b.Property<string>("Data")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.HasKey("TenantId", "Id", "UserId")
|
||||||
|
.HasName("webstudio_settings_pkey");
|
||||||
|
|
||||||
|
b.HasIndex("Id")
|
||||||
|
.HasDatabaseName("ID");
|
||||||
|
|
||||||
|
b.ToTable("webstudio_settings", "onlyoffice");
|
||||||
|
|
||||||
|
b.HasData(
|
||||||
|
new
|
||||||
|
{
|
||||||
|
TenantId = 1,
|
||||||
|
Id = new Guid("9a925891-1f92-4ed7-b277-d6f649739f06"),
|
||||||
|
UserId = new Guid("00000000-0000-0000-0000-000000000000"),
|
||||||
|
Data = "{\"Completed\":false}"
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("ASC.Core.Common.EF.User", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasMaxLength(38)
|
||||||
|
.HasColumnType("uuid")
|
||||||
|
.HasColumnName("id");
|
||||||
|
|
||||||
|
b.Property<int>("ActivationStatus")
|
||||||
|
.HasColumnType("integer")
|
||||||
|
.HasColumnName("activation_status");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("BirthDate")
|
||||||
|
.HasColumnType("timestamp with time zone")
|
||||||
|
.HasColumnName("bithdate");
|
||||||
|
|
||||||
|
b.Property<string>("Contacts")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasMaxLength(1024)
|
||||||
|
.HasColumnType("character varying(1024)")
|
||||||
|
.HasColumnName("contacts")
|
||||||
|
.HasDefaultValueSql("NULL");
|
||||||
|
|
||||||
|
b.Property<DateTime>("CreateDate")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("timestamp with time zone")
|
||||||
|
.HasColumnName("create_on")
|
||||||
|
.HasDefaultValueSql("CURRENT_TIMESTAMP");
|
||||||
|
|
||||||
|
b.Property<string>("CultureName")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasMaxLength(20)
|
||||||
|
.HasColumnType("character varying(20)")
|
||||||
|
.HasColumnName("culture")
|
||||||
|
.HasDefaultValueSql("NULL");
|
||||||
|
|
||||||
|
b.Property<string>("Email")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasMaxLength(255)
|
||||||
|
.HasColumnType("character varying(255)")
|
||||||
|
.HasColumnName("email")
|
||||||
|
.HasDefaultValueSql("NULL");
|
||||||
|
|
||||||
|
b.Property<string>("FirstName")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(64)
|
||||||
|
.HasColumnType("character varying(64)")
|
||||||
|
.HasColumnName("firstname");
|
||||||
|
|
||||||
|
b.Property<DateTime>("LastModified")
|
||||||
|
.HasColumnType("timestamp with time zone")
|
||||||
|
.HasColumnName("last_modified");
|
||||||
|
|
||||||
|
b.Property<string>("LastName")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(64)
|
||||||
|
.HasColumnType("character varying(64)")
|
||||||
|
.HasColumnName("lastname");
|
||||||
|
|
||||||
|
b.Property<string>("Location")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasMaxLength(255)
|
||||||
|
.HasColumnType("character varying(255)")
|
||||||
|
.HasColumnName("location")
|
||||||
|
.HasDefaultValueSql("NULL");
|
||||||
|
|
||||||
|
b.Property<string>("MobilePhone")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasMaxLength(255)
|
||||||
|
.HasColumnType("character varying(255)")
|
||||||
|
.HasColumnName("phone")
|
||||||
|
.HasDefaultValueSql("NULL");
|
||||||
|
|
||||||
|
b.Property<int>("MobilePhoneActivation")
|
||||||
|
.HasColumnType("integer")
|
||||||
|
.HasColumnName("phone_activation");
|
||||||
|
|
||||||
|
b.Property<string>("Notes")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasMaxLength(512)
|
||||||
|
.HasColumnType("character varying(512)")
|
||||||
|
.HasColumnName("notes")
|
||||||
|
.HasDefaultValueSql("NULL");
|
||||||
|
|
||||||
|
b.Property<long>("QuotaLimit")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("bigint")
|
||||||
|
.HasColumnName("quota_limit")
|
||||||
|
.HasDefaultValueSql("'-1'");
|
||||||
|
|
||||||
|
b.Property<bool>("Removed")
|
||||||
|
.HasColumnType("boolean")
|
||||||
|
.HasColumnName("removed");
|
||||||
|
|
||||||
|
b.Property<bool?>("Sex")
|
||||||
|
.HasColumnType("boolean")
|
||||||
|
.HasColumnName("sex");
|
||||||
|
|
||||||
|
b.Property<string>("Sid")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasMaxLength(512)
|
||||||
|
.HasColumnType("character varying(512)")
|
||||||
|
.HasColumnName("sid")
|
||||||
|
.HasDefaultValueSql("NULL");
|
||||||
|
|
||||||
|
b.Property<string>("SsoNameId")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasMaxLength(512)
|
||||||
|
.HasColumnType("character varying(512)")
|
||||||
|
.HasColumnName("sso_name_id")
|
||||||
|
.HasDefaultValueSql("NULL");
|
||||||
|
|
||||||
|
b.Property<string>("SsoSessionId")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasMaxLength(512)
|
||||||
|
.HasColumnType("character varying(512)")
|
||||||
|
.HasColumnName("sso_session_id")
|
||||||
|
.HasDefaultValueSql("NULL");
|
||||||
|
|
||||||
|
b.Property<int>("Status")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("integer")
|
||||||
|
.HasColumnName("status")
|
||||||
|
.HasDefaultValueSql("1");
|
||||||
|
|
||||||
|
b.Property<int>("Tenant")
|
||||||
|
.HasColumnType("integer")
|
||||||
|
.HasColumnName("tenant");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("TerminatedDate")
|
||||||
|
.HasColumnType("timestamp with time zone")
|
||||||
|
.HasColumnName("terminateddate");
|
||||||
|
|
||||||
|
b.Property<string>("Title")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasMaxLength(64)
|
||||||
|
.HasColumnType("character varying(64)")
|
||||||
|
.HasColumnName("title")
|
||||||
|
.HasDefaultValueSql("NULL");
|
||||||
|
|
||||||
|
b.Property<string>("UserName")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(255)
|
||||||
|
.HasColumnType("character varying(255)")
|
||||||
|
.HasColumnName("username");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("WorkFromDate")
|
||||||
|
.HasColumnType("timestamp with time zone")
|
||||||
|
.HasColumnName("workfromdate");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("Email")
|
||||||
|
.HasDatabaseName("email");
|
||||||
|
|
||||||
|
b.HasIndex("LastModified")
|
||||||
|
.HasDatabaseName("last_modified_core_user");
|
||||||
|
|
||||||
|
b.HasIndex("UserName", "Tenant")
|
||||||
|
.HasDatabaseName("username");
|
||||||
|
|
||||||
|
b.ToTable("core_user", "onlyoffice");
|
||||||
|
|
||||||
|
b.HasData(
|
||||||
|
new
|
||||||
|
{
|
||||||
|
Id = new Guid("66faa6e4-f133-11ea-b126-00ffeec8b4ef"),
|
||||||
|
ActivationStatus = 0,
|
||||||
|
CreateDate = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
|
Email = "",
|
||||||
|
FirstName = "Administrator",
|
||||||
|
LastModified = new DateTime(2021, 3, 9, 9, 52, 55, 765, DateTimeKind.Utc).AddTicks(1420),
|
||||||
|
LastName = "",
|
||||||
|
MobilePhoneActivation = 0,
|
||||||
|
QuotaLimit = 0L,
|
||||||
|
Removed = false,
|
||||||
|
Status = 1,
|
||||||
|
Tenant = 1,
|
||||||
|
UserName = "administrator",
|
||||||
|
WorkFromDate = new DateTime(2021, 3, 9, 9, 52, 55, 764, DateTimeKind.Utc).AddTicks(9157)
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("ASC.Core.Common.EF.UserGroup", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Tenant")
|
||||||
|
.HasColumnType("integer")
|
||||||
|
.HasColumnName("tenant");
|
||||||
|
|
||||||
|
b.Property<Guid>("Userid")
|
||||||
|
.HasMaxLength(38)
|
||||||
|
.HasColumnType("uuid")
|
||||||
|
.HasColumnName("userid");
|
||||||
|
|
||||||
|
b.Property<Guid>("UserGroupId")
|
||||||
|
.HasMaxLength(38)
|
||||||
|
.HasColumnType("uuid")
|
||||||
|
.HasColumnName("groupid");
|
||||||
|
|
||||||
|
b.Property<int>("RefType")
|
||||||
|
.HasColumnType("integer")
|
||||||
|
.HasColumnName("ref_type");
|
||||||
|
|
||||||
|
b.Property<DateTime>("LastModified")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("timestamp with time zone")
|
||||||
|
.HasColumnName("last_modified")
|
||||||
|
.HasDefaultValueSql("CURRENT_TIMESTAMP");
|
||||||
|
|
||||||
|
b.Property<bool>("Removed")
|
||||||
|
.HasColumnType("boolean")
|
||||||
|
.HasColumnName("removed");
|
||||||
|
|
||||||
|
b.HasKey("Tenant", "Userid", "UserGroupId", "RefType")
|
||||||
|
.HasName("core_usergroup_pkey");
|
||||||
|
|
||||||
|
b.HasIndex("LastModified")
|
||||||
|
.HasDatabaseName("last_modified_core_usergroup");
|
||||||
|
|
||||||
|
b.ToTable("core_usergroup", "onlyoffice");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("ASC.MessagingSystem.EF.Model.AuditEvent", b =>
|
modelBuilder.Entity("ASC.MessagingSystem.EF.Model.AuditEvent", b =>
|
||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,28 +1,28 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
namespace ASC.Migrations.PostgreSql.Migrations.UserDb
|
namespace ASC.Migrations.PostgreSql.Migrations.UserDb
|
||||||
{
|
{
|
||||||
public partial class UserDbContext_Upgrade1 : Migration
|
public partial class UserDbContext_Upgrade1 : Migration
|
||||||
{
|
{
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
{
|
{
|
||||||
migrationBuilder.AddColumn<string>(
|
migrationBuilder.AddColumn<long>(
|
||||||
name: "quota_limit",
|
name: "quota_limit",
|
||||||
schema: "onlyoffice",
|
schema: "onlyoffice",
|
||||||
table: "core_user",
|
table: "core_user",
|
||||||
type: "text",
|
type: "bigint",
|
||||||
nullable: true,
|
nullable: false,
|
||||||
defaultValueSql: "'0'");
|
defaultValueSql: "'-1'");
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
{
|
{
|
||||||
migrationBuilder.DropColumn(
|
migrationBuilder.DropColumn(
|
||||||
name: "quota_limit",
|
name: "quota_limit",
|
||||||
schema: "onlyoffice",
|
schema: "onlyoffice",
|
||||||
table: "core_user");
|
table: "core_user");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1245,11 +1245,11 @@ namespace ASC.Migrations.PostgreSql.Migrations
|
|||||||
.HasColumnName("notes")
|
.HasColumnName("notes")
|
||||||
.HasDefaultValueSql("NULL");
|
.HasDefaultValueSql("NULL");
|
||||||
|
|
||||||
b.Property<string>("QuotaLimit")
|
b.Property<long>("QuotaLimit")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("text")
|
.HasColumnType("bigint")
|
||||||
.HasColumnName("quota_limit")
|
.HasColumnName("quota_limit")
|
||||||
.HasDefaultValueSql("'0'");
|
.HasDefaultValueSql("'-1'");
|
||||||
|
|
||||||
b.Property<bool>("Removed")
|
b.Property<bool>("Removed")
|
||||||
.HasColumnType("boolean")
|
.HasColumnType("boolean")
|
||||||
@ -1335,6 +1335,7 @@ namespace ASC.Migrations.PostgreSql.Migrations
|
|||||||
LastModified = new DateTime(2021, 3, 9, 9, 52, 55, 765, DateTimeKind.Utc).AddTicks(1420),
|
LastModified = new DateTime(2021, 3, 9, 9, 52, 55, 765, DateTimeKind.Utc).AddTicks(1420),
|
||||||
LastName = "",
|
LastName = "",
|
||||||
MobilePhoneActivation = 0,
|
MobilePhoneActivation = 0,
|
||||||
|
QuotaLimit = 0L,
|
||||||
Removed = false,
|
Removed = false,
|
||||||
Status = 1,
|
Status = 1,
|
||||||
Tenant = 1,
|
Tenant = 1,
|
||||||
|
Loading…
Reference in New Issue
Block a user