1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-30 07:36:14 -05:00

SM-802: Add SecretsManagerBeta Column Migration (#3065)

* SM-802: Add SecretsManagerBetaColumn SQL migration and Org table update

* SM-802: Run EF Migrations for SecretsManagerBeta

* SM-802: Update the two Org procs and View, and move data migration to a separate file

* SM-802: Add missing comma to Organization_Create

* SM-802: Remove extra GO statement from data migration script

* SM-802: Add SecretsManagerBeta to OrganizationResponseModel

* SM-802: Move SecretsManagerBeta from OrganizationResponseModel to OrganizationSubscriptionResponseModel. Use sp_refreshview instead of sp_refreshsqlmodule in the migration script.

* SM-802: Remove OrganizationUserOrganizationDetailsView.sql changes

* SM-802: Remove SecretsManagerBetaColumn migration

* SM-802: Add SecretsManagerBetaColumn migration

* SM-802: Remove OrganizationUserOrganizationDetailsView update

* SM-802: Remove migration

* SM-802: Rename SecretsManagerBetaColumn migration files to have the correct date (now that this has passed QA)

* SM-802: Add SecretsManagerBeta migration
This commit is contained in:
Colton Hurst
2023-07-26 15:55:28 -04:00
committed by GitHub
parent 764468adc1
commit 0c53867dbc
16 changed files with 7144 additions and 8 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,28 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Bit.PostgresMigrations.Migrations;
/// <inheritdoc />
public partial class SecretsManagerBetaColumn : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<bool>(
name: "SecretsManagerBeta",
table: "Organization",
type: "boolean",
nullable: false,
defaultValue: false);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "SecretsManagerBeta",
table: "Organization");
}
}

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.12")
.HasAnnotation("ProductVersion", "7.0.5")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
@ -618,6 +618,9 @@ namespace Bit.PostgresMigrations.Migrations
b.Property<int?>("Seats")
.HasColumnType("integer");
b.Property<bool>("SecretsManagerBeta")
.HasColumnType("boolean");
b.Property<bool>("SelfHost")
.HasColumnType("boolean");
@ -1339,6 +1342,8 @@ namespace Bit.PostgresMigrations.Migrations
b.ToTable("AccessPolicy", (string)null);
b.HasDiscriminator<string>("Discriminator").HasValue("AccessPolicy");
b.UseTphMappingStrategy();
});
modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.ApiKey", b =>