CREATE TABLE "DB_TWODEVELOPMENTPRODUCT" ( "SID" VARCHAR2(100), "NAME" VARCHAR2(200) NOT NULL , "CONTENT" VARCHAR2(4000), "DESCR" VARCHAR2(4000), "CATEGORYID" VARCHAR2(100), "PROJECTID" VARCHAR2(100), "STATUS" VARCHAR2(100), "STOCKPRICE" NUMBER(8, 2), "COSTPRICE" NUMBER(8, 2), "SELLPRICE" NUMBER(8, 2), "OTHERPRICE1" NUMBER(8, 2), "OTHERPRICE2" NUMBER(8, 2), "WEIGHT" VARCHAR2(100), "SIZES" VARCHAR2(100), "COLOR" VARCHAR2(100), "PICTURE1" VARCHAR2(200), "PICTURE2" VARCHAR2(200), "PICTURE3" VARCHAR2(200), "PICTURE4" VARCHAR2(200), "ORDERNUM" NUMBER(8), "ALIAS1" VARCHAR2(4000), "ALIAS2" VARCHAR2(200), "ALIAS3" VARCHAR2(200), "OPER" VARCHAR2(100), "OPERTIME" DATE, "RESERVE1" VARCHAR2(200), "RESERVE2" VARCHAR2(200), "RESERVE3" VARCHAR2(200), "RESERVE4" VARCHAR2(200), "RESERVE5" VARCHAR2(200), "RESERVE6" VARCHAR2(200), "RESERVE7" NUMBER(8, 2), "RESERVE8" NUMBER(8, 2), "CORPID" VARCHAR2(100), "PURCHASEFLAG" NUMBER(10), "DEVELOPMENTTIME" DATE, CONSTRAINT "PK_DB_TWODEVELOPMENTPRODUCT" PRIMARY KEY ("SID") VALIDATE ) TABLESPACE "ZHRGPT" PCTFREE 10 INITRANS 1 MAXTRANS 255 STORAGE ( INITIAL 64K BUFFER_POOL DEFAULT) LOGGING;
CREATE TABLE "DB_PRODUCTSEARCH" ("SEQUENCEID" 
    VARCHAR2(50 byte) NOT NULL, "NAME" VARCHAR2(100 byte), 
    "DESCR" VARCHAR2(2000 byte), "OPER" VARCHAR2(100 byte), 
    "OPERTIME" DATE, "OPENFLAG" VARCHAR2(50 byte), "SQLFILTER1" 
    VARCHAR2(4000 byte), "SQLFILTER2" VARCHAR2(4000 byte), 
    "FILED1" NUMBER(6), "FILED2" NUMBER(6), "FILED3" VARCHAR2(500
    byte), "FILED4" VARCHAR2(500 byte), "FILED5" VARCHAR2(500 
    byte), "FILED6" VARCHAR2(500 byte), "FILED7" VARCHAR2(500 
    byte), "FILED8" VARCHAR2(500 byte), "FILED9" VARCHAR2(500 
    byte), "FILED10" VARCHAR2(500 byte), "FILED11" VARCHAR2(500 
    byte), "FILED12" VARCHAR2(500 byte), "FILED13" VARCHAR2(500 
    byte), "FILED14" VARCHAR2(500 byte), "FILED15" VARCHAR2(500 
    byte), "FILED16" VARCHAR2(500 byte), "FILED17" VARCHAR2(500 
    byte), "FILED18" VARCHAR2(500 byte), "FILED19" VARCHAR2(500 
    byte), "FILED20" VARCHAR2(500 byte), "FLAG1" VARCHAR2(50 
    byte), "FLAG2" VARCHAR2(50 byte), "FLAG3" VARCHAR2(50 byte), 
    "FLAG4" VARCHAR2(50 byte), "FLAG5" VARCHAR2(50 byte), "FLAG6"
    VARCHAR2(50 byte), "FLAG7" VARCHAR2(50 byte), "FLAG8" 
    VARCHAR2(50 byte), "FLAG9" VARCHAR2(50 byte), "FLAG10" 
    VARCHAR2(50 byte), "FLAG11" VARCHAR2(50 byte), "FLAG12" 
    VARCHAR2(50 byte), "FLAG13" VARCHAR2(50 byte), "FLAG14" 
    VARCHAR2(50 byte), "FLAG15" VARCHAR2(50 byte), "FLAG16" 
    VARCHAR2(50 byte), "FLAG17" VARCHAR2(50 byte), "FLAG18" 
    VARCHAR2(50 byte), "FLAG19" VARCHAR2(50 byte), "FLAG20" 
    VARCHAR2(50 byte), 
    CONSTRAINT "PK_DB_PRODUCTSEARCH" PRIMARY KEY("SEQUENCEID") 
    USING INDEX  
    TABLESPACE "ZHRGPT" 
    STORAGE ( INITIAL 64K NEXT 0K MINEXTENTS 1 MAXEXTENTS 
    2147483645 PCTINCREASE 0) PCTFREE 10 INITRANS 2 MAXTRANS 255)
     
    TABLESPACE "ZHRGPT" PCTFREE 10 PCTUSED 0 INITRANS 1 MAXTRANS 
    255 
    STORAGE ( INITIAL 64K NEXT 0K MINEXTENTS 1 MAXEXTENTS 
    2147483645 PCTINCREASE 0) 
    LOGGING ;
