Search code examples
phpdrupal-7

Database schema migration strategy for drupal 7


I am new to this topic and I don't know how Drupal 7 works on these directions.

Questions:

  1. Are there any strategies to run database schema migrations like Symfony have Doctrine Migration Bundle?
  2. How to safely update your database schema both locally and on production in drupal 7?
  3. Since this is going to be like multi-branching strategies, how to keep everything updated?
  4. How about multi-siting?

Thanks


Solution

  • Answers on questions:

    1. Drupal has migration modules. Will you migrate to Drupal 8(No answer need)?
    2. No safety update for database(More bellow);
    3. You will start new project with Drupal 8 version than you could apply this strategy as usual;
    4. If you mean sub domains migration modules provide migration for that database what you indicate. You can make it for all your multi-site databases one by one.

    How migration from Drupal 7 to Drupal 8 goes.

    1. Start new project on Drupal 8 core(on new server).
    2. Find all contrib Drupal 7 modules, libs and themes versions on Drupal 8.
    3. Transfer your data by migration module (migration,migration plus and more others). This is the main part of migration. Make custom modules with custom source plugins and YUML files for it.
    4. Refactor your custom modules and themes, than use them at your new Drupal 8 site.