Fix notes.js database model