Questions tagged [artisan-migrate]

192 questions
1
vote
4 answers

Laravels Artisan::call('migrate:status') as json response

I want to get the migration status of my laravel app in a controller as json response and I try $migratiorns = \Artisan::call('migrate:status'); return response()->json($migratiorns); but \Artisan::call returns an integer 0. What should I use for…
fefe
  • 8,755
  • 27
  • 104
  • 180
1
vote
4 answers

php artisan migrate nothing to migrate error

I am trying to install this package on my server after installing everything when I try to migrate with php artisan migrate it tells me there is nothing to migrate. Also the migration table is not there. here is what I did: php composer.phar…
user8462164
1
vote
2 answers

How to get all models/migrations names in laravel and add single new column

I have 88 tables in the database and I need one new column in each the table one single solution is I make a migration and write 88 functions for all tables to add the new column as well as 88 to remove that column. Is there any way to get all the…
1
vote
1 answer

php artisan migrate command migrate error

While i run php artisan migrate. It will show the following error: [Illuminate\Database\QueryException] SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'translations' already exists (SQL: create table `translations` (` id` int…
1
vote
3 answers

Laravel artisan exception details

When I run artisan command, I get no error details, no stack and line numbers. is this normal? How can I know where is the error coming from? Thanks
SexyMF
  • 10,657
  • 33
  • 102
  • 206
1
vote
5 answers

Call to undefined method Illuminate\Database\Schema\MySqlBuilder::defaultStringLength()

Firstly i was getting an error in php artisan migrate as SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes and Then i found a post on laracasts to fix this as use…
Gags
  • 3,759
  • 8
  • 49
  • 96
1
vote
1 answer

Duplicate column name Laravel

I'm creating migration in Laravel and when I run command php artisan migrate the command give me the following error Duplicate column name 'user_id' ('id' int unsigned not null auto_increment primary key, 'user_id' int unsigned not null, 'user_id'…
Devmasta
  • 513
  • 2
  • 14
  • 38
1
vote
1 answer

Extend Laravel's Default Commands or Block them on production?

There are a few Artisan commands that I do not want to be run on production. For example, I would like to block the use of php artisan migrate:reset on production. I would like to completely block this command OR Update the template artisan uses…
zechdc
  • 3,374
  • 9
  • 40
  • 52
1
vote
2 answers

How to solve : Class 'AddSourceInClotureTable' not found in laravel 5.2

I'm using Laravel 5.2.45 on a PHP 5.6.16 server. When using php artisan migrate:refresh / migrate:reset command, I get this error : [Symfony\Component\Debug\Exception\FatalErrorException] Class 'AddSourceInClotureTable' not found Note that…
iizno
  • 829
  • 1
  • 9
  • 28
1
vote
1 answer

Laravel 5.2 Validator: limiting unique field check to specific user

I am trying to limit the required:unique validator in my Laravel 5.2 app to checking uniqueness of my 'slug' column against only the table results of a specific user_id. In other words, the slug does need to be unique, but only on a per-user basis.…
Luc Boone
  • 75
  • 1
  • 5
1
vote
1 answer

Lumen (Laravel): "Access denied for user 'forge'@'localhost'" when running "php artisan migrate:install"

Running through a Lumen tutorial that was written a year ago and several versions prior to the latest version of Lumen. I've created an .env file which contains MySQL credentials for my project however when I attempt to run this: php artisan…
sparecycle
  • 2,038
  • 5
  • 31
  • 58
1
vote
1 answer

Mysql Server running but Artisan in Laravel project doesn't think so

So, I have recently installed Mysql Server in my Macbook (Mac OS 10.11) and I also installed Mysql Workbench and it works great! The problem comes when I want to migrate form a Laravel Project using Php Artisan, every time I run the php artisan…
andres.gtz
  • 624
  • 12
  • 22
1
vote
1 answer

Laravel 5.1 php artisan migrate with error message PDOException could not find driver

I'm trying to connect to the PostgreSQL database through laravel in order to make a php artisan migrate , but I get the error [PDOException] could not find driver looking at similar questions found there to enable extensions in php.ini but did not…
Steph27
  • 31
  • 4
1
vote
1 answer

Git - Ignore Removal

Long story short, I have a Laravel 4 project with a folder full of migrations. I am unsure whether the migrations are actually consistent with the current state of the database, and so is my client, who therefore instructed me not to write…
1
vote
2 answers

Laravel artisan migration spews php information

I have a migration I'm trying to run. I was able to create it using: php artisan migrate:make name_of_migration The files show up properly and everything, but when I try and run php artisan migrate I just get a bunch of php spewing out (Looks like…
Aram Papazian
  • 2,453
  • 6
  • 38
  • 45