20210627052532_ChangeKeyField.cs 986 B

1234567891011121314151617181920212223242526272829303132
  1. using System;
  2. using Microsoft.EntityFrameworkCore.Migrations;
  3. namespace VCommon.VEntityFrameworkCore.Tests.Migrations
  4. {
  5. public partial class ChangeKeyField : Migration
  6. {
  7. protected override void Up(MigrationBuilder migrationBuilder)
  8. {
  9. migrationBuilder.AlterColumn<string>(
  10. name: "Id",
  11. table: "TestEntities",
  12. type: "varchar(36)",
  13. maxLength: 36,
  14. nullable: false,
  15. oldClrType: typeof(byte[]),
  16. oldType: "varbinary(16)");
  17. }
  18. protected override void Down(MigrationBuilder migrationBuilder)
  19. {
  20. migrationBuilder.AlterColumn<byte[]>(
  21. name: "Id",
  22. table: "TestEntities",
  23. type: "varbinary(16)",
  24. nullable: false,
  25. oldClrType: typeof(string),
  26. oldType: "varchar(36)",
  27. oldMaxLength: 36);
  28. }
  29. }
  30. }