vole
Site
Clone
Read only, no credentials:
https://rodent.software/vole.git
Write over SSH with a registered key:
git clone ssh://git@rodent.software/vole.git
Self-hosted forge that lives in your Git repo.
Merge release channels into the account database and rename it instance.db
3047be84e9bce79372051c09854ce9b05f12a9bf · Keenan Nemetz · 17d ago · parent 262e516e
Merge release channels into the account database and rename it instance.db The instance keeps four SQLite files instead of five. Release channels were in a file of their own only because they were added beside the derived index; they are authoritative source state, like the roster, so they belong in the file an operator restores. Nothing has to be migrated: channels.db never shipped in a release, so only an instance tracking main can have one. The account database is now data/instance.db. The package comments already called it that; only the filename disagreed. Moving an existing instance is an operator step, by decision: a rename under a live server can lose the -wal file a hook subprocess still has open. Vole refuses to start while data/users.db is still in place, and says what to move, rather than creating an empty database beside it that would look like a successful upgrade. The list of databases now lives in Config.Databases, which TightenSecrets, the hook plumbing, and the admin commands read, so a missed -wal file is no longer a nine-file change. `vole admin account backup <path>` becomes `vole admin db backup <dir>` and covers every authoritative database; `db list` and `db check` answer what to back up and whether it is intact.
forge/identity/identity_test.go +3−3
| @@ -15,7 +15,7 @@ import ( | |||
| 15 | 15 | ||
| 16 | 16 | func newStore(t *testing.T) *Store { | |
| 17 | 17 | t.Helper() | |
| 18 | path := filepath.Join(t.TempDir(), "users.db") | ||
| 18 | path := filepath.Join(t.TempDir(), "instance.db") | ||
| 19 | 19 | if err := Init(path); err != nil { | |
| 20 | 20 | t.Fatal(err) | |
| 21 | 21 | } | |
| @@ -401,7 +401,7 @@ func TestAuditLogRecordsChanges(t *testing.T) { | |||
| 401 | 401 | // the alias table rather than leave a list of former names nothing resolves. | |
| 402 | 402 | func TestRosterUpgradesFromTheOldSchema(t *testing.T) { | |
| 403 | 403 | t.Parallel() | |
| 404 | path := filepath.Join(t.TempDir(), "users.db") | ||
| 404 | path := filepath.Join(t.TempDir(), "instance.db") | ||
| 405 | 405 | db, err := openDB(path) | |
| 406 | 406 | if err != nil { | |
| 407 | 407 | t.Fatal(err) | |
| @@ -561,7 +561,7 @@ func TestRosterIsOneDatabaseFile(t *testing.T) { | |||
| 561 | 561 | t.Fatal(err) | |
| 562 | 562 | } | |
| 563 | 563 | ||
| 564 | copied := filepath.Join(t.TempDir(), "users.db") | ||
| 564 | copied := filepath.Join(t.TempDir(), "instance.db") | ||
| 565 | 565 | if err := s.Backup(copied); err != nil { | |
| 566 | 566 | t.Fatal(err) | |
| 567 | 567 | } | |