summaryrefslogtreecommitdiffstats
path: root/migrate.module
diff options
context:
space:
mode:
authorMike Ryan2009-09-18 15:02:16 +0000
committerMike Ryan2009-09-18 15:02:16 +0000
commit37a879dc37dec986625a51887eb8e70375ad259f (patch)
tree18b94e2c0213c79cd5118b52cc7b068315d8da80 /migrate.module
parent4855c4490e6ef4c51e8f216964c4732348404185 (diff)
Fix a couple of notices around base_database
Diffstat (limited to 'migrate.module')
-rwxr-xr-xmigrate.module14
1 files changed, 12 insertions, 2 deletions
diff --git a/migrate.module b/migrate.module
index 75079e0..3d1f8b5 100755
--- a/migrate.module
+++ b/migrate.module
@@ -134,7 +134,12 @@ function migrate_save_content_set(&$content_set, $options = array()) {
// Must do this to load the database
$view->init_query();
- $tabledb = $view->base_database;
+ if (isset($view->base_database)) {
+ $tabledb = $view->base_database;
+ }
+ else {
+ $tabledb = 'default';
+ }
$tablename = $view->base_table;
}
@@ -1054,7 +1059,12 @@ function migrate_schema_alter(&$schema) {
$view->init_query();
// TODO: For now, PK must be in base_table
- $tabledb = $view->base_database;
+ if (isset($view->base_database)) {
+ $tabledb = $view->base_database;
+ }
+ else {
+ $tabledb = 'default';
+ }
$tablename = $view->base_table;
db_set_active($tabledb);
$inspect = schema_invoke('inspect');