Migration
This commit is contained in:
@@ -7,8 +7,8 @@ export const environment = {
|
|||||||
appName: "LOCAL_DiunaBI",
|
appName: "LOCAL_DiunaBI",
|
||||||
production: false,
|
production: false,
|
||||||
api: {
|
api: {
|
||||||
//url: "http://localhost:5400/api"
|
url: "http://localhost:5400/api"
|
||||||
url: "https://diunabi-morska.bim-it.pl/api"
|
//url: "https://diunabi-morska.bim-it.pl/api"
|
||||||
},
|
},
|
||||||
google: {
|
google: {
|
||||||
clientId: "107631825312-bkfe438ehr9k9ecb2h76g802tj6advma.apps.googleusercontent.com"
|
clientId: "107631825312-bkfe438ehr9k9ecb2h76g802tj6advma.apps.googleusercontent.com"
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ public class AppDbContext : DbContext
|
|||||||
public DbSet<Layer> Layers { get; init; }
|
public DbSet<Layer> Layers { get; init; }
|
||||||
public DbSet<Record> Records { get; init; }
|
public DbSet<Record> Records { get; init; }
|
||||||
public DbSet<ProcessSource> ProcessSources { get; init; }
|
public DbSet<ProcessSource> ProcessSources { get; init; }
|
||||||
public DbSet<DataInbox> DataInbox { get; set; }
|
// public DbSet<DataInbox> DataInbox { get; set; }
|
||||||
|
|
||||||
public AppDbContext(DbContextOptions<AppDbContext> options) : base(options)
|
public AppDbContext(DbContextOptions<AppDbContext> options) : base(options)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ namespace WebAPI.Migrations
|
|||||||
{
|
{
|
||||||
#pragma warning disable 612, 618
|
#pragma warning disable 612, 618
|
||||||
modelBuilder
|
modelBuilder
|
||||||
.HasAnnotation("ProductVersion", "7.0.13")
|
.HasAnnotation("ProductVersion", "8.0.6")
|
||||||
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||||
|
|
||||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
||||||
@@ -45,7 +45,8 @@ namespace WebAPI.Migrations
|
|||||||
|
|
||||||
b.Property<string>("Name")
|
b.Property<string>("Name")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasMaxLength(50)
|
||||||
|
.HasColumnType("nvarchar(50)");
|
||||||
|
|
||||||
b.Property<int>("Number")
|
b.Property<int>("Number")
|
||||||
.HasColumnType("int");
|
.HasColumnType("int");
|
||||||
@@ -53,10 +54,6 @@ namespace WebAPI.Migrations
|
|||||||
b.Property<Guid?>("ParentId")
|
b.Property<Guid?>("ParentId")
|
||||||
.HasColumnType("uniqueidentifier");
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
b.Property<string>("Source")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<int>("Type")
|
b.Property<int>("Type")
|
||||||
.HasColumnType("int");
|
.HasColumnType("int");
|
||||||
|
|
||||||
@@ -94,7 +91,8 @@ namespace WebAPI.Migrations
|
|||||||
|
|
||||||
b.Property<string>("Code")
|
b.Property<string>("Code")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasMaxLength(50)
|
||||||
|
.HasColumnType("nvarchar(50)");
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
b.Property<DateTime>("CreatedAt")
|
||||||
.HasColumnType("datetime2");
|
.HasColumnType("datetime2");
|
||||||
@@ -103,19 +101,8 @@ namespace WebAPI.Migrations
|
|||||||
.HasColumnType("uniqueidentifier");
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
b.Property<string>("Desc1")
|
b.Property<string>("Desc1")
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasMaxLength(1000)
|
||||||
|
.HasColumnType("nvarchar(1000)");
|
||||||
b.Property<string>("Desc2")
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Desc3")
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Desc4")
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Desc5")
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<bool>("IsDeleted")
|
b.Property<bool>("IsDeleted")
|
||||||
.HasColumnType("bit");
|
.HasColumnType("bit");
|
||||||
@@ -246,7 +233,8 @@ namespace WebAPI.Migrations
|
|||||||
.HasColumnType("datetime2");
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
b.Property<string>("Email")
|
b.Property<string>("Email")
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasMaxLength(50)
|
||||||
|
.HasColumnType("nvarchar(50)");
|
||||||
|
|
||||||
b.Property<string>("UserName")
|
b.Property<string>("UserName")
|
||||||
.HasMaxLength(50)
|
.HasMaxLength(50)
|
||||||
@@ -285,7 +273,7 @@ namespace WebAPI.Migrations
|
|||||||
modelBuilder.Entity("WebAPI.Models.ProcessSource", b =>
|
modelBuilder.Entity("WebAPI.Models.ProcessSource", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("WebAPI.Models.Layer", "Source")
|
b.HasOne("WebAPI.Models.Layer", "Source")
|
||||||
.WithMany("Sources")
|
.WithMany()
|
||||||
.HasForeignKey("SourceId")
|
.HasForeignKey("SourceId")
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
.IsRequired();
|
.IsRequired();
|
||||||
@@ -321,8 +309,6 @@ namespace WebAPI.Migrations
|
|||||||
modelBuilder.Entity("WebAPI.Models.Layer", b =>
|
modelBuilder.Entity("WebAPI.Models.Layer", b =>
|
||||||
{
|
{
|
||||||
b.Navigation("Records");
|
b.Navigation("Records");
|
||||||
|
|
||||||
b.Navigation("Sources");
|
|
||||||
});
|
});
|
||||||
#pragma warning restore 612, 618
|
#pragma warning restore 612, 618
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ public class Layer
|
|||||||
public Guid Id { get; init; }
|
public Guid Id { get; init; }
|
||||||
[Required]
|
[Required]
|
||||||
public int Number { get; init; }
|
public int Number { get; init; }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
[MaxLength(50)]
|
[MaxLength(50)]
|
||||||
public string? Name { get; set; }
|
public string? Name { get; set; }
|
||||||
|
|||||||
@@ -43,17 +43,8 @@ public class Record
|
|||||||
public double? Value31 { get; set; }
|
public double? Value31 { get; set; }
|
||||||
public double? Value32 { get; set; }
|
public double? Value32 { get; set; }
|
||||||
//Description fields
|
//Description fields
|
||||||
[StringLength(50)]
|
[StringLength(1000)]
|
||||||
public string? Desc1 { get; init; }
|
public string? Desc1 { get; init; }
|
||||||
[StringLength(50)]
|
|
||||||
public string? Desc2 { get; init; }
|
|
||||||
[StringLength(50)]
|
|
||||||
public string? Desc3 { get; init; }
|
|
||||||
[StringLength(50)]
|
|
||||||
public string? Desc4 { get; init; }
|
|
||||||
[StringLength(50)]
|
|
||||||
public string? Desc5 { get; init; }
|
|
||||||
[StringLength(50)]
|
|
||||||
public DateTime CreatedAt { get; set; }
|
public DateTime CreatedAt { get; set; }
|
||||||
public DateTime ModifiedAt { get; set; }
|
public DateTime ModifiedAt { get; set; }
|
||||||
public bool IsDeleted { get; init; }
|
public bool IsDeleted { get; init; }
|
||||||
|
|||||||
Reference in New Issue
Block a user