20201217045015_AddBaseBlackCard.cs 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. using System;
  2. using Microsoft.EntityFrameworkCore.Migrations;
  3. namespace Dfs.WayneChina.SpsDataCourier.Migrations
  4. {
  5. public partial class AddBaseBlackCard : Migration
  6. {
  7. protected override void Up(MigrationBuilder migrationBuilder)
  8. {
  9. migrationBuilder.CreateTable(
  10. name: "BaseBlackCard",
  11. columns: table => new
  12. {
  13. Id = table.Column<ulong>(nullable: false)
  14. .Annotation("Sqlite:Autoincrement", true),
  15. Gid = table.Column<ulong>(nullable: false),
  16. CardNo = table.Column<string>(nullable: true),
  17. DateTime = table.Column<DateTime>(nullable: false),
  18. AccountGid = table.Column<ulong>(nullable: false),
  19. AccountId = table.Column<string>(nullable: true),
  20. CardType = table.Column<byte>(nullable: false),
  21. DiscountNo = table.Column<ushort>(nullable: false),
  22. Reason = table.Column<string>(nullable: true),
  23. UploadFlag = table.Column<byte>(nullable: false),
  24. OperationType = table.Column<byte>(nullable: false),
  25. VersionNo = table.Column<long>(nullable: false),
  26. LastUpdate = table.Column<DateTime>(nullable: false),
  27. CommitFlag = table.Column<byte>(nullable: false),
  28. SyncFlag = table.Column<byte>(nullable: false)
  29. },
  30. constraints: table =>
  31. {
  32. table.PrimaryKey("PK_BaseBlackCard", x => x.Id);
  33. });
  34. }
  35. protected override void Down(MigrationBuilder migrationBuilder)
  36. {
  37. migrationBuilder.DropTable(
  38. name: "BaseBlackCard");
  39. }
  40. }
  41. }