18 lines
1.0 KiB
Markdown
18 lines
1.0 KiB
Markdown
# Data migration
|
|
|
|
Version **0.0.2** performs automatic, transactional schema migration for supported Rust databases. A database created by Rust 0.0.1 uses schema v1; on startup 0.0.2 validates it, adds `default_routeros_username` and `default_routeros_password`, updates `schema_info.schema_version` to `2`, validates the resulting schema, and then starts the service. No manual `sqlite3` command is required.
|
|
|
|
The automatic migration applies only to the supported Rust schema. It does not convert the previous Python/TypeScript application database. For that source, use the explicit, copy-only `import-python` command described in [data-import.md](data-import.md).
|
|
|
|
For the standard legacy Python layout:
|
|
|
|
```sh
|
|
DATA_DIR="$PWD/storage-imported" \
|
|
DATABASE_PATH="$PWD/storage-imported/routeros_backup_next.db" \
|
|
./import-python.sh /srv/old-mikrotik-app \
|
|
--database docker-data/db/routeros_backup_next.db \
|
|
--backup-root docker-data
|
|
```
|
|
|
|
Stop the old Python/TypeScript application first. The import destination must be new and must not contain an existing database.
|