Browse Source

Bug 10132: Database changes

Signed-off-by: Hugo Agud <hagud@orex.es>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
17.11.x
Josef Moravec 7 years ago
committed by Jonathan Druart
parent
commit
ed94450bd6
  1. 10
      installer/data/mysql/atomicupdate/bug10132_add_marcorgcode_to_library.perl
  2. 1
      installer/data/mysql/kohastructure.sql

10
installer/data/mysql/atomicupdate/bug10132_add_marcorgcode_to_library.perl

@ -0,0 +1,10 @@
$DBversion = 'XXX'; # will be replaced by the RM
if( CheckVersion( $DBversion ) ) {
if( !column_exists( 'branches', 'marcorgcode' ) ) {
$dbh->do( "ALTER TABLE branches ADD COLUMN marcorgcode VARCHAR(16) default NULL AFTER geolocation" );
}
SetVersion( $DBversion );
print "Upgrade to $DBversion done (Bug 10132 - MARCOrgCode on branch level)\n";
}

1
installer/data/mysql/kohastructure.sql

@ -280,6 +280,7 @@ CREATE TABLE `branches` ( -- information about your libraries or branches are st
`branchnotes` mediumtext, -- notes related to your library or branch
opac_info text, -- HTML that displays in OPAC
`geolocation` VARCHAR(255) default NULL, -- geolocation of your library
`marcorgcode` VARCHAR(16) default NULL, -- MARC Organization Code, see http://www.loc.gov/marc/organizations/orgshome.html, when empty defaults to syspref MARCOrgCode
PRIMARY KEY (`branchcode`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

Loading…
Cancel
Save