Closed nnegi8501j closed 5 years ago
Do you use MariaDB? Which version?
It's likely the duplicate of vanilophp/framework#42
@fulopattila122 Yes, it's duplicate. The original issue is formatted correctly and has more discussion. Both issues are in wrong places but anyways. I think this issue can be closed.
It's been solved in version 1.0@dev
.
Technical details:
I was trying to install vanilo. everything upto migrate command matches that of documentation. But, i am stuck at migrate command. The error is as follows:
Migration table created successfully. Migrating: 2014_10_12_000000_create_users_table Migrated: 2014_10_12_000000_create_users_table Migrating: 2014_10_12_100000_create_password_resets_table Migrated: 2014_10_12_100000_create_password_resets_table Migrating: 2016_11_24_104017_create_countries_table Migrated: 2016_11_24_104017_create_countries_table Migrating: 2016_11_24_104459_create_provinces_table Migrated: 2016_11_24_104459_create_provinces_table Migrating: 2016_12_03_110323_create_addresses_table Migrated: 2016_12_03_110323_create_addresses_table Migrating: 2016_12_04_104214_create_persons_table Migrated: 2016_12_04_104214_create_persons_table Migrating: 2016_12_04_191141_create_organizations_table Migrated: 2016_12_04_191141_create_organizations_table Migrating: 2016_12_18_113707_extend_users_table Migrated: 2016_12_18_113707_extend_users_table Migrating: 2016_12_18_121118_create_profiles_table
Illuminate\Database\QueryException : SQLSTATE[HY000]: General error: 1005 Can't create table
sws_ec omm
.#sql-1fc8_586
(errno: 150 "Foreign key constraint is incorrectly formed") (SQL: alter tableprof iles
add constraintprofiles_user_id_foreign
foreign key (user_id
) referencesusers
(id
))at E:\xampp7\htdocs\SWS\sws_ecomm\vendor\laravel\framework\src\Illuminate\Database\Connection.php:664 660| // If an exception occurs when attempting to run a query, we'll format the error 661| // message to include the bindings with SQL, which will make this exception a 662| // lot more helpful to the developer instead of just the database's errors. 663| catch (Exception $e) {
Exception trace:
1 PDOException::("SQLSTATE[HY000]: General error: 1005 Can't create table
sws_ecomm
.#sql-1fc8_586
(errno: 150 "Foreign key constraint is incorrectly formed")") E:\xampp7\htdocs\SWS\sws_ecomm\vendor\laravel\framework\src\Illuminate\Database\Connection.php:4582 PDOStatement::execute() E:\xampp7\htdocs\SWS\sws_ecomm\vendor\laravel\framework\src\Illuminate\Database\Connection.php:458
Please use the argument -v to see more details.
How can i rectify this problem?