[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
if repo.system_source.dbdriver == 'postgres':
sql('ALTER TABLE appears ADD COLUMN weight float')
sql('UPDATE appears SET weight=1.0 ')