Skip to content

Instantly share code, notes, and snippets.

@AFaust
Last active January 19, 2024 14:31
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AFaust/3d7e018e730165532f9598062fab1607 to your computer and use it in GitHub Desktop.
Save AFaust/3d7e018e730165532f9598062fab1607 to your computer and use it in GitHub Desktop.
Alfresco SQL scripts for upgrade preparation
delete
from
alf_prop_link
where
root_prop_id in (
select
prop1_id
from
alf_prop_unique_ctx ctx
left join alf_prop_value pvj1 on ctx.value1_prop_id = pvj1.id
left join alf_prop_string_value psvj1 on psvj1.id = pvj1.long_value
where
pvj1.persisted_type = 3
and psvj1.string_value = '.PropertyBackedBeans'
);
delete
from
alf_prop_root
where
id in (
select
prop1_id
from
alf_prop_unique_ctx ctx
left join alf_prop_value pvj1 on ctx.value1_prop_id = pvj1.id
left join alf_prop_string_value psvj1 on psvj1.id = pvj1.long_value
where
pvj1.persisted_type = 3
and psvj1.string_value = '.PropertyBackedBeans'
);
delete
from
alf_prop_unique_ctx
where
value1_prop_id in (
select
pvj1.id
from
alf_prop_value pvj1
left join alf_prop_string_value psvj1 on psvj1.id = pvj1.long_value
where
pvj1.persisted_type = 3
and psvj1.string_value = '.PropertyBackedBeans'
);
delete
from
alf_prop_link
where
root_prop_id in (
select
prop1_id
from
alf_prop_unique_ctx ctx
left join alf_prop_value pvj1 on ctx.value1_prop_id = pvj1.id
left join alf_prop_string_value psvj1 on psvj1.id = pvj1.long_value
where
pvj1.persisted_type = 3
and psvj1.string_value = '.clusterMembers'
);
delete
from
alf_prop_root
where
id in (
select
prop1_id
from
alf_prop_unique_ctx ctx
left join alf_prop_value pvj1 on ctx.value1_prop_id = pvj1.id
left join alf_prop_string_value psvj1 on psvj1.id = pvj1.long_value
where
pvj1.persisted_type = 3
and psvj1.string_value = '.clusterMembers'
);
delete
from
alf_prop_unique_ctx
where
value1_prop_id in (
select
pvj1.id
from
alf_prop_value pvj1
left join alf_prop_string_value psvj1 on psvj1.id = pvj1.long_value
where
pvj1.persisted_type = 3
and psvj1.string_value = '.clusterMembers'
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment