drizzle-kit@0.30.0
drizzle-team/drizzle-ormdrizzle-kit@0.30.0Dec 9, 2024by github-actions[bot]
AI Summary
This release aligns PostgreSQL dialect behavior with other dialects by removing `IF NOT EXISTS`, `$DO`, and similar statements, ensuring incorrect DDL statements properly fail when objects already exist. This change represents the first step toward upcoming migration workflow improvements, Xata migration support, and CockroachDB compatibility.
Key Highlights
- PostgreSQL dialect now aligns with other dialects by removing IF NOT EXISTS statements
- DDL statements will now properly fail when objects already exist in the database
- Marks first step toward commutative migrations and improved migration workflow
- Paves way for better Xata migration support
- Enables future CockroachDB compatibility (requires removing serial fields from migration folder)
Breaking Changes
- PostgreSQL dialect no longer includes IF NOT EXISTS, $DO, or similar statements - DDL operations that attempt to create existing objects will now fail instead of succeeding silently
Full Release Notes
Starting from this update, the PostgreSQL dialect will align with the behavior of all other dialects. It will no longer include `IF NOT EXISTS`, `$DO`, or similar statements, which could cause incorrect DDL statements to not fail when an object already exists in the database and should actually fail. This change marks our first step toward several major upgrades we are preparing: - An updated and improved migration workflow featuring commutative migrations, a revised folder structure, and enhanced collaboration capabilities for migrations. - Better support for Xata migrations. - Compatibility with CockroachDB (achieving full compatibility will only require removing serial fields from the migration folder).