optiwindnet.db.migrate¶

Migrate a v2 (Pony ORM) or v3 (Peewee) database to v4 (Peewee, slim RouteSet schema).

Uses sqlite3 to read the source file (no Pony dependency), writes v4 with Peewee. The RouteSet field num_gates is renamed to feeders_per_root, and the columns dropped in v4 (valid, is_normalized, stuntC) are discarded.

Usage:

python -m optiwindnet.db.migrate input.sqlite output.v4.sqlite

Module Contents¶

optiwindnet.db.migrate.migrate(src_path, v4_path)[source]¶

Migrate a v2 (Pony ORM) or v3 (Peewee) database to v4 Peewee format.

Parameters:
  • src_path – Path to the existing v2 or v3 database file.

  • v4_path – Path for the new v4 database file (must not exist).

optiwindnet.db.migrate.main()[source]¶