TRUNCATE public.application_party CASCADE;
TRUNCATE public.application_party_for_change CASCADE;
TRUNCATE public.application_parcel CASCADE;
TRUNCATE public.application_document CASCADE;
TRUNCATE public.party_document CASCADE;
TRUNCATE public.parcel_feature CASCADE;
TRUNCATE public.rrr_document CASCADE;
TRUNCATE public.document CASCADE;
TRUNCATE public.rightholder CASCADE;
TRUNCATE public.party CASCADE;
TRUNCATE public.rrr CASCADE;
TRUNCATE public.parcel CASCADE;
TRUNCATE public.application CASCADE;

TRUNCATE history.application_party;
TRUNCATE history.application_party_for_change;
TRUNCATE history.application_parcel;
TRUNCATE history.application_document;
TRUNCATE history.party_document;
TRUNCATE history.parcel_feature;
TRUNCATE history.rrr_document;
TRUNCATE history.document;
TRUNCATE history.rightholder;
TRUNCATE history.party;
TRUNCATE history.rrr;
TRUNCATE history.parcel;
TRUNCATE history.application;

TRUNCATE media.file CASCADE;