diff --git a/application/migrations/014_migration.php b/application/migrations/014_migration.php index 5f740302a..021b9cd50 100755 --- a/application/migrations/014_migration.php +++ b/application/migrations/014_migration.php @@ -14,7 +14,7 @@ class Migration_migration extends CI_Migration { $this->db->query("ALTER TABLE cat CHANGE COLUMN uplink_mode uplink_mode varchar(255) DEFAULT NULL; # was varchar(255) NOT NULL"); $this->db->query("ALTER TABLE cat ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; # was ENGINE=InnoDB DEFAULT CHARSET=latin1"); $this->db->query("ALTER TABLE config ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4; # was ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8"); - $this->db->query("ALTER TABLE dxcc ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; # was ENGINE=MyISAM DEFAULT CHARSET=utf8"); + $this->db->query("ALTER TABLE dxcc ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;"); $this->db->query("ALTER TABLE dxccexceptions ENGINE=InnoDB AUTO_INCREMENT=166 DEFAULT CHARSET=utf8mb4; # was ENGINE=InnoDB AUTO_INCREMENT=166 DEFAULT CHARSET=utf8"); $this->db->query("ALTER TABLE notes ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4; # was ENGINE=InnoDB DEFAULT CHARSET=latin1"); @@ -23,7 +23,7 @@ class Migration_migration extends CI_Migration { $this->db->query("ALTER TABLE station_profile ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; # was ENGINE=InnoDB DEFAULT CHARSET=latin1"); $this->db->query("ALTER TABLE timezones CHANGE COLUMN name name varchar(120) COLLATE utf8mb4_bin NOT NULL; # was varchar(120) COLLATE utf8_bin NOT NULL"); - $this->db->query("ALTER TABLE timezones ENGINE=MyISAM AUTO_INCREMENT=151 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin; # was ENGINE=MyISAM AUTO_INCREMENT=151 DEFAULT CHARSET=utf8 COLLATE=utf8_bin"); + $this->db->query("ALTER TABLE timezones ENGINE=InnoDB AUTO_INCREMENT=151 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;"); $this->db->query("ALTER TABLE users CHANGE COLUMN user_callsign user_callsign varchar(32) NOT NULL COMMENT 'User''s callsign'; # was varchar(255) NOT NULL"); $this->db->query("ALTER TABLE users CHANGE COLUMN user_firstname user_firstname varchar(32) NOT NULL COMMENT 'User''s first name'; # was varchar(255) NOT NULL"); $this->db->query("ALTER TABLE users CHANGE COLUMN user_locator user_locator varchar(16) NOT NULL COMMENT 'User''s locator'; # was varchar(255) NOT NULL"); @@ -32,7 +32,7 @@ class Migration_migration extends CI_Migration { $this->db->query("ALTER TABLE users ADD COLUMN user_eqsl_qth_nickname varchar(32) DEFAULT NULL;"); - $this->db->query("ALTER TABLE users ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4; # was ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=latin1"); + $this->db->query("ALTER TABLE users ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4;"); $this->db->query("CREATE TABLE IF NOT EXISTS contest_template ( id int(11) NOT NULL AUTO_INCREMENT, name varchar(255) NOT NULL, @@ -87,7 +87,6 @@ class Migration_migration extends CI_Migration { $this->db->query("ALTER TABLE ".$this->config->item('table_name')." CHANGE COLUMN COL_FREQ_RX COL_FREQ_RX bigint(13) DEFAULT NULL; # was int(11) DEFAULT NULL"); $this->db->query("ALTER TABLE ".$this->config->item('table_name')." CHANGE COLUMN COL_FREQ COL_FREQ bigint(13) DEFAULT NULL; # was int(11) DEFAULT NULL"); - // $this->db->query("ALTER TABLE ".$this->config->item('table_name')." ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; # was ENGINE=MyISAM DEFAULT CHARSET=latin1"); // Is already MyISAM $this->db->db_debug = true; } diff --git a/application/migrations/038_create_iota_tables.php b/application/migrations/038_create_iota_tables.php index 6323a4937..310af9527 100644 --- a/application/migrations/038_create_iota_tables.php +++ b/application/migrations/038_create_iota_tables.php @@ -5,7 +5,7 @@ class Migration_create_iota_tables extends CI_Migration { public function up() { // create iota table - $this->db->query("CREATE TABLE `iota` (`Tag` VARCHAR(8) NOT NULL, `Name` LONGTEXT, `Prefix` VARCHAR(16), `DXCCID` INTEGER DEFAULT 0, `Lat1` FLOAT NULL DEFAULT 0, `Lat2` FLOAT NULL DEFAULT 0, `Lon1` FLOAT NULL DEFAULT 0, `Lon2` FLOAT NULL DEFAULT 0, `Status` VARCHAR(1), `Notes` VARCHAR(50), INDEX (`DXCCID`)) ENGINE=myisam DEFAULT CHARSET=utf8;"); + $this->db->query("CREATE TABLE `iota` (`Tag` VARCHAR(8) NOT NULL, `Name` LONGTEXT, `Prefix` VARCHAR(16), `DXCCID` INTEGER DEFAULT 0, `Lat1` FLOAT NULL DEFAULT 0, `Lat2` FLOAT NULL DEFAULT 0, `Lon1` FLOAT NULL DEFAULT 0, `Lon2` FLOAT NULL DEFAULT 0, `Status` VARCHAR(1), `Notes` VARCHAR(50), INDEX (`DXCCID`)) ENGINE=InnoDB DEFAULT CHARSET=utf8;"); $this->db->query("INSERT INTO `iota` (`Tag`, `Name`, `Prefix`, `DXCCID`, `Lat1`, `Lat2`, `Lon1`, `Lon2`, `Status`, `Notes`) VALUES ('AF-001', 'Agalega Islands', '3B6', 4, 10, 10.75, 56.25, 57, NULL, NULL);"); $this->db->query("INSERT INTO `iota` (`Tag`, `Name`, `Prefix`, `DXCCID`, `Lat1`, `Lat2`, `Lon1`, `Lon2`, `Status`, `Notes`) VALUES ('AF-002', 'Amsterdam & St Paul Islands', 'FT*Z', 10, 37.75, 39, 77.25, 77.75, NULL, NULL);"); diff --git a/application/migrations/054_add_qsl_images.php b/application/migrations/054_add_qsl_images.php index a66093d90..ab8828e59 100644 --- a/application/migrations/054_add_qsl_images.php +++ b/application/migrations/054_add_qsl_images.php @@ -9,11 +9,11 @@ class Migration_add_qsl_images extends CI_Migration { // create qsl images table $this->db->query("CREATE TABLE IF NOT EXISTS `qsl_images` (`id` integer NOT NULL auto_increment, `qsoid` int, `filename` text, primary key (id)) - ENGINE=myisam DEFAULT CHARSET=utf8;"); + ENGINE=InnoDB DEFAULT CHARSET=utf8;"); } public function down() { $this->db->query(""); } -} \ No newline at end of file +} diff --git a/application/migrations/063_add_contest_table.php b/application/migrations/063_add_contest_table.php index 24444d077..9ff953dac 100644 --- a/application/migrations/063_add_contest_table.php +++ b/application/migrations/063_add_contest_table.php @@ -5,7 +5,7 @@ class Migration_add_contest_table extends CI_Migration { public function up() { // create contest table - $this->db->query("create table contest (id integer not null auto_increment, name varchar(256), adifname varchar(256), active integer default 1, primary key (id)) ENGINE=myisam DEFAULT CHARSET=utf8;"); + $this->db->query("create table contest (id integer not null auto_increment, name varchar(256), adifname varchar(256), active integer default 1, primary key (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8;"); $this->db->query("INSERT INTO contest (name, adifname, active) values ('Other','Other',1);"); $this->db->query("INSERT INTO contest (name, adifname, active) values ('PODXS Great Pumpkin Sprint','070-160M-SPRINT',1);"); diff --git a/application/migrations/071_add_queries_table.php b/application/migrations/071_add_queries_table.php index 7b439c836..d46e5c2f2 100644 --- a/application/migrations/071_add_queries_table.php +++ b/application/migrations/071_add_queries_table.php @@ -4,7 +4,7 @@ class Migration_add_queries_table extends CI_Migration { public function up() { - $this->db->query("create table if not exists queries (id integer not null auto_increment, query text, description text, userid integer not null, primary key (id)) ENGINE=myisam DEFAULT CHARSET=utf8;"); + $this->db->query("create table if not exists queries (id integer not null auto_increment, query text, description text, userid integer not null, primary key (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8;"); } public function down() diff --git a/application/migrations/076_theme_table.php b/application/migrations/076_theme_table.php index 15ae9047b..3bf39e478 100644 --- a/application/migrations/076_theme_table.php +++ b/application/migrations/076_theme_table.php @@ -6,7 +6,7 @@ class Migration_Theme_table extends CI_Migration { { // create themes table if (!$this->db->table_exists('themes')) { - $this->db->query("create table themes (id integer not null auto_increment, name varchar(256) not null, foldername varchar(256) not null, primary key (id)) ENGINE=myisam DEFAULT CHARSET=utf8;"); + $this->db->query("create table themes (id integer not null auto_increment, name varchar(256) not null, foldername varchar(256) not null, primary key (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8;"); $this->db->query("INSERT INTO themes (name, foldername) values ('Blue','blue');"); $this->db->query("INSERT INTO themes (name, foldername) values ('Cosmo','cosmo');"); $this->db->query("INSERT INTO themes (name, foldername) values ('Cyborg (Dark)','cyborg');");