'use strict';

exports.up = function(db, callback) {
    db.runSql('ALTER TABLE users CHANGE COLUMN twoFactorAuthenticationEnabled totpEnabled BOOLEAN DEFAULT false, CHANGE COLUMN twoFactorAuthenticationSecret totpSecret VARCHAR(128) DEFAULT ""', function (error) {
        if (error) console.error(error);
        callback(error);
    });
};

exports.down = function(db, callback) {
    db.runSql('ALTER TABLE users CHANGE COLUMN totpEnabled twoFactorAuthenticationEnabled BOOLEAN DEFAULT false, CHANGE COLUMN totpSecret twoFactorAuthenticationSecret VARCHAR(128) DEFAULT ""', function (error) {
        if (error) console.error(error);
        callback(error);
    });
};
