export class AddGlobalSmtpOAuth1775900000000 {
    constructor() {
        this.name = "AddGlobalSmtpOAuth1775900000000";
    }
    async up(queryRunner) {
        /*
         * Add OAuth 2.0 columns to GlobalConfig table so global SMTP can be
         * authenticated with providers like Microsoft 365 or Google Workspace.
         */
        await queryRunner.query(`ALTER TABLE "GlobalConfig" ADD "smtpAuthType" character varying(100) DEFAULT 'Username and Password'`);
        await queryRunner.query(`ALTER TABLE "GlobalConfig" ADD "smtpClientId" character varying(100)`);
        await queryRunner.query(`ALTER TABLE "GlobalConfig" ADD "smtpClientSecret" text`);
        await queryRunner.query(`ALTER TABLE "GlobalConfig" ADD "smtpTokenUrl" text`);
        await queryRunner.query(`ALTER TABLE "GlobalConfig" ADD "smtpScope" character varying(500)`);
        await queryRunner.query(`ALTER TABLE "GlobalConfig" ADD "smtpOAuthProviderType" character varying(100)`);
    }
    async down(queryRunner) {
        await queryRunner.query(`ALTER TABLE "GlobalConfig" DROP COLUMN "smtpOAuthProviderType"`);
        await queryRunner.query(`ALTER TABLE "GlobalConfig" DROP COLUMN "smtpScope"`);
        await queryRunner.query(`ALTER TABLE "GlobalConfig" DROP COLUMN "smtpTokenUrl"`);
        await queryRunner.query(`ALTER TABLE "GlobalConfig" DROP COLUMN "smtpClientSecret"`);
        await queryRunner.query(`ALTER TABLE "GlobalConfig" DROP COLUMN "smtpClientId"`);
        await queryRunner.query(`ALTER TABLE "GlobalConfig" DROP COLUMN "smtpAuthType"`);
    }
}
//# sourceMappingURL=1775900000000-AddGlobalSmtpOAuth.js.map