- Added a new `api` service for the NestJS backend, including health checks and dependencies on PostgreSQL, Redis, and MinIO. - Introduced PostgreSQL and Redis services with health checks and configurations for data persistence. - Added MinIO for S3-compatible object storage and a one-shot service to initialize required buckets. - Updated the Nginx configuration to proxy requests to the new backend API and MinIO storage. - Enhanced the Dockerfile to support the new API environment variables and configurations. - Updated the `package.json` and `package-lock.json` to include new dependencies for QR code generation and other utilities. Co-authored-by: Cursor <cursoragent@cursor.com>
28 lines
1.1 KiB
TypeScript
28 lines
1.1 KiB
TypeScript
import { MigrationInterface, QueryRunner } from 'typeorm';
|
|
|
|
export class AddedFilmmakerFilmId1697037684328 implements MigrationInterface {
|
|
name = 'AddedFilmmakerFilmId1697037684328';
|
|
|
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.query(
|
|
`ALTER TABLE "filmmakers_films" ADD "id" SERIAL NOT NULL`,
|
|
);
|
|
await queryRunner.query(
|
|
`ALTER TABLE "filmmakers_films" DROP CONSTRAINT "PK_7810850c4a8f129497f8852a483"`,
|
|
);
|
|
await queryRunner.query(
|
|
`ALTER TABLE "filmmakers_films" ADD CONSTRAINT "PK_94958880e5b2064096130825427" PRIMARY KEY ("filmmaker_id", "film_id", "id")`,
|
|
);
|
|
}
|
|
|
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.query(
|
|
`ALTER TABLE "filmmakers_films" DROP CONSTRAINT "PK_94958880e5b2064096130825427"`,
|
|
);
|
|
await queryRunner.query(
|
|
`ALTER TABLE "filmmakers_films" ADD CONSTRAINT "PK_7810850c4a8f129497f8852a483" PRIMARY KEY ("filmmaker_id", "film_id")`,
|
|
);
|
|
await queryRunner.query(`ALTER TABLE "filmmakers_films" DROP COLUMN "id"`);
|
|
}
|
|
}
|