Files
Workshop10-API/Migrations/20250903175616_InitialCreate.cs
2025-09-03 16:31:58 -03:00

46 lines
1.7 KiB
C#

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