CREATE TABLE [dbo].[TBMON_CHARTS](
	[GUID] [int] IDENTITY(1,1) NOT NULL,
	[PROFILE_ID] [int] NOT NULL,
	[POS_ID] [int] NOT NULL,
	[CHART_TYPE] [varchar](50) NOT NULL,
	[TITLE] [varchar](50) NOT NULL,
	[SQL_COMMAND] [varchar](max) NOT NULL,
	[ARGUMENT] [varchar](50) NOT NULL,
	[VALUE] [varchar](50) NOT NULL,
	[ACTIVE] [bit] NULL,
	[LABEL_TYPE] [varchar](50) NULL,
	[ADDED_WHO] [varchar](50) NULL,
	[ADDED_WHEN] [datetime] NULL,
	[CHANGED_WHO] [varchar](50) NULL,
	[CHANGED_WHEN] [datetime] NULL,
	[SERIE_TITLE] [varchar](50) NULL,
	[DESIGN_TYPE] [varchar](50) NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

ALTER TABLE [dbo].[TBMON_CHARTS] ADD  CONSTRAINT [DF_TBMON_CHARTS_PROFILE_ID]  DEFAULT ((0)) FOR [PROFILE_ID]
GO

ALTER TABLE [dbo].[TBMON_CHARTS] ADD  CONSTRAINT [DF_TBMON_CHARTS_GROUP_ID]  DEFAULT ((0)) FOR [POS_ID]
GO

ALTER TABLE [dbo].[TBMON_CHARTS] ADD  CONSTRAINT [DF_TBMON_CHARTS_ACTIVE]  DEFAULT ((1)) FOR [ACTIVE]
GO

ALTER TABLE [dbo].[TBMON_CHARTS] ADD  CONSTRAINT [DF_TBMON_CHARTS_LABEL_TYPE]  DEFAULT ('DEFAULT') FOR [LABEL_TYPE]
GO

ALTER TABLE [dbo].[TBMON_CHARTS] ADD  CONSTRAINT [DF_TBMON_CHARTS_COLOR_DESIGN]  DEFAULT ('DEFAULT') FOR [DESIGN_TYPE]
GO
