     }
     
     private func updateColumnTable(table: String, columns: [ReceiptColumn], _ database: Database) -> Bool {
-        var result = database.executeUpdate("ALTER TABLE \(table) ADD COLUMN \(COLUMN_TYPE) INTEGER DEFAULT 0")
+        var result = true
+        database.executeUpdate("ALTER TABLE \(table) ADD COLUMN \(COLUMN_TYPE) INTEGER DEFAULT 0")
         
         for column in columns {
             guard let columnName = column.name else { continue }

        let pdfColumns = fetchColumns(table: PDFColumnTable.Name, database: database)
        let csvColumns = fetchColumns(table: CSVColumnTable.Name, database: database)
        
        let result = updateColumnTable(table: PDFColumnTable.Name, columns: pdfColumns, database) &&
               updateColumnTable(table: CSVColumnTable.Name, columns: csvColumns, database)
        
        AnalyticsManager.sharedManager.record(event: .finishDatabaseUpgrade(version(), success: result))
        

            PDFColumnTable.Column.Id
        ].joined(separator: ", ")
        
        result = result && database.executeUpdate("INSERT INTO \(table)(\(insertColumns)) SELECT \(insertColumns) FROM \(table)_tmp")
        result = result && database.executeUpdate("DROP TABLE \(table)_tmp")
        
        return result
    }
