function disqus_migrate_update_6101 in Disqus 6
Drops the export table, adds a more useful and multi-purpose table
File
- ./
disqus_migrate.install, line 78 - The install and update hooks for the Disqus module.
Code
function disqus_migrate_update_6101() {
$schema['disqus_migrate'] = array(
'description' => 'Holds associations of Disqus comment IDs to Drupal Comment IDs.',
'fields' => array(
'did' => array(
'description' => 'The primary identifier for the Disqus comment.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
),
'dtid' => array(
'description' => 'The Disqus thread ID that the comment belongs to.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
),
'nid' => array(
'description' => 'The current {node}.nide node identifier.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'cid' => array(
'description' => 'The current {comments}.cid comment identifier.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
),
'primary key' => array(
'did',
),
);
$ret = array();
if (db_table_exists('disqus_migrate_export')) {
db_drop_table($ret, 'disqus_migrate_export');
}
if (!db_table_exists('disqus_migrate')) {
db_create_table($ret, 'disqus_migrate', $schema['disqus_migrate']);
}
return $ret;
}