using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace Api.Database.Migrations { /// public partial class SpecsSubjectsAndSeasons : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "Seasons", columns: table => new { Id = table.Column(type: "int", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), Name = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: false), StartDate = table.Column(type: "date", nullable: false), EndDate = table.Column(type: "date", nullable: false) }, constraints: table => { table.PrimaryKey("PK_Seasons", x => x.Id); }); migrationBuilder.CreateTable( name: "Specializations", columns: table => new { Id = table.Column(type: "int", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), Name = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), ShortName = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: false) }, constraints: table => { table.PrimaryKey("PK_Specializations", x => x.Id); }); migrationBuilder.CreateTable( name: "Subjects", columns: table => new { Id = table.Column(type: "int", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), Name = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), ShortName = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: false) }, constraints: table => { table.PrimaryKey("PK_Subjects", x => x.Id); }); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "Seasons"); migrationBuilder.DropTable( name: "Specializations"); migrationBuilder.DropTable( name: "Subjects"); } } }