You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docs/parameters.md
+20Lines changed: 20 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,7 @@ Each parameter accepts:
12
12
-**type***(optional, default: `text`)*: One of `boolean`, `integer`, `text`, `decimal`, `path`.
13
13
-**default***(optional)*: A default value used for validation.
14
14
-**description***(optional)*: A human-readable description.
15
+
-**app_only***(optional, default: `false`)*: If `true`, the parameter can be changed freely when recreating the app. Standard parameters (`app_only: false`) must keep the same value across the entire module lifecycle (install, upgrade, create-app).
15
16
16
17
```yaml
17
18
parameters:
@@ -27,8 +28,27 @@ parameters:
27
28
- name: my_flag
28
29
type: boolean
29
30
default: true
31
+
32
+
- name: view_comment
33
+
type: text
34
+
default: my comment
35
+
description: Comment used when creating application views.
36
+
app_only: true
30
37
```
31
38
39
+
### Standard vs. app-only parameters
40
+
41
+
PUM stores the parameter values used during each migration in the `pum_migrations` table.
42
+
On every subsequent **upgrade**, **create app**, or **recreate app** call, PUM compares the
43
+
provided parameter values against the stored ones:
44
+
45
+
- **Standard parameters** (`app_only: false`, the default) must remain unchanged. If a
46
+
different value is provided, PUM raises an error. This protects structural values
47
+
(e.g. an SRID) that would cause data inconsistencies if changed after installation.
48
+
- **App-only parameters** (`app_only: true`) are allowed to change between calls. Use
49
+
this for values that only affect application-level objects such as views or comments,
50
+
which are dropped and recreated anyway.
51
+
32
52
## Passing values from the CLI
33
53
34
54
Parameter values are provided at runtime via the `-p` / `--parameter` flag, which takes a name and a value:
0 commit comments