Add terminals to database