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

(-)a/installer/data/mysql/atomicupdate/bug_30291_-_rename_recalls_columns.pl (-2 / +1 lines)
Lines 7-14 return { Link Here
7
        my ($args) = @_;
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
8
        my ($dbh, $out) = @$args{qw(dbh out)};
9
9
10
        if( TableExists( 'recalls' ) and column_exists( 'recalls', 'recall_id' ) ) {
10
        if( TableExists( 'recalls' ) and column_exists( 'recalls', 'borrowernumber' ) ) {
11
            $dbh->do(q{ ALTER TABLE recalls CHANGE COLUMN recall_id id int(11) NOT NULL AUTO_INCREMENT });
12
            $dbh->do(q{ ALTER TABLE recalls CHANGE COLUMN borrowernumber patron_id int(11) NOT NULL DEFAULT 0 });
11
            $dbh->do(q{ ALTER TABLE recalls CHANGE COLUMN borrowernumber patron_id int(11) NOT NULL DEFAULT 0 });
13
            $dbh->do(q{ ALTER TABLE recalls CHANGE COLUMN recalldate created_date datetime DEFAULT NULL });
12
            $dbh->do(q{ ALTER TABLE recalls CHANGE COLUMN recalldate created_date datetime DEFAULT NULL });
14
            $dbh->do(q{ ALTER TABLE recalls CHANGE COLUMN biblionumber biblio_id int(11) NOT NULL DEFAULT 0 });
13
            $dbh->do(q{ ALTER TABLE recalls CHANGE COLUMN biblionumber biblio_id int(11) NOT NULL DEFAULT 0 });
(-)a/installer/data/mysql/kohastructure.sql (-3 / +2 lines)
Lines 4288-4294 CREATE TABLE `ratings` ( Link Here
4288
4288
4289
DROP TABLE IF EXISTS recalls;
4289
DROP TABLE IF EXISTS recalls;
4290
CREATE TABLE recalls (
4290
CREATE TABLE recalls (
4291
    id int(11) NOT NULL AUTO_INCREMENT COMMENT "Unique identifier for this recall",
4291
    recall_id int(11) NOT NULL AUTO_INCREMENT COMMENT "Unique identifier for this recall",
4292
    patron_id int(11) NOT NULL DEFAULT 0 COMMENT "Identifier for patron who requested recall",
4292
    patron_id int(11) NOT NULL DEFAULT 0 COMMENT "Identifier for patron who requested recall",
4293
    created_date datetime DEFAULT NULL COMMENT "Date the recall was requested",
4293
    created_date datetime DEFAULT NULL COMMENT "Date the recall was requested",
4294
    biblio_id int(11) NOT NULL DEFAULT 0 COMMENT "Identifier for bibliographic record that has been recalled",
4294
    biblio_id int(11) NOT NULL DEFAULT 0 COMMENT "Identifier for bibliographic record that has been recalled",
Lines 4303-4309 CREATE TABLE recalls ( Link Here
4303
    expiration_date datetime DEFAULT NULL COMMENT "Date recall is no longer required, or date recall will expire after waiting on shelf for pickup",
4303
    expiration_date datetime DEFAULT NULL COMMENT "Date recall is no longer required, or date recall will expire after waiting on shelf for pickup",
4304
    completed TINYINT(1) NOT NULL DEFAULT 0 COMMENT "Flag if recall is old and no longer active, i.e. expired, cancelled or completed",
4304
    completed TINYINT(1) NOT NULL DEFAULT 0 COMMENT "Flag if recall is old and no longer active, i.e. expired, cancelled or completed",
4305
    item_level TINYINT(1) NOT NULL DEFAULT 0 COMMENT "Flag if recall is for a specific item",
4305
    item_level TINYINT(1) NOT NULL DEFAULT 0 COMMENT "Flag if recall is for a specific item",
4306
    PRIMARY KEY (id),
4306
    PRIMARY KEY (recall_id),
4307
    KEY recalls_ibfk_1 (patron_id),
4307
    KEY recalls_ibfk_1 (patron_id),
4308
    KEY recalls_ibfk_2 (biblio_id),
4308
    KEY recalls_ibfk_2 (biblio_id),
4309
    KEY recalls_ibfk_3 (item_id),
4309
    KEY recalls_ibfk_3 (item_id),
4310
- 

Return to bug 30291