Added mode to DB script