CREATE VIEW veloroutes.v_portion AS
SELECT v_port_geom.collect_geom AS geom,
portion.id_portion,
portion.nom,
portion.description,
portion.type_portion,
portion.id_on3v,
portion.id_local,
portion.mont_subv,
portion.annee_subv
FROM (veloroutes.portion
JOIN veloroutes.v_port_geom ON ((portion.id_portion = v_port_geom.id_portion)));
In the latest migration to 0.5.0 :
CREATE OR REPLACE VIEW veloroutes.v_portion AS
SELECT st_setsrid(st_geomfromtext('LINESTRING(0 0, 0 0)'), 2154) AS geom,
0 AS id_portion, '' AS nom, '' AS description, 'ETP' AS type_portion,
'' AS id_on3v, '' AS id_local, 0.0 AS mont_subv, '' AS annee_subv
WHERE (SELECT COUNT(*) FROM veloroutes.v_port_geom) = 0
UNION ALL
SELECT v_port_geom.collect_geom AS geom,
portion.id_portion,
portion.nom,
portion.description,
portion.type_portion,
portion.id_on3v,
portion.id_local,
portion.mont_subv,
portion.annee_subv
FROM veloroutes.portion
JOIN veloroutes.v_port_geom ON portion.id_portion = v_port_geom.id_portion;
So the code for the same given view is not the same.
I would need to investigate why the "test migration" is ok ...
A fresh install from the plugin works for me, so going with files 10,20,30.
A migration from the database fails for me with :
returned 0 [ERROR: function st_geomfromtext(unknown) does not exist
LINE 22: SELECT st_setsrid(st_geomfromtext('LINESTRING(0 0, 0 0)'), ...
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
]
Execution failed after 0.25 seconds
Which seems indeed linked to the migration.
The result is also different if I run the twice the algorithm and there isn't BEGIN; COMMITS; in the migration.
In the file
30_VIEW.sql
In the latest migration to 0.5.0 :
So the code for the same given view is not the same.
I would need to investigate why the "test migration" is ok ...
A fresh install from the plugin works for me, so going with files 10,20,30. A migration from the database fails for me with :
Which seems indeed linked to the migration.
The result is also different if I run the twice the algorithm and there isn't
BEGIN; COMMITS;
in the migration.