USE [stockholm_db]
GO
/****** Object:  ForeignKey [FK_Badges_Roles]    Script Date: 12/02/2009 20:58:49 ******/
IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_Badges_Roles]') AND parent_object_id = OBJECT_ID(N'[dbo].[Badges]'))
ALTER TABLE [dbo].[Badges] DROP CONSTRAINT [FK_Badges_Roles]
GO
/****** Object:  ForeignKey [FK_Furni_Furni]    Script Date: 12/02/2009 20:58:49 ******/
IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_Furni_Furni]') AND parent_object_id = OBJECT_ID(N'[dbo].[Furni]'))
ALTER TABLE [dbo].[Furni] DROP CONSTRAINT [FK_Furni_Furni]
GO
/****** Object:  ForeignKey [FK_Furni_FurniDefinitions]    Script Date: 12/02/2009 20:58:49 ******/
IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_Furni_FurniDefinitions]') AND parent_object_id = OBJECT_ID(N'[dbo].[Furni]'))
ALTER TABLE [dbo].[Furni] DROP CONSTRAINT [FK_Furni_FurniDefinitions]
GO
/****** Object:  ForeignKey [FK_Furni_Rooms]    Script Date: 12/02/2009 20:58:49 ******/
IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_Furni_Rooms]') AND parent_object_id = OBJECT_ID(N'[dbo].[Furni]'))
ALTER TABLE [dbo].[Furni] DROP CONSTRAINT [FK_Furni_Rooms]
GO
/****** Object:  ForeignKey [FK_Furni_Users]    Script Date: 12/02/2009 20:58:49 ******/
IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_Furni_Users]') AND parent_object_id = OBJECT_ID(N'[dbo].[Furni]'))
ALTER TABLE [dbo].[Furni] DROP CONSTRAINT [FK_Furni_Users]
GO
/****** Object:  ForeignKey [FK_FurniDefinitions_PhysicsObjects]    Script Date: 12/02/2009 20:58:49 ******/
IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_FurniDefinitions_PhysicsObjects]') AND parent_object_id = OBJECT_ID(N'[dbo].[FurniDefinitions]'))
ALTER TABLE [dbo].[FurniDefinitions] DROP CONSTRAINT [FK_FurniDefinitions_PhysicsObjects]
GO
/****** Object:  ForeignKey [FK_RoleAccess_Roles]    Script Date: 12/02/2009 20:58:50 ******/
IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_RoleAccess_Roles]') AND parent_object_id = OBJECT_ID(N'[dbo].[RoleAccess]'))
ALTER TABLE [dbo].[RoleAccess] DROP CONSTRAINT [FK_RoleAccess_Roles]
GO
/****** Object:  ForeignKey [FK_RoomCategories_RoomCategories]    Script Date: 12/02/2009 20:58:50 ******/
IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_RoomCategories_RoomCategories]') AND parent_object_id = OBJECT_ID(N'[dbo].[RoomCategories]'))
ALTER TABLE [dbo].[RoomCategories] DROP CONSTRAINT [FK_RoomCategories_RoomCategories]
GO
/****** Object:  ForeignKey [FK_Rooms_RoomCategories]    Script Date: 12/02/2009 20:58:50 ******/
IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_Rooms_RoomCategories]') AND parent_object_id = OBJECT_ID(N'[dbo].[Rooms]'))
ALTER TABLE [dbo].[Rooms] DROP CONSTRAINT [FK_Rooms_RoomCategories]
GO
/****** Object:  ForeignKey [FK_Rooms_RoomModels]    Script Date: 12/02/2009 20:58:50 ******/
IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_Rooms_RoomModels]') AND parent_object_id = OBJECT_ID(N'[dbo].[Rooms]'))
ALTER TABLE [dbo].[Rooms] DROP CONSTRAINT [FK_Rooms_RoomModels]
GO
/****** Object:  ForeignKey [FK_Rooms_RoomStates]    Script Date: 12/02/2009 20:58:50 ******/
IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_Rooms_RoomStates]') AND parent_object_id = OBJECT_ID(N'[dbo].[Rooms]'))
ALTER TABLE [dbo].[Rooms] DROP CONSTRAINT [FK_Rooms_RoomStates]
GO
/****** Object:  ForeignKey [FK_Rooms_Users]    Script Date: 12/02/2009 20:58:50 ******/
IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_Rooms_Users]') AND parent_object_id = OBJECT_ID(N'[dbo].[Rooms]'))
ALTER TABLE [dbo].[Rooms] DROP CONSTRAINT [FK_Rooms_Users]
GO
/****** Object:  ForeignKey [FK_Users_Roles]    Script Date: 12/02/2009 20:58:50 ******/
IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_Users_Roles]') AND parent_object_id = OBJECT_ID(N'[dbo].[Users]'))
ALTER TABLE [dbo].[Users] DROP CONSTRAINT [FK_Users_Roles]
GO
/****** Object:  Table [dbo].[Furni]    Script Date: 12/02/2009 20:58:49 ******/
IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_Furni_Furni]') AND parent_object_id = OBJECT_ID(N'[dbo].[Furni]'))
ALTER TABLE [dbo].[Furni] DROP CONSTRAINT [FK_Furni_Furni]
GO
IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_Furni_FurniDefinitions]') AND parent_object_id = OBJECT_ID(N'[dbo].[Furni]'))
ALTER TABLE [dbo].[Furni] DROP CONSTRAINT [FK_Furni_FurniDefinitions]
GO
IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_Furni_Rooms]') AND parent_object_id = OBJECT_ID(N'[dbo].[Furni]'))
ALTER TABLE [dbo].[Furni] DROP CONSTRAINT [FK_Furni_Rooms]
GO
IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_Furni_Users]') AND parent_object_id = OBJECT_ID(N'[dbo].[Furni]'))
ALTER TABLE [dbo].[Furni] DROP CONSTRAINT [FK_Furni_Users]
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Furni]') AND type in (N'U'))
DROP TABLE [dbo].[Furni]
GO
/****** Object:  Table [dbo].[Rooms]    Script Date: 12/02/2009 20:58:50 ******/
IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_Rooms_RoomCategories]') AND parent_object_id = OBJECT_ID(N'[dbo].[Rooms]'))
ALTER TABLE [dbo].[Rooms] DROP CONSTRAINT [FK_Rooms_RoomCategories]
GO
IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_Rooms_RoomModels]') AND parent_object_id = OBJECT_ID(N'[dbo].[Rooms]'))
ALTER TABLE [dbo].[Rooms] DROP CONSTRAINT [FK_Rooms_RoomModels]
GO
IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_Rooms_RoomStates]') AND parent_object_id = OBJECT_ID(N'[dbo].[Rooms]'))
ALTER TABLE [dbo].[Rooms] DROP CONSTRAINT [FK_Rooms_RoomStates]
GO
IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_Rooms_Users]') AND parent_object_id = OBJECT_ID(N'[dbo].[Rooms]'))
ALTER TABLE [dbo].[Rooms] DROP CONSTRAINT [FK_Rooms_Users]
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Rooms]') AND type in (N'U'))
DROP TABLE [dbo].[Rooms]
GO
/****** Object:  Table [dbo].[FurniDefinitions]    Script Date: 12/02/2009 20:58:49 ******/
IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_FurniDefinitions_PhysicsObjects]') AND parent_object_id = OBJECT_ID(N'[dbo].[FurniDefinitions]'))
ALTER TABLE [dbo].[FurniDefinitions] DROP CONSTRAINT [FK_FurniDefinitions_PhysicsObjects]
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_FurniDefinitions_FurniType]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[FurniDefinitions] DROP CONSTRAINT [DF_FurniDefinitions_FurniType]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[FurniDefinitions]') AND type in (N'U'))
DROP TABLE [dbo].[FurniDefinitions]
GO
/****** Object:  Table [dbo].[RoleAccess]    Script Date: 12/02/2009 20:58:50 ******/
IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_RoleAccess_Roles]') AND parent_object_id = OBJECT_ID(N'[dbo].[RoleAccess]'))
ALTER TABLE [dbo].[RoleAccess] DROP CONSTRAINT [FK_RoleAccess_Roles]
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[RoleAccess]') AND type in (N'U'))
DROP TABLE [dbo].[RoleAccess]
GO
/****** Object:  Table [dbo].[Users]    Script Date: 12/02/2009 20:58:50 ******/
IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_Users_Roles]') AND parent_object_id = OBJECT_ID(N'[dbo].[Users]'))
ALTER TABLE [dbo].[Users] DROP CONSTRAINT [FK_Users_Roles]
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Users]') AND type in (N'U'))
DROP TABLE [dbo].[Users]
GO
/****** Object:  Table [dbo].[Badges]    Script Date: 12/02/2009 20:58:49 ******/
IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_Badges_Roles]') AND parent_object_id = OBJECT_ID(N'[dbo].[Badges]'))
ALTER TABLE [dbo].[Badges] DROP CONSTRAINT [FK_Badges_Roles]
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Badges]') AND type in (N'U'))
DROP TABLE [dbo].[Badges]
GO
/****** Object:  Table [dbo].[Vouchers]    Script Date: 12/02/2009 20:58:50 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Vouchers]') AND type in (N'U'))
DROP TABLE [dbo].[Vouchers]
GO
/****** Object:  Table [dbo].[Roles]    Script Date: 12/02/2009 20:58:50 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Roles]') AND type in (N'U'))
DROP TABLE [dbo].[Roles]
GO
/****** Object:  Table [dbo].[RoomCategories]    Script Date: 12/02/2009 20:58:50 ******/
IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_RoomCategories_RoomCategories]') AND parent_object_id = OBJECT_ID(N'[dbo].[RoomCategories]'))
ALTER TABLE [dbo].[RoomCategories] DROP CONSTRAINT [FK_RoomCategories_RoomCategories]
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[RoomCategories]') AND type in (N'U'))
DROP TABLE [dbo].[RoomCategories]
GO
/****** Object:  Table [dbo].[RoomModels]    Script Date: 12/02/2009 20:58:50 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[RoomModels]') AND type in (N'U'))
DROP TABLE [dbo].[RoomModels]
GO
/****** Object:  Table [dbo].[PhysicsObjects]    Script Date: 12/02/2009 20:58:49 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_PhysicsObjects_Width]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[PhysicsObjects] DROP CONSTRAINT [DF_PhysicsObjects_Width]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_PhysicsObjects_Length]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[PhysicsObjects] DROP CONSTRAINT [DF_PhysicsObjects_Length]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_PhysicsObjects_Height]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[PhysicsObjects] DROP CONSTRAINT [DF_PhysicsObjects_Height]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_PhysicsObjects_ActionHeight]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[PhysicsObjects] DROP CONSTRAINT [DF_PhysicsObjects_ActionHeight]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_PhysicsObjects_IsPathable]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[PhysicsObjects] DROP CONSTRAINT [DF_PhysicsObjects_IsPathable]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PhysicsObjects]') AND type in (N'U'))
DROP TABLE [dbo].[PhysicsObjects]
GO
/****** Object:  Table [dbo].[RoomStates]    Script Date: 12/02/2009 20:58:50 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[RoomStates]') AND type in (N'U'))
DROP TABLE [dbo].[RoomStates]
GO
/****** Object:  Table [dbo].[Settings]    Script Date: 12/02/2009 20:58:50 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Settings]') AND type in (N'U'))
DROP TABLE [dbo].[Settings]
GO
/****** Object:  Table [dbo].[Settings]    Script Date: 12/02/2009 20:58:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Settings]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Settings](
	[SettingsVersion] [int] IDENTITY(1,1) NOT NULL,
	[DatabaseVersion] [int] NOT NULL,
 CONSTRAINT [PK_Settings] PRIMARY KEY CLUSTERED 
(
	[SettingsVersion] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[Settings] ON
INSERT [dbo].[Settings] ([SettingsVersion], [DatabaseVersion]) VALUES (1, 1)
SET IDENTITY_INSERT [dbo].[Settings] OFF
/****** Object:  Table [dbo].[RoomStates]    Script Date: 12/02/2009 20:58:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[RoomStates]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[RoomStates](
	[StatusID] [int] NOT NULL,
	[StatusName] [nvarchar](15) NOT NULL,
 CONSTRAINT [PK_RoomStatuses] PRIMARY KEY CLUSTERED 
(
	[StatusID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
INSERT [dbo].[RoomStates] ([StatusID], [StatusName]) VALUES (0, N'open')
INSERT [dbo].[RoomStates] ([StatusID], [StatusName]) VALUES (1, N'closed')
INSERT [dbo].[RoomStates] ([StatusID], [StatusName]) VALUES (2, N'password')
/****** Object:  Table [dbo].[PhysicsObjects]    Script Date: 12/02/2009 20:58:49 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PhysicsObjects]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[PhysicsObjects](
	[PhysicsID] [int] IDENTITY(1,1) NOT NULL,
	[PhysicsName] [nvarchar](50) NOT NULL,
	[Width] [int] NOT NULL CONSTRAINT [DF_PhysicsObjects_Width]  DEFAULT ((1)),
	[Length] [int] NOT NULL CONSTRAINT [DF_PhysicsObjects_Length]  DEFAULT ((1)),
	[Height] [float] NOT NULL CONSTRAINT [DF_PhysicsObjects_Height]  DEFAULT ((0.0)),
	[ActionHeight] [float] NOT NULL CONSTRAINT [DF_PhysicsObjects_ActionHeight]  DEFAULT ((0.0)),
	[IsPathable] [bit] NOT NULL CONSTRAINT [DF_PhysicsObjects_IsPathable]  DEFAULT ((0)),
 CONSTRAINT [PK_Physics] PRIMARY KEY CLUSTERED 
(
	[PhysicsID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[PhysicsObjects] ON
INSERT [dbo].[PhysicsObjects] ([PhysicsID], [PhysicsName], [Width], [Length], [Height], [ActionHeight], [IsPathable]) VALUES (1, N'creature_player', 1, 1, 0, 0, 0)
INSERT [dbo].[PhysicsObjects] ([PhysicsID], [PhysicsName], [Width], [Length], [Height], [ActionHeight], [IsPathable]) VALUES (2, N'furnipublic_crl_lamp', 1, 1, 0, 0, 0)
INSERT [dbo].[PhysicsObjects] ([PhysicsID], [PhysicsName], [Width], [Length], [Height], [ActionHeight], [IsPathable]) VALUES (3, N'furnipublic_crl_sofa2c', 1, 1, 0, 0, 0)
INSERT [dbo].[PhysicsObjects] ([PhysicsID], [PhysicsName], [Width], [Length], [Height], [ActionHeight], [IsPathable]) VALUES (4, N'furnipublic_crl_sofa2b', 1, 1, 0, 0, 0)
INSERT [dbo].[PhysicsObjects] ([PhysicsID], [PhysicsName], [Width], [Length], [Height], [ActionHeight], [IsPathable]) VALUES (5, N'furnipublic_crl_sofa2a', 1, 1, 0, 0, 0)
INSERT [dbo].[PhysicsObjects] ([PhysicsID], [PhysicsName], [Width], [Length], [Height], [ActionHeight], [IsPathable]) VALUES (6, N'furnipublic_crl_chair', 1, 1, 0, 0, 0)
INSERT [dbo].[PhysicsObjects] ([PhysicsID], [PhysicsName], [Width], [Length], [Height], [ActionHeight], [IsPathable]) VALUES (7, N'furnipublic_crl_pillar', 1, 1, 0, 0, 0)
INSERT [dbo].[PhysicsObjects] ([PhysicsID], [PhysicsName], [Width], [Length], [Height], [ActionHeight], [IsPathable]) VALUES (8, N'furnipublic_crl_table1b', 1, 1, 0, 0, 0)
INSERT [dbo].[PhysicsObjects] ([PhysicsID], [PhysicsName], [Width], [Length], [Height], [ActionHeight], [IsPathable]) VALUES (9, N'furnipublic_crl_sofa1c', 1, 1, 0, 0, 0)
INSERT [dbo].[PhysicsObjects] ([PhysicsID], [PhysicsName], [Width], [Length], [Height], [ActionHeight], [IsPathable]) VALUES (10, N'furnipublic_crl_table2b', 1, 1, 0, 0, 0)
INSERT [dbo].[PhysicsObjects] ([PhysicsID], [PhysicsName], [Width], [Length], [Height], [ActionHeight], [IsPathable]) VALUES (11, N'furnipublic_crl_table2a', 1, 1, 0, 0, 0)
INSERT [dbo].[PhysicsObjects] ([PhysicsID], [PhysicsName], [Width], [Length], [Height], [ActionHeight], [IsPathable]) VALUES (12, N'furnipublic_crl_table1a', 1, 1, 0, 0, 0)
INSERT [dbo].[PhysicsObjects] ([PhysicsID], [PhysicsName], [Width], [Length], [Height], [ActionHeight], [IsPathable]) VALUES (13, N'furnipublic_crl_sofa1b', 1, 1, 0, 0, 0)
INSERT [dbo].[PhysicsObjects] ([PhysicsID], [PhysicsName], [Width], [Length], [Height], [ActionHeight], [IsPathable]) VALUES (14, N'furnipublic_crl_wall2a', 1, 1, 0, 0, 0)
INSERT [dbo].[PhysicsObjects] ([PhysicsID], [PhysicsName], [Width], [Length], [Height], [ActionHeight], [IsPathable]) VALUES (15, N'furnipublic_crl_sofa1a', 1, 1, 0, 0, 0)
INSERT [dbo].[PhysicsObjects] ([PhysicsID], [PhysicsName], [Width], [Length], [Height], [ActionHeight], [IsPathable]) VALUES (16, N'furnipublic_crl_sofa3c', 1, 1, 0, 0, 0)
INSERT [dbo].[PhysicsObjects] ([PhysicsID], [PhysicsName], [Width], [Length], [Height], [ActionHeight], [IsPathable]) VALUES (17, N'furnipublic_crl_sofa3b', 1, 1, 0, 0, 0)
INSERT [dbo].[PhysicsObjects] ([PhysicsID], [PhysicsName], [Width], [Length], [Height], [ActionHeight], [IsPathable]) VALUES (18, N'furnipublic_crl_sofa3a', 1, 1, 0, 0, 0)
INSERT [dbo].[PhysicsObjects] ([PhysicsID], [PhysicsName], [Width], [Length], [Height], [ActionHeight], [IsPathable]) VALUES (19, N'furnipublic_crl_barchair2', 1, 1, 0, 0, 0)
INSERT [dbo].[PhysicsObjects] ([PhysicsID], [PhysicsName], [Width], [Length], [Height], [ActionHeight], [IsPathable]) VALUES (20, N'furnipublic_crl_tablebar', 1, 1, 0, 0, 0)
INSERT [dbo].[PhysicsObjects] ([PhysicsID], [PhysicsName], [Width], [Length], [Height], [ActionHeight], [IsPathable]) VALUES (21, N'furnipublic_crl_pillar2', 1, 1, 0, 0, 0)
INSERT [dbo].[PhysicsObjects] ([PhysicsID], [PhysicsName], [Width], [Length], [Height], [ActionHeight], [IsPathable]) VALUES (22, N'furnipublic_crl_desk1a', 1, 1, 0, 0, 0)
INSERT [dbo].[PhysicsObjects] ([PhysicsID], [PhysicsName], [Width], [Length], [Height], [ActionHeight], [IsPathable]) VALUES (23, N'furnipublic_crl_deski', 1, 1, 0, 0, 0)
INSERT [dbo].[PhysicsObjects] ([PhysicsID], [PhysicsName], [Width], [Length], [Height], [ActionHeight], [IsPathable]) VALUES (24, N'furnipublic_crl_deskh', 1, 1, 0, 0, 0)
INSERT [dbo].[PhysicsObjects] ([PhysicsID], [PhysicsName], [Width], [Length], [Height], [ActionHeight], [IsPathable]) VALUES (25, N'furnipublic_crl_deskg', 1, 1, 0, 0, 0)
INSERT [dbo].[PhysicsObjects] ([PhysicsID], [PhysicsName], [Width], [Length], [Height], [ActionHeight], [IsPathable]) VALUES (26, N'furnipublic_crl_deskf', 1, 1, 0, 0, 0)
INSERT [dbo].[PhysicsObjects] ([PhysicsID], [PhysicsName], [Width], [Length], [Height], [ActionHeight], [IsPathable]) VALUES (27, N'furnipublic_crl_deske', 1, 1, 0, 0, 0)
INSERT [dbo].[PhysicsObjects] ([PhysicsID], [PhysicsName], [Width], [Length], [Height], [ActionHeight], [IsPathable]) VALUES (28, N'furnipublic_crl_wallb', 1, 1, 0, 0, 0)
INSERT [dbo].[PhysicsObjects] ([PhysicsID], [PhysicsName], [Width], [Length], [Height], [ActionHeight], [IsPathable]) VALUES (29, N'furnipublic_crl_walla', 1, 1, 0, 0, 0)
INSERT [dbo].[PhysicsObjects] ([PhysicsID], [PhysicsName], [Width], [Length], [Height], [ActionHeight], [IsPathable]) VALUES (30, N'furnipublic_crl_desk1b', 1, 1, 0, 0, 0)
INSERT [dbo].[PhysicsObjects] ([PhysicsID], [PhysicsName], [Width], [Length], [Height], [ActionHeight], [IsPathable]) VALUES (31, N'furnipublic_crl_desk1c', 1, 1, 0, 0, 0)
INSERT [dbo].[PhysicsObjects] ([PhysicsID], [PhysicsName], [Width], [Length], [Height], [ActionHeight], [IsPathable]) VALUES (32, N'furnipublic_crl_desk1d', 1, 1, 0, 0, 0)
INSERT [dbo].[PhysicsObjects] ([PhysicsID], [PhysicsName], [Width], [Length], [Height], [ActionHeight], [IsPathable]) VALUES (33, N'furnipublic_crl_lamp2', 1, 1, 0, 0, 0)
INSERT [dbo].[PhysicsObjects] ([PhysicsID], [PhysicsName], [Width], [Length], [Height], [ActionHeight], [IsPathable]) VALUES (34, N'furnipublic_crl_cabinet2', 1, 1, 0, 0, 0)
INSERT [dbo].[PhysicsObjects] ([PhysicsID], [PhysicsName], [Width], [Length], [Height], [ActionHeight], [IsPathable]) VALUES (35, N'furnipublic_crl_cabinet1', 1, 1, 0, 0, 0)
SET IDENTITY_INSERT [dbo].[PhysicsObjects] OFF
/****** Object:  Table [dbo].[RoomModels]    Script Date: 12/02/2009 20:58:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[RoomModels]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[RoomModels](
	[RoomModelID] [int] IDENTITY(1,1) NOT NULL,
	[ModelName] [varchar](100) NOT NULL,
	[NavigatorName] [varchar](100) NOT NULL,
	[CCTList] [varchar](500) NULL,
	[StartX] [int] NOT NULL,
	[StartY] [int] NOT NULL,
	[StartZ] [int] NOT NULL,
	[MaxAscend] [float] NOT NULL,
	[MaxDescend] [float] NOT NULL,
	[DefaultHeightmap] [varchar](8000) NOT NULL,
	[AdditionalECs] [nvarchar](25) NULL,
 CONSTRAINT [PK_RoomModels] PRIMARY KEY CLUSTERED 
(
	[RoomModelID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_PADDING OFF
GO
SET IDENTITY_INSERT [dbo].[RoomModels] ON
INSERT [dbo].[RoomModels] ([RoomModelID], [ModelName], [NavigatorName], [CCTList], [StartX], [StartY], [StartZ], [MaxAscend], [MaxDescend], [DefaultHeightmap], [AdditionalECs]) VALUES (2, N'newbie_lobby', N'Welcome Lounge', N'hh_room_nlobby', 2, 11, 0, 0, 0, N'xxxxxxxxxxxxxxxx000000|xxxxx0xxxxxxxxxx000000|xxxxx00000000xxx000000|xxxxx000000000xx000000|0000000000000000000000|0000000000000000000000|0000000000000000000000|0000000000000000000000|0000000000000000000000|xxxxx000000000000000xx|xxxxx000000000000000xx|x0000000000000000000xx|x0000000000000000xxxxx|xxxxxx00000000000xxxxx|xxxxxxx0000000000xxxxx|xxxxxxxx000000000xxxxx|xxxxxxxx000000000xxxxx|xxxxxxxx000000000xxxxx|xxxxxxxx000000000xxxxx|xxxxxxxx000000000xxxxx|xxxxxxxx000000000xxxxx|xxxxxx00000000000xxxxx|xxxxxx00000000000xxxxx|xxxxxx00000000000xxxxx|xxxxxx00000000000xxxxx|xxxxxx00000000000xxxxx|xxxxx000000000000xxxxx|xxxxx000000000000xxxxx', NULL)
INSERT [dbo].[RoomModels] ([RoomModelID], [ModelName], [NavigatorName], [CCTList], [StartX], [StartY], [StartZ], [MaxAscend], [MaxDescend], [DefaultHeightmap], [AdditionalECs]) VALUES (3, N'model_a', N'Guest Model A', NULL, 3, 4, 0, 1.5, 4, N'xxxxxxxxxxxx|xxxx00000000|xxxx00000000|xxxx00000000|xxxx00000000|xxxx00000000|xxxx00000000|xxxx00000000|xxxx00000000|xxxx00000000|xxxx00000000|xxxx00000000|xxxx00000000|xxxx00000000|xxxxxxxxxxxx|xxxxxxxxxxxx', N'ECWallpaper,ECFlooring')
SET IDENTITY_INSERT [dbo].[RoomModels] OFF
/****** Object:  Table [dbo].[RoomCategories]    Script Date: 12/02/2009 20:58:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[RoomCategories]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[RoomCategories](
	[RoomCategoryID] [int] IDENTITY(1,1) NOT NULL,
	[RoomCategoryName] [varchar](100) NOT NULL,
	[RoomCategoryParent] [int] NULL,
	[CanTrade] [bit] NOT NULL,
	[IsVisible] [bit] NOT NULL,
	[CategoryOrder] [int] NOT NULL,
	[SystemCategory] [bit] NOT NULL,
 CONSTRAINT [PK_RoomCategories] PRIMARY KEY CLUSTERED 
(
	[RoomCategoryID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_PADDING OFF
GO
SET IDENTITY_INSERT [dbo].[RoomCategories] ON
INSERT [dbo].[RoomCategories] ([RoomCategoryID], [RoomCategoryName], [RoomCategoryParent], [CanTrade], [IsVisible], [CategoryOrder], [SystemCategory]) VALUES (3, N'Public Rooms', NULL, 0, 1, 0, 1)
INSERT [dbo].[RoomCategories] ([RoomCategoryID], [RoomCategoryName], [RoomCategoryParent], [CanTrade], [IsVisible], [CategoryOrder], [SystemCategory]) VALUES (4, N'Private Rooms', NULL, 0, 1, 0, 0)
INSERT [dbo].[RoomCategories] ([RoomCategoryID], [RoomCategoryName], [RoomCategoryParent], [CanTrade], [IsVisible], [CategoryOrder], [SystemCategory]) VALUES (5, N'Chat, Chill and Discussion Rooms', 4, 0, 1, 1, 0)
INSERT [dbo].[RoomCategories] ([RoomCategoryID], [RoomCategoryName], [RoomCategoryParent], [CanTrade], [IsVisible], [CategoryOrder], [SystemCategory]) VALUES (8, N'No Category', 4, 0, 0, 0, 1)
SET IDENTITY_INSERT [dbo].[RoomCategories] OFF
/****** Object:  Table [dbo].[Roles]    Script Date: 12/02/2009 20:58:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Roles]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Roles](
	[RoleID] [int] IDENTITY(1,1) NOT NULL,
	[RoleName] [varchar](50) NOT NULL,
	[InheritedRole] [int] NULL,
 CONSTRAINT [PK_Roles] PRIMARY KEY CLUSTERED 
(
	[RoleID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_PADDING OFF
GO
SET IDENTITY_INSERT [dbo].[Roles] ON
INSERT [dbo].[Roles] ([RoleID], [RoleName], [InheritedRole]) VALUES (1, N'User', NULL)
INSERT [dbo].[Roles] ([RoleID], [RoleName], [InheritedRole]) VALUES (2, N'VIP', 1)
INSERT [dbo].[Roles] ([RoleID], [RoleName], [InheritedRole]) VALUES (3, N'Trainee Hobba', 2)
INSERT [dbo].[Roles] ([RoleID], [RoleName], [InheritedRole]) VALUES (4, N'Hobba', 3)
INSERT [dbo].[Roles] ([RoleID], [RoleName], [InheritedRole]) VALUES (5, N'Supervisor Hobba', 4)
INSERT [dbo].[Roles] ([RoleID], [RoleName], [InheritedRole]) VALUES (6, N'Moderator', 5)
INSERT [dbo].[Roles] ([RoleID], [RoleName], [InheritedRole]) VALUES (7, N'Admin', 6)
SET IDENTITY_INSERT [dbo].[Roles] OFF
/****** Object:  Table [dbo].[Vouchers]    Script Date: 12/02/2009 20:58:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Vouchers]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Vouchers](
	[Code] [varchar](15) NOT NULL,
	[PayloadType] [varchar](10) NOT NULL,
	[Payload] [varchar](30) NOT NULL,
 CONSTRAINT [PK_Vouchers] PRIMARY KEY CLUSTERED 
(
	[Code] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_PADDING OFF
GO
INSERT [dbo].[Vouchers] ([Code], [PayloadType], [Payload]) VALUES (N'meep', N'credits', N'10')
/****** Object:  Table [dbo].[Badges]    Script Date: 12/02/2009 20:58:49 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Badges]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Badges](
	[BadgeID] [int] IDENTITY(1,1) NOT NULL,
	[BadgeName] [varchar](10) NOT NULL,
	[RoleID] [int] NOT NULL,
 CONSTRAINT [PK_Badges] PRIMARY KEY CLUSTERED 
(
	[BadgeID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_PADDING OFF
GO
SET IDENTITY_INSERT [dbo].[Badges] ON
INSERT [dbo].[Badges] ([BadgeID], [BadgeName], [RoleID]) VALUES (1, N'ADM', 7)
SET IDENTITY_INSERT [dbo].[Badges] OFF
/****** Object:  Table [dbo].[Users]    Script Date: 12/02/2009 20:58:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Users]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Users](
	[UserID] [int] IDENTITY(1,1) NOT NULL,
	[Username] [varchar](50) NOT NULL,
	[Password] [varchar](50) NOT NULL,
	[RoleID] [int] NOT NULL,
	[Sex] [varchar](1) NOT NULL,
	[Figure] [varchar](500) NOT NULL,
	[Motto] [varchar](500) NOT NULL,
	[Email] [varchar](500) NOT NULL,
	[Dob] [varchar](500) NOT NULL,
	[Credits] [int] NOT NULL,
	[Tickets] [int] NOT NULL,
	[Film] [int] NOT NULL,
	[PoolFigure] [nvarchar](50) NOT NULL,
	[ClubDaysRemaining] [int] NOT NULL,
	[ClubMonthsRemaining] [int] NOT NULL,
	[ClubMonthsElapsed] [int] NOT NULL,
	[CurrentBadge] [varchar](10) NULL,
	[LastLogin] [datetime] NOT NULL,
 CONSTRAINT [PK_Users] PRIMARY KEY CLUSTERED 
(
	[UserID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_PADDING OFF
GO
SET IDENTITY_INSERT [dbo].[Users] ON
INSERT [dbo].[Users] ([UserID], [Username], [Password], [RoleID], [Sex], [Figure], [Motto], [Email], [Dob], [Credits], [Tickets], [Film], [PoolFigure], [ClubDaysRemaining], [ClubMonthsRemaining], [ClubMonthsElapsed], [CurrentBadge], [LastLogin]) VALUES (1, N'Joeh', N'Test', 7, N'm', N'8000418001281013050180404', N'Meep!', N'joe.hegarty@gmail.com', N'1900-01-01', 10, 5, 15, N' ', 0, 0, 0, N'ADM', CAST(0x00009CD3015920DA AS DateTime))
INSERT [dbo].[Users] ([UserID], [Username], [Password], [RoleID], [Sex], [Figure], [Motto], [Email], [Dob], [Credits], [Tickets], [Film], [PoolFigure], [ClubDaysRemaining], [ClubMonthsRemaining], [ClubMonthsElapsed], [CurrentBadge], [LastLogin]) VALUES (3, N'Nils', N'monkeyball', 1, N'F', N'8580161001695017400166501', N'iM NO NIGGERrrr', N'nils@nillus.net', N'01.01.1970', 320, 0, 0, N'', 0, 0, 0, NULL, CAST(0x00009CD10187347C AS DateTime))
INSERT [dbo].[Users] ([UserID], [Username], [Password], [RoleID], [Sex], [Figure], [Motto], [Email], [Dob], [Credits], [Tickets], [Film], [PoolFigure], [ClubDaysRemaining], [ClubMonthsRemaining], [ClubMonthsElapsed], [CurrentBadge], [LastLogin]) VALUES (4, N'AndyWarhol', N'lolwut', 1, N'M', N'8500119501285012950125001', N'Stockholm', N'andy@warhol.com', N'14.07.1991', 10, 0, 0, N'', 0, 0, 0, NULL, CAST(0x00009CD10128E40F AS DateTime))
SET IDENTITY_INSERT [dbo].[Users] OFF
/****** Object:  Table [dbo].[RoleAccess]    Script Date: 12/02/2009 20:58:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[RoleAccess]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[RoleAccess](
	[RoleAccessID] [int] IDENTITY(1,1) NOT NULL,
	[RoleID] [int] NOT NULL,
	[AccessName] [varchar](50) NOT NULL,
 CONSTRAINT [PK_RoleAccess] PRIMARY KEY CLUSTERED 
(
	[RoleAccessID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_PADDING OFF
GO
SET IDENTITY_INSERT [dbo].[RoleAccess] ON
INSERT [dbo].[RoleAccess] ([RoleAccessID], [RoleID], [AccessName]) VALUES (1, 1, N'fuse_login')
SET IDENTITY_INSERT [dbo].[RoleAccess] OFF
/****** Object:  Table [dbo].[FurniDefinitions]    Script Date: 12/02/2009 20:58:49 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[FurniDefinitions]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[FurniDefinitions](
	[DefinitionID] [int] IDENTITY(1,1) NOT NULL,
	[PhysicsObjectID] [int] NOT NULL,
	[Sprite] [nvarchar](100) NOT NULL,
	[Colour] [nvarchar](100) NULL,
	[CanBeTraded] [bit] NOT NULL,
	[FurniType] [int] NOT NULL CONSTRAINT [DF_FurniDefinitions_FurniType]  DEFAULT ((0)),
 CONSTRAINT [PK_FurniDefinitions] PRIMARY KEY CLUSTERED 
(
	[DefinitionID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[FurniDefinitions] ON
INSERT [dbo].[FurniDefinitions] ([DefinitionID], [PhysicsObjectID], [Sprite], [Colour], [CanBeTraded], [FurniType]) VALUES (1, 2, N'crl_lamp', NULL, 0, 0)
INSERT [dbo].[FurniDefinitions] ([DefinitionID], [PhysicsObjectID], [Sprite], [Colour], [CanBeTraded], [FurniType]) VALUES (2, 3, N'crl_sofa2c', NULL, 0, 0)
INSERT [dbo].[FurniDefinitions] ([DefinitionID], [PhysicsObjectID], [Sprite], [Colour], [CanBeTraded], [FurniType]) VALUES (3, 4, N'crl_sofa2b', NULL, 0, 0)
INSERT [dbo].[FurniDefinitions] ([DefinitionID], [PhysicsObjectID], [Sprite], [Colour], [CanBeTraded], [FurniType]) VALUES (4, 5, N'crl_sofa2a', NULL, 0, 0)
INSERT [dbo].[FurniDefinitions] ([DefinitionID], [PhysicsObjectID], [Sprite], [Colour], [CanBeTraded], [FurniType]) VALUES (5, 6, N'crl_chair', NULL, 0, 0)
INSERT [dbo].[FurniDefinitions] ([DefinitionID], [PhysicsObjectID], [Sprite], [Colour], [CanBeTraded], [FurniType]) VALUES (6, 7, N'crl_pillar', NULL, 0, 0)
INSERT [dbo].[FurniDefinitions] ([DefinitionID], [PhysicsObjectID], [Sprite], [Colour], [CanBeTraded], [FurniType]) VALUES (7, 8, N'crl_table1b', NULL, 0, 0)
INSERT [dbo].[FurniDefinitions] ([DefinitionID], [PhysicsObjectID], [Sprite], [Colour], [CanBeTraded], [FurniType]) VALUES (8, 9, N'crl_sofa1c', NULL, 0, 0)
INSERT [dbo].[FurniDefinitions] ([DefinitionID], [PhysicsObjectID], [Sprite], [Colour], [CanBeTraded], [FurniType]) VALUES (9, 10, N'crl_table2b', NULL, 0, 0)
INSERT [dbo].[FurniDefinitions] ([DefinitionID], [PhysicsObjectID], [Sprite], [Colour], [CanBeTraded], [FurniType]) VALUES (10, 11, N'crl_table2a', NULL, 0, 0)
INSERT [dbo].[FurniDefinitions] ([DefinitionID], [PhysicsObjectID], [Sprite], [Colour], [CanBeTraded], [FurniType]) VALUES (11, 12, N'crl_table1a', NULL, 0, 0)
INSERT [dbo].[FurniDefinitions] ([DefinitionID], [PhysicsObjectID], [Sprite], [Colour], [CanBeTraded], [FurniType]) VALUES (12, 13, N'crl_sofa1b', NULL, 0, 0)
INSERT [dbo].[FurniDefinitions] ([DefinitionID], [PhysicsObjectID], [Sprite], [Colour], [CanBeTraded], [FurniType]) VALUES (13, 14, N'crl_wall2a', NULL, 0, 0)
INSERT [dbo].[FurniDefinitions] ([DefinitionID], [PhysicsObjectID], [Sprite], [Colour], [CanBeTraded], [FurniType]) VALUES (14, 15, N'crl_sofa1a', NULL, 0, 0)
INSERT [dbo].[FurniDefinitions] ([DefinitionID], [PhysicsObjectID], [Sprite], [Colour], [CanBeTraded], [FurniType]) VALUES (15, 16, N'crl_sofa3c', NULL, 0, 0)
INSERT [dbo].[FurniDefinitions] ([DefinitionID], [PhysicsObjectID], [Sprite], [Colour], [CanBeTraded], [FurniType]) VALUES (16, 17, N'crl_sofa3b', NULL, 0, 0)
INSERT [dbo].[FurniDefinitions] ([DefinitionID], [PhysicsObjectID], [Sprite], [Colour], [CanBeTraded], [FurniType]) VALUES (17, 18, N'crl_sofa3a', NULL, 0, 0)
INSERT [dbo].[FurniDefinitions] ([DefinitionID], [PhysicsObjectID], [Sprite], [Colour], [CanBeTraded], [FurniType]) VALUES (18, 19, N'crl_barchair2', NULL, 0, 0)
INSERT [dbo].[FurniDefinitions] ([DefinitionID], [PhysicsObjectID], [Sprite], [Colour], [CanBeTraded], [FurniType]) VALUES (19, 20, N'crl_tablebar', NULL, 0, 0)
INSERT [dbo].[FurniDefinitions] ([DefinitionID], [PhysicsObjectID], [Sprite], [Colour], [CanBeTraded], [FurniType]) VALUES (20, 21, N'crl_pillar2', NULL, 0, 0)
INSERT [dbo].[FurniDefinitions] ([DefinitionID], [PhysicsObjectID], [Sprite], [Colour], [CanBeTraded], [FurniType]) VALUES (21, 22, N'crl_desk1a', NULL, 0, 0)
INSERT [dbo].[FurniDefinitions] ([DefinitionID], [PhysicsObjectID], [Sprite], [Colour], [CanBeTraded], [FurniType]) VALUES (22, 23, N'crl_deski', NULL, 0, 0)
INSERT [dbo].[FurniDefinitions] ([DefinitionID], [PhysicsObjectID], [Sprite], [Colour], [CanBeTraded], [FurniType]) VALUES (23, 24, N'crl_deskh', NULL, 0, 0)
INSERT [dbo].[FurniDefinitions] ([DefinitionID], [PhysicsObjectID], [Sprite], [Colour], [CanBeTraded], [FurniType]) VALUES (24, 25, N'crl_deskg', NULL, 0, 0)
INSERT [dbo].[FurniDefinitions] ([DefinitionID], [PhysicsObjectID], [Sprite], [Colour], [CanBeTraded], [FurniType]) VALUES (25, 26, N'crl_deskf', NULL, 0, 0)
INSERT [dbo].[FurniDefinitions] ([DefinitionID], [PhysicsObjectID], [Sprite], [Colour], [CanBeTraded], [FurniType]) VALUES (26, 27, N'crl_deske', NULL, 0, 0)
INSERT [dbo].[FurniDefinitions] ([DefinitionID], [PhysicsObjectID], [Sprite], [Colour], [CanBeTraded], [FurniType]) VALUES (27, 28, N'crl_wallb', NULL, 0, 0)
INSERT [dbo].[FurniDefinitions] ([DefinitionID], [PhysicsObjectID], [Sprite], [Colour], [CanBeTraded], [FurniType]) VALUES (28, 29, N'crl_walla', NULL, 0, 0)
INSERT [dbo].[FurniDefinitions] ([DefinitionID], [PhysicsObjectID], [Sprite], [Colour], [CanBeTraded], [FurniType]) VALUES (29, 30, N'crl_desk1b', NULL, 0, 0)
INSERT [dbo].[FurniDefinitions] ([DefinitionID], [PhysicsObjectID], [Sprite], [Colour], [CanBeTraded], [FurniType]) VALUES (30, 31, N'crl_desk1c', NULL, 0, 0)
INSERT [dbo].[FurniDefinitions] ([DefinitionID], [PhysicsObjectID], [Sprite], [Colour], [CanBeTraded], [FurniType]) VALUES (31, 32, N'crl_desk1d', NULL, 0, 0)
INSERT [dbo].[FurniDefinitions] ([DefinitionID], [PhysicsObjectID], [Sprite], [Colour], [CanBeTraded], [FurniType]) VALUES (32, 33, N'crl_lamp2', NULL, 0, 0)
INSERT [dbo].[FurniDefinitions] ([DefinitionID], [PhysicsObjectID], [Sprite], [Colour], [CanBeTraded], [FurniType]) VALUES (33, 34, N'crl_cabinet2', NULL, 0, 0)
INSERT [dbo].[FurniDefinitions] ([DefinitionID], [PhysicsObjectID], [Sprite], [Colour], [CanBeTraded], [FurniType]) VALUES (34, 35, N'crl_cabinet1', NULL, 0, 0)
SET IDENTITY_INSERT [dbo].[FurniDefinitions] OFF
/****** Object:  Table [dbo].[Rooms]    Script Date: 12/02/2009 20:58:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Rooms]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Rooms](
	[RoomID] [int] IDENTITY(10000,1) NOT NULL,
	[RoomName] [varchar](100) NOT NULL,
	[RoomFriendlyName] [varchar](100) NOT NULL,
	[RoomDescription] [varchar](500) NOT NULL,
	[ModelID] [int] NOT NULL,
	[OwnerID] [int] NULL,
	[FloorID] [int] NULL,
	[WallpaperID] [int] NULL,
	[CategoryID] [int] NOT NULL,
	[MaxGuests] [int] NOT NULL,
	[RoomStatus] [int] NULL,
	[ShowOwner] [bit] NULL,
	[SuperUsers] [bit] NULL,
	[Password] [nvarchar](50) NULL,
 CONSTRAINT [PK_Rooms] PRIMARY KEY CLUSTERED 
(
	[RoomID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_PADDING OFF
GO
SET IDENTITY_INSERT [dbo].[Rooms] ON
INSERT [dbo].[Rooms] ([RoomID], [RoomName], [RoomFriendlyName], [RoomDescription], [ModelID], [OwnerID], [FloorID], [WallpaperID], [CategoryID], [MaxGuests], [RoomStatus], [ShowOwner], [SuperUsers], [Password]) VALUES (10001, N'newbie_lounge', N'newbie_lounge', N'newbie_lounge', 2, NULL, NULL, NULL, 3, 25, NULL, NULL, NULL, NULL)
INSERT [dbo].[Rooms] ([RoomID], [RoomName], [RoomFriendlyName], [RoomDescription], [ModelID], [OwnerID], [FloorID], [WallpaperID], [CategoryID], [MaxGuests], [RoomStatus], [ShowOwner], [SuperUsers], [Password]) VALUES (10004, N'Joeh''s Room', N'Joeh''s Room', N'Test', 3, 1, 10, 11, 5, 25, 0, 1, 0, NULL)
SET IDENTITY_INSERT [dbo].[Rooms] OFF
/****** Object:  Table [dbo].[Furni]    Script Date: 12/02/2009 20:58:49 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Furni]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Furni](
	[FurniID] [int] IDENTITY(1,1) NOT NULL,
	[DefinitionID] [int] NOT NULL,
	[RoomID] [int] NULL,
	[PositionX] [int] NULL,
	[PositionY] [int] NULL,
	[PositionZ] [float] NULL,
	[Orientation] [int] NULL,
	[OwnerID] [int] NULL,
 CONSTRAINT [PK_Furni] PRIMARY KEY CLUSTERED 
(
	[FurniID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[Furni] ON
INSERT [dbo].[Furni] ([FurniID], [DefinitionID], [RoomID], [PositionX], [PositionY], [PositionZ], [Orientation], [OwnerID]) VALUES (1, 1, 10001, 16, 0, 0, 0, NULL)
INSERT [dbo].[Furni] ([FurniID], [DefinitionID], [RoomID], [PositionX], [PositionY], [PositionZ], [Orientation], [OwnerID]) VALUES (2, 2, 10001, 17, 0, 0, 4, NULL)
INSERT [dbo].[Furni] ([FurniID], [DefinitionID], [RoomID], [PositionX], [PositionY], [PositionZ], [Orientation], [OwnerID]) VALUES (3, 3, 10001, 18, 0, 0, 4, NULL)
INSERT [dbo].[Furni] ([FurniID], [DefinitionID], [RoomID], [PositionX], [PositionY], [PositionZ], [Orientation], [OwnerID]) VALUES (4, 4, 10001, 19, 0, 0, 4, NULL)
INSERT [dbo].[Furni] ([FurniID], [DefinitionID], [RoomID], [PositionX], [PositionY], [PositionZ], [Orientation], [OwnerID]) VALUES (5, 1, 10001, 20, 0, 0, 0, NULL)
INSERT [dbo].[Furni] ([FurniID], [DefinitionID], [RoomID], [PositionX], [PositionY], [PositionZ], [Orientation], [OwnerID]) VALUES (6, 5, 10001, 16, 1, 0, 2, NULL)
INSERT [dbo].[Furni] ([FurniID], [DefinitionID], [RoomID], [PositionX], [PositionY], [PositionZ], [Orientation], [OwnerID]) VALUES (7, 1, 10001, 7, 2, 0, 0, NULL)
INSERT [dbo].[Furni] ([FurniID], [DefinitionID], [RoomID], [PositionX], [PositionY], [PositionZ], [Orientation], [OwnerID]) VALUES (8, 1, 10001, 11, 2, 0, 0, NULL)
INSERT [dbo].[Furni] ([FurniID], [DefinitionID], [RoomID], [PositionX], [PositionY], [PositionZ], [Orientation], [OwnerID]) VALUES (9, 5, 10001, 16, 2, 0, 2, NULL)
INSERT [dbo].[Furni] ([FurniID], [DefinitionID], [RoomID], [PositionX], [PositionY], [PositionZ], [Orientation], [OwnerID]) VALUES (10, 6, 10001, 5, 3, 0, 0, NULL)
INSERT [dbo].[Furni] ([FurniID], [DefinitionID], [RoomID], [PositionX], [PositionY], [PositionZ], [Orientation], [OwnerID]) VALUES (11, 5, 10001, 7, 3, 0, 2, NULL)
INSERT [dbo].[Furni] ([FurniID], [DefinitionID], [RoomID], [PositionX], [PositionY], [PositionZ], [Orientation], [OwnerID]) VALUES (12, 7, 10001, 9, 3, 0, 0, NULL)
INSERT [dbo].[Furni] ([FurniID], [DefinitionID], [RoomID], [PositionX], [PositionY], [PositionZ], [Orientation], [OwnerID]) VALUES (13, 8, 10001, 11, 3, 0, 6, NULL)
INSERT [dbo].[Furni] ([FurniID], [DefinitionID], [RoomID], [PositionX], [PositionY], [PositionZ], [Orientation], [OwnerID]) VALUES (14, 5, 10001, 16, 3, 0, 2, NULL)
INSERT [dbo].[Furni] ([FurniID], [DefinitionID], [RoomID], [PositionX], [PositionY], [PositionZ], [Orientation], [OwnerID]) VALUES (15, 9, 10001, 19, 3, 0, 0, NULL)
INSERT [dbo].[Furni] ([FurniID], [DefinitionID], [RoomID], [PositionX], [PositionY], [PositionZ], [Orientation], [OwnerID]) VALUES (16, 10, 10001, 20, 3, 0, 0, NULL)
INSERT [dbo].[Furni] ([FurniID], [DefinitionID], [RoomID], [PositionX], [PositionY], [PositionZ], [Orientation], [OwnerID]) VALUES (17, 1, 10001, 0, 4, 0, 0, NULL)
INSERT [dbo].[Furni] ([FurniID], [DefinitionID], [RoomID], [PositionX], [PositionY], [PositionZ], [Orientation], [OwnerID]) VALUES (18, 2, 10001, 1, 4, 0, 4, NULL)
INSERT [dbo].[Furni] ([FurniID], [DefinitionID], [RoomID], [PositionX], [PositionY], [PositionZ], [Orientation], [OwnerID]) VALUES (19, 3, 10001, 2, 4, 0, 4, NULL)
INSERT [dbo].[Furni] ([FurniID], [DefinitionID], [RoomID], [PositionX], [PositionY], [PositionZ], [Orientation], [OwnerID]) VALUES (20, 4, 10001, 3, 4, 0, 4, NULL)
INSERT [dbo].[Furni] ([FurniID], [DefinitionID], [RoomID], [PositionX], [PositionY], [PositionZ], [Orientation], [OwnerID]) VALUES (21, 1, 10001, 4, 4, 0, 0, NULL)
INSERT [dbo].[Furni] ([FurniID], [DefinitionID], [RoomID], [PositionX], [PositionY], [PositionZ], [Orientation], [OwnerID]) VALUES (22, 11, 10001, 9, 4, 0, 0, NULL)
INSERT [dbo].[Furni] ([FurniID], [DefinitionID], [RoomID], [PositionX], [PositionY], [PositionZ], [Orientation], [OwnerID]) VALUES (23, 12, 10001, 11, 4, 0, 6, NULL)
INSERT [dbo].[Furni] ([FurniID], [DefinitionID], [RoomID], [PositionX], [PositionY], [PositionZ], [Orientation], [OwnerID]) VALUES (24, 13, 10001, 15, 4, 0, 0, NULL)
INSERT [dbo].[Furni] ([FurniID], [DefinitionID], [RoomID], [PositionX], [PositionY], [PositionZ], [Orientation], [OwnerID]) VALUES (25, 1, 10001, 16, 4, 0, 0, NULL)
INSERT [dbo].[Furni] ([FurniID], [DefinitionID], [RoomID], [PositionX], [PositionY], [PositionZ], [Orientation], [OwnerID]) VALUES (26, 5, 10001, 0, 5, 0, 2, NULL)
INSERT [dbo].[Furni] ([FurniID], [DefinitionID], [RoomID], [PositionX], [PositionY], [PositionZ], [Orientation], [OwnerID]) VALUES (27, 5, 10001, 7, 5, 0, 2, NULL)
INSERT [dbo].[Furni] ([FurniID], [DefinitionID], [RoomID], [PositionX], [PositionY], [PositionZ], [Orientation], [OwnerID]) VALUES (28, 14, 10001, 11, 5, 0, 6, NULL)
INSERT [dbo].[Furni] ([FurniID], [DefinitionID], [RoomID], [PositionX], [PositionY], [PositionZ], [Orientation], [OwnerID]) VALUES (29, 9, 10001, 2, 6, 0, 0, NULL)
INSERT [dbo].[Furni] ([FurniID], [DefinitionID], [RoomID], [PositionX], [PositionY], [PositionZ], [Orientation], [OwnerID]) VALUES (30, 10, 10001, 3, 6, 0, 0, NULL)
INSERT [dbo].[Furni] ([FurniID], [DefinitionID], [RoomID], [PositionX], [PositionY], [PositionZ], [Orientation], [OwnerID]) VALUES (31, 1, 10001, 11, 6, 0, 0, NULL)
INSERT [dbo].[Furni] ([FurniID], [DefinitionID], [RoomID], [PositionX], [PositionY], [PositionZ], [Orientation], [OwnerID]) VALUES (32, 5, 10001, 0, 7, 0, 2, NULL)
INSERT [dbo].[Furni] ([FurniID], [DefinitionID], [RoomID], [PositionX], [PositionY], [PositionZ], [Orientation], [OwnerID]) VALUES (33, 1, 10001, 0, 8, 0, 0, NULL)
INSERT [dbo].[Furni] ([FurniID], [DefinitionID], [RoomID], [PositionX], [PositionY], [PositionZ], [Orientation], [OwnerID]) VALUES (34, 15, 10001, 1, 8, 0, 0, NULL)
INSERT [dbo].[Furni] ([FurniID], [DefinitionID], [RoomID], [PositionX], [PositionY], [PositionZ], [Orientation], [OwnerID]) VALUES (35, 16, 10001, 2, 8, 0, 0, NULL)
INSERT [dbo].[Furni] ([FurniID], [DefinitionID], [RoomID], [PositionX], [PositionY], [PositionZ], [Orientation], [OwnerID]) VALUES (36, 17, 10001, 3, 8, 0, 0, NULL)
INSERT [dbo].[Furni] ([FurniID], [DefinitionID], [RoomID], [PositionX], [PositionY], [PositionZ], [Orientation], [OwnerID]) VALUES (37, 1, 10001, 4, 8, 0, 0, NULL)
INSERT [dbo].[Furni] ([FurniID], [DefinitionID], [RoomID], [PositionX], [PositionY], [PositionZ], [Orientation], [OwnerID]) VALUES (38, 18, 10001, 19, 8, 0, 0, NULL)
INSERT [dbo].[Furni] ([FurniID], [DefinitionID], [RoomID], [PositionX], [PositionY], [PositionZ], [Orientation], [OwnerID]) VALUES (39, 19, 10001, 20, 8, 0, 0, NULL)
INSERT [dbo].[Furni] ([FurniID], [DefinitionID], [RoomID], [PositionX], [PositionY], [PositionZ], [Orientation], [OwnerID]) VALUES (40, 18, 10001, 21, 8, 0, 0, NULL)
INSERT [dbo].[Furni] ([FurniID], [DefinitionID], [RoomID], [PositionX], [PositionY], [PositionZ], [Orientation], [OwnerID]) VALUES (41, 20, 10001, 5, 9, 0, 0, NULL)
INSERT [dbo].[Furni] ([FurniID], [DefinitionID], [RoomID], [PositionX], [PositionY], [PositionZ], [Orientation], [OwnerID]) VALUES (42, 6, 10001, 9, 9, 0, 0, NULL)
INSERT [dbo].[Furni] ([FurniID], [DefinitionID], [RoomID], [PositionX], [PositionY], [PositionZ], [Orientation], [OwnerID]) VALUES (43, 21, 10001, 8, 15, 0, 0, NULL)
INSERT [dbo].[Furni] ([FurniID], [DefinitionID], [RoomID], [PositionX], [PositionY], [PositionZ], [Orientation], [OwnerID]) VALUES (44, 22, 10001, 9, 15, 0, 0, NULL)
INSERT [dbo].[Furni] ([FurniID], [DefinitionID], [RoomID], [PositionX], [PositionY], [PositionZ], [Orientation], [OwnerID]) VALUES (45, 23, 10001, 10, 15, 0, 0, NULL)
INSERT [dbo].[Furni] ([FurniID], [DefinitionID], [RoomID], [PositionX], [PositionY], [PositionZ], [Orientation], [OwnerID]) VALUES (46, 24, 10001, 10, 16, 0, 0, NULL)
INSERT [dbo].[Furni] ([FurniID], [DefinitionID], [RoomID], [PositionX], [PositionY], [PositionZ], [Orientation], [OwnerID]) VALUES (47, 25, 10001, 10, 17, 0, 0, NULL)
INSERT [dbo].[Furni] ([FurniID], [DefinitionID], [RoomID], [PositionX], [PositionY], [PositionZ], [Orientation], [OwnerID]) VALUES (48, 26, 10001, 10, 18, 0, 0, NULL)
INSERT [dbo].[Furni] ([FurniID], [DefinitionID], [RoomID], [PositionX], [PositionY], [PositionZ], [Orientation], [OwnerID]) VALUES (49, 26, 10001, 10, 19, 0, 0, NULL)
INSERT [dbo].[Furni] ([FurniID], [DefinitionID], [RoomID], [PositionX], [PositionY], [PositionZ], [Orientation], [OwnerID]) VALUES (50, 26, 10001, 10, 20, 0, 0, NULL)
INSERT [dbo].[Furni] ([FurniID], [DefinitionID], [RoomID], [PositionX], [PositionY], [PositionZ], [Orientation], [OwnerID]) VALUES (51, 26, 10001, 10, 21, 0, 0, NULL)
INSERT [dbo].[Furni] ([FurniID], [DefinitionID], [RoomID], [PositionX], [PositionY], [PositionZ], [Orientation], [OwnerID]) VALUES (52, 26, 10001, 10, 22, 0, 0, NULL)
INSERT [dbo].[Furni] ([FurniID], [DefinitionID], [RoomID], [PositionX], [PositionY], [PositionZ], [Orientation], [OwnerID]) VALUES (53, 26, 10001, 10, 23, 0, 0, NULL)
INSERT [dbo].[Furni] ([FurniID], [DefinitionID], [RoomID], [PositionX], [PositionY], [PositionZ], [Orientation], [OwnerID]) VALUES (54, 27, 10001, 7, 24, 0, 0, NULL)
INSERT [dbo].[Furni] ([FurniID], [DefinitionID], [RoomID], [PositionX], [PositionY], [PositionZ], [Orientation], [OwnerID]) VALUES (55, 26, 10001, 10, 24, 0, 0, NULL)
INSERT [dbo].[Furni] ([FurniID], [DefinitionID], [RoomID], [PositionX], [PositionY], [PositionZ], [Orientation], [OwnerID]) VALUES (56, 28, 10001, 7, 25, 0, 0, NULL)
INSERT [dbo].[Furni] ([FurniID], [DefinitionID], [RoomID], [PositionX], [PositionY], [PositionZ], [Orientation], [OwnerID]) VALUES (57, 29, 10001, 8, 25, 0, 0, NULL)
INSERT [dbo].[Furni] ([FurniID], [DefinitionID], [RoomID], [PositionX], [PositionY], [PositionZ], [Orientation], [OwnerID]) VALUES (58, 30, 10001, 9, 25, 0, 0, NULL)
INSERT [dbo].[Furni] ([FurniID], [DefinitionID], [RoomID], [PositionX], [PositionY], [PositionZ], [Orientation], [OwnerID]) VALUES (59, 31, 10001, 10, 25, 0, 0, NULL)
INSERT [dbo].[Furni] ([FurniID], [DefinitionID], [RoomID], [PositionX], [PositionY], [PositionZ], [Orientation], [OwnerID]) VALUES (60, 32, 10001, 12, 27, 0, 0, NULL)
INSERT [dbo].[Furni] ([FurniID], [DefinitionID], [RoomID], [PositionX], [PositionY], [PositionZ], [Orientation], [OwnerID]) VALUES (61, 33, 10001, 13, 27, 0, 0, NULL)
INSERT [dbo].[Furni] ([FurniID], [DefinitionID], [RoomID], [PositionX], [PositionY], [PositionZ], [Orientation], [OwnerID]) VALUES (62, 34, 10001, 14, 27, 0, 0, NULL)
INSERT [dbo].[Furni] ([FurniID], [DefinitionID], [RoomID], [PositionX], [PositionY], [PositionZ], [Orientation], [OwnerID]) VALUES (63, 32, 10001, 15, 27, 0, 0, NULL)
SET IDENTITY_INSERT [dbo].[Furni] OFF
/****** Object:  ForeignKey [FK_Badges_Roles]    Script Date: 12/02/2009 20:58:49 ******/
IF NOT EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_Badges_Roles]') AND parent_object_id = OBJECT_ID(N'[dbo].[Badges]'))
ALTER TABLE [dbo].[Badges]  WITH CHECK ADD  CONSTRAINT [FK_Badges_Roles] FOREIGN KEY([RoleID])
REFERENCES [dbo].[Roles] ([RoleID])
GO
IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_Badges_Roles]') AND parent_object_id = OBJECT_ID(N'[dbo].[Badges]'))
ALTER TABLE [dbo].[Badges] CHECK CONSTRAINT [FK_Badges_Roles]
GO
/****** Object:  ForeignKey [FK_Furni_Furni]    Script Date: 12/02/2009 20:58:49 ******/
IF NOT EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_Furni_Furni]') AND parent_object_id = OBJECT_ID(N'[dbo].[Furni]'))
ALTER TABLE [dbo].[Furni]  WITH CHECK ADD  CONSTRAINT [FK_Furni_Furni] FOREIGN KEY([FurniID])
REFERENCES [dbo].[Furni] ([FurniID])
GO
IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_Furni_Furni]') AND parent_object_id = OBJECT_ID(N'[dbo].[Furni]'))
ALTER TABLE [dbo].[Furni] CHECK CONSTRAINT [FK_Furni_Furni]
GO
/****** Object:  ForeignKey [FK_Furni_FurniDefinitions]    Script Date: 12/02/2009 20:58:49 ******/
IF NOT EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_Furni_FurniDefinitions]') AND parent_object_id = OBJECT_ID(N'[dbo].[Furni]'))
ALTER TABLE [dbo].[Furni]  WITH CHECK ADD  CONSTRAINT [FK_Furni_FurniDefinitions] FOREIGN KEY([DefinitionID])
REFERENCES [dbo].[FurniDefinitions] ([DefinitionID])
GO
IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_Furni_FurniDefinitions]') AND parent_object_id = OBJECT_ID(N'[dbo].[Furni]'))
ALTER TABLE [dbo].[Furni] CHECK CONSTRAINT [FK_Furni_FurniDefinitions]
GO
/****** Object:  ForeignKey [FK_Furni_Rooms]    Script Date: 12/02/2009 20:58:49 ******/
IF NOT EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_Furni_Rooms]') AND parent_object_id = OBJECT_ID(N'[dbo].[Furni]'))
ALTER TABLE [dbo].[Furni]  WITH CHECK ADD  CONSTRAINT [FK_Furni_Rooms] FOREIGN KEY([RoomID])
REFERENCES [dbo].[Rooms] ([RoomID])
GO
IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_Furni_Rooms]') AND parent_object_id = OBJECT_ID(N'[dbo].[Furni]'))
ALTER TABLE [dbo].[Furni] CHECK CONSTRAINT [FK_Furni_Rooms]
GO
/****** Object:  ForeignKey [FK_Furni_Users]    Script Date: 12/02/2009 20:58:49 ******/
IF NOT EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_Furni_Users]') AND parent_object_id = OBJECT_ID(N'[dbo].[Furni]'))
ALTER TABLE [dbo].[Furni]  WITH CHECK ADD  CONSTRAINT [FK_Furni_Users] FOREIGN KEY([OwnerID])
REFERENCES [dbo].[Users] ([UserID])
GO
IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_Furni_Users]') AND parent_object_id = OBJECT_ID(N'[dbo].[Furni]'))
ALTER TABLE [dbo].[Furni] CHECK CONSTRAINT [FK_Furni_Users]
GO
/****** Object:  ForeignKey [FK_FurniDefinitions_PhysicsObjects]    Script Date: 12/02/2009 20:58:49 ******/
IF NOT EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_FurniDefinitions_PhysicsObjects]') AND parent_object_id = OBJECT_ID(N'[dbo].[FurniDefinitions]'))
ALTER TABLE [dbo].[FurniDefinitions]  WITH CHECK ADD  CONSTRAINT [FK_FurniDefinitions_PhysicsObjects] FOREIGN KEY([PhysicsObjectID])
REFERENCES [dbo].[PhysicsObjects] ([PhysicsID])
GO
IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_FurniDefinitions_PhysicsObjects]') AND parent_object_id = OBJECT_ID(N'[dbo].[FurniDefinitions]'))
ALTER TABLE [dbo].[FurniDefinitions] CHECK CONSTRAINT [FK_FurniDefinitions_PhysicsObjects]
GO
/****** Object:  ForeignKey [FK_RoleAccess_Roles]    Script Date: 12/02/2009 20:58:50 ******/
IF NOT EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_RoleAccess_Roles]') AND parent_object_id = OBJECT_ID(N'[dbo].[RoleAccess]'))
ALTER TABLE [dbo].[RoleAccess]  WITH CHECK ADD  CONSTRAINT [FK_RoleAccess_Roles] FOREIGN KEY([RoleID])
REFERENCES [dbo].[Roles] ([RoleID])
GO
IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_RoleAccess_Roles]') AND parent_object_id = OBJECT_ID(N'[dbo].[RoleAccess]'))
ALTER TABLE [dbo].[RoleAccess] CHECK CONSTRAINT [FK_RoleAccess_Roles]
GO
/****** Object:  ForeignKey [FK_RoomCategories_RoomCategories]    Script Date: 12/02/2009 20:58:50 ******/
IF NOT EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_RoomCategories_RoomCategories]') AND parent_object_id = OBJECT_ID(N'[dbo].[RoomCategories]'))
ALTER TABLE [dbo].[RoomCategories]  WITH CHECK ADD  CONSTRAINT [FK_RoomCategories_RoomCategories] FOREIGN KEY([RoomCategoryParent])
REFERENCES [dbo].[RoomCategories] ([RoomCategoryID])
GO
IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_RoomCategories_RoomCategories]') AND parent_object_id = OBJECT_ID(N'[dbo].[RoomCategories]'))
ALTER TABLE [dbo].[RoomCategories] CHECK CONSTRAINT [FK_RoomCategories_RoomCategories]
GO
/****** Object:  ForeignKey [FK_Rooms_RoomCategories]    Script Date: 12/02/2009 20:58:50 ******/
IF NOT EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_Rooms_RoomCategories]') AND parent_object_id = OBJECT_ID(N'[dbo].[Rooms]'))
ALTER TABLE [dbo].[Rooms]  WITH CHECK ADD  CONSTRAINT [FK_Rooms_RoomCategories] FOREIGN KEY([CategoryID])
REFERENCES [dbo].[RoomCategories] ([RoomCategoryID])
GO
IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_Rooms_RoomCategories]') AND parent_object_id = OBJECT_ID(N'[dbo].[Rooms]'))
ALTER TABLE [dbo].[Rooms] CHECK CONSTRAINT [FK_Rooms_RoomCategories]
GO
/****** Object:  ForeignKey [FK_Rooms_RoomModels]    Script Date: 12/02/2009 20:58:50 ******/
IF NOT EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_Rooms_RoomModels]') AND parent_object_id = OBJECT_ID(N'[dbo].[Rooms]'))
ALTER TABLE [dbo].[Rooms]  WITH CHECK ADD  CONSTRAINT [FK_Rooms_RoomModels] FOREIGN KEY([ModelID])
REFERENCES [dbo].[RoomModels] ([RoomModelID])
GO
IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_Rooms_RoomModels]') AND parent_object_id = OBJECT_ID(N'[dbo].[Rooms]'))
ALTER TABLE [dbo].[Rooms] CHECK CONSTRAINT [FK_Rooms_RoomModels]
GO
/****** Object:  ForeignKey [FK_Rooms_RoomStates]    Script Date: 12/02/2009 20:58:50 ******/
IF NOT EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_Rooms_RoomStates]') AND parent_object_id = OBJECT_ID(N'[dbo].[Rooms]'))
ALTER TABLE [dbo].[Rooms]  WITH CHECK ADD  CONSTRAINT [FK_Rooms_RoomStates] FOREIGN KEY([RoomStatus])
REFERENCES [dbo].[RoomStates] ([StatusID])
GO
IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_Rooms_RoomStates]') AND parent_object_id = OBJECT_ID(N'[dbo].[Rooms]'))
ALTER TABLE [dbo].[Rooms] CHECK CONSTRAINT [FK_Rooms_RoomStates]
GO
/****** Object:  ForeignKey [FK_Rooms_Users]    Script Date: 12/02/2009 20:58:50 ******/
IF NOT EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_Rooms_Users]') AND parent_object_id = OBJECT_ID(N'[dbo].[Rooms]'))
ALTER TABLE [dbo].[Rooms]  WITH CHECK ADD  CONSTRAINT [FK_Rooms_Users] FOREIGN KEY([OwnerID])
REFERENCES [dbo].[Users] ([UserID])
GO
IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_Rooms_Users]') AND parent_object_id = OBJECT_ID(N'[dbo].[Rooms]'))
ALTER TABLE [dbo].[Rooms] CHECK CONSTRAINT [FK_Rooms_Users]
GO
/****** Object:  ForeignKey [FK_Users_Roles]    Script Date: 12/02/2009 20:58:50 ******/
IF NOT EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_Users_Roles]') AND parent_object_id = OBJECT_ID(N'[dbo].[Users]'))
ALTER TABLE [dbo].[Users]  WITH CHECK ADD  CONSTRAINT [FK_Users_Roles] FOREIGN KEY([RoleID])
REFERENCES [dbo].[Roles] ([RoleID])
GO
IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_Users_Roles]') AND parent_object_id = OBJECT_ID(N'[dbo].[Users]'))
ALTER TABLE [dbo].[Users] CHECK CONSTRAINT [FK_Users_Roles]
GO
