38 lines
1.2 KiB
C#
38 lines
1.2 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace PiwigoDirectorySync.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class AlbumPathIsUniqueWithinServer : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropIndex(
|
|
name: "IX_PiwigoAlbums_ServerId_Path",
|
|
table: "PiwigoAlbums");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_PiwigoAlbums_ServerId_Path",
|
|
table: "PiwigoAlbums",
|
|
columns: new[] { "ServerId", "Path" },
|
|
unique: true);
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropIndex(
|
|
name: "IX_PiwigoAlbums_ServerId_Path",
|
|
table: "PiwigoAlbums");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_PiwigoAlbums_ServerId_Path",
|
|
table: "PiwigoAlbums",
|
|
columns: new[] { "ServerId", "Path" });
|
|
}
|
|
}
|
|
}
|