Win a copy of Machine Learning with R: Expert techniques for predictive modeling this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

Error on migration:rollback that should drop a column- Using Laravel Homestead & SQlite

Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ranchers,

I'm getting an error on running "php artisan migrate:rollback" in Git Bash that should drop a column.

I've already ran:
1. composer require doctrine/dbal
2. composer update
3. I even tried "composer dump-autoload"

When I check on the database schema using: "sqlite3 database/database.sqlite" the table contains all the columns (including the one called "excerpt" which is the rogue one that should be dropped) but on running the rollback I get the error that the column isn't published. See below.

(Environment: laravel 5.3- Homestead, Gitbash, Sublime Text3, SQlite3)

The error is as follows:

My database schema is as follows:

The Migration that created the column is as follows:

How do you solve this so that you can seamlessly drop columns using migrate:rollback?
Mwaura Raymond
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I resorted to using a mysql database which runs flawlessly within the homestead virtual box. Just remember:

1. Log into the homestead box: "mysql -u homestead -p "   (enter "secret" when prompted for the password on the next line- it's masked)

2. Create your own database:  "create database your_database_name;"

and set this as the database name on your .env file, for example:

Oh. And when you create the articles migration, make a few changes as follows:


//Notice I've added nullable to the defined timestamp, this will make the migration work otherwise you'll get the following error on running php artisan migrate

//Notice I've removed the underscore for published_at to read simply publishedat; this will save you a ton of grief when you get to the Eloquent stage, your Article object simply won't save(); and thus won't be committed to the database.

And if you're using Git Bash you can head over here "" for some useful commands such as viewing your database tables and such.
Did you just should on me? You should read this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!