From 045563bb01a3fb9de9371854cbc16b77860c221b Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Mon, 3 Jun 2019 22:56:45 +0300 Subject: Add support for topics and keywords package manifest values --- migrate/migrate.cxx | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'migrate/migrate.cxx') 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 -- cgit v1.1