1
0
mirror of https://github.com/bitwarden/server.git synced 2025-04-05 05:00:19 -05:00

add EF migrations

This commit is contained in:
Brandon 2025-03-27 10:22:06 -04:00
parent c23c5c3e21
commit 12cf571bae
No known key found for this signature in database
GPG Key ID: A0E0EF0B207BA40D
9 changed files with 9163 additions and 12 deletions

File diff suppressed because it is too large Load Diff

View File

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

View File

@ -182,6 +182,9 @@ namespace Bit.MySqlMigrations.Migrations
b.Property<bool>("UseKeyConnector") b.Property<bool>("UseKeyConnector")
.HasColumnType("tinyint(1)"); .HasColumnType("tinyint(1)");
b.Property<bool>("UseOrganizationDomains")
.HasColumnType("tinyint(1)");
b.Property<bool>("UsePasswordManager") b.Property<bool>("UsePasswordManager")
.HasColumnType("tinyint(1)"); .HasColumnType("tinyint(1)");
@ -407,10 +410,6 @@ namespace Bit.MySqlMigrations.Migrations
b.Property<DateTime?>("AuthenticationDate") b.Property<DateTime?>("AuthenticationDate")
.HasColumnType("datetime(6)"); .HasColumnType("datetime(6)");
b.Property<string>("RequestCountryName")
.HasMaxLength(200)
.HasColumnType("varchar(200)");
b.Property<DateTime>("CreationDate") b.Property<DateTime>("CreationDate")
.HasColumnType("datetime(6)"); .HasColumnType("datetime(6)");
@ -426,6 +425,10 @@ namespace Bit.MySqlMigrations.Migrations
b.Property<string>("PublicKey") b.Property<string>("PublicKey")
.HasColumnType("longtext"); .HasColumnType("longtext");
b.Property<string>("RequestCountryName")
.HasMaxLength(200)
.HasColumnType("varchar(200)");
b.Property<string>("RequestDeviceIdentifier") b.Property<string>("RequestDeviceIdentifier")
.HasMaxLength(50) .HasMaxLength(50)
.HasColumnType("varchar(50)"); .HasColumnType("varchar(50)");

File diff suppressed because it is too large Load Diff

View File

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

View File

@ -184,6 +184,9 @@ namespace Bit.PostgresMigrations.Migrations
b.Property<bool>("UseKeyConnector") b.Property<bool>("UseKeyConnector")
.HasColumnType("boolean"); .HasColumnType("boolean");
b.Property<bool>("UseOrganizationDomains")
.HasColumnType("boolean");
b.Property<bool>("UsePasswordManager") b.Property<bool>("UsePasswordManager")
.HasColumnType("boolean"); .HasColumnType("boolean");
@ -410,10 +413,6 @@ namespace Bit.PostgresMigrations.Migrations
b.Property<DateTime?>("AuthenticationDate") b.Property<DateTime?>("AuthenticationDate")
.HasColumnType("timestamp with time zone"); .HasColumnType("timestamp with time zone");
b.Property<string>("RequestCountryName")
.HasMaxLength(200)
.HasColumnType("character varying(200)");
b.Property<DateTime>("CreationDate") b.Property<DateTime>("CreationDate")
.HasColumnType("timestamp with time zone"); .HasColumnType("timestamp with time zone");
@ -429,6 +428,10 @@ namespace Bit.PostgresMigrations.Migrations
b.Property<string>("PublicKey") b.Property<string>("PublicKey")
.HasColumnType("text"); .HasColumnType("text");
b.Property<string>("RequestCountryName")
.HasMaxLength(200)
.HasColumnType("character varying(200)");
b.Property<string>("RequestDeviceIdentifier") b.Property<string>("RequestDeviceIdentifier")
.HasMaxLength(50) .HasMaxLength(50)
.HasColumnType("character varying(50)"); .HasColumnType("character varying(50)");

File diff suppressed because it is too large Load Diff

View File

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

View File

@ -177,6 +177,9 @@ namespace Bit.SqliteMigrations.Migrations
b.Property<bool>("UseKeyConnector") b.Property<bool>("UseKeyConnector")
.HasColumnType("INTEGER"); .HasColumnType("INTEGER");
b.Property<bool>("UseOrganizationDomains")
.HasColumnType("INTEGER");
b.Property<bool>("UsePasswordManager") b.Property<bool>("UsePasswordManager")
.HasColumnType("INTEGER"); .HasColumnType("INTEGER");
@ -402,10 +405,6 @@ namespace Bit.SqliteMigrations.Migrations
b.Property<DateTime?>("AuthenticationDate") b.Property<DateTime?>("AuthenticationDate")
.HasColumnType("TEXT"); .HasColumnType("TEXT");
b.Property<string>("RequestCountryName")
.HasMaxLength(200)
.HasColumnType("TEXT");
b.Property<DateTime>("CreationDate") b.Property<DateTime>("CreationDate")
.HasColumnType("TEXT"); .HasColumnType("TEXT");
@ -421,6 +420,10 @@ namespace Bit.SqliteMigrations.Migrations
b.Property<string>("PublicKey") b.Property<string>("PublicKey")
.HasColumnType("TEXT"); .HasColumnType("TEXT");
b.Property<string>("RequestCountryName")
.HasMaxLength(200)
.HasColumnType("TEXT");
b.Property<string>("RequestDeviceIdentifier") b.Property<string>("RequestDeviceIdentifier")
.HasMaxLength(50) .HasMaxLength(50)
.HasColumnType("TEXT"); .HasColumnType("TEXT");