Skip to content

Commit ead6ce3

Browse files
committed
feat: describe commands
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent 0d51def commit ead6ce3

1 file changed

Lines changed: 7 additions & 32 deletions

File tree

README.md

Lines changed: 7 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -23,44 +23,19 @@ The public API contract for this app is published as [openapi-full.json](https:/
2323

2424
Run the app commands from the Nextcloud stack root, not from the host PHP environment.
2525

26-
Export the current Profile Fields catalog and stored values:
27-
28-
```bash
29-
docker compose exec -u www-data -w /var/www/html nextcloud \
30-
php occ profile_fields:data:export \
31-
--output=/tmp/profile_fields-export.json
32-
```
33-
34-
Validate an import payload without writing anything:
35-
36-
```bash
37-
docker compose exec -u www-data -w /var/www/html nextcloud \
38-
php occ profile_fields:data:import \
39-
--input=/tmp/profile_fields-export.json \
40-
--dry-run
41-
```
42-
43-
Apply the non-destructive `upsert` import:
44-
45-
```bash
46-
docker compose exec -u www-data -w /var/www/html nextcloud \
47-
php occ profile_fields:data:import \
48-
--input=/tmp/profile_fields-export.json
49-
```
26+
| Command | Description |
27+
| --- | --- |
28+
| `occ profile_fields:data:export --output=/tmp/profile_fields-export.json` | Export the current Profile Fields catalog and stored values. |
29+
| `occ profile_fields:data:import --input=/tmp/profile_fields-export.json --dry-run` | Validate an import payload without writing anything. |
30+
| `occ profile_fields:data:import --input=/tmp/profile_fields-export.json` | Apply the non-destructive `upsert` import. |
31+
| `occ profile_fields:data:clear --definitions --force` | Clear app definitions explicitly before reimporting into the same environment. |
5032

5133
Notes:
5234

5335
- The import contract is versioned with `schema_version` and reconciles definitions by `field_key` and values by `field_key + user_uid`.
5436
- The first delivery is non-destructive: missing items in the payload do not delete existing definitions or values.
5537
- Validation is all-or-nothing. If the payload contains an incompatible definition or a missing destination user, no database write is performed.
56-
- For a restore in the same environment, clear app data explicitly before reimporting:
57-
58-
```bash
59-
docker compose exec -u www-data -w /var/www/html nextcloud \
60-
php occ profile_fields:data:clear \
61-
--definitions \
62-
--force
63-
```
38+
- For a restore in the same environment, clear app data explicitly before reimporting.
6439

6540
## Screenshots
6641

0 commit comments

Comments
 (0)