0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-16 20:26:19 -05:00

chore: add compare db logs

This commit is contained in:
Xiao Yijun 2024-03-07 11:50:25 +08:00
parent fa6390d770
commit 79e53a9844
No known key found for this signature in database
GPG key ID: 6F648FC1262DB420

View file

@ -200,7 +200,13 @@ const queryDatabaseData = async (database) => {
'db_user_password'
);
return [table_name, data.sort(buildSortByKeys(Object.keys(data[0] ?? {})))];
const keyOrder = Object.keys(data[0] ?? {}).sort();
const sortedData = data.sort(buildSortByKeys(keyOrder));
if (table_name === 'applications') {
console.log(sortedData);
}
return [table_name, sortedData];
})
);