Python, migrate databases