Support the ongoing development of Laravel.io →
posted 9 years ago
Database
Last updated 2 years ago.
0

Hi rvs1977,

All migrations files, older or not, have a reference in the migrations table of your database to maintain the execution order of these files.

You need to be sure that the migration that you delete is working in another later migration because the steps that you references on this could be lost then you will have an incomplete database.

If you decide delete the older migration you need to make changes also in the migraton table of your database (but it is a risk own decision).

Hope it helps you.

Last updated 2 years ago.
0

First, you create your 2014_05_09_223908_create_users_table migration and work on it until it fits your needs using the rollback command. Then you somehow deploy your new migration file and run the migrations.

If, later down the line, you then want to modify the users table you just create another migration, maybe 2014_07_11_223908_add_dob_column_to_users_table. That migration might only add a column or rename a column. Doesn't really matter. Point is that the original users table migration stays untouched. No need to delete it.

Last updated 2 years ago.
0

Thx to both of you. Now it make sense to me.

The clue for me was that you create a table once, and then modify it later on.

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

rvs1977 rvs1977 Joined 11 May 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.