mirror of
https://github.com/fallenbagel/jellyseerr.git
synced 2025-12-24 02:39:18 -05:00
* chore(release): 1.4.0 * chore(release): 1.4.1 * chore(release): 1.5.0 * chore(release): 1.6.0 * chore(release): 1.7.0 * feat: support for postgresql * test(pgsql): disable root certificate verification * test(ci): temporarily change CI for local repo * fix: don't use SQLite idiom when using PgSQL * feat(db): add flag to toggle TLS for Postgres * feat(postgres and migrations): added migrations for postgres & imporved ssl for postgres config #186 * fix: restored workflow actions * fix: access order * fix: added pushover sound migration tto initial migration * fix: added option to log queries * fix: issue with session migration * chore: relocate pushover sound migration * feat: added logging option to other datasources * chore: small tweaks for the datasource. Added docs for db setup * chore: cleanup logs * fix: added default dates to postgres migration * fix: removed psql specific relation checks * chore: added some debug sanity checks * chore: added some more debug sanity checks * chore: added some more additional debug sanity checks * chore: added some more+ additional debug sanity checks * chore: mild log cleanup * chore: more log cleanup * chore: finish log cleanup * fix: added not null to migration so typeorm doesn't delete ids * chore: cleanup extra psql code * fix: remove eager load * docs: added documentation for migration to postgres * docs: added database option to bug template * feat: created docker-compose postgres file * fix: updated ts schema to align with change to migration * fix: switch timestamp to include timezone * fix: fixed indentation in psql docker-compose * fix: changed version to 0.1.0 to remove ui notification * style: fixed prettier in docker-compose.pastgres.yaml * chore: restored CHANGELOG.md * chore: revverted ts commit * fix: update pnpm lock with pg package * chore(pnpm-lock.yaml): updated pnpm-lock * docs: update docs to add psql set up info * refactor: clean up code from cr comments * feat: migrate blacklist * fix: fix issue with cypress tests * docs: update psql docs * fix: fix psql issue in user page; fix tiny psql error when selecting by empty list * fix: incorrect current date function * fix: null contraint with mediaAddedAt; fix psql col type * refactor: removed unnecessary import * feat: add postgres migration for streaming region --------- Co-authored-by: Fallenbagel <98979876+Fallenbagel@users.noreply.github.com> Co-authored-by: semantic-release-bot <semantic-release-bot@martynus.net> Co-authored-by: zackhow <zackhow@gmail.com> Co-authored-by: Ryan Algar <me@ralgar.dev> Co-authored-by: Ryan Algar <59636191+ralgar@users.noreply.github.com>
32 lines
3.1 KiB
TypeScript
32 lines
3.1 KiB
TypeScript
import type { MigrationInterface, QueryRunner } from 'typeorm';
|
|
|
|
export class AddLanguageProfileId1612571545781 implements MigrationInterface {
|
|
name = 'AddLanguageProfileId1612571545781';
|
|
|
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.query(
|
|
`CREATE TABLE "temporary_media_request" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "status" integer NOT NULL, "createdAt" datetime NOT NULL DEFAULT (datetime('now')), "updatedAt" datetime NOT NULL DEFAULT (datetime('now')), "type" varchar NOT NULL, "mediaId" integer, "requestedById" integer, "modifiedById" integer, "is4k" boolean NOT NULL DEFAULT (0), "serverId" integer, "profileId" integer, "rootFolder" varchar, "languageProfileId" integer, CONSTRAINT "FK_a1aa713f41c99e9d10c48da75a0" FOREIGN KEY ("mediaId") REFERENCES "media" ("id") ON DELETE CASCADE ON UPDATE NO ACTION, CONSTRAINT "FK_6997bee94720f1ecb7f31137095" FOREIGN KEY ("requestedById") REFERENCES "user" ("id") ON DELETE CASCADE ON UPDATE NO ACTION, CONSTRAINT "FK_f4fc4efa14c3ba2b29c4525fa15" FOREIGN KEY ("modifiedById") REFERENCES "user" ("id") ON DELETE SET NULL ON UPDATE NO ACTION)`
|
|
);
|
|
await queryRunner.query(
|
|
`INSERT INTO "temporary_media_request"("id", "status", "createdAt", "updatedAt", "type", "mediaId", "requestedById", "modifiedById", "is4k", "serverId", "profileId", "rootFolder") SELECT "id", "status", "createdAt", "updatedAt", "type", "mediaId", "requestedById", "modifiedById", "is4k", "serverId", "profileId", "rootFolder" FROM "media_request"`
|
|
);
|
|
await queryRunner.query(`DROP TABLE "media_request"`);
|
|
await queryRunner.query(
|
|
`ALTER TABLE "temporary_media_request" RENAME TO "media_request"`
|
|
);
|
|
}
|
|
|
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.query(
|
|
`ALTER TABLE "media_request" RENAME TO "temporary_media_request"`
|
|
);
|
|
await queryRunner.query(
|
|
`CREATE TABLE "media_request" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "status" integer NOT NULL, "createdAt" datetime NOT NULL DEFAULT (datetime('now')), "updatedAt" datetime NOT NULL DEFAULT (datetime('now')), "type" varchar NOT NULL, "mediaId" integer, "requestedById" integer, "modifiedById" integer, "is4k" boolean NOT NULL DEFAULT (0), "serverId" integer, "profileId" integer, "rootFolder" varchar, CONSTRAINT "FK_a1aa713f41c99e9d10c48da75a0" FOREIGN KEY ("mediaId") REFERENCES "media" ("id") ON DELETE CASCADE ON UPDATE NO ACTION, CONSTRAINT "FK_6997bee94720f1ecb7f31137095" FOREIGN KEY ("requestedById") REFERENCES "user" ("id") ON DELETE CASCADE ON UPDATE NO ACTION, CONSTRAINT "FK_f4fc4efa14c3ba2b29c4525fa15" FOREIGN KEY ("modifiedById") REFERENCES "user" ("id") ON DELETE SET NULL ON UPDATE NO ACTION)`
|
|
);
|
|
await queryRunner.query(
|
|
`INSERT INTO "media_request"("id", "status", "createdAt", "updatedAt", "type", "mediaId", "requestedById", "modifiedById", "is4k", "serverId", "profileId", "rootFolder") SELECT "id", "status", "createdAt", "updatedAt", "type", "mediaId", "requestedById", "modifiedById", "is4k", "serverId", "profileId", "rootFolder" FROM "temporary_media_request"`
|
|
);
|
|
await queryRunner.query(`DROP TABLE "temporary_media_request"`);
|
|
}
|
|
}
|