For the Demo Profile, it would be great if we could get the table prefix so there's no conflict with settings.php during restore. So it would be great if the table prefix was saved in the .info file during backup.

CommentFileSizeAuthor
#4 db_prefix.patch1.14 KBRobLoach
#1 infoprefix.patch1.14 KBRobLoach
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

RobLoach’s picture

Status: Active » Needs review
FileSize
1.14 KB

This patch saves and loads the db_prefix with the .info file.

sun’s picture

erm - just add db_prefix to the .info file is sufficient for you? Does this work already? And, how is this information used by the profile? Does it replace the manually supplied db_prefix upon install?

RobLoach’s picture

Status: Needs review » Needs work

Haven't had a hack at it yet. It would need the table prefix, and then the installer would rewrite the settings.php with what the database dump used for the table prefix. Not quite sure if it works yet. If you have a hack at it, wicked! ;-)

RobLoach’s picture

FileSize
1.14 KB

Although having the database prefix in the info file is handy (patch updated to DRUPAL-6--1), it won't work for Demonstration Site Install Profile because Drupal has you create the database before configuring the install profile. We don't know which database dump the person will be using at the time that the database configuration screen.

I believe the way around this would be to abstract the database prefix out of the MySQL dump file itself in Demonstration Site module and have it inject it back in on restore. This way, you could restore to database dumps with different database prefixes, even when the site's prefix is different.

Thanks!

Leeteq’s picture

Version: 6.x-1.x-dev » 8.x-1.x-dev

Edit: sorry, wrong issue, but moving to 8.x anyway :P

Anybody’s picture

For Drupal 7 the latest .dev - Version works fine for me. Just as hint if you have any problems with broken dumps.

gaurav.kapoor’s picture

Version: 8.x-1.x-dev » 7.x-1.x-dev
Issue summary: View changes
gaurav.kapoor’s picture

Status: Needs work » Closed (outdated)