PhoneToolMX/PhoneToolMX.Models/Migrations/20231020040540_ExtensionPassword.cs

38 lines
1.1 KiB
C#
Raw Normal View History

using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace PhoneToolMX.Models.Migrations
{
public partial class ExtensionPassword : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "Password",
table: "Phones");
migrationBuilder.AddColumn<string>(
name: "Password",
table: "Extensions",
type: "text",
nullable: true,
defaultValueSql: "encode(gen_random_bytes(18), 'base64')");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "Password",
table: "Extensions");
migrationBuilder.AddColumn<string>(
name: "Password",
table: "Phones",
type: "text",
nullable: true,
defaultValueSql: "encode(gen_random_bytes(18), 'base64')");
}
}
}