Added a UNIQUE constraint to the templates table