Skip to content

Commit

Permalink
NOT NULL制約消す
Browse files Browse the repository at this point in the history
  • Loading branch information
Esurio committed Sep 9, 2024
1 parent d72e960 commit 4d0cf98
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions packages/backend/migration/1725891731600-SearchbleByNull.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
const { MigrationInterface, QueryRunner } = require("typeorm");

module.exports = class SearchbleByNull1725891731600 {
name = 'SearchbleByNull1725891731600'

async up(queryRunner) {
await queryRunner.query(`ALTER TABLE "note" ALTER COLUMN "searchableBy" DROP NOT NULL`);
}

async down(queryRunner) {
await queryRunner.query(`ALTER TABLE "note" ALTER COLUMN "searchableBy" SET NOT NULL`);
}
}

0 comments on commit 4d0cf98

Please sign in to comment.