diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2016-05-27 19:23:09 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2016-05-27 19:23:09 +0100 |
commit | c8897b44a76b9a8cbadb1ec67973b484659a716a (patch) | |
tree | ae27e24b84d4b613ee0cdf29fef4f46780a4827a | |
parent | Empty the right table on masks removal (diff) | |
download | gentoobrowse-api-c8897b44a76b9a8cbadb1ec67973b484659a716a.tar.bz2 gentoobrowse-api-c8897b44a76b9a8cbadb1ec67973b484659a716a.tar.xz gentoobrowse-api-c8897b44a76b9a8cbadb1ec67973b484659a716a.zip |
Apply ebuild masks after import
-rw-r--r-- | gentoobrowse-api/service/maintenance/masksProcessor.cpp | 9 | ||||
-rw-r--r-- | gentoobrowse-api/service/maintenance/masksProcessor.h | 2 |
2 files changed, 8 insertions, 3 deletions
diff --git a/gentoobrowse-api/service/maintenance/masksProcessor.cpp b/gentoobrowse-api/service/maintenance/masksProcessor.cpp index 0bed3be..58975f1 100644 --- a/gentoobrowse-api/service/maintenance/masksProcessor.cpp +++ b/gentoobrowse-api/service/maintenance/masksProcessor.cpp @@ -88,16 +88,19 @@ namespace Gentoo { p.cols = { "dateAdded", "n", "person", "email", "message", "atomSpec" }; dbc->patchTable(&p); + Utils::Database::drop(dbc, tempTable.first); + } + + void + MasksProcessor::apply(DB::Connection * dbc) + { DB::TablePatch e; e.dest = "gentoobrowse.ebuild_masks"; DB::StaticSqlWriter srcExprE(sql::maintenance::masksEbuilds.getSql()); e.srcExpr = &srcExprE; - e.pk = { "ebuildId", "setNo" }; e.cols = e.pk; dbc->patchTable(&e); - - Utils::Database::drop(dbc, tempTable.first); } void diff --git a/gentoobrowse-api/service/maintenance/masksProcessor.h b/gentoobrowse-api/service/maintenance/masksProcessor.h index 2fc2b39..a8c94a5 100644 --- a/gentoobrowse-api/service/maintenance/masksProcessor.h +++ b/gentoobrowse-api/service/maintenance/masksProcessor.h @@ -15,6 +15,8 @@ namespace Gentoo { void created(DB::Connection * dbc, const boost::filesystem::path & fn, const boost::filesystem::path & path) override; void modified(DB::Connection * dbc, const boost::filesystem::path & fn, const boost::filesystem::path & path) override; void deleted(DB::Connection * dbc, const boost::filesystem::path & fn) override; + + void apply(DB::Connection *) override; }; } } |