Reputation: 2023
I've spend two days reading questions on SO, blog posts, forums, etc.
Most of that information, it's old.
I'm building a site on my Ubuntu box using Drupal 7 (with Drush) and GitHub for repo hosting. I have SSH access to the production server.
After I deliver the first version of the site, I'm gonna have to add features and fix bugs.
A friend told me to store my SQL file on the repo, and go from there.
My question is: what's the best approach? Is there a good practice advise about this?
Thanks!
Upvotes: 1
Views: 761
Reputation: 4194
Deployment in Drupal is a complex subject, because Drupal itself doesn't have a good answer for the general topic of configuration management. A major initiative has made significant progress for Drupal 8 to get it there, but for now, we deal with the awkwardness of content and configuration both stored in the database.
At bare minimum, you will need the database dump for content. From there, it becomes an entire series of potential essays. Just to touch on a few:
You can dump your SQL into the repository, but we don't find it necessary since all configuration we care to version is exported to code. So the SQL dump really amounts to a backup.
Upvotes: 0
Reputation: 1487
I'm not a Drupal expert, but in general database deployments are tricky - especially if you end up with test and prod environments because changes end up needing to be ordered. I recommend using some form of "master script" that executes the database updates you need. We wrap ours with queries that ask the database what version are you on, and applies only new sql updates.
Upvotes: 1