fresh start
This commit is contained in:
parent
62c3e2d368
commit
7f86647175
570 changed files with 4895 additions and 866 deletions
10
migrations/v2_2/transform.js
Executable file
10
migrations/v2_2/transform.js
Executable file
|
|
@ -0,0 +1,10 @@
|
|||
// Migration from v2.2 to v2.3: Add migration_hash if missing
|
||||
import crypto from 'crypto';
|
||||
|
||||
export default function transform(meta, content) {
|
||||
if (!meta.migration_hash) {
|
||||
const hash = crypto.createHash('sha256').update(JSON.stringify(meta) + content).digest('hex');
|
||||
meta.migration_hash = hash;
|
||||
}
|
||||
return meta;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue