﻿CREATE TABLE [dbo].[ChartsTemplate] (
    [Id]           BIGINT        IDENTITY (1, 1) NOT NULL,
    [Client]       VARCHAR (100) NOT NULL,
    [User]         VARCHAR (300) NOT NULL,
    [ChartName]    VARCHAR (300) NOT NULL,
    [Symbol]       VARCHAR (50)  NOT NULL,
    [Resolution]   VARCHAR (10)  NOT NULL,
    [LastModified] DATETIME      NOT NULL,
    [Content]      TEXT          NOT NULL,
    [CreateDate]   DATETIME      DEFAULT (getutcdate()) NOT NULL,
    PRIMARY KEY CLUSTERED ([Id] ASC)
);


GO
CREATE NONCLUSTERED INDEX [IX_ChartsTemplate_Client_User]
    ON [dbo].[ChartsTemplate]([Client] ASC, [User] ASC);

