Hi, I would like to know if anyone knows how I can delete a custom metadatablock. I have created one, but I need to delete it. Thanks in advance
Hi. Is the block unused? It's easier to delete if it hasn't been used. I'm not sure what the SQL is, though.
Here's the related issue: Feature Request/Idea: Delete a metadata block (that hasn't been used at all) #9628
If we figure out the SQL, we should at least paste it into that issue.
@Philip Durbin thanks for answer. I've found this issue: Metadata block update API behavior when a field is changed from CV to free textΒ #8997. In this issue, the following SQL is used:
DELETE FROM controlledvocabularyvalue WHERE datasetfieldtype_id=238
Is that the SQL you are referring to?
Sort of. More SQL statements will be needed to delete the entire block.
Can you drop your database and start over? That's actually what we recommended when developing these blocks, in a test environment, of course.
Philip Durbin ha dicho:
Sort of. More SQL statements will be needed to delete the entire block.
I was reading the issue I shared with you, and I need to do exactly that. I need to delete a controlled vocabulary field to update it with a new one.
I'm going to try it.
Thanks @Philip Durbin
Oh, I see. Sure, go for it.
Last updated: Oct 30 2025 at 06:21 UTC