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

ci: update databse comparison script

This commit is contained in:
Gao Sun 2023-02-11 22:55:37 +08:00
parent 1e75a417a3
commit ac199604bf
No known key found for this signature in database
GPG key ID: 13EBE123E4773688

View file

@ -122,7 +122,23 @@ const queryDatabaseData = async (database) => {
.map(async ({ table_name }) => {
const { rows } = await pool.query(/* sql */`select * from ${table_name};`);
return [table_name, omitArray(rows, 'created_at', 'updated_at', 'secret', 'db_user', 'db_user_password')];
// check config rows except the value column
if (['logto_configs', '_logto_configs', 'systems'].includes(table_name)) {
return [table_name, omitArray(rows, 'value')];
}
return [table_name, omitArray(
rows,
'id',
'resource_id',
'role_id',
'scope_id',
'created_at',
'updated_at',
'secret',
'db_user',
'db_user_password'
)];
})
);