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.

20170624095008_CreateDatabase.cs 2.1 KiB

преди 7 години
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. using System;
  2. using System.Collections.Generic;
  3. using Microsoft.EntityFrameworkCore.Migrations;
  4. namespace Sample.Kafka.Migrations
  5. {
  6. public partial class CreateDatabase : Migration
  7. {
  8. protected override void Up(MigrationBuilder migrationBuilder)
  9. {
  10. migrationBuilder.CreateTable(
  11. name: "ReceivedMessages",
  12. columns: table => new
  13. {
  14. Id = table.Column<string>(nullable: false),
  15. Added = table.Column<DateTime>(nullable: false),
  16. Content = table.Column<string>(nullable: true),
  17. KeyName = table.Column<string>(nullable: true),
  18. LastRun = table.Column<DateTime>(nullable: false),
  19. Retries = table.Column<int>(nullable: false),
  20. StateName = table.Column<string>(maxLength: 50, nullable: true)
  21. },
  22. constraints: table =>
  23. {
  24. table.PrimaryKey("PK_ReceivedMessages", x => x.Id);
  25. });
  26. migrationBuilder.CreateTable(
  27. name: "SentMessages",
  28. columns: table => new
  29. {
  30. Id = table.Column<string>(nullable: false),
  31. Added = table.Column<DateTime>(nullable: false),
  32. Content = table.Column<string>(nullable: true),
  33. KeyName = table.Column<string>(nullable: true),
  34. LastRun = table.Column<DateTime>(nullable: false),
  35. Retries = table.Column<int>(nullable: false),
  36. StateName = table.Column<string>(maxLength: 50, nullable: true)
  37. },
  38. constraints: table =>
  39. {
  40. table.PrimaryKey("PK_SentMessages", x => x.Id);
  41. });
  42. }
  43. protected override void Down(MigrationBuilder migrationBuilder)
  44. {
  45. migrationBuilder.DropTable(
  46. name: "ReceivedMessages");
  47. migrationBuilder.DropTable(
  48. name: "SentMessages");
  49. }
  50. }
  51. }