Add foreign key constraints to MySQL local database
Clean batch_upload.py