Git branching and migrations

Hi,

Scuse my bad english. I will try to be as clear that I can.

I have a question about Rails migration and git branching model.

My case:

I develop an API with Rails. I have lot of tables and therefore lot of migrations.

I should create a new feature in my API which will introduce 1 year of development. I also should continue to add features to my main product.

I create a branch for my long time development. I have a branch A for my actual development and branch B for the feature.

I add migrations in both branches.

Now I deploy my branch A to the production. The migration version in branch A is higher than version in branch B.

When I will merge, the migrations of branch B will never be applied since their timestamp is older than those of my branch A.

Do you know a solution to my case?

Thank you.

Now I deploy my branch A to the production. The migration version in branch A is higher than version in branch B.

When I will merge, the migrations of branch B will never be applied since their timestamp is older than those of my branch A.

That’s not true. rails will run all migrations not previously run (ie their timestamp is not in the schema_migrations table) in the order given by their timestamp

Fred