-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'releases/release-0.8.0' into master
- Loading branch information
Showing
5 changed files
with
14 additions
and
5 deletions.
There are no files selected for viewing
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
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,8 @@ | ||
CREATE OR REPLACE VIEW riha.main_resource_view AS | ||
SELECT DISTINCT ON (json_content ->> 'uuid') *, | ||
((main_resource.json_content #>> '{meta,creation_timestamp}'::text[]))::timestamp AS j_creation_timestamp | ||
((main_resource.json_content #>> '{meta,creation_timestamp}'::text[]))::timestamp AS j_creation_timestamp, | ||
((main_resource.json_content #>> '{meta,update_timestamp}'::text[]))::timestamp AS j_update_timestamp | ||
FROM riha.main_resource as main_resource | ||
ORDER BY json_content ->> 'uuid', | ||
creation_date DESC, | ||
j_update_timestamp DESC NULLS LAST, | ||
main_resource_id DESC; |
8 changes: 8 additions & 0 deletions
8
sql/update/update_27102017_update_main_resource_view_ordering.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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
CREATE OR REPLACE VIEW riha.main_resource_view AS | ||
SELECT DISTINCT ON (json_content ->> 'uuid') *, | ||
((main_resource.json_content #>> '{meta,creation_timestamp}'::text[]))::timestamp AS j_creation_timestamp, | ||
((main_resource.json_content #>> '{meta,update_timestamp}'::text[]))::timestamp AS j_update_timestamp | ||
FROM riha.main_resource as main_resource | ||
ORDER BY json_content ->> 'uuid', | ||
j_update_timestamp DESC NULLS LAST, | ||
main_resource_id DESC; |
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
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