snow flurry
4fb88d6cbb
I misunderstood pjsip's concept of endpoints/AoRs. Multiple devices can be bound to a single endpoint, which in turn can have multiple AoRs. So the password should be bound to an Extension, not a Phone.
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')");
|
|
}
|
|
}
|
|
}
|