Commit 9e973308 authored by jedihe's avatar jedihe Committed by heddn
Browse files

Issue #2981906 by xurizaemon, jedihe: Document table destination plugin

parent d2fa7fa3
......@@ -19,6 +19,53 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
*
* Use this plugin for a table not registered with Drupal Schema API.
*
* Examples:
*
* @code
* destination:
* plugin: table
* # Key for the database connection to use for inserting records.
* database_key: roads_db
* # DB table for storage.
* table_name: roads
* # Maximum number of rows to insert in one query.
* batch_size: 3
* # Fields used by migrate to identify table rows uniquely. At least one
* # field is required.
* id_fields:
* name:
* type: string
* suburb:
* type: string
* ward:
* type: string
* # Mapping of column names to values set in migrate process.
* fields:
* name: name
* owner: owner
* suburb: suburb
* ward: ward
* type: type
* @endcode
*
* For numeric id fields, migrate can generate the values on-the-fly, by
* enabling use_auto_increment; in such case, the id field may be ommitted from
* the 'fields' section:
*
* @code
* destination:
* plugin: table
* # ...
* id_fields:
* my_id_field:
* type: integer
* use_auto_increment: true
* # ...
* fields:
* non_my_id_field_1: non_my_id_field_1
* non_my_id_field_2: non_my_id_field_2
* @endcode
*
* @MigrateDestination(
* id = "table"
* )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment