using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Distribution.Migrations
{
///
public partial class AddStoreContactNumberAndNullableOwner : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn(
name: "OwnerName",
table: "Stores",
type: "longtext",
nullable: true,
oldClrType: typeof(string),
oldType: "longtext")
.Annotation("MySql:CharSet", "utf8mb4")
.OldAnnotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn(
name: "ContactNumber",
table: "Stores",
type: "longtext",
nullable: true)
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.UpdateData(
table: "Stores",
keyColumn: "Id",
keyValue: new Guid("26000000-0000-0000-0000-000000000001"),
column: "ContactNumber",
value: null);
migrationBuilder.UpdateData(
table: "Stores",
keyColumn: "Id",
keyValue: new Guid("26000000-0000-0000-0000-000000000002"),
column: "ContactNumber",
value: null);
migrationBuilder.UpdateData(
table: "Stores",
keyColumn: "Id",
keyValue: new Guid("26000000-0000-0000-0000-000000000003"),
column: "ContactNumber",
value: null);
migrationBuilder.UpdateData(
table: "Stores",
keyColumn: "Id",
keyValue: new Guid("26000000-0000-0000-0000-000000000004"),
column: "ContactNumber",
value: null);
migrationBuilder.UpdateData(
table: "Stores",
keyColumn: "Id",
keyValue: new Guid("26000000-0000-0000-0000-000000000005"),
column: "ContactNumber",
value: null);
migrationBuilder.UpdateData(
table: "Stores",
keyColumn: "Id",
keyValue: new Guid("26000000-0000-0000-0000-000000000006"),
column: "ContactNumber",
value: null);
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "ContactNumber",
table: "Stores");
migrationBuilder.UpdateData(
table: "Stores",
keyColumn: "OwnerName",
keyValue: null,
column: "OwnerName",
value: "");
migrationBuilder.AlterColumn(
name: "OwnerName",
table: "Stores",
type: "longtext",
nullable: false,
oldClrType: typeof(string),
oldType: "longtext",
oldNullable: true)
.Annotation("MySql:CharSet", "utf8mb4")
.OldAnnotation("MySql:CharSet", "utf8mb4");
}
}
}