COMMENT ON TABLE "DB_PRODUCTSEARCH" IS '自定义商品搜索';
CREATE TABLE "DB_ALIEXPRESSTYPE" ( "SID" NUMBER(4), "NAME" VARCHAR2(200), 
"SHOWNAME" VARCHAR2(200), "SERVICENAME" VARCHAR2(200), "OPER" VARCHAR2(50), 
"OPERTIME" DATE, "OPENFLAG" VARCHAR2(100), "ALIID" VARCHAR2(100), "DESCR" VARCHAR2(200), 
"RESERVE1" VARCHAR2(200), "RESERVE2" VARCHAR2(200), "RESERVE3" VARCHAR2(200), 
CONSTRAINT "PK_DB_ALIEXPRESSTYPE" PRIMARY KEY ("SID") VALIDATE ) TABLESPACE "ZHRGPT" 
PCTFREE 10 INITRANS 1 MAXTRANS 255 STORAGE ( INITIAL 64K BUFFER_POOL DEFAULT) LOGGING; 


alter table db_product add purchaseflag number(10);
alter table DB_TWODEVELOPMENTPRODUCT add developmenttime date;
alter table db_product modify SAVENUM number(10);
alter table db_product modify ORDERNUM number(10);
alter table db_product modify ALERTNUM number(10);
alter table db_product modify HJRESERVE8 number(10);
alter table db_product modify HJRESERVE9 number(10);
alter table db_product modify HJRESERVE10 number(10);
alter table db_product modify DEVELOPMENTFLAG number(10);
alter table db_product modify BUYNUM number(10);
alter table db_product modify MINALERNUM number(10);
alter table db_product modify SAVEDATE number(10);
alter table DB_TWODEVELOPMENTPRODUCT add purchaseflag number(10);
alter table db_shop add amazonurl varchar2(200);
alter table DB_PRODUCT add indexfordevelop varchar2(50);
alter table DB_CATEGORY add SHORTSKU VARCHAR2(5);
alter table db_shop add amazonurl varchar2(200);
alter table DB_SHOP add SPAYPALNAME varchar2(100);
alter table db_shop add amazonurlname varchar2(200);
alter table db_order add fpxexpresstypeid VARCHAR2(20);
alter table db_order add fpxexpresstype VARCHAR2(100);

CREATE TABLE "DB_ALIEXPRESSTYPE" ( "SID" NUMBER(4), "NAME" VARCHAR2(200), 
"SHOWNAME" VARCHAR2(200), "SERVICENAME" VARCHAR2(200), "OPER" VARCHAR2(50), 
"OPERTIME" DATE, "OPENFLAG" VARCHAR2(100), "ALIID" VARCHAR2(100), "DESCR" VARCHAR2(200), 
"RESERVE1" VARCHAR2(200), "RESERVE2" VARCHAR2(200), "RESERVE3" VARCHAR2(200), 
CONSTRAINT "PK_DB_ALIEXPRESSTYPE" PRIMARY KEY ("SID") VALIDATE ) TABLESPACE "ZHRGPT" 
PCTFREE 10 INITRANS 1 MAXTRANS 255 STORAGE ( INITIAL 64K BUFFER_POOL DEFAULT) LOGGING; 

