2006-12-11 17:21:34 +07:00
-- upgrading database from compiere 253a to 253b
-- Written by Karsten Thiemann, kt@schaeffer-ag.de
-- Feel free to change everything you want, but you are using it at your own risk!
-- This script changes the db structure by adding missing tables and columns.
-- It also adds lines to some of the new tables.
-- Your data is left unchaged - with the following exceptions: .
2007-03-10 02:01:44 +07:00
-- ALL ENTRIES IN PA_ACHIEVEMENT, PA_MEASURE, PA_GOAL,
-- PA_MEASURECALC AND T_INVENTORYVALUE ARE DELETED
2006-12-11 17:21:34 +07:00
-- If you have CUSTOM DATA in there please do a backup and reapply it after migration.
-- The code for the deletion is marked with BEWARE
-- CUSTOM DATA means data from your client not from GardeWorld or System:
-- select * from PA_MEASURE where AD_Client_ID!=11 and AD_Client_ID!=0;
-- select * from PA_MEASURECALC where AD_Client_ID!=11 and AD_Client_ID!=0;
-- select * from T_INVENTORYVALUE where AD_Client_ID!=11 and AD_Client_ID!=0;
-- If you get some lines, you have custom data...
-- Please review the setting of the DEFAULT VALUES for some of the
-- added columns. They are marked with REPLACE_ME so just use the search function
-- of your editor. So just follow the instructions there.
2007-03-10 02:01:44 +07:00
DELETE FROM PA_ACHIEVEMENT ;
DELETE from PA_GOAL ;
2006-12-11 17:21:34 +07:00
2007-02-26 12:41:30 +07:00
CREATE TABLE " AD_CLIENTSHARE "
2006-12-11 17:21:34 +07:00
( " AD_CLIENTSHARE_ID " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" AD_CLIENT_ID " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" AD_ORG_ID " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" ISACTIVE " CHAR ( 1 BYTE ) DEFAULT ' Y ' NOT NULL ENABLE ,
" CREATED " DATE DEFAULT SYSDATE NOT NULL ENABLE ,
" CREATEDBY " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" UPDATED " DATE DEFAULT SYSDATE NOT NULL ENABLE ,
" UPDATEDBY " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" NAME " NVARCHAR2 ( 60 ) NOT NULL ENABLE ,
" DESCRIPTION " NVARCHAR2 ( 255 ) ,
" AD_TABLE_ID " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" SHARETYPE " CHAR ( 1 BYTE ) NOT NULL ENABLE ,
CHECK ( IsActive in ( ' Y ' , ' N ' ) ) ENABLE ,
CONSTRAINT " AD_CLIENTSHARE_KEY " PRIMARY KEY ( " AD_CLIENTSHARE_ID " ) ENABLE ,
CONSTRAINT " ADCLIENT_ADCLIENTSHARE " FOREIGN KEY ( " AD_CLIENT_ID " )
2007-02-26 12:41:30 +07:00
REFERENCES " AD_CLIENT " ( " AD_CLIENT_ID " ) ENABLE ,
2006-12-11 17:21:34 +07:00
CONSTRAINT " ADORG_ADCLIENTSHARE " FOREIGN KEY ( " AD_ORG_ID " )
2007-02-26 12:41:30 +07:00
REFERENCES " AD_ORG " ( " AD_ORG_ID " ) ENABLE ,
2006-12-11 17:21:34 +07:00
CONSTRAINT " ADTABLE_ADCLIENTSHARE " FOREIGN KEY ( " AD_TABLE_ID " )
2007-02-26 12:41:30 +07:00
REFERENCES " AD_TABLE " ( " AD_TABLE_ID " ) ENABLE
2006-12-11 17:21:34 +07:00
) ;
2007-02-26 12:41:30 +07:00
CREATE UNIQUE INDEX " AD_CLIENTSHARE_TABLE " ON " AD_CLIENTSHARE " ( " AD_CLIENT_ID " , " AD_TABLE_ID " ) ;
2006-12-11 17:21:34 +07:00
2007-02-26 12:41:30 +07:00
CREATE TABLE " R_ISSUESYSTEM "
2006-12-11 17:21:34 +07:00
( " R_ISSUESYSTEM_ID " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" AD_CLIENT_ID " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" AD_ORG_ID " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" ISACTIVE " CHAR ( 1 BYTE ) DEFAULT ' Y ' NOT NULL ENABLE ,
" CREATED " DATE DEFAULT SYSDATE NOT NULL ENABLE ,
" CREATEDBY " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" UPDATED " DATE DEFAULT SYSDATE NOT NULL ENABLE ,
" UPDATEDBY " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" DBADDRESS " NVARCHAR2 ( 255 ) NOT NULL ENABLE ,
" STATISTICSINFO " NVARCHAR2 ( 60 ) ,
" PROFILEINFO " NVARCHAR2 ( 60 ) ,
" SYSTEMSTATUS " CHAR ( 1 BYTE ) NOT NULL ENABLE ,
" A_ASSET_ID " NUMBER ( 10 , 0 ) ,
CHECK ( IsActive in ( ' Y ' , ' N ' ) ) ENABLE ,
CONSTRAINT " R_ISSUESYSTEM_KEY " PRIMARY KEY ( " R_ISSUESYSTEM_ID " ) ENABLE
) ;
2007-02-26 12:41:30 +07:00
CREATE UNIQUE INDEX " R_ISSUESYSTEM_ADDRESS " ON " R_ISSUESYSTEM " ( " DBADDRESS " ) ;
2006-12-11 17:21:34 +07:00
2007-02-26 12:41:30 +07:00
CREATE TABLE " R_ISSUEUSER "
2006-12-11 17:21:34 +07:00
( " R_ISSUEUSER_ID " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" AD_CLIENT_ID " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" AD_ORG_ID " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" ISACTIVE " CHAR ( 1 BYTE ) DEFAULT ' Y ' NOT NULL ENABLE ,
" CREATED " DATE DEFAULT SYSDATE NOT NULL ENABLE ,
" CREATEDBY " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" UPDATED " DATE DEFAULT SYSDATE NOT NULL ENABLE ,
" UPDATEDBY " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" USERNAME " NVARCHAR2 ( 60 ) NOT NULL ENABLE ,
" DESCRIPTION " NVARCHAR2 ( 255 ) ,
" AD_USER_ID " NUMBER ( 10 , 0 ) ,
CHECK ( IsActive in ( ' Y ' , ' N ' ) ) ENABLE ,
CONSTRAINT " R_ISSUEUSER_KEY " PRIMARY KEY ( " R_ISSUEUSER_ID " ) ENABLE ,
CONSTRAINT " ADUSER_RISSUEUSER " FOREIGN KEY ( " AD_USER_ID " )
2007-02-26 12:41:30 +07:00
REFERENCES " AD_USER " ( " AD_USER_ID " ) ENABLE
2006-12-11 17:21:34 +07:00
) ;
2007-02-26 12:41:30 +07:00
CREATE UNIQUE INDEX " R_ISSUEUSER_EMAIL " ON " R_ISSUEUSER " ( " USERNAME " , " AD_CLIENT_ID " ) ;
2006-12-11 17:21:34 +07:00
2007-02-26 12:41:30 +07:00
CREATE TABLE " R_ISSUESTATUS "
2006-12-11 17:21:34 +07:00
( " R_ISSUESTATUS_ID " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" AD_CLIENT_ID " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" AD_ORG_ID " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" ISACTIVE " CHAR ( 1 BYTE ) DEFAULT ' Y ' NOT NULL ENABLE ,
" CREATED " DATE DEFAULT SYSDATE NOT NULL ENABLE ,
" CREATEDBY " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" UPDATED " DATE DEFAULT SYSDATE NOT NULL ENABLE ,
" UPDATEDBY " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" NAME " NVARCHAR2 ( 60 ) NOT NULL ENABLE ,
" DESCRIPTION " NVARCHAR2 ( 255 ) ,
CHECK ( IsActive in ( ' Y ' , ' N ' ) ) ENABLE ,
CONSTRAINT " R_ISSUESTATUS_KEY " PRIMARY KEY ( " R_ISSUESTATUS_ID " ) ENABLE
) ;
2007-02-26 12:41:30 +07:00
CREATE TABLE " R_ISSUEPROJECT "
2006-12-11 17:21:34 +07:00
( " R_ISSUEPROJECT_ID " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" AD_CLIENT_ID " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" AD_ORG_ID " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" ISACTIVE " CHAR ( 1 BYTE ) DEFAULT ' Y ' NOT NULL ENABLE ,
" CREATED " DATE DEFAULT SYSDATE NOT NULL ENABLE ,
" CREATEDBY " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" UPDATED " DATE DEFAULT SYSDATE NOT NULL ENABLE ,
" UPDATEDBY " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" NAME " NVARCHAR2 ( 60 ) NOT NULL ENABLE ,
" DESCRIPTION " NVARCHAR2 ( 255 ) ,
" A_ASSET_ID " NUMBER ( 10 , 0 ) ,
" C_PROJECT_ID " NUMBER ( 10 , 0 ) ,
" STATISTICSINFO " NVARCHAR2 ( 60 ) ,
" PROFILEINFO " NVARCHAR2 ( 60 ) ,
" SYSTEMSTATUS " CHAR ( 1 BYTE ) NOT NULL ENABLE ,
CHECK ( IsActive in ( ' Y ' , ' N ' ) ) ENABLE ,
CONSTRAINT " R_ISSUEPROJECT_KEY " PRIMARY KEY ( " R_ISSUEPROJECT_ID " ) ENABLE ,
CONSTRAINT " AASSET_RISSUEPROJECT " FOREIGN KEY ( " A_ASSET_ID " )
2007-02-26 12:41:30 +07:00
REFERENCES " A_ASSET " ( " A_ASSET_ID " ) ENABLE ,
2006-12-11 17:21:34 +07:00
CONSTRAINT " CPROJECT_RISSUEPROJECT " FOREIGN KEY ( " C_PROJECT_ID " )
2007-02-26 12:41:30 +07:00
REFERENCES " C_PROJECT " ( " C_PROJECT_ID " ) ENABLE
2006-12-11 17:21:34 +07:00
) ;
2007-02-26 12:41:30 +07:00
CREATE INDEX " R_ISSUEPROJECT_NAME " ON " R_ISSUEPROJECT " ( " NAME " ) ;
2006-12-11 17:21:34 +07:00
2007-02-26 12:41:30 +07:00
CREATE TABLE " R_ISSUERECOMMENDATION "
2006-12-11 17:21:34 +07:00
( " R_ISSUERECOMMENDATION_ID " CHAR ( 1 BYTE ) DEFAULT ' N ' NOT NULL ENABLE ,
" AD_CLIENT_ID " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" AD_ORG_ID " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" ISACTIVE " CHAR ( 1 BYTE ) DEFAULT ' Y ' NOT NULL ENABLE ,
" CREATED " DATE DEFAULT SYSDATE NOT NULL ENABLE ,
" CREATEDBY " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" UPDATED " DATE DEFAULT SYSDATE NOT NULL ENABLE ,
" UPDATEDBY " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" NAME " NVARCHAR2 ( 60 ) NOT NULL ENABLE ,
" DESCRIPTION " NVARCHAR2 ( 255 ) ,
" HELP " NVARCHAR2 ( 2000 ) ,
CHECK ( IsActive in ( ' Y ' , ' N ' ) ) ENABLE ,
CONSTRAINT " R_ISSUERECOMMENDATION_KEY " PRIMARY KEY ( " R_ISSUERECOMMENDATION_ID " ) ENABLE
) ;
2007-02-26 12:41:30 +07:00
CREATE TABLE " R_ISSUEKNOWN "
2006-12-11 17:21:34 +07:00
( " R_ISSUEKNOWN_ID " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" AD_CLIENT_ID " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" AD_ORG_ID " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" ISACTIVE " CHAR ( 1 BYTE ) DEFAULT ' Y ' NOT NULL ENABLE ,
" CREATED " DATE DEFAULT SYSDATE NOT NULL ENABLE ,
" CREATEDBY " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" UPDATED " DATE DEFAULT SYSDATE NOT NULL ENABLE ,
" UPDATEDBY " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" ISSUESUMMARY " NVARCHAR2 ( 255 ) NOT NULL ENABLE ,
" RELEASENO " CHAR ( 4 BYTE ) NOT NULL ENABLE ,
" SOURCECLASSNAME " NVARCHAR2 ( 60 ) ,
" SOURCEMETHODNAME " NVARCHAR2 ( 60 ) ,
" LOGGERNAME " NVARCHAR2 ( 60 ) ,
" LINENO " NUMBER ( 10 , 0 ) DEFAULT 0 ,
" DESCRIPTION " NVARCHAR2 ( 255 ) ,
" ISSUESTATUS " NVARCHAR2 ( 2000 ) ,
" R_ISSUERECOMMENDATION_ID " CHAR ( 1 BYTE ) ,
" R_ISSUESTATUS_ID " NUMBER ( 10 , 0 ) ,
" R_REQUEST_ID " NUMBER ( 10 , 0 ) ,
" PROCESSING " CHAR ( 1 BYTE ) ,
CHECK ( IsActive in ( ' Y ' , ' N ' ) ) ENABLE ,
CONSTRAINT " R_KNOWNISSUE_KEY " PRIMARY KEY ( " R_ISSUEKNOWN_ID " ) ENABLE ,
CONSTRAINT " RISSUEREC_RISSUEKNOWN " FOREIGN KEY ( " R_ISSUERECOMMENDATION_ID " )
2007-02-26 12:41:30 +07:00
REFERENCES " R_ISSUERECOMMENDATION " ( " R_ISSUERECOMMENDATION_ID " ) ENABLE ,
2006-12-11 17:21:34 +07:00
CONSTRAINT " RISSUESTATUS_RISSUEKNOWN " FOREIGN KEY ( " R_ISSUESTATUS_ID " )
2007-02-26 12:41:30 +07:00
REFERENCES " R_ISSUESTATUS " ( " R_ISSUESTATUS_ID " ) ENABLE ,
2006-12-11 17:21:34 +07:00
CONSTRAINT " RREQUEST_RISSUEKNOWN " FOREIGN KEY ( " R_REQUEST_ID " )
2007-02-26 12:41:30 +07:00
REFERENCES " R_REQUEST " ( " R_REQUEST_ID " ) ENABLE
2006-12-11 17:21:34 +07:00
) ;
2007-02-26 12:41:30 +07:00
CREATE UNIQUE INDEX " R_KNOWNISSUE_ALT " ON " R_ISSUEKNOWN " ( " ISSUESUMMARY " , " RELEASENO " , " SOURCECLASSNAME " , " SOURCEMETHODNAME " , " LOGGERNAME " , " LINENO " ) ;
2006-12-11 17:21:34 +07:00
2007-02-26 12:41:30 +07:00
CREATE TABLE " R_ISSUESOURCE "
2006-12-11 17:21:34 +07:00
( " R_ISSUESOURCE_ID " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" AD_CLIENT_ID " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" AD_ORG_ID " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" ISACTIVE " CHAR ( 1 BYTE ) DEFAULT ' Y ' NOT NULL ENABLE ,
" CREATED " DATE DEFAULT SYSDATE NOT NULL ENABLE ,
" CREATEDBY " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" UPDATED " DATE DEFAULT SYSDATE NOT NULL ENABLE ,
" UPDATEDBY " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" R_ISSUESYSTEM_ID " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" R_ISSUEPROJECT_ID " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" R_ISSUEUSER_ID " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" STATISTICSINFO " NVARCHAR2 ( 60 ) ,
" PROFILEINFO " NVARCHAR2 ( 60 ) ,
CHECK ( IsActive in ( ' Y ' , ' N ' ) ) ENABLE ,
CONSTRAINT " R_ISSUESOURCE_KEY " PRIMARY KEY ( " R_ISSUESOURCE_ID " ) ENABLE ,
CONSTRAINT " RISSUEPROJECT_RISSUESOURCE " FOREIGN KEY ( " R_ISSUEPROJECT_ID " )
2007-02-26 12:41:30 +07:00
REFERENCES " R_ISSUEPROJECT " ( " R_ISSUEPROJECT_ID " ) ENABLE ,
2006-12-11 17:21:34 +07:00
CONSTRAINT " RISSUESYSTEM_RISSUESOURCE " FOREIGN KEY ( " R_ISSUESYSTEM_ID " )
2007-02-26 12:41:30 +07:00
REFERENCES " R_ISSUESYSTEM " ( " R_ISSUESYSTEM_ID " ) ENABLE ,
2006-12-11 17:21:34 +07:00
CONSTRAINT " RISSUEUSER_RISSUESOURCE " FOREIGN KEY ( " R_ISSUEUSER_ID " )
2007-02-26 12:41:30 +07:00
REFERENCES " R_ISSUEUSER " ( " R_ISSUEUSER_ID " ) ENABLE
2006-12-11 17:21:34 +07:00
) ;
2007-02-26 12:41:30 +07:00
CREATE UNIQUE INDEX " R_ISSUESOURCE_SPO " ON " R_ISSUESOURCE " ( " R_ISSUESYSTEM_ID " , " R_ISSUEPROJECT_ID " , " R_ISSUEUSER_ID " ) ;
2006-12-11 17:21:34 +07:00
2007-02-26 12:41:30 +07:00
CREATE TABLE " AD_ISSUE "
2006-12-11 17:21:34 +07:00
( " AD_ISSUE_ID " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" AD_CLIENT_ID " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" AD_ORG_ID " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" ISACTIVE " CHAR ( 1 BYTE ) DEFAULT ' Y ' NOT NULL ENABLE ,
" CREATED " DATE DEFAULT SYSDATE NOT NULL ENABLE ,
" CREATEDBY " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" UPDATED " DATE DEFAULT SYSDATE NOT NULL ENABLE ,
" UPDATEDBY " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" RELEASENO " CHAR ( 4 BYTE ) NOT NULL ENABLE ,
" VERSION " NVARCHAR2 ( 40 ) NOT NULL ENABLE ,
" NAME " NVARCHAR2 ( 60 ) NOT NULL ENABLE ,
" USERNAME " NVARCHAR2 ( 60 ) NOT NULL ENABLE ,
" SUPPORTEMAIL " NVARCHAR2 ( 60 ) ,
" DBADDRESS " NVARCHAR2 ( 255 ) ,
" LOCAL_HOST " NVARCHAR2 ( 120 ) ,
" OPERATINGSYSTEMINFO " NVARCHAR2 ( 255 ) DEFAULT NULL ,
" RELEASETAG " NVARCHAR2 ( 60 ) ,
" DATABASEINFO " NVARCHAR2 ( 255 ) DEFAULT NULL ,
" JAVAINFO " NVARCHAR2 ( 255 ) DEFAULT NULL ,
" REMOTE_ADDR " NVARCHAR2 ( 60 ) ,
" REMOTE_HOST " NVARCHAR2 ( 120 ) ,
" ISSUESUMMARY " NVARCHAR2 ( 2000 ) DEFAULT NULL NOT NULL ENABLE ,
" COMMENTS " NVARCHAR2 ( 2000 ) ,
" SOURCECLASSNAME " NVARCHAR2 ( 60 ) ,
" SOURCEMETHODNAME " NVARCHAR2 ( 60 ) ,
" LOGGERNAME " NVARCHAR2 ( 60 ) ,
" LINENO " NUMBER ( 10 , 0 ) DEFAULT 0 ,
" STACKTRACE " NVARCHAR2 ( 2000 ) ,
" ERRORTRACE " NVARCHAR2 ( 2000 ) ,
" RECORD_ID " NUMBER ( 10 , 0 ) ,
" REQUESTDOCUMENTNO " NVARCHAR2 ( 30 ) ,
" A_ASSET_ID " NUMBER ( 10 , 0 ) ,
" R_REQUEST_ID " NUMBER ( 10 , 0 ) ,
" RESPONSETEXT " NVARCHAR2 ( 2000 ) ,
" PROCESSING " CHAR ( 1 BYTE ) ,
" PROCESSED " CHAR ( 1 BYTE ) DEFAULT ' N ' NOT NULL ENABLE ,
" ISVANILLASYSTEM " CHAR ( 1 BYTE ) DEFAULT ' N '
,
" ISREPRODUCIBLE " CHAR ( 1 BYTE ) DEFAULT ' N '
,
" R_ISSUEKNOWN_ID " NUMBER ( 10 , 0 ) ,
" STATISTICSINFO " NVARCHAR2 ( 255 ) DEFAULT NULL ,
" PROFILEINFO " NVARCHAR2 ( 255 ) DEFAULT NULL ,
" SYSTEMSTATUS " CHAR ( 1 BYTE ) NOT NULL ENABLE ,
" R_ISSUEPROJECT_ID " NUMBER ( 10 , 0 ) ,
" R_ISSUEUSER_ID " NUMBER ( 10 , 0 ) ,
" R_ISSUESYSTEM_ID " NUMBER ( 10 , 0 ) ,
" ISSUESOURCE " CHAR ( 1 BYTE ) ,
" AD_WINDOW_ID " NUMBER ( 10 , 0 ) ,
" AD_PROCESS_ID " NUMBER ( 10 , 0 ) ,
" AD_FORM_ID " NUMBER ( 10 , 0 ) ,
CHECK ( IsActive in ( ' Y ' , ' N ' ) ) ENABLE ,
CHECK ( Processed in ( ' Y ' , ' N ' ) ) ENABLE ,
CHECK ( IsVanillaSystem in ( ' Y ' , ' N ' ) ) ENABLE ,
CHECK ( IsReproducible in ( ' Y ' , ' N ' ) ) ENABLE ,
CONSTRAINT " AD_ISSUE_KEY " PRIMARY KEY ( " AD_ISSUE_ID " ) ENABLE ,
CONSTRAINT " AASSET_ADISSUE " FOREIGN KEY ( " A_ASSET_ID " )
2007-02-26 12:41:30 +07:00
REFERENCES " A_ASSET " ( " A_ASSET_ID " ) ON DELETE SET NULL ENABLE ,
2006-12-11 17:21:34 +07:00
CONSTRAINT " ADFORM_ADISSUE " FOREIGN KEY ( " AD_FORM_ID " )
2007-02-26 12:41:30 +07:00
REFERENCES " AD_FORM " ( " AD_FORM_ID " ) ON DELETE SET NULL ENABLE ,
2006-12-11 17:21:34 +07:00
CONSTRAINT " ADPROCESS_ADISSUE " FOREIGN KEY ( " AD_PROCESS_ID " )
2007-02-26 12:41:30 +07:00
REFERENCES " AD_PROCESS " ( " AD_PROCESS_ID " ) ON DELETE SET NULL ENABLE ,
2006-12-11 17:21:34 +07:00
CONSTRAINT " ADWINDOW_ADISSUE " FOREIGN KEY ( " AD_WINDOW_ID " )
2007-02-26 12:41:30 +07:00
REFERENCES " AD_WINDOW " ( " AD_WINDOW_ID " ) ON DELETE SET NULL ENABLE ,
2006-12-11 17:21:34 +07:00
CONSTRAINT " RISSUEPROJECT_ADISSUE " FOREIGN KEY ( " R_ISSUEPROJECT_ID " )
2007-02-26 12:41:30 +07:00
REFERENCES " R_ISSUEPROJECT " ( " R_ISSUEPROJECT_ID " ) ENABLE ,
2006-12-11 17:21:34 +07:00
CONSTRAINT " RISSUESYSTEM_AD_ISSUE " FOREIGN KEY ( " R_ISSUESYSTEM_ID " )
2007-02-26 12:41:30 +07:00
REFERENCES " R_ISSUESYSTEM " ( " R_ISSUESYSTEM_ID " ) ENABLE ,
2006-12-11 17:21:34 +07:00
CONSTRAINT " RISSUEUSER_ADISSUE " FOREIGN KEY ( " R_ISSUEUSER_ID " )
2007-02-26 12:41:30 +07:00
REFERENCES " R_ISSUEUSER " ( " R_ISSUEUSER_ID " ) ENABLE ,
2006-12-11 17:21:34 +07:00
CONSTRAINT " RKNOWNISSUE_ADISSUE " FOREIGN KEY ( " R_ISSUEKNOWN_ID " )
2007-02-26 12:41:30 +07:00
REFERENCES " R_ISSUEKNOWN " ( " R_ISSUEKNOWN_ID " ) ENABLE ,
2006-12-11 17:21:34 +07:00
CONSTRAINT " RREQUEST_ADISSUE " FOREIGN KEY ( " R_REQUEST_ID " )
2007-02-26 12:41:30 +07:00
REFERENCES " R_REQUEST " ( " R_REQUEST_ID " ) ON DELETE SET NULL ENABLE
2006-12-11 17:21:34 +07:00
) ;
2007-02-26 12:41:30 +07:00
COMMENT ON TABLE " AD_ISSUE " IS ' Compiere Automatic Issue Reporting ' ;
2006-12-11 17:21:34 +07:00
2007-02-26 12:41:30 +07:00
CREATE TABLE " C_SUBACCT "
2006-12-11 17:21:34 +07:00
( " C_SUBACCT_ID " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" AD_CLIENT_ID " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" AD_ORG_ID " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" ISACTIVE " CHAR ( 1 BYTE ) DEFAULT ' Y ' NOT NULL ENABLE ,
" CREATED " DATE DEFAULT SYSDATE NOT NULL ENABLE ,
" CREATEDBY " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" UPDATED " DATE DEFAULT SYSDATE NOT NULL ENABLE ,
" UPDATEDBY " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" VALUE " NVARCHAR2 ( 40 ) NOT NULL ENABLE ,
" NAME " NVARCHAR2 ( 60 ) NOT NULL ENABLE ,
" DESCRIPTION " NVARCHAR2 ( 255 ) ,
" HELP " NVARCHAR2 ( 2000 ) ,
" C_ELEMENTVALUE_ID " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
CHECK ( IsActive in ( ' Y ' , ' N ' ) ) ENABLE ,
CONSTRAINT " C_SUBACCT_KEY " PRIMARY KEY ( " C_SUBACCT_ID " ) ENABLE ,
CONSTRAINT " CELEMENTVALUE_CSUBACCT " FOREIGN KEY ( " C_ELEMENTVALUE_ID " )
2007-02-26 12:41:30 +07:00
REFERENCES " C_ELEMENTVALUE " ( " C_ELEMENTVALUE_ID " ) ON DELETE CASCADE ENABLE
2006-12-11 17:21:34 +07:00
) ;
2007-02-26 12:41:30 +07:00
CREATE TABLE " PA_GOALRESTRICTION "
2006-12-11 17:21:34 +07:00
( " PA_GOALRESTRICTION_ID " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" AD_CLIENT_ID " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" AD_ORG_ID " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" ISACTIVE " CHAR ( 1 BYTE ) DEFAULT ' Y ' NOT NULL ENABLE ,
" CREATED " DATE DEFAULT SYSDATE NOT NULL ENABLE ,
" CREATEDBY " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" UPDATED " DATE DEFAULT SYSDATE NOT NULL ENABLE ,
" UPDATEDBY " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" NAME " NVARCHAR2 ( 60 ) NOT NULL ENABLE ,
" GOALRESTRICTIONTYPE " CHAR ( 1 BYTE ) NOT NULL ENABLE ,
" PA_GOAL_ID " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" C_BPARTNER_ID " NUMBER ( 10 , 0 ) ,
" M_PRODUCT_ID " NUMBER ( 10 , 0 ) ,
" ORG_ID " NUMBER ( 10 , 0 ) ,
" C_BP_GROUP_ID " NUMBER ( 10 , 0 ) ,
" M_PRODUCT_CATEGORY_ID " NUMBER ( 10 , 0 ) ,
CHECK ( IsActive in ( ' Y ' , ' N ' ) ) ENABLE ,
CONSTRAINT " PA_GOALRESTRICTION_KEY " PRIMARY KEY ( " PA_GOALRESTRICTION_ID " ) ENABLE ,
CONSTRAINT " ADORG2_PAGOALRESTRICTION " FOREIGN KEY ( " ORG_ID " )
2007-02-26 12:41:30 +07:00
REFERENCES " AD_ORG " ( " AD_ORG_ID " ) ENABLE ,
2006-12-11 17:21:34 +07:00
CONSTRAINT " ADORG_PAGOALRESTRICTION " FOREIGN KEY ( " AD_ORG_ID " )
2007-02-26 12:41:30 +07:00
REFERENCES " AD_ORG " ( " AD_ORG_ID " ) ENABLE ,
2006-12-11 17:21:34 +07:00
CONSTRAINT " CBPARTNER_PAGOALRESTRICTION " FOREIGN KEY ( " C_BPARTNER_ID " )
2007-02-26 12:41:30 +07:00
REFERENCES " C_BPARTNER " ( " C_BPARTNER_ID " ) ENABLE ,
2006-12-11 17:21:34 +07:00
CONSTRAINT " CBPGROUP_PAGOALRESTRICTION " FOREIGN KEY ( " C_BP_GROUP_ID " )
2007-02-26 12:41:30 +07:00
REFERENCES " C_BP_GROUP " ( " C_BP_GROUP_ID " ) ENABLE ,
2006-12-11 17:21:34 +07:00
CONSTRAINT " MPRODUCTCAT_PAGOALRESTRICTION " FOREIGN KEY ( " M_PRODUCT_CATEGORY_ID " )
2007-02-26 12:41:30 +07:00
REFERENCES " M_PRODUCT_CATEGORY " ( " M_PRODUCT_CATEGORY_ID " ) ENABLE ,
2006-12-11 17:21:34 +07:00
CONSTRAINT " MPRODUCT_PAGOALRESTRICTION " FOREIGN KEY ( " M_PRODUCT_ID " )
2007-02-26 12:41:30 +07:00
REFERENCES " M_PRODUCT " ( " M_PRODUCT_ID " ) ENABLE ,
2006-12-11 17:21:34 +07:00
CONSTRAINT " PAGOAL_PAGOALRESTRICTION " FOREIGN KEY ( " PA_GOAL_ID " )
2007-02-26 12:41:30 +07:00
REFERENCES " PA_GOAL " ( " PA_GOAL_ID " ) ENABLE
2006-12-11 17:21:34 +07:00
) ;
2007-02-26 12:41:30 +07:00
CREATE TABLE " R_MAILTEXT_TRL "
2006-12-11 17:21:34 +07:00
( " R_MAILTEXT_ID " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" AD_LANGUAGE " VARCHAR2 ( 6 BYTE ) NOT NULL ENABLE ,
" AD_CLIENT_ID " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" AD_ORG_ID " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" ISACTIVE " CHAR ( 1 BYTE ) DEFAULT ' Y ' NOT NULL ENABLE ,
" CREATED " DATE DEFAULT SYSDATE NOT NULL ENABLE ,
" CREATEDBY " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" UPDATED " DATE DEFAULT SYSDATE NOT NULL ENABLE ,
" UPDATEDBY " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" ISTRANSLATED " CHAR ( 1 BYTE ) DEFAULT ' N ' NOT NULL ENABLE ,
" NAME " NVARCHAR2 ( 60 ) NOT NULL ENABLE ,
" MAILHEADER " NVARCHAR2 ( 2000 ) NOT NULL ENABLE ,
" MAILTEXT " NVARCHAR2 ( 2000 ) NOT NULL ENABLE ,
" MAILTEXT2 " NVARCHAR2 ( 2000 ) ,
" MAILTEXT3 " NVARCHAR2 ( 2000 ) ,
CHECK ( IsActive in ( ' Y ' , ' N ' ) ) ENABLE ,
CHECK ( IsTranslated in ( ' Y ' , ' N ' ) ) ENABLE ,
CONSTRAINT " R_MAILTEXT_TRL_KEY " PRIMARY KEY ( " R_MAILTEXT_ID " , " AD_LANGUAGE " ) ENABLE ,
CONSTRAINT " ADLANGUAGE_RMAILTEXTTRL " FOREIGN KEY ( " AD_LANGUAGE " )
2007-02-26 12:41:30 +07:00
REFERENCES " AD_LANGUAGE " ( " AD_LANGUAGE " ) ENABLE ,
2006-12-11 17:21:34 +07:00
CONSTRAINT " RMAILTEXT_RMAILTEXTTRL " FOREIGN KEY ( " R_MAILTEXT_ID " )
2007-02-26 12:41:30 +07:00
REFERENCES " R_MAILTEXT " ( " R_MAILTEXT_ID " ) ON DELETE CASCADE ENABLE
2006-12-11 17:21:34 +07:00
) ;
2007-02-26 12:41:30 +07:00
CREATE TABLE " PA_COLORSCHEMA "
2006-12-11 17:21:34 +07:00
( " PA_COLORSCHEMA_ID " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" AD_CLIENT_ID " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" AD_ORG_ID " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" ISACTIVE " CHAR ( 1 BYTE ) DEFAULT ' Y ' NOT NULL ENABLE ,
" CREATED " DATE DEFAULT SYSDATE NOT NULL ENABLE ,
" CREATEDBY " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" UPDATED " DATE DEFAULT SYSDATE NOT NULL ENABLE ,
" UPDATEDBY " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" NAME " NVARCHAR2 ( 60 ) NOT NULL ENABLE ,
" DESCRIPTION " NVARCHAR2 ( 255 ) ,
" MARK1PERCENT " NUMBER ( 10 , 0 ) DEFAULT 0 NOT NULL ENABLE ,
" AD_PRINTCOLOR1_ID " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" MARK2PERCENT " NUMBER ( 10 , 0 ) DEFAULT 0 NOT NULL ENABLE ,
" AD_PRINTCOLOR2_ID " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" MARK3PERCENT " NUMBER ( 10 , 0 ) DEFAULT 0 ,
" AD_PRINTCOLOR3_ID " NUMBER ( 10 , 0 ) ,
" MARK4PERCENT " NUMBER ( 10 , 0 ) DEFAULT 0 ,
" AD_PRINTCOLOR4_ID " NUMBER ( 10 , 0 ) ,
CHECK ( IsActive in ( ' Y ' , ' N ' ) ) ENABLE ,
CONSTRAINT " PA_COLORSCHEMA_KEY " PRIMARY KEY ( " PA_COLORSCHEMA_ID " ) ENABLE ,
CONSTRAINT " ADPRINTCOLOR1_PACOLORSCHEMA " FOREIGN KEY ( " AD_PRINTCOLOR1_ID " )
2007-02-26 12:41:30 +07:00
REFERENCES " AD_PRINTCOLOR " ( " AD_PRINTCOLOR_ID " ) ENABLE ,
2006-12-11 17:21:34 +07:00
CONSTRAINT " ADPRINTCOLOR2_PACOLORSCHEMA " FOREIGN KEY ( " AD_PRINTCOLOR2_ID " )
2007-02-26 12:41:30 +07:00
REFERENCES " AD_PRINTCOLOR " ( " AD_PRINTCOLOR_ID " ) ENABLE ,
2006-12-11 17:21:34 +07:00
CONSTRAINT " ADPRINTCOLOR3_PACOLORSCHEMA " FOREIGN KEY ( " AD_PRINTCOLOR3_ID " )
2007-02-26 12:41:30 +07:00
REFERENCES " AD_PRINTCOLOR " ( " AD_PRINTCOLOR_ID " ) ENABLE ,
2006-12-11 17:21:34 +07:00
CONSTRAINT " ADPRINTCOLOR4_PACOLORSCHEMA " FOREIGN KEY ( " AD_PRINTCOLOR4_ID " )
2007-02-26 12:41:30 +07:00
REFERENCES " AD_PRINTCOLOR " ( " AD_PRINTCOLOR_ID " ) ENABLE
2006-12-11 17:21:34 +07:00
) ;
/* INSERTING into PA_COLORSCHEMA */
Insert into " PA_COLORSCHEMA " ( " PA_COLORSCHEMA_ID " , " AD_CLIENT_ID " , " AD_ORG_ID " , " ISACTIVE " , " CREATED " , " CREATEDBY " , " UPDATED " , " UPDATEDBY " , " NAME " , " DESCRIPTION " , " MARK1PERCENT " , " AD_PRINTCOLOR1_ID " , " MARK2PERCENT " , " AD_PRINTCOLOR2_ID " , " MARK3PERCENT " , " AD_PRINTCOLOR3_ID " , " MARK4PERCENT " , " AD_PRINTCOLOR4_ID " ) values ( 101 , 0 , 0 , ' Y ' , to_date ( ' 31.12.05 ' , ' DD.MM.RR ' ) , 100 , to_date ( ' 31.12.05 ' , ' DD.MM.RR ' ) , 100 , ' Green (50) - Yellow (100) - Red ' , ' < 100% is the goal ' , 50 , 103 , 100 , 113 , 9999 , 102 , 0 , null ) ;
Insert into " PA_COLORSCHEMA " ( " PA_COLORSCHEMA_ID " , " AD_CLIENT_ID " , " AD_ORG_ID " , " ISACTIVE " , " CREATED " , " CREATEDBY " , " UPDATED " , " UPDATEDBY " , " NAME " , " DESCRIPTION " , " MARK1PERCENT " , " AD_PRINTCOLOR1_ID " , " MARK2PERCENT " , " AD_PRINTCOLOR2_ID " , " MARK3PERCENT " , " AD_PRINTCOLOR3_ID " , " MARK4PERCENT " , " AD_PRINTCOLOR4_ID " ) values ( 100 , 0 , 0 , ' Y ' , to_date ( ' 23.12.05 ' , ' DD.MM.RR ' ) , 100 , to_date ( ' 31.12.05 ' , ' DD.MM.RR ' ) , 100 , ' Red (50) - Yellow (100) - Green ' , ' >= 100% is the goal ' , 50 , 102 , 100 , 113 , 9999 , 103 , 0 , null ) ;
2007-02-26 12:41:30 +07:00
CREATE TABLE " PA_RATIO "
2006-12-11 17:21:34 +07:00
( " PA_RATIO_ID " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" AD_CLIENT_ID " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" AD_ORG_ID " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" ISACTIVE " CHAR ( 1 BYTE ) DEFAULT ' Y ' NOT NULL ENABLE ,
" CREATED " DATE DEFAULT SYSDATE NOT NULL ENABLE ,
" CREATEDBY " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" UPDATED " DATE DEFAULT SYSDATE NOT NULL ENABLE ,
" UPDATEDBY " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" NAME " NVARCHAR2 ( 60 ) NOT NULL ENABLE ,
" DESCRIPTION " NVARCHAR2 ( 255 ) ,
" HELP " NVARCHAR2 ( 2000 ) ,
" C_ACCTSCHEMA_ID " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
CHECK ( IsActive in ( ' Y ' , ' N ' ) ) ENABLE ,
CONSTRAINT " PA_RATIO_KEY " PRIMARY KEY ( " PA_RATIO_ID " ) ENABLE ,
CONSTRAINT " CACCTSCHEMA_PARATIO " FOREIGN KEY ( " C_ACCTSCHEMA_ID " )
2007-02-26 12:41:30 +07:00
REFERENCES " C_ACCTSCHEMA " ( " C_ACCTSCHEMA_ID " ) ENABLE
2006-12-11 17:21:34 +07:00
) ;
/* INSERTING into PA_RATIO */
Insert into " PA_RATIO " ( " PA_RATIO_ID " , " AD_CLIENT_ID " , " AD_ORG_ID " , " ISACTIVE " , " CREATED " , " CREATEDBY " , " UPDATED " , " UPDATEDBY " , " NAME " , " DESCRIPTION " , " HELP " , " C_ACCTSCHEMA_ID " ) values ( 100 , 11 , 11 , ' Y ' , to_date ( ' 26.12.05 ' , ' DD.MM.RR ' ) , 101 , to_date ( ' 26.12.05 ' , ' DD.MM.RR ' ) , 101 , ' Fxed Assets ' , null , null , 101 ) ;
2007-02-26 12:41:30 +07:00
CREATE TABLE " PA_RATIOELEMENT "
2006-12-11 17:21:34 +07:00
( " PA_RATIOELEMENT_ID " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" AD_CLIENT_ID " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" AD_ORG_ID " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" ISACTIVE " CHAR ( 1 BYTE ) DEFAULT ' Y ' NOT NULL ENABLE ,
" CREATED " DATE DEFAULT SYSDATE NOT NULL ENABLE ,
" CREATEDBY " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" UPDATED " DATE DEFAULT SYSDATE NOT NULL ENABLE ,
" UPDATEDBY " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" NAME " NVARCHAR2 ( 60 ) NOT NULL ENABLE ,
" DESCRIPTION " NVARCHAR2 ( 255 ) ,
" PA_RATIO_ID " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" RATIOOPERAND " CHAR ( 1 BYTE ) NOT NULL ENABLE ,
" RATIOELEMENTTYPE " CHAR ( 1 BYTE ) NOT NULL ENABLE ,
" ACCOUNT_ID " NUMBER ( 10 , 0 ) ,
" PA_RATIOUSED_ID " NUMBER ( 10 , 0 ) ,
" PA_MEASURECALC_ID " NUMBER ( 10 , 0 ) ,
" CONSTANTVALUE " NUMBER ,
" SEQNO " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" POSTINGTYPE " CHAR ( 1 BYTE ) ,
CHECK ( IsActive in ( ' Y ' , ' N ' ) ) ENABLE ,
CONSTRAINT " PA_RATIOELEMENT_KEY " PRIMARY KEY ( " PA_RATIOELEMENT_ID " ) ENABLE ,
CONSTRAINT " CELEMENTVALUE_PARATIOELEMENT " FOREIGN KEY ( " ACCOUNT_ID " )
2007-02-26 12:41:30 +07:00
REFERENCES " C_ELEMENTVALUE " ( " C_ELEMENTVALUE_ID " ) ENABLE ,
2006-12-11 17:21:34 +07:00
CONSTRAINT " PAMEASURECALC_PARATIOELEMENT " FOREIGN KEY ( " PA_MEASURECALC_ID " )
2007-02-26 12:41:30 +07:00
REFERENCES " PA_MEASURECALC " ( " PA_MEASURECALC_ID " ) ENABLE ,
2006-12-11 17:21:34 +07:00
CONSTRAINT " PARATIOUSED_PARATIOELEMENT " FOREIGN KEY ( " PA_RATIOUSED_ID " )
2007-02-26 12:41:30 +07:00
REFERENCES " PA_RATIO " ( " PA_RATIO_ID " ) ENABLE ,
2006-12-11 17:21:34 +07:00
CONSTRAINT " PARATIO_PARATIOELEMENT " FOREIGN KEY ( " PA_RATIO_ID " )
2007-02-26 12:41:30 +07:00
REFERENCES " PA_RATIO " ( " PA_RATIO_ID " ) ENABLE
2006-12-11 17:21:34 +07:00
) ;
/* INSERTING into PA_RATIOELEMENT */
Insert into " PA_RATIOELEMENT " ( " PA_RATIOELEMENT_ID " , " AD_CLIENT_ID " , " AD_ORG_ID " , " ISACTIVE " , " CREATED " , " CREATEDBY " , " UPDATED " , " UPDATEDBY " , " NAME " , " DESCRIPTION " , " PA_RATIO_ID " , " RATIOOPERAND " , " RATIOELEMENTTYPE " , " ACCOUNT_ID " , " PA_RATIOUSED_ID " , " PA_MEASURECALC_ID " , " CONSTANTVALUE " , " SEQNO " , " POSTINGTYPE " ) values ( 100 , 11 , 11 , ' Y ' , to_date ( ' 26.12.05 ' , ' DD.MM.RR ' ) , 101 , to_date ( ' 26.12.05 ' , ' DD.MM.RR ' ) , 101 , ' Long Term Investments ' , null , 100 , ' P ' , ' A ' , 537 , null , null , 0 , 10 , ' A ' ) ;
Insert into " PA_RATIOELEMENT " ( " PA_RATIOELEMENT_ID " , " AD_CLIENT_ID " , " AD_ORG_ID " , " ISACTIVE " , " CREATED " , " CREATEDBY " , " UPDATED " , " UPDATEDBY " , " NAME " , " DESCRIPTION " , " PA_RATIO_ID " , " RATIOOPERAND " , " RATIOELEMENTTYPE " , " ACCOUNT_ID " , " PA_RATIOUSED_ID " , " PA_MEASURECALC_ID " , " CONSTANTVALUE " , " SEQNO " , " POSTINGTYPE " ) values ( 101 , 11 , 11 , ' Y ' , to_date ( ' 26.12.05 ' , ' DD.MM.RR ' ) , 101 , to_date ( ' 26.12.05 ' , ' DD.MM.RR ' ) , 101 , ' Inventory ' , null , 100 , ' P ' , ' A ' , 541 , null , null , 0 , 0 , ' A ' ) ;
Insert into " PA_RATIOELEMENT " ( " PA_RATIOELEMENT_ID " , " AD_CLIENT_ID " , " AD_ORG_ID " , " ISACTIVE " , " CREATED " , " CREATEDBY " , " UPDATED " , " UPDATEDBY " , " NAME " , " DESCRIPTION " , " PA_RATIO_ID " , " RATIOOPERAND " , " RATIOELEMENTTYPE " , " ACCOUNT_ID " , " PA_RATIOUSED_ID " , " PA_MEASURECALC_ID " , " CONSTANTVALUE " , " SEQNO " , " POSTINGTYPE " ) values ( 102 , 11 , 11 , ' Y ' , to_date ( ' 26.12.05 ' , ' DD.MM.RR ' ) , 101 , to_date ( ' 26.12.05 ' , ' DD.MM.RR ' ) , 101 , ' Land and Building ' , null , 100 , ' P ' , ' A ' , 554 , null , null , 0 , 0 , null ) ;
2007-02-26 12:41:30 +07:00
CREATE TABLE " R_STATUSCATEGORY "
2006-12-11 17:21:34 +07:00
( " R_STATUSCATEGORY_ID " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" AD_CLIENT_ID " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" AD_ORG_ID " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" ISACTIVE " CHAR ( 1 BYTE ) DEFAULT ' Y ' NOT NULL ENABLE ,
" CREATED " DATE DEFAULT SYSDATE NOT NULL ENABLE ,
" CREATEDBY " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" UPDATED " DATE DEFAULT SYSDATE NOT NULL ENABLE ,
" UPDATEDBY " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" NAME " NVARCHAR2 ( 60 ) NOT NULL ENABLE ,
" DESCRIPTION " NVARCHAR2 ( 255 ) ,
" HELP " NVARCHAR2 ( 2000 ) ,
" ISDEFAULT " CHAR ( 1 BYTE ) DEFAULT ' N ' NOT NULL ENABLE ,
CHECK ( IsActive in ( ' Y ' , ' N ' ) ) ENABLE ,
CHECK ( IsDefault in ( ' Y ' , ' N ' ) ) ENABLE ,
CONSTRAINT " R_STATUSCATEGORY_KEY " PRIMARY KEY ( " R_STATUSCATEGORY_ID " ) ENABLE
) ;
/* INSERTING into R_STATUSCATEGORY */
Insert into " R_STATUSCATEGORY " ( " R_STATUSCATEGORY_ID " , " AD_CLIENT_ID " , " AD_ORG_ID " , " ISACTIVE " , " CREATED " , " CREATEDBY " , " UPDATED " , " UPDATEDBY " , " NAME " , " DESCRIPTION " , " HELP " , " ISDEFAULT " ) values ( 100 , 11 , 0 , ' Y ' , to_date ( ' 15.01.06 ' , ' DD.MM.RR ' ) , 100 , to_date ( ' 15.01.06 ' , ' DD.MM.RR ' ) , 100 , ' Default ' , ' Default Request Status ' , null , ' Y ' ) ;
2007-02-26 12:41:30 +07:00
CREATE TABLE " PA_BENCHMARK "
2006-12-11 17:21:34 +07:00
( " PA_BENCHMARK_ID " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" AD_CLIENT_ID " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" AD_ORG_ID " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" ISACTIVE " CHAR ( 1 BYTE ) DEFAULT ' Y ' NOT NULL ENABLE ,
" CREATED " DATE DEFAULT SYSDATE NOT NULL ENABLE ,
" CREATEDBY " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" UPDATED " DATE DEFAULT SYSDATE NOT NULL ENABLE ,
" UPDATEDBY " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" NAME " NVARCHAR2 ( 60 ) NOT NULL ENABLE ,
" DESCRIPTION " NVARCHAR2 ( 255 ) ,
" HELP " NVARCHAR2 ( 2000 ) ,
" ACCUMULATIONTYPE " CHAR ( 1 BYTE ) NOT NULL ENABLE ,
CHECK ( IsActive in ( ' Y ' , ' N ' ) ) ENABLE ,
CONSTRAINT " PA_BENMARK_KEY " PRIMARY KEY ( " PA_BENCHMARK_ID " ) ENABLE
) ;
2007-02-26 12:41:30 +07:00
CREATE TABLE " PA_BENCHMARKDATA "
2006-12-11 17:21:34 +07:00
( " PA_BENCHMARKDATA_ID " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" AD_CLIENT_ID " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" AD_ORG_ID " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" ISACTIVE " CHAR ( 1 BYTE ) DEFAULT ' Y ' NOT NULL ENABLE ,
" CREATED " DATE DEFAULT SYSDATE NOT NULL ENABLE ,
" CREATEDBY " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" UPDATED " DATE DEFAULT SYSDATE NOT NULL ENABLE ,
" UPDATEDBY " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" NAME " NVARCHAR2 ( 60 ) NOT NULL ENABLE ,
" DESCRIPTION " NVARCHAR2 ( 255 ) ,
" PA_BENCHMARK_ID " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" BENCHMARKDATE " DATE NOT NULL ENABLE ,
" BENCHMARKVALUE " NUMBER NOT NULL ENABLE ,
CHECK ( IsActive in ( ' Y ' , ' N ' ) ) ENABLE ,
CONSTRAINT " PA_BENCHMARKDATA_KEY " PRIMARY KEY ( " PA_BENCHMARKDATA_ID " ) ENABLE ,
CONSTRAINT " PABENCHMARK_PABENCHMARKDATA " FOREIGN KEY ( " PA_BENCHMARK_ID " )
2007-02-26 12:41:30 +07:00
REFERENCES " PA_BENCHMARK " ( " PA_BENCHMARK_ID " ) ON DELETE CASCADE ENABLE
2006-12-11 17:21:34 +07:00
) ;
/* alter existing tables - add new columns */
2007-02-26 12:41:30 +07:00
ALTER TABLE " C_TAXDECLARATIONACCT "
2006-12-11 17:21:34 +07:00
ADD " LINE " NUMBER ( 10 , 0 ) ;
2007-02-26 12:41:30 +07:00
ALTER TABLE " C_TAXDECLARATIONLINE "
2006-12-11 17:21:34 +07:00
ADD ( " ISMANUAL " CHAR ( 1 BYTE ) DEFAULT ' N ' NOT NULL ENABLE ,
" C_CURRENCY_ID " NUMBER ( 10 , 0 ) NULL ) ;
-- REPLACE_ME: set a
-- default value for C_Currency_ID (the default currency) 102 is EUR, 100 is USD
2007-02-26 12:41:30 +07:00
UPDATE " C_TAXDECLARATIONLINE " SET " C_CURRENCY_ID " = 100 ;
2006-12-11 17:21:34 +07:00
2007-02-26 12:41:30 +07:00
ALTER TABLE " C_TAXDECLARATIONLINE "
2006-12-11 17:21:34 +07:00
MODIFY ( " C_CURRENCY_ID " NUMBER ( 10 , 0 ) NOT NULL ENABLE ) ;
2007-02-26 12:41:30 +07:00
ALTER TABLE " C_TAXDECLARATIONLINE "
2006-12-11 17:21:34 +07:00
ADD CONSTRAINT " CCURRENCY_CTAXDECLLINE " FOREIGN KEY ( " C_CURRENCY_ID " )
2007-02-26 12:41:30 +07:00
REFERENCES " C_CURRENCY " ( " C_CURRENCY_ID " ) ;
2006-12-11 17:21:34 +07:00
2007-02-26 12:41:30 +07:00
ALTER TABLE " FACT_ACCT_BALANCE "
2006-12-11 17:21:34 +07:00
ADD ( " C_SUBACCT_ID " NUMBER ( 10 , 0 ) ,
" USERELEMENT1_ID " NUMBER ( 10 , 0 ) ,
" USERELEMENT2_ID " NUMBER ( 10 , 0 ) ) ;
2007-02-26 12:41:30 +07:00
ALTER TABLE " PA_ACHIEVEMENT "
2006-12-11 17:21:34 +07:00
ADD ( " MANUALACTUAL " NUMBER DEFAULT 0 NOT NULL ,
" PA_MEASURE_ID " NUMBER ( 10 , 0 ) NULL ,
" DATEDOC " DATE ) ;
2007-02-26 12:41:30 +07:00
ALTER TABLE " PA_ACHIEVEMENT "
2006-12-11 17:21:34 +07:00
ADD CONSTRAINT " PAMEASURE_PAACHIEVEMENT " FOREIGN KEY ( " PA_MEASURE_ID " )
2007-02-26 12:41:30 +07:00
REFERENCES " PA_MEASURE " ( " PA_MEASURE_ID " ) ;
2006-12-11 17:21:34 +07:00
-- REPLACE_ME: if there are lines in the table you have to set a
-- default value for PA_MEASURE_ID (references PA_Measure)
2007-02-26 12:41:30 +07:00
UPDATE " PA_ACHIEVEMENT " SET " PA_MEASURE_ID " = 0 ;
2006-12-11 17:21:34 +07:00
2007-02-26 12:41:30 +07:00
ALTER TABLE " PA_ACHIEVEMENT "
2006-12-11 17:21:34 +07:00
MODIFY " PA_MEASURE_ID " NUMBER ( 10 , 0 ) NOT NULL ;
/* BEWARE: ALL ENTRIES IN PA_MEASURE AND PA_MEASURECALC ARE DELETED */
2007-02-26 12:41:30 +07:00
DELETE FROM " PA_MEASURE " ;
DELETE FROM " PA_MEASURECALC " ;
2006-12-11 17:21:34 +07:00
2007-02-26 12:41:30 +07:00
ALTER TABLE " PA_MEASURECALC "
2006-12-11 17:21:34 +07:00
ADD ( " AD_TABLE_ID " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" KEYCOLUMN " NVARCHAR2 ( 60 ) NOT NULL ENABLE ,
" ENTITYTYPE " VARCHAR2 ( 4 BYTE ) NOT NULL ENABLE
) ;
/* INSERTING into PA_MEASURECALC */
Insert into " PA_MEASURECALC " ( " PA_MEASURECALC_ID " , " AD_CLIENT_ID " , " AD_ORG_ID " , " ISACTIVE " , " CREATED " , " CREATEDBY " , " UPDATED " , " UPDATEDBY " , " NAME " , " DESCRIPTION " , " SELECTCLAUSE " , " WHERECLAUSE " , " DATECOLUMN " , " ORGCOLUMN " , " BPARTNERCOLUMN " , " PRODUCTCOLUMN " , " AD_TABLE_ID " , " KEYCOLUMN " , " ENTITYTYPE " ) values ( 100 , 0 , 0 , ' Y ' , to_date ( ' 26.04.01 ' , ' DD.MM.RR ' ) , 0 , to_date ( ' 01.01.06 ' , ' DD.MM.RR ' ) , 100 , ' Invoiced Net Revenue ' , ' Invoiced net revenue, without tax and charges ' , ' SELECT SUM(il.LineNetAmt)
FROM RV_C_Invoice C_Invoice
INNER JOIN RV_C_InvoiceLine il ON ( C_Invoice . C_Invoice_ID = il . C_Invoice_ID ) ' , ' WHERE C_Invoice . IsSOTrx = ' ' Y ' ' AND C_Invoice . Processed = ' ' Y ' '' , ' C_Invoice . DateInvoiced ' , ' C_Invoice . AD_Org_ID ' , ' C_Invoice . C_BPartner_ID ' , ' il . M_Product_ID ' ,318, ' C_Invoice . C_Invoice_ID ' , ' D ' );
Insert into " PA_MEASURECALC " ( " PA_MEASURECALC_ID " , " AD_CLIENT_ID " , " AD_ORG_ID " , " ISACTIVE " , " CREATED " , " CREATEDBY " , " UPDATED " , " UPDATEDBY " , " NAME " , " DESCRIPTION " , " SELECTCLAUSE " , " WHERECLAUSE " , " DATECOLUMN " , " ORGCOLUMN " , " BPARTNERCOLUMN " , " PRODUCTCOLUMN " , " AD_TABLE_ID " , " KEYCOLUMN " , " ENTITYTYPE " ) values ( 101 , 0 , 0 , ' Y ' , to_date ( ' 26.04.01 ' , ' DD.MM.RR ' ) , 0 , to_date ( ' 01.01.06 ' , ' DD.MM.RR ' ) , 100 , ' Invoiced Gross Revenue ' , ' Invoice gross amount including tax; Does not allow selection by product (Category) ' , ' SELECT SUM(GrandTotal)
FROM RV_C_Invoice C_Invoice ' , ' WHERE IsSOTrx = ' ' Y ' ' AND Processed = ' ' Y ' '' , ' DateInvoiced ' , ' AD_Org_ID ' , ' C_BPartner_ID ' ,null,318, ' C_Invoice_ID ' , ' D ' );
Insert into " PA_MEASURECALC " ( " PA_MEASURECALC_ID " , " AD_CLIENT_ID " , " AD_ORG_ID " , " ISACTIVE " , " CREATED " , " CREATEDBY " , " UPDATED " , " UPDATEDBY " , " NAME " , " DESCRIPTION " , " SELECTCLAUSE " , " WHERECLAUSE " , " DATECOLUMN " , " ORGCOLUMN " , " BPARTNERCOLUMN " , " PRODUCTCOLUMN " , " AD_TABLE_ID " , " KEYCOLUMN " , " ENTITYTYPE " ) values ( 102 , 0 , 0 , ' Y ' , to_date ( ' 26.04.01 ' , ' DD.MM.RR ' ) , 0 , to_date ( ' 01.01.06 ' , ' DD.MM.RR ' ) , 100 , ' Invoiced Sales Margin ' , ' Difference between Limit and Actual price ' , ' SELECT SUM((il.PriceActual-il.PriceLimit)*QtyInvoiced)
FROM RV_C_Invoice C_Invoice
INNER JOIN RV_C_InvoiceLine il ON ( C_Invoice . C_Invoice_ID = il . C_Invoice_ID ) ' , ' WHERE C_Invoice . IsSOTrx = ' ' Y ' ' AND C_Invoice . Processed = ' ' Y ' '' , ' C_Invoice . DateInvoiced ' , ' C_Invoice . AD_Org_ID ' , ' C_Invoice . C_BPartner_ID ' , ' il . M_Product_ID ' ,318, ' C_Invoice . C_Invoice_ID ' , ' D ' );
Insert into " PA_MEASURECALC " ( " PA_MEASURECALC_ID " , " AD_CLIENT_ID " , " AD_ORG_ID " , " ISACTIVE " , " CREATED " , " CREATEDBY " , " UPDATED " , " UPDATEDBY " , " NAME " , " DESCRIPTION " , " SELECTCLAUSE " , " WHERECLAUSE " , " DATECOLUMN " , " ORGCOLUMN " , " BPARTNERCOLUMN " , " PRODUCTCOLUMN " , " AD_TABLE_ID " , " KEYCOLUMN " , " ENTITYTYPE " ) values ( 103 , 0 , 0 , ' Y ' , to_date ( ' 26.04.01 ' , ' DD.MM.RR ' ) , 0 , to_date ( ' 25.12.05 ' , ' DD.MM.RR ' ) , 100 , ' Number of Customers ' , ' Number of (new) customers ' , ' SELECT COUNT(*)
FROM C_BPartner ' , ' WHERE IsCustomer = ' ' Y ' '' , ' Created ' , ' AD_Org_ID ' , ' C_BPartner_ID ' ,null,291, ' C_BPartner_ID ' , ' D ' );
Insert into " PA_MEASURECALC " ( " PA_MEASURECALC_ID " , " AD_CLIENT_ID " , " AD_ORG_ID " , " ISACTIVE " , " CREATED " , " CREATEDBY " , " UPDATED " , " UPDATEDBY " , " NAME " , " DESCRIPTION " , " SELECTCLAUSE " , " WHERECLAUSE " , " DATECOLUMN " , " ORGCOLUMN " , " BPARTNERCOLUMN " , " PRODUCTCOLUMN " , " AD_TABLE_ID " , " KEYCOLUMN " , " ENTITYTYPE " ) values ( 104 , 0 , 0 , ' Y ' , to_date ( ' 25.12.05 ' , ' DD.MM.RR ' ) , 100 , to_date ( ' 01.01.06 ' , ' DD.MM.RR ' ) , 100 , ' Invoiced Paid Quantities ' , ' Invoiced paid quantities ' , ' SELECT SUM(il.QtyInvoiced)
FROM RV_C_Invoice C_Invoice
INNER JOIN RV_C_InvoiceLine il ON ( C_Invoice . C_Invoice_ID = il . C_Invoice_ID ) ' , ' WHERE C_Invoice . IsSOTrx = ' ' Y ' ' AND C_Invoice . Processed = ' ' Y ' ' AND C_Invoice . IsPaid = ' ' Y ' '
' , ' C_Invoice . DateInvoiced ' , ' C_Invoice . AD_Org_ID ' , ' C_Invoice . C_BPartner_ID ' , ' il . M_Product_ID ' ,318, ' C_Invoice . C_Invoice_ID ' , ' D ' );
Insert into " PA_MEASURECALC " ( " PA_MEASURECALC_ID " , " AD_CLIENT_ID " , " AD_ORG_ID " , " ISACTIVE " , " CREATED " , " CREATEDBY " , " UPDATED " , " UPDATEDBY " , " NAME " , " DESCRIPTION " , " SELECTCLAUSE " , " WHERECLAUSE " , " DATECOLUMN " , " ORGCOLUMN " , " BPARTNERCOLUMN " , " PRODUCTCOLUMN " , " AD_TABLE_ID " , " KEYCOLUMN " , " ENTITYTYPE " ) values ( 105 , 0 , 0 , ' Y ' , to_date ( ' 01.01.06 ' , ' DD.MM.RR ' ) , 100 , to_date ( ' 01.01.06 ' , ' DD.MM.RR ' ) , 100 , ' Open Invoice Amount ' , ' Open Invoice Amount in Accounting Currency ' , ' SELECT COALESCE(SUM(currencyBase(invoiceOpen(C_Invoice_ID, C_InvoicePaySchedule_ID),C_Currency_ID, DateAcct, AD_Client_ID, AD_Org_ID)),0)
FROM C_Invoice_v C_Invoice ' , ' WHERE IsSOTrx = ' ' Y ' ' AND Processed = ' ' Y ' '' , ' DateInvoiced ' , ' AD_Org_ID ' , ' C_BPartner_ID ' ,null,318, ' C_Invoice_ID ' , ' D ' );
2007-02-26 12:41:30 +07:00
ALTER TABLE " PA_MEASURE "
2006-12-11 17:21:34 +07:00
ADD ( " PA_BENCHMARK_ID " NUMBER ( 10 , 0 ) ,
" PA_RATIO_ID " NUMBER ( 10 , 0 ) ,
" PA_HIERARCHY_ID " NUMBER ( 10 , 0 ) ,
" MEASUREDATATYPE " CHAR ( 1 BYTE ) NOT NULL ENABLE ,
" R_REQUESTTYPE_ID " NUMBER ( 10 , 0 ) ,
" C_PROJECTTYPE_ID " NUMBER ( 10 , 0 )
) ;
2007-02-26 12:41:30 +07:00
ALTER TABLE " PA_MEASURE "
2006-12-11 17:21:34 +07:00
ADD CONSTRAINT " PABENCHMARK_PAMEASURE " FOREIGN KEY ( " PA_BENCHMARK_ID " )
2007-02-26 12:41:30 +07:00
REFERENCES " PA_BENCHMARK " ( " PA_BENCHMARK_ID " ) ;
ALTER TABLE " PA_MEASURE "
2006-12-11 17:21:34 +07:00
ADD CONSTRAINT " PAHIERARCHY_PAMEASURE " FOREIGN KEY ( " PA_HIERARCHY_ID " )
2007-02-26 12:41:30 +07:00
REFERENCES " PA_HIERARCHY " ( " PA_HIERARCHY_ID " ) ;
ALTER TABLE " PA_MEASURE "
2006-12-11 17:21:34 +07:00
ADD CONSTRAINT " PARATIO_PAMEASURE " FOREIGN KEY ( " PA_RATIO_ID " )
2007-02-26 12:41:30 +07:00
REFERENCES " PA_RATIO " ( " PA_RATIO_ID " ) ;
2006-12-11 17:21:34 +07:00
/* INSERTING into PA_MEASURE */
Insert into " PA_MEASURE " ( " PA_MEASURE_ID " , " AD_CLIENT_ID " , " AD_ORG_ID " , " ISACTIVE " , " CREATED " , " CREATEDBY " , " UPDATED " , " UPDATEDBY " , " NAME " , " DESCRIPTION " , " MEASURETYPE " , " MANUALACTUAL " , " MANUALNOTE " , " CALCULATIONCLASS " , " PA_MEASURECALC_ID " , " PA_BENCHMARK_ID " , " PA_RATIO_ID " , " PA_HIERARCHY_ID " , " MEASUREDATATYPE " , " R_REQUESTTYPE_ID " , " C_PROJECTTYPE_ID " ) values ( 102 , 11 , 0 , ' Y ' , to_date ( ' 01.01.06 ' , ' DD.MM.RR ' ) , 100 , to_date ( ' 01.01.06 ' , ' DD.MM.RR ' ) , 100 , ' Open Invoice Amount ' , null , ' C ' , 0 , null , null , 105 , null , null , null , ' S ' , null , null ) ;
Insert into " PA_MEASURE " ( " PA_MEASURE_ID " , " AD_CLIENT_ID " , " AD_ORG_ID " , " ISACTIVE " , " CREATED " , " CREATEDBY " , " UPDATED " , " UPDATEDBY " , " NAME " , " DESCRIPTION " , " MEASURETYPE " , " MANUALACTUAL " , " MANUALNOTE " , " CALCULATIONCLASS " , " PA_MEASURECALC_ID " , " PA_BENCHMARK_ID " , " PA_RATIO_ID " , " PA_HIERARCHY_ID " , " MEASUREDATATYPE " , " R_REQUESTTYPE_ID " , " C_PROJECTTYPE_ID " ) values ( 103 , 11 , 0 , ' Y ' , to_date ( ' 20.01.06 ' , ' DD.MM.RR ' ) , 100 , to_date ( ' 20.01.06 ' , ' DD.MM.RR ' ) , 100 , ' Service Requests (Time) ' , null , ' Q ' , 0 , null , null , null , null , null , null , ' T ' , 101 , null ) ;
Insert into " PA_MEASURE " ( " PA_MEASURE_ID " , " AD_CLIENT_ID " , " AD_ORG_ID " , " ISACTIVE " , " CREATED " , " CREATEDBY " , " UPDATED " , " UPDATEDBY " , " NAME " , " DESCRIPTION " , " MEASURETYPE " , " MANUALACTUAL " , " MANUALNOTE " , " CALCULATIONCLASS " , " PA_MEASURECALC_ID " , " PA_BENCHMARK_ID " , " PA_RATIO_ID " , " PA_HIERARCHY_ID " , " MEASUREDATATYPE " , " R_REQUESTTYPE_ID " , " C_PROJECTTYPE_ID " ) values ( 104 , 11 , 0 , ' Y ' , to_date ( ' 20.01.06 ' , ' DD.MM.RR ' ) , 100 , to_date ( ' 20.01.06 ' , ' DD.MM.RR ' ) , 100 , ' Service Requests (Status) ' , null , ' Q ' , 0 , null , null , null , null , null , null , ' S ' , 101 , null ) ;
Insert into " PA_MEASURE " ( " PA_MEASURE_ID " , " AD_CLIENT_ID " , " AD_ORG_ID " , " ISACTIVE " , " CREATED " , " CREATEDBY " , " UPDATED " , " UPDATEDBY " , " NAME " , " DESCRIPTION " , " MEASURETYPE " , " MANUALACTUAL " , " MANUALNOTE " , " CALCULATIONCLASS " , " PA_MEASURECALC_ID " , " PA_BENCHMARK_ID " , " PA_RATIO_ID " , " PA_HIERARCHY_ID " , " MEASUREDATATYPE " , " R_REQUESTTYPE_ID " , " C_PROJECTTYPE_ID " ) values ( 101 , 11 , 0 , ' Y ' , to_date ( ' 25.12.05 ' , ' DD.MM.RR ' ) , 100 , to_date ( ' 26.12.05 ' , ' DD.MM.RR ' ) , 101 , ' Invoices Gross Revenue ' , null , ' C ' , 0 , null , null , 101 , null , null , null , ' T ' , null , null ) ;
2007-02-26 12:41:30 +07:00
ALTER TABLE " PA_GOAL "
2006-12-11 17:21:34 +07:00
ADD ( " AD_USER_ID " NUMBER ( 10 , 0 ) ,
" PA_COLORSCHEMA_ID " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" PA_GOALPARENT_ID " NUMBER ( 10 , 0 ) ,
" MEASURESCOPE " CHAR ( 1 BYTE ) NOT NULL ENABLE ,
" MEASUREDISPLAY " CHAR ( 1 BYTE ) ,
" DATEFROM " DATE ,
" DATETO " DATE ,
" AD_ROLE_ID " NUMBER ( 10 , 0 )
) ;
2007-02-26 12:41:30 +07:00
ALTER TABLE " PA_GOAL "
2006-12-11 17:21:34 +07:00
ADD CONSTRAINT " ADUSER_PAGOAL " FOREIGN KEY ( " AD_USER_ID " )
2007-02-26 12:41:30 +07:00
REFERENCES " AD_USER " ( " AD_USER_ID " ) ;
2006-12-11 17:21:34 +07:00
2007-02-26 12:41:30 +07:00
ALTER TABLE " PA_GOAL "
2006-12-11 17:21:34 +07:00
ADD CONSTRAINT " PACOLORSCHEMA_PAGOAL " FOREIGN KEY ( " PA_COLORSCHEMA_ID " )
2007-02-26 12:41:30 +07:00
REFERENCES " PA_COLORSCHEMA " ( " PA_COLORSCHEMA_ID " ) ;
2006-12-11 17:21:34 +07:00
2007-02-26 12:41:30 +07:00
ALTER TABLE " PA_GOAL "
2006-12-11 17:21:34 +07:00
ADD CONSTRAINT " PAGOALPARENT_PAGOAL " FOREIGN KEY ( " PA_GOALPARENT_ID " )
2007-02-26 12:41:30 +07:00
REFERENCES " PA_GOAL " ( " PA_GOAL_ID " ) ;
2006-12-11 17:21:34 +07:00
/* INSERTING into PA_GOAL */
Insert into " PA_GOAL " ( " PA_GOAL_ID " , " AD_CLIENT_ID " , " AD_ORG_ID " , " ISACTIVE " , " CREATED " , " CREATEDBY " , " UPDATED " , " UPDATEDBY " , " SEQNO " , " NAME " , " DESCRIPTION " , " NOTE " , " AD_USER_ID " , " PA_COLORSCHEMA_ID " , " ISSUMMARY " , " PA_GOALPARENT_ID " , " PA_MEASURE_ID " , " RELATIVEWEIGHT " , " MEASURETARGET " , " MEASURESCOPE " , " MEASUREDISPLAY " , " DATEFROM " , " DATETO " , " MEASUREACTUAL " , " GOALPERFORMANCE " , " DATELASTRUN " , " AD_ROLE_ID " ) values ( 101 , 11 , 0 , ' Y ' , to_date ( ' 23.12.05 ' , ' DD.MM.RR ' ) , 100 , to_date ( ' 11.02.06 ' , ' DD.MM.RR ' ) , 100 , 0 , ' Invoice Revenue ' , ' 100k in Revenue ' , null , null , 100 , ' N ' , null , 101 , 1 , 100000 , ' 1 ' , ' 5 ' , null , null , 0 , 0 , to_date ( ' 11.02.06 ' , ' DD.MM.RR ' ) , null ) ;
Insert into " PA_GOAL " ( " PA_GOAL_ID " , " AD_CLIENT_ID " , " AD_ORG_ID " , " ISACTIVE " , " CREATED " , " CREATEDBY " , " UPDATED " , " UPDATEDBY " , " SEQNO " , " NAME " , " DESCRIPTION " , " NOTE " , " AD_USER_ID " , " PA_COLORSCHEMA_ID " , " ISSUMMARY " , " PA_GOALPARENT_ID " , " PA_MEASURE_ID " , " RELATIVEWEIGHT " , " MEASURETARGET " , " MEASURESCOPE " , " MEASUREDISPLAY " , " DATEFROM " , " DATETO " , " MEASUREACTUAL " , " GOALPERFORMANCE " , " DATELASTRUN " , " AD_ROLE_ID " ) values ( 102 , 11 , 0 , ' Y ' , to_date ( ' 01.01.06 ' , ' DD.MM.RR ' ) , 100 , to_date ( ' 11.02.06 ' , ' DD.MM.RR ' ) , 100 , 0 , ' Open Invoices ' , ' Open Invoices max $1000 ' , null , null , 101 , ' N ' , null , 102 , 1 , 1000 , ' 0 ' , ' 5 ' , null , null , 412 . 85 , 0 . 41285 , to_date ( ' 11.02.06 ' , ' DD.MM.RR ' ) , null ) ;
Insert into " PA_GOAL " ( " PA_GOAL_ID " , " AD_CLIENT_ID " , " AD_ORG_ID " , " ISACTIVE " , " CREATED " , " CREATEDBY " , " UPDATED " , " UPDATEDBY " , " SEQNO " , " NAME " , " DESCRIPTION " , " NOTE " , " AD_USER_ID " , " PA_COLORSCHEMA_ID " , " ISSUMMARY " , " PA_GOALPARENT_ID " , " PA_MEASURE_ID " , " RELATIVEWEIGHT " , " MEASURETARGET " , " MEASURESCOPE " , " MEASUREDISPLAY " , " DATEFROM " , " DATETO " , " MEASUREACTUAL " , " GOALPERFORMANCE " , " DATELASTRUN " , " AD_ROLE_ID " ) values ( 104 , 11 , 0 , ' Y ' , to_date ( ' 20.01.06 ' , ' DD.MM.RR ' ) , 100 , to_date ( ' 11.02.06 ' , ' DD.MM.RR ' ) , 100 , 0 , ' Service Requests (Quarter) ' , ' Open Service Requests in Time ' , null , null , 101 , ' N ' , null , 103 , 1 , 10 , ' 3 ' , null , null , null , 0 , 0 , to_date ( ' 11.02.06 ' , ' DD.MM.RR ' ) , null ) ;
Insert into " PA_GOAL " ( " PA_GOAL_ID " , " AD_CLIENT_ID " , " AD_ORG_ID " , " ISACTIVE " , " CREATED " , " CREATEDBY " , " UPDATED " , " UPDATEDBY " , " SEQNO " , " NAME " , " DESCRIPTION " , " NOTE " , " AD_USER_ID " , " PA_COLORSCHEMA_ID " , " ISSUMMARY " , " PA_GOALPARENT_ID " , " PA_MEASURE_ID " , " RELATIVEWEIGHT " , " MEASURETARGET " , " MEASURESCOPE " , " MEASUREDISPLAY " , " DATEFROM " , " DATETO " , " MEASUREACTUAL " , " GOALPERFORMANCE " , " DATELASTRUN " , " AD_ROLE_ID " ) values ( 105 , 11 , 0 , ' Y ' , to_date ( ' 20.01.06 ' , ' DD.MM.RR ' ) , 100 , to_date ( ' 11.02.06 ' , ' DD.MM.RR ' ) , 100 , 0 , ' Total Open Service Requests ' , ' Open Service Requests by Status ' , null , null , 101 , ' N ' , null , 104 , 1 , 10 , ' 0 ' , null , null , null , 1 , 0 . 1 , to_date ( ' 11.02.06 ' , ' DD.MM.RR ' ) , null ) ;
/* BEWARE ALL ENTRIES IN T_INVENTORYVALUE ARE DELETED */
2007-02-26 12:41:30 +07:00
DELETE FROM " T_INVENTORYVALUE " ;
2006-12-11 17:21:34 +07:00
2007-02-26 12:41:30 +07:00
ALTER TABLE " T_INVENTORYVALUE "
2006-12-11 17:21:34 +07:00
ADD ( " M_ATTRIBUTESETINSTANCE_ID " NUMBER ( 10 , 0 ) NOT NULL ENABLE ,
" COST " NUMBER DEFAULT 0 ,
" COSTAMT " NUMBER DEFAULT 0 ,
" M_COSTELEMENT_ID " NUMBER ( 10 , 0 ) ) ;
2007-02-26 12:41:30 +07:00
ALTER TABLE " T_INVENTORYVALUE "
2006-12-11 17:21:34 +07:00
ADD CONSTRAINT " MASI_TINVENTORYVALUE " FOREIGN KEY ( " M_ATTRIBUTESETINSTANCE_ID " )
2007-02-26 12:41:30 +07:00
REFERENCES " M_ATTRIBUTESETINSTANCE " ( " M_ATTRIBUTESETINSTANCE_ID " ) ;
2006-12-11 17:21:34 +07:00
2007-02-26 12:41:30 +07:00
ALTER TABLE " T_INVENTORYVALUE "
2006-12-11 17:21:34 +07:00
ADD CONSTRAINT " MCOSTELEMENT_TINVENTORYVALUE " FOREIGN KEY ( " M_COSTELEMENT_ID " )
2007-02-26 12:41:30 +07:00
REFERENCES " M_COSTELEMENT " ( " M_COSTELEMENT_ID " ) ;
2006-12-11 17:21:34 +07:00
2007-02-26 12:41:30 +07:00
ALTER TABLE " T_INVOICEGL "
2006-12-11 17:21:34 +07:00
ADD ( " GRANDTOTAL " NUMBER DEFAULT 0 NOT NULL ENABLE ,
" OPENAMT " NUMBER DEFAULT 0 NOT NULL ENABLE ,
" PERCENT " NUMBER ,
" AMTSOURCEBALANCE " NUMBER DEFAULT 0 NOT NULL ENABLE ,
" AMTACCTBALANCE " NUMBER DEFAULT 0 NOT NULL ENABLE ,
" C_DOCTYPEREVAL_ID " NUMBER ( 10 , 0 ) ,
" ISALLCURRENCIES " CHAR ( 1 BYTE ) DEFAULT ' N ' NOT NULL ENABLE ) ;
2007-02-26 12:41:30 +07:00
ALTER TABLE " T_INVOICEGL "
2006-12-11 17:21:34 +07:00
ADD CONSTRAINT " CDOCTYPE_TINVOICEGL " FOREIGN KEY ( " C_DOCTYPEREVAL_ID " )
2007-02-26 12:41:30 +07:00
REFERENCES " C_DOCTYPE " ( " C_DOCTYPE_ID " ) ;
2006-12-11 17:21:34 +07:00
2007-02-26 12:41:30 +07:00
COMMENT ON TABLE " T_INVOICEGL " IS ' The real data displayed in T_InvoiceGL_v ' ;
2006-12-11 17:21:34 +07:00
2007-02-26 12:41:30 +07:00
ALTER TABLE " A_ASSET "
2006-12-11 17:21:34 +07:00
ADD ( " LASTMAINTENENCEDATE " DATE ,
" NEXTMAINTENENCEDATE " DATE DEFAULT NULL ,
" LASTMAINTENANCEUSEUNIT " NUMBER ( 10 , 0 ) ,
" NEXTMAINTENANCEUSEUNIT " NUMBER ( 10 , 0 ) ,
" LEASETERMINATIONDATE " DATE DEFAULT NULL ,
" LEASE_BPARTNER_ID " NUMBER ( 10 , 0 ) DEFAULT NULL ,
" LASTMAINTENANCENOTE " NVARCHAR2 ( 60 ) DEFAULT NULL ,
" LASTMAINTENANCEDATE " DATE DEFAULT NULL ,
" LASTMAINTENANCEUNIT " NUMBER ( 10 , 0 ) DEFAULT NULL ,
" NEXTMAINTENENCEUNIT " NUMBER ( 10 , 0 ) DEFAULT NULL ) ;
2007-02-26 12:41:30 +07:00
ALTER TABLE " C_VALIDCOMBINATION "
2006-12-11 17:21:34 +07:00
ADD ( " C_SUBACCT_ID " NUMBER ( 10 , 0 ) ,
" USERELEMENT1_ID " NUMBER ( 10 , 0 ) ,
" USERELEMENT2_ID " NUMBER ( 10 , 0 ) ) ;
2007-02-26 12:41:30 +07:00
DROP INDEX " C_VALIDCOMBINATION_ALT " ;
2006-12-11 17:21:34 +07:00
2007-02-26 12:41:30 +07:00
CREATE UNIQUE INDEX " C_VALIDCOMBINATION_ALT " ON " C_VALIDCOMBINATION " ( " C_ACCTSCHEMA_ID " , " AD_ORG_ID " , " ACCOUNT_ID " , " C_SUBACCT_ID " , " M_PRODUCT_ID " , " C_BPARTNER_ID " , " AD_ORGTRX_ID " , " C_LOCFROM_ID " , " C_LOCTO_ID " , " C_SALESREGION_ID " , " C_PROJECT_ID " , " C_CAMPAIGN_ID " , " C_ACTIVITY_ID " , " USER1_ID " , " USER2_ID " , " USERELEMENT1_ID " , " USERELEMENT2_ID " )
2006-12-11 17:21:34 +07:00
;
2007-02-26 12:41:30 +07:00
ALTER TABLE " FACT_ACCT "
2006-12-11 17:21:34 +07:00
ADD ( " C_SUBACCT_ID " NUMBER ( 10 , 0 ) ,
" USERELEMENT1_ID " NUMBER ( 10 , 0 ) ,
" USERELEMENT2_ID " NUMBER ( 10 , 0 ) ) ;
2007-02-26 12:41:30 +07:00
ALTER TABLE " I_BPARTNER "
2006-12-11 17:21:34 +07:00
ADD ( " R_INTERESTAREA_ID " NUMBER ( 10 , 0 ) ,
" INTERESTAREANAME " NVARCHAR2 ( 40 ) ) ;
2007-02-26 12:41:30 +07:00
ALTER TABLE " M_MATCHINV "
2006-12-11 17:21:34 +07:00
ADD ( " DESCRIPTION " NVARCHAR2 ( 255 ) ) ;
2007-02-26 12:41:30 +07:00
ALTER TABLE " M_MATCHPO "
2006-12-11 17:21:34 +07:00
ADD ( " PRICEMATCHDIFFERENCE " NUMBER ,
" ISAPPROVED " CHAR ( 1 BYTE ) DEFAULT ' Y ' ,
" DESCRIPTION " NVARCHAR2 ( 255 ) ) ;
/* REPLACE_ME: set 1000017 to your clients C_DOCTYPE_ID for Purchase Requisition */
/* find it by: select C_DOCTYPE_ID from C_DOCTYPE where name='Purchase Requisition' and AD_Client_ID!=11; */
2007-02-26 12:41:30 +07:00
ALTER TABLE " M_REQUISITION "
2006-12-11 17:21:34 +07:00
ADD ( " C_DOCTYPE_ID " NUMBER ( 10 , 0 ) DEFAULT 1000017 NOT NULL ) ;
2007-02-26 12:41:30 +07:00
ALTER TABLE " M_REQUISITION "
2006-12-11 17:21:34 +07:00
MODIFY " C_DOCTYPE_ID " NUMBER ( 10 , 0 ) DEFAULT NULL NULL ;
2007-02-26 12:41:30 +07:00
ALTER TABLE " M_REQUISITION "
2006-12-11 17:21:34 +07:00
MODIFY " C_DOCTYPE_ID " NUMBER ( 10 , 0 ) NOT NULL ;
2007-02-26 12:41:30 +07:00
ALTER TABLE " M_REQUISITIONLINE "
2006-12-11 17:21:34 +07:00
ADD ( " C_CHARGE_ID " NUMBER ( 10 , 0 ) ) ;
2007-02-26 12:41:30 +07:00
ALTER TABLE " R_REQUEST "
2006-12-11 17:21:34 +07:00
ADD ( " TASKSTATUS " CHAR ( 1 BYTE ) ,
" QTYPLAN " NUMBER ,
" DATECOMPLETEPLAN " DATE ,
" DATESTARTPLAN " DATE ,
" M_FIXCHANGENOTICE_ID " NUMBER ( 10 , 0 ) ) ;
2007-02-26 12:41:30 +07:00
ALTER TABLE " R_REQUEST "
2006-12-11 17:21:34 +07:00
ADD CONSTRAINT " MFIXCHANGENOTICE_RREQUEST " FOREIGN KEY ( " M_FIXCHANGENOTICE_ID " )
2007-02-26 12:41:30 +07:00
REFERENCES " M_CHANGENOTICE " ( " M_CHANGENOTICE_ID " ) ;
2006-12-11 17:21:34 +07:00
2007-02-26 12:41:30 +07:00
ALTER TABLE " R_REQUESTACTION "
2006-12-11 17:21:34 +07:00
ADD ( " TASKSTATUS " CHAR ( 1 BYTE ) ,
" DATECOMPLETEPLAN " DATE ,
" QTYPLAN " NUMBER ,
" QTYSPENT " NUMBER ,
" STARTDATE " DATE ,
" ENDDATE " DATE ,
" DATESTARTPLAN " DATE ,
" QTYINVOICED " NUMBER ,
" M_PRODUCTSPENT_ID " NUMBER ( 10 , 0 ) ) ;
/* REPLACE_ME: set 100 to your clients default R_STATUSCATEGORY_ID should be 100 and can be changed later by sql anyway */
2007-02-26 12:41:30 +07:00
ALTER TABLE " R_REQUESTTYPE "
2006-12-11 17:21:34 +07:00
ADD ( " R_STATUSCATEGORY_ID " NUMBER ( 10 , 0 ) DEFAULT 100 NOT NULL ) ;
2007-02-26 12:41:30 +07:00
ALTER TABLE " R_REQUESTTYPE "
2006-12-11 17:21:34 +07:00
MODIFY ( " R_STATUSCATEGORY_ID " NUMBER ( 10 , 0 ) DEFAULT NULL NULL ) ;
2007-02-26 12:41:30 +07:00
ALTER TABLE " R_REQUESTTYPE "
2006-12-11 17:21:34 +07:00
MODIFY ( " R_STATUSCATEGORY_ID " NUMBER ( 10 , 0 ) NOT NULL ) ;
/* REPLACE_ME: set 100 to your clients default R_STATUSCATEGORY_ID */
2007-02-26 12:41:30 +07:00
ALTER TABLE " R_STATUS "
2006-12-11 17:21:34 +07:00
ADD ( " SEQNO " NUMBER ( 10 , 0 ) DEFAULT 0 NOT NULL ,
" R_STATUSCATEGORY_ID " NUMBER ( 10 , 0 ) DEFAULT 100 NOT NULL ) ;
2007-02-26 12:41:30 +07:00
ALTER TABLE " R_STATUS "
2006-12-11 17:21:34 +07:00
MODIFY ( " R_STATUSCATEGORY_ID " NUMBER ( 10 , 0 ) DEFAULT NULL NULL ) ;
2007-02-26 12:41:30 +07:00
ALTER TABLE " R_STATUS "
2006-12-11 17:21:34 +07:00
MODIFY ( " R_STATUSCATEGORY_ID " NUMBER ( 10 , 0 ) NOT NULL ) ;
2007-02-26 12:41:30 +07:00
ALTER TABLE " C_BP_GROUP "
2006-12-11 17:21:34 +07:00
ADD ( " M_PRICELIST_ID " NUMBER ( 10 , 0 ) ,
" PO_PRICELIST_ID " NUMBER ( 10 , 0 ) ,
" M_DISCOUNTSCHEMA_ID " NUMBER ( 10 , 0 ) ,
" PO_DISCOUNTSCHEMA_ID " NUMBER ( 10 , 0 ) ,
" CREDITWATCHPERCENT " NUMBER ,
" PRICEMATCHTOLERANCE " NUMBER ) ;
2007-02-26 12:41:30 +07:00
ALTER TABLE " C_BP_GROUP "
2006-12-11 17:21:34 +07:00
ADD CONSTRAINT " MDISCOUNTSCHEMAPO_CBPGROUP " FOREIGN KEY ( " PO_DISCOUNTSCHEMA_ID " )
2007-02-26 12:41:30 +07:00
REFERENCES " M_DISCOUNTSCHEMA " ( " M_DISCOUNTSCHEMA_ID " ) ON DELETE SET NULL ;
2006-12-11 17:21:34 +07:00
2007-02-26 12:41:30 +07:00
ALTER TABLE " C_BP_GROUP "
2006-12-11 17:21:34 +07:00
ADD CONSTRAINT " MDISCOUNTSCHEMA_CBPGROUP " FOREIGN KEY ( " M_DISCOUNTSCHEMA_ID " )
2007-02-26 12:41:30 +07:00
REFERENCES " M_DISCOUNTSCHEMA " ( " M_DISCOUNTSCHEMA_ID " ) ON DELETE SET NULL ;
2006-12-11 17:21:34 +07:00
2007-02-26 12:41:30 +07:00
ALTER TABLE " C_BP_GROUP "
2006-12-11 17:21:34 +07:00
ADD CONSTRAINT " MPRICELISTPO_CBPGROUP " FOREIGN KEY ( " PO_PRICELIST_ID " )
2007-02-26 12:41:30 +07:00
REFERENCES " M_PRICELIST " ( " M_PRICELIST_ID " ) ON DELETE SET NULL ;
2006-12-11 17:21:34 +07:00
2007-02-26 12:41:30 +07:00
ALTER TABLE " C_BP_GROUP "
2006-12-11 17:21:34 +07:00
ADD CONSTRAINT " MPRICELIST_CBPGROUP " FOREIGN KEY ( " M_PRICELIST_ID " )
2007-02-26 12:41:30 +07:00
REFERENCES " M_PRICELIST " ( " M_PRICELIST_ID " ) ON DELETE SET NULL ;
2006-12-11 17:21:34 +07:00
2007-02-26 12:41:30 +07:00
ALTER TABLE " C_CHARGE "
2006-12-11 17:21:34 +07:00
ADD ( " C_BPARTNER_ID " NUMBER ( 10 , 0 ) ) ;
2007-02-26 12:41:30 +07:00
ALTER TABLE " AD_USER "
2006-12-11 17:21:34 +07:00
ADD ( " CONNECTIONPROFILE " CHAR ( 1 BYTE ) ) ;
2007-02-26 12:41:30 +07:00
ALTER TABLE " AD_WF_NODE "
2006-12-11 17:21:34 +07:00
ADD ( " EMAILRECIPIENT " CHAR ( 1 BYTE ) ,
" EMAIL " NVARCHAR2 ( 60 ) ,
" R_MAILTEXT_ID " NUMBER ( 10 , 0 ) ) ;
2007-02-26 12:41:30 +07:00
ALTER TABLE " C_ACCTSCHEMA_ELEMENT "
2006-12-11 17:21:34 +07:00
ADD ( " AD_COLUMN_ID " NUMBER ( 10 , 0 ) ) ;
2007-02-26 12:41:30 +07:00
ALTER TABLE " A_ASSET_GROUP "
2006-12-11 17:21:34 +07:00
ADD ( " ISTRACKISSUES " CHAR ( 1 BYTE ) DEFAULT ' N ' NOT NULL ) ;
2007-02-26 12:41:30 +07:00
ALTER TABLE " AD_PRINTPAPER "
2006-12-11 17:21:34 +07:00
ADD ( " SIZEX " NUMBER DEFAULT NULL ,
" SIZEY " NUMBER DEFAULT NULL ,
" DIMENSIONUNITS " CHAR ( 1 BYTE ) ) ;
2007-02-26 12:41:30 +07:00
ALTER TABLE " AD_ROLE "
2006-12-11 17:21:34 +07:00
ADD ( " CONNECTIONPROFILE " CHAR ( 1 BYTE ) ) ;
2007-02-26 12:41:30 +07:00
ALTER TABLE " AD_SYSTEM "
2006-12-11 17:21:34 +07:00
ADD ( " ISAUTOERRORREPORT " CHAR ( 1 BYTE ) DEFAULT ' Y ' NOT NULL ,
" RECORD_ID " NUMBER ( 10 , 0 ) ,
" SUPPORTEXPDATE " DATE ,
" PROCESSING " CHAR ( 1 BYTE ) ,
" SUPPORTEMAIL " NVARCHAR2 ( 60 ) ,
" ISALLOWSTATISTICS " CHAR ( 1 BYTE ) DEFAULT ' Y ' NOT NULL ,
" STATISTICSINFO " NVARCHAR2 ( 60 ) ,
" PROFILEINFO " NVARCHAR2 ( 60 ) ,
" OLDNAME " NVARCHAR2 ( 60 ) ,
" DESCRIPTION " NVARCHAR2 ( 255 ) ,
" SYSTEMSTATUS " CHAR ( 1 BYTE ) DEFAULT ' E ' NOT NULL ) ;
COMMIT ;