2022-01-20 21:53:55 +00:00
|
|
|
<?php
|
|
|
|
defined('BASEPATH') or exit('No direct script access allowed');
|
|
|
|
|
|
|
|
class Migration_fix_collate extends CI_Migration
|
|
|
|
{
|
|
|
|
public function up()
|
|
|
|
{
|
|
|
|
$tables = array(
|
|
|
|
$this->config->item('table_name'),
|
|
|
|
'adif_modes',
|
|
|
|
'api',
|
|
|
|
'cat',
|
|
|
|
'config',
|
|
|
|
'contest',
|
|
|
|
'dxcc_entities',
|
|
|
|
'dxcc_exceptions',
|
|
|
|
'dxcc_prefixes',
|
|
|
|
'eQSL_images',
|
|
|
|
'iota',
|
|
|
|
'lotw_certs',
|
|
|
|
'migrations',
|
|
|
|
'notes',
|
2022-01-26 14:53:55 +00:00
|
|
|
'queries',
|
2022-01-20 21:53:55 +00:00
|
|
|
'options',
|
|
|
|
'qsl_images',
|
|
|
|
'station_logbooks',
|
|
|
|
'station_logbooks_relationship',
|
|
|
|
'station_profile',
|
|
|
|
'timezones',
|
|
|
|
'users'
|
|
|
|
);
|
|
|
|
foreach ($tables as $table) {
|
|
|
|
$this->db->query('ALTER TABLE ' . $table . ' CONVERT TO CHARACTER SET ' . $this->db->char_set . ' COLLATE ' . $this->db->dbcollat);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public function down()
|
|
|
|
{
|
|
|
|
// Not Possible
|
|
|
|
}
|
|
|
|
}
|