aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server.Implementations
diff options
context:
space:
mode:
authorPatrick Barron <barronpm@gmail.com>2021-08-13 21:25:19 -0400
committerPatrick Barron <barronpm@gmail.com>2021-08-13 21:28:17 -0400
commit8a1e55251e23681e19bef318540f8be5d750be2d (patch)
tree7a13a7ca93d6f1125471b7a883decdf56611a87f /Jellyfin.Server.Implementations
parent1615663bd240fadd4a2d03c44256880dd40c7cb2 (diff)
Fix devices migration
Diffstat (limited to 'Jellyfin.Server.Implementations')
-rw-r--r--Jellyfin.Server.Implementations/Migrations/20210814002109_AddDevices.cs220
1 files changed, 0 insertions, 220 deletions
diff --git a/Jellyfin.Server.Implementations/Migrations/20210814002109_AddDevices.cs b/Jellyfin.Server.Implementations/Migrations/20210814002109_AddDevices.cs
index 81bf89007..ac062317a 100644
--- a/Jellyfin.Server.Implementations/Migrations/20210814002109_AddDevices.cs
+++ b/Jellyfin.Server.Implementations/Migrations/20210814002109_AddDevices.cs
@@ -9,67 +9,6 @@ namespace Jellyfin.Server.Implementations.Migrations
{
protected override void Up(MigrationBuilder migrationBuilder)
{
- migrationBuilder.DropForeignKey(
- name: "FK_ImageInfos_Users_UserId",
- schema: "jellyfin",
- table: "ImageInfos");
-
- migrationBuilder.DropForeignKey(
- name: "FK_Permissions_Users_Permission_Permissions_Guid",
- schema: "jellyfin",
- table: "Permissions");
-
- migrationBuilder.DropForeignKey(
- name: "FK_Preferences_Users_Preference_Preferences_Guid",
- schema: "jellyfin",
- table: "Preferences");
-
- migrationBuilder.DropIndex(
- name: "IX_Preferences_Preference_Preferences_Guid",
- schema: "jellyfin",
- table: "Preferences");
-
- migrationBuilder.DropIndex(
- name: "IX_Permissions_Permission_Permissions_Guid",
- schema: "jellyfin",
- table: "Permissions");
-
- migrationBuilder.DropIndex(
- name: "IX_DisplayPreferences_UserId",
- schema: "jellyfin",
- table: "DisplayPreferences");
-
- migrationBuilder.DropIndex(
- name: "IX_CustomItemDisplayPreferences_UserId",
- schema: "jellyfin",
- table: "CustomItemDisplayPreferences");
-
- migrationBuilder.AlterColumn<string>(
- name: "Username",
- schema: "jellyfin",
- table: "Users",
- type: "TEXT",
- maxLength: 255,
- nullable: false,
- collation: "NOCASE",
- oldClrType: typeof(string),
- oldType: "TEXT",
- oldMaxLength: 255);
-
- migrationBuilder.AddColumn<Guid>(
- name: "UserId",
- schema: "jellyfin",
- table: "Preferences",
- type: "TEXT",
- nullable: true);
-
- migrationBuilder.AddColumn<Guid>(
- name: "UserId",
- schema: "jellyfin",
- table: "Permissions",
- type: "TEXT",
- nullable: true);
-
migrationBuilder.CreateTable(
name: "ApiKeys",
schema: "jellyfin",
@@ -133,29 +72,6 @@ namespace Jellyfin.Server.Implementations.Migrations
});
migrationBuilder.CreateIndex(
- name: "IX_Users_Username",
- schema: "jellyfin",
- table: "Users",
- column: "Username",
- unique: true);
-
- migrationBuilder.CreateIndex(
- name: "IX_Preferences_UserId_Kind",
- schema: "jellyfin",
- table: "Preferences",
- columns: new[] { "UserId", "Kind" },
- unique: true,
- filter: "[UserId] IS NOT NULL");
-
- migrationBuilder.CreateIndex(
- name: "IX_Permissions_UserId_Kind",
- schema: "jellyfin",
- table: "Permissions",
- columns: new[] { "UserId", "Kind" },
- unique: true,
- filter: "[UserId] IS NOT NULL");
-
- migrationBuilder.CreateIndex(
name: "IX_ApiKeys_AccessToken",
schema: "jellyfin",
table: "ApiKeys",
@@ -192,55 +108,10 @@ namespace Jellyfin.Server.Implementations.Migrations
schema: "jellyfin",
table: "Devices",
columns: new[] { "UserId", "DeviceId" });
-
- migrationBuilder.AddForeignKey(
- name: "FK_ImageInfos_Users_UserId",
- schema: "jellyfin",
- table: "ImageInfos",
- column: "UserId",
- principalSchema: "jellyfin",
- principalTable: "Users",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
-
- migrationBuilder.AddForeignKey(
- name: "FK_Permissions_Users_UserId",
- schema: "jellyfin",
- table: "Permissions",
- column: "UserId",
- principalSchema: "jellyfin",
- principalTable: "Users",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
-
- migrationBuilder.AddForeignKey(
- name: "FK_Preferences_Users_UserId",
- schema: "jellyfin",
- table: "Preferences",
- column: "UserId",
- principalSchema: "jellyfin",
- principalTable: "Users",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
- migrationBuilder.DropForeignKey(
- name: "FK_ImageInfos_Users_UserId",
- schema: "jellyfin",
- table: "ImageInfos");
-
- migrationBuilder.DropForeignKey(
- name: "FK_Permissions_Users_UserId",
- schema: "jellyfin",
- table: "Permissions");
-
- migrationBuilder.DropForeignKey(
- name: "FK_Preferences_Users_UserId",
- schema: "jellyfin",
- table: "Preferences");
-
migrationBuilder.DropTable(
name: "ApiKeys",
schema: "jellyfin");
@@ -252,97 +123,6 @@ namespace Jellyfin.Server.Implementations.Migrations
migrationBuilder.DropTable(
name: "Devices",
schema: "jellyfin");
-
- migrationBuilder.DropIndex(
- name: "IX_Users_Username",
- schema: "jellyfin",
- table: "Users");
-
- migrationBuilder.DropIndex(
- name: "IX_Preferences_UserId_Kind",
- schema: "jellyfin",
- table: "Preferences");
-
- migrationBuilder.DropIndex(
- name: "IX_Permissions_UserId_Kind",
- schema: "jellyfin",
- table: "Permissions");
-
- migrationBuilder.DropColumn(
- name: "UserId",
- schema: "jellyfin",
- table: "Preferences");
-
- migrationBuilder.DropColumn(
- name: "UserId",
- schema: "jellyfin",
- table: "Permissions");
-
- migrationBuilder.AlterColumn<string>(
- name: "Username",
- schema: "jellyfin",
- table: "Users",
- type: "TEXT",
- maxLength: 255,
- nullable: false,
- oldClrType: typeof(string),
- oldType: "TEXT",
- oldMaxLength: 255,
- oldCollation: "NOCASE");
-
- migrationBuilder.CreateIndex(
- name: "IX_Preferences_Preference_Preferences_Guid",
- schema: "jellyfin",
- table: "Preferences",
- column: "Preference_Preferences_Guid");
-
- migrationBuilder.CreateIndex(
- name: "IX_Permissions_Permission_Permissions_Guid",
- schema: "jellyfin",
- table: "Permissions",
- column: "Permission_Permissions_Guid");
-
- migrationBuilder.CreateIndex(
- name: "IX_DisplayPreferences_UserId",
- schema: "jellyfin",
- table: "DisplayPreferences",
- column: "UserId");
-
- migrationBuilder.CreateIndex(
- name: "IX_CustomItemDisplayPreferences_UserId",
- schema: "jellyfin",
- table: "CustomItemDisplayPreferences",
- column: "UserId");
-
- migrationBuilder.AddForeignKey(
- name: "FK_ImageInfos_Users_UserId",
- schema: "jellyfin",
- table: "ImageInfos",
- column: "UserId",
- principalSchema: "jellyfin",
- principalTable: "Users",
- principalColumn: "Id",
- onDelete: ReferentialAction.Restrict);
-
- migrationBuilder.AddForeignKey(
- name: "FK_Permissions_Users_Permission_Permissions_Guid",
- schema: "jellyfin",
- table: "Permissions",
- column: "Permission_Permissions_Guid",
- principalSchema: "jellyfin",
- principalTable: "Users",
- principalColumn: "Id",
- onDelete: ReferentialAction.Restrict);
-
- migrationBuilder.AddForeignKey(
- name: "FK_Preferences_Users_Preference_Preferences_Guid",
- schema: "jellyfin",
- table: "Preferences",
- column: "Preference_Preferences_Guid",
- principalSchema: "jellyfin",
- principalTable: "Users",
- principalColumn: "Id",
- onDelete: ReferentialAction.Restrict);
}
}
}