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

Add PlanSponsorshipType to db model

This commit is contained in:
Matt Gibson
2021-11-04 12:51:22 -04:00
committed by Justin Baur
parent 199b8ed887
commit 77bea5755e
20 changed files with 75 additions and 18 deletions

View File

@ -10,7 +10,7 @@ using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
namespace Bit.PostgresMigrations.Migrations
{
[DbContext(typeof(DatabaseContext))]
[Migration("20211102205745_OrganizationSponsorship")]
[Migration("20211104164532_OrganizationSponsorship")]
partial class OrganizationSponsorship
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
@ -609,6 +609,9 @@ namespace Bit.PostgresMigrations.Migrations
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property<byte?>("PlanSponsorshipType")
.HasColumnType("smallint");
b.Property<Guid?>("SponsoredOrganizationId")
.HasColumnType("uuid");

View File

@ -24,6 +24,7 @@ namespace Bit.PostgresMigrations.Migrations
SponsoringOrganizationUserId = table.Column<Guid>(type: "uuid", nullable: false),
SponsoredOrganizationId = table.Column<Guid>(type: "uuid", nullable: true),
OfferedToEmail = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: true),
PlanSponsorshipType = table.Column<byte>(type: "smallint", nullable: true),
CloudSponsor = table.Column<bool>(type: "boolean", nullable: false),
LastSyncDate = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
TimesRenewedWithoutValidation = table.Column<byte>(type: "smallint", nullable: false),

View File

@ -607,6 +607,9 @@ namespace Bit.PostgresMigrations.Migrations
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property<byte?>("PlanSponsorshipType")
.HasColumnType("smallint");
b.Property<Guid?>("SponsoredOrganizationId")
.HasColumnType("uuid");

View File

@ -9,6 +9,7 @@ CREATE TABLE "OrganizationSponsorship" (
"SponsoringOrganizationUserId" uuid NOT NULL,
"SponsoredOrganizationId" uuid NULL,
"OfferedToEmail" character varying(256) NULL,
"PlanSponsorshipType" smallint NULL,
"CloudSponsor" boolean NOT NULL,
"LastSyncDate" timestamp without time zone NULL,
"TimesRenewedWithoutValidation" smallint NOT NULL,
@ -26,6 +27,6 @@ CREATE INDEX "IX_OrganizationSponsorship_SponsoredOrganizationId" ON "Organizati
CREATE INDEX "IX_OrganizationSponsorship_SponsoringOrganizationId" ON "OrganizationSponsorship" ("SponsoringOrganizationId");
INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion")
VALUES ('20211102205745_OrganizationSponsorship', '5.0.9');
VALUES ('20211104164532_OrganizationSponsorship', '5.0.9');
COMMIT;