﻿CREATE TABLE [dbo].[fis_widgets] (
    [short_name]        VARCHAR (50)    NOT NULL,
    [account]           VARCHAR (50)    NOT NULL,
    [type]              NVARCHAR (50)   NOT NULL,
    [name]              NVARCHAR (255)  NOT NULL,
    [description]       NVARCHAR (1000) NULL,
    [sql]               NVARCHAR (2000) NULL,
    [sql_admin_columns] NVARCHAR (500)  NULL,
    [sql_datatypes]     NVARCHAR (255)  NULL,
    [url]               NVARCHAR (500)  NULL,
    [html]              NVARCHAR (MAX)  NULL,
    [visible_groups]    VARCHAR (1000)  NULL,
    [visible]           TINYINT         CONSTRAINT [DF_fis_widgets_visible] DEFAULT ((1)) NOT NULL,
    [auth_module]       VARCHAR (50)    NULL,
    [rendering_options] NVARCHAR (255)  NULL,
    [server_options]    NVARCHAR (2000) NULL,
    [daycache]          BIT             CONSTRAINT [DF_fis_widgets_daychache] DEFAULT ((0)) NOT NULL,
    [personalized]      BIT             CONSTRAINT [DF_fis_widgets_personalized] DEFAULT ((0)) NOT NULL,
    [safemode]          BIT             CONSTRAINT [DF_fis_widgets_safemode] DEFAULT ((0)) NOT NULL,
    [variables]         VARCHAR (1000)  NULL,
    CONSTRAINT [PK_fis_widgets] PRIMARY KEY CLUSTERED ([short_name] ASC)
);

