Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
migrate_plus
Commits
9e973308
Commit
9e973308
authored
Jan 03, 2020
by
jedihe
Committed by
heddn
Jan 03, 2020
Browse files
Issue
#2981906
by xurizaemon, jedihe: Document table destination plugin
parent
d2fa7fa3
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/Plugin/migrate/destination/Table.php
View file @
9e973308
...
...
@@ -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"
* )
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment