54 lines
2.0 KiB
C#
54 lines
2.0 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace MikrocopDb.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class Initial : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.CreateTable(
|
|
name: "Users",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<Guid>(type: "TEXT", nullable: false),
|
|
UserName = table.Column<string>(type: "TEXT", maxLength: 100, nullable: false),
|
|
FullName = table.Column<string>(type: "TEXT", maxLength: 200, nullable: false),
|
|
Email = table.Column<string>(type: "TEXT", maxLength: 200, nullable: false),
|
|
MobileNumber = table.Column<string>(type: "TEXT", maxLength: 30, nullable: false),
|
|
Language = table.Column<string>(type: "TEXT", maxLength: 20, nullable: false),
|
|
Culture = table.Column<string>(type: "TEXT", maxLength: 20, nullable: false),
|
|
PasswordHash = table.Column<string>(type: "TEXT", nullable: false),
|
|
PasswordSalt = table.Column<string>(type: "TEXT", maxLength: 128, nullable: false)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_Users", x => x.Id);
|
|
});
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_Users_Email",
|
|
table: "Users",
|
|
column: "Email",
|
|
unique: true);
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_Users_UserName",
|
|
table: "Users",
|
|
column: "UserName",
|
|
unique: true);
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(
|
|
name: "Users");
|
|
}
|
|
}
|
|
}
|