diff --git a/WebAPI/Migrations/20240309075645_Change record value type.Designer.cs b/WebAPI/Migrations/20240309075645_Change record value type.Designer.cs new file mode 100644 index 0000000..bdd3d56 --- /dev/null +++ b/WebAPI/Migrations/20240309075645_Change record value type.Designer.cs @@ -0,0 +1,333 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using WebAPI; + +#nullable disable + +namespace WebAPI.Migrations +{ + [DbContext(typeof(AppDbContext))] + [Migration("20240309075645_Change record value type")] + partial class Changerecordvaluetype + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "7.0.13") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("WebAPI.Models.Layer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CreatedAt") + .HasColumnType("datetime2"); + + b.Property("CreatedById") + .HasColumnType("uniqueidentifier"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("ModifiedAt") + .HasColumnType("datetime2"); + + b.Property("ModifiedById") + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Number") + .HasColumnType("int"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Source") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Type") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreatedById"); + + b.HasIndex("ModifiedById"); + + b.HasIndex("ParentId"); + + b.ToTable("Layers"); + }); + + modelBuilder.Entity("WebAPI.Models.ProcessSource", b => + { + b.Property("LayerId") + .HasColumnType("uniqueidentifier"); + + b.Property("SourceId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("LayerId", "SourceId"); + + b.HasIndex("SourceId"); + + b.ToTable("ProcessSources"); + }); + + modelBuilder.Entity("WebAPI.Models.Record", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CreatedAt") + .HasColumnType("datetime2"); + + b.Property("CreatedById") + .HasColumnType("uniqueidentifier"); + + b.Property("Desc1") + .HasColumnType("nvarchar(max)"); + + b.Property("Desc2") + .HasColumnType("nvarchar(max)"); + + b.Property("Desc3") + .HasColumnType("nvarchar(max)"); + + b.Property("Desc4") + .HasColumnType("nvarchar(max)"); + + b.Property("Desc5") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("LayerId") + .HasColumnType("uniqueidentifier"); + + b.Property("ModifiedAt") + .HasColumnType("datetime2"); + + b.Property("ModifiedById") + .HasColumnType("uniqueidentifier"); + + b.Property("Value1") + .HasColumnType("float"); + + b.Property("Value10") + .HasColumnType("float"); + + b.Property("Value11") + .HasColumnType("float"); + + b.Property("Value12") + .HasColumnType("float"); + + b.Property("Value13") + .HasColumnType("float"); + + b.Property("Value14") + .HasColumnType("float"); + + b.Property("Value15") + .HasColumnType("float"); + + b.Property("Value16") + .HasColumnType("float"); + + b.Property("Value17") + .HasColumnType("float"); + + b.Property("Value18") + .HasColumnType("float"); + + b.Property("Value19") + .HasColumnType("float"); + + b.Property("Value2") + .HasColumnType("float"); + + b.Property("Value20") + .HasColumnType("float"); + + b.Property("Value21") + .HasColumnType("float"); + + b.Property("Value22") + .HasColumnType("float"); + + b.Property("Value23") + .HasColumnType("float"); + + b.Property("Value24") + .HasColumnType("float"); + + b.Property("Value25") + .HasColumnType("float"); + + b.Property("Value26") + .HasColumnType("float"); + + b.Property("Value27") + .HasColumnType("float"); + + b.Property("Value28") + .HasColumnType("float"); + + b.Property("Value29") + .HasColumnType("float"); + + b.Property("Value3") + .HasColumnType("float"); + + b.Property("Value30") + .HasColumnType("float"); + + b.Property("Value31") + .HasColumnType("float"); + + b.Property("Value32") + .HasColumnType("float"); + + b.Property("Value4") + .HasColumnType("float"); + + b.Property("Value5") + .HasColumnType("float"); + + b.Property("Value6") + .HasColumnType("float"); + + b.Property("Value7") + .HasColumnType("float"); + + b.Property("Value8") + .HasColumnType("float"); + + b.Property("Value9") + .HasColumnType("float"); + + b.HasKey("Id"); + + b.HasIndex("CreatedById"); + + b.HasIndex("LayerId"); + + b.HasIndex("ModifiedById"); + + b.ToTable("Records"); + }); + + modelBuilder.Entity("WebAPI.Models.User", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CreatedAt") + .HasColumnType("datetime2"); + + b.Property("Email") + .HasColumnType("nvarchar(max)"); + + b.Property("UserName") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("Users"); + }); + + modelBuilder.Entity("WebAPI.Models.Layer", b => + { + b.HasOne("WebAPI.Models.User", "CreatedBy") + .WithMany() + .HasForeignKey("CreatedById") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("WebAPI.Models.User", "ModifiedBy") + .WithMany() + .HasForeignKey("ModifiedById") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("WebAPI.Models.Layer", "Parent") + .WithMany() + .HasForeignKey("ParentId"); + + b.Navigation("CreatedBy"); + + b.Navigation("ModifiedBy"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("WebAPI.Models.ProcessSource", b => + { + b.HasOne("WebAPI.Models.Layer", "Source") + .WithMany("Sources") + .HasForeignKey("SourceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Source"); + }); + + modelBuilder.Entity("WebAPI.Models.Record", b => + { + b.HasOne("WebAPI.Models.User", "CreatedBy") + .WithMany() + .HasForeignKey("CreatedById") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("WebAPI.Models.Layer", null) + .WithMany("Records") + .HasForeignKey("LayerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("WebAPI.Models.User", "ModifiedBy") + .WithMany() + .HasForeignKey("ModifiedById") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CreatedBy"); + + b.Navigation("ModifiedBy"); + }); + + modelBuilder.Entity("WebAPI.Models.Layer", b => + { + b.Navigation("Records"); + + b.Navigation("Sources"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/WebAPI/Migrations/20240309075645_Change record value type.cs b/WebAPI/Migrations/20240309075645_Change record value type.cs new file mode 100644 index 0000000..668feee --- /dev/null +++ b/WebAPI/Migrations/20240309075645_Change record value type.cs @@ -0,0 +1,594 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace WebAPI.Migrations +{ + /// + public partial class Changerecordvaluetype : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterColumn( + name: "Value9", + table: "Records", + type: "float", + nullable: true, + oldClrType: typeof(float), + oldType: "real", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Value8", + table: "Records", + type: "float", + nullable: true, + oldClrType: typeof(float), + oldType: "real", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Value7", + table: "Records", + type: "float", + nullable: true, + oldClrType: typeof(float), + oldType: "real", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Value6", + table: "Records", + type: "float", + nullable: true, + oldClrType: typeof(float), + oldType: "real", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Value5", + table: "Records", + type: "float", + nullable: true, + oldClrType: typeof(float), + oldType: "real", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Value4", + table: "Records", + type: "float", + nullable: true, + oldClrType: typeof(float), + oldType: "real", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Value32", + table: "Records", + type: "float", + nullable: true, + oldClrType: typeof(float), + oldType: "real", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Value31", + table: "Records", + type: "float", + nullable: true, + oldClrType: typeof(float), + oldType: "real", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Value30", + table: "Records", + type: "float", + nullable: true, + oldClrType: typeof(float), + oldType: "real", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Value3", + table: "Records", + type: "float", + nullable: true, + oldClrType: typeof(float), + oldType: "real", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Value29", + table: "Records", + type: "float", + nullable: true, + oldClrType: typeof(float), + oldType: "real", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Value28", + table: "Records", + type: "float", + nullable: true, + oldClrType: typeof(float), + oldType: "real", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Value27", + table: "Records", + type: "float", + nullable: true, + oldClrType: typeof(float), + oldType: "real", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Value26", + table: "Records", + type: "float", + nullable: true, + oldClrType: typeof(float), + oldType: "real", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Value25", + table: "Records", + type: "float", + nullable: true, + oldClrType: typeof(float), + oldType: "real", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Value24", + table: "Records", + type: "float", + nullable: true, + oldClrType: typeof(float), + oldType: "real", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Value23", + table: "Records", + type: "float", + nullable: true, + oldClrType: typeof(float), + oldType: "real", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Value22", + table: "Records", + type: "float", + nullable: true, + oldClrType: typeof(float), + oldType: "real", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Value21", + table: "Records", + type: "float", + nullable: true, + oldClrType: typeof(float), + oldType: "real", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Value20", + table: "Records", + type: "float", + nullable: true, + oldClrType: typeof(float), + oldType: "real", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Value2", + table: "Records", + type: "float", + nullable: true, + oldClrType: typeof(float), + oldType: "real", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Value19", + table: "Records", + type: "float", + nullable: true, + oldClrType: typeof(float), + oldType: "real", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Value18", + table: "Records", + type: "float", + nullable: true, + oldClrType: typeof(float), + oldType: "real", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Value17", + table: "Records", + type: "float", + nullable: true, + oldClrType: typeof(float), + oldType: "real", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Value16", + table: "Records", + type: "float", + nullable: true, + oldClrType: typeof(float), + oldType: "real", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Value15", + table: "Records", + type: "float", + nullable: true, + oldClrType: typeof(float), + oldType: "real", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Value14", + table: "Records", + type: "float", + nullable: true, + oldClrType: typeof(float), + oldType: "real", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Value13", + table: "Records", + type: "float", + nullable: true, + oldClrType: typeof(float), + oldType: "real", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Value12", + table: "Records", + type: "float", + nullable: true, + oldClrType: typeof(float), + oldType: "real", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Value11", + table: "Records", + type: "float", + nullable: true, + oldClrType: typeof(float), + oldType: "real", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Value10", + table: "Records", + type: "float", + nullable: true, + oldClrType: typeof(float), + oldType: "real", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Value1", + table: "Records", + type: "float", + nullable: true, + oldClrType: typeof(float), + oldType: "real", + oldNullable: true); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterColumn( + name: "Value9", + table: "Records", + type: "real", + nullable: true, + oldClrType: typeof(double), + oldType: "float", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Value8", + table: "Records", + type: "real", + nullable: true, + oldClrType: typeof(double), + oldType: "float", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Value7", + table: "Records", + type: "real", + nullable: true, + oldClrType: typeof(double), + oldType: "float", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Value6", + table: "Records", + type: "real", + nullable: true, + oldClrType: typeof(double), + oldType: "float", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Value5", + table: "Records", + type: "real", + nullable: true, + oldClrType: typeof(double), + oldType: "float", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Value4", + table: "Records", + type: "real", + nullable: true, + oldClrType: typeof(double), + oldType: "float", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Value32", + table: "Records", + type: "real", + nullable: true, + oldClrType: typeof(double), + oldType: "float", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Value31", + table: "Records", + type: "real", + nullable: true, + oldClrType: typeof(double), + oldType: "float", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Value30", + table: "Records", + type: "real", + nullable: true, + oldClrType: typeof(double), + oldType: "float", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Value3", + table: "Records", + type: "real", + nullable: true, + oldClrType: typeof(double), + oldType: "float", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Value29", + table: "Records", + type: "real", + nullable: true, + oldClrType: typeof(double), + oldType: "float", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Value28", + table: "Records", + type: "real", + nullable: true, + oldClrType: typeof(double), + oldType: "float", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Value27", + table: "Records", + type: "real", + nullable: true, + oldClrType: typeof(double), + oldType: "float", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Value26", + table: "Records", + type: "real", + nullable: true, + oldClrType: typeof(double), + oldType: "float", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Value25", + table: "Records", + type: "real", + nullable: true, + oldClrType: typeof(double), + oldType: "float", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Value24", + table: "Records", + type: "real", + nullable: true, + oldClrType: typeof(double), + oldType: "float", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Value23", + table: "Records", + type: "real", + nullable: true, + oldClrType: typeof(double), + oldType: "float", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Value22", + table: "Records", + type: "real", + nullable: true, + oldClrType: typeof(double), + oldType: "float", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Value21", + table: "Records", + type: "real", + nullable: true, + oldClrType: typeof(double), + oldType: "float", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Value20", + table: "Records", + type: "real", + nullable: true, + oldClrType: typeof(double), + oldType: "float", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Value2", + table: "Records", + type: "real", + nullable: true, + oldClrType: typeof(double), + oldType: "float", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Value19", + table: "Records", + type: "real", + nullable: true, + oldClrType: typeof(double), + oldType: "float", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Value18", + table: "Records", + type: "real", + nullable: true, + oldClrType: typeof(double), + oldType: "float", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Value17", + table: "Records", + type: "real", + nullable: true, + oldClrType: typeof(double), + oldType: "float", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Value16", + table: "Records", + type: "real", + nullable: true, + oldClrType: typeof(double), + oldType: "float", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Value15", + table: "Records", + type: "real", + nullable: true, + oldClrType: typeof(double), + oldType: "float", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Value14", + table: "Records", + type: "real", + nullable: true, + oldClrType: typeof(double), + oldType: "float", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Value13", + table: "Records", + type: "real", + nullable: true, + oldClrType: typeof(double), + oldType: "float", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Value12", + table: "Records", + type: "real", + nullable: true, + oldClrType: typeof(double), + oldType: "float", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Value11", + table: "Records", + type: "real", + nullable: true, + oldClrType: typeof(double), + oldType: "float", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Value10", + table: "Records", + type: "real", + nullable: true, + oldClrType: typeof(double), + oldType: "float", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Value1", + table: "Records", + type: "real", + nullable: true, + oldClrType: typeof(double), + oldType: "float", + oldNullable: true); + } + } +} diff --git a/WebAPI/Migrations/AppDbContextModelSnapshot.cs b/WebAPI/Migrations/AppDbContextModelSnapshot.cs index 0c6cd8d..e08c03b 100644 --- a/WebAPI/Migrations/AppDbContextModelSnapshot.cs +++ b/WebAPI/Migrations/AppDbContextModelSnapshot.cs @@ -17,7 +17,7 @@ namespace WebAPI.Migrations { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "7.0.12") + .HasAnnotation("ProductVersion", "7.0.13") .HasAnnotation("Relational:MaxIdentifierLength", 128); SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); @@ -129,101 +129,101 @@ namespace WebAPI.Migrations b.Property("ModifiedById") .HasColumnType("uniqueidentifier"); - b.Property("Value1") - .HasColumnType("real"); + b.Property("Value1") + .HasColumnType("float"); - b.Property("Value10") - .HasColumnType("real"); + b.Property("Value10") + .HasColumnType("float"); - b.Property("Value11") - .HasColumnType("real"); + b.Property("Value11") + .HasColumnType("float"); - b.Property("Value12") - .HasColumnType("real"); + b.Property("Value12") + .HasColumnType("float"); - b.Property("Value13") - .HasColumnType("real"); + b.Property("Value13") + .HasColumnType("float"); - b.Property("Value14") - .HasColumnType("real"); + b.Property("Value14") + .HasColumnType("float"); - b.Property("Value15") - .HasColumnType("real"); + b.Property("Value15") + .HasColumnType("float"); - b.Property("Value16") - .HasColumnType("real"); + b.Property("Value16") + .HasColumnType("float"); - b.Property("Value17") - .HasColumnType("real"); + b.Property("Value17") + .HasColumnType("float"); - b.Property("Value18") - .HasColumnType("real"); + b.Property("Value18") + .HasColumnType("float"); - b.Property("Value19") - .HasColumnType("real"); + b.Property("Value19") + .HasColumnType("float"); - b.Property("Value2") - .HasColumnType("real"); + b.Property("Value2") + .HasColumnType("float"); - b.Property("Value20") - .HasColumnType("real"); + b.Property("Value20") + .HasColumnType("float"); - b.Property("Value21") - .HasColumnType("real"); + b.Property("Value21") + .HasColumnType("float"); - b.Property("Value22") - .HasColumnType("real"); + b.Property("Value22") + .HasColumnType("float"); - b.Property("Value23") - .HasColumnType("real"); + b.Property("Value23") + .HasColumnType("float"); - b.Property("Value24") - .HasColumnType("real"); + b.Property("Value24") + .HasColumnType("float"); - b.Property("Value25") - .HasColumnType("real"); + b.Property("Value25") + .HasColumnType("float"); - b.Property("Value26") - .HasColumnType("real"); + b.Property("Value26") + .HasColumnType("float"); - b.Property("Value27") - .HasColumnType("real"); + b.Property("Value27") + .HasColumnType("float"); - b.Property("Value28") - .HasColumnType("real"); + b.Property("Value28") + .HasColumnType("float"); - b.Property("Value29") - .HasColumnType("real"); + b.Property("Value29") + .HasColumnType("float"); - b.Property("Value3") - .HasColumnType("real"); + b.Property("Value3") + .HasColumnType("float"); - b.Property("Value30") - .HasColumnType("real"); + b.Property("Value30") + .HasColumnType("float"); - b.Property("Value31") - .HasColumnType("real"); + b.Property("Value31") + .HasColumnType("float"); - b.Property("Value32") - .HasColumnType("real"); + b.Property("Value32") + .HasColumnType("float"); - b.Property("Value4") - .HasColumnType("real"); + b.Property("Value4") + .HasColumnType("float"); - b.Property("Value5") - .HasColumnType("real"); + b.Property("Value5") + .HasColumnType("float"); - b.Property("Value6") - .HasColumnType("real"); + b.Property("Value6") + .HasColumnType("float"); - b.Property("Value7") - .HasColumnType("real"); + b.Property("Value7") + .HasColumnType("float"); - b.Property("Value8") - .HasColumnType("real"); + b.Property("Value8") + .HasColumnType("float"); - b.Property("Value9") - .HasColumnType("real"); + b.Property("Value9") + .HasColumnType("float"); b.HasKey("Id");