Make db commands only run when refreshed