mirror of
https://github.com/status-im/status-go.git
synced 2026-08-31 00:51:12 +00:00
Part of the Go project layout migration, item 4. internal/db/walletdatabase -> internal/db/walletdb, and its one 45-line file splits along the two jobs it was doing: open.go DbInitializer, InitializeDB, OpenDB migrate.go walletCustomSteps, doMigration, MigrateDB scripts/migration_check.sh listed this migration directory as "walletdatabase/migrations/sql" and appdatabase's as "appdatabase/migrations/sql". Neither path has existed since those packages moved under internal/db/, so the check has been silently skipping both. Both are corrected here. refs #7067
generate-db
A tiny utility to generate empty, up-to-date SQLite databases used by Status.
It initializes the databases using the same initializers and migrations as the app, so the resulting files match the current schema. This is handy for IDE SQL inspections, schema exploration, or tooling that expects a real database file.
What it creates
app.db— initialized viaappdatabase.DbInitializerwallet.db— initialized viawalletdatabase.DbInitializeraccounts.db— initialized viamultiaccounts.InitializeDB
By design, these databases are empty (no user data) but fully migrated to the latest schema.
Build and run
make generate-db
This builds the tool and generates databases under build/db by default.
Notes
- Schemas are produced by the current codebase.
If you update migrations, rerun this tool to regenerate the files. - The tool uses an empty password and 0 KDF iterations during initialization.
These files are strictly for local development, inspection, and tooling. - Existing files at the target location are removed before re-creation.