-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generate Entity Framework migrations
- Loading branch information
1 parent
a3e868a
commit c79d627
Showing
9 changed files
with
8,245 additions
and
3 deletions.
There are no files selected for viewing
2,697 changes: 2,697 additions & 0 deletions
2,697
util/MySqlMigrations/Migrations/20240906161609_AddLimitCollectionCreationColumn.Designer.cs
Large diffs are not rendered by default.
Oops, something went wrong.
48 changes: 48 additions & 0 deletions
48
util/MySqlMigrations/Migrations/20240906161609_AddLimitCollectionCreationColumn.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
using Microsoft.EntityFrameworkCore.Migrations; | ||
|
||
#nullable disable | ||
|
||
namespace Bit.MySqlMigrations.Migrations; | ||
|
||
/// <inheritdoc /> | ||
public partial class AddLimitCollectionCreationColumn : Migration | ||
{ | ||
/// <inheritdoc /> | ||
protected override void Up(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.AlterColumn<bool>( | ||
name: "LimitCollectionCreationDeletion", | ||
table: "Organization", | ||
type: "tinyint(1)", | ||
nullable: false, | ||
defaultValue: false, | ||
oldClrType: typeof(bool), | ||
oldType: "tinyint(1)", | ||
oldDefaultValue: true); | ||
|
||
migrationBuilder.AddColumn<bool>( | ||
name: "LimitCollectionCreation", | ||
table: "Organization", | ||
type: "tinyint(1)", | ||
nullable: false, | ||
defaultValue: false); | ||
} | ||
|
||
/// <inheritdoc /> | ||
protected override void Down(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.DropColumn( | ||
name: "LimitCollectionCreation", | ||
table: "Organization"); | ||
|
||
migrationBuilder.AlterColumn<bool>( | ||
name: "LimitCollectionCreationDeletion", | ||
table: "Organization", | ||
type: "tinyint(1)", | ||
nullable: false, | ||
defaultValue: true, | ||
oldClrType: typeof(bool), | ||
oldType: "tinyint(1)", | ||
oldDefaultValue: false); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.