             let create1 = "CREATE TABLE IF NOT EXISTS TableContents("
                 + " code TEXT PRIMARY KEY NOT NULL,"
                 + " name TEXT NOT NULL,"
-                + " lastChapter INT NOT NULL,"
-                + " chapterRowId INT NOT NULL)"
+                + " lastChapter INT NOT NULL)"
             _ = try db?.executeV1(sql: create1, values: [])
             let create2 = "CREATE TABLE IF NOT EXISTS Chapters("
                 + " reference TEXT NOT NULL PRIMARY KEY,"

    
    func getTableContents(bibleId: String) -> [Book] {
        let db: Sqlite3
        do {
            db = try self.getBibleDB(bibleId: bibleId)
            let sql = "SELECT code, chapterRowId, name, lastChapter FROM TableContents ORDER BY chapterRowId"
            let resultSet = try db.queryV1(sql: sql, values: [])
            let toc = resultSet.map {
                Book(bookId: $0[0]!, ordinal: Int($0[1]!) ?? 0, name: $0[2]!, lastChapter: Int($0[3]!) ?? 0)
            }
            return toc
        } catch let err {

            let db: Sqlite3
            var values = [[Any]]()
            for book in books {
                values.append([book.bookId, (book.ordinal + 1), book.name, book.lastChapter])
            }
            do {
                db = try self.getBibleDB(bibleId: bibleId)
                let sql = "REPLACE INTO TableContents (code, rowid, name, lastChapter)"
                    + " VALUES (?,?,?,?)"
                _ = try db.bulkExecuteV1(sql: sql, values: values)
            } catch let err {
