using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace Workshop10_API.Migrations { /// public partial class InitialCreate : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "Workshops", columns: table => new { Id = table.Column(type: "TEXT", nullable: false), Title = table.Column(type: "TEXT", maxLength: 120, nullable: false), Description = table.Column(type: "TEXT", maxLength: 2000, nullable: true), StartAt = table.Column(type: "TEXT", nullable: false), EndAt = table.Column(type: "TEXT", nullable: false), Location = table.Column(type: "TEXT", maxLength: 200, nullable: true), Capacity = table.Column(type: "INTEGER", nullable: false, defaultValue: 1), IsOnline = table.Column(type: "INTEGER", nullable: false) }, constraints: table => { table.PrimaryKey("PK_Workshops", x => x.Id); }); migrationBuilder.CreateIndex( name: "IX_Workshops_StartAt", table: "Workshops", column: "StartAt"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "Workshops"); } } }