create table `test` (`id` bigint unsigned not null auto_increment primary key, `user_id` bigint unsigned not null, `additionalData` json null, `created_at` timestamp null, `updated_at` timestamp null) default character set utf8mb4 collate 'utf8mb4_unicode_ci'
This command successfully creates the test_user_id_foreign key, but it does not create the constraint:
alter table `test` add constraint `test_user_id_foreign` foreign key (`user_id`) references `users` (`id`) on delete cascade
If I use LONGTEXT instead of JSON as data type for the "additionalData" field, it works however.
I also tested it on a version 10.3.11 server, here it works both with json and longtext.
All queries run without throwing any exceptions