From 6f6fdfe28e3638e09ee1452fd2a8bb4271e1d0ce Mon Sep 17 00:00:00 2001 From: anatawa12 Date: Wed, 16 Jul 2025 15:49:05 +0900 Subject: Migration cleanup (#16288) * chore: apply several @Index and @ManyToOne to match actual migration code * chore: several decorator updates with typeorm bug workaround with patches * feat: add final cleanup migration * dev: add .editorconfig settings for generated migrations * chore: update dockerfile to build package with patches * chore: update federation test compose to include patches * chore: revert few dependency update * chore: don't check disableRegistration on test env * test: add test for checking migration script * chore: set proxyRemoteFiles true in test config * chore: enter invitation code in signup test * fix: register send button is not disabled when invitationCode is not input --- patches/typeorm.patch | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 patches/typeorm.patch (limited to 'patches') diff --git a/patches/typeorm.patch b/patches/typeorm.patch new file mode 100644 index 0000000000..d5b4323781 --- /dev/null +++ b/patches/typeorm.patch @@ -0,0 +1,17 @@ +diff --git a/driver/postgres/PostgresDriver.js b/driver/postgres/PostgresDriver.js +index 278f29c1f3deec4939bb4ed90e6edae167f704e0..9a84c3098dda915d6c33e24d925a8fa09af9095e 100644 +--- a/driver/postgres/PostgresDriver.js ++++ b/driver/postgres/PostgresDriver.js +@@ -785,10 +785,10 @@ class PostgresDriver { + const tableColumnDefault = typeof tableColumn.default === "string" + ? JSON.parse(tableColumn.default.substring(1, tableColumn.default.length - 1)) + : tableColumn.default; +- return OrmUtils_1.OrmUtils.deepCompare(columnMetadata.default, tableColumnDefault); ++ return OrmUtils_1.OrmUtils.deepCompare(columnMetadata.default, tableColumnDefault ?? null); + } + const columnDefault = this.lowerDefaultValueIfNecessary(this.normalizeDefault(columnMetadata)); +- return columnDefault === tableColumn.default; ++ return columnDefault === tableColumn.default || columnDefault === undefined && tableColumn.default.toLowerCase() === 'null'; + } + /** + * Normalizes "isUnique" value of the column. -- cgit v1.2.3-freya