Skip to content

Commit

Permalink
Generate Entity Framework migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
addisonbeck committed Sep 6, 2024
1 parent a3e868a commit c79d627
Show file tree
Hide file tree
Showing 9 changed files with 8,245 additions and 3 deletions.

Large diffs are not rendered by default.

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);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,13 @@ protected override void BuildModel(ModelBuilder modelBuilder)
.HasMaxLength(100)
.HasColumnType("varchar(100)");
b.Property<bool>("LimitCollectionCreation")
.HasColumnType("tinyint(1)")
.HasDefaultValue(false);
b.Property<bool>("LimitCollectionCreationDeletion")
.HasColumnType("tinyint(1)")
.HasDefaultValue(true);
.HasDefaultValue(false);
b.Property<int?>("MaxAutoscaleSeats")
.HasColumnType("int");
Expand Down
Loading

0 comments on commit c79d627

Please sign in to comment.