mirror of
https://github.com/bitwarden/server.git
synced 2025-07-01 16:12:49 -05:00
[EC-343] Add MySql EF migrations
This commit is contained in:
1675
util/MySqlMigrations/Migrations/20221020154432_UseCustomPermissionsFlag.Designer.cs
generated
Normal file
1675
util/MySqlMigrations/Migrations/20221020154432_UseCustomPermissionsFlag.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,26 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace Bit.MySqlMigrations.Migrations
|
||||||
|
{
|
||||||
|
public partial class UseCustomPermissionsFlag : Migration
|
||||||
|
{
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AddColumn<bool>(
|
||||||
|
name: "UseCustomPermissions",
|
||||||
|
table: "Organization",
|
||||||
|
type: "tinyint(1)",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: false);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "UseCustomPermissions",
|
||||||
|
table: "Organization");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -616,6 +616,9 @@ namespace Bit.MySqlMigrations.Migrations
|
|||||||
b.Property<bool>("UseApi")
|
b.Property<bool>("UseApi")
|
||||||
.HasColumnType("tinyint(1)");
|
.HasColumnType("tinyint(1)");
|
||||||
|
|
||||||
|
b.Property<bool>("UseCustomPermissions")
|
||||||
|
.HasColumnType("tinyint(1)");
|
||||||
|
|
||||||
b.Property<bool>("UseDirectory")
|
b.Property<bool>("UseDirectory")
|
||||||
.HasColumnType("tinyint(1)");
|
.HasColumnType("tinyint(1)");
|
||||||
|
|
||||||
|
@ -0,0 +1,8 @@
|
|||||||
|
START TRANSACTION;
|
||||||
|
|
||||||
|
ALTER TABLE `Organization` ADD `UseCustomPermissions` tinyint(1) NOT NULL DEFAULT FALSE;
|
||||||
|
|
||||||
|
INSERT INTO `__EFMigrationsHistory` (`MigrationId`, `ProductVersion`)
|
||||||
|
VALUES ('20221020154432_UseCustomPermissionsFlag', '6.0.4');
|
||||||
|
|
||||||
|
COMMIT;
|
Reference in New Issue
Block a user