mirror of
https://github.com/bitwarden/server.git
synced 2024-11-26 12:55:17 +01:00
22bd755b3c
* Remove OrganizationUser.AccessAll from code * Add shadow property * Remove remaining reference * dotnet format * Fix tests * Bump migration dates
45 lines
1.3 KiB
C#
45 lines
1.3 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace Bit.MySqlMigrations.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: "tinyint(1)",
|
|
nullable: false,
|
|
defaultValue: false,
|
|
oldClrType: typeof(bool),
|
|
oldType: "tinyint(1)");
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AlterColumn<bool>(
|
|
name: "AccessAll",
|
|
table: "OrganizationUser",
|
|
type: "tinyint(1)",
|
|
nullable: false,
|
|
oldClrType: typeof(bool),
|
|
oldType: "tinyint(1)",
|
|
oldDefaultValue: false);
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_OrganizationUser_UserId_OrganizationId_Status",
|
|
table: "OrganizationUser",
|
|
columns: new[] { "UserId", "OrganizationId", "Status" });
|
|
}
|
|
}
|