using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace OnProfNext.Server.Migrations
{
///
public partial class AddProjectsTable : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Projects",
columns: table => new
{
Id = table.Column(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
ProjectName = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false),
Description = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
ProjectManager = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true),
Status = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false, defaultValue: "Geplant"),
StartDate = table.Column(type: "datetime2", nullable: false, defaultValueSql: "SYSDATETIME()"),
EndDate = table.Column(type: "datetime2", nullable: true),
MandantId = table.Column(type: "int", nullable: false, defaultValue: 1),
CreatedAt = table.Column(type: "datetime2", nullable: false, defaultValueSql: "SYSDATETIME()"),
UpdatedAt = table.Column(type: "datetime2", nullable: false, defaultValueSql: "SYSDATETIME()")
},
constraints: table =>
{
table.PrimaryKey("PK_Projects", x => x.Id);
});
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Projects");
}
}
}