using System; using System.Collections.Generic; using Microsoft.EntityFrameworkCore.Migrations; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; #nullable disable namespace vendorApproverBackend.Migrations { /// public partial class EmployeeApplicationEntity : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "employee_applications", columns: table => new { id = table.Column(type: "bigint", nullable: false) .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), user_id = table.Column(type: "bigint", nullable: false), type = table.Column(type: "integer", nullable: false), experience = table.Column(type: "integer", nullable: false), qualifications = table.Column(type: "text", nullable: false), certification_ids = table.Column>(type: "bigint[]", nullable: false), status = table.Column(type: "integer", nullable: false), reason = table.Column(type: "text", nullable: true), submission_date = table.Column(type: "timestamp with time zone", nullable: false) }, constraints: table => { table.PrimaryKey("PK_employee_applications", x => x.id); table.ForeignKey( name: "FK_employee_applications_users_table_user_id", column: x => x.user_id, principalTable: "users_table", principalColumn: "user_id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateIndex( name: "IX_employee_applications_user_id", table: "employee_applications", column: "user_id"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "employee_applications"); } } }