You are here

function migrate_example_wine_schema_table_source in Migrate 6.2

Same name and namespace in other branches
  1. 7.2 migrate_example/wine.install.inc \migrate_example_wine_schema_table_source()
2 calls to migrate_example_wine_schema_table_source()
migrate_example_update_6005 in migrate_example/migrate_example.install
Sample data for table destinations.
migrate_example_wine_schema in migrate_example/wine.install.inc
@file Set up for the wine (advanced) example.

File

migrate_example/wine.install.inc, line 573
Set up for the wine (advanced) example.

Code

function migrate_example_wine_schema_table_source() {
  return array(
    'description' => 'Source data to go into a custom Drupal table',
    'fields' => array(
      'fooid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'description' => 'Primary key',
      ),
      'field1' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'description' => 'First field',
      ),
      'field2' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'description' => 'Second field',
      ),
    ),
    'primary key' => array(
      'fooid',
    ),
  );
}