mirror of
https://codeberg.org/yeentown/barkey.git
synced 2025-07-06 03:56:56 +00:00
22 lines
769 B
JavaScript
22 lines
769 B
JavaScript
/*
|
|
* SPDX-FileCopyrightText: hazelnoot and other Sharkey contributors
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
*/
|
|
|
|
export class ReplaceNoteUserHostIndex1748990452958 {
|
|
name = 'ReplaceNoteUserHostIndex1748990452958'
|
|
|
|
async up(queryRunner) {
|
|
await queryRunner.query(`DROP INDEX "public"."IDX_7125a826ab192eb27e11d358a5"`);
|
|
await queryRunner.query(`
|
|
create index "IDX_note_userHost_id"
|
|
on "note" ("userHost", "id" desc)
|
|
nulls not distinct`);
|
|
await queryRunner.query(`comment on index "IDX_note_userHost_id" is 'User host with ID included'`);
|
|
}
|
|
|
|
async down(queryRunner) {
|
|
await queryRunner.query(`drop index if exists "IDX_note_userHost_id"`);
|
|
await queryRunner.query(`CREATE INDEX "IDX_7125a826ab192eb27e11d358a5" ON "note" ("userHost") `);
|
|
}
|
|
}
|