20250506101722_jobInterview.cs 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. using System;
  2. using Microsoft.EntityFrameworkCore.Migrations;
  3. #nullable disable
  4. namespace MTWorkHR.Infrastructure.Migrations
  5. {
  6. /// <inheritdoc />
  7. public partial class jobInterview : Migration
  8. {
  9. /// <inheritdoc />
  10. protected override void Up(MigrationBuilder migrationBuilder)
  11. {
  12. migrationBuilder.DropPrimaryKey(
  13. name: "PK_Invoice",
  14. table: "Invoice");
  15. migrationBuilder.RenameTable(
  16. name: "Invoice",
  17. newName: "Invoices");
  18. migrationBuilder.AddPrimaryKey(
  19. name: "PK_Invoices",
  20. table: "Invoices",
  21. column: "Id");
  22. migrationBuilder.CreateTable(
  23. name: "JobInterviews",
  24. columns: table => new
  25. {
  26. Id = table.Column<long>(type: "bigint", nullable: false)
  27. .Annotation("SqlServer:Identity", "1, 1"),
  28. CreateUser = table.Column<string>(type: "nvarchar(450)", maxLength: 450, nullable: true),
  29. UpdateUser = table.Column<string>(type: "nvarchar(450)", maxLength: 450, nullable: true),
  30. CreateDate = table.Column<DateTime>(type: "datetime2", nullable: false),
  31. UpdateDate = table.Column<DateTime>(type: "datetime2", nullable: true),
  32. IsDeleted = table.Column<bool>(type: "bit", nullable: false),
  33. DeleteUserId = table.Column<string>(type: "nvarchar(450)", maxLength: 450, nullable: true),
  34. CompanyId = table.Column<long>(type: "bigint", nullable: false),
  35. UserId = table.Column<string>(type: "nvarchar(max)", nullable: false),
  36. Email = table.Column<string>(type: "nvarchar(max)", nullable: false),
  37. InterviewDate = table.Column<DateTime>(type: "datetime2", nullable: false),
  38. InterviewTime = table.Column<string>(type: "nvarchar(max)", nullable: true),
  39. InterviewLink = table.Column<string>(type: "nvarchar(250)", maxLength: 250, nullable: true),
  40. SendByMail = table.Column<bool>(type: "bit", nullable: true)
  41. },
  42. constraints: table =>
  43. {
  44. table.PrimaryKey("PK_JobInterviews", x => x.Id);
  45. });
  46. migrationBuilder.CreateIndex(
  47. name: "IX_JobInterviews_CompanyId",
  48. table: "JobInterviews",
  49. column: "CompanyId");
  50. }
  51. /// <inheritdoc />
  52. protected override void Down(MigrationBuilder migrationBuilder)
  53. {
  54. migrationBuilder.DropTable(
  55. name: "JobInterviews");
  56. migrationBuilder.DropPrimaryKey(
  57. name: "PK_Invoices",
  58. table: "Invoices");
  59. migrationBuilder.RenameTable(
  60. name: "Invoices",
  61. newName: "Invoice");
  62. migrationBuilder.AddPrimaryKey(
  63. name: "PK_Invoice",
  64. table: "Invoice",
  65. column: "Id");
  66. }
  67. }
  68. }