Skip to content

Conversation

@fulghum
Copy link
Contributor

@fulghum fulghum commented Mar 12, 2025

When multiple tables are supplied to DROP TABLES, MySQL (and also Postgres) will sort the tables by foreign key dependencies, so that the tables can be dropped cleanly.

Resolves dolthub/doltgresql#1272

@fulghum fulghum requested a review from jycor March 13, 2025 22:10
Copy link
Contributor

@jycor jycor left a comment

Choose a reason for hiding this comment

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

LGTM, maybe a test with multiple parent chains?
child -> parent -> grandparent

@fulghum fulghum force-pushed the fulghum/drop_tables branch from 64fbd7e to 19dfef0 Compare March 14, 2025 00:27
@fulghum fulghum merged commit 447fbd1 into main Mar 14, 2025
8 checks passed
@fulghum fulghum deleted the fulghum/drop_tables branch March 14, 2025 00:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DROP TABLE should sort tables by dependencies

3 participants