0
votes

Is there a standard way in symfony + propel to manage changes to the database model in a situation where

  • the application has a number of separate variants (one for each specific customizations):

    core application: code + datamodel
    |- variant1: specific code + specific datamodel changes
    |- variant2: specific code + specific datamodel changes
    ...
    
  • mulitple developers work at separate parts of the application and therefore also at separate parts of the datamodel

Problems happen e.g. when parts of the datamodel are interdependent (foreign keys) and developers write migrations and oversee these inderdependencies. And since the variants are parallel to each other it becomes increasingly difficult and error prone to keep trak of and write migrations.

I know that this is a what management is all about, but I'm wondering whether there are automatic? ways (- or completely otherways not using propel or using subversion etc. to make checks) that make sure that problems are reduced, ideally to zero.

Basically, I would like to know if there are enterprise grade practices / standards for using symfony and ORM (for symfony 1.4 or 2; propel) that manage multiple developers + multiple variants of the application?

Thanks :)

1

1 Answers

0
votes

Propel2 supports parallel migration, means you can have different migration files in different development branches.

So you're just creating migration files based on your changes and new code as usual and commit all that stuff which results basically in having some migration files in branchA and other in branchB. When a branch will be merged to master you can just call the migrate:migrate command at master and are ready to go.

When you switch from branchB to branchA you need to make sure to downgrade the migration in branchB until you have the same base as branchA. Then switch the branch to branchB and do migrate:migrate.