20240627085357_altrMeeting.cs 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. using System;
  2. using Microsoft.EntityFrameworkCore.Migrations;
  3. #nullable disable
  4. namespace MTWorkHR.Infrastructure.Migrations
  5. {
  6. /// <inheritdoc />
  7. public partial class altrMeeting : Migration
  8. {
  9. /// <inheritdoc />
  10. protected override void Up(MigrationBuilder migrationBuilder)
  11. {
  12. migrationBuilder.DropColumn(
  13. name: "EndDate",
  14. table: "Meetings");
  15. migrationBuilder.RenameColumn(
  16. name: "StartDate",
  17. table: "Meetings",
  18. newName: "MeetingDate");
  19. migrationBuilder.AddColumn<string>(
  20. name: "EndTime",
  21. table: "Meetings",
  22. type: "nvarchar(max)",
  23. nullable: false,
  24. defaultValue: "");
  25. migrationBuilder.AddColumn<int>(
  26. name: "RepeatId",
  27. table: "Meetings",
  28. type: "int",
  29. nullable: false,
  30. defaultValue: 0);
  31. migrationBuilder.AddColumn<string>(
  32. name: "StartTime",
  33. table: "Meetings",
  34. type: "nvarchar(max)",
  35. nullable: false,
  36. defaultValue: "");
  37. }
  38. /// <inheritdoc />
  39. protected override void Down(MigrationBuilder migrationBuilder)
  40. {
  41. migrationBuilder.DropColumn(
  42. name: "EndTime",
  43. table: "Meetings");
  44. migrationBuilder.DropColumn(
  45. name: "RepeatId",
  46. table: "Meetings");
  47. migrationBuilder.DropColumn(
  48. name: "StartTime",
  49. table: "Meetings");
  50. migrationBuilder.RenameColumn(
  51. name: "MeetingDate",
  52. table: "Meetings",
  53. newName: "StartDate");
  54. migrationBuilder.AddColumn<DateTime>(
  55. name: "EndDate",
  56. table: "Meetings",
  57. type: "datetime2",
  58. nullable: false,
  59. defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
  60. }
  61. }
  62. }