Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

20170824130007_AddPersons.cs 1.1 KiB

pirms 7 gadiem
123456789101112131415161718192021222324252627282930313233
  1. using Microsoft.EntityFrameworkCore.Metadata;
  2. using Microsoft.EntityFrameworkCore.Migrations;
  3. using System;
  4. using System.Collections.Generic;
  5. namespace Sample.RabbitMQ.SqlServer.Migrations
  6. {
  7. public partial class AddPersons : Migration
  8. {
  9. protected override void Up(MigrationBuilder migrationBuilder)
  10. {
  11. migrationBuilder.CreateTable(
  12. name: "Persons",
  13. columns: table => new
  14. {
  15. Id = table.Column<int>(type: "int", nullable: false)
  16. .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn),
  17. Age = table.Column<int>(type: "int", nullable: false),
  18. Name = table.Column<string>(type: "nvarchar(max)", nullable: true)
  19. },
  20. constraints: table =>
  21. {
  22. table.PrimaryKey("PK_Persons", x => x.Id);
  23. });
  24. }
  25. protected override void Down(MigrationBuilder migrationBuilder)
  26. {
  27. migrationBuilder.DropTable(
  28. name: "Persons");
  29. }
  30. }
  31. }