diff options
| author | Hazelnoot <acomputerdog@gmail.com> | 2025-05-22 16:08:26 -0400 |
|---|---|---|
| committer | Hazelnoot <acomputerdog@gmail.com> | 2025-05-22 16:08:26 -0400 |
| commit | c510cfa31288007ea862b66913463c7b121d5af0 (patch) | |
| tree | 34993cb480893569dae97cae67efe145da4d574c /packages/backend/migration | |
| parent | synchronize database entities and code models (diff) | |
| download | sharkey-c510cfa31288007ea862b66913463c7b121d5af0.tar.gz sharkey-c510cfa31288007ea862b66913463c7b121d5af0.tar.bz2 sharkey-c510cfa31288007ea862b66913463c7b121d5af0.zip | |
make meta.defaultLike non-nullable
Diffstat (limited to 'packages/backend/migration')
| -rw-r--r-- | packages/backend/migration/1747936443097-fix-meta-defaultLike-default.js | 16 | ||||
| -rw-r--r-- | packages/backend/migration/1747944466178-alter-meta-defaultLike-not-null.js | 16 |
2 files changed, 16 insertions, 16 deletions
diff --git a/packages/backend/migration/1747936443097-fix-meta-defaultLike-default.js b/packages/backend/migration/1747936443097-fix-meta-defaultLike-default.js deleted file mode 100644 index 4a87d1ff74..0000000000 --- a/packages/backend/migration/1747936443097-fix-meta-defaultLike-default.js +++ /dev/null @@ -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 '❤️'`); - } -} diff --git a/packages/backend/migration/1747944466178-alter-meta-defaultLike-not-null.js b/packages/backend/migration/1747944466178-alter-meta-defaultLike-not-null.js new file mode 100644 index 0000000000..b206a15ee2 --- /dev/null +++ b/packages/backend/migration/1747944466178-alter-meta-defaultLike-not-null.js @@ -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`); + } +} |