Questions tagged [artisan-migrate]
192 questions
1
vote
0 answers
PHP artisan migrate gets could not find driver under XAMPP
I use XAMPP on Windows 10, and when I run php artisan migrate I get this error message:
Illuminate\Database\QueryException
\could not find driver (SQL: select * from information_schema.tables
where table_schema = mydb and table_name = migrations…

Daevne
- 41
- 4
1
vote
1 answer
how to fix “Method Illuminate\Database\Schema\Blueprint::number does not exist.”
When I use php artisan migrate I receive this message. Can someone help me with this? I searched on the Internet but I didn't find anything that helped me. (I am new in laravel)
My Table:

MD Tahmid Hossen
- 11
- 3
1
vote
2 answers
Laravel: Show output of a console command inside a migration?
I created a command to do some data manipulation on a very large database table and as it takes fair enough time to complete, i took the benefits of progress bar plus echoing some information on the console.
to automate stuff and reduce human…

Arash
- 639
- 2
- 9
- 15
1
vote
2 answers
Laravel migration show "Multiple primary key defined"
My laravel migration is like below
public function up()
{
Schema::create('account_main', function (Blueprint $table) {
$table->increments('user_sn')->primary();
$table->string('member_username', 20);
…

Josh Chang
- 45
- 2
- 11
1
vote
0 answers
Error when migrate database laravel after using migrate generator
I want to migrate my database to another database server in laravel,
I use this generator https://github.com/Xethron/migrations-generator to generate my migration file
But after i run command
php artisan migrate
It's showing…

Ferry Sanjaya
- 224
- 2
- 17
1
vote
2 answers
Is it a good practice to run automatically php artisan migrate in production after a deploy on Heroku?
I was wondering if it's a good practice to run automatically php artisan migrate in production after a deploy on Heroku.
Thanks for your help!

Simone Bernardi
- 15
- 2
1
vote
1 answer
PHP 7.3.1 Laravel SQLSRV failing to seed database
Trying to seed the database using laravel php artisan migrate:fresh --seed; however, it fails with a couldn't find driver.
Driver's are installed and application communicates with database with no problems.
System information.
Database: MSSQL…

Amr Aly
- 386
- 1
- 14
1
vote
3 answers
Base table or view not found during migration
I am running exiting laravel project in homestead. When run php artisan migrate get the error.
Here is full error.
In Connection.php line 664:
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'forum.chanel' doesn't exist (SQL: select *…

Shunhra Sarker
- 187
- 1
- 2
- 15
1
vote
1 answer
php artisan migrate with sqlite throws error, database is locked
I was trying to play a bit with Laravel and SQLite but whenever I run php artisan migrate I always get the same error: Illuminate\Database\QueryException : SQLSTATE[HY000]: General error: 5 database is locked (SQL: create table "migrations" ("id"…

emilushi
- 280
- 7
- 16
1
vote
0 answers
Laravel artisan migrate crashes database
I created a migration for a table which has over 2 million records. migration is adding a new column to that table as follow.I am using vagrant as my environment.
Schema::table('tb_selection', function(Blueprint $table) {
…

Deemantha
- 433
- 9
- 30
1
vote
1 answer
Laravel auto generate migration scripts
I am working on a php laravel webapp.
I am creating models for my database.
I have to write models class and migrations too.
Is there a way to only write model class and generate migration class automatically
?
Artisan is not able to detect changes…

Bob5421
- 7,757
- 14
- 81
- 175
1
vote
5 answers
Artisan Migrate Access Denied
I was setting up a Laravel environment. So, I downloaded XAMPP and configured my vhost files accordingly. Then, I setup MySQL and ran the following commands:
composer install
npm install
php artisan (to confirm I had artisan)
php artisan migrate…

Jenny Yu
- 11
- 1
- 4
1
vote
1 answer
Laravel artisan on GoDaddy won't accept any database users, why?
I have a laravel project on my Godaddy shared server and have been working on it for the past several weeks including running many 'php artisan migrate' commands. Inside my .env file I have been using the username and password of the entire cPanel.…

JamMan9
- 706
- 2
- 9
- 22
1
vote
1 answer
php artisan migrate command error : Illuminate\Database\QueryException : SQLSTATE[HY000] [2002] Connection refused
i am debian user
When I create a laravel project ( last version ) and run the php artisan migrate command , I'll face the following error :
With 5.4 version, I have no problem
Illuminate\Database\QueryException : SQLSTATE[HY000] [2002] Connection…

Mostafa Norzade
- 1,578
- 5
- 24
- 40
1
vote
2 answers
Add more column in existing table but it doesn't
$ php artisan migrate
In Connection.php line 647:
SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'users' alre
ady exists (SQL: create table `users` (`id` int unsigned not null auto_incr
ement primary key, `name` varchar(191)…

sam sam
- 13
- 4