CREATE TABLE [dbo].[Gal_Categories] (
	[Gal_CategoryID] [int] IDENTITY (1, 1) NOT NULL ,
	[Gal_CategoryName] [nvarchar] (255) NULL ,
	[Gal_CategoryLocation] [nvarchar] (255) NULL ,
	[Gal_CategoryDescription] [nvarchar] (255) NULL ,
	[Gal_CategoryImage] [nvarchar] (255) NULL ,
	[Gal_CategorySubmitRights] [nvarchar] (50) NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[Gal_Config] (
	[Config_ConfigID] [int] IDENTITY (1, 1) NOT NULL ,
	[Config_SkinFolder] [nvarchar] (255) NULL ,
	[Config_CategoryColumns] [nvarchar] (50) NULL ,
	[Config_ShowPicCount] [nvarchar] (50) NULL ,
	[Config_UseCategoryBullets] [nvarchar] (50) NULL ,
	[Config_User1] [nvarchar] (50) NULL ,
	[Config_User2] [nvarchar] (50) NULL ,
	[Config_User3] [nvarchar] (50) NULL ,
	[Config_User4] [nvarchar] (50) NULL ,
	[Config_User5] [nvarchar] (50) NULL ,
	[Config_DontShowDirs] [nvarchar] (255) NULL ,
	[Config_ThumbRows] [nvarchar] (50) NULL ,
	[Config_ThumbCols] [nvarchar] (50) NULL ,
	[Config_ThumbTableBorderWidth] [nvarchar] (50) NULL ,
	[Config_ThumbTableBorderColor] [nvarchar] (50) NULL ,
	[Config_ShowThumbnailInfo] [nvarchar] (50) NULL ,
	[Config_ShowPictureInfo] [nvarchar] (50) NULL ,
	[Config_ShowExtendedPictureInfo] [nvarchar] (50) NULL ,
	[Config_ThumbWidth] [nvarchar] (50) NULL ,
	[Config_ThumbHeight] [nvarchar] (50) NULL ,
	[Config_SlideShowSeconds] [nvarchar] (50) NULL ,
	[Config_DisableRightClick] [nvarchar] (50) NULL ,
	[Config_PostCardImageWidth] [nvarchar] (50) NULL ,
	[Config_PostCardImageHeight] [nvarchar] (50) NULL ,
	[Config_PostCardTagLine] [nvarchar] (255) NULL ,
	[Config_NewDays] [nvarchar] (50) NULL ,
	[Config_PopularRating] [nvarchar] (50) NULL ,
	[Config_HotHits] [nvarchar] (50) NULL ,
	[Config_RequireLogin] [nvarchar] (50) NULL ,
	[Config_ShowUserData] [nvarchar] (50) NULL ,
	[Config_UseFavorites] [nvarchar] (50) NULL ,
	[Config_EmailHost] [nvarchar] (50) NULL ,
	[Config_PageHeader] [ntext] NULL ,
	[Config_PageFooter] [ntext] NULL ,
	[Config_UseHot] [nvarchar] (50) NULL ,
	[Config_UsePopular] [nvarchar] (50) NULL ,
	[Config_UseNew] [nvarchar] (50) NULL ,
	[Config_UsePostcard] [nvarchar] (50) NULL ,
	[Config_UseRating] [nvarchar] (50) NULL ,
	[Config_PicShowName] [nvarchar] (50) NULL ,
	[Config_PicShowSize] [nvarchar] (50) NULL ,
	[Config_PicShowDate] [nvarchar] (50) NULL ,
	[Config_PicShowViews] [nvarchar] (50) NULL ,
	[Config_PicShowRating] [nvarchar] (50) NULL ,
	[Config_PicShowPhotographer] [nvarchar] (50) NULL ,
	[Config_PicShowSource] [nvarchar] (50) NULL ,
	[Config_PicShowCameraUsed] [nvarchar] (50) NULL ,
	[Config_PicShowCopyright] [nvarchar] (50) NULL ,
	[Config_ThumbShowName] [nvarchar] (50) NULL ,
	[Config_ThumbShowSize] [nvarchar] (50) NULL ,
	[Config_ThumbShowDate] [nvarchar] (50) NULL ,
	[Config_ThumbShowViews] [nvarchar] (50) NULL ,
	[Config_ThumbShowRating] [nvarchar] (50) NULL ,
	[Config_ThumbShowExtension] [nvarchar] (50) NULL ,
	[Config_ThumbNameFieldLength] [nvarchar] (50) NULL ,
	[Config_UseThumbBorder] [nvarchar] (50) NULL ,
	[Config_SearchType] [nvarchar] (50) NULL ,
	[Config_JPGComponent] [nvarchar] (50) NULL ,
	[Config_EmailComponent] [nvarchar] (50) NULL ,
	[Config_UploadComponent] [nvarchar] (50) NULL ,
	[Config_UseTextNavigation] [nvarchar] (50) NULL ,
	[Config_UseSlideShowTransitions] [nvarchar] (50) NULL ,
	[Config_UseFullScreenSlideShow] [nvarchar] (50) NULL ,
	[Config_UseCookies] [nvarchar] (50) NULL ,
	[Config_AllowSessionBasedItems] [nvarchar] (50) NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[Gal_Images] (
	[Gal_ImageID] [int] IDENTITY (1, 1) NOT NULL ,
	[Gal_ImageFileLocation] [nvarchar] (255) NULL ,
	[Gal_ImageCaption] [ntext] NULL ,
	[Gal_ImageKeywords] [ntext] NULL ,
	[Gal_ImageCopyright] [nvarchar] (100) NULL ,
	[Gal_ImagePhotographer] [nvarchar] (100) NULL ,
	[Gal_ImageCamera] [nvarchar] (100) NULL ,
	[Gal_ImageSource] [nvarchar] (100) NULL ,
	[Gal_ImageHits] [int] NULL ,
	[Gal_ImageRatingTotal] [int] NULL ,
	[Gal_ImageRatingNumber] [int] NULL ,
	[Gal_ImageDateAdded] [smalldatetime] NULL ,
	[Gal_ImageUser1] [nvarchar] (255) NULL ,
	[Gal_ImageUser2] [nvarchar] (255) NULL ,
	[Gal_ImageUser3] [nvarchar] (255) NULL ,
	[Gal_ImageUser4] [nvarchar] (255) NULL ,
	[Gal_ImageUser5] [ntext] NULL ,
	[Gal_ImageType] [nvarchar] (50) NULL ,
	[Gal_ImageFileName] [nvarchar] (255) NULL ,
	[Gal_ImageCategory] [nvarchar] (255) NULL ,
	[Gal_ImageThumbURL] [nvarchar] (255) NULL ,
	[Gal_ImageThumbPath] [nvarchar] (255) NULL ,
	[Gal_ImagePicURL] [nvarchar] (255) NULL ,
	[Gal_ImagePicPath] [nvarchar] (255) NULL ,
	[Gal_ImageSize] [nvarchar] (50) NULL ,
	[Gal_ImageStatus] [nvarchar] (50) NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[Gal_Users] (
	[Gal_UserID] [int] IDENTITY (1, 1) NOT NULL ,
	[Gal_UserFirstName] [nvarchar] (50) NULL ,
	[Gal_UserLastName] [nvarchar] (50) NULL ,
	[Gal_UserUserName] [nvarchar] (50) NULL ,
	[Gal_UserPassword] [nvarchar] (50) NULL ,
	[Gal_UserEmailAddress] [nvarchar] (255) NULL ,
	[Gal_UserEditConfig] [nvarchar] (50) NULL ,
	[Gal_UserEditUsers] [nvarchar] (50) NULL ,
	[Gal_UserEditImageInfo] [nvarchar] (50) NULL ,
	[Gal_UserEditCategories] [nvarchar] (50) NULL ,
	[Gal_UserUploadImages] [nvarchar] (50) NULL ,
	[Gal_UserApproveSubmits] [nvarchar] (50) NULL ,
	[Gal_UserCopyright] [nvarchar] (255) NULL ,
	[Gal_UserPhotographer] [nvarchar] (255) NULL ,
	[Gal_UserCamera] [nvarchar] (255) NULL ,
	[Gal_UserSource] [nvarchar] (255) NULL 
) ON [PRIMARY]
GO

ALTER TABLE [dbo].[Gal_Categories] WITH NOCHECK ADD 
	CONSTRAINT [PK_Gal_Categories] PRIMARY KEY  CLUSTERED 
	(
		[Gal_CategoryID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[Gal_Config] WITH NOCHECK ADD 
	CONSTRAINT [PK_Gal_Config] PRIMARY KEY  CLUSTERED 
	(
		[Config_ConfigID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[Gal_Images] WITH NOCHECK ADD 
	CONSTRAINT [PK_Gal_Images] PRIMARY KEY  CLUSTERED 
	(
		[Gal_ImageID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[Gal_Users] WITH NOCHECK ADD 
	CONSTRAINT [PK_Gal_Users] PRIMARY KEY  CLUSTERED 
	(
		[Gal_UserID]
	)  ON [PRIMARY] 
GO

