diff --git a/db/migrations/0169__convert_h1_to_h2.js b/db/migrations/0169__convert_h1_to_h2.js new file mode 100644 index 000000000..14696580e --- /dev/null +++ b/db/migrations/0169__convert_h1_to_h2.js @@ -0,0 +1,18 @@ +const repository = require('../../src/services/repository'); + +module.exports = () => { + for (const note of repository.getEntities("SELECT * FROM notes WHERE type = 'text' AND isProtected = 0")) { + try { + let content = note.getContent(); + + content = content + .replace(/