if not exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Schedule]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
 
CREATE TABLE [dbo].[Schedule] (
 [ScheduleId] [int] IDENTITY (1, 1) NOT NULL ,
 [ParentID] [int] NULL ,
 [EventType] [int] NULL ,
 [Start] [datetime] NULL ,
 [Finish] [datetime] NULL ,
 [Options] [int] NULL ,
 [Caption] [varchar] (500) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
 [RecurrenceIndex] [int] NULL ,
 [ResourceID] [int] NULL ,
 [Location] [varchar] (500) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
 [Message] [varchar] (500) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
 [ReminderDate] [datetime] NULL ,
 [ReminderMinutes] [int] NULL ,
 [State] [int] NULL ,
 [LabelColor] [int] NULL ,
 [ActualStart] [int] NULL ,
 [ActualFinish] [int] NULL ,
 [SyncIDField] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
 [Type] [tinyint] NULL ,
 [RecurrenceInfo] [image] NULL ,
 [Pax] [int] NULL ,
 [RecurrenceInfoTranslated] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
