Skip to content

Commit

Permalink
improve flyway to be compatible with more postgres versions (#170)
Browse files Browse the repository at this point in the history
  • Loading branch information
DaDudek authored Oct 20, 2022
1 parent e1d8d9d commit 365747d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ALTER TABLE history_logs ADD COLUMN user_details_change_event varchar(60) DEFAULT NULL;

INSERT INTO history_logs (created, user_id, user_work_time, hours, "comment", user_details_change_event)
SELECT hl2.created - interval '2 seconds', hl2.user_id, hl2.user_work_time, hl2.hours, CONCAT('Zmieniono etat z: ', ROUND(hl.user_work_time / 8.0 , 2) , ' na ', ROUND(hl2.user_work_time/8.0 , 2)), 'USER_CHANGE_WORK_TIME'
SELECT hl2.created - interval '2 seconds', hl2.user_id, hl2.user_work_time, hl2.hours, CONCAT('Zmieniono etat z: ', ROUND(CAST(hl.user_work_time AS numeric) / 8.0 , 2) , ' na ', ROUND(CAST(hl2.user_work_time AS numeric) / 8.0 , 2)), 'USER_CHANGE_WORK_TIME'
FROM history_logs hl
JOIN history_logs hl2 ON (hl.id = hl2.prev_history_log_id AND hl.user_id = hl2.user_id )
WHERE hl.user_work_time != hl2.user_work_time;
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {sendGetRequest} from "../../../helpers/RequestHelper";
import {FETCH_USER_RECENT_ABSENCE_HISTORY_ACTION_PREFIX, FETCH_USER_RECENT_ABSENCE_HISTORY_URL} from "../constants";

export const fetchRecentUserAbsenceHistory = (dispatch, userId) => {
const parameters = "page=0&size=5&sort=id,desc"
const parameters = "page=0&size=5&sort=created,desc"
return fetchUserAbsenceHistory(dispatch, userId, parameters, {recent: true})
}
export const fetchPagedUserAbsenceHistory = (
Expand Down

0 comments on commit 365747d

Please sign in to comment.