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

(-)a/Koha/Schema/Result/Suggestion.pm (-1 / +3 lines)
Lines 479-484 __PACKAGE__->belongs_to( Link Here
479
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-11-14 15:44:38
479
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-11-14 15:44:38
480
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:qZuiiZgd+ry97OSngYckSA
480
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:qZuiiZgd+ry97OSngYckSA
481
481
482
__PACKAGE__->add_columns(
483
    '+archived' => { is_boolean => 1 },
484
);
482
485
483
# You can replace this text with custom content, and it will be preserved on regeneration
484
1;
486
1;
(-)a/installer/data/mysql/atomicupdate/bug_22784.perl (+11 lines)
Line 0 Link Here
1
$DBversion = 'XXX'; # will be replaced by the RM
2
if( CheckVersion( $DBversion ) ) {
3
    if( !column_exists( 'suggestions', 'archived' ) ) {
4
        $dbh->do(q|
5
            ALTER TABLE suggestions ADD COLUMN archived INT(1) NOT NULL DEFAULT 0 AFTER `STATUS`;
6
        |);
7
    }
8
9
    SetVersion( $DBversion );
10
    print "Upgrade to $DBversion done (Bug 22784 - Add a new suggestions.archived column)\n";
11
}
(-)a/installer/data/mysql/kohastructure.sql (-1 / +1 lines)
Lines 3029-3034 CREATE TABLE `suggestions` ( -- purchase suggestions Link Here
3029
   lastmodificationby INT(11) default NULL, -- borrowernumber for the librarian who edit the suggestion for the last time
3029
   lastmodificationby INT(11) default NULL, -- borrowernumber for the librarian who edit the suggestion for the last time
3030
   lastmodificationdate date default NULL, -- date of the last modification
3030
   lastmodificationdate date default NULL, -- date of the last modification
3031
  `STATUS` varchar(10) NOT NULL default '', -- suggestion status (ASKED, CHECKED, ACCEPTED, or REJECTED)
3031
  `STATUS` varchar(10) NOT NULL default '', -- suggestion status (ASKED, CHECKED, ACCEPTED, or REJECTED)
3032
  `archived` INT(1) NOT NULL DEFAULT 0, -- is the suggestion archived?
3032
  `note` LONGTEXT, -- note entered on the suggestion
3033
  `note` LONGTEXT, -- note entered on the suggestion
3033
  `author` varchar(80) default NULL, -- author of the suggested item
3034
  `author` varchar(80) default NULL, -- author of the suggested item
3034
  `title` varchar(255) default NULL, -- title of the suggested item
3035
  `title` varchar(255) default NULL, -- title of the suggested item
3035
- 

Return to bug 22784