mirror of
https://codeberg.org/yeentown/barkey.git
synced 2025-07-09 13:34:33 +00:00
create IDX_note_url over note.url
This commit is contained in:
parent
20a2505543
commit
5f51f7878e
2 changed files with 17 additions and 0 deletions
|
@ -0,0 +1,16 @@
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: hazelnoot and other Sharkey contributors
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
export class CreateIDXNoteUrl1749229288946 {
|
||||||
|
name = 'CreateIDXNoteUrl1749229288946'
|
||||||
|
|
||||||
|
async up(queryRunner) {
|
||||||
|
await queryRunner.query(`CREATE INDEX IF NOT EXISTS "IDX_note_url" ON "note" ("url") `);
|
||||||
|
}
|
||||||
|
|
||||||
|
async down(queryRunner) {
|
||||||
|
await queryRunner.query(`DROP INDEX "public"."IDX_note_url"`);
|
||||||
|
}
|
||||||
|
}
|
|
@ -133,6 +133,7 @@ export class MiNote {
|
||||||
})
|
})
|
||||||
public uri: string | null;
|
public uri: string | null;
|
||||||
|
|
||||||
|
@Index('IDX_note_url')
|
||||||
@Column('varchar', {
|
@Column('varchar', {
|
||||||
length: 512, nullable: true,
|
length: 512, nullable: true,
|
||||||
comment: 'The human readable url of a note. it will be null when the note is local.',
|
comment: 'The human readable url of a note. it will be null when the note is local.',
|
||||||
|
|
Loading…
Add table
Reference in a new issue