mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-03-21 03:30:42 +00:00
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:
17
patches/typeorm.patch
Normal file
17
patches/typeorm.patch
Normal 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.
|
||||
Reference in New Issue
Block a user