Fix execution order on database.yml upload