Skip to content

Commit

Permalink
Merge branch 'releases/release-0.8.0' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
valesu committed Oct 31, 2017
2 parents df5530c + dfa7b02 commit 4a5f4cc
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>ee.eesti.riha</groupId>
<artifactId>rest</artifactId>
<version>0.7.0</version>
<version>0.8.0</version>

<packaging>war</packaging>

Expand Down
5 changes: 3 additions & 2 deletions sql/create_views.sql
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;
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;
2 changes: 1 addition & 1 deletion src/main/java/ee/eesti/riha/rest/model/Comment.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
@TypeDefs({@TypeDef(name = "JsonObject", typeClass = JsonObjectUserType.class) })
@Transactional
@Entity
@Table(name = "comment", schema = "riha")
@Table(name = "comment")
@JsonInclude(Include.NON_NULL)
public class Comment implements BaseModel {

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/riharest.project.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
riharest.jdbc.url=jdbc:postgresql://192.168.1.37:5432/riha?currentSchema=riha
riharest.jdbc.url=jdbc:postgresql://localhost:5432/riha?currentSchema=riha
riharest.jdbc.user=postgres
riharest.jdbc.password=admin

Expand Down

0 comments on commit 4a5f4cc

Please sign in to comment.