Fixed migrations

This commit is contained in:
pavelbannov 2021-03-26 12:26:57 +03:00
parent 65e1c72c01
commit a0570554dd
9 changed files with 4 additions and 234 deletions

View File

@ -247,48 +247,6 @@ namespace ASC.Core.Common.Migrations.MySql.MessagesContextMySql
});
});
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")
.HasCharSet("utf8");
b.Property<string>("UserId")
.HasColumnType("varchar(64)")
.HasColumnName("UserID")
.UseCollation("utf8_general_ci")
.HasCharSet("utf8");
b.Property<string>("Data")
.IsRequired()
.HasColumnType("mediumtext")
.UseCollation("utf8_general_ci")
.HasCharSet("utf8");
b.HasKey("TenantId", "Id", "UserId")
.HasName("PRIMARY");
b.HasIndex("Id")
.HasDatabaseName("ID");
b.ToTable("webstudio_settings");
b.HasData(
new
{
TenantId = 1,
Id = "9a925891-1f92-4ed7-b277-d6f649739f06",
UserId = "00000000-0000-0000-0000-000000000000",
Data = "{'Completed':false}"
});
});
modelBuilder.Entity("ASC.Core.Common.EF.Model.LoginEvents", b =>
{
b.Property<int>("Id")

View File

@ -1,4 +1,5 @@
using System;
using System;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
@ -68,28 +69,6 @@ namespace ASC.Core.Common.Migrations.MySql.MessagesContextMySql
table.PrimaryKey("PK_login_events", x => x.id);
});
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 });
});
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: "date",
table: "audit_events",
@ -104,11 +83,6 @@ namespace ASC.Core.Common.Migrations.MySql.MessagesContextMySql
name: "tenant_id",
table: "login_events",
columns: new[] { "tenant_id", "user_id" });
migrationBuilder.CreateIndex(
name: "ID",
table: "webstudio_settings",
column: "ID");
}
protected override void Down(MigrationBuilder migrationBuilder)
@ -118,9 +92,6 @@ namespace ASC.Core.Common.Migrations.MySql.MessagesContextMySql
migrationBuilder.DropTable(
name: "login_events");
migrationBuilder.DropTable(
name: "webstudio_settings");
}
}
}

View File

@ -245,48 +245,6 @@ namespace ASC.Core.Common.Migrations.MySql.MessagesContextMySql
});
});
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")
.HasCharSet("utf8");
b.Property<string>("UserId")
.HasColumnType("varchar(64)")
.HasColumnName("UserID")
.UseCollation("utf8_general_ci")
.HasCharSet("utf8");
b.Property<string>("Data")
.IsRequired()
.HasColumnType("mediumtext")
.UseCollation("utf8_general_ci")
.HasCharSet("utf8");
b.HasKey("TenantId", "Id", "UserId")
.HasName("PRIMARY");
b.HasIndex("Id")
.HasDatabaseName("ID");
b.ToTable("webstudio_settings");
b.HasData(
new
{
TenantId = 1,
Id = "9a925891-1f92-4ed7-b277-d6f649739f06",
UserId = "00000000-0000-0000-0000-000000000000",
Data = "{'Completed':false}"
});
});
modelBuilder.Entity("ASC.Core.Common.EF.Model.LoginEvents", b =>
{
b.Property<int>("Id")

View File

@ -122,38 +122,6 @@ namespace ASC.Core.Common.Migrations.MySql.WebstudioDbContextMySql
.HasDatabaseName("visitdate");
b.ToTable("webstudio_uservisit");
b.HasData(
new
{
TenantId = 1,
VisitDate = new DateTime(2021, 3, 9, 10, 3, 42, 561, DateTimeKind.Utc).AddTicks(7735),
ProductId = "00000000-0000-0000-0000-000000000000",
UserId = "66faa6e4-f133-11ea-b126-00ffeec8b4ef",
FirstVisitTime = new DateTime(2021, 3, 9, 10, 3, 42, 562, DateTimeKind.Utc).AddTicks(1507),
LastVisitTime = new DateTime(2021, 3, 9, 10, 3, 42, 562, DateTimeKind.Utc).AddTicks(2187),
VisitCount = 3
},
new
{
TenantId = 1,
VisitDate = new DateTime(2021, 3, 9, 10, 3, 42, 562, DateTimeKind.Utc).AddTicks(2849),
ProductId = "00000000-0000-0000-0000-000000000000",
UserId = "66faa6e4-f133-11ea-b126-00ffeec8b4ef",
FirstVisitTime = new DateTime(2021, 3, 9, 10, 3, 42, 562, DateTimeKind.Utc).AddTicks(2872),
LastVisitTime = new DateTime(2021, 3, 9, 10, 3, 42, 562, DateTimeKind.Utc).AddTicks(2874),
VisitCount = 2
},
new
{
TenantId = 1,
VisitDate = new DateTime(2021, 3, 9, 10, 3, 42, 562, DateTimeKind.Utc).AddTicks(2876),
ProductId = "e67be73d-f9ae-4ce1-8fec-1880cb518cb4",
UserId = "66faa6e4-f133-11ea-b126-00ffeec8b4ef",
FirstVisitTime = new DateTime(2021, 3, 9, 10, 3, 42, 562, DateTimeKind.Utc).AddTicks(2882),
LastVisitTime = new DateTime(2021, 3, 9, 10, 3, 42, 562, DateTimeKind.Utc).AddTicks(2883),
VisitCount = 1
});
});
#pragma warning restore 612, 618
}

