Reputation: 5085
I am joining an existing project and have been asked to enable GIT revision control. This is the first time I am setting up a version control system myself and am having slight difficulty in understanding how the database fits into the grand scheme of the project.
It's a Drupal project and has already been hosted online. The db server resides online and hence Drupal connects to this database.
Do I need a local copy of this database? Or I should go ahead and push changes on the main db existing on the server. This is a naive question, but I want to ensure this.
Mostly, I am finding it a little difficult to comprehend version control and how databases fit into the puzzle. Since version controls essentially push and rollback changes depending upon commits, do the changes that take place to a database rollback if a file isn't allowed to be committed or canceled?
Anyone willing to shed some light on this?
Thanks much!
Upvotes: 1
Views: 77
Reputation: 301037
Your question is not really clear, but you should be looking at versioning sql scripts ( rather than the db themselves - version control is for code) and using some tool like dbdeploy
etc to manage the db and such things like rollback etc are out of scope of versioning tools.
Upvotes: 2
Reputation: 14694
Databases are not typically version-control friendly. Standard practice is to keep your code in version control and to keep the database backup solution separate, usually by using the backup tools built into the database engine.
Upvotes: 2