forkey/packages/backend/migration/1730505338000-friendlyCaptcha.js
Leah ce517da1aa
Some checks failed
Dockle / dockle (pull_request) Failing after 38s
Test (backend) / unit (22.x) (pull_request) Failing after 7s
Test (backend) / e2e (22.x) (pull_request) Failing after 7s
Test (frontend) / vitest (22.x) (pull_request) Failing after 5s
Lint / pnpm_install (pull_request) Successful in 1m52s
Test (backend) / validate-api-json (22.x) (pull_request) Successful in 2m59s
Test (production install and build) / production (22.x) (pull_request) Successful in 3m54s
Pull Request Labeler / triage (pull_request_target) Failing after 2s
Lint / lint (backend) (pull_request) Failing after 1m52s
Lint / lint (misskey-js) (pull_request) Successful in 2m26s
Lint / lint (sw) (pull_request) Successful in 2m18s
Lint / typecheck (backend) (pull_request) Failing after 1m40s
Lint / lint (frontend) (pull_request) Failing after 10m16s
Lint / typecheck (misskey-js) (pull_request) Successful in 2m46s
Add friendly capcha
2025-01-14 22:55:17 +01:00

20 lines
821 B
JavaScript

/*
* SPDX-FileCopyrightText: marie and other Sharkey contributors
* SPDX-License-Identifier: AGPL-3.0-only
*/
export class friendlyCaptcha1730505338000 {
name = 'friendlyCaptcha1730505338000';
async up(queryRunner) {
await queryRunner.query(`ALTER TABLE "meta" ADD "enableFC" boolean NOT NULL DEFAULT false`, undefined);
await queryRunner.query(`ALTER TABLE "meta" ADD "fcSiteKey" character varying(1024)`, undefined);
await queryRunner.query(`ALTER TABLE "meta" ADD "fcSecretKey" character varying(1024)`, undefined);
}
async down(queryRunner) {
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "fcSecretKey"`, undefined);
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "fcSiteKey"`, undefined);
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "enableFC"`, undefined);
}
}