mirror of
https://github.com/bitwarden/server.git
synced 2025-07-03 17:12:49 -05:00
[EC-427] Provider table Type and BillingPhone Postgres migrations
This commit is contained in:
1698
util/PostgresMigrations/Migrations/20221227100237_ProviderAddProviderTypeBillingPhone.Designer.cs
generated
Normal file
1698
util/PostgresMigrations/Migrations/20221227100237_ProviderAddProviderTypeBillingPhone.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -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");
|
||||||
|
}
|
||||||
|
}
|
@ -18,7 +18,7 @@ namespace Bit.PostgresMigrations.Migrations
|
|||||||
#pragma warning disable 612, 618
|
#pragma warning disable 612, 618
|
||||||
modelBuilder
|
modelBuilder
|
||||||
.HasAnnotation("Npgsql:CollationDefinition:postgresIndetermanisticCollation", "en-u-ks-primary,en-u-ks-primary,icu,False")
|
.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);
|
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||||
|
|
||||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||||
@ -844,6 +844,9 @@ namespace Bit.PostgresMigrations.Migrations
|
|||||||
b.Property<string>("BillingEmail")
|
b.Property<string>("BillingEmail")
|
||||||
.HasColumnType("text");
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("BillingPhone")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("BusinessAddress1")
|
b.Property<string>("BusinessAddress1")
|
||||||
.HasColumnType("text");
|
.HasColumnType("text");
|
||||||
|
|
||||||
@ -877,6 +880,9 @@ namespace Bit.PostgresMigrations.Migrations
|
|||||||
b.Property<byte>("Status")
|
b.Property<byte>("Status")
|
||||||
.HasColumnType("smallint");
|
.HasColumnType("smallint");
|
||||||
|
|
||||||
|
b.Property<byte>("Type")
|
||||||
|
.HasColumnType("smallint");
|
||||||
|
|
||||||
b.Property<bool>("UseEvents")
|
b.Property<bool>("UseEvents")
|
||||||
.HasColumnType("boolean");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
@ -0,0 +1,10 @@
|
|||||||
|
START TRANSACTION;
|
||||||
|
|
||||||
|
ALTER TABLE "Provider" ADD "BillingPhone" text NULL;
|
||||||
|
|
||||||
|
ALTER TABLE "Provider" ADD "Type" smallint NOT NULL DEFAULT 0;
|
||||||
|
|
||||||
|
INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion")
|
||||||
|
VALUES ('20221227100237_ProviderAddProviderTypeBillingPhone', '6.0.12');
|
||||||
|
|
||||||
|
COMMIT;
|
Reference in New Issue
Block a user