Jonathan Druart
238fabc4ab
The purpose of this script was to load the relevant Koha lib for the different scripts (installation, cronjob, CLI, etc.) However it is not used consistently and we prefer to rely on PERL5LIB. From bug 28617 comment 6 from Galen: """ Time marches on, and one of the motivations for having kohalib.pl - making it possible to install Koha without setting a single environment variable - has been obviated by the vast improvements in the ease of installing Koha. Consequently, I think kohalib.pl can go away. """ Test plan: confirm that the changes make sense and that kohalib.pl can be removed safely. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
18 lines
479 B
Perl
Executable file
18 lines
479 B
Perl
Executable file
#!/usr/bin/perl
|
|
|
|
# small script to convert mysql tables to utf-8
|
|
|
|
use strict;
|
|
use warnings;
|
|
|
|
use C4::Context;
|
|
my $dbh = C4::Context->dbh();
|
|
my $sth = $dbh->prepare("Show tables");
|
|
$sth->execute();
|
|
while (my @table = $sth->fetchrow_array()) {
|
|
print "Altering table $table[0]\n";
|
|
my $alter_query = "ALTER TABLE $table[0] convert to CHARACTER SET UTF8 collate utf8_general_ci";
|
|
my $sth2 = $dbh->prepare($alter_query);
|
|
$sth2->execute();
|
|
$sth2->finish();
|
|
}
|