Skip to content

Commit

Permalink
fix: create PostgreSQL migration and fix SQLite migration
Browse files Browse the repository at this point in the history
  • Loading branch information
gauthier-th committed Dec 21, 2024
1 parent c359b73 commit aade72b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
15 changes: 15 additions & 0 deletions server/migration/postgres/1734805738349-AddOverrideRules.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import type { MigrationInterface, QueryRunner } from 'typeorm';

export class AddOverrideRules1734805738349 implements MigrationInterface {
name = 'AddOverrideRules1734805738349';

public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(
`CREATE TABLE "override_rule" ("id" SERIAL NOT NULL, "radarrServiceId" integer, "sonarrServiceId" integer, "users" character varying, "genre" character varying, "language" character varying, "keywords" character varying, "profileId" integer, "rootFolder" character varying, "tags" character varying, "createdAt" TIMESTAMP NOT NULL DEFAULT now(), "updatedAt" TIMESTAMP NOT NULL DEFAULT now(), CONSTRAINT "PK_657f810c7b20a4fce45aee8f182" PRIMARY KEY ("id"))`
);
}

public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`DROP TABLE "override_rule"`);
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { MigrationInterface, QueryRunner } from 'typeorm';

export class AddOverrideRules1731963944025 implements MigrationInterface {
name = 'AddOverrideRules1731963944025';
export class AddOverrideRules1734805733535 implements MigrationInterface {
name = 'AddOverrideRules1734805733535';

public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(
Expand Down

0 comments on commit aade72b

Please sign in to comment.