alter table db_product add purchaseflag number(10);
alter table DB_TWODEVELOPMENTPRODUCT add developmenttime date;
alter table db_product modify SAVENUM number(10);
alter table db_product modify ORDERNUM number(10);
alter table db_product modify ALERTNUM number(10);
alter table db_product modify HJRESERVE8 number(10);
alter table db_product modify HJRESERVE9 number(10);
alter table db_product modify HJRESERVE10 number(10);
alter table db_product modify DEVELOPMENTFLAG number(10);
alter table db_product modify BUYNUM number(10);
alter table db_product modify MINALERNUM number(10);
alter table db_product modify SAVEDATE number(10);
alter table DB_TWODEVELOPMENTPRODUCT add purchaseflag number(10);
alter table db_shop add amazonurl varchar2(200);
alter table DB_PRODUCT add indexfordevelop varchar2(50);
alter table DB_CATEGORY add SHORTSKU VARCHAR2(5);
alter table db_order add warehouse  varchar2(200);
alter table db_order add errordescr varchar2(4000);
alter table db_order add ordersign varchar2(50);
alter table db_order add itemsign varchar2(50);
alter table db_expresstype add tokenconfigid varchar2(50);
alter table db_order add height number(5);
alter table db_order add weidth number(5);
alter table db_order add length number(5);
alter table db_order add ckyflag number(2);
alter table db_order add height number(5);
alter table db_order add weidth number(5);
alter table db_order add length number(5);
alter table db_order add ckyflag number(2);
alter table DB_EXPRESSTYPE add Token varchar2(100);
alter table DB_EXPRESSTYPE add UserKey varchar2(100);
alter table DB_EXPRESSTYPE add CustomUserKey varchar2(100);
alter table DB_EXPRESSTYPE add ExpressTypeNew varchar2(100);
alter table DB_EXPRESSTYPE add Contact varchar2(50);
alter table DB_EXPRESSTYPE add Compan varchar2(50);
alter table DB_EXPRESSTYPE add Street1 varchar2(100);
alter table DB_EXPRESSTYPE add Street2 varchar2(100);
alter table DB_EXPRESSTYPE add City varchar2(50);
alter table DB_EXPRESSTYPE add Province varchar2(100);
alter table DB_EXPRESSTYPE add Country varchar2(50);
alter table DB_EXPRESSTYPE add PostCode varchar2(20);
alter table DB_EXPRESSTYPE add Phone varchar2(20);
alter table DB_EXPRESSTYPE add Email varchar2(100);
alter table DB_EXPRESSTYPE add District varchar2(100);
alter table DB_EXPRESSTYPE add DistrictCode varchar2(20);
alter table DB_EXPRESSTYPE add CityCode varchar2(20);
alter table DB_EXPRESSTYPE add ProvinceCode varchar2(20);
alter table DB_EXPRESSTYPE add Length number(6);
alter table DB_EXPRESSTYPE add Width number(6);
alter table DB_EXPRESSTYPE add Height number(6);

------------------有些paypal地址不显示  by x5------------------------
alter table db_order modify PAYPALOPER VARCHAR2(100);
alter table db_paypal modify OPER VARCHAR2(100);
----------------------有些订单买家城市太长及商品sku太长进不了系统 by x5--------------
alter table db_order modify CUSTOMERCITY VARCHAR2(1000);
alter table db_product modify SID VARCHAR2(100);

------------------解决打印预览空白 by x5-----------------------------
alter table DB_EXPRESSTYPE add Token varchar2(100);
alter table DB_EXPRESSTYPE add UserKey varchar2(100);
alter table DB_EXPRESSTYPE add CustomUserKey varchar2(100);
alter table DB_EXPRESSTYPE add ExpressTypeNew varchar2(100);
alter table DB_EXPRESSTYPE add Contact varchar2(50);
alter table DB_EXPRESSTYPE add Compan varchar2(50);
alter table DB_EXPRESSTYPE add Street1 varchar2(100);
alter table DB_EXPRESSTYPE add Street2 varchar2(100);
alter table DB_EXPRESSTYPE add City varchar2(50);
alter table DB_EXPRESSTYPE add Province varchar2(100);
alter table DB_EXPRESSTYPE add Country varchar2(50);
alter table DB_EXPRESSTYPE add PostCode varchar2(20);
alter table DB_EXPRESSTYPE add Phone varchar2(20);
alter table DB_EXPRESSTYPE add Email varchar2(100);
alter table DB_EXPRESSTYPE add District varchar2(100);
alter table DB_EXPRESSTYPE add DistrictCode varchar2(20);
alter table DB_EXPRESSTYPE add CityCode varchar2(20);
alter table DB_EXPRESSTYPE add ProvinceCode varchar2(20);
alter table DB_EXPRESSTYPE add Length number(6);
alter table DB_EXPRESSTYPE add Width number(6);
alter table DB_EXPRESSTYPE add Height number(6);

