/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\EB_table.sql **/

IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_EB_SCHEMEVARIABLE') 
 CREATE TABLE T_EB_SCHEMEVARIABLE (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FDIMENSION BIGINT DEFAULT 0 NOT NULL,
FVARIABLENUMBER BIGINT DEFAULT 0 NOT NULL,
FVARIABLE NVARCHAR(200) DEFAULT ' ' NOT NULL,
FVARIABLEJSONTEXT NCLOB
);

EXEC p_AlterPK 'PK_T_EB_SCHEMEVARIABLE', 'T_EB_SCHEMEVARIABLE', 'FENTRYID', '1';

IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IX_T_EB_SCHEMEVARIABLE_FID')
CREATE INDEX IX_T_EB_SCHEMEVARIABLE_FID ON T_EB_SCHEMEVARIABLE ( FID );


/**End E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\EB_table.sql **/
