Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#4 | db_prefix.patch | 1.14 KB | RobLoach |
#1 | infoprefix.patch | 1.14 KB | RobLoach |
Comments
Comment #1
RobLoachThis patch saves and loads the db_prefix with the .info file.
Comment #2
sunerm - 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?
Comment #3
RobLoachHaven'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! ;-)
Comment #4
RobLoachAlthough 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!
Comment #5
Leeteq CreditAttribution: Leeteq commentedEdit: sorry, wrong issue, but moving to 8.x anyway :P
Comment #6
AnybodyFor Drupal 7 the latest .dev - Version works fine for me. Just as hint if you have any problems with broken dumps.
Comment #7
gaurav.kapoor CreditAttribution: gaurav.kapoor commentedComment #8
gaurav.kapoor CreditAttribution: gaurav.kapoor commented