Created
September 22, 2014 10:40
-
-
Save DavidHernandez/b71b27c4170ac65e5a5a to your computer and use it in GitHub Desktop.
A little script to install some Drupal tables. It could be a drush command, but I'm feeling lazy...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Module name | |
| $module = ''; | |
| // List of tables to install | |
| $tables = array(''); | |
| $schemas = drupal_get_schema_unprocessed($module); | |
| foreach ($schemas as $key => $schema) { | |
| if (!in_array($key, $tables)) { | |
| unset($schemas[$key]); | |
| } | |
| } | |
| _drupal_schema_initialize($schemas, $module, FALSE); | |
| foreach ($schemas as $name => $table) { | |
| db_create_table($name, $table); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment