·
10 commits
to main
since this release
Features and improvements
Enum DDL improvements
For situations where you drop an enum
value or reorder values in an enum
, there is no native way to do this in PostgreSQL. To handle these cases, drizzle-kit
used to:
- Change the column data types from the enum to text
- Drop the old enum
- Add the new enum
- Change the column data types back to the new enum
However, there were a few scenarios that weren’t covered: PostgreSQL
wasn’t updating default expressions for columns when their data types changed
Therefore, for cases where you either change a column’s data type from an enum
to some other type, drop an enum
value, or reorder enum
values, we now do the following:
- Change the column data types from the enum to text
- Set the default using the ::text expression
- Drop the old enum
- Add the new enum
- Change the column data types back to the new enum
- Set the default using the ::<new_enum> expression
esbuild
version upgrade
For drizzle-kit
we upgraded the version to latest (0.25.2
), thanks @paulmarsicloud