diff options
| author | Dan Goodliffe <dan@randomdan.homeip.net> | 2016-05-26 00:56:05 +0100 | 
|---|---|---|
| committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2016-05-26 00:56:05 +0100 | 
| commit | 5b65c5c3695427e334d08f453a1d2f471a4a73cc (patch) | |
| tree | 7e54f316ae9de4b45bd53e8666acb8fb0a285dbf | |
| parent | Dump a copy of files too (diff) | |
| download | gentoobrowse-api-5b65c5c3695427e334d08f453a1d2f471a4a73cc.tar.bz2 gentoobrowse-api-5b65c5c3695427e334d08f453a1d2f471a4a73cc.tar.xz gentoobrowse-api-5b65c5c3695427e334d08f453a1d2f471a4a73cc.zip | |
RepoId isn't part of the primary key
| -rw-r--r-- | gentoobrowse-api/service/maintenanceimpl.cpp | 6 | 
1 files changed, 3 insertions, 3 deletions
| diff --git a/gentoobrowse-api/service/maintenanceimpl.cpp b/gentoobrowse-api/service/maintenanceimpl.cpp index c2629fe..4ac065c 100644 --- a/gentoobrowse-api/service/maintenanceimpl.cpp +++ b/gentoobrowse-api/service/maintenanceimpl.cpp @@ -102,8 +102,8 @@ namespace Gentoo {  		void  		Maintenance::fileChanged(DB::Connection * dbc, const FileProcessors * fps, const boost::filesystem::path & tmp, DB::SelectCommandPtr s)  		{ -			// a.filename, a.repoid, a.filesize old_filesize, a.filetypeid old_filetypeid, a.moddate old_moddate, a.pathparts old_pathparts, b.filesize new_filesize, b.filetypeid new_filetypeid, b.moddate new_moddate, b.pathparts new_pathparts -			s->forEachRow<std::string, int64_t, int64_t, int64_t, boost::posix_time::ptime, std::string, int64_t, int64_t, boost::posix_time::ptime, std::string>([dbc,&tmp,this,fps](auto fn, auto, auto, auto ft, auto, auto, auto, auto, auto, auto) { +			// a.filename, a.filesize old_filesize, a.filetypeid old_filetypeid, a.moddate old_moddate, a.pathparts old_pathparts,a.repoid old_repoid,  b.filesize new_filesize, b.filetypeid new_filetypeid, b.moddate new_moddate, b.pathparts new_pathparts, b.repoid new_repoid +			s->forEachRow<std::string, int64_t, int64_t, boost::posix_time::ptime, std::string, int64_t, int64_t, int64_t, boost::posix_time::ptime, std::string, int64_t>([dbc,&tmp,this,fps](auto fn, auto, auto ft, auto, auto, auto, auto, auto, auto, auto, auto) {  					this->fileHandle(ft, fps, boost::bind(&FileProcessor::modified, _1, dbc, fn, tmp / fn));  				});  		} @@ -161,7 +161,7 @@ namespace Gentoo {  			DB::TablePatch tp;  			tp.srcExpr = &src;  			tp.dest = "gentoobrowse.files"; -			tp.pk = {"repoid", "filename"}; +			tp.pk = {"filename"};  			tp.cols = {"repoid", "filename", "filetypeid", "pathparts", "filesize", "moddate"};  			tp.beforeDelete = boost::bind(&Maintenance::fileDeleted, this, dbc, &fps, tmp, _1);  			tp.beforeUpdate = boost::bind(&Maintenance::fileChanged, this, dbc, &fps, tmp, _1); | 
