using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace GeoRitmMover.Mover.Data.Migrations;

/// <inheritdoc />
public partial class AddedZones : Migration
{
	/// <inheritdoc />
	protected override void Up(MigrationBuilder migrationBuilder)
	{
		_ = migrationBuilder.CreateTable(
			name: "Zones",
			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_Zones", x => x.Id);
			});

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

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

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