2022-03-10 23:09:03 +01:00
|
|
|
import { MigrationInterface, QueryRunner } from 'typeorm';
|
|
|
|
|
|
|
|
export class AddRegionCityToExIf1646709533213 implements MigrationInterface {
|
|
|
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
|
|
await queryRunner.query(`
|
|
|
|
ALTER TABLE exif
|
2022-04-24 04:08:45 +02:00
|
|
|
ADD COLUMN if not exists city varchar;
|
2022-03-10 23:09:03 +01:00
|
|
|
|
|
|
|
ALTER TABLE exif
|
2022-04-24 04:08:45 +02:00
|
|
|
ADD COLUMN if not exists state varchar;
|
2022-03-10 23:09:03 +01:00
|
|
|
|
|
|
|
ALTER TABLE exif
|
2022-04-24 04:08:45 +02:00
|
|
|
ADD COLUMN if not exists country varchar;
|
2022-03-10 23:09:03 +01:00
|
|
|
`);
|
|
|
|
}
|
|
|
|
|
|
|
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
|
|
await queryRunner.query(`
|
|
|
|
ALTER TABLE exif
|
|
|
|
DROP COLUMN city;
|
|
|
|
|
|
|
|
ALTER TABLE exif
|
|
|
|
DROP COLUMN state;
|
|
|
|
|
|
|
|
ALTER TABLE exif
|
|
|
|
DROP COLUMN country;
|
|
|
|
`);
|
|
|
|
}
|
|
|
|
}
|