Closed Gustry closed 2 years ago
The default value is set database-side with now()
https://docs.3liz.org/qgis-pgmetadata-plugin/database/tables/dataset.html
which is enough for creation.
I am not against enforcing this default value on creation for creation_date
and also on modification for update_date
in the QGIS layer properties, but indeed we should also enforce the update of the update_date
on a dataset UPDATE by modifying the trigger function calculate_fields_from_data
and add
-- Date fields
NEW.update_date = now();
IF TG_OP = 'INSERT' THEN
NEW.creation_date = now();
END IF;
before the comment -- Get table feature count
Fixed in SQL as well @mdouchin
I have added tests (fixed the DCAT as well because of this update).
I'm fine to merge this PR after 1.1.0 if needed.