Skip to content

fix(kit): recreate PostgreSQL views before referenced column type changes - #6211

Open
ivanpukhov wants to merge 1 commit into
drizzle-team:rc5from
ivanpukhov:fix/kit-view-column-dependencies-6194
Open

fix(kit): recreate PostgreSQL views before referenced column type changes#6211
ivanpukhov wants to merge 1 commit into
drizzle-team:rc5from
ivanpukhov:fix/kit-view-column-dependencies-6194

Conversation

@ivanpukhov

Copy link
Copy Markdown

PostgreSQL rejects ALTER COLUMN TYPE while a regular view references the affected column. Capture column-level dependencies from query-builder views before SQL rendering, then order DROP, ALTER, and CREATE statements for drizzle-kit generate and push.

For push, read PostgreSQL pg_rewrite and pg_depend catalogs so drops follow the authoritative source dependency graph even when the target graph changes.

Fixes #6194

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.

1 participant