deleting properties can be pretty difficult once they've been used. cleanupDatabase will only hard delete the property if it's not used. there are a lot of object types that are not affected by cleanup because the deletion cost is pretty high for the amount of space that would be cleared. eg roles and users or servers. so the short answer is use the right property type in production when you create it.
you can try setting the value back to the default where it was used and then doing the deletion - that may work.
If only people were perfect on the first iteration... can i typecast the property in the dictionary?
?i don't disagree - we should have a way to delete a property period.
what do you mean about typecast ?
Change the property type from String to String Enumeration (I assume this just an integer value i can change from 1 to 4 or whatever the type is)
?once a property is used you can't change the type either.
truth --I thought we were able to, especially if its a custom class but the option is greyed out
Here is a work around to re-typecast properties in case you aren't perfect on the first go around
WARNING: requires you to make changes to the DB! Apply at your own risk!
1. Undeprecate the property if its currently deprecated (hint: you can simply try to add the property with the same name from the property dictionary)
2. In a DB query, find the id
>> select * from property where name = '<YOUR_PROPERTY_NAME>';
(Hold onto the property_id value, we need it for the next step)
3. Rename the property in the DB
>> update property set name = '<YOUR_PROPERTY_NAME>_OLD' where property_id = '<THE_PROPERTY_ID_FROM_STEP_2_QUERY>';
4. Go back to the property dictionary and create a new property with the old name -- its like creating it for the first time Choose whatever type you want now!
You’re not really re-typecasting here – you’re just renaming the bad one.. ☺