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

(-)a/Koha/Library/Group.pm (-3 / +1 lines)
Lines 118-126 sub libraries_not_direct_children { Link Here
118
sub store {
118
sub store {
119
    my ($self) = @_;
119
    my ($self) = @_;
120
120
121
    my $now = dt_from_string;
121
    $self->created_on( dt_from_string() ) unless $self->in_storage();
122
    $self->updated_on($now);
123
    $self->created_on($now) unless $self->in_storage();
124
122
125
    return $self->SUPER::store(@_);
123
    return $self->SUPER::store(@_);
126
}
124
}
(-)a/installer/data/mysql/atomicupdate/library_groups.sql (-3 / +2 lines)
Lines 4-11 CREATE TABLE library_groups ( Link Here
4
    branchcode VARCHAR(10) NULL DEFAULT NULL, -- The branchcode of a branch belonging to the parent group
4
    branchcode VARCHAR(10) NULL DEFAULT NULL, -- The branchcode of a branch belonging to the parent group
5
    title VARCHAR(100) NULL DEFAULT NULL,     -- Short description of the goup
5
    title VARCHAR(100) NULL DEFAULT NULL,     -- Short description of the goup
6
    description TEXT NULL DEFAULT NULL,    -- Longer explanation of the group, if necessary
6
    description TEXT NULL DEFAULT NULL,    -- Longer explanation of the group, if necessary
7
    created_on DATETIME NOT NULL,          -- Date and time of creation
7
    created_on TIMESTAMP NULL,             -- Date and time of creation
8
    updated_on DATETIME NULL DEFAULT NULL, -- Date and time of last
8
    updated_on TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- Date and time of last
9
    PRIMARY KEY id ( id ),
9
    PRIMARY KEY id ( id ),
10
    FOREIGN KEY (parent_id) REFERENCES library_groups(id) ON UPDATE CASCADE ON DELETE CASCADE,
10
    FOREIGN KEY (parent_id) REFERENCES library_groups(id) ON UPDATE CASCADE ON DELETE CASCADE,
11
    FOREIGN KEY (branchcode) REFERENCES branches(branchcode) ON UPDATE CASCADE ON DELETE CASCADE
11
    FOREIGN KEY (branchcode) REFERENCES branches(branchcode) ON UPDATE CASCADE ON DELETE CASCADE
12
- 

Return to bug 15707