View File

@ -1,4 +1,5 @@
using System;
using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace ASC.Core.Common.Migrations.MySql.WebstudioDbContextMySql
@ -61,16 +62,6 @@ namespace ASC.Core.Common.Migrations.MySql.WebstudioDbContextMySql
columns: new[] { "ID", "TenantID", "UserID", "Data" },
values: new object[] { "9a925891-1f92-4ed7-b277-d6f649739f06", 1, "00000000-0000-0000-0000-000000000000", "{'Completed':false}" });
migrationBuilder.InsertData(
table: "webstudio_uservisit",
columns: new[] { "productid", "tenantid", "userid", "visitdate", "firstvisittime", "lastvisittime", "visitcount" },
values: new object[,]
{
{ "00000000-0000-0000-0000-000000000000", 1, "66faa6e4-f133-11ea-b126-00ffeec8b4ef", new DateTime(2021, 3, 9, 10, 3, 42, 561, DateTimeKind.Utc).AddTicks(7735), new DateTime(2021, 3, 9, 10, 3, 42, 562, DateTimeKind.Utc).AddTicks(1507), new DateTime(2021, 3, 9, 10, 3, 42, 562, DateTimeKind.Utc).AddTicks(2187), 3 },
{ "00000000-0000-0000-0000-000000000000", 1, "66faa6e4-f133-11ea-b126-00ffeec8b4ef", new DateTime(2021, 3, 9, 10, 3, 42, 562, DateTimeKind.Utc).AddTicks(2849), new DateTime(2021, 3, 9, 10, 3, 42, 562, DateTimeKind.Utc).AddTicks(2872), new DateTime(2021, 3, 9, 10, 3, 42, 562, DateTimeKind.Utc).AddTicks(2874), 2 },
{ "e67be73d-f9ae-4ce1-8fec-1880cb518cb4", 1, "66faa6e4-f133-11ea-b126-00ffeec8b4ef", new DateTime(2021, 3, 9, 10, 3, 42, 562, DateTimeKind.Utc).AddTicks(2876), new DateTime(2021, 3, 9, 10, 3, 42, 562, DateTimeKind.Utc).AddTicks(2882), new DateTime(2021, 3, 9, 10, 3, 42, 562, DateTimeKind.Utc).AddTicks(2883), 1 }
});
migrationBuilder.CreateIndex(
name: "ID",
table: "webstudio_settings",

View File

@ -120,38 +120,6 @@ namespace ASC.Core.Common.Migrations.MySql.WebstudioDbContextMySql
.HasDatabaseName("visitdate");
b.ToTable("webstudio_uservisit");
b.HasData(
new
{
TenantId = 1,
VisitDate = new DateTime(2021, 3, 9, 10, 3, 42, 561, DateTimeKind.Utc).AddTicks(7735),
ProductId = "00000000-0000-0000-0000-000000000000",
UserId = "66faa6e4-f133-11ea-b126-00ffeec8b4ef",
FirstVisitTime = new DateTime(2021, 3, 9, 10, 3, 42, 562, DateTimeKind.Utc).AddTicks(1507),
LastVisitTime = new DateTime(2021, 3, 9, 10, 3, 42, 562, DateTimeKind.Utc).AddTicks(2187),
VisitCount = 3
},
new
{
TenantId = 1,
VisitDate = new DateTime(2021, 3, 9, 10, 3, 42, 562, DateTimeKind.Utc).AddTicks(2849),
ProductId = "00000000-0000-0000-0000-000000000000",
UserId = "66faa6e4-f133-11ea-b126-00ffeec8b4ef",
FirstVisitTime = new DateTime(2021, 3, 9, 10, 3, 42, 562, DateTimeKind.Utc).AddTicks(2872),
LastVisitTime = new DateTime(2021, 3, 9, 10, 3, 42, 562, DateTimeKind.Utc).AddTicks(2874),
VisitCount = 2
},
new
{
TenantId = 1,
VisitDate = new DateTime(2021, 3, 9, 10, 3, 42, 562, DateTimeKind.Utc).AddTicks(2876),
ProductId = "e67be73d-f9ae-4ce1-8fec-1880cb518cb4",
UserId = "66faa6e4-f133-11ea-b126-00ffeec8b4ef",
FirstVisitTime = new DateTime(2021, 3, 9, 10, 3, 42, 562, DateTimeKind.Utc).AddTicks(2882),
LastVisitTime = new DateTime(2021, 3, 9, 10, 3, 42, 562, DateTimeKind.Utc).AddTicks(2883),
VisitCount = 1
});
});
#pragma warning restore 612, 618
}

View File

@ -271,35 +271,6 @@ namespace ASC.Core.Common.Migrations.Npgsql.MessagesContextNpgsql
b.ToTable("tenants_partners");
});
modelBuilder.Entity("ASC.Core.Common.EF.Model.DbWebstudioSettings", b =>
{
b.Property<int>("TenantId")
.HasColumnName("TenantID")
.HasColumnType("integer");
b.Property<Guid>("Id")
.HasColumnName("ID")
.HasColumnType("uuid")
.HasMaxLength(64);
b.Property<Guid>("UserId")
.HasColumnName("UserID")
.HasColumnType("uuid")
.HasMaxLength(64);
b.Property<string>("Data")
.IsRequired()
.HasColumnType("text");
b.HasKey("TenantId", "Id", "UserId")
.HasName("webstudio_settings_pkey");
b.HasIndex("Id")
.HasName("ID");
b.ToTable("webstudio_settings","onlyoffice");
});
modelBuilder.Entity("ASC.Core.Common.EF.Model.LoginEvents", b =>
{
b.Property<int>("Id")

View File

@ -114,10 +114,6 @@ namespace ASC.Core.Common.Migrations.Npgsql.MessagesContextNpgsql
name: "login_events",
schema: "onlyoffice");
migrationBuilder.DropTable(
name: "webstudio_settings",
schema: "onlyoffice");
migrationBuilder.DropTable(
name: "tenants_tenants",
schema: "onlyoffice");

View File

@ -65,17 +65,6 @@ namespace ASC.Core.Common.Migrations.Npgsql.WebstudioDbContextNpgsql
{ 1, new Guid("9a925891-1f92-4ed7-b277-d6f649739f06"), new Guid("00000000-0000-0000-0000-000000000000"), "{\"Completed\":false}" }
});
migrationBuilder.InsertData(
schema: "onlyoffice",
table: "webstudio_uservisit",
columns: new[] { "tenantid", "visitdate", "productid", "userid", "firstvisittime", "lastvisittime", "visitcount" },
values: new object[,]
{
{ 1, new DateTime(2020, 10, 1, 16, 53, 22, 198, DateTimeKind.Utc).AddTicks(5709), new Guid("00000000-0000-0000-0000-000000000000"), new Guid("66faa6e4-f133-11ea-b126-00ffeec8b4ef"), new DateTime(2020, 10, 1, 16, 53, 22, 198, DateTimeKind.Utc).AddTicks(9735), new DateTime(2020, 10, 1, 16, 53, 22, 199, DateTimeKind.Utc).AddTicks(777), 3 },
{ 1, new DateTime(2020, 10, 1, 16, 53, 22, 199, DateTimeKind.Utc).AddTicks(1775), new Guid("00000000-0000-0000-0000-000000000000"), new Guid("66faa6e4-f133-11ea-b126-00ffeec8b4ef"), new DateTime(2020, 10, 1, 16, 53, 22, 199, DateTimeKind.Utc).AddTicks(2002), new DateTime(2020, 10, 1, 16, 53, 22, 199, DateTimeKind.Utc).AddTicks(2025), 2 },
{ 1, new DateTime(2020, 10, 1, 16, 53, 22, 199, DateTimeKind.Utc).AddTicks(2046), new Guid("e67be73d-f9ae-4ce1-8fec-1880cb518cb4"), new Guid("66faa6e4-f133-11ea-b126-00ffeec8b4ef"), new DateTime(2020, 10, 1, 16, 53, 22, 199, DateTimeKind.Utc).AddTicks(2061), new DateTime(2020, 10, 1, 16, 53, 22, 199, DateTimeKind.Utc).AddTicks(2065), 1 }
});
migrationBuilder.CreateIndex(
name: "ID",
schema: "onlyoffice",