Illuminate\Database\QueryException : SQLSTATE[HY000]: General error: 1005 Can't create table vanila.#sql-1d4a_1e (errno: 150 "Foreign key constraint is incorrectly formed") (SQL: alter table profiles add constraint profiles_user_id_foreign foreign key (user_id) references users (id))
PLZ Help
It may be that the users.id and theprofiles.user_id don't have the same data type, e.g. int vs. bigint.
Illuminate\Database\QueryException : SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'json not null, custom_properties json not null, responsive_images json not n' at line 1 (SQL: create table media (id bigint unsigned not null auto_increment primary key, model_type varchar(191) not null, model_id bigint unsigned not null, collection_name varchar(191) not null, name varchar(191) not null, file_name varchar(191) not null, mime_type varchar(191) null, disk varchar(191) not null, size int unsigned not null, manipulations json not null, custom_properties json not null, responsive_images json not null, order_column int unsigned null, created_at timestamp null, updated_at timestamp null) default character set utf8 collate 'utf8_unicode_ci')
It may be that the
users.idand theprofiles.user_iddon't have the same data type, e.g. int vs. bigint.
Thank @mfn
Try using $table->id() instead of $table->increament('is') in your migrations
Most helpful comment
It may be that the
users.idand theprofiles.user_iddon't have the same data type, e.g. int vs. bigint.