-
-
Notifications
You must be signed in to change notification settings - Fork 81
/
MigrationDefinitions.yml
52 lines (50 loc) · 3.11 KB
/
MigrationDefinitions.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
-
type: migration_definition
mode: generate
migration_type: string # content, content_type, etc...
migration_mode: string # create, update, delete
file: string # path to the file to be generated. NB: if not set, no file is generated at all, and only references are set.
# The filename must end with an extension of either .yml or .json
match:
type: xxx # depending on the migration_type, eg: content_id
value: yyy
# The list in references tells the manager to store specific values for later use by other steps in the current migration.
# NB: these are NEW VARIABLES THAT YOU ARE CREATING. They are not used in the current migration step!
references:
# short syntax:
referenceId: attributeId # (possible values and meaning are explained for the 'long syntax')
# long syntax:
-
identifier: referenceId # A string used to identify the reference
attribute: attributeId # This can be either the keyword 'definition', in which case the whole definition will be saved,
# or a selector identifying a subset, eg: '[0].name_pattern'
# For syntax, see: http://jmespath.org/tutorial.html, http://jmespath.org/specification.html#grammar
overwrite: true|false # Optional, default false. If not set, and the reference already exists, an exception is thrown
if: # Optional. If set, the migration step will be skipped unless the condition is matched
"reference:_ref_name": # name of a reference to be used for the test
_operator_: value # allowed operators: eq, gt, gte, lt, lte, ne, count, length, regexp, satisfies
-
type: migration_definition
mode: save
migration_steps: # an array of steps. References will be resolved recursively. Ex:
-
type: content
mode: update
match: { location_id: 2 }
attributes: { }
- etc...
# If you want to use the string 'reference:something' in the _generated_ migration, at the moment you need to
# use a workaround: define a reference in the current migration which resolves to the string 'reference:something',
# as is done in the test file UnitTestOk038_migrationdefinition.yml
file: string # path to the file to be generated. Mandatory.
# The filename must end with an extension of either .yml or .json
if: # Optional. If set, the migration step will be skipped unless the condition is matched
"reference:_ref_name": # name of a reference to be used for the test
_operator_: value # allowed operators: eq, gt, gte, lt, lte, ne, count, length, regexp, satisfies
-
type: migration_definition
mode: include
file: string # path to the migration definition file to be included. Mandatory. References will be resolved
if: # Optional. If set, the migration step will be skipped unless the condition is matched
"reference:_ref_name": # name of a reference to be used for the test
_operator_: value # allowed operators: eq, gt, gte, lt, lte, ne, count, length, regexp, satisfies