Refactor and reorganize code.

This commit is contained in:
2020-02-10 22:44:18 +00:00
parent ed5aacd34e
commit da352de481
345 changed files with 15117 additions and 20198 deletions

View File

@@ -8,25 +8,21 @@ namespace Marechai.Database.Migrations
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable("MagazineIssues",
table => new
{
Id = table.Column<long>()
.Annotation("MySql:ValueGenerationStrategy",
MySqlValueGenerationStrategy.IdentityColumn),
MagazineId = table.Column<long>(),
Caption = table.Column<string>(),
NativeCaption = table.Column<string>(nullable: true),
Published = table.Column<DateTime>(nullable: true),
ProductCode = table.Column<string>(maxLength: 18, nullable: true),
Pages = table.Column<short>()
}, constraints: table =>
{
table.PrimaryKey("PK_MagazineIssues", x => x.Id);
table.ForeignKey("FK_MagazineIssues_Magazines_MagazineId",
x => x.MagazineId, "Magazines", "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable("MagazineIssues", table => new
{
Id = table.Column<long>().
Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
MagazineId = table.Column<long>(), Caption = table.Column<string>(),
NativeCaption = table.Column<string>(nullable: true),
Published = table.Column<DateTime>(nullable: true),
ProductCode = table.Column<string>(maxLength: 18, nullable: true), Pages = table.Column<short>()
}, constraints: table =>
{
table.PrimaryKey("PK_MagazineIssues", x => x.Id);
table.ForeignKey("FK_MagazineIssues_Magazines_MagazineId", x => x.MagazineId, "Magazines", "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateIndex("IX_MagazineIssues_Caption", "MagazineIssues", "Caption");
@@ -41,9 +37,6 @@ namespace Marechai.Database.Migrations
migrationBuilder.CreateIndex("IX_MagazineIssues_Published", "MagazineIssues", "Published");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable("MagazineIssues");
}
protected override void Down(MigrationBuilder migrationBuilder) => migrationBuilder.DropTable("MagazineIssues");
}
}