Closed jeroenverfallie closed 9 years ago
ConfideSetupUsersTable
assumes that you are creating a new table. If you are not, then you should change the up
behavior and also the behavior of down
to alter your table back to its previous state.
I don't think you understood correctly.
I changed my up method, and my down method. But the rollback is using the down method of the internal file, and not mine, while the up is.
That's the real issue here.
When setting up confide, I generated the migration as explained in the readme.
However, because I already had a users table, with foreign keys, I modified the migration file to add fields, and drop them in the
down()
method.I like to test all my migrations in both ways, and when doing so, I discovered the rollback of this migration tries to drop the
users
table, instead of dropping the columns I specified.Using a
migrate:rollback --verbose
, I noticed the rollback is using the file invendor/zizaco/confide/migrations/
- How can I prevent this behaviour? Is there a reason for this?