symfony1 - Different databases for specific branches of git project -


We have several branches of a project that share approximately half the code and develop them simultaneously with GIT checkout . Now, the problem came when the model became so different, it is no longer possible to keep the same database for its development. I could specifically specify the database name in config / databases.yml for each branch, but it has not been tracked. For example, there would be another solution to track some external files with config / branch.txt, and refer to it in config / database.yml:

  all: Principle: class : SfDoctrineDatabase param: Dsn: 'pgsql: host = localhost; Dbname = & lt ;? Php echo file_get_contents (actual path (__dir__. '/branch.txt'))? & Gt;   

Still, how do you deal with this?

What is usually done in the branch to manage the same file with different content

  • Always use (e.g.) to keep the local version

  • or >

    • Use the file with a config / databases.yml.tpl .
    • A ' blur / code>' script (versioned)
    • ) that is a full config / database.iml < / Code> > smudge / clean

      The script and the template file is always the same from the branch branch (no merge is released ).
      As a result, config / database.yml is private, version no.

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -