aboutsummaryrefslogtreecommitdiff
path: root/migrate/migrate.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2019-06-03 22:56:45 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2019-06-04 15:24:51 +0300
commit045563bb01a3fb9de9371854cbc16b77860c221b (patch)
tree928225401c145f00d9eb8e5467d92339d63d7d98 /migrate/migrate.cxx
parent05d77beb95f52351c16b2f0af74a0099dd5dba27 (diff)
Add support for topics and keywords package manifest values
Diffstat (limited to 'migrate/migrate.cxx')
-rw-r--r--migrate/migrate.cxx33
1 files changed, 33 insertions, 0 deletions
diff --git a/migrate/migrate.cxx b/migrate/migrate.cxx
index 6bb0d48..6cae116 100644
--- a/migrate/migrate.cxx
+++ b/migrate/migrate.cxx
@@ -227,6 +227,39 @@ package_migrate_v12 ([] (database& db)
"WHERE description IS NOT NULL");
});
+static const package_migration_entry<14>
+package_migrate_v14 ([] (database& db)
+{
+ // Save the package tags as the package keywords.
+ //
+ db.execute ("INSERT INTO package_keywords ("
+ "tenant, "
+ "name, "
+ "version_epoch, "
+ "version_canonical_upstream, "
+ "version_canonical_release, "
+ "version_revision, "
+ "index, "
+ "keyword) "
+ "SELECT "
+ "tenant, "
+ "name, "
+ "version_epoch, "
+ "version_canonical_upstream, "
+ "version_canonical_release, "
+ "version_revision, "
+ "index, "
+ "tag "
+ "FROM package_tags");
+
+ // Note that the package keywords are the second-strongest search keywords
+ // and the package tags where the first-strongest search keywords. So,
+ // strictly speaking, we should update the package table search_index column
+ // to reflect the new ordering rules for the package search. But it feels
+ // like it isn't really worth the trouble.
+ //
+});
+
// main() function
//
int