Commit 46b7d5e4 authored by Kyle M Hall's avatar Kyle M Hall Committed by Koha instance kohadev-koha

Bug 6906 - DBRev 16.06.00.008

Signed-off-by: default avatarKyle M Hall <[email protected]>
parent ffc4adcf
......@@ -29,7 +29,7 @@ use vars qw{ $VERSION };
# - #4 : the developer version. The 4th number is the database subversion.
# used by developers when the database changes. updatedatabase take care of the changes itself
# and is automatically called by Auth.pm when needed.
$VERSION = "16.06.00.007";
$VERSION = "16.06.00.008";
sub version {
return $VERSION;
......
......@@ -407,6 +407,13 @@ __PACKAGE__->table("borrowers");
default_value: 0
is_nullable: 0
=head2 checkprevcheckout
data_type: 'varchar'
default_value: 'inherit'
is_nullable: 0
size: 7
=head2 updated_on
data_type: 'timestamp'
......@@ -583,6 +590,13 @@ __PACKAGE__->add_columns(
{ data_type => "integer", default_value => 1, is_nullable => 0 },
"privacy_guarantor_checkouts",
{ data_type => "tinyint", default_value => 0, is_nullable => 0 },
"checkprevcheckout",
{
data_type => "varchar",
default_value => "inherit",
is_nullable => 0,
size => 7,
},
"updated_on",
{
data_type => "timestamp",
......@@ -1218,8 +1232,8 @@ Composing rels: L</aqorder_users> -> ordernumber
__PACKAGE__->many_to_many("ordernumbers", "aqorder_users", "ordernumber");
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-06-14 16:35:12
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Luq1YVrOwtdDvSDWgWNGUg
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-07-08 13:37:33
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:GiEcKBFRhzHwXPekj6fSPg
__PACKAGE__->belongs_to(
"guarantor",
......
......@@ -116,6 +116,13 @@ __PACKAGE__->table("categories");
extra: {list => ["default","never","forever"]}
is_nullable: 0
=head2 checkprevcheckout
data_type: 'varchar'
default_value: 'inherit'
is_nullable: 0
size: 7
=cut
__PACKAGE__->add_columns(
......@@ -161,6 +168,13 @@ __PACKAGE__->add_columns(
extra => { list => ["default", "never", "forever"] },
is_nullable => 0,
},
"checkprevcheckout",
{
data_type => "varchar",
default_value => "inherit",
is_nullable => 0,
size => 7,
},
);
=head1 PRIMARY KEY
......@@ -253,8 +267,8 @@ __PACKAGE__->might_have(
);
# Created by DBIx::Class::Schema::Loader v0.07039 @ 2014-08-18 13:01:05
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:T4i7vp1kAZFXy6DiV1dqyw
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-07-08 13:37:33
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:LH3DdDDYXaGsNsILAUZzng
# You can replace this text with custom content, and it will be preserved on regeneration
......
......@@ -404,6 +404,13 @@ __PACKAGE__->table("deletedborrowers");
default_value: 0
is_nullable: 0
=head2 checkprevcheckout
data_type: 'varchar'
default_value: 'inherit'
is_nullable: 0
size: 7
=head2 updated_on
data_type: 'timestamp'
......@@ -568,6 +575,13 @@ __PACKAGE__->add_columns(
{ data_type => "integer", default_value => 1, is_nullable => 0 },
"privacy_guarantor_checkouts",
{ data_type => "tinyint", default_value => 0, is_nullable => 0 },
"checkprevcheckout",
{
data_type => "varchar",
default_value => "inherit",
is_nullable => 0,
size => 7,
},
"updated_on",
{
data_type => "timestamp",
......@@ -578,8 +592,8 @@ __PACKAGE__->add_columns(
);
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-06-14 16:35:12
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:wmWyqDcbofgVoIbvRy7j6w
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-07-08 13:37:33
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Cunir7NU2+WyAmwi3U7mvA
# You can replace this text with custom code or comments, and it will be preserved on regeneration
......
INSERT INTO systempreferences (variable,value,options,explanation,type)
VALUES('CheckPrevCheckout','hardno','hardyes|softyes|softno|hardno','By default, for every item checked out, should we warn if the patron has checked out that item in the past?','Choice');
ALTER TABLE categories
ADD COLUMN `checkprevcheckout` varchar(7) NOT NULL default 'inherit'
AFTER `default_privacy`;
ALTER TABLE borrowers
ADD COLUMN `checkprevcheckout` varchar(7) NOT NULL default 'inherit'
AFTER `privacy_guarantor_checkouts`;
ALTER TABLE deletedborrowers
ADD COLUMN `checkprevcheckout` varchar(7) NOT NULL default 'inherit'
AFTER `privacy_guarantor_checkouts`;
......@@ -12726,6 +12726,32 @@ if ( CheckVersion($DBversion) ) {
SetVersion($DBversion);
}
$DBversion = '16.06.00.008';
if ( CheckVersion($DBversion) ) {
$dbh->do(q{
INSERT INTO systempreferences (variable,value,options,explanation,type)
VALUES('CheckPrevCheckout','hardno','hardyes|softyes|softno|hardno','By default, for every item checked out, should we warn if the patron has checked out that item in the past?','Choice');
});
$dbh->do(q{
ALTER TABLE categories
ADD COLUMN `checkprevcheckout` varchar(7) NOT NULL default 'inherit'
AFTER `default_privacy`;
});
$dbh->do(q{
ALTER TABLE borrowers
ADD COLUMN `checkprevcheckout` varchar(7) NOT NULL default 'inherit'
AFTER `privacy_guarantor_checkouts`;
});
$dbh->do(q{
ALTER TABLE deletedborrowers
ADD COLUMN `checkprevcheckout` varchar(7) NOT NULL default 'inherit'
AFTER `privacy_guarantor_checkouts`;
});
print "Upgrade to $DBversion done (Bug 6906 - show 'Borrower has previously issued $ITEM' alert on checkout)\n";
SetVersion($DBversion);
}
# DEVELOPER PROCESS, search for anything to execute in the db_update directory
# SEE bug 13068
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment