Skip to content

Commit 93275a7

Browse files
committed
Document PERMISSION table handling in v4 migration guide
Signed-off-by: nscuro <nscuro@protonmail.com>
1 parent cc27cec commit 93275a7

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

docs/guides/administration/migrating-from-v4.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,8 @@ v4-migrator bootstrap \
145145
--target-pass
146146
```
147147

148-
After this, the target has the v5 schema but no rows.
149-
The migrator's later phases populate `PERMISSION`, `LICENSE`, `TEAM`, etc. directly from your v4 source.
148+
After this, the target has the v5 schema and a seeded `PERMISSION` catalog (the well-known set of v5 permissions).
149+
No other rows are written by bootstrap; the migrator's later phases populate `LICENSE`, `TEAM`, `USER`, and the rest from your v4 source.
150150

151151
### 2. Verify the target
152152

@@ -162,7 +162,7 @@ v4-migrator verify \
162162
`verify` reads but never writes. On a freshly bootstrapped target with no staging present, expect:
163163

164164
- Schema version `202605111028` reported `OK`.
165-
- All row count columns zero.
165+
- All row count columns **except for the v5 `PERMISSION` table** zero.
166166
- No probe entries.
167167

168168
### 3. Dry run
@@ -505,6 +505,8 @@ v4-migrator bootstrap --target-url ... --target-user ... --target-pass
505505
v4-migrator load --target-url ... --target-user ... --target-pass
506506
```
507507

508+
`bootstrap` re-seeds the v5 `PERMISSION` catalog after applying the schema, so the rerun of `load` can resolve permission foreign keys without re-running `transform`.
509+
508510
!!! warning
509511

510512
Don't manually `TRUNCATE` individual v5 tables and re-run `load`.

docs/tutorials/rehearsing-the-v4-migration.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ Applying v5 Flyway schema up to 202605111028
147147
Bootstrap complete. Flyway head = 202605111028. Run 'extract' or 'run' next.
148148
```
149149

150-
After this, the target has the v5 schema but no rows.
150+
After this, the target has the v5 schema but no rows, **except in the `PERMISSION` table**.
151151

152152
## Verifying the empty target
153153

@@ -180,7 +180,7 @@ Expected output:
180180
13 CHECK constraint(s) hold across 55 loaded table(s)
181181
```
182182

183-
If the schema version is anything else or any row count is non-zero,
183+
If the schema version is anything else or any row count is non-zero, **except in the `PERMISSION` table**,
184184
the rest of the rehearsal will not work.
185185

186186
## Dry-running the migration

0 commit comments

Comments
 (0)