Skip to content
This repository has been archived by the owner on Nov 6, 2024. It is now read-only.

0.19.7

Compare
Choose a tag to compare
@AndriiSherman AndriiSherman released this 17 Jul 18:09
· 2 commits to master since this release
edfae9e

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