0.19.7
A few more important bug fixes for MySQL:
-
π Adding
NOT NULL
andDEFAULT 0
for integer columns was triggering table truncation on push. I askeddrizzle-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 todrop 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 duringpush
. 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