Skip to content

Conversation

@aj-fuentes
Copy link
Contributor

@aj-fuentes aj-fuentes commented Aug 29, 2025

If a constraint with the same name was found. Attempt as well to drop
any existing index with the same name. Otherwise we may leave behind
constraints implemented as unique indexes.

See odoo/upgrade#8318

@robodoo
Copy link
Contributor

robodoo commented Aug 29, 2025

Pull request status dashboard

@aj-fuentes aj-fuentes requested a review from KangOl August 29, 2025 07:55
If a constraint with the same name was found. Attempt as well to drop
any existing index with the same name. Otherwise we may leave behind
constraints implemented as unique indexes.

See odoo/upgrade#8318
@aj-fuentes aj-fuentes force-pushed the master-fix_drop_indexes-afu branch from 033f232 to 34c3c1f Compare August 29, 2025 07:55
@aj-fuentes
Copy link
Contributor Author

upgradeci retry with always base account_edi_proxy_client

@KangOl
Copy link
Contributor

KangOl commented Aug 29, 2025

upgradeci retry with always only base account_edi_proxy_client

@KangOl
Copy link
Contributor

KangOl commented Aug 29, 2025

It's not needed. The ALTER TABLE DROP CONSTRAINT also remove the underlying index. From the doc:

This form drops the specified constraint on a table, along with any index underlying the constraint

@aj-fuentes
Copy link
Contributor Author

It's not needed. The ALTER TABLE DROP CONSTRAINT also remove the underlying index. From the doc:

This form drops the specified constraint on a table, along with any index underlying the constraint

In stable we create indexes in auto_init. Supposedly with this name format. I guess they are not associated to the constraint directly at PG level.

@KangOl
Copy link
Contributor

KangOl commented Aug 29, 2025

And it also won't work for partial indexes.

Copy link
Contributor

@KangOl KangOl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants