1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-04 01:22:50 -05:00

[EC-427] Provider table Type and BillingPhone Postgres migrations

This commit is contained in:
Rui Tome
2022-12-27 10:27:52 +00:00
parent 3814b601b9
commit de1af22c0b
4 changed files with 1750 additions and 1 deletions

View File

@ -0,0 +1,35 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Bit.PostgresMigrations.Migrations;
public partial class ProviderAddProviderTypeBillingPhone : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "BillingPhone",
table: "Provider",
type: "text",
nullable: true);
migrationBuilder.AddColumn<byte>(
name: "Type",
table: "Provider",
type: "smallint",
nullable: false,
defaultValue: (byte)0);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "BillingPhone",
table: "Provider");
migrationBuilder.DropColumn(
name: "Type",
table: "Provider");
}
}

View File

@ -18,7 +18,7 @@ namespace Bit.PostgresMigrations.Migrations
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("Npgsql:CollationDefinition:postgresIndetermanisticCollation", "en-u-ks-primary,en-u-ks-primary,icu,False")
.HasAnnotation("ProductVersion", "6.0.4")
.HasAnnotation("ProductVersion", "6.0.12")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
@ -844,6 +844,9 @@ namespace Bit.PostgresMigrations.Migrations
b.Property<string>("BillingEmail")
.HasColumnType("text");
b.Property<string>("BillingPhone")
.HasColumnType("text");
b.Property<string>("BusinessAddress1")
.HasColumnType("text");
@ -877,6 +880,9 @@ namespace Bit.PostgresMigrations.Migrations
b.Property<byte>("Status")
.HasColumnType("smallint");
b.Property<byte>("Type")
.HasColumnType("smallint");
b.Property<bool>("UseEvents")
.HasColumnType("boolean");