       properties: {
         itemID: { type: 'integer' }
         libraryID: { type: 'integer' }
-        citekey: { type: 'string' }
+        citekey: { type: 'string', minLength: 1 }
         pinned: { type: 'boolean', default: false }
 
         # LokiJS

  debug('after DB schemaCollection:', { keys: DB.getCollection('citekey') })

  DB.schemaCollection('autoexport', {
    indices: [ 'type', 'id', 'status', 'path', 'exportNotes', 'translatorID', 'useJournalAbbreviation'],
    unique: [ 'path' ],
    logging: true,
    schema: {
      type: 'object'
      properties: {
        type: { enum: ['search', 'collection', 'library' ] }
        id: { type: 'integer' }
        path: { type: 'string' }
        status: { enum: [ 'scheduled', 'running', 'done', 'error' ] }
        translatorID: { type: 'string' }
        exportNotes: { type: 'boolean', default: false }
        useJournalAbbreviation: { type: 'boolean', default: false }


        meta: { type: 'object' }
        $loki: { type: 'integer' }
      }
      required: [ 'path', 'status', 'translatorID', 'exportNotes', 'useJournalAbbreviation' ],

      oneOf: [
        { required: ['library'], properties: { library: { type: 'integer' } } },
        { required: ['collection'], properties: { collection: { type: 'integer' } } },
        { required: ['collection'], properties: { collection: { type: 'string', minLength: 1 } } },
      ],

      additionalProperties: false
    }
  })
