1
0
mirror of https://github.com/bitwarden/server.git synced 2024-12-02 13:53:23 +01:00
bitwarden-server/util/SqliteMigrations/Migrations/20240826231356_OrganizationUserAccessAllDefaultValue.cs

45 lines
1.3 KiB
C#
Raw Normal View History

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" });
}
}