]> git.ipfire.org Git - pakfire.git/commitdiff
libpakfire: db: Drop old build_id column
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 22 Jan 2021 17:24:01 +0000 (17:24 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 22 Jan 2021 17:24:01 +0000 (17:24 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/db.c

index ae88faabe087ad54c0e6c3a73625104938373e83..9f5ceb248c719bf405958c00af8f3afb504d218f 100644 (file)
@@ -34,7 +34,7 @@
 
 #define DATABASE_PATH PAKFIRE_PRIVATE_DIR "/packages.db"
 
-#define CURRENT_SCHEMA 7
+#define CURRENT_SCHEMA 8
 #define SCHEMA_MIN_SUP 7
 
 struct pakfire_db {
@@ -245,7 +245,6 @@ static int pakfire_db_create_schema(struct pakfire_db* db) {
                        "description    TEXT, "
                        "uuid           TEXT, "
                        "vendor         TEXT, "
-                       "build_id       TEXT, "
                        "build_host     TEXT, "
                        "build_date     TEXT, "
                        "build_time     INTEGER, "
@@ -324,6 +323,8 @@ static int pakfire_db_create_schema(struct pakfire_db* db) {
 }
 
 static int pakfire_db_migrate_to_schema_8(struct pakfire_db* db) {
+       // packages: Drop build_id column
+
        // Add foreign keys
        // TODO sqlite doesn't support adding foreign keys to existing tables and so we would
        // need to recreate the whole table and rename it afterwards. Annoying.
@@ -663,19 +664,6 @@ PAKFIRE_EXPORT int pakfire_db_add_package(struct pakfire_db* db, PakfirePackage
                goto ROLLBACK;
        }
 
-       // Bind build_id
-#if 0
-       const char* build_id = pakfire_package_get_buildid(pkg);
-#else
-       const char* build_id = NULL; // To be done
-#endif
-
-       r = sqlite3_bind_text(stmt, 15, build_id, -1, NULL);
-       if (r) {
-               ERROR(db->pakfire, "Could not bind build_id: %s\n", sqlite3_errmsg(db->handle));
-               goto ROLLBACK;
-       }
-
        // Bind build_host
        const char* buildhost = pakfire_package_get_buildhost(pkg);