mirror of
https://github.com/KevinMidboe/immich.git
synced 2026-04-28 17:53:47 +00:00
* refactor(server): tsconfigs * chore: dummy commit * fix: start.sh * chore: restore original entry scripts
18 lines
935 B
TypeScript
18 lines
935 B
TypeScript
import { MigrationInterface, QueryRunner } from 'typeorm';
|
|
|
|
export class AddUpdatedAtColumnToAlbumsUsersAssets1675667878312 implements MigrationInterface {
|
|
name = 'AddUpdatedAtColumnToAlbumsUsersAssets1675667878312';
|
|
|
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.query(`ALTER TABLE "albums" ADD "updatedAt" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now()`);
|
|
await queryRunner.query(`ALTER TABLE "users" ADD "updatedAt" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now()`);
|
|
await queryRunner.query(`ALTER TABLE "assets" ADD "updatedAt" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now()`);
|
|
}
|
|
|
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.query(`ALTER TABLE "albums" DROP COLUMN "updatedAt"`);
|
|
await queryRunner.query(`ALTER TABLE "assets" DROP COLUMN "updatedAt"`);
|
|
await queryRunner.query(`ALTER TABLE "users" DROP COLUMN "updatedAt"`);
|
|
}
|
|
}
|