Bug 17702: DBRev 19.12.00.029

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Martin Renvoize 2020-02-20 14:51:02 +00:00
parent 654fbfd169
commit 4afbd08968
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
4 changed files with 21 additions and 12 deletions

View File

@ -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 = "19.12.00.028";
$VERSION = "19.12.00.029";
sub version {
return $VERSION;

View File

@ -47,6 +47,12 @@ __PACKAGE__->table("account_credit_types");
default_value: 0
is_nullable: 0
=head2 archived
data_type: 'tinyint'
default_value: 0
is_nullable: 0
=cut
__PACKAGE__->add_columns(
@ -58,6 +64,8 @@ __PACKAGE__->add_columns(
{ data_type => "tinyint", default_value => 1, is_nullable => 0 },
"is_system",
{ data_type => "tinyint", default_value => 0, is_nullable => 0 },
"archived",
{ data_type => "tinyint", default_value => 0, is_nullable => 0 },
);
=head1 PRIMARY KEY
@ -105,8 +113,8 @@ __PACKAGE__->has_many(
);
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-10-14 09:59:52
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Uycu/23b681kWHNX+/gNiw
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-02-20 14:48:55
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:hdxcXxCqIDxwfSHjSr0VUg
__PACKAGE__->add_columns(
'+is_system' => { is_boolean => 1 }

View File

@ -1,9 +0,0 @@
$DBversion = 'XXX';
if( CheckVersion( $DBversion ) ) {
if (!column_exists('account_credit_types', 'archived')) {
$dbh->do('ALTER TABLE account_credit_types ADD COLUMN archived tinyint(1) NOT NULL DEFAULT 0 AFTER is_system');
}
SetVersion( $DBversion );
print "Upgrade to $DBversion done (Bug 17702 - Add column account_credit_types.archived)\n";
}

View File

@ -20915,6 +20915,16 @@ if( CheckVersion( $DBversion ) ) {
print "Upgrade to $DBversion done (Bug 14567: Add OpacBrowseSearch syspref)\n";
}
$DBversion = '19.12.00.029';
if( CheckVersion( $DBversion ) ) {
if (!column_exists('account_credit_types', 'archived')) {
$dbh->do('ALTER TABLE account_credit_types ADD COLUMN archived tinyint(1) NOT NULL DEFAULT 0 AFTER is_system');
}
SetVersion( $DBversion );
print "Upgrade to $DBversion done (Bug 17702 - Add column account_credit_types.archived)\n";
}
# SEE bug 13068
# if there is anything in the atomicupdate, read and execute it.
my $update_dir = C4::Context->config('intranetdir') . '/installer/data/mysql/atomicupdate/';