using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace OnProfNext.Server.Migrations
{
///
public partial class InitialCreate : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Users",
columns: table => new
{
Id = table.Column(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Username = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false),
Email = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false),
PasswordHash = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: false),
FirstName = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false),
LastName = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false),
MandantId = table.Column(type: "int", nullable: false, defaultValue: 1),
IsActive = table.Column(type: "bit", nullable: false, defaultValue: true),
CreatedAt = table.Column(type: "datetime2", nullable: false, defaultValueSql: "SYSDATETIME()"),
UpdatedAt = table.Column(type: "datetime2", nullable: false, defaultValueSql: "SYSDATETIME()")
},
constraints: table =>
{
table.PrimaryKey("PK_Users", x => x.Id);
});
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Users");
}
}
}