Reputation: 971
I have pushed my laravel installation to a web server. To make new migrations, do I need to make them locally and then push them to the appropriate folder on the web server, or is there another way to access the php artisan commands?
Upvotes: 1
Views: 642
Reputation: 8130
You can run php artisan as usual in your server assuming you deploy the artisan PHP file as well in your root. Running php artisan is literally running a single file called artisan
which will take the command/argument and do some necessary action.
php artisan make:migration add_votes_to_users_table --table=users
If you already have the migration files, just run:
php artisan migrate
Upvotes: 0
Reputation: 573
If you do not have migrations locally how can you test them?
Your migration files are part of you source code. You create them in development and they are added to version control. The moment you deploy your installation (With capistrano for example) you run the migrations with
php artisan migrate
This command is run from the root of your application.
Upvotes: 1