View | Details | Raw Unified | Return to bug 20772
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 = "18.06.00.040";
32
$VERSION = "18.06.00.041";
33
33
34
sub version {
34
sub version {
35
    return $VERSION;
35
    return $VERSION;
(-)a/Koha/Schema/Result/Illrequest.pm (-2 / +10 lines)
Lines 97-102 __PACKAGE__->table("illrequests"); Link Here
97
  is_nullable: 1
97
  is_nullable: 1
98
  size: 20
98
  size: 20
99
99
100
=head2 price_paid
101
102
  data_type: 'varchar'
103
  is_nullable: 1
104
  size: 20
105
100
=head2 notesopac
106
=head2 notesopac
101
107
102
  data_type: 'mediumtext'
108
  data_type: 'mediumtext'
Lines 156-161 __PACKAGE__->add_columns( Link Here
156
  { data_type => "varchar", is_nullable => 1, size => 500 },
162
  { data_type => "varchar", is_nullable => 1, size => 500 },
157
  "cost",
163
  "cost",
158
  { data_type => "varchar", is_nullable => 1, size => 20 },
164
  { data_type => "varchar", is_nullable => 1, size => 20 },
165
  "price_paid",
166
  { data_type => "varchar", is_nullable => 1, size => 20 },
159
  "notesopac",
167
  "notesopac",
160
  { data_type => "mediumtext", is_nullable => 1 },
168
  { data_type => "mediumtext", is_nullable => 1 },
161
  "notesstaff",
169
  "notesstaff",
Lines 231-238 __PACKAGE__->has_many( Link Here
231
);
239
);
232
240
233
241
234
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:53
242
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-10-01 02:46:41
235
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Rh8DSs3xj3KRmyd7WNGDAg
243
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:MMKr4JAAAsNnFcQn9SPTcw
236
244
237
245
238
# You can replace this text with custom code or comments, and it will be preserved on regeneration
246
# You can replace this text with custom code or comments, and it will be preserved on regeneration
(-)a/Koha/Schema/Result/Illrequestattribute.pm (-2 / +10 lines)
Lines 41-46 __PACKAGE__->table("illrequestattributes"); Link Here
41
  data_type: 'mediumtext'
41
  data_type: 'mediumtext'
42
  is_nullable: 0
42
  is_nullable: 0
43
43
44
=head2 readonly
45
46
  data_type: 'tinyint'
47
  default_value: 1
48
  is_nullable: 0
49
44
=cut
50
=cut
45
51
46
__PACKAGE__->add_columns(
52
__PACKAGE__->add_columns(
Lines 55-60 __PACKAGE__->add_columns( Link Here
55
  { data_type => "varchar", is_nullable => 0, size => 200 },
61
  { data_type => "varchar", is_nullable => 0, size => 200 },
56
  "value",
62
  "value",
57
  { data_type => "mediumtext", is_nullable => 0 },
63
  { data_type => "mediumtext", is_nullable => 0 },
64
  "readonly",
65
  { data_type => "tinyint", default_value => 1, is_nullable => 0 },
58
);
66
);
59
67
60
=head1 PRIMARY KEY
68
=head1 PRIMARY KEY
Lines 89-96 __PACKAGE__->belongs_to( Link Here
89
);
97
);
90
98
91
99
92
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:53
100
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2018-05-17 09:17:53
93
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:X9SxZP1PGXTwDJ6lUkx8Fg
101
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:sFY1giVMz5AkXCPidhyGjw
94
102
95
103
96
# You can replace this text with custom code or comments, and it will be preserved on regeneration
104
# You can replace this text with custom code or comments, and it will be preserved on regeneration
(-)a/installer/data/mysql/atomicupdate/bug_20772-add-price_paid_column_to_illrequests.perl (-10 lines)
Lines 1-10 Link Here
1
$DBversion = 'XXX';  # will be replaced by the RM
2
if( CheckVersion( $DBversion ) ) {
3
4
     if( !column_exists( 'illrequests', 'price_paid' ) ) {
5
        $dbh->do( "ALTER TABLE illrequests ADD COLUMN price_paid varchar(20) DEFAULT NULL AFTER 'cost'" );
6
     }
7
8
    SetVersion( $DBversion );
9
    print "Upgrade to $DBversion done (Bug 20772 - Add illrequest.price_paid column)\n";
10
}
(-)a/installer/data/mysql/atomicupdate/bug_20772-add-readonly-flag-to-illrequestattributes.perl (-11 lines)
Lines 1-11 Link Here
1
$DBversion = 'XXX';  # will be replaced by the RM
2
if( CheckVersion( $DBversion ) ) {
3
4
     if( !column_exists( 'illrequestattributes', 'readonly' ) ) {
5
        $dbh->do( "ALTER TABLE illrequestattributes ADD COLUMN readonly tinyint(1) NOT NULL DEFAULT 1 AFTER 'value'" );
6
        $dbh->do( "UPDATE illrequestattributes SET readonly = 1" );
7
     }
8
9
    SetVersion( $DBversion );
10
    print "Upgrade to $DBversion done (Bug 20772 - Add illrequestattributes.readonly column)\n";
11
}
(-)a/installer/data/mysql/updatedatabase.pl (-1 / +26 lines)
Lines 16644-16649 if( CheckVersion( $DBversion ) ) { Link Here
16644
    SetVersion( $DBversion );
16644
    SetVersion( $DBversion );
16645
}
16645
}
16646
16646
16647
$DBversion = '18.06.00.041';
16648
if( CheckVersion( $DBversion ) ) {
16649
16650
     if( !column_exists( 'illrequests', 'price_paid' ) ) {
16651
        $dbh->do(q{
16652
            ALTER TABLE illrequests
16653
                ADD COLUMN price_paid varchar(20) DEFAULT NULL
16654
                AFTER cost
16655
        });
16656
     }
16657
16658
     if( !column_exists( 'illrequestattributes', 'readonly' ) ) {
16659
        $dbh->do(q{
16660
            ALTER TABLE illrequestattributes
16661
                ADD COLUMN readonly tinyint(1) NOT NULL DEFAULT 1
16662
                AFTER value
16663
        });
16664
        $dbh->do(q{
16665
            UPDATE illrequestattributes SET readonly = 1
16666
        });
16667
     }
16668
16669
    SetVersion( $DBversion );
16670
    print "Upgrade to $DBversion done (Bug 20772 - Add illrequestattributes.readonly and illrequest.price_paid columns)\n";
16671
}
16672
16647
# SEE bug 13068
16673
# SEE bug 13068
16648
# if there is anything in the atomicupdate, read and execute it.
16674
# if there is anything in the atomicupdate, read and execute it.
16649
16675
16650
- 

Return to bug 20772