mirror of
https://github.com/bitwarden/server.git
synced 2025-06-30 07:36:14 -05:00
[AC-10362] Remove OrganizationUser.AccessAll from code (#4622)
* Remove OrganizationUser.AccessAll from code * Add shadow property * Remove remaining reference * dotnet format * Fix tests * Bump migration dates
This commit is contained in:
2687
util/SqliteMigrations/Migrations/20240826231356_OrganizationUserAccessAllDefaultValue.Designer.cs
generated
Normal file
2687
util/SqliteMigrations/Migrations/20240826231356_OrganizationUserAccessAllDefaultValue.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,44 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Bit.SqliteMigrations.Migrations;
|
||||
|
||||
/// <inheritdoc />
|
||||
public partial class OrganizationUserAccessAllDefaultValue : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_OrganizationUser_UserId_OrganizationId_Status",
|
||||
table: "OrganizationUser");
|
||||
|
||||
migrationBuilder.AlterColumn<bool>(
|
||||
name: "AccessAll",
|
||||
table: "OrganizationUser",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: false,
|
||||
oldClrType: typeof(bool),
|
||||
oldType: "INTEGER");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<bool>(
|
||||
name: "AccessAll",
|
||||
table: "OrganizationUser",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
oldClrType: typeof(bool),
|
||||
oldType: "INTEGER",
|
||||
oldDefaultValue: false);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_OrganizationUser_UserId_OrganizationId_Status",
|
||||
table: "OrganizationUser",
|
||||
columns: new[] { "UserId", "OrganizationId", "Status" });
|
||||
}
|
||||
}
|
@ -1217,7 +1217,9 @@ namespace Bit.SqliteMigrations.Migrations
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<bool>("AccessAll")
|
||||
.HasColumnType("INTEGER");
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER")
|
||||
.HasDefaultValue(false);
|
||||
|
||||
b.Property<bool>("AccessSecretsManager")
|
||||
.HasColumnType("INTEGER");
|
||||
@ -1265,10 +1267,6 @@ namespace Bit.SqliteMigrations.Migrations
|
||||
b.HasIndex("UserId")
|
||||
.HasAnnotation("SqlServer:Clustered", false);
|
||||
|
||||
b.HasIndex("UserId", "OrganizationId", "Status")
|
||||
.HasAnnotation("Npgsql:IndexInclude", new[] { "AccessAll" })
|
||||
.HasAnnotation("SqlServer:Clustered", false);
|
||||
|
||||
b.ToTable("OrganizationUser", (string)null);
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user