migrate_extras.install in Migrate Extras 6
File
migrate_extras.install
View source
<?php
function migrate_extras_schema() {
$schema['migrate_extras_node_map'] = array(
'description' => t('Optional master node map table.'),
'fields' => array(
'sourceid' => array(
'description' => t('Source id of the node.'),
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'destid' => array(
'description' => t('Node ID of the imported node.'),
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
),
),
'primary key' => array(
'sourceid',
),
'indexes' => array(
'idkey' => array(
'destid',
),
),
);
return $schema;
}
function migrate_extras_install() {
drupal_install_schema('migrate_extras');
}
function migrate_extras_uninstall() {
drupal_uninstall_schema('migrate_extras');
}
function migrate_extras_update_6000() {
$ret = array();
$schema = migrate_extras_schema();
foreach ($schema as $tablename => $tabledef) {
if (!db_table_exists($tablename)) {
db_create_table($ret, $tablename, $tabledef);
}
}
return $ret;
}