[dataimport] backport massive store from dataio cube
Some tweaks have been made to work with 3.21 foreign key constraints.
Also test are not executed in our own pg cluster instead of polluting the system
one.
Closes #5414760
sync_schema_props_perms('cwuri')
helper = repo.system_source.dbhelper
cu = session.cnxset.cu
helper.set_null_allowed(cu, 'moved_entities', 'extid', 'VARCHAR(256)', False)
commit()