You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 2, 2022. It is now read-only.
interesting. wonder why this has never popped up before. Probably my Mysql server defaults to the default innodb.
i assume your default mysql server engine is set to MyISAM ? so the migrations that do not specify ->engine are going myISAM ?
anyhow I agree on the above change.
thank you
Receiving the following error during initial migration using
php artisan migrate:fresh --seed
or visityour.site.com/setup
[Illuminate\Database\QueryException] SQLSTATE[HY000]: General error: 1005 Can't create table xxx.#clients (errno: 150 "Foreign key constraint is incorrectly formed") (SQL: alter table 'clients' add constraint 'clients_industry_id_foreign' foreign key ('industry_id') references 'industries' ('id') on delete no action on update no action)
To Reproduce
Steps to reproduce the behavior:
.env
file, database creation, etc....php artisan migrate:fresh --seed
or visityour.site.com/setup
Expected behavior
Should not error.
Desktop/Smartphone:
Should not matter.
Additional context
Issue is due to database engine difference between
clients
InnoDB andindustries
MyISAM table.Instead of manually define database engine everywhere, I recommend to define it at the global/configuration area? https://github.com/cytech/BillingTrack/blob/master/config/database.php#L25
The text was updated successfully, but these errors were encountered: