colouring-cities / colouring-core

The Core Platform for the Colouring Cities Research Programme (CCRP)
https://colouringcities.org
GNU General Public License v3.0
48 stars 43 forks source link

Add database contraint to ensure that current_landuse_order and current_landuse_group are set together #1365

Open matkoniecz opened 2 years ago

matkoniecz commented 2 years ago
        SELECT
            geometry_id,
            current_landuse_order,
            current_landuse_group
        FROM
            buildings
        WHERE
            current_landuse_order IS NOT NULL AND
            (current_landuse_group IS NULL OR cardinality(current_landuse_group) = 0);

reports some entries (I am fixing them).

While right now interface block such invalid data, it would be preferable to ensure that it would be blocked also on database level

polly64 commented 8 months ago

@matkoniecz can this be closed?

matkoniecz commented 5 months ago

no, it still needs to be done