20240305101944_altrTeamMeet.cs 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. using System;
  2. using Microsoft.EntityFrameworkCore.Migrations;
  3. #nullable disable
  4. namespace MTWorkHR.Infrastructure.Migrations
  5. {
  6. /// <inheritdoc />
  7. public partial class altrTeamMeet : Migration
  8. {
  9. /// <inheritdoc />
  10. protected override void Up(MigrationBuilder migrationBuilder)
  11. {
  12. migrationBuilder.RenameColumn(
  13. name: "MeetingDateTime",
  14. table: "Meetings",
  15. newName: "StartDate");
  16. migrationBuilder.AddColumn<DateTime>(
  17. name: "EndDate",
  18. table: "Meetings",
  19. type: "datetime2",
  20. nullable: false,
  21. defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
  22. migrationBuilder.AddColumn<string>(
  23. name: "Location",
  24. table: "Meetings",
  25. type: "nvarchar(250)",
  26. maxLength: 250,
  27. nullable: true);
  28. }
  29. /// <inheritdoc />
  30. protected override void Down(MigrationBuilder migrationBuilder)
  31. {
  32. migrationBuilder.DropColumn(
  33. name: "EndDate",
  34. table: "Meetings");
  35. migrationBuilder.DropColumn(
  36. name: "Location",
  37. table: "Meetings");
  38. migrationBuilder.RenameColumn(
  39. name: "StartDate",
  40. table: "Meetings",
  41. newName: "MeetingDateTime");
  42. }
  43. }
  44. }