/**Begin C:\PDM_UPGRADE\PDM1\SRC_table.sql **/
 EXEC p_AlterColumn 'T_SRC_INVITESUPPLIER_TEMP', 'FREASON', 'NVARCHAR(255)', 'NOT NULL', '0100', ''' ''';
 
 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_PROJECT_Y' AND KSQL_COL_NAME IN ('FFILESCHEMEID')) 
 ALTER TABLE T_SRC_PROJECT_Y ADD (FFILESCHEMEID BIGINT DEFAULT 0 NOT NULL );



IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_ARCHIVEFILE') 
 CREATE TABLE T_SRC_ARCHIVEFILE (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FFILECATALOGUEID BIGINT DEFAULT 0 NOT NULL,
FNOTE NVARCHAR(255) DEFAULT ' ' NOT NULL,
FFILEOBJECTID BIGINT DEFAULT 0 NOT NULL,
FPACKAGEID BIGINT DEFAULT 0 NOT NULL,
FSUPPLIERTYPE VARCHAR(50) DEFAULT ' ' NOT NULL,
FSUPPLIERID BIGINT DEFAULT 0 NOT NULL,
FATTACHMENTID BIGINT DEFAULT 0 NOT NULL
);


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



/**End C:\PDM_UPGRADE\PDM1\SRC_table.sql **/
