mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 10:31:15 +00:00
feat(core): Add createdAt and updatedAt to data store user tables (no-changelog) (#18723)
This commit is contained in:
@@ -193,7 +193,13 @@ export function extractInsertedIds(raw: unknown, dbType: DataSourceOptions['type
|
||||
}
|
||||
|
||||
export function normalizeRows(rows: DataStoreRows, columns: DataStoreColumn[]) {
|
||||
const typeMap = new Map(columns.map((col) => [col.name, col.type]));
|
||||
// we need to normalize system dates as well
|
||||
const systemColumns = [
|
||||
{ name: 'createdAt', type: 'date' },
|
||||
{ name: 'updatedAt', type: 'date' },
|
||||
];
|
||||
|
||||
const typeMap = new Map([...columns, ...systemColumns].map((col) => [col.name, col.type]));
|
||||
return rows.map((row) => {
|
||||
const normalized = { ...row };
|
||||
for (const [key, value] of Object.entries(row)) {
|
||||
|
||||
Reference in New Issue
Block a user