CLI: explicit 'paskia migrate' subcommand for legacy conversion

Serve never converts databases: with no paskia.kantadb it points at
'paskia init', or at 'paskia migrate' when legacy *.paskiadb candidates
exist. migrate converts a lone candidate, or the one named by --rp-id
when several exist; the rest stay in place. devserver fails fast with
the same hint. gitignore covers paskia.kantadb and *.converted-bak.
This commit is contained in:
2026-09-06 22:11:17 +00:00
parent 9b10663c10
commit fefd54f02a
7 changed files with 148 additions and 56 deletions
+4 -3
View File
@@ -55,8 +55,9 @@ uv tool install paskia
Bootstrapping is done once with `paskia init`; after that, `paskia` serves all configured realms from the database `paskia.kantadb` in the current directory. Realm configuration (rp-name, auth host, origins) is managed via the admin web interface, including adding further realms (rp-ids).
```text
paskia init [options] # one-time bootstrap
paskia [-l endpoint] # serve
paskia init [options] # one-time bootstrap
paskia migrate [--rp-id] # convert a legacy {rp-id}.paskiadb database
paskia [-l endpoint] # serve
```
| init option | Description | Default |
@@ -67,7 +68,7 @@ paskia [-l endpoint] # serve
| --origin *url* | Only sites listed can login on the default realm (repeatable) | rp-id and all subdomains |
| --auth-host *url* | Dedicated authentication site, e.g. **auth.example.com** | Use **/auth/** path on each site |
The `paskia` serve command accepts only `--listen` (overriding the stored value). An existing legacy `{rp-id}.paskiadb` database is converted to `paskia.kantadb` automatically on first serve.
The `paskia` serve command accepts only `--listen` (overriding the stored value) and never converts databases: with no `paskia.kantadb` it tells you to run `paskia init`, or `paskia migrate` when a legacy `{rp-id}.paskiadb` database is present. `paskia migrate` converts the legacy database; with several candidates, `--rp-id` selects one by name and the rest are left in place.
## Tutorial: From Local Testing to Production