I removed a table from my local database and pushed the changes onto github, when trying to deploy the changes onto laravel forge i get an error saying we are unable to deploy the server. How do i make the changes on my server. Do i have to ssh into my server or does everything have to be done on my local machine. What do I have to do to remove table and get my server running again?
here the error:
Sun Jan 26 19:25:36 UTC 2020
From github.com:mkesha/project-vo
* branch master -> FETCH_HEAD
2e774fb..651c301 master -> origin/master
error: Your local changes to the following files would be overwritten by merge:
vendor/composer/autoload_classmap.php
vendor/composer/autoload_static.php
Please commit your changes or stash them before you merge.
Aborting
Updating 2e774fb..651c301
You are getting this message because your Forge deploy script is trying to execute a pull request but Git is throwing a warning resulting in your deploy script failing. You must have changed some of the files on your server for Git to throw this warning. The pull request is failing to avoid overwriting these changes.
I had a similar situation with Forge after compiling my application assets for production on my server. I resolved the issue by adding this line to my deploy script before the pull request and compiling assets later in the script:
## Warning: This will reset local changes!
git reset --hard
git pull origin master
#...rest of the script below...
Before running git reset --hard
on your server, please make sure you understand what it does: Your local changes will be lost forever.
This should resolve your deploy error.
Now if you want to remove a table from your application database (on Forge or any server), you should create a migration just to drop the table.
Schema::dropIfExists('users');
See Laravel documentation: https://laravel.com/docs/5.8/migrations#renaming-and-dropping-tables