From 340ba6fa6df9f486f400d2c9e3bb1181e887b902 Mon Sep 17 00:00:00 2001 From: uppuv Date: Tue, 10 Oct 2023 16:34:56 -0400 Subject: [PATCH] removed all migrations --- .../20230816214724_InitialCreate.Designer.cs | 58 ------- .../20230816214724_InitialCreate.cs | 37 ---- .../AnswerDbContextModelSnapshot.cs | 55 ------ ...230817212256_InitialAttachment.Designer.cs | 60 ------- .../20230817212256_InitialAttachment.cs | 38 ---- .../AttachmentsDbContextModelSnapshot.cs | 57 ------ .../20230926163717_doculinkUpdate.Designer.cs | 162 ------------------ .../DocumentDbContextModelSnapshot.cs | 159 ----------------- .../20230817213656_InitialEmployee.cs | 39 ----- .../20230913164315_employeeupdate.Designer.cs | 72 -------- .../EmployeeDbContextModelSnapshot.cs | 69 -------- ...20230817214454_InitialLocation.Designer.cs | 80 --------- .../20230817214454_InitialLocation.cs | 52 ------ .../LocationDbContextModelSnapshot.cs | 77 --------- ...20230817215744_InitialQuestion.Designer.cs | 143 ---------------- .../20230817215744_InitialQuestion.cs | 103 ----------- .../QuestionDbContextModelSnapshot.cs | 140 --------------- .../20230817220614_InitialSurvey.Designer.cs | 57 ------ .../20230817220614_InitialSurvey.cs | 38 ---- .../SurveysDbContextModelSnapshot.cs | 54 ------ 20 files changed, 1550 deletions(-) delete mode 100644 DamageAssesmentApi/DamageAssesment.Api.Answers/Migrations/20230816214724_InitialCreate.Designer.cs delete mode 100644 DamageAssesmentApi/DamageAssesment.Api.Answers/Migrations/20230816214724_InitialCreate.cs delete mode 100644 DamageAssesmentApi/DamageAssesment.Api.Answers/Migrations/AnswerDbContextModelSnapshot.cs delete mode 100644 DamageAssesmentApi/DamageAssesment.Api.Attachments/Migrations/20230817212256_InitialAttachment.Designer.cs delete mode 100644 DamageAssesmentApi/DamageAssesment.Api.Attachments/Migrations/20230817212256_InitialAttachment.cs delete mode 100644 DamageAssesmentApi/DamageAssesment.Api.Attachments/Migrations/AttachmentsDbContextModelSnapshot.cs delete mode 100644 DamageAssesmentApi/DamageAssesment.Api.DocuLinks/Migrations/20230926163717_doculinkUpdate.Designer.cs delete mode 100644 DamageAssesmentApi/DamageAssesment.Api.DocuLinks/Migrations/DocumentDbContextModelSnapshot.cs delete mode 100644 DamageAssesmentApi/DamageAssesment.Api.Employees/Migrations/20230817213656_InitialEmployee.cs delete mode 100644 DamageAssesmentApi/DamageAssesment.Api.Employees/Migrations/20230913164315_employeeupdate.Designer.cs delete mode 100644 DamageAssesmentApi/DamageAssesment.Api.Employees/Migrations/EmployeeDbContextModelSnapshot.cs delete mode 100644 DamageAssesmentApi/DamageAssesment.Api.Locations/Migrations/20230817214454_InitialLocation.Designer.cs delete mode 100644 DamageAssesmentApi/DamageAssesment.Api.Locations/Migrations/20230817214454_InitialLocation.cs delete mode 100644 DamageAssesmentApi/DamageAssesment.Api.Locations/Migrations/LocationDbContextModelSnapshot.cs delete mode 100644 DamageAssesmentApi/DamageAssesment.Api.Questions/Migrations/20230817215744_InitialQuestion.Designer.cs delete mode 100644 DamageAssesmentApi/DamageAssesment.Api.Questions/Migrations/20230817215744_InitialQuestion.cs delete mode 100644 DamageAssesmentApi/DamageAssesment.Api.Questions/Migrations/QuestionDbContextModelSnapshot.cs delete mode 100644 DamageAssesmentApi/DamageAssesment.Api.Surveys/Migrations/20230817220614_InitialSurvey.Designer.cs delete mode 100644 DamageAssesmentApi/DamageAssesment.Api.Surveys/Migrations/20230817220614_InitialSurvey.cs delete mode 100644 DamageAssesmentApi/DamageAssesment.Api.Surveys/Migrations/SurveysDbContextModelSnapshot.cs diff --git a/DamageAssesmentApi/DamageAssesment.Api.Answers/Migrations/20230816214724_InitialCreate.Designer.cs b/DamageAssesmentApi/DamageAssesment.Api.Answers/Migrations/20230816214724_InitialCreate.Designer.cs deleted file mode 100644 index cd62640..0000000 --- a/DamageAssesmentApi/DamageAssesment.Api.Answers/Migrations/20230816214724_InitialCreate.Designer.cs +++ /dev/null @@ -1,58 +0,0 @@ -// -using System; -using DamageAssesment.Api.Answers.Db; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace DamageAssesment.Api.Answers.Migrations -{ - [DbContext(typeof(AnswerDbContext))] - [Migration("20230816214724_InitialCreate")] - partial class InitialCreate - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.9") - .HasAnnotation("Relational:MaxIdentifierLength", 128); - - SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); - - modelBuilder.Entity("DamageAssesment.Api.Answers.Db.Answer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("AnswerText") - .IsRequired() - .HasMaxLength(250) - .HasColumnType("nvarchar(250)"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("QuestionId") - .HasColumnType("int"); - - b.Property("SurveyResponseId") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.ToTable("Answers"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/DamageAssesmentApi/DamageAssesment.Api.Answers/Migrations/20230816214724_InitialCreate.cs b/DamageAssesmentApi/DamageAssesment.Api.Answers/Migrations/20230816214724_InitialCreate.cs deleted file mode 100644 index ff519b4..0000000 --- a/DamageAssesmentApi/DamageAssesment.Api.Answers/Migrations/20230816214724_InitialCreate.cs +++ /dev/null @@ -1,37 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace DamageAssesment.Api.Answers.Migrations -{ - /// - public partial class InitialCreate : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "Answers", - columns: table => new - { - Id = table.Column(type: "int", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), - QuestionId = table.Column(type: "int", nullable: false), - AnswerText = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: false), - Comment = table.Column(type: "nvarchar(max)", nullable: false), - SurveyResponseId = table.Column(type: "int", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Answers", x => x.Id); - }); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "Answers"); - } - } -} diff --git a/DamageAssesmentApi/DamageAssesment.Api.Answers/Migrations/AnswerDbContextModelSnapshot.cs b/DamageAssesmentApi/DamageAssesment.Api.Answers/Migrations/AnswerDbContextModelSnapshot.cs deleted file mode 100644 index 02d3df3..0000000 --- a/DamageAssesmentApi/DamageAssesment.Api.Answers/Migrations/AnswerDbContextModelSnapshot.cs +++ /dev/null @@ -1,55 +0,0 @@ -// -using System; -using DamageAssesment.Api.Answers.Db; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace DamageAssesment.Api.Answers.Migrations -{ - [DbContext(typeof(AnswerDbContext))] - partial class AnswerDbContextModelSnapshot : ModelSnapshot - { - protected override void BuildModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.9") - .HasAnnotation("Relational:MaxIdentifierLength", 128); - - SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); - - modelBuilder.Entity("DamageAssesment.Api.Answers.Db.Answer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("AnswerText") - .IsRequired() - .HasMaxLength(250) - .HasColumnType("nvarchar(250)"); - - b.Property("Comment") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("QuestionId") - .HasColumnType("int"); - - b.Property("SurveyResponseId") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.ToTable("Answers"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/DamageAssesmentApi/DamageAssesment.Api.Attachments/Migrations/20230817212256_InitialAttachment.Designer.cs b/DamageAssesmentApi/DamageAssesment.Api.Attachments/Migrations/20230817212256_InitialAttachment.Designer.cs deleted file mode 100644 index ae47dfd..0000000 --- a/DamageAssesmentApi/DamageAssesment.Api.Attachments/Migrations/20230817212256_InitialAttachment.Designer.cs +++ /dev/null @@ -1,60 +0,0 @@ -// -using System; -using DamageAssesment.Api.Attachments.Db; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace DamageAssesment.Api.Attachments.Migrations -{ - [DbContext(typeof(AttachmentsDbContext))] - [Migration("20230817212256_InitialAttachment")] - partial class InitialAttachment - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.9") - .HasAnnotation("Relational:MaxIdentifierLength", 128); - - SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); - - modelBuilder.Entity("DamageAssesment.Api.Attachments.Db.Attachment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("AnswerId") - .HasColumnType("int"); - - b.Property("FileName") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("IsDeleted") - .HasColumnType("bit"); - - b.Property("ResponseId") - .HasColumnType("int"); - - b.Property("URI") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.ToTable("Attachments"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/DamageAssesmentApi/DamageAssesment.Api.Attachments/Migrations/20230817212256_InitialAttachment.cs b/DamageAssesmentApi/DamageAssesment.Api.Attachments/Migrations/20230817212256_InitialAttachment.cs deleted file mode 100644 index 2b260ed..0000000 --- a/DamageAssesmentApi/DamageAssesment.Api.Attachments/Migrations/20230817212256_InitialAttachment.cs +++ /dev/null @@ -1,38 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace DamageAssesment.Api.Attachments.Migrations -{ - /// - public partial class InitialAttachment : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "Attachments", - columns: table => new - { - Id = table.Column(type: "int", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), - URI = table.Column(type: "nvarchar(max)", nullable: false), - AnswerId = table.Column(type: "int", nullable: true), - ResponseId = table.Column(type: "int", nullable: false), - IsDeleted = table.Column(type: "bit", nullable: false), - FileName = table.Column(type: "nvarchar(max)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Attachments", x => x.Id); - }); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "Attachments"); - } - } -} diff --git a/DamageAssesmentApi/DamageAssesment.Api.Attachments/Migrations/AttachmentsDbContextModelSnapshot.cs b/DamageAssesmentApi/DamageAssesment.Api.Attachments/Migrations/AttachmentsDbContextModelSnapshot.cs deleted file mode 100644 index 8f0cc45..0000000 --- a/DamageAssesmentApi/DamageAssesment.Api.Attachments/Migrations/AttachmentsDbContextModelSnapshot.cs +++ /dev/null @@ -1,57 +0,0 @@ -// -using System; -using DamageAssesment.Api.Attachments.Db; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace DamageAssesment.Api.Attachments.Migrations -{ - [DbContext(typeof(AttachmentsDbContext))] - partial class AttachmentsDbContextModelSnapshot : ModelSnapshot - { - protected override void BuildModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.9") - .HasAnnotation("Relational:MaxIdentifierLength", 128); - - SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); - - modelBuilder.Entity("DamageAssesment.Api.Attachments.Db.Attachment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("AnswerId") - .HasColumnType("int"); - - b.Property("FileName") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("IsDeleted") - .HasColumnType("bit"); - - b.Property("ResponseId") - .HasColumnType("int"); - - b.Property("URI") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.ToTable("Attachments"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/DamageAssesmentApi/DamageAssesment.Api.DocuLinks/Migrations/20230926163717_doculinkUpdate.Designer.cs b/DamageAssesmentApi/DamageAssesment.Api.DocuLinks/Migrations/20230926163717_doculinkUpdate.Designer.cs deleted file mode 100644 index a8fd840..0000000 --- a/DamageAssesmentApi/DamageAssesment.Api.DocuLinks/Migrations/20230926163717_doculinkUpdate.Designer.cs +++ /dev/null @@ -1,162 +0,0 @@ -// -using System; -using DamageAssesment.Api.DocuLinks.Db; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace DamageAssesment.Api.DocuLinks.Migrations -{ - [DbContext(typeof(DoculinkDbContext))] - [Migration("20230926163717_doculinkUpdate")] - partial class doculinkUpdate - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.9") - .HasAnnotation("Relational:MaxIdentifierLength", 128); - - SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); - - modelBuilder.Entity("DamageAssesment.Api.DocuLinks.Db.Doculink", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("CustomOrder") - .HasColumnType("int"); - - b.Property("IsActive") - .HasColumnType("bit"); - - b.Property("IsDeleted") - .HasColumnType("bit"); - - b.Property("dateCreated") - .HasColumnType("datetime2"); - - b.Property("dateUpdated") - .HasColumnType("datetime2"); - - b.Property("linkTypeId") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.ToTable("Documents"); - }); - - modelBuilder.Entity("DamageAssesment.Api.DocuLinks.Db.DoculinkAttachments", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("CustomOrder") - .HasColumnType("int"); - - b.Property("DocumentId") - .HasColumnType("int"); - - b.Property("IsAttachments") - .HasColumnType("bit"); - - b.Property("Path") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("docName") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.ToTable("DoclinksAttachments"); - }); - - modelBuilder.Entity("DamageAssesment.Api.DocuLinks.Db.DoculinkTranslation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("DocumentId") - .HasColumnType("int"); - - b.Property("Language") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("description") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("title") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.ToTable("DocumentsTranslations"); - }); - - modelBuilder.Entity("DamageAssesment.Api.DocuLinks.Db.LinkType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("CustomOrder") - .HasColumnType("int"); - - b.Property("IsActive") - .HasColumnType("bit"); - - b.HasKey("Id"); - - b.ToTable("LinkTypes"); - }); - - modelBuilder.Entity("DamageAssesment.Api.DocuLinks.Db.LinksTranslation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("Language") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("LinkTypeId") - .HasColumnType("int"); - - b.Property("TypeText") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.ToTable("LinksTranslations"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/DamageAssesmentApi/DamageAssesment.Api.DocuLinks/Migrations/DocumentDbContextModelSnapshot.cs b/DamageAssesmentApi/DamageAssesment.Api.DocuLinks/Migrations/DocumentDbContextModelSnapshot.cs deleted file mode 100644 index 536727e..0000000 --- a/DamageAssesmentApi/DamageAssesment.Api.DocuLinks/Migrations/DocumentDbContextModelSnapshot.cs +++ /dev/null @@ -1,159 +0,0 @@ -// -using System; -using DamageAssesment.Api.DocuLinks.Db; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace DamageAssesment.Api.DocuLinks.Migrations -{ - [DbContext(typeof(DoculinkDbContext))] - partial class DocumentDbContextModelSnapshot : ModelSnapshot - { - protected override void BuildModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.9") - .HasAnnotation("Relational:MaxIdentifierLength", 128); - - SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); - - modelBuilder.Entity("DamageAssesment.Api.DocuLinks.Db.Doculink", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("CustomOrder") - .HasColumnType("int"); - - b.Property("IsActive") - .HasColumnType("bit"); - - b.Property("IsDeleted") - .HasColumnType("bit"); - - b.Property("dateCreated") - .HasColumnType("datetime2"); - - b.Property("dateUpdated") - .HasColumnType("datetime2"); - - b.Property("linkTypeId") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.ToTable("Documents"); - }); - - modelBuilder.Entity("DamageAssesment.Api.DocuLinks.Db.DoculinkAttachments", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("CustomOrder") - .HasColumnType("int"); - - b.Property("DocumentId") - .HasColumnType("int"); - - b.Property("IsAttachments") - .HasColumnType("bit"); - - b.Property("Path") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("docName") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.ToTable("DoclinksAttachments"); - }); - - modelBuilder.Entity("DamageAssesment.Api.DocuLinks.Db.DoculinkTranslation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("DocumentId") - .HasColumnType("int"); - - b.Property("Language") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("description") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("title") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.ToTable("DocumentsTranslations"); - }); - - modelBuilder.Entity("DamageAssesment.Api.DocuLinks.Db.LinkType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("CustomOrder") - .HasColumnType("int"); - - b.Property("IsActive") - .HasColumnType("bit"); - - b.HasKey("Id"); - - b.ToTable("LinkTypes"); - }); - - modelBuilder.Entity("DamageAssesment.Api.DocuLinks.Db.LinksTranslation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("Language") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("LinkTypeId") - .HasColumnType("int"); - - b.Property("TypeText") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.ToTable("LinksTranslations"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/DamageAssesmentApi/DamageAssesment.Api.Employees/Migrations/20230817213656_InitialEmployee.cs b/DamageAssesmentApi/DamageAssesment.Api.Employees/Migrations/20230817213656_InitialEmployee.cs deleted file mode 100644 index 607751e..0000000 --- a/DamageAssesmentApi/DamageAssesment.Api.Employees/Migrations/20230817213656_InitialEmployee.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace DamageAssesment.Api.Employees.Migrations -{ - /// - public partial class InitialEmployee : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "Employees", - columns: table => new - { - Id = table.Column(type: "nvarchar(450)", nullable: false), - Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), - BirthDate = table.Column(type: "datetime2", nullable: false), - OfficePhoneNumber = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), - Email = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), - IsActive = table.Column(type: "bit", nullable: false), - PreferredLanguage = table.Column(type: "nvarchar(max)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Employees", x => x.Id); - }); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "Employees"); - } - } -} diff --git a/DamageAssesmentApi/DamageAssesment.Api.Employees/Migrations/20230913164315_employeeupdate.Designer.cs b/DamageAssesmentApi/DamageAssesment.Api.Employees/Migrations/20230913164315_employeeupdate.Designer.cs deleted file mode 100644 index b4aebb2..0000000 --- a/DamageAssesmentApi/DamageAssesment.Api.Employees/Migrations/20230913164315_employeeupdate.Designer.cs +++ /dev/null @@ -1,72 +0,0 @@ -// -using System; -using DamageAssesment.Api.Employees.Db; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace DamageAssesment.Api.Employees.Migrations -{ - [DbContext(typeof(EmployeeDbContext))] - [Migration("20230913164315_employeeupdate")] - partial class employeeupdate - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.9") - .HasAnnotation("Relational:MaxIdentifierLength", 128); - - SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); - - modelBuilder.Entity("DamageAssesment.Api.Employees.Db.Employee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("BirthDate") - .HasColumnType("datetime2"); - - b.Property("Email") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.Property("EmployeeCode") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.Property("IsActive") - .HasColumnType("bit"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.Property("OfficePhoneNumber") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.Property("PreferredLanguage") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.ToTable("Employees"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/DamageAssesmentApi/DamageAssesment.Api.Employees/Migrations/EmployeeDbContextModelSnapshot.cs b/DamageAssesmentApi/DamageAssesment.Api.Employees/Migrations/EmployeeDbContextModelSnapshot.cs deleted file mode 100644 index 3bfb33c..0000000 --- a/DamageAssesmentApi/DamageAssesment.Api.Employees/Migrations/EmployeeDbContextModelSnapshot.cs +++ /dev/null @@ -1,69 +0,0 @@ -// -using System; -using DamageAssesment.Api.Employees.Db; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace DamageAssesment.Api.Employees.Migrations -{ - [DbContext(typeof(EmployeeDbContext))] - partial class EmployeeDbContextModelSnapshot : ModelSnapshot - { - protected override void BuildModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.9") - .HasAnnotation("Relational:MaxIdentifierLength", 128); - - SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); - - modelBuilder.Entity("DamageAssesment.Api.Employees.Db.Employee", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("BirthDate") - .HasColumnType("datetime2"); - - b.Property("Email") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.Property("EmployeeCode") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.Property("IsActive") - .HasColumnType("bit"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.Property("OfficePhoneNumber") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.Property("PreferredLanguage") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.ToTable("Employees"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/DamageAssesmentApi/DamageAssesment.Api.Locations/Migrations/20230817214454_InitialLocation.Designer.cs b/DamageAssesmentApi/DamageAssesment.Api.Locations/Migrations/20230817214454_InitialLocation.Designer.cs deleted file mode 100644 index 3e27956..0000000 --- a/DamageAssesmentApi/DamageAssesment.Api.Locations/Migrations/20230817214454_InitialLocation.Designer.cs +++ /dev/null @@ -1,80 +0,0 @@ -// -using DamageAssesment.Api.Locations.Db; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace DamageAssesment.Api.Locations.Migrations -{ - [DbContext(typeof(LocationDbContext))] - [Migration("20230817214454_InitialLocation")] - partial class InitialLocation - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.9") - .HasAnnotation("Relational:MaxIdentifierLength", 128); - - SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); - - modelBuilder.Entity("DamageAssesment.Api.Locations.Db.Location", b => - { - b.Property("Id") - .HasMaxLength(4) - .HasColumnType("nvarchar(4)"); - - b.Property("MaintenanceCenter") - .IsRequired() - .HasMaxLength(1) - .HasColumnType("nvarchar(1)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.Property("RegionId") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("SchoolType") - .IsRequired() - .HasMaxLength(2) - .HasColumnType("nvarchar(2)"); - - b.HasKey("Id"); - - b.ToTable("Locations"); - }); - - modelBuilder.Entity("DamageAssesment.Api.Locations.Db.Region", b => - { - b.Property("Id") - .HasMaxLength(2) - .HasColumnType("nvarchar(2)"); - - b.Property("Abbreviation") - .IsRequired() - .HasMaxLength(5) - .HasColumnType("nvarchar(5)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.HasKey("Id"); - - b.ToTable("Regions"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/DamageAssesmentApi/DamageAssesment.Api.Locations/Migrations/20230817214454_InitialLocation.cs b/DamageAssesmentApi/DamageAssesment.Api.Locations/Migrations/20230817214454_InitialLocation.cs deleted file mode 100644 index 4143c63..0000000 --- a/DamageAssesmentApi/DamageAssesment.Api.Locations/Migrations/20230817214454_InitialLocation.cs +++ /dev/null @@ -1,52 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace DamageAssesment.Api.Locations.Migrations -{ - /// - public partial class InitialLocation : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "Locations", - columns: table => new - { - Id = table.Column(type: "nvarchar(4)", maxLength: 4, nullable: false), - Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), - MaintenanceCenter = table.Column(type: "nvarchar(1)", maxLength: 1, nullable: false), - SchoolType = table.Column(type: "nvarchar(2)", maxLength: 2, nullable: false), - RegionId = table.Column(type: "nvarchar(max)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Locations", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Regions", - columns: table => new - { - Id = table.Column(type: "nvarchar(2)", maxLength: 2, nullable: false), - Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), - Abbreviation = table.Column(type: "nvarchar(5)", maxLength: 5, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Regions", x => x.Id); - }); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "Locations"); - - migrationBuilder.DropTable( - name: "Regions"); - } - } -} diff --git a/DamageAssesmentApi/DamageAssesment.Api.Locations/Migrations/LocationDbContextModelSnapshot.cs b/DamageAssesmentApi/DamageAssesment.Api.Locations/Migrations/LocationDbContextModelSnapshot.cs deleted file mode 100644 index 0ae10ad..0000000 --- a/DamageAssesmentApi/DamageAssesment.Api.Locations/Migrations/LocationDbContextModelSnapshot.cs +++ /dev/null @@ -1,77 +0,0 @@ -// -using DamageAssesment.Api.Locations.Db; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace DamageAssesment.Api.Locations.Migrations -{ - [DbContext(typeof(LocationDbContext))] - partial class LocationDbContextModelSnapshot : ModelSnapshot - { - protected override void BuildModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.9") - .HasAnnotation("Relational:MaxIdentifierLength", 128); - - SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); - - modelBuilder.Entity("DamageAssesment.Api.Locations.Db.Location", b => - { - b.Property("Id") - .HasMaxLength(4) - .HasColumnType("nvarchar(4)"); - - b.Property("MaintenanceCenter") - .IsRequired() - .HasMaxLength(1) - .HasColumnType("nvarchar(1)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.Property("RegionId") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("SchoolType") - .IsRequired() - .HasMaxLength(2) - .HasColumnType("nvarchar(2)"); - - b.HasKey("Id"); - - b.ToTable("Locations"); - }); - - modelBuilder.Entity("DamageAssesment.Api.Locations.Db.Region", b => - { - b.Property("Id") - .HasMaxLength(2) - .HasColumnType("nvarchar(2)"); - - b.Property("Abbreviation") - .IsRequired() - .HasMaxLength(5) - .HasColumnType("nvarchar(5)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.HasKey("Id"); - - b.ToTable("Regions"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/DamageAssesmentApi/DamageAssesment.Api.Questions/Migrations/20230817215744_InitialQuestion.Designer.cs b/DamageAssesmentApi/DamageAssesment.Api.Questions/Migrations/20230817215744_InitialQuestion.Designer.cs deleted file mode 100644 index 4cbbf64..0000000 --- a/DamageAssesmentApi/DamageAssesment.Api.Questions/Migrations/20230817215744_InitialQuestion.Designer.cs +++ /dev/null @@ -1,143 +0,0 @@ -// -using System; -using DamageAssesment.Api.Questions.Db; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace DamageAssesment.Api.Questions.Migrations -{ - [DbContext(typeof(QuestionDbContext))] - [Migration("20230817215744_InitialQuestion")] - partial class InitialQuestion - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.9") - .HasAnnotation("Relational:MaxIdentifierLength", 128); - - SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); - - modelBuilder.Entity("DamageAssesment.Api.Questions.Db.Question", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("CategoryId") - .HasColumnType("int"); - - b.Property("Comment") - .HasColumnType("bit"); - - b.Property("IsRequired") - .HasColumnType("bit"); - - b.Property("Key") - .HasColumnType("bit"); - - b.Property("QuestionGroup") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("QuestionNumber") - .HasColumnType("int"); - - b.Property("QuestionTypeId") - .HasColumnType("int"); - - b.Property("SurveyId") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("QuestionTypeId"); - - b.ToTable("Questions"); - }); - - modelBuilder.Entity("DamageAssesment.Api.Questions.Db.QuestionCategory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("CategoryImage") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("CategoryName") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.ToTable("QuestionCategories"); - }); - - modelBuilder.Entity("DamageAssesment.Api.Questions.Db.QuestionType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("TypeText") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.ToTable("QuestionTypes"); - }); - - modelBuilder.Entity("DamageAssesment.Api.Questions.Db.QuestionsTranslation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("Language") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("QuestionId") - .HasColumnType("int"); - - b.Property("QuestionText") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.ToTable("QuestionsTranslations"); - }); - - modelBuilder.Entity("DamageAssesment.Api.Questions.Db.Question", b => - { - b.HasOne("DamageAssesment.Api.Questions.Db.QuestionType", "QuestionType") - .WithMany() - .HasForeignKey("QuestionTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("QuestionType"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/DamageAssesmentApi/DamageAssesment.Api.Questions/Migrations/20230817215744_InitialQuestion.cs b/DamageAssesmentApi/DamageAssesment.Api.Questions/Migrations/20230817215744_InitialQuestion.cs deleted file mode 100644 index aaaf018..0000000 --- a/DamageAssesmentApi/DamageAssesment.Api.Questions/Migrations/20230817215744_InitialQuestion.cs +++ /dev/null @@ -1,103 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace DamageAssesment.Api.Questions.Migrations -{ - /// - public partial class InitialQuestion : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "QuestionCategories", - columns: table => new - { - Id = table.Column(type: "int", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), - CategoryName = table.Column(type: "nvarchar(max)", nullable: false), - CategoryImage = table.Column(type: "nvarchar(max)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_QuestionCategories", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "QuestionsTranslations", - columns: table => new - { - Id = table.Column(type: "int", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), - QuestionId = table.Column(type: "int", nullable: false), - QuestionText = table.Column(type: "nvarchar(max)", nullable: false), - Language = table.Column(type: "nvarchar(max)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_QuestionsTranslations", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "QuestionTypes", - columns: table => new - { - Id = table.Column(type: "int", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), - TypeText = table.Column(type: "nvarchar(max)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_QuestionTypes", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Questions", - columns: table => new - { - Id = table.Column(type: "int", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), - QuestionTypeId = table.Column(type: "int", nullable: false), - QuestionNumber = table.Column(type: "int", nullable: false), - IsRequired = table.Column(type: "bit", nullable: false), - Comment = table.Column(type: "bit", nullable: false), - Key = table.Column(type: "bit", nullable: false), - SurveyId = table.Column(type: "int", nullable: true), - QuestionGroup = table.Column(type: "nvarchar(max)", nullable: false), - CategoryId = table.Column(type: "int", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Questions", x => x.Id); - table.ForeignKey( - name: "FK_Questions_QuestionTypes_QuestionTypeId", - column: x => x.QuestionTypeId, - principalTable: "QuestionTypes", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateIndex( - name: "IX_Questions_QuestionTypeId", - table: "Questions", - column: "QuestionTypeId"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "QuestionCategories"); - - migrationBuilder.DropTable( - name: "Questions"); - - migrationBuilder.DropTable( - name: "QuestionsTranslations"); - - migrationBuilder.DropTable( - name: "QuestionTypes"); - } - } -} diff --git a/DamageAssesmentApi/DamageAssesment.Api.Questions/Migrations/QuestionDbContextModelSnapshot.cs b/DamageAssesmentApi/DamageAssesment.Api.Questions/Migrations/QuestionDbContextModelSnapshot.cs deleted file mode 100644 index 018f296..0000000 --- a/DamageAssesmentApi/DamageAssesment.Api.Questions/Migrations/QuestionDbContextModelSnapshot.cs +++ /dev/null @@ -1,140 +0,0 @@ -// -using System; -using DamageAssesment.Api.Questions.Db; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace DamageAssesment.Api.Questions.Migrations -{ - [DbContext(typeof(QuestionDbContext))] - partial class QuestionDbContextModelSnapshot : ModelSnapshot - { - protected override void BuildModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.9") - .HasAnnotation("Relational:MaxIdentifierLength", 128); - - SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); - - modelBuilder.Entity("DamageAssesment.Api.Questions.Db.Question", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("CategoryId") - .HasColumnType("int"); - - b.Property("Comment") - .HasColumnType("bit"); - - b.Property("IsRequired") - .HasColumnType("bit"); - - b.Property("Key") - .HasColumnType("bit"); - - b.Property("QuestionGroup") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("QuestionNumber") - .HasColumnType("int"); - - b.Property("QuestionTypeId") - .HasColumnType("int"); - - b.Property("SurveyId") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("QuestionTypeId"); - - b.ToTable("Questions"); - }); - - modelBuilder.Entity("DamageAssesment.Api.Questions.Db.QuestionCategory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("CategoryImage") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("CategoryName") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.ToTable("QuestionCategories"); - }); - - modelBuilder.Entity("DamageAssesment.Api.Questions.Db.QuestionType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("TypeText") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.ToTable("QuestionTypes"); - }); - - modelBuilder.Entity("DamageAssesment.Api.Questions.Db.QuestionsTranslation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("Language") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("QuestionId") - .HasColumnType("int"); - - b.Property("QuestionText") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.ToTable("QuestionsTranslations"); - }); - - modelBuilder.Entity("DamageAssesment.Api.Questions.Db.Question", b => - { - b.HasOne("DamageAssesment.Api.Questions.Db.QuestionType", "QuestionType") - .WithMany() - .HasForeignKey("QuestionTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("QuestionType"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/DamageAssesmentApi/DamageAssesment.Api.Surveys/Migrations/20230817220614_InitialSurvey.Designer.cs b/DamageAssesmentApi/DamageAssesment.Api.Surveys/Migrations/20230817220614_InitialSurvey.Designer.cs deleted file mode 100644 index c0f4172..0000000 --- a/DamageAssesmentApi/DamageAssesment.Api.Surveys/Migrations/20230817220614_InitialSurvey.Designer.cs +++ /dev/null @@ -1,57 +0,0 @@ -// -using System; -using DamageAssesment.Api.Surveys.Db; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace DamageAssesment.Api.Survey.Migrations -{ - [DbContext(typeof(SurveysDbContext))] - [Migration("20230817220614_InitialSurvey")] - partial class InitialSurvey - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.9") - .HasAnnotation("Relational:MaxIdentifierLength", 128); - - SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); - - modelBuilder.Entity("DamageAssesment.Api.Surveys.Db.Survey", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("EndDate") - .HasColumnType("datetime2"); - - b.Property("IsEnabled") - .HasColumnType("bit"); - - b.Property("StartDate") - .HasColumnType("datetime2"); - - b.Property("Title") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("nvarchar(100)"); - - b.HasKey("Id"); - - b.ToTable("Surveys"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/DamageAssesmentApi/DamageAssesment.Api.Surveys/Migrations/20230817220614_InitialSurvey.cs b/DamageAssesmentApi/DamageAssesment.Api.Surveys/Migrations/20230817220614_InitialSurvey.cs deleted file mode 100644 index 1d62693..0000000 --- a/DamageAssesmentApi/DamageAssesment.Api.Surveys/Migrations/20230817220614_InitialSurvey.cs +++ /dev/null @@ -1,38 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace DamageAssesment.Api.Survey.Migrations -{ - /// - public partial class InitialSurvey : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "Surveys", - columns: table => new - { - Id = table.Column(type: "int", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), - Title = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), - IsEnabled = table.Column(type: "bit", nullable: false), - StartDate = table.Column(type: "datetime2", nullable: true), - EndDate = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Surveys", x => x.Id); - }); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "Surveys"); - } - } -} diff --git a/DamageAssesmentApi/DamageAssesment.Api.Surveys/Migrations/SurveysDbContextModelSnapshot.cs b/DamageAssesmentApi/DamageAssesment.Api.Surveys/Migrations/SurveysDbContextModelSnapshot.cs deleted file mode 100644 index 969a062..0000000 --- a/DamageAssesmentApi/DamageAssesment.Api.Surveys/Migrations/SurveysDbContextModelSnapshot.cs +++ /dev/null @@ -1,54 +0,0 @@ -// -using System; -using DamageAssesment.Api.Surveys.Db; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace DamageAssesment.Api.Survey.Migrations -{ - [DbContext(typeof(SurveysDbContext))] - partial class SurveysDbContextModelSnapshot : ModelSnapshot - { - protected override void BuildModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.9") - .HasAnnotation("Relational:MaxIdentifierLength", 128); - - SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); - - modelBuilder.Entity("DamageAssesment.Api.Surveys.Db.Survey", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("EndDate") - .HasColumnType("datetime2"); - - b.Property("IsEnabled") - .HasColumnType("bit"); - - b.Property("StartDate") - .HasColumnType("datetime2"); - - b.Property("Title") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("nvarchar(100)"); - - b.HasKey("Id"); - - b.ToTable("Surveys"); - }); -#pragma warning restore 612, 618 - } - } -}