58 lines
2.7 KiB
C#
58 lines
2.7 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace AceJobAgency.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class AddedUser : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AlterDatabase()
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "Users",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<string>(type: "varchar(36)", maxLength: 36, nullable: false)
|
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
FirstName = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false)
|
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
LastName = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false)
|
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
Gender = table.Column<int>(type: "int", nullable: false),
|
|
NationalRegistrationIdentityCardNumber = table.Column<string>(type: "varchar(9)", maxLength: 9, nullable: false)
|
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
Email = table.Column<string>(type: "varchar(128)", maxLength: 128, nullable: false)
|
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
Password = table.Column<string>(type: "varchar(128)", maxLength: 128, nullable: false)
|
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
DateOfBirth = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
|
ResumeName = table.Column<string>(type: "varchar(128)", maxLength: 128, nullable: false)
|
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
WhoAmI = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: false)
|
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
IsActive = table.Column<int>(type: "int", nullable: false),
|
|
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
|
UpdatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_Users", x => x.Id);
|
|
})
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(
|
|
name: "Users");
|
|
}
|
|
}
|
|
}
|