alter table DB_EXPRESSTYPE add Cityid varchar2(50);
alter table DB_EXPRESSTYPE add Provinceid varchar2(100);
alter table DB_EXPRESSTYPE add Districtid varchar2(100);
alter table db_order add ORIGINSKU VARCHAR2(3000);
alter table db_sell add ORIGINSKU VARCHAR2(3000);

-------------------Log文件暴占硬盘空间的的解决方法----------------------
CREATE TABLE "ESHOP"."DB_PRODUCT_HISTORY" ("SEQUENCEID" 
    NUMBER(10) NOT NULL, "PRODUCTID" VARCHAR2(50 byte), 
    "HISTPROFIT" NUMBER(10, 4) DEFAULT 0, "PROFITT" NUMBER(10, 4)
    DEFAULT 0, "PROFITS" NUMBER(10, 4) DEFAULT 0, "ALLORDERNUM" 
    NUMBER(9) DEFAULT 0, "TODAYORDERNUM" NUMBER(9) DEFAULT 0, 
    "ONPASSAGEPURCHASE" NUMBER(9) DEFAULT 0, "OOSLEVEL" NUMBER(6,
    4) DEFAULT 0, "RATEOFPIN" NUMBER(6, 4) DEFAULT 0, "SAVENUM" 
    NUMBER(9) DEFAULT 0, "COSTPRICE" NUMBER(9, 4) DEFAULT 0, 
    "ALERTDAY" NUMBER(9) DEFAULT 0, "ALERTNUM" NUMBER(9) DEFAULT 
    0, "WEIGHT" NUMBER(9, 6) DEFAULT 0, "TODAYSAVENUM" NUMBER(9) 
    DEFAULT 0, "SINGLEDAYSALES" NUMBER(9, 4) DEFAULT 0, 
    "DIELIBRARYCOEFFICIENT" NUMBER(9, 4) DEFAULT 0, 
    "TODAYOUTSAVENUM" NUMBER(9) DEFAULT 0, "MINPURCHASENUM" 
    NUMBER(9) DEFAULT 0, "LOCATIONID" VARCHAR2(50 byte), 
    "LOCATION" VARCHAR2(50 byte), "STORNGID" VARCHAR2(50 byte), 
    "STRONG" VARCHAR2(50 byte), "PRODUCTNAME" VARCHAR2(200 byte),
    "OPER1" VARCHAR2(50 byte), "OPER2" VARCHAR2(50 byte), "OPER3"
    VARCHAR2(50 byte), "OPER4" VARCHAR2(50 byte), "OPER5" 
    VARCHAR2(50 byte), "MENUFUNCTORYID" VARCHAR2(50 byte), 
    "MENUFUNCTORY" VARCHAR2(200 byte), "STATUS" VARCHAR2(20 byte),
    "CORPID" VARCHAR2(10 byte), "CREATETIME" DATE, 
    "HISTPAVGROFIT" NUMBER(8, 6) DEFAULT 0, "GSTPRICE" NUMBER(10,
    4), "OCEANSHIPPRICE" NUMBER(10, 4), "FOBPRICE" NUMBER(10, 4),
    "CIFPRICE" NUMBER(10, 4), "EXPRESSPRICE" NUMBER(10, 4), 
    "PROFIT" NUMBER(10, 4), "BIDPROFIT" NUMBER(10, 4), 
    "FIXEDPROFIT" NUMBER(10, 4), "BIDEBAYPRICE" NUMBER(10, 4), 
    "FIXEDEBAYPRICE" NUMBER(10, 4), "BIDNUM" NUMBER(10), 
    "STORERENT" NUMBER(10, 4), "ALLPURCHASENUM" NUMBER(15), 
    "MANUFACTUREQUOTE" NUMBER(8, 6), "TARIFFPRICE" NUMBER(8, 4), 
    "PAYPALPRICE" NUMBER(10, 4), 
    CONSTRAINT "PK_DB_PRODUCT_HISTORY" PRIMARY KEY("SEQUENCEID") 
    USING INDEX  
    TABLESPACE "ZHRGPT" 
    STORAGE ( INITIAL 64K NEXT 0K MINEXTENTS 1 MAXEXTENTS 
    2147483645 PCTINCREASE 0) PCTFREE 10 INITRANS 2 MAXTRANS 255)
     
    TABLESPACE "ZHRGPT" PCTFREE 10 PCTUSED 0 INITRANS 1 MAXTRANS 
    255 
    STORAGE ( INITIAL 64K NEXT 0K MINEXTENTS 1 MAXEXTENTS 
    2147483645 PCTINCREASE 0) 
    LOGGING; 