1
0
mirror of https://git.boykissers.com/pawkey/pawkey-sk.git synced 2025-12-20 04:04:16 +00:00
Files
pawkey-sk/packages/backend/migration/1743894419864-AddRegWordFieldsToMeta.js
Leafus df322ebadc feat: require a special registration word in registration reason (#2)
A crude way to prune out people who don't read the rules. The hint is in
the bottom of the rules generally.
2025-08-25 00:11:08 +09:30

21 lines
819 B
JavaScript

/*
* SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { MigrationInterface, QueryRunner } from "typeorm";
export class AddRegWordFieldsToMeta1743894419864 implements MigrationInterface {
name = 'AddRegWordFieldsToMeta1743894419864'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE "meta" ADD "regWordRequired" boolean NOT NULL DEFAULT false`);
await queryRunner.query(`ALTER TABLE "meta" ADD "registrationWord" character varying(1024)`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "registrationWord"`);
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "regWordRequired"`);
}
}