function wordpress_migrate_schema_attachment in WordPress Migrate 7.2
Same name and namespace in other branches
- 7 wordpress_migrate.install \wordpress_migrate_schema_attachment()
2 calls to wordpress_migrate_schema_attachment()
- wordpress_migrate_schema in ./
wordpress_migrate.install - @file WordPress migration module installation
- wordpress_migrate_update_7002 in ./
wordpress_migrate.install - Add the wordpress_migrate_attachment table.
File
- ./
wordpress_migrate.install, line 70 - WordPress migration module installation
Code
function wordpress_migrate_schema_attachment() {
return array(
'description' => 'Map original attachment URL to Drupal URI',
'fields' => array(
'blog_id' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'description' => 'ID of parent blog',
),
'original_url' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'description' => 'URL of attachment on WordPress',
),
'new_uri' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'description' => 'URI of attachment on Drupal',
),
'new_fid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => FALSE,
'description' => 'File ID of the attachment',
),
'parent_nid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => FALSE,
'description' => 'Drupal ID of the node this is attached to',
),
),
'primary key' => array(
'blog_id',
'original_url',
),
);
}