dosubot[bot] commented on issue #35941: URL: https://github.com/apache/superset/issues/35941#issuecomment-3544205225
<!-- Answer --> Yes, a migration needs to be run if your database schema currently enforces a foreign key constraint on tagged_object.object_id. The original migration for this table did not include a foreign key on object_id, and the intended design is to rely on the object_type field for polymorphic association—not foreign keys to dashboards, slices, or saved_query. The current model code incorrectly defines multiple foreign keys, which leads to the constraint violation when tagging dashboards with the TAGGING_SYSTEM feature flag enabled. To fix this, you’ll need a migration that drops the foreign key constraint from tagged_object.object_id so the tagging system works as intended. You can confirm the presence of the constraint by inspecting your database schema. If it exists, removing it via migration will resolve the issue and unblock dashboard creation and tagging with the feature flag enabled. [Reference: tagged_object model definition](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/tags/models.py#L108-L128) | [Original migration](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/migrations/versions/2018-07-26_11-10_c82ee8a39623_add_implicit_tags.py#L83-L102) <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/31c17df8-e24f-4c30-883c-6f2d384b5759?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/31c17df8-e24f-4c30-883c-6f2d384b5759?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/31c17df8-e24f-4c30-883c-6f2d384b5759?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/31c17df8-e24f-4c30-883c-6f2d384b5759?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/31c17df8-e24f-4c30-883c-6f2d384b5759?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/31c17df8-e24f-4c30-883c-6f2d384b5759?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/31c17df8-e24f-4c30-883c-6f2d384b5759?feedback_type=other)</sup> [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=githu b) [](https://go.dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/issues/35941) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
