"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.WidenTransactionBlockColumn1789700000000 = void 0;
const typeorm_1 = require("typeorm");
class WidenTransactionBlockColumn1789700000000 {
    async up(queryRunner) {
        const table = await queryRunner.getTable('transactions');
        if (!table) {
            return;
        }
        const blockColumn = table.findColumnByName('block');
        if (!blockColumn || blockColumn.type !== 'int') {
            return;
        }
        await queryRunner.changeColumn('transactions', 'block', new typeorm_1.TableColumn({
            name: 'block',
            type: 'bigint',
            isNullable: true,
        }));
    }
    async down(queryRunner) {
        const table = await queryRunner.getTable('transactions');
        if (!table) {
            return;
        }
        const blockColumn = table.findColumnByName('block');
        if (!blockColumn || blockColumn.type !== 'bigint') {
            return;
        }
        await queryRunner.changeColumn('transactions', 'block', new typeorm_1.TableColumn({
            name: 'block',
            type: 'int',
            isNullable: true,
        }));
    }
}
exports.WidenTransactionBlockColumn1789700000000 = WidenTransactionBlockColumn1789700000000;
//# sourceMappingURL=1789700000000-WidenTransactionBlockColumn.js.map