Azure Migrations
This commit is contained in:
parent
d0023114a3
commit
4eb8f84d5b
@ -1,5 +1,6 @@
|
|||||||
// <auto-generated />
|
// <auto-generated />
|
||||||
using DamageAssesment.Api.SurveyResponses.Db;
|
using System;
|
||||||
|
using DamageAssesment.Api.Answers.Db;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||||
using Microsoft.EntityFrameworkCore.Metadata;
|
using Microsoft.EntityFrameworkCore.Metadata;
|
||||||
@ -8,11 +9,11 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
namespace DamageAssesment.Api.SurveyResponses.Migrations
|
namespace DamageAssesment.Api.Answers.Migrations
|
||||||
{
|
{
|
||||||
[DbContext(typeof(SurveyResponseDbContext))]
|
[DbContext(typeof(AnswerDbContext))]
|
||||||
[Migration("20230817221348_InitialSurveyResponse")]
|
[Migration("20230927172606_InitialAnswer")]
|
||||||
partial class InitialSurveyResponse
|
partial class InitialAnswer
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||||
@ -24,7 +25,7 @@ namespace DamageAssesment.Api.SurveyResponses.Migrations
|
|||||||
|
|
||||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
||||||
|
|
||||||
modelBuilder.Entity("DamageAssesment.Api.SurveyResponses.Db.SurveyResponse", b =>
|
modelBuilder.Entity("DamageAssesment.Api.Answers.Db.Answer", b =>
|
||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
@ -32,22 +33,24 @@ namespace DamageAssesment.Api.SurveyResponses.Migrations
|
|||||||
|
|
||||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
b.Property<string>("EmployeeId")
|
b.Property<string>("AnswerText")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasMaxLength(6)
|
.HasMaxLength(250)
|
||||||
.HasColumnType("nvarchar(6)");
|
.HasColumnType("nvarchar(250)");
|
||||||
|
|
||||||
b.Property<string>("LocationId")
|
b.Property<string>("Comment")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasMaxLength(4)
|
.HasColumnType("nvarchar(max)");
|
||||||
.HasColumnType("nvarchar(4)");
|
|
||||||
|
|
||||||
b.Property<int>("SurveyId")
|
b.Property<int>("QuestionId")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<int?>("SurveyResponseId")
|
||||||
.HasColumnType("int");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
b.ToTable("SurveyResponses");
|
b.ToTable("Answers");
|
||||||
});
|
});
|
||||||
#pragma warning restore 612, 618
|
#pragma warning restore 612, 618
|
||||||
}
|
}
|
@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
namespace DamageAssesment.Api.Employees.Migrations
|
namespace DamageAssesment.Api.Answers.Migrations
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public partial class updatedemployee_id : Migration
|
public partial class InitialAnswer : Migration
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
protected override void Up(MigrationBuilder migrationBuilder)
|
@ -0,0 +1,58 @@
|
|||||||
|
// <auto-generated />
|
||||||
|
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("20230927173358_InitialAnswercreate")]
|
||||||
|
partial class InitialAnswercreate
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
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<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<string>("AnswerText")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(250)
|
||||||
|
.HasColumnType("nvarchar(250)");
|
||||||
|
|
||||||
|
b.Property<string>("Comment")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<int>("QuestionId")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<int?>("SurveyResponseId")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.ToTable("Answers");
|
||||||
|
});
|
||||||
|
#pragma warning restore 612, 618
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,22 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace DamageAssesment.Api.Answers.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class InitialAnswercreate : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -18,7 +18,7 @@ namespace DamageAssesment.Api.Answers.Providers
|
|||||||
this.answerDbContext = answerDbContext;
|
this.answerDbContext = answerDbContext;
|
||||||
this.logger = logger;
|
this.logger = logger;
|
||||||
this.mapper = mapper;
|
this.mapper = mapper;
|
||||||
//SeedData();
|
SeedData();
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<(bool IsSuccess, IEnumerable<Models.Answer> Answers, string ErrorMessage)> GetAnswersAsync()
|
public async Task<(bool IsSuccess, IEnumerable<Models.Answer> Answers, string ErrorMessage)> GetAnswersAsync()
|
||||||
|
@ -9,7 +9,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"AllowedHosts": "*",
|
"AllowedHosts": "*",
|
||||||
|
//"ConnectionStrings": {
|
||||||
|
// "AnswerConnection": "Server=DESKTOP-OF5DPLQ\\SQLEXPRESS;Database=da_survey_dev;Trusted_Connection=True;TrustServerCertificate=True;"
|
||||||
|
//},
|
||||||
"ConnectionStrings": {
|
"ConnectionStrings": {
|
||||||
"AnswerConnection": "Server=DESKTOP-OF5DPLQ\\SQLEXPRESS;Database=da_survey_dev;Trusted_Connection=True;TrustServerCertificate=True;"
|
"AnswerConnection": "Server=tcp:da-dev.database.windows.net,1433;Initial Catalog=da-dev-db;Encrypt=True;User ID=admin-dev;Password=b3tgRABw8LGE75k;TrustServerCertificate=False;Connection Timeout=30;"
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,11 @@
|
|||||||
"folderpath": "DMS_Attachments/Active",
|
"folderpath": "DMS_Attachments/Active",
|
||||||
"Deletepath": "DMS_Attachments/Deleted"
|
"Deletepath": "DMS_Attachments/Deleted"
|
||||||
},
|
},
|
||||||
|
//"ConnectionStrings": {
|
||||||
|
// "AttachmentConnection": "Server=DESKTOP-OF5DPLQ\\SQLEXPRESS;Database=da_survey_dev;Trusted_Connection=True;TrustServerCertificate=True;"
|
||||||
|
//}
|
||||||
"ConnectionStrings": {
|
"ConnectionStrings": {
|
||||||
"AttachmentConnection": "Server=DESKTOP-OF5DPLQ\\SQLEXPRESS;Database=da_survey_dev;Trusted_Connection=True;TrustServerCertificate=True;"
|
"AttachmentConnection": "Server=tcp:da-dev.database.windows.net,1433;Initial Catalog=da-dev-db;Encrypt=True;User ID=admin-dev;Password=b3tgRABw8LGE75k;TrustServerCertificate=False;Connection Timeout=30;"
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@ namespace DamageAssesment.Api.DocuLinks.Providers
|
|||||||
this.logger = logger;
|
this.logger = logger;
|
||||||
this.mapper = mapper;
|
this.mapper = mapper;
|
||||||
this.uploadservice = uploadservice;
|
this.uploadservice = uploadservice;
|
||||||
SeedData();
|
//SeedData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -6,8 +6,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"AllowedHosts": "*",
|
"AllowedHosts": "*",
|
||||||
|
//"ConnectionStrings": {
|
||||||
|
// "DoculinConnection": "Server=DESKTOP-OF5DPLQ\\SQLEXPRESS;Database=da_survey_dev;Trusted_Connection=True;TrustServerCertificate=True;"
|
||||||
|
//},
|
||||||
"ConnectionStrings": {
|
"ConnectionStrings": {
|
||||||
"DoculinConnection": "Server=DESKTOP-OF5DPLQ\\SQLEXPRESS;Database=da_survey_dev;Trusted_Connection=True;TrustServerCertificate=True;"
|
"DoculinConnection": "Server=tcp:da-dev.database.windows.net,1433;Initial Catalog=da-dev-db;Encrypt=True;User ID=admin-dev;Password=b3tgRABw8LGE75k;TrustServerCertificate=False;Connection Timeout=30;"
|
||||||
|
|
||||||
},
|
},
|
||||||
"Fileupload": {
|
"Fileupload": {
|
||||||
"folderpath": "DASA_Documents/Active",
|
"folderpath": "DASA_Documents/Active",
|
||||||
|
@ -1,64 +0,0 @@
|
|||||||
// <auto-generated />
|
|
||||||
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("20230817213656_InitialEmployee")]
|
|
||||||
partial class InitialEmployee
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
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<string>("Id")
|
|
||||||
.HasColumnType("nvarchar(450)");
|
|
||||||
|
|
||||||
b.Property<DateTime>("BirthDate")
|
|
||||||
.HasColumnType("datetime2");
|
|
||||||
|
|
||||||
b.Property<string>("Email")
|
|
||||||
.IsRequired()
|
|
||||||
.HasMaxLength(50)
|
|
||||||
.HasColumnType("nvarchar(50)");
|
|
||||||
|
|
||||||
b.Property<bool>("IsActive")
|
|
||||||
.HasColumnType("bit");
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.IsRequired()
|
|
||||||
.HasMaxLength(50)
|
|
||||||
.HasColumnType("nvarchar(50)");
|
|
||||||
|
|
||||||
b.Property<string>("OfficePhoneNumber")
|
|
||||||
.IsRequired()
|
|
||||||
.HasMaxLength(50)
|
|
||||||
.HasColumnType("nvarchar(50)");
|
|
||||||
|
|
||||||
b.Property<string>("PreferredLanguage")
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("Employees");
|
|
||||||
});
|
|
||||||
#pragma warning restore 612, 618
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,48 +0,0 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace DamageAssesment.Api.Employees.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class employeeupdate : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AlterColumn<int>(
|
|
||||||
name: "Id",
|
|
||||||
table: "Employees",
|
|
||||||
type: "int",
|
|
||||||
nullable: false,
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "nvarchar(450)")
|
|
||||||
.Annotation("SqlServer:Identity", "1, 1");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<string>(
|
|
||||||
name: "EmployeeCode",
|
|
||||||
table: "Employees",
|
|
||||||
type: "nvarchar(50)",
|
|
||||||
maxLength: 50,
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: "");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "EmployeeCode",
|
|
||||||
table: "Employees");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "Id",
|
|
||||||
table: "Employees",
|
|
||||||
type: "nvarchar(450)",
|
|
||||||
nullable: false,
|
|
||||||
oldClrType: typeof(int),
|
|
||||||
oldType: "int")
|
|
||||||
.OldAnnotation("SqlServer:Identity", "1, 1");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,72 +0,0 @@
|
|||||||
// <auto-generated />
|
|
||||||
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("20230913170055_updatedemployee_id")]
|
|
||||||
partial class updatedemployee_id
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
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<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<DateTime>("BirthDate")
|
|
||||||
.HasColumnType("datetime2");
|
|
||||||
|
|
||||||
b.Property<string>("Email")
|
|
||||||
.IsRequired()
|
|
||||||
.HasMaxLength(50)
|
|
||||||
.HasColumnType("nvarchar(50)");
|
|
||||||
|
|
||||||
b.Property<string>("EmployeeCode")
|
|
||||||
.IsRequired()
|
|
||||||
.HasMaxLength(50)
|
|
||||||
.HasColumnType("nvarchar(50)");
|
|
||||||
|
|
||||||
b.Property<bool>("IsActive")
|
|
||||||
.HasColumnType("bit");
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.IsRequired()
|
|
||||||
.HasMaxLength(50)
|
|
||||||
.HasColumnType("nvarchar(50)");
|
|
||||||
|
|
||||||
b.Property<string>("OfficePhoneNumber")
|
|
||||||
.IsRequired()
|
|
||||||
.HasMaxLength(50)
|
|
||||||
.HasColumnType("nvarchar(50)");
|
|
||||||
|
|
||||||
b.Property<string>("PreferredLanguage")
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("Employees");
|
|
||||||
});
|
|
||||||
#pragma warning restore 612, 618
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -12,8 +12,8 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|||||||
namespace DamageAssesment.Api.Employees.Migrations
|
namespace DamageAssesment.Api.Employees.Migrations
|
||||||
{
|
{
|
||||||
[DbContext(typeof(EmployeeDbContext))]
|
[DbContext(typeof(EmployeeDbContext))]
|
||||||
[Migration("20230913164315_employeeupdate")]
|
[Migration("20230927210957_AzureEmployees")]
|
||||||
partial class employeeupdate
|
partial class AzureEmployees
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
@ -6,7 +6,7 @@ using Microsoft.EntityFrameworkCore.Migrations;
|
|||||||
namespace DamageAssesment.Api.Employees.Migrations
|
namespace DamageAssesment.Api.Employees.Migrations
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public partial class InitialEmployee : Migration
|
public partial class AzureEmployees : Migration
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
@ -15,7 +15,9 @@ namespace DamageAssesment.Api.Employees.Migrations
|
|||||||
name: "Employees",
|
name: "Employees",
|
||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
Id = table.Column<string>(type: "nvarchar(450)", nullable: false),
|
Id = table.Column<int>(type: "int", nullable: false)
|
||||||
|
.Annotation("SqlServer:Identity", "1, 1"),
|
||||||
|
EmployeeCode = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
|
||||||
Name = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
|
Name = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
|
||||||
BirthDate = table.Column<DateTime>(type: "datetime2", nullable: false),
|
BirthDate = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||||
OfficePhoneNumber = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
|
OfficePhoneNumber = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
|
@ -14,7 +14,11 @@
|
|||||||
"endpoint2": "xxx",
|
"endpoint2": "xxx",
|
||||||
"endpoint3": "xxx"
|
"endpoint3": "xxx"
|
||||||
},
|
},
|
||||||
|
//"ConnectionStrings": {
|
||||||
|
// "EmployeeConnection": "Server=DESKTOP-OF5DPLQ\\SQLEXPRESS;Database=da_survey_dev;Trusted_Connection=True;TrustServerCertificate=True;"
|
||||||
|
//},
|
||||||
"ConnectionStrings": {
|
"ConnectionStrings": {
|
||||||
"EmployeeConnection": "Server=DESKTOP-OF5DPLQ\\SQLEXPRESS;Database=da_survey_dev;Trusted_Connection=True;TrustServerCertificate=True;"
|
"EmployeeConnection": "Server=tcp:da-dev.database.windows.net,1433;Initial Catalog=da-dev-db;Encrypt=True;User ID=admin-dev;Password=b3tgRABw8LGE75k;TrustServerCertificate=False;Connection Timeout=30;"
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -11,8 +11,8 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|||||||
namespace DamageAssesment.Api.Locations.Migrations
|
namespace DamageAssesment.Api.Locations.Migrations
|
||||||
{
|
{
|
||||||
[DbContext(typeof(LocationDbContext))]
|
[DbContext(typeof(LocationDbContext))]
|
||||||
[Migration("20230817214454_InitialLocation")]
|
[Migration("20230927211146_AzureLocations")]
|
||||||
partial class InitialLocation
|
partial class AzureLocations
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||||
@ -26,23 +26,29 @@ namespace DamageAssesment.Api.Locations.Migrations
|
|||||||
|
|
||||||
modelBuilder.Entity("DamageAssesment.Api.Locations.Db.Location", b =>
|
modelBuilder.Entity("DamageAssesment.Api.Locations.Db.Location", b =>
|
||||||
{
|
{
|
||||||
b.Property<string>("Id")
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<string>("LocationCode")
|
||||||
|
.IsRequired()
|
||||||
.HasMaxLength(4)
|
.HasMaxLength(4)
|
||||||
.HasColumnType("nvarchar(4)");
|
.HasColumnType("nvarchar(4)");
|
||||||
|
|
||||||
b.Property<string>("MaintenanceCenter")
|
b.Property<string>("MaintenanceCenter")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasMaxLength(1)
|
.HasMaxLength(4)
|
||||||
.HasColumnType("nvarchar(1)");
|
.HasColumnType("nvarchar(4)");
|
||||||
|
|
||||||
b.Property<string>("Name")
|
b.Property<string>("Name")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasMaxLength(50)
|
.HasMaxLength(50)
|
||||||
.HasColumnType("nvarchar(50)");
|
.HasColumnType("nvarchar(50)");
|
||||||
|
|
||||||
b.Property<string>("RegionId")
|
b.Property<int>("RegionId")
|
||||||
.IsRequired()
|
.HasColumnType("int");
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("SchoolType")
|
b.Property<string>("SchoolType")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
@ -56,9 +62,11 @@ namespace DamageAssesment.Api.Locations.Migrations
|
|||||||
|
|
||||||
modelBuilder.Entity("DamageAssesment.Api.Locations.Db.Region", b =>
|
modelBuilder.Entity("DamageAssesment.Api.Locations.Db.Region", b =>
|
||||||
{
|
{
|
||||||
b.Property<string>("Id")
|
b.Property<int>("Id")
|
||||||
.HasMaxLength(2)
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("nvarchar(2)");
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
b.Property<string>("Abbreviation")
|
b.Property<string>("Abbreviation")
|
||||||
.IsRequired()
|
.IsRequired()
|
@ -5,7 +5,7 @@
|
|||||||
namespace DamageAssesment.Api.Locations.Migrations
|
namespace DamageAssesment.Api.Locations.Migrations
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public partial class InitialLocation : Migration
|
public partial class AzureLocations : Migration
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
@ -14,11 +14,13 @@ namespace DamageAssesment.Api.Locations.Migrations
|
|||||||
name: "Locations",
|
name: "Locations",
|
||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
Id = table.Column<string>(type: "nvarchar(4)", maxLength: 4, nullable: false),
|
Id = table.Column<int>(type: "int", nullable: false)
|
||||||
|
.Annotation("SqlServer:Identity", "1, 1"),
|
||||||
|
RegionId = table.Column<int>(type: "int", nullable: false),
|
||||||
|
LocationCode = table.Column<string>(type: "nvarchar(4)", maxLength: 4, nullable: false),
|
||||||
Name = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
|
Name = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
|
||||||
MaintenanceCenter = table.Column<string>(type: "nvarchar(1)", maxLength: 1, nullable: false),
|
MaintenanceCenter = table.Column<string>(type: "nvarchar(4)", maxLength: 4, nullable: false),
|
||||||
SchoolType = table.Column<string>(type: "nvarchar(2)", maxLength: 2, nullable: false),
|
SchoolType = table.Column<string>(type: "nvarchar(2)", maxLength: 2, nullable: false)
|
||||||
RegionId = table.Column<string>(type: "nvarchar(max)", nullable: false)
|
|
||||||
},
|
},
|
||||||
constraints: table =>
|
constraints: table =>
|
||||||
{
|
{
|
||||||
@ -29,7 +31,8 @@ namespace DamageAssesment.Api.Locations.Migrations
|
|||||||
name: "Regions",
|
name: "Regions",
|
||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
Id = table.Column<string>(type: "nvarchar(2)", maxLength: 2, nullable: false),
|
Id = table.Column<int>(type: "int", nullable: false)
|
||||||
|
.Annotation("SqlServer:Identity", "1, 1"),
|
||||||
Name = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
|
Name = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
|
||||||
Abbreviation = table.Column<string>(type: "nvarchar(5)", maxLength: 5, nullable: false)
|
Abbreviation = table.Column<string>(type: "nvarchar(5)", maxLength: 5, nullable: false)
|
||||||
},
|
},
|
@ -23,23 +23,29 @@ namespace DamageAssesment.Api.Locations.Migrations
|
|||||||
|
|
||||||
modelBuilder.Entity("DamageAssesment.Api.Locations.Db.Location", b =>
|
modelBuilder.Entity("DamageAssesment.Api.Locations.Db.Location", b =>
|
||||||
{
|
{
|
||||||
b.Property<string>("Id")
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<string>("LocationCode")
|
||||||
|
.IsRequired()
|
||||||
.HasMaxLength(4)
|
.HasMaxLength(4)
|
||||||
.HasColumnType("nvarchar(4)");
|
.HasColumnType("nvarchar(4)");
|
||||||
|
|
||||||
b.Property<string>("MaintenanceCenter")
|
b.Property<string>("MaintenanceCenter")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasMaxLength(1)
|
.HasMaxLength(4)
|
||||||
.HasColumnType("nvarchar(1)");
|
.HasColumnType("nvarchar(4)");
|
||||||
|
|
||||||
b.Property<string>("Name")
|
b.Property<string>("Name")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasMaxLength(50)
|
.HasMaxLength(50)
|
||||||
.HasColumnType("nvarchar(50)");
|
.HasColumnType("nvarchar(50)");
|
||||||
|
|
||||||
b.Property<string>("RegionId")
|
b.Property<int>("RegionId")
|
||||||
.IsRequired()
|
.HasColumnType("int");
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("SchoolType")
|
b.Property<string>("SchoolType")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
@ -53,9 +59,11 @@ namespace DamageAssesment.Api.Locations.Migrations
|
|||||||
|
|
||||||
modelBuilder.Entity("DamageAssesment.Api.Locations.Db.Region", b =>
|
modelBuilder.Entity("DamageAssesment.Api.Locations.Db.Region", b =>
|
||||||
{
|
{
|
||||||
b.Property<string>("Id")
|
b.Property<int>("Id")
|
||||||
.HasMaxLength(2)
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("nvarchar(2)");
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
b.Property<string>("Abbreviation")
|
b.Property<string>("Abbreviation")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
|
@ -9,7 +9,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"AllowedHosts": "*",
|
"AllowedHosts": "*",
|
||||||
|
//"ConnectionStrings": {
|
||||||
|
// "LocationConnection": "Server=DESKTOP-OF5DPLQ\\SQLEXPRESS;Database=da_survey_dev;Trusted_Connection=True;TrustServerCertificate=True;"
|
||||||
|
//},
|
||||||
"ConnectionStrings": {
|
"ConnectionStrings": {
|
||||||
"LocationConnection": "Server=DESKTOP-OF5DPLQ\\SQLEXPRESS;Database=da_survey_dev;Trusted_Connection=True;TrustServerCertificate=True;"
|
"LocationConnection": "Server=tcp:da-dev.database.windows.net,1433;Initial Catalog=da-dev-db;Encrypt=True;User ID=admin-dev;Password=b3tgRABw8LGE75k;TrustServerCertificate=False;Connection Timeout=30;"
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,8 +12,8 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|||||||
namespace DamageAssesment.Api.Questions.Migrations
|
namespace DamageAssesment.Api.Questions.Migrations
|
||||||
{
|
{
|
||||||
[DbContext(typeof(QuestionDbContext))]
|
[DbContext(typeof(QuestionDbContext))]
|
||||||
[Migration("20230817215744_InitialQuestion")]
|
[Migration("20230927211340_AzureQuestions")]
|
||||||
partial class InitialQuestion
|
partial class AzureQuestions
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||||
@ -25,6 +25,30 @@ namespace DamageAssesment.Api.Questions.Migrations
|
|||||||
|
|
||||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
||||||
|
|
||||||
|
modelBuilder.Entity("DamageAssesment.Api.Questions.Db.CategoryTranslation", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<int>("CategoryId")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<string>("Language")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Title")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.ToTable("CategoryTranslations");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("DamageAssesment.Api.Questions.Db.Question", b =>
|
modelBuilder.Entity("DamageAssesment.Api.Questions.Db.Question", b =>
|
||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
@ -45,10 +69,6 @@ namespace DamageAssesment.Api.Questions.Migrations
|
|||||||
b.Property<bool>("Key")
|
b.Property<bool>("Key")
|
||||||
.HasColumnType("bit");
|
.HasColumnType("bit");
|
||||||
|
|
||||||
b.Property<string>("QuestionGroup")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<int>("QuestionNumber")
|
b.Property<int>("QuestionNumber")
|
||||||
.HasColumnType("int");
|
.HasColumnType("int");
|
||||||
|
|
||||||
@ -73,11 +93,11 @@ namespace DamageAssesment.Api.Questions.Migrations
|
|||||||
|
|
||||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
b.Property<string>("CategoryImage")
|
b.Property<string>("IconLibrary")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("CategoryName")
|
b.Property<string>("IconName")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
@ -5,19 +5,34 @@
|
|||||||
namespace DamageAssesment.Api.Questions.Migrations
|
namespace DamageAssesment.Api.Questions.Migrations
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public partial class InitialQuestion : Migration
|
public partial class AzureQuestions : Migration
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
{
|
{
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "CategoryTranslations",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<int>(type: "int", nullable: false)
|
||||||
|
.Annotation("SqlServer:Identity", "1, 1"),
|
||||||
|
CategoryId = table.Column<int>(type: "int", nullable: false),
|
||||||
|
Title = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
|
Language = table.Column<string>(type: "nvarchar(max)", nullable: false)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_CategoryTranslations", x => x.Id);
|
||||||
|
});
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
migrationBuilder.CreateTable(
|
||||||
name: "QuestionCategories",
|
name: "QuestionCategories",
|
||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
Id = table.Column<int>(type: "int", nullable: false)
|
Id = table.Column<int>(type: "int", nullable: false)
|
||||||
.Annotation("SqlServer:Identity", "1, 1"),
|
.Annotation("SqlServer:Identity", "1, 1"),
|
||||||
CategoryName = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
IconName = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
CategoryImage = table.Column<string>(type: "nvarchar(max)", nullable: false)
|
IconLibrary = table.Column<string>(type: "nvarchar(max)", nullable: false)
|
||||||
},
|
},
|
||||||
constraints: table =>
|
constraints: table =>
|
||||||
{
|
{
|
||||||
@ -64,7 +79,6 @@ namespace DamageAssesment.Api.Questions.Migrations
|
|||||||
Comment = table.Column<bool>(type: "bit", nullable: false),
|
Comment = table.Column<bool>(type: "bit", nullable: false),
|
||||||
Key = table.Column<bool>(type: "bit", nullable: false),
|
Key = table.Column<bool>(type: "bit", nullable: false),
|
||||||
SurveyId = table.Column<int>(type: "int", nullable: true),
|
SurveyId = table.Column<int>(type: "int", nullable: true),
|
||||||
QuestionGroup = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
|
||||||
CategoryId = table.Column<int>(type: "int", nullable: false)
|
CategoryId = table.Column<int>(type: "int", nullable: false)
|
||||||
},
|
},
|
||||||
constraints: table =>
|
constraints: table =>
|
||||||
@ -87,6 +101,9 @@ namespace DamageAssesment.Api.Questions.Migrations
|
|||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
{
|
{
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "CategoryTranslations");
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
||||||
name: "QuestionCategories");
|
name: "QuestionCategories");
|
||||||
|
|
@ -22,6 +22,30 @@ namespace DamageAssesment.Api.Questions.Migrations
|
|||||||
|
|
||||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
||||||
|
|
||||||
|
modelBuilder.Entity("DamageAssesment.Api.Questions.Db.CategoryTranslation", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<int>("CategoryId")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<string>("Language")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Title")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.ToTable("CategoryTranslations");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("DamageAssesment.Api.Questions.Db.Question", b =>
|
modelBuilder.Entity("DamageAssesment.Api.Questions.Db.Question", b =>
|
||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
@ -42,10 +66,6 @@ namespace DamageAssesment.Api.Questions.Migrations
|
|||||||
b.Property<bool>("Key")
|
b.Property<bool>("Key")
|
||||||
.HasColumnType("bit");
|
.HasColumnType("bit");
|
||||||
|
|
||||||
b.Property<string>("QuestionGroup")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<int>("QuestionNumber")
|
b.Property<int>("QuestionNumber")
|
||||||
.HasColumnType("int");
|
.HasColumnType("int");
|
||||||
|
|
||||||
@ -70,11 +90,11 @@ namespace DamageAssesment.Api.Questions.Migrations
|
|||||||
|
|
||||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
b.Property<string>("CategoryImage")
|
b.Property<string>("IconLibrary")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("CategoryName")
|
b.Property<string>("IconName")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ namespace DamageAssesment.Api.Questions.Providers
|
|||||||
this.questionDbContext = questionDbContext;
|
this.questionDbContext = questionDbContext;
|
||||||
this.logger = logger;
|
this.logger = logger;
|
||||||
this.mapper = mapper;
|
this.mapper = mapper;
|
||||||
SeedData();
|
//SeedData();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SeedData()
|
public void SeedData()
|
||||||
|
@ -9,7 +9,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"AllowedHosts": "*",
|
"AllowedHosts": "*",
|
||||||
|
//"ConnectionStrings": {
|
||||||
|
// "QuestionConnection": "Server=DESKTOP-OF5DPLQ\\SQLEXPRESS;Database=da_survey_dev;Trusted_Connection=True;TrustServerCertificate=True;"
|
||||||
|
//},
|
||||||
"ConnectionStrings": {
|
"ConnectionStrings": {
|
||||||
"QuestionConnection": "Server=DESKTOP-OF5DPLQ\\SQLEXPRESS;Database=da_survey_dev;Trusted_Connection=True;TrustServerCertificate=True;"
|
"QuestionConnection": "Server=tcp:da-dev.database.windows.net,1433;Initial Catalog=da-dev-db;Encrypt=True;User ID=admin-dev;Password=b3tgRABw8LGE75k;TrustServerCertificate=False;Connection Timeout=30;"
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,70 @@
|
|||||||
|
// <auto-generated />
|
||||||
|
using System;
|
||||||
|
using DamageAssesment.Api.SurveyResponses.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.Responses.Migrations
|
||||||
|
{
|
||||||
|
[DbContext(typeof(SurveyResponseDbContext))]
|
||||||
|
[Migration("20230927211458_AzureSurveyResponses")]
|
||||||
|
partial class AzureSurveyResponses
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
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.SurveyResponses.Db.SurveyResponse", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<string>("ClientDevice")
|
||||||
|
.HasMaxLength(50)
|
||||||
|
.HasColumnType("nvarchar(50)");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("CreatedDate")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<int>("EmployeeId")
|
||||||
|
.HasMaxLength(6)
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<string>("KeyAnswerResult")
|
||||||
|
.HasMaxLength(250)
|
||||||
|
.HasColumnType("nvarchar(250)");
|
||||||
|
|
||||||
|
b.Property<double?>("Latitude")
|
||||||
|
.HasColumnType("float");
|
||||||
|
|
||||||
|
b.Property<int>("LocationId")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<double?>("Longitute")
|
||||||
|
.HasColumnType("float");
|
||||||
|
|
||||||
|
b.Property<int>("SurveyId")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.ToTable("SurveyResponses");
|
||||||
|
});
|
||||||
|
#pragma warning restore 612, 618
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,11 +1,12 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
namespace DamageAssesment.Api.SurveyResponses.Migrations
|
namespace DamageAssesment.Api.Responses.Migrations
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public partial class InitialSurveyResponse : Migration
|
public partial class AzureSurveyResponses : Migration
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
@ -17,8 +18,13 @@ namespace DamageAssesment.Api.SurveyResponses.Migrations
|
|||||||
Id = table.Column<int>(type: "int", nullable: false)
|
Id = table.Column<int>(type: "int", nullable: false)
|
||||||
.Annotation("SqlServer:Identity", "1, 1"),
|
.Annotation("SqlServer:Identity", "1, 1"),
|
||||||
SurveyId = table.Column<int>(type: "int", nullable: false),
|
SurveyId = table.Column<int>(type: "int", nullable: false),
|
||||||
LocationId = table.Column<string>(type: "nvarchar(4)", maxLength: 4, nullable: false),
|
LocationId = table.Column<int>(type: "int", nullable: false),
|
||||||
EmployeeId = table.Column<string>(type: "nvarchar(6)", maxLength: 6, nullable: false)
|
EmployeeId = table.Column<int>(type: "int", maxLength: 6, nullable: false),
|
||||||
|
CreatedDate = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||||
|
ClientDevice = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
|
||||||
|
KeyAnswerResult = table.Column<string>(type: "nvarchar(250)", maxLength: 250, nullable: true),
|
||||||
|
Longitute = table.Column<double>(type: "float", nullable: true),
|
||||||
|
Latitude = table.Column<double>(type: "float", nullable: true)
|
||||||
},
|
},
|
||||||
constraints: table =>
|
constraints: table =>
|
||||||
{
|
{
|
@ -1,4 +1,5 @@
|
|||||||
// <auto-generated />
|
// <auto-generated />
|
||||||
|
using System;
|
||||||
using DamageAssesment.Api.SurveyResponses.Db;
|
using DamageAssesment.Api.SurveyResponses.Db;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||||
@ -7,7 +8,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
namespace DamageAssesment.Api.SurveyResponses.Migrations
|
namespace DamageAssesment.Api.Responses.Migrations
|
||||||
{
|
{
|
||||||
[DbContext(typeof(SurveyResponseDbContext))]
|
[DbContext(typeof(SurveyResponseDbContext))]
|
||||||
partial class SurveyResponseDbContextModelSnapshot : ModelSnapshot
|
partial class SurveyResponseDbContextModelSnapshot : ModelSnapshot
|
||||||
@ -29,15 +30,29 @@ namespace DamageAssesment.Api.SurveyResponses.Migrations
|
|||||||
|
|
||||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
b.Property<string>("EmployeeId")
|
b.Property<string>("ClientDevice")
|
||||||
.IsRequired()
|
.HasMaxLength(50)
|
||||||
.HasMaxLength(6)
|
.HasColumnType("nvarchar(50)");
|
||||||
.HasColumnType("nvarchar(6)");
|
|
||||||
|
|
||||||
b.Property<string>("LocationId")
|
b.Property<DateTime?>("CreatedDate")
|
||||||
.IsRequired()
|
.HasColumnType("datetime2");
|
||||||
.HasMaxLength(4)
|
|
||||||
.HasColumnType("nvarchar(4)");
|
b.Property<int>("EmployeeId")
|
||||||
|
.HasMaxLength(6)
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<string>("KeyAnswerResult")
|
||||||
|
.HasMaxLength(250)
|
||||||
|
.HasColumnType("nvarchar(250)");
|
||||||
|
|
||||||
|
b.Property<double?>("Latitude")
|
||||||
|
.HasColumnType("float");
|
||||||
|
|
||||||
|
b.Property<int>("LocationId")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<double?>("Longitute")
|
||||||
|
.HasColumnType("float");
|
||||||
|
|
||||||
b.Property<int>("SurveyId")
|
b.Property<int>("SurveyId")
|
||||||
.HasColumnType("int");
|
.HasColumnType("int");
|
||||||
|
@ -6,8 +6,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"AllowedHosts": "*",
|
"AllowedHosts": "*",
|
||||||
|
//"ConnectionStrings": {
|
||||||
|
// "SurveyResponseConnection": "Server=DESKTOP-OF5DPLQ\\SQLEXPRESS;Database=da_survey_dev;Trusted_Connection=True;TrustServerCertificate=True;"
|
||||||
|
//},
|
||||||
"ConnectionStrings": {
|
"ConnectionStrings": {
|
||||||
"SurveyResponseConnection": "Server=DESKTOP-OF5DPLQ\\SQLEXPRESS;Database=da_survey_dev;Trusted_Connection=True;TrustServerCertificate=True;"
|
"SurveyResponseConnection": "Server=tcp:da-dev.database.windows.net,1433;Initial Catalog=da-dev-db;Encrypt=True;User ID=admin-dev;Password=b3tgRABw8LGE75k;TrustServerCertificate=False;Connection Timeout=30;"
|
||||||
|
|
||||||
},
|
},
|
||||||
"EndPointSettings": {
|
"EndPointSettings": {
|
||||||
"AnswerUrlBase": "http://localhost:5200",
|
"AnswerUrlBase": "http://localhost:5200",
|
||||||
|
@ -9,11 +9,11 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
namespace DamageAssesment.Api.Survey.Migrations
|
namespace DamageAssesment.Api.Surveys.Migrations
|
||||||
{
|
{
|
||||||
[DbContext(typeof(SurveysDbContext))]
|
[DbContext(typeof(SurveysDbContext))]
|
||||||
[Migration("20230817220614_InitialSurvey")]
|
[Migration("20230927211618_AzureSurveys")]
|
||||||
partial class InitialSurvey
|
partial class AzureSurveys
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||||
@ -33,24 +33,47 @@ namespace DamageAssesment.Api.Survey.Migrations
|
|||||||
|
|
||||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
b.Property<DateTime?>("EndDate")
|
b.Property<DateTime>("CreatedDate")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime>("EndDate")
|
||||||
.HasColumnType("datetime2");
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
b.Property<bool>("IsEnabled")
|
b.Property<bool>("IsEnabled")
|
||||||
.HasColumnType("bit");
|
.HasColumnType("bit");
|
||||||
|
|
||||||
b.Property<DateTime?>("StartDate")
|
b.Property<DateTime>("StartDate")
|
||||||
.HasColumnType("datetime2");
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasMaxLength(100)
|
|
||||||
.HasColumnType("nvarchar(100)");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
b.ToTable("Surveys");
|
b.ToTable("Surveys");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("DamageAssesment.Api.Surveys.Db.SurveyTranslation", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<string>("Language")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<int>("SurveyId")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<string>("Title")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(200)
|
||||||
|
.HasColumnType("nvarchar(200)");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.ToTable("SurveysTranslation");
|
||||||
|
});
|
||||||
#pragma warning restore 612, 618
|
#pragma warning restore 612, 618
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -3,10 +3,10 @@ using Microsoft.EntityFrameworkCore.Migrations;
|
|||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
namespace DamageAssesment.Api.Survey.Migrations
|
namespace DamageAssesment.Api.Surveys.Migrations
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public partial class InitialSurvey : Migration
|
public partial class AzureSurveys : Migration
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
@ -17,15 +17,30 @@ namespace DamageAssesment.Api.Survey.Migrations
|
|||||||
{
|
{
|
||||||
Id = table.Column<int>(type: "int", nullable: false)
|
Id = table.Column<int>(type: "int", nullable: false)
|
||||||
.Annotation("SqlServer:Identity", "1, 1"),
|
.Annotation("SqlServer:Identity", "1, 1"),
|
||||||
Title = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
|
|
||||||
IsEnabled = table.Column<bool>(type: "bit", nullable: false),
|
IsEnabled = table.Column<bool>(type: "bit", nullable: false),
|
||||||
StartDate = table.Column<DateTime>(type: "datetime2", nullable: true),
|
StartDate = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||||
EndDate = table.Column<DateTime>(type: "datetime2", nullable: true)
|
EndDate = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||||
|
CreatedDate = table.Column<DateTime>(type: "datetime2", nullable: false)
|
||||||
},
|
},
|
||||||
constraints: table =>
|
constraints: table =>
|
||||||
{
|
{
|
||||||
table.PrimaryKey("PK_Surveys", x => x.Id);
|
table.PrimaryKey("PK_Surveys", x => x.Id);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "SurveysTranslation",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<int>(type: "int", nullable: false)
|
||||||
|
.Annotation("SqlServer:Identity", "1, 1"),
|
||||||
|
SurveyId = table.Column<int>(type: "int", nullable: false),
|
||||||
|
Title = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
|
||||||
|
Language = table.Column<string>(type: "nvarchar(max)", nullable: false)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_SurveysTranslation", x => x.Id);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
@ -33,6 +48,9 @@ namespace DamageAssesment.Api.Survey.Migrations
|
|||||||
{
|
{
|
||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
||||||
name: "Surveys");
|
name: "Surveys");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "SurveysTranslation");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -8,7 +8,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
namespace DamageAssesment.Api.Survey.Migrations
|
namespace DamageAssesment.Api.Surveys.Migrations
|
||||||
{
|
{
|
||||||
[DbContext(typeof(SurveysDbContext))]
|
[DbContext(typeof(SurveysDbContext))]
|
||||||
partial class SurveysDbContextModelSnapshot : ModelSnapshot
|
partial class SurveysDbContextModelSnapshot : ModelSnapshot
|
||||||
@ -30,24 +30,47 @@ namespace DamageAssesment.Api.Survey.Migrations
|
|||||||
|
|
||||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
b.Property<DateTime?>("EndDate")
|
b.Property<DateTime>("CreatedDate")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime>("EndDate")
|
||||||
.HasColumnType("datetime2");
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
b.Property<bool>("IsEnabled")
|
b.Property<bool>("IsEnabled")
|
||||||
.HasColumnType("bit");
|
.HasColumnType("bit");
|
||||||
|
|
||||||
b.Property<DateTime?>("StartDate")
|
b.Property<DateTime>("StartDate")
|
||||||
.HasColumnType("datetime2");
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasMaxLength(100)
|
|
||||||
.HasColumnType("nvarchar(100)");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
b.ToTable("Surveys");
|
b.ToTable("Surveys");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("DamageAssesment.Api.Surveys.Db.SurveyTranslation", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<string>("Language")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<int>("SurveyId")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<string>("Title")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(200)
|
||||||
|
.HasColumnType("nvarchar(200)");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.ToTable("SurveysTranslation");
|
||||||
|
});
|
||||||
#pragma warning restore 612, 618
|
#pragma warning restore 612, 618
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"AllowedHosts": "*",
|
"AllowedHosts": "*",
|
||||||
|
//"ConnectionStrings": {
|
||||||
|
// "SurveyConnection": "Server=DESKTOP-OF5DPLQ\\SQLEXPRESS;Database=da_survey_dev;Trusted_Connection=True;TrustServerCertificate=True;"
|
||||||
|
//},
|
||||||
"ConnectionStrings": {
|
"ConnectionStrings": {
|
||||||
"SurveyConnection": "Server=DESKTOP-OF5DPLQ\\SQLEXPRESS;Database=da_survey_dev;Trusted_Connection=True;TrustServerCertificate=True;"
|
"SurveyConnection": "Server=tcp:da-dev.database.windows.net,1433;Initial Catalog=da-dev-db;Encrypt=True;User ID=admin-dev;Password=b3tgRABw8LGE75k;TrustServerCertificate=False;Connection Timeout=30;"
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user