Merge pull request #140 from metaodi/139-delete-package-relationships
[#139] Delete package relationships when clearing a harvest source
This commit is contained in:
commit
ce0aedd5b9
|
@ -154,6 +154,10 @@ def harvest_source_clear(context,data_dict):
|
|||
delete from package_revision where id in (select id from package where state = 'to_delete');
|
||||
delete from package_tag where package_id in (select id from package where state = 'to_delete');
|
||||
delete from package_extra where package_id in (select id from package where state = 'to_delete');
|
||||
delete from package_relationship_revision where subject_package_id in (select id from package where state = 'to_delete');
|
||||
delete from package_relationship_revision where object_package_id in (select id from package where state = 'to_delete');
|
||||
delete from package_relationship where subject_package_id in (select id from package where state = 'to_delete');
|
||||
delete from package_relationship where object_package_id in (select id from package where state = 'to_delete');
|
||||
delete from member where table_id in (select id from package where state = 'to_delete');
|
||||
delete from related_dataset where dataset_id in (select id from package where state = 'to_delete');
|
||||
delete from related where id in {related_ids};
|
||||
|
|
Loading…
Reference in New Issue