Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
What is the right way to reinstall a few tables (I've deleted them because I am using multisite installation) but now I can't get language switcher (and language detection) work. So I need to bring them back.
The right way would be to restore your backed up version of the database, or at least restore the backup to a temporary database so you can inspect both and merge the changes
If you've deleted the tables then any data will be lost (unless you've got a backup). But if you just need the tables to exist in their original state, just install Drupal quickly into another database and copy the tables across. There are ways to do it using the API if that's not an option
Personally I'd use drupal_install_schema(), and call MODULENAME_schema(), where MODULENAME is the name of the module responsible for implementing the table you're trying to restore. For example to reinstall the session table it would be something like: $schema = system_schema(); drupal_install_schema($schema['sessions']);
ve deleted them. So isn
t there any other way then just back up those tables?drupal_install_schema()
, and callMODULENAME_schema()
, whereMODULENAME
is the name of the module responsible for implementing the table you're trying to restore. For example to reinstall the session table it would be something like:$schema = system_schema(); drupal_install_schema($schema['sessions']);