using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace SPMS.Infrastructure.Migrations
{
///
public partial class AddExternalDeviceId : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn(
name: "ExternalDeviceId",
table: "Device",
type: "varchar(36)",
maxLength: 36,
nullable: false,
defaultValue: "")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateIndex(
name: "IX_Device_ServiceId_ExternalDeviceId",
table: "Device",
columns: new[] { "ServiceId", "ExternalDeviceId" },
unique: true);
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropIndex(
name: "IX_Device_ServiceId_ExternalDeviceId",
table: "Device");
migrationBuilder.DropColumn(
name: "ExternalDeviceId",
table: "Device");
}
}
}