Added Migration for those Users coming from myISAM

This commit is contained in:
int2001
2024-03-22 06:51:36 +00:00
parent e52e6118a7
commit 75f9ddc2dd
3 changed files with 23 additions and 2 deletions

View File

@@ -22,7 +22,7 @@ $config['migration_enabled'] = TRUE;
|
*/
$config['migration_version'] = 189;
$config['migration_version'] = 190;
/*
|--------------------------------------------------------------------------

View File

@@ -34,7 +34,7 @@ class Migration_harmonize_keys extends CI_Migration {
}
public function down(){
$this->db->query("ALTER TABLE ".$this->config->item('table_name')." ENGINE=MyISAM;");
// $this->db->query("ALTER TABLE ".$this->config->item('table_name')." ENGINE=MyISAM;");
$this->db->query("ALTER TABLE ".$this->config->item('table_name')." CHANGE COLUMN `station_id` `station_id` INT(11) NOT NULL;");
$this->db->query("ALTER TABLE ".$this->config->item('table_name')." CHANGE COLUMN `COL_PRIMARY_KEY` `COL_PRIMARY_KEY` INT UNSIGNED NOT NULL AUTO_INCREMENT;");
$this->db->query("ALTER TABLE ".$this->config->item('table_name')." AUTO_INCREMENT=".$this->get_max_from_tbl($this->config->item('table_name'),"`COL_PRIMARY_KEY`").";");

View File

@@ -0,0 +1,21 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Migration_move_to_inno extends CI_Migration {
public function up() {
$this->db->query("ALTER TABLE contest ENGINE=InnoDB;");
$this->db->query("ALTER TABLE iota ENGINE=InnoDB;");
$this->db->query("ALTER TABLE qsl_images ENGINE=InnoDB;");
$this->db->query("ALTER TABLE queries ENGINE=InnoDB;");
$this->db->query("ALTER TABLE themes ENGINE=InnoDB;");
$this->db->query("ALTER TABLE timezones ENGINE=InnoDB;");
$this->db->query("ALTER TABLE users ENGINE=InnoDB;");
$this->db->query("ALTER TABLE lotw_users ENGINE=InnoDB;");
}
public function down(){
// No Way back here!
}
}