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

(-)a/installer/data/mysql/atomicupdate/bug_19066_add_accountlines_branchcode.perl (+1 lines)
Lines 3-8 if( CheckVersion( $DBversion ) ) { Link Here
3
3
4
    if( !column_exists( 'accountlines', 'branchcode' ) ) {
4
    if( !column_exists( 'accountlines', 'branchcode' ) ) {
5
        $dbh->do("ALTER TABLE accountlines ADD branchcode VARCHAR( 10 ) NULL DEFAULT NULL AFTER manager_id");
5
        $dbh->do("ALTER TABLE accountlines ADD branchcode VARCHAR( 10 ) NULL DEFAULT NULL AFTER manager_id");
6
        $dbh->do("ALTER TABLE accountlines ADD CONSTRAINT accountlines_ibfk_branches FOREIGN KEY (branchcode) REFERENCES branches (branchcode) ON DELETE SET NULL ON UPDATE CASCADE");
6
    }
7
    }
7
8
8
    # Always end with this (adjust the bug info)
9
    # Always end with this (adjust the bug info)
(-)a/installer/data/mysql/kohastructure.sql (-2 / +3 lines)
Lines 2723-2730 CREATE TABLE `accountlines` ( Link Here
2723
  KEY `acctsborridx` (`borrowernumber`),
2723
  KEY `acctsborridx` (`borrowernumber`),
2724
  KEY `timeidx` (`timestamp`),
2724
  KEY `timeidx` (`timestamp`),
2725
  KEY `itemnumber` (`itemnumber`),
2725
  KEY `itemnumber` (`itemnumber`),
2726
  KEY `branchcode` (`branchcode`),
2726
  CONSTRAINT `accountlines_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE,
2727
  CONSTRAINT `accountlines_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE,
2727
  CONSTRAINT `accountlines_ibfk_2` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE SET NULL ON UPDATE SET NULL
2728
  CONSTRAINT `accountlines_ibfk_2` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE SET NULL ON UPDATE SET NULL,
2729
  CONSTRAINT `accountlines_ibfk_branches` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`) ON DELETE SET NULL ON UPDATE SET CASCADE
2728
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2730
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2729
2731
2730
--
2732
--
2731
- 

Return to bug 19066