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.
This commit is contained in:
parent
1c94524458
commit
8afd28a922
1 changed files with 0 additions and 7 deletions
|
@ -356,13 +356,6 @@ void LocalStore::openDB(bool create)
|
||||||
throwSQLiteError(db, "initialising database schema");
|
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. */
|
/* Prepare SQL statements. */
|
||||||
stmtRegisterValidPath.create(db,
|
stmtRegisterValidPath.create(db,
|
||||||
"insert into ValidPaths (path, hash, registrationTime, deriver, narSize) values (?, ?, ?, ?, ?);");
|
"insert into ValidPaths (path, hash, registrationTime, deriver, narSize) values (?, ?, ?, ?, ?);");
|
||||||
|
|
Loading…
Reference in a new issue