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

(-)a/Koha.pm (-1 / +1 lines)
Lines 29-35 use vars qw{ $VERSION }; Link Here
29
# - #4 : the developer version. The 4th number is the database subversion.
29
# - #4 : the developer version. The 4th number is the database subversion.
30
#        used by developers when the database changes. updatedatabase take care of the changes itself
30
#        used by developers when the database changes. updatedatabase take care of the changes itself
31
#        and is automatically called by Auth.pm when needed.
31
#        and is automatically called by Auth.pm when needed.
32
$VERSION = "20.06.00.032";
32
$VERSION = "20.06.00.033";
33
33
34
sub version {
34
sub version {
35
    return $VERSION;
35
    return $VERSION;
(-)a/installer/data/mysql/atomicupdate/bug_21066.perl (-16 lines)
Lines 1-16 Link Here
1
$DBversion = 'XXX'; # will be replaced by the RM
2
if( CheckVersion( $DBversion ) ) {
3
    if( column_exists( 'opac_news', 'timestamp' ) ) {
4
        $dbh->do(q|
5
            ALTER TABLE opac_news
6
            CHANGE COLUMN timestamp publicationdate date DEFAULT NULL
7
        |);
8
    }
9
    if( !column_exists( 'opac_news', 'updated_on' ) ) {
10
        $dbh->do(q|
11
            ALTER TABLE opac_news
12
            ADD COLUMN updated_on timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP AFTER publicationdate
13
        |);
14
    }
15
    NewVersion( $DBversion, 21066, "Update table opac_news");
16
}
(-)a/installer/data/mysql/atomicupdate/bug_21066b.perl (-9 lines)
Lines 1-9 Link Here
1
$DBversion = 'XXX'; # will be replaced by the RM
2
if( CheckVersion( $DBversion ) ) {
3
    $dbh->do(q|
4
        UPDATE letter
5
        SET content = REPLACE(content,?,?)
6
        WHERE content LIKE ?
7
    |, undef, 'opac_news.timestamp', 'opac_news.publicationdate', '%opac_news.timestamp%' );
8
    NewVersion( $DBversion, 21066, "Replace timestamp references in letters table");
9
}
(-)a/installer/data/mysql/updatedatabase.pl (-1 / +24 lines)
Lines 22725-22730 if( CheckVersion( $DBversion ) ) { Link Here
22725
    NewVersion( $DBversion, 19889, "Add exclude_from_local_holds_priority column to items, deleteditems and categories tables");
22725
    NewVersion( $DBversion, 19889, "Add exclude_from_local_holds_priority column to items, deleteditems and categories tables");
22726
}
22726
}
22727
22727
22728
$DBversion = '20.06.00.033';
22729
if( CheckVersion( $DBversion ) ) {
22730
    if( column_exists( 'opac_news', 'timestamp' ) ) {
22731
        $dbh->do(q|
22732
            ALTER TABLE opac_news
22733
            CHANGE COLUMN timestamp publicationdate date DEFAULT NULL
22734
        |);
22735
    }
22736
    if( !column_exists( 'opac_news', 'updated_on' ) ) {
22737
        $dbh->do(q|
22738
            ALTER TABLE opac_news
22739
            ADD COLUMN updated_on timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP AFTER publicationdate
22740
        |);
22741
    }
22742
22743
    $dbh->do(q|
22744
        UPDATE letter
22745
        SET content = REPLACE(content,?,?)
22746
        WHERE content LIKE ?
22747
    |, undef, 'opac_news.timestamp', 'opac_news.publicationdate', '%opac_news.timestamp%' );
22748
22749
    NewVersion( $DBversion, 21066, ["Update table opac_news", "Replace timestamp references in letters table"] );
22750
}
22751
22728
# SEE bug 13068
22752
# SEE bug 13068
22729
# if there is anything in the atomicupdate, read and execute it.
22753
# if there is anything in the atomicupdate, read and execute it.
22730
my $update_dir = C4::Context->config('intranetdir') . '/installer/data/mysql/atomicupdate/';
22754
my $update_dir = C4::Context->config('intranetdir') . '/installer/data/mysql/atomicupdate/';
22731
- 

Return to bug 21066