Reputation: 2539
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 one big array/object or something). I left it running for 36 hours and it didn't end so I'm thinking I must have done something wrong. Does anyone have any idea why this might be happening? (I haven't worked with laravel/artisan much so I don't know the ins and outs, such as if there are log files or not, so any advice would be appreciated)
It was recommended I use
php artisan migrate:status
Not only did this spew out an array as before, but it also gave the following:
[InvalidArgumentException]
Command "migrate:status" is not defined.
Did you mean one of these?
migrate:reset
migrate:refresh
migrate:rollback
migrate:install
migrate
migrate:make
migrate:publish
Also, It should be noted that I'm using Laravel 4.2 and have inherited this site from someone else. I'm trying to figure out exactly what happened, but it looks like the migration issue might have been around before since even after I deleted the new migration and ran migrate it started spewing php out.
Upvotes: 1
Views: 1206
Reputation: 2539
So after talking with @Bogdan for a while we figured out it had nothing to do with any of the migrations themselves. There were no output messages in any of the migrations and all of the migrations had been 'completed' but it was still spewing out data. Even when running in pretend mode (php artisan migrate --pretend) we were getting problems.
The code itself was living on an external system which I was VPNing into. When using my local php I was getting the errors, but when I ssh'd into the server itself the problems stopped so we are assuming that it's a PHP version issue. (The server is 5.4 and I'm at 5.5)
Unfortunately, we don't have the time to downgrade my php to test that hypothesis since we did find a workaround, but I figured I'd put it on here in case people want to know. If I do get the time to downgrade php and/or if I find the solution I'll make sure to update this answer with what I did exactly in order to fix the issue.
Major kudos to @Bogdan for all your help. Although he didn't care about the points and so didn't want to answer the question so I can accept it, he spent about an hour or so with me trying to help debug this. So super thanks =)
Upvotes: 1
Reputation: 330
You have to paste us the code/errors that are being printed out when you run php artisan migrate, and also the code inside your migration.
I'm pretty sure your code is not good and you are getting some error. Also migrate:status doesn't exist.
Upvotes: 0