# - #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 = "20.06.00.021";
+$VERSION = "20.06.00.022";
sub version {
return $VERSION;
+++ /dev/null
-$DBversion = 'XXX';
-if( CheckVersion( $DBversion ) ) {
- unless ( column_exists('itemtypes', 'parent_type') ) {
- $dbh->do(q{
- ALTER TABLE itemtypes
- ADD COLUMN parent_type VARCHAR(10) NULL DEFAULT NULL
- AFTER itemtype;
-
- });
- }
- unless ( foreign_key_exists( 'itemtypes', 'itemtypes_ibfk_1') ){
- $dbh->do(q{
- ALTER TABLE itemtypes
- ADD CONSTRAINT itemtypes_ibfk_1
- FOREIGN KEY (parent_type) REFERENCES itemtypes (itemtype)
- });
- }
- SetVersion( $DBversion );
- print "Upgrade to $DBversion done (Bug 21946 - Add parent type to itemtypes)\n";
-}
NewVersion( $DBversion, 25871, "Add library option to OpacItemLocation");
}
+$DBversion = '20.06.00.022';
+if( CheckVersion( $DBversion ) ) {
+ unless ( column_exists('itemtypes', 'parent_type') ) {
+ $dbh->do(q{
+ ALTER TABLE itemtypes
+ ADD COLUMN parent_type VARCHAR(10) NULL DEFAULT NULL
+ AFTER itemtype;
+
+ });
+ }
+ unless ( foreign_key_exists( 'itemtypes', 'itemtypes_ibfk_1') ){
+ $dbh->do(q{
+ ALTER TABLE itemtypes
+ ADD CONSTRAINT itemtypes_ibfk_1
+ FOREIGN KEY (parent_type) REFERENCES itemtypes (itemtype)
+ });
+ }
+
+ NewVersion( $DBversion, 21946, "Add parent type to itemtypes" );
+}
+
# 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/';