3 # small script to convert mysql tables to utf-8
10 # find Koha's Perl modules
11 # test carefully before changing this
13 eval { require "$FindBin::Bin/../../kohalib.pl" };
17 my $dbh = C4::Context->dbh();
18 my $sth = $dbh->prepare("Show tables");
20 while (my @table = $sth->fetchrow_array()) {
21 print "Altering table $table[0]\n";
22 my $alter_query = "ALTER TABLE $table[0] convert to CHARACTER SET UTF8 collate utf8_general_ci";
23 my $sth2 = $dbh->prepare($alter_query);