using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace GeoRitmMover.Mover.Data.Migrations;

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

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

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

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