-- 编制方案变量外移需求 增加说明多语言字段
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_EB_SCHEMEASSIGN' AND KSQL_COL_NAME IN ('FDESCRIPTION')) 
 ALTER TABLE T_EB_SCHEMEASSIGN ADD (FDESCRIPTION NVARCHAR(255) DEFAULT ' ' NOT NULL);

 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_EB_SCHEMEASSIGN' AND KSQL_COL_NAME IN ('FNAME'))
 ALTER TABLE T_EB_SCHEMEASSIGN ADD (FNAME NVARCHAR(255) DEFAULT ' ' NOT NULL);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_EB_SCHEMEASSIGN_L') 
 CREATE TABLE T_EB_SCHEMEASSIGN_L (
FPKID NVARCHAR(20) DEFAULT ' ' NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FLOCALEID NVARCHAR(50) DEFAULT ' ' NOT NULL,
FDESCRIPTION NVARCHAR(255) DEFAULT ' ' NOT NULL
);
