I'm trying to implement a database build using VSTS 2008 Database Edition. The build always fails on the following constraint:
ALTER TABLE [dbo].[tablename]
ADD CONSTRAINT [DF_tablename_date] DEFAULT (CONVERT([varchar],dateadd(hour,(-1),getdate()),(1))) FOR [date];
The error that it shows is the following:
TSD03082: The name "hour" is not permitted in this context. Valid expressions are constants, constant expressions, and (in some contexts) variables. Column names are not permitted.
Anybody have an idea what is wrong here?