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
This commit is contained in:
anatawa12
2025-07-16 15:49:05 +09:00
committed by GitHub
parent ad7bf096e1
commit 6f6fdfe28e
21 changed files with 228 additions and 19 deletions

17
patches/typeorm.patch Normal file
View File

@@ -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.