vanilophp / docs

Vanilo Documentation (Laravel E-commerce)
https://vanilo.io/docs/
6 stars 9 forks source link

Issue of migrate #5

Closed nnegi8501j closed 5 years ago

nnegi8501j commented 5 years ago

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 table prof iles add constraint profiles_user_id_foreign foreign key (user_id) references users (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) {

664| throw new QueryException( 665| $query, $this->prepareBindings($bindings), $e 666| ); 667| } 668|

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:458

2 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?

fulopattila122 commented 5 years ago

Do you use MariaDB? Which version?

fulopattila122 commented 5 years ago

It's likely the duplicate of vanilophp/framework#42

yusufkandemir commented 5 years ago

@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.

fulopattila122 commented 5 years ago

It's been solved in version 1.0@dev.

Technical details: