scholarslab/Neatline — Issue #65: NeatlineDataRecordTable needs garbage collection on all-null records
Author: davidmcclure
Created: 2012-01-18 14:31:05+00:00
State: open
Labels: optimization

Currently, it is possible for totally null NeatlineDataRecord rows to persist in the database. For example, if someone goes to the listing for an Omeka item in the editor and clicks the space-active checkbox, a data record is created for that item that registers the space-active status.

But if the use then just unchecks the box, the space-active column in the otherwise-totally-empty record gets switched back to 0/false, but the record persists in the database.

In the interest of general database hygiene, on save() there should be a check to see if the record is totally empty, and if so, delete.