module.exports = {
  name: 'Entry',
  schema: {
    id: {type: 'increments', primary: true},
    folderId: {type: Number},
    sourceEntry: {type: String, nullable: false},
    pageNum: {type: Number},
    data: {type: 'json', defaultTo: '{}'}
  },
  options: {
    unique: ['id', 'folderId', 'sourceEntry']
  }
};

module.exports = {
  name: 'Entry',
  schema: {
    id: {type: 'increments', primary: true},
    folderId: {type: Number},
    sourceEntry: {type: String, nullable: false},
    pageNum: {type: Number},
    data: {type: 'json', defaultTo: '{}'}
  },
  options: (table) => {
    table.unique(['folderId', 'id']);
  }
};

define index correctly