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

[AC 1427]Add New Organisation Properties Update DB Objects and create migration (#2980)

* Add new properties to organization

* Add new properties to organization

* Create migration

* Add the columns to the view

* Fix the syntax error

* Change the namespaces

* Remove the comma on the stripe file

* Remove the  nulls

* Resolving the PR comments

* Add a refresh for OrganizationView

* Remove the True default values

* Resolve the comments
This commit is contained in:
cyprain-okeke
2023-06-12 23:48:17 +01:00
committed by GitHub
parent 5874ff42c3
commit fed0828677
18 changed files with 7328 additions and 6 deletions

View File

@ -0,0 +1,66 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Bit.MySqlMigrations.Migrations;
public partial class AddSecretsManagerBillingFieldToOrganization : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<int>(
name: "MaxAutoscaleSmSeats",
table: "Organization",
type: "int",
nullable: true);
migrationBuilder.AddColumn<int>(
name: "MaxAutoscaleSmServiceAccounts",
table: "Organization",
type: "int",
nullable: true);
migrationBuilder.AddColumn<int>(
name: "SmSeats",
table: "Organization",
type: "int",
nullable: true);
migrationBuilder.AddColumn<int>(
name: "SmServiceAccounts",
table: "Organization",
type: "int",
nullable: true);
migrationBuilder.AddColumn<bool>(
name: "UsePasswordManager",
table: "Organization",
type: "tinyint(1)",
nullable: false,
defaultValue: true);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "MaxAutoscaleSmSeats",
table: "Organization");
migrationBuilder.DropColumn(
name: "MaxAutoscaleSmServiceAccounts",
table: "Organization");
migrationBuilder.DropColumn(
name: "SmSeats",
table: "Organization");
migrationBuilder.DropColumn(
name: "SmServiceAccounts",
table: "Organization");
migrationBuilder.DropColumn(
name: "UsePasswordManager",
table: "Organization");
}
}

View File

@ -562,6 +562,12 @@ namespace Bit.MySqlMigrations.Migrations
b.Property<int?>("MaxAutoscaleSeats")
.HasColumnType("int");
b.Property<int?>("MaxAutoscaleSmSeats")
.HasColumnType("int");
b.Property<int?>("MaxAutoscaleSmServiceAccounts")
.HasColumnType("int");
b.Property<short?>("MaxCollections")
.HasColumnType("smallint");
@ -600,6 +606,12 @@ namespace Bit.MySqlMigrations.Migrations
b.Property<bool>("SelfHost")
.HasColumnType("tinyint(1)");
b.Property<int?>("SmSeats")
.HasColumnType("int");
b.Property<int?>("SmServiceAccounts")
.HasColumnType("int");
b.Property<byte>("Status")
.HasColumnType("tinyint unsigned");
@ -630,6 +642,9 @@ namespace Bit.MySqlMigrations.Migrations
b.Property<bool>("UseKeyConnector")
.HasColumnType("tinyint(1)");
b.Property<bool>("UsePasswordManager")
.HasColumnType("tinyint(1)");
b.Property<bool>("UsePolicies")
.HasColumnType("tinyint(1)");