mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-03-21 03:30:42 +00:00
Revert typeorm patches (#16664)
* chore: remove patches * chore: remove unnecessary 'DEFAULT NULL's * chore: add patches with .gitkeep
This commit is contained in:
0
patches/.gitkeep
Normal file
0
patches/.gitkeep
Normal file
@@ -1,17 +0,0 @@
|
||||
diff --git a/driver/postgres/PostgresDriver.js b/driver/postgres/PostgresDriver.js
|
||||
index e13b903c73b71113bb529552e59fb4ce0ca8af0c..50de6a60120ece7ebf49009eac588a5313343f39 100644
|
||||
--- a/driver/postgres/PostgresDriver.js
|
||||
+++ b/driver/postgres/PostgresDriver.js
|
||||
@@ -819,10 +819,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