View | Details | Raw Unified | Return to bug 23995
Collapse All | Expand All

(-)a/installer/data/mysql/kohastructure.sql (-4 / +1 lines)
Lines 2711-2718 CREATE TABLE `accountlines` ( Link Here
2711
  CONSTRAINT `accountlines_ibfk_branches` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`) ON DELETE SET NULL ON UPDATE CASCADE,
2711
  CONSTRAINT `accountlines_ibfk_branches` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`) ON DELETE SET NULL ON UPDATE CASCADE,
2712
  CONSTRAINT `accountlines_ibfk_registers` FOREIGN KEY (`register_id`) REFERENCES `cash_registers` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
2712
  CONSTRAINT `accountlines_ibfk_registers` FOREIGN KEY (`register_id`) REFERENCES `cash_registers` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
2713
  CONSTRAINT `accountlines_ibfk_credit_type` FOREIGN KEY (`credit_type_code`) REFERENCES `account_credit_types` (`code`) ON DELETE RESTRICT ON UPDATE CASCADE,
2713
  CONSTRAINT `accountlines_ibfk_credit_type` FOREIGN KEY (`credit_type_code`) REFERENCES `account_credit_types` (`code`) ON DELETE RESTRICT ON UPDATE CASCADE,
2714
  CONSTRAINT `accountlines_ibfk_debit_type` FOREIGN KEY (`debit_type_code`) REFERENCES `account_debit_types` (`code`) ON DELETE RESTRICT ON UPDATE CASCADE,
2714
  CONSTRAINT `accountlines_ibfk_debit_type` FOREIGN KEY (`debit_type_code`) REFERENCES `account_debit_types` (`code`) ON DELETE RESTRICT ON UPDATE CASCADE
2715
  CONSTRAINT `accountlines_check_type` CHECK (`credit_type_code` IS NOT NULL OR `debit_type_code` IS NOT NULL)
2716
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2715
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2717
2716
2718
--
2717
--
Lines 3289-3295 CREATE TABLE transport_cost ( Link Here
3289
      tobranch varchar(10) NOT NULL,
3288
      tobranch varchar(10) NOT NULL,
3290
      cost decimal(6,2) NOT NULL,
3289
      cost decimal(6,2) NOT NULL,
3291
      disable_transfer tinyint(1) NOT NULL DEFAULT 0,
3290
      disable_transfer tinyint(1) NOT NULL DEFAULT 0,
3292
      CHECK ( frombranch <> tobranch ), -- a dud check, mysql does not support that
3293
      PRIMARY KEY (frombranch, tobranch),
3291
      PRIMARY KEY (frombranch, tobranch),
3294
      CONSTRAINT transport_cost_ibfk_1 FOREIGN KEY (frombranch) REFERENCES branches (branchcode) ON DELETE CASCADE ON UPDATE CASCADE,
3292
      CONSTRAINT transport_cost_ibfk_1 FOREIGN KEY (frombranch) REFERENCES branches (branchcode) ON DELETE CASCADE ON UPDATE CASCADE,
3295
      CONSTRAINT transport_cost_ibfk_2 FOREIGN KEY (tobranch) REFERENCES branches (`branchcode`) ON DELETE CASCADE ON UPDATE CASCADE
3293
      CONSTRAINT transport_cost_ibfk_2 FOREIGN KEY (tobranch) REFERENCES branches (`branchcode`) ON DELETE CASCADE ON UPDATE CASCADE
3296
- 

Return to bug 23995