/**Begin D:\PDM_UPGRADE\PDM1\EB_constraint.sql **/

-- T_EB_CONTROLRULEGROUP_L，控制方式分组名称改为多语言字段
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_EB_CONTROLRULEGROUP_L') 
CREATE TABLE T_EB_CONTROLRULEGROUP_L (
   FPKID                NVARCHAR(36)         NOT NULL DEFAULT ' ',
   FID                  BIGINT               NOT NULL DEFAULT 0,
   FLOCALEID            NVARCHAR(10)         NOT NULL DEFAULT ' ',
   FNAME                NVARCHAR(100)        NOT NULL DEFAULT ' '
);
EXEC P_ALTERPK 'PK_T_EB_CONTROLRULEGROUP_L', 'T_EB_CONTROLRULEGROUP_L', 'FPKID', '1';

IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_EB_CONTROLRULEGROUP_L_0')
CREATE INDEX IDX_EB_CONTROLRULEGROUP_L_0 ON T_EB_CONTROLRULEGROUP_L ( FID, FLOCALEID );

/**End D:\PDM_UPGRADE\PDM1\EB_constraint.sql **/