All Downloads are FREE. Search and download functionalities are using the official Maven repository.

db.migration.v0.9.0.2__agr_curation_api.sql Maven / Gradle / Ivy

There is a newer version: v0.35.0
Show newest version
ALTER TABLE bulkloadfile
	ADD datelastloaded timestamp without time zone;
		
ALTER TABLE bulkloadfile_aud
	ADD datelastloaded timestamp without time zone;
	
UPDATE bulkloadfile
	SET datelastloaded=subquery.dateloaded
	FROM (
		SELECT max(loadfinished) as dateloaded, bulkloadfile_id
			FROM bulkloadfilehistory
			GROUP BY bulkloadfile_id
		) AS subquery
	WHERE bulkloadfile.id = subquery.bulkloadfile_id;

UPDATE bulkloadfile
	SET datelastloaded = dbdateupdated
	WHERE datelastloaded is null;
	
UPDATE bulkloadfile
	SET datelastloaded = dateupdated
	WHERE datelastloaded is null;




© 2015 - 2024 Weber Informatics LLC | Privacy Policy