Merge remote-tracking branch 'origin/pycurl' into planetlab-4_0-branch
[plcapi.git] / migrations / 004-up-fix-site-nodes.sql
1 -- 
2 -- bugfix
3 -- the site_nodes should restrict to nodes where deleted is false
4 --
5
6 CREATE OR REPLACE VIEW site_nodes AS
7 SELECT site_id,
8 array_accum(node_id) AS node_ids
9 FROM nodes
10 WHERE deleted is false
11 GROUP BY site_id;
12
13 -- Bump subversion
14 UPDATE plc_db_version SET subversion = 4;
15 SELECT subversion from plc_db_version;
16