Quantcast
Channel: Drupal Groups - database
Viewing all articles
Browse latest Browse all 29

Database Version Control with Git

$
0
0

I need help understanding the workflow for database version control because what I am doing now is not working.

When I am on a branch (1), and about to commit, I do a Drush @alias sql-dump, which creates a dump file in a particular directory in my repo and uses a specific name, per instructions in the aliases.drushrc.php file. Then I commit and the sql-dump is added to the commit. I see the messages and everything is working fine.

Then I create another branch(2) and do some work, I know I am working on the same SQL database, but I have made some changes to it. I do a sql-dump and commit the changes for this branch (2).

Then I go checkout the first branch(1). When I look in the working directory, only shows the sql-dump I just made before switching Branch(2)! It has the timestamp of the branch(2) sql-dump. The branch(1) sqldump file has been overwritten it seems and is nowhere to be found.

I have tried everything I know. When I checkout differnet branches, I expect the sql-dump file to have the same name, but different timestamps and they don't.

If I sqlc < path/sqldump.sql it only confirms that I am on the last sql-dump, not the one I saved with the git commit.

I am stumped.


Viewing all articles
Browse latest Browse all 29

Trending Articles