Stream: troubleshooting

Topic: delete custom metadata block


view this post on Zulip Santiago Florez (Jun 14 2024 at 16:21):

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

view this post on Zulip Philip Durbin πŸš€ (Jun 14 2024 at 16:24):

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.

view this post on Zulip Philip Durbin πŸš€ (Jun 14 2024 at 16:25):

Here's the related issue: Feature Request/Idea: Delete a metadata block (that hasn't been used at all) #9628

view this post on Zulip Philip Durbin πŸš€ (Jun 14 2024 at 16:25):

If we figure out the SQL, we should at least paste it into that issue.

view this post on Zulip Santiago Florez (Jun 14 2024 at 17:04):

@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

view this post on Zulip Santiago Florez (Jun 14 2024 at 17:06):

Is that the SQL you are referring to?

view this post on Zulip Philip Durbin πŸš€ (Jun 14 2024 at 17:08):

Sort of. More SQL statements will be needed to delete the entire block.

view this post on Zulip Philip Durbin πŸš€ (Jun 14 2024 at 17:09):

Can you drop your database and start over? That's actually what we recommended when developing these blocks, in a test environment, of course.

view this post on Zulip Philip Durbin πŸš€ (Jun 14 2024 at 17:12):

https://guides.dataverse.org/en/6.2/admin/metadatacustomization.html#setting-up-a-dev-environment-for-testing

view this post on Zulip Santiago Florez (Jun 14 2024 at 17:20):

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.

view this post on Zulip Santiago Florez (Jun 14 2024 at 17:21):

I'm going to try it.

view this post on Zulip Santiago Florez (Jun 14 2024 at 17:22):

Thanks @Philip Durbin

view this post on Zulip Philip Durbin πŸš€ (Jun 14 2024 at 17:44):

Oh, I see. Sure, go for it.


Last updated: Oct 30 2025 at 06:21 UTC