Skip to content

Commit

Permalink
Generate EF migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
addisonbeck committed Jan 9, 2025
1 parent 139e07e commit 8f3879a
Show file tree
Hide file tree
Showing 9 changed files with 9,151 additions and 99 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace Bit.MySqlMigrations.Migrations;

/// <inheritdoc />
public partial class DropLimitCollectionCreationDeletion : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "LimitCollectionCreationDeletion",
table: "Organization");
}

/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<bool>(
name: "LimitCollectionCreationDeletion",
table: "Organization",
type: "tinyint(1)",
nullable: false,
defaultValue: false);
}
}
63 changes: 30 additions & 33 deletions util/MySqlMigrations/Migrations/DatabaseContextModelSnapshot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,6 @@ protected override void BuildModel(ModelBuilder modelBuilder)
b.Property<bool>("LimitCollectionCreation")
.HasColumnType("tinyint(1)");

b.Property<bool>("LimitCollectionCreationDeletion")
.HasColumnType("tinyint(1)");

b.Property<bool>("LimitCollectionDeletion")
.HasColumnType("tinyint(1)");

Expand Down Expand Up @@ -1144,35 +1141,6 @@ protected override void BuildModel(ModelBuilder modelBuilder)
b.ToTable("GroupUser", (string)null);
});

modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Installation", b =>
{
b.Property<Guid>("Id")
.HasColumnType("char(36)");

b.Property<DateTime>("CreationDate")
.HasColumnType("datetime(6)");

b.Property<string>("Email")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("varchar(256)");

b.Property<bool>("Enabled")
.HasColumnType("tinyint(1)");

b.Property<string>("Key")
.IsRequired()
.HasMaxLength(150)
.HasColumnType("varchar(150)");

b.Property<DateTime?>("LastActivityDate")
.HasColumnType("datetime(6)");

b.HasKey("Id");

b.ToTable("Installation", (string)null);
});

modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.OrganizationApiKey", b =>
{
b.Property<Guid>("Id")
Expand Down Expand Up @@ -1748,6 +1716,35 @@ protected override void BuildModel(ModelBuilder modelBuilder)
b.ToTable("NotificationStatus", (string)null);
});

modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Platform.Installation", b =>
{
b.Property<Guid>("Id")
.HasColumnType("char(36)");

b.Property<DateTime>("CreationDate")
.HasColumnType("datetime(6)");

b.Property<string>("Email")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("varchar(256)");

b.Property<bool>("Enabled")
.HasColumnType("tinyint(1)");

b.Property<string>("Key")
.IsRequired()
.HasMaxLength(150)
.HasColumnType("varchar(150)");

b.Property<DateTime?>("LastActivityDate")
.HasColumnType("datetime(6)");

b.HasKey("Id");

b.ToTable("Installation", (string)null);
});

modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.AccessPolicy", b =>
{
b.Property<Guid>("Id")
Expand Down Expand Up @@ -2373,7 +2370,7 @@ protected override void BuildModel(ModelBuilder modelBuilder)

modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Billing.Models.OrganizationInstallation", b =>
{
b.HasOne("Bit.Infrastructure.EntityFramework.Models.Installation", "Installation")
b.HasOne("Bit.Infrastructure.EntityFramework.Platform.Installation", "Installation")
.WithMany()
.HasForeignKey("InstallationId")
.OnDelete(DeleteBehavior.Cascade)
Expand Down
Loading

0 comments on commit 8f3879a

Please sign in to comment.