Author: tchemit Date: 2013-12-12 12:14:47 +0100 (Thu, 12 Dec 2013) New Revision: 900 Url: http://forge.codelutin.com/projects/echobase/repository/revisions/900 Log: fixes #3852: Ajout de vues spatiales Modified: trunk/echobase-domain/src/main/java/fr/ifremer/echobase/persistence/migration/workingDb/MigrationCallBackForVersion2_5.java Modified: trunk/echobase-domain/src/main/java/fr/ifremer/echobase/persistence/migration/workingDb/MigrationCallBackForVersion2_5.java =================================================================== --- trunk/echobase-domain/src/main/java/fr/ifremer/echobase/persistence/migration/workingDb/MigrationCallBackForVersion2_5.java 2013-12-12 11:11:35 UTC (rev 899) +++ trunk/echobase-domain/src/main/java/fr/ifremer/echobase/persistence/migration/workingDb/MigrationCallBackForVersion2_5.java 2013-12-12 11:14:47 UTC (rev 900) @@ -353,5 +353,11 @@ " (Select SUM(totalsamplescomsco.sampleweight) From totalsamplescomsco Where totalsamplescomsco.operation_id = echobase_operation_spatial.operationname) as TotalCatchSCOMSCO,\n" + " (Select SUM(totalsampletractru.sampleweight) From totalsampletractru Where totalsampletractru.operation_id = echobase_operation_spatial.operationname) as TotalCatchTRACTRU\n" + "From echobase_operation_spatial;"); + + queries.add("DROP VIEW IF EXISTS cellmapview;"); + queries.add("CREATE OR REPLACE VIEW cellmapview AS \n" + + " SELECT echobase_cell_spatial.voyagename, echobase_cell_spatial.coordinate, echobase_cell_spatial.shape, datametadata.name, result.resultvalue, species.baracoudacode, echobase_cell_spatial.cellname, result.topiaid AS resultid\n" + + " FROM echobase_cell_spatial, result, datametadata, category, speciescategory, species\n" + + " WHERE echobase_cell_spatial.cellid::text = result.cell::text AND result.datametadata::text = datametadata.topiaid::text AND result.category::text = category.topiaid::text AND category.speciescategory::text = speciescategory.topiaid::text AND speciescategory.species::text = species.topiaid::text AND echobase_cell_spatial.celltypename::text = 'Map cell'::text;"); } }