-
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Incorrect initial state for new rules
- also remove the default server option for *arr settings as this is no longer used.
- Loading branch information
Showing
13 changed files
with
173 additions
and
238 deletions.
There are no files selected for viewing
58 changes: 58 additions & 0 deletions
58
server/src/database/migrations/1733357722729-Remove-default-arr-servers.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
import { MigrationInterface, QueryRunner } from 'typeorm'; | ||
|
||
export class RemoveDefaultArrServers1733357722729 | ||
implements MigrationInterface | ||
{ | ||
name = 'RemoveDefaultArrServers1733357722729'; | ||
|
||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query(` | ||
CREATE TABLE "temporary_sonarr_settings" ( | ||
"id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, | ||
"serverName" varchar NOT NULL, | ||
"url" varchar, | ||
"apiKey" varchar | ||
) | ||
`); | ||
await queryRunner.query(` | ||
INSERT INTO "temporary_sonarr_settings"("id", "serverName", "url", "apiKey") | ||
SELECT "id", | ||
"serverName", | ||
"url", | ||
"apiKey" | ||
FROM "sonarr_settings" | ||
`); | ||
await queryRunner.query(` | ||
DROP TABLE "sonarr_settings" | ||
`); | ||
await queryRunner.query(` | ||
ALTER TABLE "temporary_sonarr_settings" | ||
RENAME TO "sonarr_settings" | ||
`); | ||
await queryRunner.query(` | ||
CREATE TABLE "temporary_radarr_settings" ( | ||
"id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, | ||
"serverName" varchar NOT NULL, | ||
"url" varchar, | ||
"apiKey" varchar | ||
) | ||
`); | ||
await queryRunner.query(` | ||
INSERT INTO "temporary_radarr_settings"("id", "serverName", "url", "apiKey") | ||
SELECT "id", | ||
"serverName", | ||
"url", | ||
"apiKey" | ||
FROM "radarr_settings" | ||
`); | ||
await queryRunner.query(` | ||
DROP TABLE "radarr_settings" | ||
`); | ||
await queryRunner.query(` | ||
ALTER TABLE "temporary_radarr_settings" | ||
RENAME TO "radarr_settings" | ||
`); | ||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<void> {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.