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 3, 2024
1 parent cb4a8bc commit 30604fe
Show file tree
Hide file tree
Showing 9 changed files with 8,251 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 Rename_Organization_LimitCollectionCreationDeletion : 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: true);
}

/// <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,10 +88,15 @@ protected override void BuildModel(ModelBuilder modelBuilder)
.HasMaxLength(100)
.HasColumnType("varchar(100)");
b.Property<bool>("LimitCollectionCreationDeletion")
b.Property<bool>("LimitCollectionCreation")
.HasColumnType("tinyint(1)")
.HasDefaultValue(true);
b.Property<bool>("LimitCollectionCreationDeletion")
.ValueGeneratedOnAdd()
.HasColumnType("tinyint(1)")
.HasDefaultValue(false);
b.Property<int?>("MaxAutoscaleSeats")
.HasColumnType("int");
Expand Down
Loading

0 comments on commit 30604fe

Please sign in to comment.