diff --git a/packages/backend/migration/1708342829000-SharkeyRepositoryUrl.js b/packages/backend/migration/1708342829000-SharkeyRepositoryUrl.js new file mode 100644 index 0000000000000000000000000000000000000000..0853ed4edd88df5d6f608077aefe11702f69d574 --- /dev/null +++ b/packages/backend/migration/1708342829000-SharkeyRepositoryUrl.js @@ -0,0 +1,22 @@ +/* + * SPDX-FileCopyrightText: dakkar and other Sharkey contributors + * SPDX-License-Identifier: AGPL-3.0-only + */ + +export class SharkeyRepositoryUrl1708342829000 { + name = 'SharkeyRepositoryUrl1708342829000' + + async up(queryRunner) { + await queryRunner.query(`ALTER TABLE "meta" ALTER COLUMN "repositoryUrl" SET DEFAULT 'https://activitypub.software/TransFem-org/Sharkey/'`); + await queryRunner.query(`ALTER TABLE "meta" ALTER COLUMN "feedbackUrl" SET DEFAULT 'https://activitypub.software/TransFem-org/Sharkey/-/issues/new'`); + await queryRunner.query(`UPDATE "meta" SET "repositoryUrl"=DEFAULT WHERE "repositoryUrl" IN ('https://git.joinsharkey.org/Sharkey/Sharkey','https://github.com/transfem-org/sharkey','https://github.com/misskey-dev/misskey')`); + await queryRunner.query(`UPDATE "meta" SET "feedbackUrl"=DEFAULT WHERE "feedbackUrl" IN ('https://git.joinsharkey.org/Sharkey/Sharkey/issues/new/choose','https://github.com/transfem-org/sharkey/issues/new','https://github.com/misskey-dev/misskey/issues/new')`); + } + + async down(queryRunner) { + await queryRunner.query(`ALTER TABLE "meta" ALTER COLUMN "repositoryUrl" SET DEFAULT 'https://git.joinsharkey.org/Sharkey/Sharkey'`); + await queryRunner.query(`ALTER TABLE "meta" ALTER COLUMN "feedbackUrl" SET DEFAULT 'https://git.joinsharkey.org/Sharkey/Sharkey/issues/new/choose'`); + await queryRunner.query(`UPDATE "meta" SET "repositoryUrl"=DEFAULT WHERE "repositoryUrl" IN ('https://git.joinsharkey.org/Sharkey/Sharkey','https://github.com/transfem-org/sharkey','https://github.com/misskey-dev/misskey')`); + await queryRunner.query(`UPDATE "meta" SET "feedbackUrl"=DEFAULT WHERE "feedbackUrl" IN ('https://git.joinsharkey.org/Sharkey/Sharkey/issues/new/choose','https://github.com/transfem-org/sharkey/issues/new','https://github.com/misskey-dev/misskey/issues/new')`); + } +} diff --git a/packages/backend/src/models/Meta.ts b/packages/backend/src/models/Meta.ts index 043da17716ccca7263ecbab0a95049df24d85144..dd2e78cde28045f5e41d902fa1740e0031d5d686 100644 --- a/packages/backend/src/models/Meta.ts +++ b/packages/backend/src/models/Meta.ts @@ -379,14 +379,14 @@ export class MiMeta { @Column('varchar', { length: 1024, - default: 'https://github.com/misskey-dev/misskey', - nullable: true, + default: 'https://activitypub.software/TransFem-org/Sharkey/', + nullable: false, }) public repositoryUrl: string | null; @Column('varchar', { length: 1024, - default: 'https://github.com/misskey-dev/misskey/issues/new', + default: 'https://activitypub.software/TransFem-org/Sharkey/-/issues/new', nullable: true, }) public feedbackUrl: string | null;