Ichen Chhoeng ff0e97e36b blah
2025-11-17 11:25:33 +07:00

50 lines
1.6 KiB
C#

using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace khmereid_backend.Migrations
{
/// <inheritdoc />
public partial class init : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "users",
columns: table => new
{
id = table.Column<Guid>(type: "uuid", nullable: false),
identity_id = table.Column<Guid>(type: "uuid", nullable: false),
phone = table.Column<string>(type: "text", nullable: false),
national_id = table.Column<string>(type: "text", nullable: false),
created_at = table.Column<DateTime>(type: "timestamp with time zone", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("pk_users", x => x.id);
});
migrationBuilder.CreateIndex(
name: "ix_users_national_id",
table: "users",
column: "national_id",
unique: true);
migrationBuilder.CreateIndex(
name: "ix_users_phone",
table: "users",
column: "phone",
unique: true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "users");
}
}
}