Questions tagged [artisan-migrate]
192 questions
0
votes
1 answer
Migration Table Creation Error when using Laravel Sail. Information_schema.tables missing
My colleague has created a docker-composer.yml file and has shared that image with me.
When I run the container and attach this image, I am unable to create migratation tables through the command; "./vendor/bin/sail artisan migrate". I am using…

Karan Ahuja
- 44
- 2
0
votes
2 answers
Laravel 9.x Terminal can not migrate table
Trying to migrate a users table. Already have 1 table at DB. It's Contacts for contact form. Trying to migrate a users table. Created my table with terminal $ php artisan make:migration create_users_table
Had the following code in it.

NervousDev
- 87
- 1
- 1
- 13
0
votes
1 answer
I cant migrate database - Homestead
When i type php artisan migrate from my pc it throws an error.
1 D:\xampp\htdocs\cms\vendor\laravel\framework\src\Illuminate\Database\Connectors\Connector.php:70
PDOException::("SQLSTATE[HY000] [2002] No connection could be made because the target…

r0pe-12
- 57
- 2
- 9
0
votes
0 answers
Artisan migrate error:PDOException::"SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes"
In config folder database 'charset' => 'utf8mb4' and 'collation' => 'utf8mb4_unicode_ci' are like that when i am trying to php artisan migrate i get this error message
1 …

Alexandru
- 45
- 5
0
votes
1 answer
Laravel not creating migration table for existing model
I generated a model using this command:
php artisan make:model Notification
the model file looks like this :

CoderTn
- 985
- 2
- 22
- 49
0
votes
0 answers
Laraver 8.40 running on Docker issues a MySQL 2002 error when trying to migrate via artisan
This is a completely fresh installation of Laravel (because i was hoping that would fix the issue), which now makes it version 8.40.00. And to run it, i go through sail, by doing: ./vendor/bin/sail up -d.
Even though the initial .env file has…

Digital Ninja
- 3,415
- 5
- 26
- 51
0
votes
1 answer
run specific migration using artisan command from class
I tried to run a specific migration table from the controller using the following code
Artisan::call ("migrate:refresh --step=14");
but it does not refresh table 14, on the other hand it refreshes all the tables
.. ,
any suggestion !!

Hamza DriouCh
- 31
- 1
- 7
0
votes
0 answers
Why is php artisan migrate resulting " Illuminate\Database\QueryException SQLSTATE[HY000] [2002] Connection refused "
I was trying to set up a Laravel project but whenever I hit php artisan migrate it results in this error
Illuminate\Database\QueryException
SQLSTATE[HY000] [2002] Connection refused (SQL: select * from information_schema.tables where…

tensorMan
- 17
- 6
0
votes
2 answers
Problem while runnning php artisan migrate
Illuminate\Database\QueryException : SQLSTATE[HY000] [2002] Connection refused (SQL: select * from information_schema.tables where table_schema = pracatice and table_name = migrations)

harshad tibile
- 11
- 3
0
votes
1 answer
SQLSTATE[HY000]: General error: 1824 Failed to open the referenced table 'landlords'
I am quiet new to laravel and bumped into this error message
( SQLSTATE[HY000]: General error: 1824 Failed to open the referenced table 'landlords' (SQL: alter table `apartments` add constraint `apartments_landlord_id_foreign` foreign key…

Eniola Agboola
- 11
- 3
0
votes
1 answer
php/laravel -- php artisan serve -- opensuse 15.0 error
So I am new to php/laravel and am trying to set up my environment here with composer on opensuse 15.0.
When I try to run php artisan migrate
I get this error:
PHP Warning: …
0
votes
1 answer
When i try and migrate my tables in laravel i keep getting the following error
Im trying to run php artisan migrate but i keep getting the following error:
i have tried to roll back the tables and migrate them again but it just gives me the same error
SQLSTATE[HY000]: General error: 1215 Cannot add foreign key constraint (SQL:…

es915
- 137
- 3
- 11
0
votes
1 answer
using a mysql database using laravel
I'm trying to use a MySQL database using PHP and laravel, so far I have created the database in phpmyadmin called "laravel", i have updated my .env file to the…

Gino Sesia
- 383
- 2
- 4
- 14
0
votes
1 answer
is that any way to Laravel migrate with new database connection using my new Config file?
without using my config/database.php in mysql connection.
to use my config/newdatabase.php in newsql connection.
example command such as blow.
php artisan migrate database=newsql
Thanks.

Tamil
- 311
- 4
- 9
0
votes
0 answers
php artisan migrate error -could not find driver
vadir@DESKTOP-6504PNT MINGW64 /c/xampp/htdocs/lsapp
$ php artisan migrate
Illuminate\Database\QueryException
could not find driver (SQL: select * from information_schema.tables where table_schema =
lsapp and table_name = migrations and table_type…