mirror of
https://github.com/claunia/marechai.git
synced 2025-12-16 19:14:25 +00:00
Re-do company descriptions.
This commit is contained in:
1891
Cicm.Database/Migrations/20190518145625_RemoveCompanyDescriptions.Designer.cs
generated
Normal file
1891
Cicm.Database/Migrations/20190518145625_RemoveCompanyDescriptions.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,35 @@
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace Cicm.Database.Migrations
|
||||
{
|
||||
public partial class RemoveCompanyDescriptions : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable("company_descriptions");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable("company_descriptions",
|
||||
table => new
|
||||
{
|
||||
id = table.Column<int>("int(11)")
|
||||
.Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.IdentityColumn),
|
||||
company_id = table.Column<int>("int(11)"),
|
||||
text = table.Column<string>("text", nullable: true)
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_company_descriptions", x => x.id);
|
||||
table.ForeignKey("fk_company_id", x => x.id, "companies", "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex("idx_company_id", "company_descriptions", "company_id", unique: true);
|
||||
|
||||
migrationBuilder.CreateIndex("idx_text", "company_descriptions", "text");
|
||||
}
|
||||
}
|
||||
}
|
||||
1915
Cicm.Database/Migrations/20190518150032_AddCompanyDescriptions.Designer.cs
generated
Normal file
1915
Cicm.Database/Migrations/20190518150032_AddCompanyDescriptions.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,34 @@
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace Cicm.Database.Migrations
|
||||
{
|
||||
public partial class AddCompanyDescriptions : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable("CompanyDescriptions",
|
||||
table => new
|
||||
{
|
||||
Id = table.Column<int>()
|
||||
.Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.IdentityColumn),
|
||||
CompanyId = table.Column<int>(),
|
||||
Text = table.Column<string>(nullable: true)
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_CompanyDescriptions", x => x.Id);
|
||||
table.ForeignKey("FK_CompanyDescriptions_companies_CompanyId",
|
||||
x => x.CompanyId, "companies", "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex("IX_CompanyDescriptions_CompanyId", "CompanyDescriptions", "CompanyId");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable("CompanyDescriptions");
|
||||
}
|
||||
}
|
||||
}
|
||||
1918
Cicm.Database/Migrations/20190518154700_AddCompanyDescriptionIndex.Designer.cs
generated
Normal file
1918
Cicm.Database/Migrations/20190518154700_AddCompanyDescriptionIndex.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,24 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace Cicm.Database.Migrations
|
||||
{
|
||||
public partial class AddCompanyDescriptionIndex : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<string>("Text", "CompanyDescriptions", nullable: true,
|
||||
oldClrType: typeof(string), oldNullable: true);
|
||||
|
||||
migrationBuilder.CreateIndex("IX_CompanyDescriptions_Text", "CompanyDescriptions", "Text")
|
||||
.Annotation("MySql:FullTextIndex", true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropIndex("IX_CompanyDescriptions_Text", "CompanyDescriptions");
|
||||
|
||||
migrationBuilder.AlterColumn<string>("Text", "CompanyDescriptions", nullable: true,
|
||||
oldClrType: typeof(string), oldNullable: true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,7 @@ namespace Cicm.Database.Migrations
|
||||
protected override void BuildModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder.HasAnnotation("ProductVersion", "2.1.1-rtm-30846")
|
||||
modelBuilder.HasAnnotation("ProductVersion", "2.2.4-servicing-10062")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 64);
|
||||
|
||||
modelBuilder.Entity("Cicm.Database.Models.Admin", b =>
|
||||
@@ -178,19 +178,19 @@ namespace Cicm.Database.Migrations
|
||||
|
||||
modelBuilder.Entity("Cicm.Database.Models.CompanyDescription", b =>
|
||||
{
|
||||
b.Property<int>("Id").ValueGeneratedOnAdd().HasColumnName("id").HasColumnType("int(11)");
|
||||
b.Property<int>("Id").ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<int>("CompanyId").HasColumnName("company_id").HasColumnType("int(11)");
|
||||
b.Property<int>("CompanyId");
|
||||
|
||||
b.Property<string>("Text").HasColumnName("text").HasColumnType("text");
|
||||
b.Property<string>("Text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("CompanyId").IsUnique().HasName("idx_company_id");
|
||||
b.HasIndex("CompanyId");
|
||||
|
||||
b.HasIndex("Text").HasName("idx_text");
|
||||
b.HasIndex("Text").HasAnnotation("MySql:FullTextIndex", true);
|
||||
|
||||
b.ToTable("company_descriptions");
|
||||
b.ToTable("CompanyDescriptions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Cicm.Database.Models.CompanyLogo", b =>
|
||||
@@ -1074,9 +1074,8 @@ namespace Cicm.Database.Migrations
|
||||
modelBuilder.Entity("Cicm.Database.Models.CompanyDescription",
|
||||
b =>
|
||||
{
|
||||
b.HasOne("Cicm.Database.Models.Company", "Company").WithOne("Description")
|
||||
.HasForeignKey("Cicm.Database.Models.CompanyDescription", "Id")
|
||||
.HasConstraintName("fk_company_id").OnDelete(DeleteBehavior.Cascade);
|
||||
b.HasOne("Cicm.Database.Models.Company", "Company").WithMany("Descriptions")
|
||||
.HasForeignKey("CompanyId").OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Cicm.Database.Models.CompanyLogo",
|
||||
|
||||
Reference in New Issue
Block a user