From 0ac307b049ee681829674c91ac7d9a78597ed5ab Mon Sep 17 00:00:00 2001 From: Aron Roberts Date: Wed, 5 Dec 2012 18:27:23 -0800 Subject: [PATCH] CSPACE-5727: Removing vestigates of attempt to install computeCurrentLocation function via 'ant create_nuxeo_db'. This likely won't work, because PostgreSQL checks for the existence of the tables (relations) in the function before creating or replacing the function, and when we run ant_create_nuxeo_db during build, those tables haven't necessarily been created. --- .../resources/db/mysql/collectionobject.sql | 3 --- .../db/postgresql/collectionobject.sql | 24 ------------------- 2 files changed, 27 deletions(-) delete mode 100644 services/collectionobject/service/src/main/resources/db/mysql/collectionobject.sql delete mode 100644 services/collectionobject/service/src/main/resources/db/postgresql/collectionobject.sql diff --git a/services/collectionobject/service/src/main/resources/db/mysql/collectionobject.sql b/services/collectionobject/service/src/main/resources/db/mysql/collectionobject.sql deleted file mode 100644 index 52a328055..000000000 --- a/services/collectionobject/service/src/main/resources/db/mysql/collectionobject.sql +++ /dev/null @@ -1,3 +0,0 @@ --- File intentionally empty --- Can add SQL commands for CollectionObject-related database setup --- in MySQL below. diff --git a/services/collectionobject/service/src/main/resources/db/postgresql/collectionobject.sql b/services/collectionobject/service/src/main/resources/db/postgresql/collectionobject.sql deleted file mode 100644 index 59a98c7da..000000000 --- a/services/collectionobject/service/src/main/resources/db/postgresql/collectionobject.sql +++ /dev/null @@ -1,24 +0,0 @@ -CREATE OR REPLACE FUNCTION lastidentifiedlocation(character varying) RETURNS character varying - AS 'select m.currentlocation as lastidentifiedlocation -from movements_common m, -hierarchy h1, -relations_common r, -hierarchy h2, -collectionobjects_common c, -misc misc -where m.id=h1.id -and r.subjectcsid=h1.name -and r.subjectdocumenttype=''Movement'' -and r.objectdocumenttype=''CollectionObject'' -and r.objectcsid=h2.name -and h2.id=c.id -and misc.id = c.id -and misc.lifecyclestate <> ''deleted'' -and m.currentlocation is not null -and m.locationdate is not null -and h2.name=$1 -order by m.locationdate desc,row_number() over(order by locationdate) -limit 1' -LANGUAGE SQL - IMMUTABLE - RETURNS NULL ON NULL INPUT; -- 2.47.3