anchor.diff:  
       return await openDatabase(
         path,
  -      version: 4,
  +      version: 5,
         onOpen: (db) async {},
         onCreate: (Database db, int version) async {
           var batch = db.batch();
  -        _createTableServerV4(batch);
  +        _createTableServerV5(batch);
           await batch.commit();
         },
         onUpgrade: (Database db, int oldVersion, int newVersion) async {
           var batch = db.batch();
           if (oldVersion == 1) {
  -          _updateTableServerV1toV4(batch);
  +          _updateTableServerV1toV5(batch);
  +          await _addInitialIndexValue(db, batch);
           }
           if (oldVersion == 2) {
  -          _updateTableServerV2toV4(batch);
  +          _updateTableServerV2toV5(batch);
  +          await _addInitialIndexValue(db, batch);
           }
           if (oldVersion == 3) {
  -          _updateTableServerV3toV4(batch);
  +          _updateTableServerV3toV5(batch);
  +          await _addInitialIndexValue(db, batch);
  +        }
  +        if (oldVersion == 4) {
  +          _updateTableServerV4toV5(batch);
  +          await _addInitialIndexValue(db, batch);
           }
           await batch.commit();
         },
       );
     }
   
  -  void _createTableServerV4(Batch batch) {
  +  void _createTableServerV5(Batch batch) {
       batch.execute('''CREATE TABLE servers(
                       id INTEGER PRIMARY KEY,
  +                    sort_index INTEGER,
                       plex_name TEXT,
                       plex_identifier TEXT,
                       tautulli_id TEXT,
  
positive.code:                 )''');
    }
  
    void _updateTableServerV1toV4(Batch batch) {
      batch.execute('ALTER TABLE servers ADD plex_pass INTEGER');
      batch.execute('ALTER TABLE servers ADD date_format TEXT');
      batch.execute('ALTER TABLE servers ADD time_format TEXT');
      batch.execute('ALTER TABLE servers ADD plex_identifier TEXT');
    }
  
    void _updateTableServerV2toV4(Batch batch) {
      batch.execute('ALTER TABLE servers ADD date_format TEXT');
      batch.execute('ALTER TABLE servers ADD time_format TEXT');
      batch.execute('ALTER TABLE servers ADD plex_identifier TEXT');
    }
  
    void _updateTableServerV3toV4(Batch batch) {
      batch.execute('ALTER TABLE servers ADD plex_identifier TEXT');
    }
  
    addServer(ServerModel server) async {
  
negative.code:     final db = await database;
      var result = await db.update('servers', server.toJson(),
          where: 'id = ?', whereArgs: [server.id]);
  
      return result;
    }
  
    updateServerSort(int serverId, int oldIndex, int newIndex) async {
      final db = await database;
      var batch = db.batch();
      // Change moved item sort index to -1 to avoid 'where' conflicts
      batch.update(
        'servers',
        {'sort_index': -1},
        where: 'id = ?',
        whereArgs: [serverId],
      );
      // If item moved higher in list
      if (oldIndex < newIndex) {
        for (var i = oldIndex; i < newIndex; i++) {
          batch.update(
            'servers',
            {'sort_index': i},
            where: 'sort_index = ?',
            whereArgs: [oldIndex + 1],
          );
        }
      }
      // If item moved lower in list
      if (newIndex < oldIndex) {
        for (var i = newIndex; i < oldIndex; i++) {
          batch.update(
            'servers',
            {'sort_index': i + 1},
            where: 'sort_index = ?',
            whereArgs: [newIndex],
          );
        }
      }
      // Change sort index of moved item to new index
      batch.update(
        'servers',
        {'sort_index': newIndex},
        where: 'id = ?',
        whereArgs: [serverId],
      );
  
      var result = batch.commit();
  
      return result;
    }
  