Migrate dive data from the legacy SQLite database into PostgreSQL. device_state_rows = [dict(row) for row in sqlite_conn.execute("SELECT * FROM device_state").fetchall()] dive_rows = [dict(row) for ...