/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\ER_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_ER_SEATGRADE_L') 
 CREATE TABLE T_ER_SEATGRADE_L (
FPKID VARCHAR(36) DEFAULT ' ' NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FLOCALEID VARCHAR(10) DEFAULT ' ' NOT NULL,
FSEATGRADE VARCHAR(100) DEFAULT ' ' NOT NULL
);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_ER_SEATGRADE') 
 CREATE TABLE T_ER_SEATGRADE (
FID BIGINT DEFAULT 0 NOT NULL,
FSEATGRADE NVARCHAR(100) DEFAULT ' ' NOT NULL,
FATTRIBUTE VARCHAR(30) DEFAULT ' ' NOT NULL,
FNUMBER NVARCHAR(100) DEFAULT ' ' NOT NULL,
FSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FENABLE CHAR(1) DEFAULT ' ' NOT NULL,
FCREATETIME DATETIME,
FMODIFYTIME DATETIME,
FMASTERID BIGINT DEFAULT 0 NOT NULL
);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_ER_TRIPITEMSEATGRADE') 
 CREATE TABLE T_ER_TRIPITEMSEATGRADE (
FPKID BIGINT DEFAULT 0 NOT NULL,
FDETAILID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_ER_SEATGRADE_R3') 
 CREATE TABLE T_ER_SEATGRADE_R3 (
FID BIGINT DEFAULT 0 NOT NULL,
FREFSTATUS CHAR(1) DEFAULT ' ' NOT NULL
);

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