Create new migration
This commit is contained in:
@ -17,6 +17,43 @@ namespace Hcs.WebApp.Data.Hcs.Migrations
|
||||
|
||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("Hcs.WebApp.Data.Hcs.Campaign", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime?>("EndedAt")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("FailureReason")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("InitiatorId")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime?>("StartedAt")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("Step")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Type")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Campaigns");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Hcs.WebApp.Data.Hcs.Operation", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
@ -25,17 +62,23 @@ namespace Hcs.WebApp.Data.Hcs.Migrations
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("CampaignId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime?>("EndedAt")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("InitiatorId")
|
||||
b.Property<string>("FailureReason")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("MessageGuid")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("StartedAt")
|
||||
b.Property<DateTime?>("StartedAt")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("Type")
|
||||
@ -44,6 +87,8 @@ namespace Hcs.WebApp.Data.Hcs.Migrations
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("CampaignId");
|
||||
|
||||
b.ToTable("Operations");
|
||||
});
|
||||
|
||||
@ -56,6 +101,13 @@ namespace Hcs.WebApp.Data.Hcs.Migrations
|
||||
b.Property<bool>("IsCommon")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<string>("LastSyncError")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("LastSyncOperationId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
@ -63,11 +115,13 @@ namespace Hcs.WebApp.Data.Hcs.Migrations
|
||||
b.Property<int>("Number")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("UpdatedAt")
|
||||
b.Property<DateTime?>("SyncedAt")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("LastSyncOperationId");
|
||||
|
||||
b.ToTable("Registries");
|
||||
});
|
||||
|
||||
@ -99,6 +153,28 @@ namespace Hcs.WebApp.Data.Hcs.Migrations
|
||||
b.ToTable("Elements");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Hcs.WebApp.Data.Hcs.Operation", b =>
|
||||
{
|
||||
b.HasOne("Hcs.WebApp.Data.Hcs.Campaign", "Campaign")
|
||||
.WithMany("Operations")
|
||||
.HasForeignKey("CampaignId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Campaign");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Hcs.WebApp.Data.Hcs.Registry", b =>
|
||||
{
|
||||
b.HasOne("Hcs.WebApp.Data.Hcs.Operation", "LastSyncOperation")
|
||||
.WithMany("Registries")
|
||||
.HasForeignKey("LastSyncOperationId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("LastSyncOperation");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Hcs.WebApp.Data.Hcs.RegistryElement", b =>
|
||||
{
|
||||
b.HasOne("Hcs.WebApp.Data.Hcs.Registry", "Registry")
|
||||
@ -110,6 +186,16 @@ namespace Hcs.WebApp.Data.Hcs.Migrations
|
||||
b.Navigation("Registry");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Hcs.WebApp.Data.Hcs.Campaign", b =>
|
||||
{
|
||||
b.Navigation("Operations");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Hcs.WebApp.Data.Hcs.Operation", b =>
|
||||
{
|
||||
b.Navigation("Registries");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Hcs.WebApp.Data.Hcs.Registry", b =>
|
||||
{
|
||||
b.Navigation("Elements");
|
||||
|
||||
Reference in New Issue
Block a user