Migration can now be run on any old installation and
should update the layout properly
这个提交包含在:
父节点
98bbf93eac
当前提交
0e6a7bf8d1
共有 2 个文件被更改,包括 17 次插入 和 8 次删除
|
|
@ -21,7 +21,7 @@ $config['migration_enabled'] = TRUE;
|
|||
| be upgraded / downgraded to.
|
||||
|
|
||||
*/
|
||||
$config['migration_version'] = 13;
|
||||
$config['migration_version'] = 14;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -4,9 +4,8 @@ class Migration_migration extends CI_Migration {
|
|||
|
||||
public function up()
|
||||
{
|
||||
$this->db->query("ALTER TABLE TABLE_HRD_CONTACTS_V01 CHANGE COLUMN COL_FREQ_RX COL_FREQ_RX bigint(13) DEFAULT NULL; # was int(11) DEFAULT NULL");
|
||||
$this->db->query("ALTER TABLE TABLE_HRD_CONTACTS_V01 CHANGE COLUMN COL_FREQ COL_FREQ bigint(13) DEFAULT NULL; # was int(11) DEFAULT NULL");
|
||||
$this->db->query("ALTER TABLE TABLE_HRD_CONTACTS_V01 ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; # was ENGINE=MyISAM DEFAULT CHARSET=latin1");
|
||||
$this->db->db_debug = false;
|
||||
|
||||
$this->db->query("ALTER TABLE cat CHANGE COLUMN frequency frequency bigint(13) NOT NULL; # was int(11) NOT NULL");
|
||||
$this->db->query("ALTER TABLE cat CHANGE COLUMN uplink_freq uplink_freq bigint(13) DEFAULT NULL; # was int(11) NOT NULL");
|
||||
$this->db->query("ALTER TABLE cat CHANGE COLUMN downlink_freq downlink_freq bigint(13) DEFAULT NULL; # was int(11) NOT NULL");
|
||||
|
|
@ -18,8 +17,10 @@ class Migration_migration extends CI_Migration {
|
|||
$this->db->query("ALTER TABLE dxcc ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; # was ENGINE=MyISAM DEFAULT CHARSET=utf8");
|
||||
$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");
|
||||
$this->db->query("ALTER TABLE station_profile CHANGE COLUMN station_id station_id int(11) unsigned NOT NULL AUTO_INCREMENT; # was int(11) NOT NULL");
|
||||
$this->db->query("ALTER TABLE station_profile ADD PRIMARY KEY (station_id);");
|
||||
|
||||
$this->db->query( "ALTER TABLE `station_profile` MODIFY COLUMN `station_id` int(11) NOT NULL AUTO_INCREMENT FIRST , ADD PRIMARY KEY (`station_id`); # was int(11) NOT NULL" );
|
||||
|
||||
|
||||
$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");
|
||||
|
|
@ -28,9 +29,11 @@ class Migration_migration extends CI_Migration {
|
|||
$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");
|
||||
$this->db->query("ALTER TABLE users CHANGE COLUMN user_timezone user_timezone int(3) NOT NULL DEFAULT 0; # was char(255) NOT NULL");
|
||||
$this->db->query("ALTER TABLE users CHANGE COLUMN user_lastname user_lastname varchar(32) NOT NULL COMMENT 'User''s last name'; # was varchar(255) NOT NULL");
|
||||
|
||||
$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("CREATE TABLE contest_template (
|
||||
$this->db->query("CREATE TABLE IF NOT EXISTS contest_template (
|
||||
id int(11) NOT NULL AUTO_INCREMENT,
|
||||
name varchar(255) NOT NULL,
|
||||
band_160 varchar(20) NOT NULL,
|
||||
|
|
@ -55,7 +58,7 @@ class Migration_migration extends CI_Migration {
|
|||
KEY name (name)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;");
|
||||
|
||||
$this->db->query("CREATE TABLE contests (
|
||||
$this->db->query("CREATE TABLE IF NOT EXISTS contests (
|
||||
id int(11) NOT NULL AUTO_INCREMENT,
|
||||
name varchar(255) NOT NULL,
|
||||
start datetime NOT NULL,
|
||||
|
|
@ -64,6 +67,12 @@ class Migration_migration extends CI_Migration {
|
|||
serial_num tinyint(11) NOT NULL,
|
||||
PRIMARY KEY (id)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;");
|
||||
|
||||
$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");
|
||||
|
||||
$this->db->db_debug = true;
|
||||
}
|
||||
|
||||
public function down(){
|
||||
|
|
|
|||
正在加载…
在新工单中引用