0

I have scenario in which I am using Cross DB connection on my Drupal 7 Site, I specified my DB connection in settings.php file. Second DB is used as a source db.

Can I use Deployment Module to deploy updates on my default drupal DB only or can also deploy updates on second DB too?

1 Answer 1

0

I tried and got this solution, sharing with you all

While using hook_update_N() in your deployment module - .install file, you have to active the DB for which you want to deploy the changes. I tried it on my server and it works, I am sharing a piece of code, have a look:

function hook_update_N(&$sandbox){ 
db_set_active('dbsourcekey'); 
variable_set('clean_url', 0); 
variable_set('site_403', 'access-denied'); 
db_set_active('default'); 
} 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.