38 lines
1.4 KiB
C#
38 lines
1.4 KiB
C#
using Microsoft.EntityFrameworkCore.Metadata;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
namespace UTB.Eshop.Web.Migrations.MySql
|
|
{
|
|
public partial class MySql_100 : Migration
|
|
{
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AlterDatabase()
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "CarouselItem",
|
|
columns: table => new
|
|
{
|
|
ID = table.Column<int>(type: "int", nullable: false)
|
|
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
|
ImageSource = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: false)
|
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
ImageAlt = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true)
|
|
.Annotation("MySql:CharSet", "utf8mb4")
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_CarouselItem", x => x.ID);
|
|
})
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
}
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(
|
|
name: "CarouselItem");
|
|
}
|
|
}
|
|
}
|