From 8afd28a922c8d3a0113abad2b8071465c2d77fe9 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 1 Mar 2012 16:04:12 +0100 Subject: [PATCH] Remove dependency on sqlite3_table_column_metadata Not all SQLite builds have the function sqlite3_table_column_metadata. We were only using it in a schema upgrade check for compatibility with databases that were probably never seen in the wild. So remove it. --- src/libstore/local-store.cc | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc index 21b1bdcea..db84cd23c 100644 --- a/src/libstore/local-store.cc +++ b/src/libstore/local-store.cc @@ -356,13 +356,6 @@ void LocalStore::openDB(bool create) throwSQLiteError(db, "initialising database schema"); } - /* Backwards compatibility with old (pre-release) databases. Can - remove this eventually. */ - if (sqlite3_table_column_metadata(db, 0, "ValidPaths", "narSize", 0, 0, 0, 0, 0) != SQLITE_OK) { - if (sqlite3_exec(db, "alter table ValidPaths add column narSize integer" , 0, 0, 0) != SQLITE_OK) - throwSQLiteError(db, "adding column narSize"); - } - /* Prepare SQL statements. */ stmtRegisterValidPath.create(db, "insert into ValidPaths (path, hash, registrationTime, deriver, narSize) values (?, ?, ?, ?, ?);");