Questions tagged [artisan-migrate]

192 questions
3
votes
3 answers

Stop artisan from asking "Do you really wish to run this command?"

I'm new in using Laravel 4, running it in my localhost. I would like to know how can I make artisan skip the question asking Do you really wish to run this command? every time I execute migration command? I would just like to execute command…
Jed
  • 1,664
  • 8
  • 33
  • 65
3
votes
1 answer

Laravel Artisan command on database connection

I'm working on a projects where I've multiple database connections. I'm able to run artisan command from my controller like Artisan::call('migrate', array('--path' => 'app/database/migration')); However this runs on my default database connection…
3
votes
1 answer

Laravel Migration Two table foreign key dependencies

I have two tables (employees and also regions), I am trying to create it using migration, unfortunately it wont let me, I am getting : [Illuminate\Database\QueryException] SQLSTATE[HY000]: General error: 1215 Cannot add foreign key constraint…
rfpdl
  • 956
  • 1
  • 11
  • 35
2
votes
2 answers

How to build Laravel + PostgreSQL project?

I want to build Laravel + PostgreSQL existing Project. config.php 'pgsql' => [ 'driver' => 'pgsql', 'url' => env('DATABASE_URL', "pgsql://postgres:123@127.0.0.1:5432/crawler"), 'host' => env('DB_POSTGRES_HOST',…
2
votes
0 answers

Laravel migrations for testing suite

When I run the below command locally it should refresh my testing database using the latest seeders however it runs on my app database. php artisan migrate:fresh --seed --env=testing I have also tried php artisan --env=testing migrate:fresh --seed I…
J Foley
  • 1,038
  • 1
  • 17
  • 30
2
votes
2 answers

Docker - Laravel Artisan

I use this repo https://github.com/aschmelyun/docker-compose-laravel for my laravel but when I'm using the command "docker-compose run --rm artisan migrate" it gives me an error. Traceback (most recent call last): File "docker\utils\build.py",…
2
votes
2 answers

Laravel 5.8 php artisan migrate throwing error: Illuminate\Database\QueryException

I am using: php 7.2 laravel 5.8 ubuntu 19 php artisan migrate throwing this error: **Illuminate\Database\QueryException : could not find driver (SQL: select * from information_schema.tables where table_schema = laraveldb and table_name =…
Amar
  • 21
  • 5
2
votes
5 answers

Illuminate\Database\QueryException : could not find driver Error

I have an error when trying to execute the command php artisan migrate on my Windows command prompt I've already tried many solutions from the internet by uncommenting extension=pdo_mysql in my php.ini configuration on Xampp but it still not…
Miyuki Ouka
  • 25
  • 1
  • 6
2
votes
5 answers

Run php artisan from one Laravel install to another

We have a Laravel deployment website set up under deploy.mysite.com which handles deployments for a multitude of other websites. One other website I'm trying to deploy which is also a Laravel site resides under site2.myothersite.com. Both are on the…
Novocaine
  • 4,692
  • 4
  • 44
  • 66
2
votes
5 answers

php artisan migrate stuck at the beginning of the command

[MacOS 10.14.0] When I create a new project (Laravel new blog) Then create a table in MySQL (create database blog) And then update my .env file with the correct userame, password and database. After creating a project, I will run php artisan…
UNTITLED.PNG
  • 471
  • 1
  • 5
  • 12
2
votes
2 answers

laravel artisan migrate give Mcrypto error in php 7.2 (CLI)

I have new in laravel I have set up laravel 5.5 in my system and its installed but when i start to use php artisan migrate its give error Mcrypt PHP extension required But when I run the phpinfo on browser there is mcrypt enable but its show the…
Priyanka Sankhala
  • 808
  • 1
  • 9
  • 25
2
votes
2 answers

Artisan Call in Loop

I have a custom console command that needs to loop through some companies and make a database for each. The command works now, but only once. It does not run the migration the second time around in the loop. So basically if I have 2 blank DBs…
Packy
  • 3,405
  • 9
  • 50
  • 87
2
votes
1 answer

A non-numeric value encountered Laravel5.5 on Migration

I am getting this error [ErrorException] A non-numeric value encountered when I give an artisan command php artisan migrate:fresh --seed. This issue arised when I upgraded to php 7.1 in xammp. When I am not seeding the error does not occur. Below is…
muya.dev
  • 966
  • 1
  • 13
  • 34
2
votes
0 answers

Interface 'Throwable' not found when I migrate the table Laravel

I want to migrate table in Laravel Framework. But when I migrate the table the following bug appears. artisan migrate I have tried all solutions in stackoverflow, but anything doesn't work. In .env file, I have set all the values correctly. I…
Roman M.
  • 101
  • 1
  • 11
1 2
3
12 13