"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.AddPushTokenToDevices1789800000000 = void 0;
const typeorm_1 = require("typeorm");
class AddPushTokenToDevices1789800000000 {
    async up(queryRunner) {
        const table = await queryRunner.getTable('devices');
        if (!table) {
            return;
        }
        const hasColumn = table.findColumnByName('push_token');
        if (hasColumn) {
            return;
        }
        await queryRunner.addColumn('devices', new typeorm_1.TableColumn({
            name: 'push_token',
            type: 'varchar',
            length: '255',
            isNullable: true,
        }));
    }
    async down(queryRunner) {
        const table = await queryRunner.getTable('devices');
        if (!table) {
            return;
        }
        const hasColumn = table.findColumnByName('push_token');
        if (!hasColumn) {
            return;
        }
        await queryRunner.dropColumn('devices', 'push_token');
    }
}
exports.AddPushTokenToDevices1789800000000 = AddPushTokenToDevices1789800000000;
//# sourceMappingURL=1789800000000-AddPushTokenToDevices.js.map