20170921034639_AterCreatDate2.cs 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. using Microsoft.EntityFrameworkCore.Metadata;
  2. using Microsoft.EntityFrameworkCore.Migrations;
  3. using System;
  4. using System.Collections.Generic;
  5. namespace Winsoft.GOV.XF.WebApi.WXCore.Migrations
  6. {
  7. public partial class AterCreatDate2 : Migration
  8. {
  9. protected override void Up(MigrationBuilder migrationBuilder)
  10. {
  11. migrationBuilder.AlterColumn<DateTime>(
  12. name: "CreateDate",
  13. table: "WXUser",
  14. type: "datetime(6)",
  15. nullable: false,
  16. oldClrType: typeof(DateTime))
  17. .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.ComputedColumn);
  18. migrationBuilder.AlterColumn<DateTime>(
  19. name: "CreateDate",
  20. table: "Bundle",
  21. type: "datetime(6)",
  22. nullable: false,
  23. oldClrType: typeof(DateTime))
  24. .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.ComputedColumn);
  25. migrationBuilder.AlterColumn<DateTime>(
  26. name: "CreateDate",
  27. table: "Asset",
  28. type: "datetime(6)",
  29. nullable: false,
  30. oldClrType: typeof(DateTime))
  31. .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.ComputedColumn);
  32. }
  33. protected override void Down(MigrationBuilder migrationBuilder)
  34. {
  35. migrationBuilder.AlterColumn<DateTime>(
  36. name: "CreateDate",
  37. table: "WXUser",
  38. nullable: false,
  39. oldClrType: typeof(DateTime),
  40. oldType: "datetime(6)")
  41. .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.ComputedColumn);
  42. migrationBuilder.AlterColumn<DateTime>(
  43. name: "CreateDate",
  44. table: "Bundle",
  45. nullable: false,
  46. oldClrType: typeof(DateTime),
  47. oldType: "datetime(6)")
  48. .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.ComputedColumn);
  49. migrationBuilder.AlterColumn<DateTime>(
  50. name: "CreateDate",
  51. table: "Asset",
  52. nullable: false,
  53. oldClrType: typeof(DateTime),
  54. oldType: "datetime(6)")
  55. .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.ComputedColumn);
  56. }
  57. }
  58. }