Skip to content

Commit 8fed43f

Browse files
authored
Added documentation for env function in migrations (#2441)
* Added documentation about env function for migrations * Changed from tag names to function names
1 parent ce57c0b commit 8fed43f

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

docs/content_management/data_migration/importing_data.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,22 +157,35 @@ Built-in expression language functions that are tagged with `ibexa.migrations.te
157157
value: '###XXX to_string(123) XXX###'
158158
```
159159

160-
- `ibexa.migrations.template.reference` - references a specific object or resource within your application or configuration. Learn more about [migration references](managing_migrations.md#references).
160+
- `reference` - references a specific object or resource within your application or configuration. Learn more about [migration references](managing_migrations.md#references).
161161

162162
```yaml
163163
- fieldDefIdentifier: some_field
164164
languageCode: eng-US
165165
value: '###XXX reference("example_reference") XXX###'
166166
```
167167

168-
- `ibexa.migrations.template.project_dir` - retrieves the project's root directory path, for example to construct file paths or access project-specific resources.
168+
- `project_dir` - retrieves the project's root directory path, for example to construct file paths or access project-specific resources.
169169

170170
```yaml
171171
- fieldDefIdentifier: project_directory
172172
languageCode: eng-US
173173
value: '###XXX project_dir() XXX###'
174174
```
175175

176+
- `env` - retrieves the value of an environmental variable.
177+
178+
```yaml
179+
-
180+
type: user
181+
mode: update
182+
match:
183+
field: login
184+
value: admin
185+
metadata:
186+
password: '###XXX env("ADMIN_PASSWORD") XXX###'
187+
```
188+
176189
#### Custom functions
177190

178191
To add custom functionality into Migration's expression language declare it as a service

0 commit comments

Comments
 (0)