LVES-763 Fix sql query migration error on postgresql use: curl -s http://repo.cloudlinux.com/cloudlinux/sources/lve-stats/LVES_763.patch | patch -F3 -p0 -d / -N =================================================================== --- /usr/share/lve-stats/plugins.other/v1_db_migrator.py +++ /usr/share/lve-stats/plugins.other/v1_db_migrator.py @@ -181,7 +181,7 @@ from_ts, to_ts = self.get_period() from_ts_ = gm_datetime_to_unixtimestamp(from_ts) to_ts_ = gm_datetime_to_unixtimestamp(to_ts) - usernames_ = self.v1session.query(V1HistoryGov).filter( + usernames_ = self.v1session.query(V1HistoryGov.username).filter( V1HistoryGov.ts.between(from_ts_, to_ts_), V1HistoryGov.server_id == self.server_id ).distinct(V1HistoryGov.username).group_by(V1HistoryGov.username) @@ -189,7 +189,7 @@ def _get_history_uids(self): from_ts, to_ts = self.get_period() - uids_ = self.v1session.query(V1History).filter( + uids_ = self.v1session.query(V1History.id).filter( V1History.created.between(from_ts, to_ts), V1History.server_id == self.server_id, V1History.id > self.last_uid