forked from MDCPS/DamageAssessment_Backend
		
	Added sql docker logic
This commit is contained in:
		| @ -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 | ||||
|         } | ||||
|     } | ||||
| } | ||||
| @ -1,22 +0,0 @@ | ||||
| using Microsoft.EntityFrameworkCore.Migrations; | ||||
|  | ||||
| #nullable disable | ||||
|  | ||||
| namespace DamageAssesment.Api.Employees.Migrations | ||||
| { | ||||
|     /// <inheritdoc /> | ||||
|     public partial class updatedemployee_id : Migration | ||||
|     { | ||||
|         /// <inheritdoc /> | ||||
|         protected override void Up(MigrationBuilder migrationBuilder) | ||||
|         { | ||||
|  | ||||
|         } | ||||
|  | ||||
|         /// <inheritdoc /> | ||||
|         protected override void Down(MigrationBuilder migrationBuilder) | ||||
|         { | ||||
|  | ||||
|         } | ||||
|     } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user