See db.py for rationale.
Tests:
- Run functional tests and unit tests.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
- Done automatically by running isort . in top level directory.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
- use a migration to merge the old 'firstboot_state' and 'setup_state'
fields into 'firstboot_completed' which is a more accurate name
- introduce kvstore.delete()
- Remove dependency on withsqlite and use Django models.
This avoids depending on a module that is not available in PyPi.
Withsqlite does not have Python3 support. It does not work when
we choose a different database backend. Atleast partly duplicates
what Django models are meant for.
- Check and update database schema on every run so that
newly added modules can add tables and old ones can update.