Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 

56 linhas
2.1 KiB

  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. }