Move database into Schwalbe

I want to move the current wahlen database into Schwalbe, so that it becomes the exclusive manager and owner of the data. Other services can access it via an API.

I want to move away from MySQL and migrate all relevant data into an SQLite database. Other IT-people can have periodic copies of this SQLite database for querying, but only Schwalbe will be able to modify the data, and the Schwalbe copy will be authoritative.

Steps to migrate

  1. Use SQLAlchemy to determine which tables Schwalbe needs (https://www.slingacademy.com/article/sqlalchemy-get-list-all-tables/). Those will be migrated out of Wahlen and into Schwalbe.
  2. Check which fields are in the DB which are not in Schwalbe. If they need to be kept, add them to the Schwalbe schema.
  3. Improve the Schwalbe schema: Check nullability, model relationships etc.
  4. Get a fresh start on the alembic migrations. Archive the old migrations, and create one that builds the database from the ground up.
  5. Migrate the data into the production DB.