Can you run SHOW ENGINE INNODB STATUS and show the logs? this will for a faster debug
Strange MariaBD create table issue
Hi all,
10.3.35-MariaDB Do you see any errors here, please? As I keep getting this in PhpMyAdmin: errno: 150 "Foreign key constraint is incorrectly formed
I am trying to run this command manually(not in Laravel migrations)
CREATE TABLE `categories` (
`id` bigint(20) UNSIGNED NOT NULL,
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`acronym` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`image` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`color` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`url` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
Not sure what to do as I cannot see an error here:
id bigint(20) UNSIGNED NOT NULL
Thanks
@User476820 true, maybe you exported the file before updated the constraints? I can't of a different cause to be honest, only the environment or that you exported before updating, and you can always tweak both of them manually to match.
Just keep in mind if these tables are related to some Laravel project, it's ALWAYS BETTER to stick with migrations as you can do everything using them.
Please or to participate in this conversation.