mirror of
https://github.com/bitwarden/server.git
synced 2025-06-30 07:36:14 -05:00
Run formatting (#2230)
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@ -1,75 +1,74 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace Bit.PostgresMigrations.Migrations
|
||||
namespace Bit.PostgresMigrations.Migrations;
|
||||
|
||||
public partial class RemoveProviderOrganizationProviderUser : Migration
|
||||
{
|
||||
public partial class RemoveProviderOrganizationProviderUser : Migration
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "ProviderOrganizationProviderUser");
|
||||
migrationBuilder.DropTable(
|
||||
name: "ProviderOrganizationProviderUser");
|
||||
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "ProviderId",
|
||||
table: "Event",
|
||||
type: "uuid",
|
||||
nullable: true);
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "ProviderId",
|
||||
table: "Event",
|
||||
type: "uuid",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "ProviderUserId",
|
||||
table: "Event",
|
||||
type: "uuid",
|
||||
nullable: true);
|
||||
}
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "ProviderUserId",
|
||||
table: "Event",
|
||||
type: "uuid",
|
||||
nullable: true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ProviderId",
|
||||
table: "Event");
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ProviderId",
|
||||
table: "Event");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ProviderUserId",
|
||||
table: "Event");
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ProviderUserId",
|
||||
table: "Event");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "ProviderOrganizationProviderUser",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uuid", nullable: false),
|
||||
CreationDate = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
|
||||
Permissions = table.Column<string>(type: "text", nullable: true),
|
||||
ProviderOrganizationId = table.Column<Guid>(type: "uuid", nullable: false),
|
||||
ProviderUserId = table.Column<Guid>(type: "uuid", nullable: false),
|
||||
RevisionDate = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
|
||||
Type = table.Column<byte>(type: "smallint", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_ProviderOrganizationProviderUser", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_ProviderOrganizationProviderUser_ProviderOrganization_Provi~",
|
||||
column: x => x.ProviderOrganizationId,
|
||||
principalTable: "ProviderOrganization",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_ProviderOrganizationProviderUser_ProviderUser_ProviderUserId",
|
||||
column: x => x.ProviderUserId,
|
||||
principalTable: "ProviderUser",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
migrationBuilder.CreateTable(
|
||||
name: "ProviderOrganizationProviderUser",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uuid", nullable: false),
|
||||
CreationDate = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
|
||||
Permissions = table.Column<string>(type: "text", nullable: true),
|
||||
ProviderOrganizationId = table.Column<Guid>(type: "uuid", nullable: false),
|
||||
ProviderUserId = table.Column<Guid>(type: "uuid", nullable: false),
|
||||
RevisionDate = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
|
||||
Type = table.Column<byte>(type: "smallint", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_ProviderOrganizationProviderUser", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_ProviderOrganizationProviderUser_ProviderOrganization_Provi~",
|
||||
column: x => x.ProviderOrganizationId,
|
||||
principalTable: "ProviderOrganization",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_ProviderOrganizationProviderUser_ProviderUser_ProviderUserId",
|
||||
column: x => x.ProviderUserId,
|
||||
principalTable: "ProviderUser",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ProviderOrganizationProviderUser_ProviderOrganizationId",
|
||||
table: "ProviderOrganizationProviderUser",
|
||||
column: "ProviderOrganizationId");
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ProviderOrganizationProviderUser_ProviderOrganizationId",
|
||||
table: "ProviderOrganizationProviderUser",
|
||||
column: "ProviderOrganizationId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ProviderOrganizationProviderUser_ProviderUserId",
|
||||
table: "ProviderOrganizationProviderUser",
|
||||
column: "ProviderUserId");
|
||||
}
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ProviderOrganizationProviderUser_ProviderUserId",
|
||||
table: "ProviderOrganizationProviderUser",
|
||||
column: "ProviderUserId");
|
||||
}
|
||||
}
|
||||
|
@ -1,24 +1,23 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace Bit.PostgresMigrations.Migrations
|
||||
{
|
||||
public partial class UserForcePasswordReset : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "ForcePasswordReset",
|
||||
table: "User",
|
||||
type: "boolean",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
}
|
||||
namespace Bit.PostgresMigrations.Migrations;
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ForcePasswordReset",
|
||||
table: "User");
|
||||
}
|
||||
public partial class UserForcePasswordReset : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "ForcePasswordReset",
|
||||
table: "User",
|
||||
type: "boolean",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ForcePasswordReset",
|
||||
table: "User");
|
||||
}
|
||||
}
|
||||
|
@ -1,43 +1,42 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace Bit.PostgresMigrations.Migrations
|
||||
namespace Bit.PostgresMigrations.Migrations;
|
||||
|
||||
public partial class AddMaxAutoscaleSeatsToOrganization : Migration
|
||||
{
|
||||
public partial class AddMaxAutoscaleSeatsToOrganization : Migration
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "MaxAutoscaleSeats",
|
||||
table: "Organization",
|
||||
type: "integer",
|
||||
nullable: true);
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "MaxAutoscaleSeats",
|
||||
table: "Organization",
|
||||
type: "integer",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "OwnersNotifiedOfAutoscaling",
|
||||
table: "Organization",
|
||||
type: "timestamp without time zone",
|
||||
nullable: true);
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "OwnersNotifiedOfAutoscaling",
|
||||
table: "Organization",
|
||||
type: "timestamp without time zone",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "ProviderOrganizationId",
|
||||
table: "Event",
|
||||
type: "uuid",
|
||||
nullable: true);
|
||||
}
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "ProviderOrganizationId",
|
||||
table: "Event",
|
||||
type: "uuid",
|
||||
nullable: true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "MaxAutoscaleSeats",
|
||||
table: "Organization");
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "MaxAutoscaleSeats",
|
||||
table: "Organization");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "OwnersNotifiedOfAutoscaling",
|
||||
table: "Organization");
|
||||
migrationBuilder.DropColumn(
|
||||
name: "OwnersNotifiedOfAutoscaling",
|
||||
table: "Organization");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ProviderOrganizationId",
|
||||
table: "Event");
|
||||
}
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ProviderOrganizationId",
|
||||
table: "Event");
|
||||
}
|
||||
}
|
||||
|
@ -1,21 +1,20 @@
|
||||
using Bit.Core.Utilities;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace Bit.PostgresMigrations.Migrations
|
||||
namespace Bit.PostgresMigrations.Migrations;
|
||||
|
||||
public partial class SplitManageCollectionsPermissions2 : Migration
|
||||
{
|
||||
public partial class SplitManageCollectionsPermissions2 : Migration
|
||||
private const string _scriptLocation =
|
||||
"PostgresMigrations.Scripts.2021-09-21_01_SplitManageCollectionsPermission.psql";
|
||||
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
private const string _scriptLocation =
|
||||
"PostgresMigrations.Scripts.2021-09-21_01_SplitManageCollectionsPermission.psql";
|
||||
migrationBuilder.Sql(CoreHelpers.GetEmbeddedResourceContentsAsync(_scriptLocation));
|
||||
}
|
||||
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.Sql(CoreHelpers.GetEmbeddedResourceContentsAsync(_scriptLocation));
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
throw new Exception("Irreversible migration");
|
||||
}
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
throw new Exception("Irreversible migration");
|
||||
}
|
||||
}
|
||||
|
@ -1,21 +1,20 @@
|
||||
using Bit.Core.Utilities;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace Bit.PostgresMigrations.Migrations
|
||||
namespace Bit.PostgresMigrations.Migrations;
|
||||
|
||||
public partial class SetMaxAutoscaleSeatsToCurrentSeatCount : Migration
|
||||
{
|
||||
public partial class SetMaxAutoscaleSeatsToCurrentSeatCount : Migration
|
||||
private const string _scriptLocation =
|
||||
"PostgresMigrations.Scripts.2021-10-21_00_SetMaxAutoscaleSeatCount.psql";
|
||||
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
private const string _scriptLocation =
|
||||
"PostgresMigrations.Scripts.2021-10-21_00_SetMaxAutoscaleSeatCount.psql";
|
||||
migrationBuilder.Sql(CoreHelpers.GetEmbeddedResourceContentsAsync(_scriptLocation));
|
||||
}
|
||||
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.Sql(CoreHelpers.GetEmbeddedResourceContentsAsync(_scriptLocation));
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
throw new Exception("Irreversible migration");
|
||||
}
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
throw new Exception("Irreversible migration");
|
||||
}
|
||||
}
|
||||
|
@ -1,24 +1,23 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace Bit.PostgresMigrations.Migrations
|
||||
{
|
||||
public partial class KeyConnector : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "UsesKeyConnector",
|
||||
table: "User",
|
||||
type: "boolean",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
}
|
||||
namespace Bit.PostgresMigrations.Migrations;
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "UsesKeyConnector",
|
||||
table: "User");
|
||||
}
|
||||
public partial class KeyConnector : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "UsesKeyConnector",
|
||||
table: "User",
|
||||
type: "boolean",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "UsesKeyConnector",
|
||||
table: "User");
|
||||
}
|
||||
}
|
||||
|
@ -1,82 +1,81 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace Bit.PostgresMigrations.Migrations
|
||||
namespace Bit.PostgresMigrations.Migrations;
|
||||
|
||||
public partial class OrganizationSponsorship : Migration
|
||||
{
|
||||
public partial class OrganizationSponsorship : Migration
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "UsesCryptoAgent",
|
||||
table: "User",
|
||||
type: "boolean",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "UsesCryptoAgent",
|
||||
table: "User",
|
||||
type: "boolean",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "OrganizationSponsorship",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uuid", nullable: false),
|
||||
InstallationId = table.Column<Guid>(type: "uuid", nullable: true),
|
||||
SponsoringOrganizationId = table.Column<Guid>(type: "uuid", nullable: true),
|
||||
SponsoringOrganizationUserId = table.Column<Guid>(type: "uuid", nullable: true),
|
||||
SponsoredOrganizationId = table.Column<Guid>(type: "uuid", nullable: true),
|
||||
FriendlyName = table.Column<string>(type: "character varying(256)", maxLength: 256, 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),
|
||||
SponsorshipLapsedDate = table.Column<DateTime>(type: "timestamp without time zone", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_OrganizationSponsorship", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_OrganizationSponsorship_Installation_InstallationId",
|
||||
column: x => x.InstallationId,
|
||||
principalTable: "Installation",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey(
|
||||
name: "FK_OrganizationSponsorship_Organization_SponsoredOrganizationId",
|
||||
column: x => x.SponsoredOrganizationId,
|
||||
principalTable: "Organization",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey(
|
||||
name: "FK_OrganizationSponsorship_Organization_SponsoringOrganization~",
|
||||
column: x => x.SponsoringOrganizationId,
|
||||
principalTable: "Organization",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
migrationBuilder.CreateTable(
|
||||
name: "OrganizationSponsorship",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uuid", nullable: false),
|
||||
InstallationId = table.Column<Guid>(type: "uuid", nullable: true),
|
||||
SponsoringOrganizationId = table.Column<Guid>(type: "uuid", nullable: true),
|
||||
SponsoringOrganizationUserId = table.Column<Guid>(type: "uuid", nullable: true),
|
||||
SponsoredOrganizationId = table.Column<Guid>(type: "uuid", nullable: true),
|
||||
FriendlyName = table.Column<string>(type: "character varying(256)", maxLength: 256, 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),
|
||||
SponsorshipLapsedDate = table.Column<DateTime>(type: "timestamp without time zone", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_OrganizationSponsorship", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_OrganizationSponsorship_Installation_InstallationId",
|
||||
column: x => x.InstallationId,
|
||||
principalTable: "Installation",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey(
|
||||
name: "FK_OrganizationSponsorship_Organization_SponsoredOrganizationId",
|
||||
column: x => x.SponsoredOrganizationId,
|
||||
principalTable: "Organization",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey(
|
||||
name: "FK_OrganizationSponsorship_Organization_SponsoringOrganization~",
|
||||
column: x => x.SponsoringOrganizationId,
|
||||
principalTable: "Organization",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_OrganizationSponsorship_InstallationId",
|
||||
table: "OrganizationSponsorship",
|
||||
column: "InstallationId");
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_OrganizationSponsorship_InstallationId",
|
||||
table: "OrganizationSponsorship",
|
||||
column: "InstallationId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_OrganizationSponsorship_SponsoredOrganizationId",
|
||||
table: "OrganizationSponsorship",
|
||||
column: "SponsoredOrganizationId");
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_OrganizationSponsorship_SponsoredOrganizationId",
|
||||
table: "OrganizationSponsorship",
|
||||
column: "SponsoredOrganizationId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_OrganizationSponsorship_SponsoringOrganizationId",
|
||||
table: "OrganizationSponsorship",
|
||||
column: "SponsoringOrganizationId");
|
||||
}
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_OrganizationSponsorship_SponsoringOrganizationId",
|
||||
table: "OrganizationSponsorship",
|
||||
column: "SponsoringOrganizationId");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "OrganizationSponsorship");
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "OrganizationSponsorship");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "UsesCryptoAgent",
|
||||
table: "User");
|
||||
}
|
||||
migrationBuilder.DropColumn(
|
||||
name: "UsesCryptoAgent",
|
||||
table: "User");
|
||||
}
|
||||
}
|
||||
|
@ -1,24 +1,23 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace Bit.PostgresMigrations.Migrations
|
||||
{
|
||||
public partial class KeyConnectorFlag : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "UseKeyConnector",
|
||||
table: "Organization",
|
||||
type: "boolean",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
}
|
||||
namespace Bit.PostgresMigrations.Migrations;
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "UseKeyConnector",
|
||||
table: "Organization");
|
||||
}
|
||||
public partial class KeyConnectorFlag : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "UseKeyConnector",
|
||||
table: "Organization",
|
||||
type: "boolean",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "UseKeyConnector",
|
||||
table: "Organization");
|
||||
}
|
||||
}
|
||||
|
@ -1,46 +1,45 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
namespace Bit.PostgresMigrations.Migrations
|
||||
namespace Bit.PostgresMigrations.Migrations;
|
||||
|
||||
public partial class RemoveU2F : Migration
|
||||
{
|
||||
public partial class RemoveU2F : Migration
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "U2f");
|
||||
}
|
||||
migrationBuilder.DropTable(
|
||||
name: "U2f");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "U2f",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
AppId = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
|
||||
Challenge = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: true),
|
||||
CreationDate = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
|
||||
KeyHandle = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: true),
|
||||
UserId = table.Column<Guid>(type: "uuid", nullable: false),
|
||||
Version = table.Column<string>(type: "character varying(20)", maxLength: 20, nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_U2f", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_U2f_User_UserId",
|
||||
column: x => x.UserId,
|
||||
principalTable: "User",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "U2f",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
AppId = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
|
||||
Challenge = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: true),
|
||||
CreationDate = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
|
||||
KeyHandle = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: true),
|
||||
UserId = table.Column<Guid>(type: "uuid", nullable: false),
|
||||
Version = table.Column<string>(type: "character varying(20)", maxLength: 20, nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_U2f", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_U2f_User_UserId",
|
||||
column: x => x.UserId,
|
||||
principalTable: "User",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_U2f_UserId",
|
||||
table: "U2f",
|
||||
column: "UserId");
|
||||
}
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_U2f_UserId",
|
||||
table: "U2f",
|
||||
column: "UserId");
|
||||
}
|
||||
}
|
||||
|
@ -1,34 +1,33 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace Bit.PostgresMigrations.Migrations
|
||||
namespace Bit.PostgresMigrations.Migrations;
|
||||
|
||||
public partial class FailedLoginCaptcha : Migration
|
||||
{
|
||||
public partial class FailedLoginCaptcha : Migration
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "FailedLoginCount",
|
||||
table: "User",
|
||||
type: "integer",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "FailedLoginCount",
|
||||
table: "User",
|
||||
type: "integer",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "LastFailedLoginDate",
|
||||
table: "User",
|
||||
type: "timestamp without time zone",
|
||||
nullable: true);
|
||||
}
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "LastFailedLoginDate",
|
||||
table: "User",
|
||||
type: "timestamp without time zone",
|
||||
nullable: true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "FailedLoginCount",
|
||||
table: "User");
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "FailedLoginCount",
|
||||
table: "User");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "LastFailedLoginDate",
|
||||
table: "User");
|
||||
}
|
||||
migrationBuilder.DropColumn(
|
||||
name: "LastFailedLoginDate",
|
||||
table: "User");
|
||||
}
|
||||
}
|
||||
|
@ -1,154 +1,153 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace Bit.PostgresMigrations.Migrations
|
||||
namespace Bit.PostgresMigrations.Migrations;
|
||||
|
||||
public partial class SelfHostF4E : Migration
|
||||
{
|
||||
public partial class SelfHostF4E : Migration
|
||||
private const string _scriptLocationTemplate = "2022-03-01_00_{0}_MigrateOrganizationApiKeys.psql";
|
||||
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
private const string _scriptLocationTemplate = "2022-03-01_00_{0}_MigrateOrganizationApiKeys.psql";
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_OrganizationSponsorship_Installation_InstallationId",
|
||||
table: "OrganizationSponsorship");
|
||||
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_OrganizationSponsorship_Installation_InstallationId",
|
||||
table: "OrganizationSponsorship");
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_OrganizationSponsorship_InstallationId",
|
||||
table: "OrganizationSponsorship");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_OrganizationSponsorship_InstallationId",
|
||||
table: "OrganizationSponsorship");
|
||||
migrationBuilder.DropColumn(
|
||||
name: "InstallationId",
|
||||
table: "OrganizationSponsorship");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "InstallationId",
|
||||
table: "OrganizationSponsorship");
|
||||
migrationBuilder.DropColumn(
|
||||
name: "TimesRenewedWithoutValidation",
|
||||
table: "OrganizationSponsorship");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "TimesRenewedWithoutValidation",
|
||||
table: "OrganizationSponsorship");
|
||||
migrationBuilder.CreateTable(
|
||||
name: "OrganizationApiKey",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uuid", nullable: false),
|
||||
OrganizationId = table.Column<Guid>(type: "uuid", nullable: false),
|
||||
Type = table.Column<byte>(type: "smallint", nullable: false),
|
||||
ApiKey = table.Column<string>(type: "character varying(30)", maxLength: 30, nullable: true),
|
||||
RevisionDate = table.Column<DateTime>(type: "timestamp without time zone", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_OrganizationApiKey", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_OrganizationApiKey_Organization_OrganizationId",
|
||||
column: x => x.OrganizationId,
|
||||
principalTable: "Organization",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "OrganizationApiKey",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uuid", nullable: false),
|
||||
OrganizationId = table.Column<Guid>(type: "uuid", nullable: false),
|
||||
Type = table.Column<byte>(type: "smallint", nullable: false),
|
||||
ApiKey = table.Column<string>(type: "character varying(30)", maxLength: 30, nullable: true),
|
||||
RevisionDate = table.Column<DateTime>(type: "timestamp without time zone", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_OrganizationApiKey", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_OrganizationApiKey_Organization_OrganizationId",
|
||||
column: x => x.OrganizationId,
|
||||
principalTable: "Organization",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
migrationBuilder.SqlResource(_scriptLocationTemplate);
|
||||
|
||||
migrationBuilder.SqlResource(_scriptLocationTemplate);
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ApiKey",
|
||||
table: "Organization");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ApiKey",
|
||||
table: "Organization");
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "SponsorshipLapsedDate",
|
||||
table: "OrganizationSponsorship",
|
||||
newName: "ValidUntil");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "SponsorshipLapsedDate",
|
||||
table: "OrganizationSponsorship",
|
||||
newName: "ValidUntil");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "CloudSponsor",
|
||||
table: "OrganizationSponsorship",
|
||||
newName: "ToDelete");
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "CloudSponsor",
|
||||
table: "OrganizationSponsorship",
|
||||
newName: "ToDelete");
|
||||
|
||||
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "OrganizationConnection",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uuid", nullable: false),
|
||||
Type = table.Column<byte>(type: "smallint", nullable: false),
|
||||
OrganizationId = table.Column<Guid>(type: "uuid", nullable: false),
|
||||
Enabled = table.Column<bool>(type: "boolean", nullable: false),
|
||||
Config = table.Column<string>(type: "text", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_OrganizationConnection", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_OrganizationConnection_Organization_OrganizationId",
|
||||
column: x => x.OrganizationId,
|
||||
principalTable: "Organization",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
migrationBuilder.CreateTable(
|
||||
name: "OrganizationConnection",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uuid", nullable: false),
|
||||
Type = table.Column<byte>(type: "smallint", nullable: false),
|
||||
OrganizationId = table.Column<Guid>(type: "uuid", nullable: false),
|
||||
Enabled = table.Column<bool>(type: "boolean", nullable: false),
|
||||
Config = table.Column<string>(type: "text", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_OrganizationConnection", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_OrganizationConnection_Organization_OrganizationId",
|
||||
column: x => x.OrganizationId,
|
||||
principalTable: "Organization",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_OrganizationApiKey_OrganizationId",
|
||||
table: "OrganizationApiKey",
|
||||
column: "OrganizationId");
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_OrganizationApiKey_OrganizationId",
|
||||
table: "OrganizationApiKey",
|
||||
column: "OrganizationId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_OrganizationConnection_OrganizationId",
|
||||
table: "OrganizationConnection",
|
||||
column: "OrganizationId");
|
||||
}
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_OrganizationConnection_OrganizationId",
|
||||
table: "OrganizationConnection",
|
||||
column: "OrganizationId");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "ApiKey",
|
||||
table: "Organization",
|
||||
type: "character varying(30)",
|
||||
maxLength: 30,
|
||||
nullable: true);
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "ApiKey",
|
||||
table: "Organization",
|
||||
type: "character varying(30)",
|
||||
maxLength: 30,
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.SqlResource(_scriptLocationTemplate);
|
||||
migrationBuilder.SqlResource(_scriptLocationTemplate);
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "OrganizationApiKey");
|
||||
migrationBuilder.DropTable(
|
||||
name: "OrganizationApiKey");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "OrganizationConnection");
|
||||
migrationBuilder.DropTable(
|
||||
name: "OrganizationConnection");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "ValidUntil",
|
||||
table: "OrganizationSponsorship",
|
||||
newName: "SponsorshipLapsedDate");
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "ValidUntil",
|
||||
table: "OrganizationSponsorship",
|
||||
newName: "SponsorshipLapsedDate");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "ToDelete",
|
||||
table: "OrganizationSponsorship",
|
||||
newName: "CloudSponsor");
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "ToDelete",
|
||||
table: "OrganizationSponsorship",
|
||||
newName: "CloudSponsor");
|
||||
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "InstallationId",
|
||||
table: "OrganizationSponsorship",
|
||||
type: "uuid",
|
||||
nullable: true);
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "InstallationId",
|
||||
table: "OrganizationSponsorship",
|
||||
type: "uuid",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<byte>(
|
||||
name: "TimesRenewedWithoutValidation",
|
||||
table: "OrganizationSponsorship",
|
||||
type: "smallint",
|
||||
nullable: false,
|
||||
defaultValue: (byte)0);
|
||||
migrationBuilder.AddColumn<byte>(
|
||||
name: "TimesRenewedWithoutValidation",
|
||||
table: "OrganizationSponsorship",
|
||||
type: "smallint",
|
||||
nullable: false,
|
||||
defaultValue: (byte)0);
|
||||
|
||||
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_OrganizationSponsorship_InstallationId",
|
||||
table: "OrganizationSponsorship",
|
||||
column: "InstallationId");
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_OrganizationSponsorship_InstallationId",
|
||||
table: "OrganizationSponsorship",
|
||||
column: "InstallationId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_OrganizationSponsorship_Installation_InstallationId",
|
||||
table: "OrganizationSponsorship",
|
||||
column: "InstallationId",
|
||||
principalTable: "Installation",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_OrganizationSponsorship_Installation_InstallationId",
|
||||
table: "OrganizationSponsorship",
|
||||
column: "InstallationId",
|
||||
principalTable: "Installation",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
}
|
||||
|
@ -1,73 +1,72 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace Bit.PostgresMigrations.Migrations
|
||||
namespace Bit.PostgresMigrations.Migrations;
|
||||
|
||||
public partial class SponsorshipBulkActions : Migration
|
||||
{
|
||||
public partial class SponsorshipBulkActions : Migration
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_OrganizationSponsorship_Organization_SponsoringOrganization~",
|
||||
table: "OrganizationSponsorship");
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_OrganizationSponsorship_Organization_SponsoringOrganization~",
|
||||
table: "OrganizationSponsorship");
|
||||
|
||||
migrationBuilder.AlterColumn<Guid>(
|
||||
name: "SponsoringOrganizationUserId",
|
||||
table: "OrganizationSponsorship",
|
||||
type: "uuid",
|
||||
nullable: false,
|
||||
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
|
||||
oldClrType: typeof(Guid),
|
||||
oldType: "uuid",
|
||||
oldNullable: true);
|
||||
migrationBuilder.AlterColumn<Guid>(
|
||||
name: "SponsoringOrganizationUserId",
|
||||
table: "OrganizationSponsorship",
|
||||
type: "uuid",
|
||||
nullable: false,
|
||||
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
|
||||
oldClrType: typeof(Guid),
|
||||
oldType: "uuid",
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AlterColumn<Guid>(
|
||||
name: "SponsoringOrganizationId",
|
||||
table: "OrganizationSponsorship",
|
||||
type: "uuid",
|
||||
nullable: false,
|
||||
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
|
||||
oldClrType: typeof(Guid),
|
||||
oldType: "uuid",
|
||||
oldNullable: true);
|
||||
migrationBuilder.AlterColumn<Guid>(
|
||||
name: "SponsoringOrganizationId",
|
||||
table: "OrganizationSponsorship",
|
||||
type: "uuid",
|
||||
nullable: false,
|
||||
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
|
||||
oldClrType: typeof(Guid),
|
||||
oldType: "uuid",
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_OrganizationSponsorship_Organization_SponsoringOrganization~",
|
||||
table: "OrganizationSponsorship",
|
||||
column: "SponsoringOrganizationId",
|
||||
principalTable: "Organization",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_OrganizationSponsorship_Organization_SponsoringOrganization~",
|
||||
table: "OrganizationSponsorship",
|
||||
column: "SponsoringOrganizationId",
|
||||
principalTable: "Organization",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_OrganizationSponsorship_Organization_SponsoringOrganization~",
|
||||
table: "OrganizationSponsorship");
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_OrganizationSponsorship_Organization_SponsoringOrganization~",
|
||||
table: "OrganizationSponsorship");
|
||||
|
||||
migrationBuilder.AlterColumn<Guid>(
|
||||
name: "SponsoringOrganizationUserId",
|
||||
table: "OrganizationSponsorship",
|
||||
type: "uuid",
|
||||
nullable: true,
|
||||
oldClrType: typeof(Guid),
|
||||
oldType: "uuid");
|
||||
migrationBuilder.AlterColumn<Guid>(
|
||||
name: "SponsoringOrganizationUserId",
|
||||
table: "OrganizationSponsorship",
|
||||
type: "uuid",
|
||||
nullable: true,
|
||||
oldClrType: typeof(Guid),
|
||||
oldType: "uuid");
|
||||
|
||||
migrationBuilder.AlterColumn<Guid>(
|
||||
name: "SponsoringOrganizationId",
|
||||
table: "OrganizationSponsorship",
|
||||
type: "uuid",
|
||||
nullable: true,
|
||||
oldClrType: typeof(Guid),
|
||||
oldType: "uuid");
|
||||
migrationBuilder.AlterColumn<Guid>(
|
||||
name: "SponsoringOrganizationId",
|
||||
table: "OrganizationSponsorship",
|
||||
type: "uuid",
|
||||
nullable: true,
|
||||
oldClrType: typeof(Guid),
|
||||
oldType: "uuid");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_OrganizationSponsorship_Organization_SponsoringOrganization~",
|
||||
table: "OrganizationSponsorship",
|
||||
column: "SponsoringOrganizationId",
|
||||
principalTable: "Organization",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_OrganizationSponsorship_Organization_SponsoringOrganization~",
|
||||
table: "OrganizationSponsorship",
|
||||
column: "SponsoringOrganizationId",
|
||||
principalTable: "Organization",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
}
|
||||
|
@ -1,65 +1,64 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace Bit.PostgresMigrations.Migrations
|
||||
namespace Bit.PostgresMigrations.Migrations;
|
||||
|
||||
public partial class AddInstallationIdToEvents : Migration
|
||||
{
|
||||
public partial class AddInstallationIdToEvents : Migration
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_OrganizationSponsorship_Organization_SponsoringOrganization~",
|
||||
table: "OrganizationSponsorship");
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_OrganizationSponsorship_Organization_SponsoringOrganization~",
|
||||
table: "OrganizationSponsorship");
|
||||
|
||||
migrationBuilder.AlterColumn<Guid>(
|
||||
name: "SponsoringOrganizationId",
|
||||
table: "OrganizationSponsorship",
|
||||
type: "uuid",
|
||||
nullable: true,
|
||||
oldClrType: typeof(Guid),
|
||||
oldType: "uuid");
|
||||
migrationBuilder.AlterColumn<Guid>(
|
||||
name: "SponsoringOrganizationId",
|
||||
table: "OrganizationSponsorship",
|
||||
type: "uuid",
|
||||
nullable: true,
|
||||
oldClrType: typeof(Guid),
|
||||
oldType: "uuid");
|
||||
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "InstallationId",
|
||||
table: "Event",
|
||||
type: "uuid",
|
||||
nullable: true);
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "InstallationId",
|
||||
table: "Event",
|
||||
type: "uuid",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_OrganizationSponsorship_Organization_SponsoringOrganization~",
|
||||
table: "OrganizationSponsorship",
|
||||
column: "SponsoringOrganizationId",
|
||||
principalTable: "Organization",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_OrganizationSponsorship_Organization_SponsoringOrganization~",
|
||||
table: "OrganizationSponsorship",
|
||||
column: "SponsoringOrganizationId",
|
||||
principalTable: "Organization",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_OrganizationSponsorship_Organization_SponsoringOrganization~",
|
||||
table: "OrganizationSponsorship");
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_OrganizationSponsorship_Organization_SponsoringOrganization~",
|
||||
table: "OrganizationSponsorship");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "InstallationId",
|
||||
table: "Event");
|
||||
migrationBuilder.DropColumn(
|
||||
name: "InstallationId",
|
||||
table: "Event");
|
||||
|
||||
migrationBuilder.AlterColumn<Guid>(
|
||||
name: "SponsoringOrganizationId",
|
||||
table: "OrganizationSponsorship",
|
||||
type: "uuid",
|
||||
nullable: false,
|
||||
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
|
||||
oldClrType: typeof(Guid),
|
||||
oldType: "uuid",
|
||||
oldNullable: true);
|
||||
migrationBuilder.AlterColumn<Guid>(
|
||||
name: "SponsoringOrganizationId",
|
||||
table: "OrganizationSponsorship",
|
||||
type: "uuid",
|
||||
nullable: false,
|
||||
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
|
||||
oldClrType: typeof(Guid),
|
||||
oldType: "uuid",
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_OrganizationSponsorship_Organization_SponsoringOrganization~",
|
||||
table: "OrganizationSponsorship",
|
||||
column: "SponsoringOrganizationId",
|
||||
principalTable: "Organization",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_OrganizationSponsorship_Organization_SponsoringOrganization~",
|
||||
table: "OrganizationSponsorship",
|
||||
column: "SponsoringOrganizationId",
|
||||
principalTable: "Organization",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
}
|
||||
|
@ -1,24 +1,23 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace Bit.PostgresMigrations.Migrations
|
||||
{
|
||||
public partial class DeviceUnknownVerification : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "UnknownDeviceVerificationEnabled",
|
||||
table: "User",
|
||||
type: "boolean",
|
||||
nullable: false,
|
||||
defaultValue: true);
|
||||
}
|
||||
namespace Bit.PostgresMigrations.Migrations;
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "UnknownDeviceVerificationEnabled",
|
||||
table: "User");
|
||||
}
|
||||
public partial class DeviceUnknownVerification : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "UnknownDeviceVerificationEnabled",
|
||||
table: "User",
|
||||
type: "boolean",
|
||||
nullable: false,
|
||||
defaultValue: true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "UnknownDeviceVerificationEnabled",
|
||||
table: "User");
|
||||
}
|
||||
}
|
||||
|
@ -2,25 +2,24 @@
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Bit.PostgresMigrations.Migrations
|
||||
{
|
||||
public partial class UseScimFlag : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "UseScim",
|
||||
table: "Organization",
|
||||
type: "boolean",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
}
|
||||
namespace Bit.PostgresMigrations.Migrations;
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "UseScim",
|
||||
table: "Organization");
|
||||
}
|
||||
public partial class UseScimFlag : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "UseScim",
|
||||
table: "Organization",
|
||||
type: "boolean",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "UseScim",
|
||||
table: "Organization");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user