diff options
-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; }; } } |