| 
      
            Lines 3198-3205
          CREATE TABLE `aqorders` ( -- information related to the basket line items
      
      
        Link Here
      
     | 
  
        
          | 3198 | 
            `sort1_authcat` varchar(10) default NULL,  | 
          3198 | 
            `sort1_authcat` varchar(10) default NULL,  | 
        
        
          | 3199 | 
            `sort2_authcat` varchar(10) default NULL,  | 
          3199 | 
            `sort2_authcat` varchar(10) default NULL,  | 
        
        
          | 3200 | 
            `uncertainprice` tinyint(1), -- was this price uncertain (1 for yes, 0 for no)  | 
          3200 | 
            `uncertainprice` tinyint(1), -- was this price uncertain (1 for yes, 0 for no)  | 
        
            
              | 3201 | 
                `claims_count` int(11) default 0, -- count of claim letters generated  | 
               | 
               | 
            
            
              | 3202 | 
                `claimed_date` date default NULL, -- last date a claim was generated  | 
            
        
          | 3203 | 
            `subscriptionid` int(11) default NULL, -- links this order line to a subscription (subscription.subscriptionid)  | 
          3201 | 
            `subscriptionid` int(11) default NULL, -- links this order line to a subscription (subscription.subscriptionid)  | 
        
        
          | 3204 | 
            parent_ordernumber int(11) default NULL, -- ordernumber of parent order line, or same as ordernumber if no parent  | 
          3202 | 
            parent_ordernumber int(11) default NULL, -- ordernumber of parent order line, or same as ordernumber if no parent  | 
        
        
          | 3205 | 
            `orderstatus` varchar(16) default 'new', -- the current status for this line item. Can be 'new', 'ordered', 'partial', 'complete' or 'cancelled'  | 
          3203 | 
            `orderstatus` varchar(16) default 'new', -- the current status for this line item. Can be 'new', 'ordered', 'partial', 'complete' or 'cancelled'  | 
        
  
    | 
      
            Lines 3264-3269
          CREATE TABLE aqorders_transfers (
      
      
        Link Here
      
     | 
  
        
          | 3264 | 
            CONSTRAINT aqorders_transfers_ordernumber_to FOREIGN KEY (ordernumber_to) REFERENCES aqorders (ordernumber) ON DELETE SET NULL ON UPDATE CASCADE  | 
          3262 | 
            CONSTRAINT aqorders_transfers_ordernumber_to FOREIGN KEY (ordernumber_to) REFERENCES aqorders (ordernumber) ON DELETE SET NULL ON UPDATE CASCADE  | 
        
        
          | 3265 | 
          ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;  | 
          3263 | 
          ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;  | 
        
        
          | 3266 | 
           | 
          3264 | 
           | 
        
            
               | 
               | 
              3265 | 
              --  | 
            
            
              | 3266 | 
              -- Table structure for table aqorders_claims  | 
            
            
              | 3267 | 
              --  | 
            
            
              | 3268 | 
               | 
            
            
              | 3269 | 
              DROP TABLE IF EXISTS aqorders_claims;  | 
            
            
              | 3270 | 
              CREATE TABLE aqorders_claims (  | 
            
            
              | 3271 | 
                  id int(11) AUTO_INCREMENT,  | 
            
            
              | 3272 | 
                  ordernumber INT(11) NOT NULL,  | 
            
            
              | 3273 | 
                  claimed_on TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,  | 
            
            
              | 3274 | 
                  PRIMARY KEY (id),  | 
            
            
              | 3275 | 
                  CONSTRAINT aqorders_claims_ibfk_1 FOREIGN KEY (ordernumber) REFERENCES aqorders (ordernumber) ON DELETE CASCADE ON UPDATE CASCADE  | 
            
            
              | 3276 | 
              ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_unicode_ci;  | 
            
        
          | 3267 | 
           | 
          3277 | 
           | 
        
        
          | 3268 | 
          --  | 
          3278 | 
          --  | 
        
        
          | 3269 | 
          -- Table structure for table `transport_cost`  | 
          3279 | 
          -- Table structure for table `transport_cost`  | 
        
            
              | 3270 | 
              -   | 
               | 
               |