using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace GeoRitmMover.Mover.Data.Migrations;

/// <inheritdoc />
public partial class AddUsers : Migration
{
	/// <inheritdoc />
	protected override void Up(MigrationBuilder migrationBuilder)
	{
		_ = migrationBuilder.CreateTable(
			name: "Users",
			columns: table => new
			{
				Id = table.Column<Guid>(type: "uuid", nullable: false),
				From = table.Column<int>(type: "integer", nullable: false),
				To = table.Column<Guid>(type: "uuid", nullable: false)
			},
			constraints: table =>
			{
				_ = table.PrimaryKey("PK_Users", x => x.Id);
			});

		_ = migrationBuilder.CreateIndex(
			name: "IX_Users_From",
			table: "Users",
			column: "From",
			unique: true);

		_ = migrationBuilder.CreateIndex(
			name: "IX_Users_To",
			table: "Users",
			column: "To",
			unique: true);
	}

	/// <inheritdoc />
	protected override void Down(MigrationBuilder migrationBuilder)
	{
		_ = migrationBuilder.DropTable(
			name: "Users");
	}
}
