-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improve flyway to be compatible with more postgres versions (#170)
- Loading branch information
Showing
2 changed files
with
2 additions
and
2 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
src/main/resources/scripts/V3_1_0_1__add_user_details_change_event.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters