"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.NewDatabaseConnection1788084818324 = void 0;
class NewDatabaseConnection1788084818324 {
    constructor() {
        this.name = 'NewDatabaseConnection1788084818324';
    }
    async up(queryRunner) {
        const hasCol = await queryRunner.hasColumn('attendances', 'checkout_reminder_sent');
        if (!hasCol) {
            await queryRunner.query(`ALTER TABLE \`attendances\` ADD \`checkout_reminder_sent\` tinyint NOT NULL DEFAULT 0`);
        }
        const hasColAt = await queryRunner.hasColumn('attendances', 'checkout_reminder_sent_at');
        if (!hasColAt) {
            await queryRunner.query(`ALTER TABLE \`attendances\` ADD \`checkout_reminder_sent_at\` datetime NULL`);
        }
    }
    async down(queryRunner) {
        const hasColAt = await queryRunner.hasColumn('attendances', 'checkout_reminder_sent_at');
        if (hasColAt) {
            await queryRunner.query(`ALTER TABLE \`attendances\` DROP COLUMN \`checkout_reminder_sent_at\``);
        }
        const hasCol = await queryRunner.hasColumn('attendances', 'checkout_reminder_sent');
        if (hasCol) {
            await queryRunner.query(`ALTER TABLE \`attendances\` DROP COLUMN \`checkout_reminder_sent\``);
        }
    }
}
exports.NewDatabaseConnection1788084818324 = NewDatabaseConnection1788084818324;
//# sourceMappingURL=1788084818324-NewDatabaseConnection.js.map