Bug 8643: DBRev 19.12.00.020

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Martin Renvoize 2020-02-11 14:36:55 +00:00
parent 1547e7c992
commit fb69268862
Signed by: martin.renvoize
GPG key ID: 422B469130441A0F
5 changed files with 33 additions and 16 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.019";
$VERSION = "19.12.00.020";
sub version {
return $VERSION;

View file

@ -63,6 +63,12 @@ __PACKAGE__->table("marc_subfield_structure");
default_value: 0
is_nullable: 0
=head2 important
data_type: 'tinyint'
default_value: 0
is_nullable: 0
=head2 kohafield
data_type: 'varchar'
@ -149,6 +155,8 @@ __PACKAGE__->add_columns(
{ data_type => "tinyint", default_value => 0, is_nullable => 0 },
"mandatory",
{ data_type => "tinyint", default_value => 0, is_nullable => 0 },
"important",
{ data_type => "tinyint", default_value => 0, is_nullable => 0 },
"kohafield",
{ data_type => "varchar", is_nullable => 1, size => 40 },
"tab",
@ -214,8 +222,8 @@ __PACKAGE__->belongs_to(
);
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-08-15 08:12:17
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:pq6quXdds+U1JejYlrkcOw
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-02-11 14:36:42
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:lCe1ZenRM/9rXnRHXhDuSw
# You can replace this text with custom content, and it will be preserved on regeneration

View file

@ -56,6 +56,12 @@ __PACKAGE__->table("marc_tag_structure");
default_value: 0
is_nullable: 0
=head2 important
data_type: 'tinyint'
default_value: 0
is_nullable: 0
=head2 authorised_value
data_type: 'varchar'
@ -96,6 +102,8 @@ __PACKAGE__->add_columns(
{ data_type => "tinyint", default_value => 0, is_nullable => 0 },
"mandatory",
{ data_type => "tinyint", default_value => 0, is_nullable => 0 },
"important",
{ data_type => "tinyint", default_value => 0, is_nullable => 0 },
"authorised_value",
{ data_type => "varchar", is_nullable => 1, size => 10 },
"ind1_defaultvalue",
@ -121,8 +129,8 @@ __PACKAGE__->add_columns(
__PACKAGE__->set_primary_key("frameworkcode", "tagfield");
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-04-09 09:07:51
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:6EvGakEpGreV0hom7P6Efg
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-02-11 14:36:42
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:JdpVv7CUrY61kqmMYDE4AA
# You can replace this text with custom content, and it will be preserved on regeneration

View file

@ -1,11 +0,0 @@
$DBversion = "XXX";
if ( CheckVersion($DBversion) ) {
if ( !column_exists( 'marc_subfield_structure', 'important') ){
$dbh->do("ALTER TABLE marc_subfield_structure ADD COLUMN important TINYINT(4) NOT NULL DEFAULT 0 AFTER mandatory");
}
if ( !column_exists( 'marc_tag_structure', 'important') ){
$dbh->do("ALTER TABLE marc_tag_structure ADD COLUMN important TINYINT(4) NOT NULL DEFAULT 0 AFTER mandatory");
}
SetVersion($DBversion);
print "Upgrade to $DBversion done (Bug 8643 - Add important constraint to marc subfields)\n";
}

View file

@ -20746,6 +20746,18 @@ if( CheckVersion( $DBversion ) ) {
print "Upgrade to $DBversion done (Bug 23673 - modify time_queued and add updated_on to message_queue)\n";
}
$DBversion = '19.12.00.020';
if ( CheckVersion($DBversion) ) {
if ( !column_exists( 'marc_subfield_structure', 'important') ){
$dbh->do("ALTER TABLE marc_subfield_structure ADD COLUMN important TINYINT(4) NOT NULL DEFAULT 0 AFTER mandatory");
}
if ( !column_exists( 'marc_tag_structure', 'important') ){
$dbh->do("ALTER TABLE marc_tag_structure ADD COLUMN important TINYINT(4) NOT NULL DEFAULT 0 AFTER mandatory");
}
SetVersion($DBversion);
print "Upgrade to $DBversion done (Bug 8643 - Add important constraint to marc subfields)\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/';