SQL migration / Fix extra comma. Take care of dropping constraint before dropping table. Tested on Postgres. More tests needed on other db.
Domain / display order and group owner may be null (for metadata no order define, harvested record may contain no groupowner info).