Bug 8643: DBRev 19.12.00.020
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
parent
1547e7c992
commit
fb69268862
5 changed files with 33 additions and 16 deletions
2
Koha.pm
2
Koha.pm
|
@ -29,7 +29,7 @@ use vars qw{ $VERSION };
|
||||||
# - #4 : the developer version. The 4th number is the database subversion.
|
# - #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
|
# used by developers when the database changes. updatedatabase take care of the changes itself
|
||||||
# and is automatically called by Auth.pm when needed.
|
# and is automatically called by Auth.pm when needed.
|
||||||
$VERSION = "19.12.00.019";
|
$VERSION = "19.12.00.020";
|
||||||
|
|
||||||
sub version {
|
sub version {
|
||||||
return $VERSION;
|
return $VERSION;
|
||||||
|
|
|
@ -63,6 +63,12 @@ __PACKAGE__->table("marc_subfield_structure");
|
||||||
default_value: 0
|
default_value: 0
|
||||||
is_nullable: 0
|
is_nullable: 0
|
||||||
|
|
||||||
|
=head2 important
|
||||||
|
|
||||||
|
data_type: 'tinyint'
|
||||||
|
default_value: 0
|
||||||
|
is_nullable: 0
|
||||||
|
|
||||||
=head2 kohafield
|
=head2 kohafield
|
||||||
|
|
||||||
data_type: 'varchar'
|
data_type: 'varchar'
|
||||||
|
@ -149,6 +155,8 @@ __PACKAGE__->add_columns(
|
||||||
{ data_type => "tinyint", default_value => 0, is_nullable => 0 },
|
{ data_type => "tinyint", default_value => 0, is_nullable => 0 },
|
||||||
"mandatory",
|
"mandatory",
|
||||||
{ data_type => "tinyint", default_value => 0, is_nullable => 0 },
|
{ data_type => "tinyint", default_value => 0, is_nullable => 0 },
|
||||||
|
"important",
|
||||||
|
{ data_type => "tinyint", default_value => 0, is_nullable => 0 },
|
||||||
"kohafield",
|
"kohafield",
|
||||||
{ data_type => "varchar", is_nullable => 1, size => 40 },
|
{ data_type => "varchar", is_nullable => 1, size => 40 },
|
||||||
"tab",
|
"tab",
|
||||||
|
@ -214,8 +222,8 @@ __PACKAGE__->belongs_to(
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-08-15 08:12:17
|
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-02-11 14:36:42
|
||||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:pq6quXdds+U1JejYlrkcOw
|
# 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
|
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||||
|
|
|
@ -56,6 +56,12 @@ __PACKAGE__->table("marc_tag_structure");
|
||||||
default_value: 0
|
default_value: 0
|
||||||
is_nullable: 0
|
is_nullable: 0
|
||||||
|
|
||||||
|
=head2 important
|
||||||
|
|
||||||
|
data_type: 'tinyint'
|
||||||
|
default_value: 0
|
||||||
|
is_nullable: 0
|
||||||
|
|
||||||
=head2 authorised_value
|
=head2 authorised_value
|
||||||
|
|
||||||
data_type: 'varchar'
|
data_type: 'varchar'
|
||||||
|
@ -96,6 +102,8 @@ __PACKAGE__->add_columns(
|
||||||
{ data_type => "tinyint", default_value => 0, is_nullable => 0 },
|
{ data_type => "tinyint", default_value => 0, is_nullable => 0 },
|
||||||
"mandatory",
|
"mandatory",
|
||||||
{ data_type => "tinyint", default_value => 0, is_nullable => 0 },
|
{ data_type => "tinyint", default_value => 0, is_nullable => 0 },
|
||||||
|
"important",
|
||||||
|
{ data_type => "tinyint", default_value => 0, is_nullable => 0 },
|
||||||
"authorised_value",
|
"authorised_value",
|
||||||
{ data_type => "varchar", is_nullable => 1, size => 10 },
|
{ data_type => "varchar", is_nullable => 1, size => 10 },
|
||||||
"ind1_defaultvalue",
|
"ind1_defaultvalue",
|
||||||
|
@ -121,8 +129,8 @@ __PACKAGE__->add_columns(
|
||||||
__PACKAGE__->set_primary_key("frameworkcode", "tagfield");
|
__PACKAGE__->set_primary_key("frameworkcode", "tagfield");
|
||||||
|
|
||||||
|
|
||||||
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-04-09 09:07:51
|
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-02-11 14:36:42
|
||||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:6EvGakEpGreV0hom7P6Efg
|
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:JdpVv7CUrY61kqmMYDE4AA
|
||||||
|
|
||||||
|
|
||||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||||
|
|
|
@ -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";
|
|
||||||
}
|
|
|
@ -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";
|
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
|
# SEE bug 13068
|
||||||
# if there is anything in the atomicupdate, read and execute it.
|
# if there is anything in the atomicupdate, read and execute it.
|
||||||
my $update_dir = C4::Context->config('intranetdir') . '/installer/data/mysql/atomicupdate/';
|
my $update_dir = C4::Context->config('intranetdir') . '/installer/data/mysql/atomicupdate/';
|
||||||
|
|
Loading…
Reference in a new issue