"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RemoveDuplicateIsNativeFromTokens1789000000000 = void 0;
class RemoveDuplicateIsNativeFromTokens1789000000000 {
    async up(queryRunner) {
        const table = await queryRunner.getTable('tokens');
        if (!table) {
            return;
        }
        // Keep the column that the entity maps to (is_native) and drop the
        // duplicate camelCase column if it exists.
        if (table.findColumnByName('is_native') && table.findColumnByName('isNative')) {
            await queryRunner.dropColumn('tokens', 'isNative');
        }
    }
    async down(queryRunner) {
        const table = await queryRunner.getTable('tokens');
        if (!table) {
            return;
        }
        if (table.findColumnByName('is_native') && !table.findColumnByName('isNative')) {
            await queryRunner.query('ALTER TABLE tokens ADD COLUMN isNative tinyint(1) NOT NULL DEFAULT 0');
        }
    }
}
exports.RemoveDuplicateIsNativeFromTokens1789000000000 = RemoveDuplicateIsNativeFromTokens1789000000000;
//# sourceMappingURL=1789000000000-RemoveDuplicateIsNativeFromTokens.js.map