You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20220909105407_MessageExpiryDate.cs 986B

1234567891011121314151617181920212223242526272829303132333435
  1. using System;
  2. using Microsoft.EntityFrameworkCore.Migrations;
  3. namespace MVCTemplate.Data.Migrations
  4. {
  5. public partial class MessageExpiryDate : Migration
  6. {
  7. protected override void Up(MigrationBuilder migrationBuilder)
  8. {
  9. migrationBuilder.AddColumn<DateTime>(
  10. name: "ExpiryDate",
  11. table: "Messages",
  12. type: "datetime2",
  13. nullable: true);
  14. migrationBuilder.AddColumn<bool>(
  15. name: "IsValid",
  16. table: "Messages",
  17. type: "bit",
  18. nullable: false,
  19. defaultValue: false);
  20. }
  21. protected override void Down(MigrationBuilder migrationBuilder)
  22. {
  23. migrationBuilder.DropColumn(
  24. name: "ExpiryDate",
  25. table: "Messages");
  26. migrationBuilder.DropColumn(
  27. name: "IsValid",
  28. table: "Messages");
  29. }
  30. }
  31. }