phinx icon indicating copy to clipboard operation
phinx copied to clipboard

Is there a way for multiple developers to use the same phinx database?

Open billystalnaker opened this issue 9 years ago • 7 comments

We have our setup like this: Each developer has there own server to develop on, but we share the same database. When I try to migrate and rollback a phinx script, and another dev has created one before me, it will not allow me to rollback my script because their script does not exist in my file structure. Error is: Target version (20171006100001) not found . How can we get around this? Is it normal for multiple developers to use phinx at the same time?

billystalnaker avatar Oct 09 '17 18:10 billystalnaker

Afaik each developer (locally) has his own DB for this to work. Why are you sharing the same DB?

dereuromark avatar Oct 09 '17 18:10 dereuromark

We share databases to keep data integrity, and to limit resources needed. I'm not sure what you mean by "each developer (locally) has his own DB".

billystalnaker avatar Oct 09 '17 18:10 billystalnaker

On your own server you have a test-clone of the actual master-database. That is how the migrations are supposed to work.

dereuromark avatar Oct 09 '17 18:10 dereuromark

I was unaware that phinx created a local database.. I knew it created a table called phinxlog in the server's database.

billystalnaker avatar Oct 09 '17 18:10 billystalnaker

What @dereuromark is trying to say is that each developer should have a copy of database on its computer and work on that. Otherwise you cannot possibly do a development on branches that each needs a different schema.

mvrhov avatar Oct 10 '17 06:10 mvrhov

#1197

gotoin avatar Oct 13 '17 05:10 gotoin

Closing as duplicate then.

dereuromark avatar Oct 13 '17 07:10 dereuromark