npm drizzle-kit 0.19.7

latest releases: 0.25.0-d1da3b8, 0.25.0-ff1e9a5, 0.25.0-8dece56...
14 months ago

A few more important bug fixes for MySQL:

  • 🐛 Adding NOT NULL and DEFAULT 0 for integer columns was triggering table truncation on push. I asked drizzle-kit not to do it, and he agreed.

  • 🐛 __drizzle_migrations was used for primary key detection during introspection. For now, we will simply filter this table during the information schema querying step.

  • 🐛 Another attempt to fix Impossible to push schema changes due to ER_DROP_INDEX_FK. When pushing and introspecting on MySQL, drizzle-kit was taking all indexes from a database. However, it appears that MySQL automatically creates an index for foreign keys (https://dev.mysql.com/doc/refman/8.0/en/constraint-foreign-key.html)
    As long as you, as a user, do not specify this index in the schema, drizzle-kit will be triggered by changes and attempt to drop index. In this patch release, we have decided to ignore such indexes and add collision checks for the same name of foreign key constraints and indexes in the same table.

  • 🐛 MySQL defaults with sql inside were mapped incorrectly, which caused constant schema changes during push. We have made changes to the way generated defaults are handled in the code, so now it should work properly.

  • ✍️ Added a new collision check between indexes and foreign key constraints with the same name in the same table. Finally, drizzle-kit's collision checks are expanding. We have included some documentation and blog post links for anyone interested in understanding how databases work for specific cases

Don't miss a new drizzle-kit release

NewReleases is sending notifications on new releases.