make meta.defaultLike non-nullable

This commit is contained in:
Hazelnoot 2025-05-22 16:08:26 -04:00
parent 418aea1eef
commit c510cfa312
3 changed files with 18 additions and 18 deletions

View file

@ -1,16 +0,0 @@
/*
* SPDX-FileCopyrightText: hazelnoot and other Sharkey contributors
* SPDX-License-Identifier: AGPL-3.0-only
*/
export class FixMetaDefaultLikeDefault1747936443097 {
name = 'FixMetaDefaultLikeDefault1747936443097'
async up(queryRunner) {
await queryRunner.query(`ALTER TABLE "meta" ALTER COLUMN "defaultLike" DROP DEFAULT`);
}
async down(queryRunner) {
await queryRunner.query(`ALTER TABLE "meta" ALTER COLUMN "defaultLike" SET DEFAULT '❤️'`);
}
}

View file

@ -0,0 +1,16 @@
/*
* SPDX-FileCopyrightText: hazelnoot and other Sharkey contributors
* SPDX-License-Identifier: AGPL-3.0-only
*/
export class AlterMetaDefaultLikeNotNull1747944466178 {
name = 'AlterMetaDefaultLikeNotNull1747944466178'
async up(queryRunner) {
await queryRunner.query(`ALTER TABLE "meta" ALTER COLUMN "defaultLike" SET NOT NULL`);
}
async down(queryRunner) {
await queryRunner.query(`ALTER TABLE "meta" ALTER COLUMN "defaultLike" DROP NOT NULL`);
}
}

View file

@ -695,9 +695,9 @@ export class MiMeta {
@Column('varchar', {
length: 500,
nullable: true,
default: '❤️',
})
public defaultLike: string | null;
public defaultLike: string;
@Column('varchar', {
length: 256, array: true, default: '{}',