OkuMuuseum / entu

0 stars 0 forks source link

Suht kiire! Mahakantud asjad #9

Closed Kylli closed 9 years ago

Kylli commented 9 years ago

Varjata avalikus aknas kõik mahakantud asjad.

mitselek commented 9 years ago

Korras

UPDATE entity ee
LEFT JOIN property p ON p.entity_id = ee.id 
LEFT JOIN entity mke ON mke.id = p.value_reference
SET ee.sharing = 'domain', ee.changed = now(), ee.changed_by = 'update'
WHERE ee.entity_definition_keyname = 'eksponaat'
AND p.property_definition_keyname = 'eksponaat-mahakandmisakt'
AND mke.entity_definition_keyname = 'mahakandmisakt'
AND ee.is_deleted = 0
AND p.is_deleted = 0
AND mke.is_deleted = 0
AND ee.sharing != 'domain'