/****** Object:  Table [dbo].[TableBookingSeating]    Script Date: 09/07/2011 14:41:08 ******/
if not exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[TableBookingSeating]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
	CREATE TABLE [dbo].[TableBookingSeating](
		[TableBookingSeatingId] [int] IDENTITY(1,1) NOT NULL,
		[TotalPax] [int] NOT NULL,
		[Priority] [int] NOT NULL,
		[TableCount] [int] NOT NULL,
		[ConferenceRoomTypeNumber] [int] NOT NULL,
		[PaxAtTable] [int] NOT NULL,
		[Description] [varchar](50) NULL,
		[Enabled] [bit] NOT NULL,
	 CONSTRAINT [PK_TableBookingSeating] PRIMARY KEY CLUSTERED 
	  (
		[TableBookingSeatingId] ASC
	  )
	) ON [PRIMARY]
GO

IF NOT EXISTS (SELECT CONSTRAINT_NAME FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS WHERE CONSTRAINT_NAME ='FK_TableBookingSeating_CONFERENCEROOMTYPES')
  ALTER TABLE [dbo].[TableBookingSeating]  
  WITH CHECK 
    ADD CONSTRAINT [FK_TableBookingSeating_CONFERENCEROOMTYPES] FOREIGN KEY([ConferenceRoomTypeNumber])
    REFERENCES [dbo].[CONFERENCEROOMTYPES] ([ConferenceRoomTypeNumber])
GO



