38 lines
1.1 KiB
C#
38 lines
1.1 KiB
C#
|
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')");
|
|||
|
}
|
|||
|
}
|
|||
|
}
|