|
123456789101112131415161718192021222324252627282930313233 |
- using Microsoft.EntityFrameworkCore.Metadata;
- using Microsoft.EntityFrameworkCore.Migrations;
- using System;
- using System.Collections.Generic;
-
- namespace Sample.RabbitMQ.SqlServer.Migrations
- {
- public partial class AddPersons : Migration
- {
- protected override void Up(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.CreateTable(
- name: "Persons",
- columns: table => new
- {
- Id = table.Column<int>(type: "int", nullable: false)
- .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn),
- Age = table.Column<int>(type: "int", nullable: false),
- Name = table.Column<string>(type: "nvarchar(max)", nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_Persons", x => x.Id);
- });
- }
-
- protected override void Down(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropTable(
- name: "Persons");
- }
- }
- }
|