Currently, database migrations happen automatically during storage __init__; this is by design, and should remain the default.
However, sometimes more precise control of when migrations happen is needed (e.g. a deployed web application does not want migrations to happen in the web workers, but during deployment). Add a make_reader() flag to allow for this.
It should be possible to implement this by changing setup_db() to pass a copy of MIGRATION with empty migrations and an appropriate missing_suffix message.
To do:
make_reader(migrate: bool = True) flag + documentation
- Storage implementation
- a test_reader_lifecycle.py test (StorageError should be raised if migrations are needed and migrate=False)
- a matching
--migrate/--no-migrate CLI flag (default true)
Currently, database migrations happen automatically during storage
__init__; this is by design, and should remain the default.However, sometimes more precise control of when migrations happen is needed (e.g. a deployed web application does not want migrations to happen in the web workers, but during deployment). Add a make_reader() flag to allow for this.
It should be possible to implement this by changing setup_db() to pass a copy of MIGRATION with empty
migrationsand an appropriatemissing_suffixmessage.To do:
make_reader(migrate: bool = True)flag + documentation--migrate/--no-migrateCLI flag (default true)