Database conversion - aaronwmorris/indi-allsky GitHub Wiki
General
Use these instructions to convert your Sqlite database to MariaDB/MySQL.
-
Stop indi-allsky
systemctl --user stop indi-allsky
-
Activate virtualenv
source virtualenv/indi-allsky/bin/activate
-
Ensure your database schema is at the latest level
flask db revision --autogenerate flask db upgrade head
-
Create new mysql database
-
Update SqlAlchemy URL and migration folder in
/etc/indi-allsky/flask.json
SQLALCHEMY_DATABASE_URI
MIGRATION_FOLDER
- set to/var/lib/indi-allsky/migrations_mysql
-
Initialize new migrations
flask db init
-
Create initial revision
flask db revision --autogenerate
-
Upgrade revision
flask db upgrade head
-
Update conversion script with the mysql DST_URL
misc/convert_db.py
-
Run migration script
- This process can take 3-5 minutes on Raspberry Pi hardware, be patient
-
Restart indi-allsky