2022-04-24 04:08:45 +02:00
|
|
|
import { MigrationInterface, QueryRunner } from 'typeorm';
|
2022-03-27 21:58:54 +02:00
|
|
|
|
2022-04-24 04:08:45 +02:00
|
|
|
export class AddObjectColumnToSmartInfo1648317474768 implements MigrationInterface {
|
2022-03-27 21:58:54 +02:00
|
|
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
|
|
await queryRunner.query(`
|
|
|
|
ALTER TABLE smart_info
|
2022-04-24 04:08:45 +02:00
|
|
|
ADD COLUMN if not exists objects text[];
|
2022-03-27 21:58:54 +02:00
|
|
|
|
|
|
|
`);
|
|
|
|
}
|
|
|
|
|
|
|
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
|
|
await queryRunner.query(`
|
|
|
|
ALTER TABLE smart_info
|
|
|
|
DROP COLUMN objects;
|
|
|
|
`);
|
|
|
|
}
|
|
|
|
}
|