text:     create table TADDRESS (
          ADDRESS_ID bigint not null GENERATED BY DEFAULT AS IDENTITY,
          VERSION bigint not null DEFAULT 0,
          NAME varchar(128),
          CITY varchar(128) not null,
          POSTCODE varchar(16),
          ADDRLINE1 varchar(255) not null,
          ADDRLINE2 varchar(255),
          ADDRESS_TYPE varchar(1) not null,
          COUNTRY_CODE varchar(64) not null,
          STATE_CODE varchar(64),
          PHONE1 varchar(255),
          PHONE2 varchar(255),
          SALUTATION varchar(24),
          FIRSTNAME varchar(128) not null,
          LASTNAME varchar(128) not null,
          MIDDLENAME varchar(128),
          EMAIL1 varchar(255),
          EMAIL2 varchar(255),
          MOBILE1 varchar(255),
          MOBILE2 varchar(255),
          COMPANYNAME1 varchar(255),
          COMPANYNAME2 varchar(255),
          COMPANYDEPARTMENT varchar(255),
          CUSTOM0 varchar(255),
          CUSTOM1 varchar(255),
          CUSTOM2 varchar(255),
          CUSTOM3 varchar(255),
          CUSTOM4 varchar(255),
          CUSTOM5 varchar(255),
          CUSTOM6 varchar(255),
          CUSTOM7 varchar(255),
          CUSTOM8 varchar(255),
          CUSTOM9 varchar(255),
          DEFAULT_ADDR smallint,
          CUSTOMER_ID bigint,
          CREATED_TIMESTAMP timestamp,
          UPDATED_TIMESTAMP timestamp,
          CREATED_BY varchar(64),
          UPDATED_BY varchar(64),
          GUID varchar(36) not null unique,
          primary key (ADDRESS_ID)
      );
  
      create table TASSOCIATION (
          ASSOCIATION_ID bigint not null GENERATED BY DEFAULT AS IDENTITY,
          VERSION bigint not null DEFAULT 0,
          CODE varchar(255) not null,
          NAME varchar(255) not null,
          DESCRIPTION varchar(4000),
          CREATED_TIMESTAMP timestamp,
          UPDATED_TIMESTAMP timestamp,
          CREATED_BY varchar(64),
          UPDATED_BY varchar(64),
          GUID varchar(36) not null unique,
          primary key (ASSOCIATION_ID)
      );
  
      create table TATTRIBUTE (
          ATTRIBUTE_ID bigint not null GENERATED BY DEFAULT AS IDENTITY,
          VERSION bigint not null DEFAULT 0,
          CODE varchar(255) not null  unique,
          SECURE_ATTRIBUTE smallint default 0 not null,
          MANDATORY smallint not null,
          ALLOWDUPLICATE smallint default 0 not null,
          ALLOWFAILOVER smallint default 0 not null,
          VAL varchar(4000),
          REXP varchar(4000),
          V_FAILED_MSG varchar(4000),
          RANK integer default 500,
          CHOICES varchar(4000),
          NAME varchar(255) not null,
          DISPLAYNAME varchar(4000),
          DESCRIPTION varchar(4000),
          ETYPE varchar(255) not null,
          ATTRIBUTEGROUP varchar(255) not null,
          STORE smallint,
          SEARCH smallint,
          SEARCHPRIMARY smallint,
          NAV smallint,
          CREATED_TIMESTAMP timestamp,
          UPDATED_TIMESTAMP timestamp,
          CREATED_BY varchar(64),
          UPDATED_BY varchar(64),
          GUID varchar(36) not null unique,
          primary key (ATTRIBUTE_ID)
      );
  
      create table TATTRIBUTEGROUP (
          ATTRIBUTEGROUP_ID bigint not null GENERATED BY DEFAULT AS IDENTITY,
          VERSION bigint not null DEFAULT 0,
          CODE varchar(255) not null,
          NAME varchar(64) not null,
          DESCRIPTION varchar(4000),
          CREATED_TIMESTAMP timestamp,
          UPDATED_TIMESTAMP timestamp,
          CREATED_BY varchar(64),
          UPDATED_BY varchar(64),
          GUID varchar(36) not null unique,
          primary key (ATTRIBUTEGROUP_ID)
      );
  
      create table TBRAND (
          BRAND_ID bigint not null GENERATED BY DEFAULT AS IDENTITY,
          VERSION bigint not null DEFAULT 0,
          NAME varchar(255) not null,
          DESCRIPTION varchar(4000),
          CREATED_TIMESTAMP timestamp,
          UPDATED_TIMESTAMP timestamp,
          CREATED_BY varchar(64),
          UPDATED_BY varchar(64),
          GUID varchar(36) not null unique,
          primary key (BRAND_ID)
      );
  
      create table TBRANDATTRVALUE (
          ATTRVALUE_ID bigint not null GENERATED BY DEFAULT AS IDENTITY,
          VERSION bigint not null DEFAULT 0,
          BRAND_ID bigint not null,
          VAL varchar(4000),
          INDEXVAL varchar(255),
          DISPLAYVAL varchar(4000),
          CODE varchar(255) not null,
          CREATED_TIMESTAMP timestamp,
          UPDATED_TIMESTAMP timestamp,
          CREATED_BY varchar(64),
          UPDATED_BY varchar(64),
          GUID varchar(36) not null unique,
          primary key (ATTRVALUE_ID)
      );
  
      create table TCARRIER (
          CARRIER_ID bigint not null GENERATED BY DEFAULT AS IDENTITY,
          VERSION bigint not null DEFAULT 0,
          NAME varchar(255) not null,
          DISPLAYNAME varchar(4000),
          DESCRIPTION varchar(1000),
          DISPLAYDESCRIPTION varchar(4000),
          WORLDWIDE smallint,
          COUNTRY smallint,
          STATE smallint,
          LOCAL smallint,
          CREATED_TIMESTAMP timestamp,
          UPDATED_TIMESTAMP timestamp,
          CREATED_BY varchar(64),
          UPDATED_BY varchar(64),
          GUID varchar(36) not null unique,
          primary key (CARRIER_ID)
      );
  
      create table TCARRIERSLA (
          CARRIERSLA_ID bigint not null GENERATED BY DEFAULT AS IDENTITY,
          VERSION bigint not null DEFAULT 0,
          NAME varchar(255) not null,
          DISPLAYNAME varchar(4000),
          DESCRIPTION varchar(1000),
          DISPLAYDESCRIPTION varchar(4000),
          MAX_DAYS integer,
          MIN_DAYS integer,
          EXCLUDE_WEEK_DAYS varchar(15),
          EXCLUDE_DATES varchar(4000),
          GUARANTEED smallint not null,
          NAMEDDAY smallint not null,
          EXCLUDED_CT varchar(255),
          SLA_TYPE varchar(1) not null,
          SCRIPT varchar(4000),
          BILLING_ADDRESS_NOT_REQUIRED smallint not null,
          DELIVERY_ADDRESS_NOT_REQUIRED smallint not null,
          SUPPORTED_PGS varchar(1024),
          SUPPORTED_FCS varchar(1024),
          EXTERNAL_REF varchar(40),
          CARRIER_ID bigint not null,
          CREATED_TIMESTAMP timestamp,
          UPDATED_TIMESTAMP timestamp,
          CREATED_BY varchar(64),
          UPDATED_BY varchar(64),
          GUID varchar(36) not null unique,
          primary key (CARRIERSLA_ID)
      );
  
      create table TCARRIERSHOP (
          CARRIERSHOP_ID bigint not null GENERATED BY DEFAULT AS IDENTITY,
          VERSION bigint not null DEFAULT 0,
          CARRIER_ID bigint not null,
          SHOP_ID bigint not null,
          DISABLED smallint DEFAULT 0,
          CREATED_TIMESTAMP timestamp,
          UPDATED_TIMESTAMP timestamp,
          CREATED_BY varchar(64),
          UPDATED_BY varchar(64),
          GUID varchar(36) not null unique,
          primary key (CARRIERSHOP_ID)
      );
  
  
      create table TCATEGORY (
          CATEGORY_ID bigint not null GENERATED BY DEFAULT AS IDENTITY,
          VERSION bigint not null DEFAULT 0,
          PARENT_ID bigint,
          LINKTO_ID bigint,
          RANK integer,
          PRODUCTTYPE_ID bigint,
          NAME varchar(255) not null,
          DISPLAYNAME varchar(4000),
          DESCRIPTION varchar(4000),
          UITEMPLATE varchar(255),
          DISABLED smallint DEFAULT 0,
          AVAILABLEFROM timestamp,
          AVAILABLETO timestamp,
          URI varchar(255) unique,
          TITLE varchar(255),
          METAKEYWORDS varchar(255),
          METADESCRIPTION varchar(255),
          DISPLAY_TITLE varchar(4000),
          DISPLAY_METAKEYWORDS varchar(4000),
          DISPLAY_METADESCRIPTION varchar(4000),
          NAV_BY_ATTR smallint,
          NAV_BY_PRICE smallint,
          NAV_BY_PRICE_TIERS varchar(4000),
          CREATED_TIMESTAMP timestamp,
          UPDATED_TIMESTAMP timestamp,
          CREATED_BY varchar(64),
          UPDATED_BY varchar(64),
          GUID varchar(36) not null unique,
          primary key (CATEGORY_ID)
      );
  
      create table TCATEGORYATTRVALUE (
          ATTRVALUE_ID bigint not null GENERATED BY DEFAULT AS IDENTITY,
          VERSION bigint not null DEFAULT 0,
          VAL varchar(4000),
          INDEXVAL varchar(255),
          DISPLAYVAL varchar(4000),
          CATEGORY_ID bigint not null,
          CODE varchar(255) not null,
          CREATED_TIMESTAMP timestamp,
          UPDATED_TIMESTAMP timestamp,
          CREATED_BY varchar(64),
          UPDATED_BY varchar(64),
          GUID varchar(36) not null unique,
          primary key (ATTRVALUE_ID)
      );
  
  
      create table TCONTENT (
          CONTENT_ID bigint not null GENERATED BY DEFAULT AS IDENTITY,
          VERSION bigint not null DEFAULT 0,
          PARENT_ID bigint,
          RANK integer,
          NAME varchar(255) not null,
          DISPLAYNAME varchar(4000),
          DESCRIPTION varchar(4000),
          UITEMPLATE varchar(255),
          DISABLED smallint DEFAULT 0,
          AVAILABLEFROM timestamp,
          AVAILABLETO timestamp,
          URI varchar(255) unique,
          TITLE varchar(255),
          METAKEYWORDS varchar(255),
          METADESCRIPTION varchar(255),
          DISPLAY_TITLE varchar(4000),
          DISPLAY_METAKEYWORDS varchar(4000),
          DISPLAY_METADESCRIPTION varchar(4000),
          CREATED_TIMESTAMP timestamp,
          UPDATED_TIMESTAMP timestamp,
          CREATED_BY varchar(64),
          UPDATED_BY varchar(64),
          GUID varchar(36) not null unique,
          primary key (CONTENT_ID)
      );
  
      create table TCONTENTATTRVALUE (
          ATTRVALUE_ID bigint not null GENERATED BY DEFAULT AS IDENTITY,
          VERSION bigint not null DEFAULT 0,
          VAL varchar(4000),
          INDEXVAL varchar(255),
          DISPLAYVAL varchar(4000),
          CONTENT_ID bigint not null,
          CODE varchar(255) not null,
          CREATED_TIMESTAMP timestamp,
          UPDATED_TIMESTAMP timestamp,
          CREATED_BY varchar(64),
          UPDATED_BY varchar(64),
          GUID varchar(36) not null unique,
          primary key (ATTRVALUE_ID)
      );
  
  
      create table TCOUNTRY (
          COUNTRY_ID bigint not null GENERATED BY DEFAULT AS IDENTITY,
          VERSION bigint not null DEFAULT 0,
          COUNTRY_CODE varchar(2) not null,
          ISO_CODE varchar(3) not null,
          NAME varchar(64) not null,
          DISPLAYNAME varchar(255),
          CREATED_TIMESTAMP timestamp,
          UPDATED_TIMESTAMP timestamp,
          CREATED_BY varchar(64),
          UPDATED_BY varchar(64),
          GUID varchar(36) not null unique,
          primary key (COUNTRY_ID)
      );
  
      create table TCUSTOMER (
          CUSTOMER_ID bigint not null GENERATED BY DEFAULT AS IDENTITY,
          VERSION bigint not null DEFAULT 0,
          EMAIL varchar(255) not null,
          GUEST_EMAIL varchar(255),
          GUEST smallint not null default 0,
          SALUTATION varchar(24),
          FIRSTNAME varchar(128) not null,
          LASTNAME varchar(128) not null,
          MIDDLENAME varchar(128),
          PASSWORD varchar(255) not null,
          PASSWORDEXPIRY timestamp,
          PUBLICKEY varchar(255),
          CUSTOMERTYPE varchar(255),
          PRICINGPOLICY varchar(255),
          AUTHTOKEN varchar(255),
          AUTHTOKENEXPIRY timestamp,
          TAG varchar(255),
          COMPANYNAME1 varchar(255),
          COMPANYNAME2 varchar(255),
          COMPANYDEPARTMENT varchar(255),
          CREATED_TIMESTAMP timestamp,
          UPDATED_TIMESTAMP timestamp,
          CREATED_BY varchar(64),
          UPDATED_BY varchar(64),
          GUID varchar(36) not null unique,
          primary key (CUSTOMER_ID)
      );
  
      create table TCUSTOMERATTRVALUE (
          ATTRVALUE_ID bigint not null GENERATED BY DEFAULT AS IDENTITY,
          VERSION bigint not null DEFAULT 0,
          VAL varchar(4000),
          INDEXVAL varchar(255),
          DISPLAYVAL varchar(4000),
          CUSTOMER_ID bigint not null,
          CODE varchar(255) not null,
          CREATED_TIMESTAMP timestamp,
          UPDATED_TIMESTAMP timestamp,
          CREATED_BY varchar(64),
          UPDATED_BY varchar(64),
          GUID varchar(36) not null unique,
          primary key (ATTRVALUE_ID)
      );
  
      create table TCUSTOMERORDER (
          CUSTOMERORDER_ID bigint not null GENERATED BY DEFAULT AS IDENTITY,
          VERSION bigint not null DEFAULT 0,
          PG_LABEL varchar(255),
          ORDERNUM varchar(255),
          CART_GUID varchar(36) not null,
          EMAIL varchar(255) not null,
          SALUTATION varchar(24),
          FIRSTNAME varchar(128) not null,
          LASTNAME varchar(128) not null,
          MIDDLENAME varchar(128),
          CURRENCY varchar(3) not null,
          LOCALE varchar(5) not null,
          PRICE numeric(19,2) not null,
          LIST_PRICE numeric(19,2) not null,
          NET_PRICE numeric(19,2) not null,
          GROSS_PRICE numeric(19,2) not null,
          IS_PROMO_APPLIED smallint not null default 0,
          APPLIED_PROMO varchar(255),
          MESSAGE varchar(255),
          ORDERSTATUS varchar(64) not null,
          ELIGIBLE_FOR_EXPORT varchar(20),
          EXPORT_BLOCK smallint not null default 0,
          EXPORT_LAST_DATE timestamp,
          EXPORT_LAST_STATUS varchar(4000),
          EXPORT_LAST_ORDERSTATUS varchar(64),
          B2B_REF varchar(64),
          B2B_EMPLOYEEID varchar(64),
          B2B_CHARGEID varchar(255),
          B2B_APPROVE_REQUIRE smallint not null default 0,
          B2B_APPROVEDBY varchar(64),
          B2B_APPROVED_DATE timestamp,
          B2B_REMARKS varchar(255),
          CUSTOMER_ID bigint,
          SHOP_ID bigint not null,
          BILL_ADDRESS_ID bigint,
          SHIP_ADDRESS_ID bigint,
          BILLING_ADDRESS varchar(255),
          SHIPPING_ADDRESS varchar(255),
          MULTIPLE_SHIPMENT smallint default 0,
          REQUESTED_DELIVERY_DATE timestamp,
          ORDER_TIMESTAMP timestamp not null,
          ORDER_IP varchar(45),
          STORED_ATTRIBUTES varchar(4000),
          CREATED_TIMESTAMP timestamp,
          UPDATED_TIMESTAMP timestamp,
          CREATED_BY varchar(64),
          UPDATED_BY varchar(64),
          GUID varchar(36) not null unique,
          primary key (CUSTOMERORDER_ID)
      );
  
      create table TCUSTOMERORDERDELIVERY (
          CUSTOMERORDERDELIVERY_ID bigint not null GENERATED BY DEFAULT AS IDENTITY,
          VERSION bigint not null DEFAULT 0,
          DELIVERYNUM varchar(255),
          REF_NO varchar(255),
          PRICE numeric(19,2) not null,
          LIST_PRICE numeric(19,2) not null,
          NET_PRICE numeric(19,2) not null,
          GROSS_PRICE numeric(19,2) not null,
          TAX_RATE numeric(19,2) not null,
          TAX_EXCLUSIVE_OF_PRICE smallint not null default 0,
          TAX_CODE varchar(255) not null,
          IS_PROMO_APPLIED smallint not null default 0,
          APPLIED_PROMO varchar(255),
          DELIVERYSTATUS varchar(64) not null,
          CARRIERSLA_ID bigint,
          CUSTOMERORDER_ID bigint not null,
          DELIVERY_GROUP varchar(16) not null,
          DELIVERY_REMARKS varchar(255),
          DELIVERY_EST_MIN timestamp,
          DELIVERY_EST_MAX timestamp,
          DELIVERY_GUARANTEED timestamp,
          DELIVERY_CONFIRMED timestamp,
          REQUESTED_DELIVERY_DATE timestamp,
          ELIGIBLE_FOR_EXPORT varchar(20),
          EXPORT_BLOCK smallint not null default 0,
          EXPORT_LAST_DATE timestamp,
          EXPORT_LAST_STATUS varchar(4000),
          EXPORT_LAST_DELIVERYSTATUS varchar(64),
          CREATED_TIMESTAMP timestamp,
          UPDATED_TIMESTAMP timestamp,
          CREATED_BY varchar(64),
          UPDATED_BY varchar(64),
          GUID varchar(36) not null unique,
          primary key (CUSTOMERORDERDELIVERY_ID)
      );
  
      create table TCUSTOMERORDERDELIVERYDET (
          CUSTOMERORDERDELIVERYDET_ID bigint not null GENERATED BY DEFAULT AS IDENTITY,
          VERSION bigint not null DEFAULT 0,
          QTY numeric(19,2) not null,
          PRICE numeric(19,2) not null,
          SALE_PRICE numeric(19,2) not null,
          LIST_PRICE numeric(19,2) not null,
          NET_PRICE numeric(19,2) not null,
          GROSS_PRICE numeric(19,2) not null,
          TAX_RATE numeric(19,2) not null,
          TAX_EXCLUSIVE_OF_PRICE smallint not null default 0,
          TAX_CODE varchar(255) not null,
          IS_GIFT  smallint not null default 0,
          IS_PROMO_APPLIED smallint not null default 0,
          IS_FIXED_PRICE smallint not null default 0,
          APPLIED_PROMO varchar(255),
          CODE varchar(255) not null,
          PRODUCTNAME varchar(4000) not null,
          SUPPLIER_CODE varchar(255),
          ITEM_GROUP varchar(36),
          CONFIGURABLE smallint DEFAULT 0,
          NOT_SOLD_SEPARATELY smallint DEFAULT 0,
          B2B_REMARKS varchar(255),
          DELIVERY_REMARKS varchar(255),
          DELIVERY_EST_MIN timestamp,
          DELIVERY_EST_MAX timestamp,
          DELIVERY_GUARANTEED timestamp,
          DELIVERY_CONFIRMED timestamp,
          DELIVERED_QUANTITY numeric(19,2),
          SUPPLIER_INVOICE_NO varchar(64),
          SUPPLIER_INVOICE_DATE timestamp,
          STORED_ATTRIBUTES varchar(4000),
          CUSTOMERORDERDELIVERY_ID bigint not null,
          CREATED_TIMESTAMP timestamp,
          UPDATED_TIMESTAMP timestamp,
          CREATED_BY varchar(64),
          UPDATED_BY varchar(64),
          GUID varchar(36) not null unique,
          primary key (CUSTOMERORDERDELIVERYDET_ID)
      );
  
      create table TCUSTOMERORDERDET (
          CUSTOMERORDERDET_ID bigint not null GENERATED BY DEFAULT AS IDENTITY,
          VERSION bigint not null DEFAULT 0,
          QTY numeric(19,2) not null,
          PRICE numeric(19,2) not null,
          SALE_PRICE numeric(19,2) not null,
          LIST_PRICE numeric(19,2) not null,
          NET_PRICE numeric(19,2) not null,
          GROSS_PRICE numeric(19,2) not null,
          TAX_RATE numeric(19,2) not null,
          TAX_EXCLUSIVE_OF_PRICE smallint not null default 0,
          TAX_CODE varchar(255) not null,
          IS_GIFT  smallint not null default 0,
          IS_PROMO_APPLIED smallint not null default 0,
          IS_FIXED_PRICE smallint not null default 0,
          APPLIED_PROMO varchar(255),
          CODE varchar(255) not null,
          PRODUCTNAME varchar(4000) not null,
          SUPPLIER_CODE varchar(255),
          ITEM_GROUP varchar(36),
          CONFIGURABLE smallint DEFAULT 0,
          NOT_SOLD_SEPARATELY smallint DEFAULT 0,
          B2B_REMARKS varchar(255),
          DELIVERY_REMARKS varchar(255),
          DELIVERY_EST_MIN timestamp,
          DELIVERY_EST_MAX timestamp,
          DELIVERY_GUARANTEED timestamp,
          STORED_ATTRIBUTES varchar(4000),
          CUSTOMERORDER_ID bigint not null,
          CREATED_TIMESTAMP timestamp,
          UPDATED_TIMESTAMP timestamp,
          CREATED_BY varchar(64),
          UPDATED_BY varchar(64),
          GUID varchar(36) not null unique,
          primary key (CUSTOMERORDERDET_ID)
      );
  
      create table TCUSTOMERSHOP (
          CUSTOMERSHOP_ID bigint not null GENERATED BY DEFAULT AS IDENTITY,
          VERSION bigint not null DEFAULT 0,
          CUSTOMER_ID bigint not null,
          SHOP_ID bigint not null,
          DISABLED smallint default 0,
          CREATED_TIMESTAMP timestamp,
          UPDATED_TIMESTAMP timestamp,
          CREATED_BY varchar(64),
          UPDATED_BY varchar(64),
          GUID varchar(36) not null unique,
          primary key (CUSTOMERSHOP_ID)
      );
  
      create table TCUSTOMERWISHLIST (
          CUSTOMERWISHLIST_ID bigint not null GENERATED BY DEFAULT AS IDENTITY,
          VERSION bigint not null DEFAULT 0,
          SKU_CODE varchar(255) not null,
          SUPPLIER_CODE varchar(255) not null,
          CUSTOMER_ID bigint not null,
          WL_TYPE varchar(1) default 'W',
          VISIBILITY varchar(1) default 'P',
          TAG varchar(255),
          NOTIFICATION_EMAIL varchar(255),
          QTY numeric(19,2) not null default 1,
          REGULAR_PRICE_WHEN_ADDED numeric(19,2) not null default 0,
          REGULAR_PRICE_CURRENCY_WHEN_ADDED varchar(5) not null,
          CREATED_TIMESTAMP timestamp,
          UPDATED_TIMESTAMP timestamp,
          CREATED_BY varchar(64),
          UPDATED_BY varchar(64),
          GUID varchar(36) not null unique,
          primary key (CUSTOMERWISHLIST_ID)
      );
  
      create table TPRODUCTOPT (
          PRODUCTOPT_ID bigint not null GENERATED BY DEFAULT AS IDENTITY,
          VERSION bigint not null DEFAULT 0,
          MANDATORY smallint not null,
          RANK integer,
          QTY numeric(19,2) not null default 1,
          PRODUCT_ID bigint not null,
          CODE varchar(255) not null,
          SKU_CODE varchar(255),
          OPTION_SKU_CODES varchar(255),
          CREATED_TIMESTAMP timestamp,
          UPDATED_TIMESTAMP timestamp,
          CREATED_BY varchar(64),
          UPDATED_BY varchar(64),
          GUID varchar(36) not null unique,
          primary key (PRODUCTOPT_ID)
      );
  
      create table TETYPE (
          ETYPE_ID bigint not null GENERATED BY DEFAULT AS IDENTITY,
          VERSION bigint not null DEFAULT 0,
          JAVATYPE varchar(255) not null,
          BUSINESSTYPE varchar(255),
          CREATED_TIMESTAMP timestamp,
          UPDATED_TIMESTAMP timestamp,
          CREATED_BY varchar(64),
          UPDATED_BY varchar(64),
          GUID varchar(36) not null unique,
          primary key (ETYPE_ID)
      );
  
      create table TMAILTEMPLATE (
          MAILTEMPLATE_ID bigint not null GENERATED BY DEFAULT AS IDENTITY,
          VERSION bigint not null DEFAULT 0,
          CODE varchar(255) not null,
          FSPOINTER varchar(4000) not null,
          NAME varchar(255) not null,
          DESCRIPTION varchar(255),
          MAILTEMPLATEGROUP_ID bigint not null,
          CREATED_TIMESTAMP timestamp,
          UPDATED_TIMESTAMP timestamp,
          CREATED_BY varchar(64),
          UPDATED_BY varchar(64),
          GUID varchar(36) not null unique,
          primary key (MAILTEMPLATE_ID)
      );
  
      create table TMAILTEMPLATEGROUP (
          MAILTEMPLATEGROUP_ID bigint not null GENERATED BY DEFAULT AS IDENTITY,
          VERSION bigint not null DEFAULT 0,
          NAME varchar(64) not null,
          DESCRIPTION varchar(4000),
          CREATED_TIMESTAMP timestamp,
          UPDATED_TIMESTAMP timestamp,
          CREATED_BY varchar(64),
          UPDATED_BY varchar(64),
          GUID varchar(36) not null unique,
          primary key (MAILTEMPLATEGROUP_ID)
      );
  
      create table TMANAGER (
          MANAGER_ID bigint not null GENERATED BY DEFAULT AS IDENTITY,
          VERSION bigint not null DEFAULT 0,
          EMAIL varchar(255) not null unique,
          SALUTATION varchar(24),
          FIRSTNAME varchar(128) not null,
          LASTNAME varchar(128) not null,
          MIDDLENAME varchar(128),
          DASHBOARDWIDGETS varchar(4000),
          PASSWORD varchar(255) not null,
          PASSWORDEXPIRY timestamp,
          AUTHTOKEN varchar(255),
          AUTHTOKENEXPIRY timestamp,
          ENABLED smallint not null,
          COMPANYNAME1 varchar(255),
          COMPANYNAME2 varchar(255),
          COMPANYDEPARTMENT varchar(255),
          PRODUCT_SUPPLIER_CATALOGS varchar(255),
          CATEGORY_CATALOGS varchar(1024),
          CREATED_TIMESTAMP timestamp,
          UPDATED_TIMESTAMP timestamp,
          CREATED_BY varchar(64),
          UPDATED_BY varchar(64),
          GUID varchar(36) not null unique,
          primary key (MANAGER_ID)
      );
  
      create table TMANAGERROLE (
          MANAGERROLE_ID bigint not null GENERATED BY DEFAULT AS IDENTITY,
          VERSION bigint not null DEFAULT 0,
          EMAIL varchar(255) not null,
          CODE varchar(255) not null,
          CREATED_TIMESTAMP timestamp,
          UPDATED_TIMESTAMP timestamp,
          CREATED_BY varchar(64),
          UPDATED_BY varchar(64),
          GUID varchar(36) not null unique,
          primary key (MANAGERROLE_ID)
      );
  
  
      create table TMANAGERSHOP (
          MANAGERSHOP_ID bigint not null GENERATED BY DEFAULT AS IDENTITY,
          VERSION bigint not null DEFAULT 0,
          MANAGER_ID bigint not null,
          SHOP_ID bigint not null,
          CREATED_TIMESTAMP timestamp,
          UPDATED_TIMESTAMP timestamp,
          CREATED_BY varchar(64),
          UPDATED_BY varchar(64),
          GUID varchar(36) not null unique,
          primary key (MANAGERSHOP_ID)
      );
  
      create table TPRODTYPEATTRVIEWGROUP (
          PRODTYPEATTRIBUTEGROUP_ID bigint not null GENERATED BY DEFAULT AS IDENTITY,
          VERSION bigint not null DEFAULT 0,
          PRODUCTTYPE_ID bigint not null,
          ATTRCODELIST varchar(4000),
          RANK integer,
          NAME varchar(64) not null,
          DISPLAYNAME varchar(255),
          CREATED_TIMESTAMP timestamp,
          UPDATED_TIMESTAMP timestamp,
          CREATED_BY varchar(64),
          UPDATED_BY varchar(64),
          GUID varchar(36) not null unique,
          primary key (PRODTYPEATTRIBUTEGROUP_ID)
      );
  
      create table TPRODUCT (
          PRODUCT_ID bigint not null GENERATED BY DEFAULT AS IDENTITY,
          VERSION bigint not null DEFAULT 0,
          CODE varchar(255) not null  unique,
          MANUFACTURER_CODE varchar(255),
          MANUFACTURER_PART_CODE varchar(255),
          SUPPLIER_CODE varchar(255),
          SUPPLIER_CATALOG_CODE varchar(255),
          PIM_CODE varchar(255),
          PIM_DISABLED smallint not null default 0,
          PIM_OUTDATED smallint not null default 0,
          PIM_UPDATED timestamp,
          NOT_SOLD_SEPARATELY smallint not null default 0,
          NAME varchar(255) not null,
          DISPLAYNAME varchar(4000),
          DESCRIPTION varchar(4000),
          TAG varchar(255),
          BRAND_ID bigint not null,
          PRODUCTTYPE_ID bigint not null,
          CONFIGURABLE smallint,
          URI varchar(255) unique,
          TITLE varchar(255),
          METAKEYWORDS varchar(255),
          METADESCRIPTION varchar(255),
          DISPLAY_TITLE varchar(4000),
          DISPLAY_METAKEYWORDS varchar(4000),
          DISPLAY_METADESCRIPTION varchar(4000),
          CREATED_TIMESTAMP timestamp,
          UPDATED_TIMESTAMP timestamp,
          CREATED_BY varchar(64),
          UPDATED_BY varchar(64),
          GUID varchar(36) not null unique,
          primary key (PRODUCT_ID)
      );
  
      create table TPRODUCTASSOCIATION (
          PRODUCTASSOCIATION_ID bigint not null GENERATED BY DEFAULT AS IDENTITY,
          VERSION bigint not null DEFAULT 0,
          RANK integer,
          ASSOCIATION_ID bigint not null,
          PRODUCT_ID bigint not null,
          ASSOCIATED_SKU_CODE varchar(255) not null,
          CREATED_TIMESTAMP timestamp,
          UPDATED_TIMESTAMP timestamp,
          CREATED_BY varchar(64),
          UPDATED_BY varchar(64),
          GUID varchar(36) not null unique,
          primary key (PRODUCTASSOCIATION_ID)
      );
  
      create table TPRODUCTATTRVALUE (
          ATTRVALUE_ID bigint not null GENERATED BY DEFAULT AS IDENTITY,
          VERSION bigint not null DEFAULT 0,
          VAL varchar(4000),
          INDEXVAL varchar(255),
          DISPLAYVAL varchar(4000),
          PRODUCT_ID bigint not null,
          CODE varchar(255) not null,
          CREATED_TIMESTAMP timestamp,
          UPDATED_TIMESTAMP timestamp,
          CREATED_BY varchar(64),
          UPDATED_BY varchar(64),
          GUID varchar(36) not null unique,
          primary key (ATTRVALUE_ID)
      );
  
      create table TPRODUCTCATEGORY (
          PRODUCTCATEGORY_ID bigint not null GENERATED BY DEFAULT AS IDENTITY,
          VERSION bigint not null DEFAULT 0,
          PRODUCT_ID bigint not null,
          CATEGORY_ID bigint not null,
          RANK integer,
          CREATED_TIMESTAMP timestamp,
          UPDATED_TIMESTAMP timestamp,
          CREATED_BY varchar(64),
          UPDATED_BY varchar(64),
          GUID varchar(36) not null unique,
          primary key (PRODUCTCATEGORY_ID)
      );
  
      create table TPRODUCTSKUATTRVALUE (
          ATTRVALUE_ID bigint not null GENERATED BY DEFAULT AS IDENTITY,
          VERSION bigint not null DEFAULT 0,
          VAL varchar(4000),
          INDEXVAL varchar(255),
          DISPLAYVAL varchar(4000),
          SKU_ID bigint not null,
          CODE varchar(255) not null,
          CREATED_TIMESTAMP timestamp,
          UPDATED_TIMESTAMP timestamp,
          CREATED_BY varchar(64),
          UPDATED_BY varchar(64),
          GUID varchar(36) not null unique,
          primary key (ATTRVALUE_ID)
      );
  
      create table TPRODUCTTYPE (
          PRODUCTTYPE_ID bigint not null GENERATED BY DEFAULT AS IDENTITY,
          VERSION bigint not null DEFAULT 0,
          NAME varchar(255),
          DISPLAYNAME varchar(4000),
          DESCRIPTION varchar(255),
          UITEMPLATE varchar(255),
          UISEARCHTEMPLATE varchar(255),
          SERVICE smallint,
          SHIPPABLE smallint,
          DIGITAL smallint default 0,
          DOWNLOADABLE smallint default 0,
          CREATED_TIMESTAMP timestamp,
          UPDATED_TIMESTAMP timestamp,
          CREATED_BY varchar(64),
          UPDATED_BY varchar(64),
          GUID varchar(36) not null unique,
          primary key (PRODUCTTYPE_ID)
      );
  
      create table TPRODUCTTYPEATTR (
          PRODTYPEATTR_ID bigint not null GENERATED BY DEFAULT AS IDENTITY,
          VERSION bigint not null DEFAULT 0,
          CODE varchar(255) not null,
          PRODUCTTYPE_ID bigint not null,
          RANK integer default 500,
          VISIBLE smallint,
          SIMILARITY smallint,
          NAV smallint,
          NAV_TEMPLATE varchar(64),
          NAV_TYPE varchar(1) default 'S',
          RANGE_NAV varchar(4000),
          CREATED_TIMESTAMP timestamp,
          UPDATED_TIMESTAMP timestamp,
          CREATED_BY varchar(64),
          UPDATED_BY varchar(64),
          GUID varchar(36) not null unique,
          primary key (PRODTYPEATTR_ID)
      );
  
      create table TROLE (
          ROLE_ID bigint not null GENERATED BY DEFAULT AS IDENTITY,
          VERSION bigint not null DEFAULT 0,
          CODE varchar(255) not null unique,
          DESCRIPTION varchar(255),
          CREATED_TIMESTAMP timestamp,
          UPDATED_TIMESTAMP timestamp,
          CREATED_BY varchar(64),
          UPDATED_BY varchar(64),
          GUID varchar(36) not null unique,
          primary key (ROLE_ID)
      );
  
      create table TSEOIMAGE (
          SEOIMAGE_ID bigint not null GENERATED BY DEFAULT AS IDENTITY,
          VERSION bigint not null DEFAULT 0,
          IMAGE_NAME varchar(255),
          ALT varchar(255),
          TITLE varchar(255),
          DISPLAY_ALT varchar(4000),
          DISPLAY_TITLE varchar(4000),
          CREATED_TIMESTAMP timestamp,
          UPDATED_TIMESTAMP timestamp,
          CREATED_BY varchar(64),
          UPDATED_BY varchar(64),
          GUID varchar(36) not null unique,
          primary key (SEOIMAGE_ID)
      );
  
      create table TSHOP (
          SHOP_ID bigint not null GENERATED BY DEFAULT AS IDENTITY,
          MASTER_ID bigint,
          VERSION bigint not null DEFAULT 0,
          CODE varchar(255) not null unique,
          NAME varchar(64) not null,
          DESCRIPTION varchar(4000),
          FSPOINTER varchar(4000) not null,
          DISABLED smallint not null default 0,
          URI varchar(255),
          TITLE varchar(255),
          METAKEYWORDS varchar(255),
          METADESCRIPTION varchar(255),
          DISPLAY_TITLE varchar(4000),
          DISPLAY_METAKEYWORDS varchar(4000),
          DISPLAY_METADESCRIPTION varchar(4000),
          CREATED_TIMESTAMP timestamp,
          UPDATED_TIMESTAMP timestamp,
          CREATED_BY varchar(64),
          UPDATED_BY varchar(64),
          GUID varchar(36) not null unique,
          primary key (SHOP_ID)
      );
  
      create table TSHOPADVPLACE (
          SHOPADVPLACE_ID bigint not null GENERATED BY DEFAULT AS IDENTITY,
          VERSION bigint not null DEFAULT 0,
          NAME varchar(255) not null,
          DESCRIPTION varchar(4000),
          SHOP_ID bigint not null,
          CREATED_TIMESTAMP timestamp,
          UPDATED_TIMESTAMP timestamp,
          CREATED_BY varchar(64),
          UPDATED_BY varchar(64),
          GUID varchar(36) not null unique,
          primary key (SHOPADVPLACE_ID)
      );
  
      create table TSHOPADVRULES (
          SHOPADVRULES_ID bigint not null GENERATED BY DEFAULT AS IDENTITY,
          VERSION bigint not null DEFAULT 0,
          rank integer,
          NAME varchar(255) not null,
          DESCRIPTION varchar(4000),
          AVAILABLEFROM timestamp,
          AVAILABLETO timestamp,
          RULE varchar(4000),
          SHOPADVPLACE_ID bigint not null,
          CREATED_TIMESTAMP timestamp,
          UPDATED_TIMESTAMP timestamp,
          CREATED_BY varchar(64),
          UPDATED_BY varchar(64),
          GUID varchar(36) not null unique,
          primary key (SHOPADVRULES_ID)
      );
  
      create table TSHOPATTRVALUE (
          ATTRVALUE_ID bigint not null GENERATED BY DEFAULT AS IDENTITY,
          VERSION bigint not null DEFAULT 0,
          VAL varchar(4000),
          INDEXVAL varchar(255),
          DISPLAYVAL varchar(4000),
          SHOP_ID bigint not null,
          CODE varchar(255) not null,
          CREATED_TIMESTAMP timestamp,
          UPDATED_TIMESTAMP timestamp,
          CREATED_BY varchar(64),
          UPDATED_BY varchar(64),
          GUID varchar(36) not null unique,
          primary key (ATTRVALUE_ID)
      );
  
      create table TSHOPCATEGORY (
          SHOPCATEGORY_ID bigint not null GENERATED BY DEFAULT AS IDENTITY,
          VERSION bigint not null DEFAULT 0,
          RANK integer,
          SHOP_ID bigint not null,
          CATEGORY_ID bigint not null,
          CREATED_TIMESTAMP timestamp,
          UPDATED_TIMESTAMP timestamp,
          CREATED_BY varchar(64),
          UPDATED_BY varchar(64),
          GUID varchar(36) not null unique,
          primary key (SHOPCATEGORY_ID)
      );
  
      create table TSHOPTOPSELLER (
          SHOPTOPSELLER_ID bigint not null GENERATED BY DEFAULT AS IDENTITY,
          VERSION bigint not null DEFAULT 0,
          SHOP_ID bigint not null,
          PRODUCT_ID bigint not null,
          COUNTER numeric(19,2),
          CREATED_TIMESTAMP timestamp,
          UPDATED_TIMESTAMP timestamp,
          CREATED_BY varchar(64),
          UPDATED_BY varchar(64),
          GUID varchar(36) not null unique,
          primary key (SHOPTOPSELLER_ID)
      );
  
      create table TSHOPURL (
          STOREURL_ID bigint not null GENERATED BY DEFAULT AS IDENTITY,
          VERSION bigint not null DEFAULT 0,
          URL varchar(512) not null,
          THEME_CHAIN varchar(512),
          PRIMARY_URL smallint not null DEFAULT 0,
          SHOP_ID bigint not null,
          CREATED_TIMESTAMP timestamp,
          UPDATED_TIMESTAMP timestamp,
          CREATED_BY varchar(64),
          UPDATED_BY varchar(64),
          GUID varchar(36) not null unique,
          primary key (STOREURL_ID)
      );
  
      create table TSHOPALIAS (
          STOREALIAS_ID bigint not null GENERATED BY DEFAULT AS IDENTITY,
          VERSION bigint not null DEFAULT 0,
          SHOP_ALIAS varchar(255) not null unique,
          SHOP_ID bigint not null,
          CREATED_TIMESTAMP timestamp,
          UPDATED_TIMESTAMP timestamp,
          CREATED_BY varchar(64),
          UPDATED_BY varchar(64),
          GUID varchar(36) not null unique,
          primary key (STOREALIAS_ID)
      );
  
      create table TSHOPWAREHOUSE (
          SHOPWAREHOUSE_ID bigint not null GENERATED BY DEFAULT AS IDENTITY,
          VERSION bigint not null DEFAULT 0,
          SHOP_ID bigint not null,
          WAREHOUSE_ID bigint not null,
          RANK integer,
          DISABLED smallint default 0,
          CREATED_TIMESTAMP timestamp,
          UPDATED_TIMESTAMP timestamp,
          CREATED_BY varchar(64),
          UPDATED_BY varchar(64),
          GUID varchar(36) not null unique,
          primary key (SHOPWAREHOUSE_ID)
      );
  
      create table TSKU (
          SKU_ID bigint not null GENERATED BY DEFAULT AS IDENTITY,
          VERSION bigint not null DEFAULT 0,
          CODE varchar(255) not null  unique,
          MANUFACTURER_CODE varchar(255),
          MANUFACTURER_PART_CODE varchar(255),
          SUPPLIER_CODE varchar(255),
          SUPPLIER_CATALOG_CODE varchar(255),
          NAME varchar(255) not null,
          DISPLAYNAME varchar(4000),
          DESCRIPTION varchar(4000),
          PRODUCT_ID bigint,
          TAG varchar(255),
          RANK integer,
          BARCODE varchar(128),
          URI varchar(255) unique,
          TITLE varchar(255),
          METAKEYWORDS varchar(255),
          METADESCRIPTION varchar(255),
          DISPLAY_TITLE varchar(4000),
          DISPLAY_METAKEYWORDS varchar(4000),
          DISPLAY_METADESCRIPTION varchar(4000),
          CREATED_TIMESTAMP timestamp,
          UPDATED_TIMESTAMP timestamp,
          CREATED_BY varchar(64),
          UPDATED_BY varchar(64),
          GUID varchar(36) not null unique,
          primary key (SKU_ID)
      );
  
      create table TSKUPRICE (
          SKUPRICE_ID bigint not null GENERATED BY DEFAULT AS IDENTITY,
          VERSION bigint not null DEFAULT 0,
          SKU_CODE varchar(255) not null,
          SHOP_ID bigint not null,
          CURRENCY varchar(3) not null,
          QTY numeric(19,2) not null,
          PRICE_UPON_REQUEST smallint not null default 0,
          PRICE_ON_OFFER smallint not null default 0,
          REGULAR_PRICE numeric(19,2) not null,
          SALE_PRICE numeric(19,2),
          MINIMAL_PRICE numeric(19,2),
          SALE_FROM timestamp,
          SALE_TO timestamp,
          TAG varchar(45),
          PRICINGPOLICY varchar(255),
          REF varchar(255),
          AUTO_GENERATED smallint not null default 0,
          SUPPLIER varchar(255),
          CREATED_TIMESTAMP timestamp,
          UPDATED_TIMESTAMP timestamp,
          CREATED_BY varchar(64),
          UPDATED_BY varchar(64),
          GUID varchar(36) not null,
          primary key (SKUPRICE_ID)
      );
  
  
      create table TSKUPRICERULE (
          SKUPRICERULE_ID bigint not null GENERATED BY DEFAULT AS IDENTITY,
          VERSION bigint not null default 0,
          CODE varchar(255) not null unique,
          RANK integer default 500,
          SHOP_CODE varchar(255) not null,
          CURRENCY varchar(5) not null,
          RULE_ACTION varchar(1) not null,
          ELIGIBILITY_CONDITION varchar(4000) not null,
          MARGIN_PERCENT numeric(9,2),
          MARGIN_AMOUNT numeric(9,2),
          ADD_DEFAULT_TAX smallint not null,
          ROUNDING_UNIT numeric(9,2),
          PRICE_TAG varchar(255),
          PRICE_REF varchar(255),
          PRICE_POLICY varchar(255),
          NAME varchar(255) not null,
          DESCRIPTION varchar(1000),
          TAG varchar(255),
          ENABLED smallint not null,
          ENABLED_FROM timestamp,
          ENABLED_TO timestamp,
          CREATED_TIMESTAMP timestamp,
          UPDATED_TIMESTAMP timestamp,
          CREATED_BY varchar(64),
          UPDATED_BY varchar(64),
          GUID varchar(36) not null unique,
          primary key (SKUPRICERULE_ID)
      );
  
  
      create table TSKUWAREHOUSE (
          SKUWAREHOUSE_ID bigint not null GENERATED BY DEFAULT AS IDENTITY,
          VERSION bigint not null DEFAULT 0,
          WAREHOUSE_ID bigint not null,
          SKU_CODE varchar(255) not null,
          QUANTITY numeric(19,2) not null,
          RESERVED numeric(19,2) default 0,
          DISABLED smallint not null default 0,
          AVAILABLEFROM timestamp,
          AVAILABLETO timestamp,
          RELEASEDATE timestamp,
          AVAILABILITY integer default 1 not null,
          RESTOCKDATE timestamp,
          RESTOCKNOTE varchar(255),
          FEATURED smallint,
          TAG varchar(255),
          MIN_ORDER_QUANTITY numeric(19,2),
          MAX_ORDER_QUANTITY numeric(19,2),
          STEP_ORDER_QUANTITY numeric(19,2),
          CREATED_TIMESTAMP timestamp,
          UPDATED_TIMESTAMP timestamp,
          CREATED_BY varchar(64),
          UPDATED_BY varchar(64),
          GUID varchar(36) not null unique,
          primary key (SKUWAREHOUSE_ID)
      );
  
      create table TSTATE (
          STATE_ID bigint not null GENERATED BY DEFAULT AS IDENTITY,
          VERSION bigint not null DEFAULT 0,
          COUNTRY_CODE varchar(2) not null,
          STATE_CODE varchar(64) not null,
          NAME varchar(64) not null,
          DISPLAYNAME varchar(255),
          CREATED_TIMESTAMP timestamp,
          UPDATED_TIMESTAMP timestamp,
          CREATED_BY varchar(64),
          UPDATED_BY varchar(64),
          GUID varchar(36) not null unique,
          primary key (STATE_ID)
      );
  
      create table TSYSTEM (
          SYSTEM_ID bigint not null GENERATED BY DEFAULT AS IDENTITY,
          VERSION bigint not null DEFAULT 0,
          CODE varchar(255) not null,
          NAME varchar(64) not null,
          DESCRIPTION varchar(4000),
          CREATED_TIMESTAMP timestamp,
          UPDATED_TIMESTAMP timestamp,
          CREATED_BY varchar(64),
          UPDATED_BY varchar(64),
          GUID varchar(36) not null unique,
          primary key (SYSTEM_ID)
      );
  
      create table TSYSTEMATTRVALUE (
          ATTRVALUE_ID bigint not null GENERATED BY DEFAULT AS IDENTITY,
          VERSION bigint not null DEFAULT 0,
          VAL varchar(4000),
          INDEXVAL varchar(255),
          DISPLAYVAL varchar(4000),
          CODE varchar(255) not null,
          SYSTEM_ID bigint not null,
          CREATED_TIMESTAMP timestamp,
          UPDATED_TIMESTAMP timestamp,
          CREATED_BY varchar(64),
          UPDATED_BY varchar(64),
          GUID varchar(36) not null unique,
          primary key (ATTRVALUE_ID)
      );
  
      create table TWAREHOUSE (
          WAREHOUSE_ID bigint not null GENERATED BY DEFAULT AS IDENTITY,
          VERSION bigint not null DEFAULT 0,
          CODE varchar(255) not null,
          NAME varchar(64) not null,
          DISPLAYNAME varchar(4000),
          DESCRIPTION varchar(4000),
          COUNTRY_CODE varchar(64),
          STATE_CODE varchar(64),
          CITY varchar(128),
          POSTCODE varchar(16),
          DEFAULT_STD_LEAD_TIME integer default 0,
          DEFAULT_BO_LEAD_TIME integer default 0,
          MULTI_SHIP_SUPPORTED smallint not null default 0,
          CREATED_TIMESTAMP timestamp,
          UPDATED_TIMESTAMP timestamp,
          CREATED_BY varchar(64),
          UPDATED_BY varchar(64),
          GUID varchar(36) not null unique,
          primary key (WAREHOUSE_ID)
      );
  
  
      create table TPROMOTION (
          PROMOTION_ID bigint not null GENERATED BY DEFAULT AS IDENTITY,
          VERSION bigint not null default 0,
          CODE varchar(255) not null unique,
          RANK integer default 500,
          SHOP_CODE varchar(255) not null,
          CURRENCY varchar(5) not null,
          PROMO_TYPE varchar(1) not null,
          PROMO_ACTION varchar(1) not null,
          ELIGIBILITY_CONDITION varchar(4000) not null,
          PROMO_ACTION_CONTEXT varchar(255),
          NAME varchar(255) not null,
          DISPLAYNAME varchar(4000),
          DESCRIPTION varchar(100),
          DISPLAYDESCRIPTION varchar(4000),
          TAG varchar(255),
          COUPON_TRIGGERED smallint not null,
          CAN_BE_COMBINED smallint not null,
          ENABLED smallint not null,
          ENABLED_FROM timestamp,
          ENABLED_TO timestamp,
          CREATED_TIMESTAMP timestamp,
          UPDATED_TIMESTAMP timestamp,
          CREATED_BY varchar(64),
          UPDATED_BY varchar(64),
          GUID varchar(36) not null unique,
          primary key (PROMOTION_ID)
      );
  
  
      create table TPROMOTIONCOUPON (
          PROMOTIONCOUPON_ID bigint not null GENERATED BY DEFAULT AS IDENTITY,
          VERSION bigint not null default 0,
          CODE varchar(255) not null unique,
          PROMOTION_ID bigint not null,
          USAGE_LIMIT integer default 1,
          USAGE_LIMIT_PER_CUSTOMER integer default 1,
          USAGE_COUNT integer default 0,
          CREATED_TIMESTAMP timestamp,
          UPDATED_TIMESTAMP timestamp,
          CREATED_BY varchar(64),
          UPDATED_BY varchar(64),
          primary key (PROMOTIONCOUPON_ID)
      );
  
  
      create table TPROMOTIONCOUPONUSAGE (
          PROMOTIONCOUPONUSAGE_ID bigint not null GENERATED BY DEFAULT AS IDENTITY,
          VERSION bigint not null default 0,
          CUSTOMER_EMAIL varchar(255) not null,
          COUPON_CODE varchar(255) not null,
          CUSTOMERORDER_ID bigint not null,
          CREATED_TIMESTAMP timestamp,
          UPDATED_TIMESTAMP timestamp,
          CREATED_BY varchar(64),
          UPDATED_BY varchar(64),
          primary key (PROMOTIONCOUPONUSAGE_ID)
      );
  
  
      create table TMAIL (
          MAIL_ID bigint not null GENERATED BY DEFAULT AS IDENTITY,
          VERSION bigint not null default 0,
          SHOP_CODE varchar(255),
          SUBJECT varchar(512) not null,
          EMAIL_FROM varchar(512) not null,
          EMAIL_RECEPIENTS varchar(512) not null,
          EMAIL_CC varchar(512),
          EMAIL_BCC varchar(512),
          TEXT_VERSION clob,
          HTML_VERSION clob,
          CREATED_TIMESTAMP timestamp,
          UPDATED_TIMESTAMP timestamp,
          CREATED_BY varchar(64),
          UPDATED_BY varchar(64),
          GUID varchar(36) not null unique,
          primary key (MAIL_ID)
      );
  
      create table TMAILPART (
          MAILPART_ID bigint not null GENERATED BY DEFAULT AS IDENTITY,
          VERSION bigint not null default 0,
          MAIL_ID bigint not null default 0,
          RESOURCE_ID varchar(255),
          FILENAME varchar(255),
          PART_DATA blob,
          CREATED_TIMESTAMP timestamp,
          UPDATED_TIMESTAMP timestamp,
          CREATED_BY varchar(64),
          UPDATED_BY varchar(64),
          GUID varchar(36) not null unique,
          primary key (MAIL_ID)
      );
  
  
      create table TSHOPPINGCARTSTATE (
          TSHOPPINGCARTSTATE_ID bigint not null GENERATED BY DEFAULT AS IDENTITY,
          VERSION bigint not null default 0,
          CREATED_TIMESTAMP timestamp,
          UPDATED_TIMESTAMP timestamp,
          CREATED_BY varchar(64),
          UPDATED_BY varchar(64),
          GUID varchar(36) not null unique,
          CART_STATE blob(55536),
          MANAGED smallint not null default 0,
          EMPTY smallint not null,
          SHOP_ID bigint not null default 0,
          CUSTOMER_EMAIL varchar(255),
          ORDERNUM varchar(255),
          primary key (TSHOPPINGCARTSTATE_ID)
      );
  
  
      create table TTAX (
          TAX_ID bigint not null GENERATED BY DEFAULT AS IDENTITY,
          VERSION bigint not null default 0,
          TAX_RATE numeric(19,2) not null,
          EXCLUSIVE_OF_PRICE smallint not null default 0,
          SHOP_CODE varchar(255) not null,
          CURRENCY varchar(5) not null,
          CODE varchar(255) not null,
          DESCRIPTION varchar(100),
          CREATED_TIMESTAMP timestamp,
          UPDATED_TIMESTAMP timestamp,
          CREATED_BY varchar(64),
          UPDATED_BY varchar(64),
          GUID varchar(255) not null unique,
          primary key (TAX_ID)
      );
  
      create table TTAXCONFIG (
          TAXCONFIG_ID bigint not null GENERATED BY DEFAULT AS IDENTITY,
          VERSION bigint not null default 0,
          TAX_ID bigint not null,
          PRODUCT_CODE varchar(255),
          STATE_CODE varchar(16),
          COUNTRY_CODE varchar(2),
          CREATED_TIMESTAMP timestamp,
          UPDATED_TIMESTAMP timestamp,
          CREATED_BY varchar(64),
          UPDATED_BY varchar(64),
          GUID varchar(255) not null unique,
          primary key (TAXCONFIG_ID)
      );
  
      create table TDATAGROUP (
          DATAGROUP_ID bigint not null GENERATED BY DEFAULT AS IDENTITY,
          VERSION bigint not null default 0,
          NAME varchar(255) not null unique,
          DISPLAYNAME varchar(4000),
          QUALIFIER varchar(45),
          TYPE varchar(45) not null,
          DESCRIPTORS varchar(4000),
          CREATED_TIMESTAMP timestamp,
          UPDATED_TIMESTAMP timestamp,
          CREATED_BY varchar(64),
          UPDATED_BY varchar(64),
          primary key (DATAGROUP_ID)
      );
  
      create table TDATADESCRIPTOR (
          DATADESCRIPTOR_ID bigint not null GENERATED BY DEFAULT AS IDENTITY,
          VERSION bigint not null default 0,
          NAME varchar(255) not null unique,
          TYPE varchar(45) not null,
          VALUE varchar(20000),
          CREATED_TIMESTAMP timestamp,
          UPDATED_TIMESTAMP timestamp,
          CREATED_BY varchar(64),
          UPDATED_BY varchar(64),
          primary key (DATADESCRIPTOR_ID)
      );
  
  
      alter table TADDRESS
          add constraint FKADDRCUSTOMER
          foreign key (CUSTOMER_ID) 
          references TCUSTOMER 
          on delete cascade;
  
  
      create index ATTR_GROUP on TATTRIBUTE (ATTRIBUTEGROUP);
      create index ATTR_ETYPE on TATTRIBUTE (ETYPE);
  
  
      alter table TBRANDATTRVALUE
          add constraint FK_AV_BRAND_BRANDID
          foreign key (BRAND_ID) 
          references TBRAND on delete cascade;
  
      create index AV_BRAND_CODE on TBRANDATTRVALUE (CODE);
      create index AV_BRAND_VAL on TBRANDATTRVALUE (INDEXVAL);
  
      alter table TCARRIERSLA 
          add constraint FK_CSLA_CARR 
          foreign key (CARRIER_ID) 
          references TCARRIER;
  
      alter table TCARRIERSHOP
          add constraint FK_CRS_SHOP
          foreign key (SHOP_ID)
          references TSHOP;
  
      alter table TCARRIERSHOP
          add constraint FK_CRS_CARRIER
          foreign key (CARRIER_ID)
          references TCARRIER         on delete cascade;
  
  
  
      alter table TCATEGORY 
          add constraint FK_CAT_PRODTYPE 
          foreign key (PRODUCTTYPE_ID) 
          references TPRODUCTTYPE;
  
      create index CAT_DISABLED on TCATEGORY (DISABLED);
  
  
      alter table TCATEGORYATTRVALUE
          add constraint FK_AV_CATEGORY_CATEGORYID
          foreign key (CATEGORY_ID) 
          references TCATEGORY 
          on delete cascade;
  
      create index AV_CATEGORY_CODE on TCATEGORYATTRVALUE (CODE);
      create index AV_CATEGORY_VAL on TCATEGORYATTRVALUE (INDEXVAL);
  
  
      create index CN_DISABLED on TCONTENT (DISABLED);
  
  
      alter table TCONTENTATTRVALUE
          add constraint FK_AV_CONTENT_CONTENTID
          foreign key (CONTENT_ID)
          references TCONTENT
          on delete cascade;
  
      create index AV_CONTENT_CODE on TCONTENTATTRVALUE (CODE);
      create index AV_CONTENT_VAL on TCONTENTATTRVALUE (INDEXVAL);
  
  
      alter table TCUSTOMERATTRVALUE
          add constraint FK_AV_CUSTOMER_CUSTOMERID
          foreign key (CUSTOMER_ID) 
          references TCUSTOMER 
          on delete cascade;
  
      create index AV_CUSTOMER_CODE on TCUSTOMERATTRVALUE (CODE);
      create index AV_CUSTOMER_VAL on TCUSTOMERATTRVALUE (INDEXVAL);
  
  
      alter table TCUSTOMERORDER
          add constraint FK_ORDER_SHOP 
          foreign key (SHOP_ID) 
          references TSHOP;
  
  
      alter table TCUSTOMERORDER
          add constraint FK_ORDER_CUSTOMER 
          foreign key (CUSTOMER_ID) 
          references TCUSTOMER;
  
      create index CUSTOMERORDER_NUM on TCUSTOMERORDER (ORDERNUM);
      create index CUSTOMERORDER_CART on TCUSTOMERORDER (CART_GUID);
      create index CUSTOMERORDER_EMAIL on TCUSTOMERORDER (EMAIL);
      create index CUSTOMERORDER_ELIGEXP on TCUSTOMERORDER (ELIGIBLE_FOR_EXPORT);
  
  
      alter table TCUSTOMERORDER
          add constraint FK_ORDER_BILLADDR
          foreign key (BILL_ADDRESS_ID)
          references TADDRESS;
  
      alter table TCUSTOMERORDER
          add constraint FK_ORDER_SHIPADDR
          foreign key (SHIP_ADDRESS_ID)
          references TADDRESS;
  
      create index CUSTOMERORDERDELIVERY_ELIGEXP on TCUSTOMERORDERDELIVERY (ELIGIBLE_FOR_EXPORT);
  
      alter table TCUSTOMERORDERDELIVERY
          add constraint FK_OD_ORD
          foreign key (CUSTOMERORDER_ID)
          references TCUSTOMERORDER on delete cascade;
  
      alter table TCUSTOMERORDERDELIVERY
          add constraint FK_OD_CSLA
          foreign key (CARRIERSLA_ID)
          references TCARRIERSLA;
  
      alter table TCUSTOMERORDERDELIVERYDET
          add constraint FK_CODD_CDELIVERY
          foreign key (CUSTOMERORDERDELIVERY_ID)
          references TCUSTOMERORDERDELIVERY;
  
  
      alter table TCUSTOMERORDERDET 
          add constraint FKCB358C37A7F39C2D 
          foreign key (CUSTOMERORDER_ID) 
          references TCUSTOMERORDER;
  
  
      alter table TCUSTOMERSHOP 
          add constraint FK_CS_SHOP 
          foreign key (SHOP_ID) 
          references TSHOP;
  
      alter table TCUSTOMERSHOP 
          add constraint FK_CS_CUSTOMER 
          foreign key (CUSTOMER_ID) 
          references TCUSTOMER         on delete cascade;
  
  
      alter table TCUSTOMERWISHLIST
          add constraint FK_WL_CUSTOMER 
          foreign key (CUSTOMER_ID) 
          references TCUSTOMER;
  
  
      alter table TPRODUCTOPT
          add constraint FK_OPT_PROD
          foreign key (PRODUCT_ID) 
          references TPRODUCT;
  
  
      alter table TMAILTEMPLATE 
          add constraint FK_M_TEMPLATEGROUP 
          foreign key (MAILTEMPLATEGROUP_ID) 
          references TMAILTEMPLATEGROUP;
  
      create index MANAGER_EMAIL on TMANAGER (EMAIL);
  
      alter table TPRODTYPEATTRVIEWGROUP 
          add constraint FK4589D8C42AD8F70D 
          foreign key (PRODUCTTYPE_ID) 
          references TPRODUCTTYPE;
  
  
  
      alter table TPRODUCT 
          add constraint FK_PROD_PRODTYPE 
          foreign key (PRODUCTTYPE_ID) 
          references TPRODUCTTYPE;
  
      alter table TPRODUCT 
          add constraint FK_PROD_BRAND 
          foreign key (BRAND_ID) 
          references TBRAND;
  
      alter table TPRODUCTASSOCIATION 
          add constraint FK_PA_ASSOC 
          foreign key (ASSOCIATION_ID) 
          references TASSOCIATION;
  
      alter table TPRODUCTASSOCIATION
          add constraint FK_PA_PRODUCT 
          foreign key (PRODUCT_ID) 
          references TPRODUCT;
  
      create index ASSOCIATED_SKUCODE on TPRODUCTASSOCIATION (ASSOCIATED_SKU_CODE);
  
      alter table TPRODUCTATTRVALUE
          add constraint FK_AV_PRODUCT_PRODUCTID
          foreign key (PRODUCT_ID) 
          references TPRODUCT 
          on delete cascade;
  
      create index AV_PRODUCT_CODE on TPRODUCTATTRVALUE (CODE);
      create index AV_PRODUCT_VAL on TPRODUCTATTRVALUE (INDEXVAL);
  
  
      alter table TPRODUCTCATEGORY 
          add constraint FK_PC_CAT 
          foreign key (CATEGORY_ID) 
          references TCATEGORY;
  
  
      alter table TPRODUCTCATEGORY 
          add constraint FK_PC_PRODUCT 
          foreign key (PRODUCT_ID) 
          references TPRODUCT;
  
  
  
      alter table TPRODUCTSKUATTRVALUE 
          add constraint FK_AV_SKU_SKUID
          foreign key (SKU_ID) 
          references TSKU;
  
      create index AV_SKU_CODE on TPRODUCTSKUATTRVALUE (CODE);
      create index AV_SKU_VAL on TPRODUCTSKUATTRVALUE (INDEXVAL);
  
      alter table TPRODUCTTYPEATTR 
          add constraint FK_PTA_PRODTYPE 
          foreign key (PRODUCTTYPE_ID) 
          references TPRODUCTTYPE         on delete cascade;
  
      create index PTA_ATTRIBUTE_CODE on TPRODUCTTYPEATTR (CODE);
  
      create index ROLE_CODE on TROLE (CODE);
  
      alter table TSHOPADVPLACE 
          add constraint FK_ADVP_SHOP 
          foreign key (SHOP_ID) 
          references TSHOP;
  
  
  
      alter table TSHOPADVRULES 
          add constraint FK_ADVR_ADVPLACE 
          foreign key (SHOPADVPLACE_ID) 
          references TSHOPADVPLACE;
  
  
      alter table TSHOPATTRVALUE 
          add constraint FK_AV_SHOP_SHOPID
          foreign key (SHOP_ID) 
          references TSHOP;
  
      create index AV_SHOP_CODE on TSHOPATTRVALUE (CODE);
      create index AV_SHOP_VAL on TSHOPATTRVALUE (INDEXVAL);
  
  
      alter table TSHOPCATEGORY 
          add constraint FK_SC_SHOP 
          foreign key (SHOP_ID) 
          references TSHOP;
  
      alter table TSHOPCATEGORY 
          add constraint FK_SC_CAT 
          foreign key (CATEGORY_ID) 
          references TCATEGORY;
  
  
      alter table TSHOPTOPSELLER 
          add constraint FKB33456EAE13125FC 
          foreign key (PRODUCT_ID) 
          references TPRODUCT;
  
  
      alter table TSHOPURL 
          add constraint FK_SHOPURL_SHOP 
          foreign key (SHOP_ID) 
          references TSHOP;
  
      alter table TSHOPALIAS
          add constraint FK_SHOPALIAS_SHOP
          foreign key (SHOP_ID)
          references TSHOP;
  
  
      alter table TSHOPWAREHOUSE 
          add constraint FK13C59499F65CA98 
          foreign key (SHOP_ID) 
          references TSHOP;
  
      alter table TSHOPWAREHOUSE 
          add constraint FK13C594991C1544FC 
          foreign key (WAREHOUSE_ID) 
          references TWAREHOUSE;
  
  
      alter table TSKU
          add constraint FK_SKU_PROD
          foreign key (PRODUCT_ID)
          references TPRODUCT;
  
      create index PRODUCT_MCODE on TPRODUCT (MANUFACTURER_CODE);
      create index PRODUCT_MPCODE on TPRODUCT (MANUFACTURER_PART_CODE);
      create index PRODUCT_SCODE on TPRODUCT (SUPPLIER_CODE);
      create index PRODUCT_SCCODE on TPRODUCT (SUPPLIER_CATALOG_CODE);
      create index PRODUCT_PCODE on TPRODUCT (PIM_CODE);
      create index PRODUCT_PDISABLED on TPRODUCT (PIM_DISABLED);
      create index PRODUCT_POUTDATED on TPRODUCT (PIM_OUTDATED);
      create index SKU_MCODE on TSKU (MANUFACTURER_CODE);
      create index SKU_MPCODE on TSKU (MANUFACTURER_PART_CODE);
      create index SKU_SCODE on TSKU (SUPPLIER_CODE);
      create index SKU_SCCODE on TSKU (SUPPLIER_CATALOG_CODE);
      create index SKU_BCODE on TSKU (BARCODE);
  
      alter table TSKUPRICE
          add constraint FK_SP_SHOP 
          foreign key (SHOP_ID) 
          references TSHOP;
  
      create index SKUPRICE_SKUCODE on TSKUPRICE (SKU_CODE);
      create index SKUPRICE_PRICINGPOLICY on TSKUPRICE (PRICINGPOLICY);
      create index SKUPRICE_REF on TSKUPRICE (REF);
  
  
      create index SKUPRICERULE_SHOP_CODE on TSKUPRICERULE (SHOP_CODE);
      create index SKUPRICERULE_CURRENCY on TSKUPRICERULE (CURRENCY);
      create index SKUPRICERULE_ENABLED on TSKUPRICERULE (ENABLED);
  
      alter table TSKUWAREHOUSE 
          add constraint FKAC00F89A1C1544FC 
          foreign key (WAREHOUSE_ID) 
          references TWAREHOUSE;
  
      alter table TSKUWAREHOUSE
          add constraint SKUWAREHOUSE_SKU unique (WAREHOUSE_ID, SKU_CODE);
  
      create index SKUWAREHOUSE_SKUCODE on TSKUWAREHOUSE (SKU_CODE);
  
      alter table TSYSTEMATTRVALUE
          add constraint FK_AV_SYSTEM_SYSTEMID
          foreign key (SYSTEM_ID) 
          references TSYSTEM;
  
      create index AV_SYSTEM_CODE on TSYSTEMATTRVALUE (CODE);
      create index AV_SYSTEM_VAL on TSYSTEMATTRVALUE (INDEXVAL);
  
      create index IMAGE_NAME_IDX on TSEOIMAGE (IMAGE_NAME);
  
      create index PROMO_SHOP_CODE on TPROMOTION (SHOP_CODE);
      create index PROMO_CURRENCY on TPROMOTION (CURRENCY);
      create index PROMO_PTYPE on TPROMOTION (PROMO_TYPE);
      create index PROMO_PACTION on TPROMOTION (PROMO_ACTION);
      create index PROMO_ENABLED on TPROMOTION (ENABLED);
      create index PROMO_ENABLED_FROM on TPROMOTION (ENABLED_FROM);
      create index PROMO_ENABLED_TO on TPROMOTION (ENABLED_TO);
  
  
      alter table TPROMOTIONCOUPON
          add constraint FK_PROMO_COUPON
          foreign key (PROMOTION_ID)
          references TPROMOTION;
  
      alter table TPROMOTIONCOUPONUSAGE
          add constraint FK_ORD_COUPON_USAGE
          foreign key (CUSTOMERORDER_ID)
          references TCUSTOMERORDER on delete cascade;
  
      create index PROMOTIONCOUPONUSAGE_EMAIL on TPROMOTIONCOUPONUSAGE (CUSTOMER_EMAIL);
  
      create index SHOPPINGCARTSTATE_EMAIL on TSHOPPINGCARTSTATE (CUSTOMER_EMAIL);
      create index SHOPPINGCARTSTATE_SHOP on TSHOPPINGCARTSTATE (SHOP_ID);
  
  
      alter table TMAILPART         add constraint FKMAILMAILPART
          foreign key (MAIL_ID)
          references TMAIL;
  
      alter table TMANAGERSHOP
          add constraint FK_MS_SHOP
          foreign key (SHOP_ID)
          references TSHOP;
  
  
      alter table TMANAGERSHOP
          add constraint FK_MS_MANAGER
          foreign key (MANAGER_ID)
          references TMANAGER         on delete cascade;
  
      create index TAX_SHOP_CODE on TTAX (SHOP_CODE);
      create index TAX_CURRENCY on TTAX (CURRENCY);
      create index TAX_PRODUCT_CODE on TTAXCONFIG (PRODUCT_CODE);
      create index TAX_STATE_CODE on TTAXCONFIG (STATE_CODE);
      create index TAX_COUNTRY_CODE on TTAXCONFIG (COUNTRY_CODE);
  
      alter table TTAXCONFIG
          add constraint FK_TAXCFG_TAX
          foreign key (TAX_ID)
          references TTAX on delete cascade;
  
  
      create index I_CRS_SHOP_DISABLED on TCARRIERSHOP (DISABLED);
      create index I_SWE_SHOP_DISABLED on TSHOPWAREHOUSE (DISABLED);
      create index I_CS_SHOP_DISABLED on TCUSTOMERSHOP (DISABLED);
  
      alter table TSHOP
          add constraint FK_SH_MASTER
          foreign key (MASTER_ID)
          references TSHOP;
  
  
      create table HIBERNATE_UNIQUE_KEYS (
           value integer 
      );
  
      insert into HIBERNATE_UNIQUE_KEYS values ( 0 );
  
  
      ALTER TABLE TADDRESS ALTER COLUMN ADDRESS_ID RESTART WITH 100000;
      ALTER TABLE TASSOCIATION ALTER COLUMN ASSOCIATION_ID RESTART WITH 100000;
      ALTER TABLE TATTRIBUTE ALTER COLUMN ATTRIBUTE_ID RESTART WITH 100000;
      ALTER TABLE TATTRIBUTEGROUP ALTER COLUMN ATTRIBUTEGROUP_ID RESTART WITH 100000;
      ALTER TABLE TBRAND ALTER COLUMN BRAND_ID RESTART WITH 100000;
      ALTER TABLE TBRANDATTRVALUE ALTER COLUMN ATTRVALUE_ID RESTART WITH 100000;
      ALTER TABLE TCARRIER ALTER COLUMN CARRIER_ID RESTART WITH 100000;
      ALTER TABLE TCARRIERSLA ALTER COLUMN CARRIERSLA_ID RESTART WITH 100000;
      ALTER TABLE TCARRIERSHOP ALTER COLUMN CARRIERSHOP_ID RESTART WITH 100000;
      ALTER TABLE TCATEGORY ALTER COLUMN CATEGORY_ID RESTART WITH 100000;
      ALTER TABLE TCATEGORYATTRVALUE ALTER COLUMN ATTRVALUE_ID RESTART WITH 100000;
      ALTER TABLE TCONTENT ALTER COLUMN CONTENT_ID RESTART WITH 100000;
      ALTER TABLE TCONTENTATTRVALUE ALTER COLUMN ATTRVALUE_ID RESTART WITH 100000;
      ALTER TABLE TCOUNTRY ALTER COLUMN COUNTRY_ID RESTART WITH 100000;
      ALTER TABLE TCUSTOMER ALTER COLUMN CUSTOMER_ID RESTART WITH 100000;
      ALTER TABLE TCUSTOMERATTRVALUE ALTER COLUMN ATTRVALUE_ID RESTART WITH 100000;
      ALTER TABLE TCUSTOMERORDER ALTER COLUMN CUSTOMERORDER_ID RESTART WITH 100000;
      ALTER TABLE TCUSTOMERORDERDELIVERY ALTER COLUMN CUSTOMERORDERDELIVERY_ID RESTART WITH 100000;
      ALTER TABLE TCUSTOMERORDERDELIVERYDET ALTER COLUMN CUSTOMERORDERDELIVERYDET_ID RESTART WITH 100000;
      ALTER TABLE TCUSTOMERORDERDET ALTER COLUMN CUSTOMERORDERDET_ID RESTART WITH 100000;
      ALTER TABLE TCUSTOMERSHOP ALTER COLUMN CUSTOMERSHOP_ID RESTART WITH 100000;
      ALTER TABLE TCUSTOMERWISHLIST ALTER COLUMN CUSTOMERWISHLIST_ID RESTART WITH 100000;
      ALTER TABLE TPRODUCTOPT ALTER COLUMN PRODUCTOPT_ID RESTART WITH 100000;
      ALTER TABLE TETYPE ALTER COLUMN ETYPE_ID RESTART WITH 100000;
      ALTER TABLE TMAILTEMPLATE ALTER COLUMN MAILTEMPLATE_ID RESTART WITH 100000;
      ALTER TABLE TMAILTEMPLATEGROUP ALTER COLUMN MAILTEMPLATEGROUP_ID RESTART WITH 100000;
      ALTER TABLE TMANAGER ALTER COLUMN MANAGER_ID RESTART WITH 100000;
      ALTER TABLE TMANAGERROLE ALTER COLUMN MANAGERROLE_ID RESTART WITH 100000;
      ALTER TABLE TMANAGERSHOP ALTER COLUMN MANAGERSHOP_ID RESTART WITH 100000;
      ALTER TABLE TPRODTYPEATTRVIEWGROUP ALTER COLUMN PRODTYPEATTRIBUTEGROUP_ID RESTART WITH 100000;
      ALTER TABLE TPRODUCT ALTER COLUMN PRODUCT_ID RESTART WITH 100000;
      ALTER TABLE TPRODUCTASSOCIATION ALTER COLUMN PRODUCTASSOCIATION_ID RESTART WITH 100000;
      ALTER TABLE TPRODUCTATTRVALUE ALTER COLUMN ATTRVALUE_ID RESTART WITH 100000;
      ALTER TABLE TPRODUCTCATEGORY ALTER COLUMN PRODUCTCATEGORY_ID RESTART WITH 100000;
      ALTER TABLE TPRODUCTSKUATTRVALUE ALTER COLUMN ATTRVALUE_ID RESTART WITH 100000;
      ALTER TABLE TPRODUCTTYPE ALTER COLUMN PRODUCTTYPE_ID RESTART WITH 100000;
      ALTER TABLE TPRODUCTTYPEATTR ALTER COLUMN PRODTYPEATTR_ID RESTART WITH 100000;
      ALTER TABLE TROLE ALTER COLUMN ROLE_ID RESTART WITH 100000;
      ALTER TABLE TSEOIMAGE ALTER COLUMN SEOIMAGE_ID RESTART WITH 100000;
      ALTER TABLE TSHOP ALTER COLUMN SHOP_ID RESTART WITH 100000;
      ALTER TABLE TSHOPADVPLACE ALTER COLUMN SHOPADVPLACE_ID RESTART WITH 100000;
      ALTER TABLE TSHOPADVRULES ALTER COLUMN SHOPADVRULES_ID RESTART WITH 100000;
      ALTER TABLE TSHOPATTRVALUE ALTER COLUMN ATTRVALUE_ID RESTART WITH 100000;
      ALTER TABLE TSHOPCATEGORY ALTER COLUMN SHOPCATEGORY_ID RESTART WITH 100000;
      ALTER TABLE TSHOPTOPSELLER ALTER COLUMN SHOPTOPSELLER_ID RESTART WITH 100000;
      ALTER TABLE TSHOPURL ALTER COLUMN STOREURL_ID RESTART WITH 100000;
      ALTER TABLE TSHOPALIAS ALTER COLUMN STOREALIAS_ID RESTART WITH 100000;
      ALTER TABLE TSHOPWAREHOUSE ALTER COLUMN SHOPWAREHOUSE_ID RESTART WITH 100000;
      ALTER TABLE TSKU ALTER COLUMN SKU_ID RESTART WITH 100000;
      ALTER TABLE TSKUPRICE ALTER COLUMN SKUPRICE_ID RESTART WITH 100000;
      ALTER TABLE TSKUPRICERULE ALTER COLUMN SKUPRICERULE_ID RESTART WITH 100000;
      ALTER TABLE TSKUWAREHOUSE ALTER COLUMN SKUWAREHOUSE_ID RESTART WITH 100000;
      ALTER TABLE TSTATE ALTER COLUMN STATE_ID RESTART WITH 100000;
      ALTER TABLE TSYSTEM ALTER COLUMN SYSTEM_ID RESTART WITH 100000;
      ALTER TABLE TSYSTEMATTRVALUE ALTER COLUMN ATTRVALUE_ID RESTART WITH 100000;
      ALTER TABLE TWAREHOUSE ALTER COLUMN WAREHOUSE_ID RESTART WITH 100000;
      ALTER TABLE TPROMOTION ALTER COLUMN PROMOTION_ID RESTART WITH 100000;
      ALTER TABLE TPROMOTIONCOUPON ALTER COLUMN PROMOTIONCOUPON_ID RESTART WITH 100000;
      ALTER TABLE TPROMOTIONCOUPONUSAGE ALTER COLUMN PROMOTIONCOUPONUSAGE_ID RESTART WITH 100000;
      ALTER TABLE TMAIL ALTER COLUMN MAIL_ID RESTART WITH 100000;
      ALTER TABLE TMAILPART ALTER COLUMN MAILPART_ID RESTART WITH 100000;
      ALTER TABLE TSHOPPINGCARTSTATE ALTER COLUMN TSHOPPINGCARTSTATE_ID RESTART WITH 100000;
      ALTER TABLE TTAX ALTER COLUMN TAX_ID RESTART WITH 100000;
      ALTER TABLE TTAXCONFIG ALTER COLUMN TAXCONFIG_ID RESTART WITH 100000;
      ALTER TABLE TDATAGROUP ALTER COLUMN DATAGROUP_ID RESTART WITH 100000;
      ALTER TABLE TDATADESCRIPTOR ALTER COLUMN DATADESCRIPTOR_ID RESTART WITH 100000;
  
  