mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 02:14:13 +00:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
@@ -1,21 +0,0 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Migration_add_lotw_credentials extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$fields = array(
|
||||
'user_lotw_name VARCHAR(32) DEFAULT NULL',
|
||||
'user_lotw_password VARCHAR(64) DEFAULT NULL'
|
||||
);
|
||||
|
||||
$this->dbforge->add_column('users', $fields);
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_column('users', 'user_lotw_name');
|
||||
$this->dbforge->drop_column('users', 'user_lotw_password');
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -1,41 +0,0 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Migration_add_config_table extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$this->dbforge->add_field('id');
|
||||
|
||||
$this->dbforge->add_field(array(
|
||||
'lotw_download_url' => array(
|
||||
'type' => 'VARCHAR',
|
||||
'constraint' => 255,
|
||||
),
|
||||
'lotw_upload_url' => array(
|
||||
'type' => 'VARCHAR',
|
||||
'constraint' => 255,
|
||||
),
|
||||
'lotw_rcvd_mark' => array(
|
||||
'type' => 'VARCHAR',
|
||||
'constraint' => 1,
|
||||
),
|
||||
));
|
||||
|
||||
|
||||
$this->dbforge->create_table('config');
|
||||
|
||||
$data = array(
|
||||
'lotw_download_url' => 'https://p1k.arrl.org/lotwuser/lotwreport.adi',
|
||||
'lotw_upload_url' => 'https://p1k.arrl.org/lotwuser/upload',
|
||||
'lotw_rcvd_mark' => 'Y'
|
||||
);
|
||||
|
||||
$this->db->insert('config', $data);
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_table('config');
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -1,21 +0,0 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Migration_add_lotw_login_url extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$fields = array('lotw_login_url VARCHAR(244) DEFAULT NULL');
|
||||
|
||||
$this->dbforge->add_column('config', $fields);
|
||||
|
||||
$sql = "UPDATE config SET lotw_login_url = 'https://p1k.arrl.org/lotwuser/default' WHERE id=1";
|
||||
|
||||
$this->db->query($sql);
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_column('config', 'lotw_login_url');
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -1,32 +0,0 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Migration_add_eQSL_login_and_url extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$user_fields = array(
|
||||
'user_eqsl_name VARCHAR(32) DEFAULT NULL',
|
||||
'user_eqsl_password VARCHAR(64) DEFAULT NULL'
|
||||
);
|
||||
$this->dbforge->add_column('users', $user_fields);
|
||||
|
||||
|
||||
$config_fields = array('eqsl_download_url VARCHAR(244) DEFAULT NULL','eqsl_rcvd_mark VARCHAR(1) DEFAULT NULL');
|
||||
$this->dbforge->add_column('config', $config_fields);
|
||||
|
||||
$sql = "UPDATE config SET eqsl_download_url = 'http://www.eqsl.cc/qslcard/DownloadInBox.cfm' WHERE id=1";
|
||||
$this->db->query($sql);
|
||||
|
||||
$sql = "UPDATE config SET eqsl_rcvd_mark = 'Y' WHERE id=1";
|
||||
$this->db->query($sql);
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_column('users', 'user_eqsl_name');
|
||||
$this->dbforge->drop_column('users', 'user_eqsl_password');
|
||||
$this->dbforge->drop_column('config', 'eqsl_download_url');
|
||||
$this->dbforge->drop_column('config', 'eqsl_rcvd_mark');
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -1,22 +0,0 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Migration_add_dxcc_enddate extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
|
||||
$fields = array(
|
||||
'end_date' => array('type' => 'datetime')
|
||||
);
|
||||
|
||||
$this->dbforge->add_column('dxcc', $fields);
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_column('dxcc', 'end_date');
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -1,25 +0,0 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Migration_add_dxcc_delete extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
|
||||
$fields = array(
|
||||
'deleted' => array(
|
||||
'type' => 'VARCHAR',
|
||||
'constraint' => '100',
|
||||
)
|
||||
);
|
||||
|
||||
$this->dbforge->add_column('dxcc', $fields);
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_column('dxcc', 'deleted');
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -1,52 +0,0 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Migration_add_dxcc_entities extends CI_Migration {
|
||||
|
||||
public function up(){
|
||||
$this->dbforge->add_field(array(
|
||||
'adif' => array(
|
||||
'type' => 'smallint',
|
||||
'Null' => FALSE
|
||||
),
|
||||
'name' => array(
|
||||
'type' => 'varchar(150)',
|
||||
'null' => TRUE
|
||||
),
|
||||
'prefix' => array(
|
||||
'type' => 'varchar(10)',
|
||||
'null' => FALSE
|
||||
),
|
||||
'cqz' => array(
|
||||
'type' => 'smallint',
|
||||
'null' => FALSE
|
||||
),
|
||||
'ituz' => array(
|
||||
'type' => 'smallint',
|
||||
'null' => FALSE
|
||||
),
|
||||
'cont' => array(
|
||||
'type' => 'varchar(5)',
|
||||
'null' => FALSE
|
||||
),
|
||||
'long' => array(
|
||||
'type' => 'float',
|
||||
'null' => FALSE
|
||||
),
|
||||
'lat' => array(
|
||||
'type' => 'float',
|
||||
'null' => FALSE
|
||||
),
|
||||
'end' => array(
|
||||
'type' => 'date',
|
||||
'null' => TRUE
|
||||
)
|
||||
));
|
||||
|
||||
$this->dbforge->add_key('adif', TRUE);
|
||||
$this->dbforge->create_table('dxcc_entities');
|
||||
}
|
||||
|
||||
public function down(){
|
||||
$this->dbforge->drop_table('dxcc_entities');
|
||||
}
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Migration_add_dxcc_exceptions extends CI_Migration {
|
||||
|
||||
public function up(){
|
||||
$this->dbforge->add_field(array(
|
||||
'record' => array(
|
||||
'type' => 'int',
|
||||
'Null' => FALSE
|
||||
),
|
||||
'call' => array(
|
||||
'type' => 'varchar(10)',
|
||||
'null' => TRUE
|
||||
),
|
||||
'entity' => array(
|
||||
'type' => 'varchar(255)',
|
||||
'null' => FALSE
|
||||
),
|
||||
'adif' => array(
|
||||
'type' => 'smallint',
|
||||
'null' => FALSE
|
||||
),
|
||||
'cqz' => array(
|
||||
'type' => 'smallint',
|
||||
'null' => FALSE
|
||||
),
|
||||
'cont' => array(
|
||||
'type' => 'varchar(5)',
|
||||
),
|
||||
'long' => array(
|
||||
'type' => 'float',
|
||||
),
|
||||
'lat' => array(
|
||||
'type' => 'float',
|
||||
),
|
||||
'start' => array(
|
||||
'type' => 'date',
|
||||
'null' => TRUE
|
||||
),
|
||||
'end' => array(
|
||||
'type' => 'date',
|
||||
'null' => TRUE
|
||||
)
|
||||
));
|
||||
|
||||
$this->dbforge->add_key('record', TRUE);
|
||||
$this->dbforge->create_table('dxcc_exceptions');
|
||||
}
|
||||
|
||||
public function down(){
|
||||
$this->dbforge->drop_table('dxcc_exceptions');
|
||||
}
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Migration_add_dxcc_prefixes extends CI_Migration {
|
||||
|
||||
public function up(){
|
||||
$this->dbforge->add_field(array(
|
||||
'record' => array(
|
||||
'type' => 'int',
|
||||
'Null' => FALSE
|
||||
),
|
||||
'call' => array(
|
||||
'type' => 'varchar(10)',
|
||||
'null' => TRUE
|
||||
),
|
||||
'entity' => array(
|
||||
'type' => 'varchar(255)',
|
||||
'null' => FALSE
|
||||
),
|
||||
'adif' => array(
|
||||
'type' => 'smallint',
|
||||
'null' => FALSE
|
||||
),
|
||||
'cqz' => array(
|
||||
'type' => 'smallint',
|
||||
'null' => FALSE
|
||||
),
|
||||
'cont' => array(
|
||||
'type' => 'varchar(5)',
|
||||
),
|
||||
'long' => array(
|
||||
'type' => 'float',
|
||||
),
|
||||
'lat' => array(
|
||||
'type' => 'float',
|
||||
),
|
||||
));
|
||||
|
||||
$this->dbforge->add_key('record', TRUE);
|
||||
$this->dbforge->create_table('dxcc_prefixes');
|
||||
}
|
||||
|
||||
public function down(){
|
||||
$this->dbforge->drop_table('dxcc_prefixes');
|
||||
}
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Migration_add_dxcc_prefixes_start_end extends CI_Migration {
|
||||
|
||||
public function up(){
|
||||
$fields = (array(
|
||||
'start' => array(
|
||||
'type' => 'date',
|
||||
'Null' => TRUE
|
||||
),
|
||||
'end' => array(
|
||||
'type' => 'date',
|
||||
'Null' => TRUE
|
||||
),
|
||||
));
|
||||
|
||||
$this->dbforge->add_column('dxcc_prefixes', $fields);
|
||||
}
|
||||
|
||||
public function down(){
|
||||
$this->dbforge->drop_table('dxcc_prefixes');
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Migration_add_dxcc_entities_start extends CI_Migration {
|
||||
|
||||
public function up(){
|
||||
$fields = (array(
|
||||
'start' => array(
|
||||
'type' => 'date',
|
||||
'Null' => TRUE
|
||||
),
|
||||
));
|
||||
|
||||
$this->dbforge->add_column('dxcc_entities', $fields);
|
||||
}
|
||||
|
||||
public function down(){
|
||||
$this->dbforge->drop_table('dxcc_entities');
|
||||
}
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Migration_add_dxcc_stored_proc extends CI_Migration {
|
||||
|
||||
public function up(){
|
||||
$res = $this->db->query("drop procedure if exists `find_country`");
|
||||
if (!$res){
|
||||
print ("Error dropping stored proc");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
$sql = <<<EOF
|
||||
CREATE PROCEDURE `find_country`(
|
||||
IN callsign varchar(10),
|
||||
IN qso_date date,
|
||||
OUT country varchar(255),
|
||||
OUT dxcc_id int)
|
||||
begin
|
||||
declare calllen int default 0;
|
||||
set calllen = char_length(callsign);
|
||||
L1: while calllen >0 do
|
||||
select `entity`, `adif` into country, dxcc_id
|
||||
from dxcc_prefixes
|
||||
where `call`= substring(callsign, 1, calllen)
|
||||
and (`start` <= qso_date or `start`='0000-00-00')
|
||||
and (`end` >= qso_date or `end`='0000-00-00');
|
||||
if (FOUND_ROWS() >0) THEN
|
||||
LEAVE L1;
|
||||
else
|
||||
set calllen = calllen - 1;
|
||||
end IF;
|
||||
end WHILE;
|
||||
end
|
||||
EOF;
|
||||
|
||||
$res = $this->db->query($sql);
|
||||
if (!$res){
|
||||
print ("Error setting stored proc");
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
public function down(){
|
||||
$this->db->query("drop procedure if exists `find_country`");
|
||||
}
|
||||
}
|
||||
@@ -1,97 +0,0 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Migration_migration extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$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");
|
||||
$this->db->query("ALTER TABLE cat CHANGE COLUMN downlink_mode downlink_mode varchar(255) DEFAULT NULL; # was varchar(255) NOT NULL");
|
||||
$this->db->query("ALTER TABLE cat CHANGE COLUMN sat_name sat_name varchar(255) DEFAULT NULL; # was varchar(255) NOT NULL");
|
||||
$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=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");
|
||||
|
||||
$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=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");
|
||||
$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=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,
|
||||
band_160 varchar(20) NOT NULL,
|
||||
band_80 varchar(20) NOT NULL,
|
||||
band_40 varchar(20) NOT NULL,
|
||||
band_20 varchar(20) NOT NULL,
|
||||
band_15 varchar(20) NOT NULL,
|
||||
band_10 varchar(20) NOT NULL,
|
||||
band_6m varchar(20) NOT NULL,
|
||||
band_4m varchar(20) NOT NULL,
|
||||
band_2m varchar(20) NOT NULL,
|
||||
band_70cm varchar(20) NOT NULL,
|
||||
band_23cm varchar(20) NOT NULL,
|
||||
mode_ssb varchar(20) NOT NULL,
|
||||
mode_cw varchar(20) NOT NULL,
|
||||
serial varchar(20) NOT NULL,
|
||||
point_per_km int(20) NOT NULL,
|
||||
qra varchar(20) NOT NULL,
|
||||
other_exch varchar(255) NOT NULL,
|
||||
scoring varchar(255) NOT NULL,
|
||||
PRIMARY KEY (id),
|
||||
KEY name (name)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;");
|
||||
|
||||
$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,
|
||||
end datetime NOT NULL,
|
||||
template int(11) NOT NULL,
|
||||
serial_num tinyint(11) NOT NULL,
|
||||
PRIMARY KEY (id)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;");
|
||||
|
||||
$this->db->query("CREATE TABLE IF NOT EXISTS `station_profile` (
|
||||
`station_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`station_profile_name` varchar(200) CHARACTER SET utf8mb4 NOT NULL,
|
||||
`station_gridsquare` varchar(100) CHARACTER SET utf8mb4 NOT NULL,
|
||||
`station_city` varchar(100) CHARACTER SET utf8mb4 NOT NULL,
|
||||
`station_iota` varchar(100) CHARACTER SET utf8mb4 NOT NULL,
|
||||
`station_sota` varchar(10) CHARACTER SET utf8mb4 NOT NULL,
|
||||
`station_callsign` varchar(50) CHARACTER SET utf8mb4 DEFAULT NULL,
|
||||
`station_dxcc` int(10) DEFAULT NULL,
|
||||
`station_country` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL,
|
||||
`station_cnty` varchar(200) CHARACTER SET utf8mb4 DEFAULT NULL,
|
||||
`station_cq` int(5) DEFAULT NULL,
|
||||
`station_itu` int(5) DEFAULT NULL,
|
||||
PRIMARY KEY (`station_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1 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->db_debug = true;
|
||||
}
|
||||
|
||||
public function down(){
|
||||
echo "Not possible, sorry.";
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Migration_extenddxccprefix extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$this->db->query("ALTER TABLE dxcc CHANGE COLUMN `prefix` `prefix` varchar(32) NOT NULL; # was varchar(10) NOT NULL");
|
||||
$this->db->query("ALTER TABLE dxcc_entities CHANGE COLUMN `prefix` `prefix` varchar(32) NOT NULL; # was varchar(10) NOT NULL");
|
||||
$this->db->query("ALTER TABLE dxcc_exceptions CHANGE COLUMN `call` `call` varchar(32) NOT NULL; # was varchar(10) NOT NULL");
|
||||
$this->db->query("ALTER TABLE dxcc_prefixes CHANGE COLUMN `call` `call` varchar(32) NOT NULL; # was varchar(10) NOT NULL");
|
||||
}
|
||||
|
||||
public function down(){
|
||||
$this->db->query("ALTER TABLE dxcc CHANGE COLUMN `prefix` `prefix` varchar(10) NOT NULL; # was varchar(10) NOT NULL");
|
||||
$this->db->query("ALTER TABLE dxcc_entities CHANGE COLUMN `prefix` `prefix` varchar(10) NOT NULL; # was varchar(10) NOT NULL");
|
||||
$this->db->query("ALTER TABLE dxcc_exceptions CHANGE COLUMN `call` `call` varchar(10) NOT NULL; # was varchar(10) NOT NULL");
|
||||
$this->db->query("ALTER TABLE dxcc_prefixes CHANGE COLUMN `call` `call` varchar(10) NOT NULL; # was varchar(10) NOT NULL");
|
||||
}
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Migration_lotwusers extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$this->dbforge->add_field(array(
|
||||
'id' => array(
|
||||
'type' => 'INT',
|
||||
'constraint' => 5,
|
||||
'unsigned' => TRUE,
|
||||
'auto_increment' => TRUE
|
||||
),
|
||||
'callsign' => array(
|
||||
'type' => 'VARCHAR',
|
||||
'constraint' => '100',
|
||||
),
|
||||
'upload_date' => array(
|
||||
'type' => 'datetime',
|
||||
'null' => TRUE,
|
||||
),
|
||||
));
|
||||
$this->dbforge->add_key('id', TRUE);
|
||||
$this->dbforge->create_table('lotw_userlist');
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_table('lotw_userlist');
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Migration_qslviavarchar extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$this->db->db_debug = false;
|
||||
$this->db->query("ALTER TABLE ".$this->config->item('table_name')." CHANGE COLUMN COL_QSL_VIA COL_QSL_VIA varchar(255) DEFAULT NULL;");
|
||||
$this->db->db_debug = true;
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
echo "Not possible, sorry.";
|
||||
}
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Migration_clubloguserfields extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$user_fields = array(
|
||||
'user_clublog_name VARCHAR(255) DEFAULT NULL',
|
||||
'user_clublog_password VARCHAR(255) DEFAULT NULL',
|
||||
'user_clublog_callsign VARCHAR(255) DEFAULT NULL'
|
||||
);
|
||||
$this->dbforge->add_column('users', $user_fields);
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_column('users', 'user_clublog_name');
|
||||
$this->dbforge->drop_column('users', 'user_clublog_password');
|
||||
$this->dbforge->drop_column('users', 'user_clublog_callsign');
|
||||
}
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Migration_forceint_wrongtype extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$fields = array(
|
||||
'COL_FORCE_INIT' => array(
|
||||
'name' => 'COL_FORCE_INIT',
|
||||
'type' => 'VARCHAR',
|
||||
'constraint' => '2',
|
||||
),
|
||||
|
||||
'COL_SWL' => array(
|
||||
'name' => 'COL_SWL',
|
||||
'type' => 'VARCHAR',
|
||||
'constraint' => '2',
|
||||
),
|
||||
);
|
||||
$this->dbforge->modify_column($this->config->item('table_name'), $fields);
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
echo "Not possible, sorry.";
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Migration_apikeydesc extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$user_fields = array(
|
||||
'description VARCHAR(255) DEFAULT NULL'
|
||||
);
|
||||
$this->dbforge->add_column('api', $user_fields);
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_column('api', 'description');
|
||||
}
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Migration_latlng_wrongtype extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$fields = array(
|
||||
'COL_LAT' => array(
|
||||
'name' => 'COL_LAT',
|
||||
'type' => 'VARCHAR',
|
||||
'constraint' => '15',
|
||||
),
|
||||
|
||||
'COL_LON' => array(
|
||||
'name' => 'COL_LON',
|
||||
'type' => 'VARCHAR',
|
||||
'constraint' => '15',
|
||||
),
|
||||
);
|
||||
$this->dbforge->modify_column($this->config->item('table_name'), $fields);
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
echo "Not possible, sorry.";
|
||||
}
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Migration_mylatlng_wrongtype extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$fields = array(
|
||||
'COL_MY_LAT' => array(
|
||||
'name' => 'COL_MY_LAT',
|
||||
'type' => 'VARCHAR',
|
||||
'constraint' => '15',
|
||||
),
|
||||
|
||||
'COL_MY_LON' => array(
|
||||
'name' => 'COL_MY_LON',
|
||||
'type' => 'VARCHAR',
|
||||
'constraint' => '15',
|
||||
),
|
||||
);
|
||||
$this->dbforge->modify_column($this->config->item('table_name'), $fields);
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
echo "Not possible, sorry.";
|
||||
}
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Migration_col_email_tooshort extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$fields = array(
|
||||
'COL_EMAIL' => array(
|
||||
'name' => 'COL_EMAIL',
|
||||
'type' => 'VARCHAR',
|
||||
'constraint' => '255',
|
||||
)
|
||||
);
|
||||
$this->dbforge->modify_column($this->config->item('table_name'), $fields);
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
echo "Not possible, sorry.";
|
||||
}
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Migration_add_column_logbookid extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$fields = array(
|
||||
'logbook_id int(11) DEFAULT NULL',
|
||||
);
|
||||
|
||||
$this->dbforge->add_column($this->config->item('table_name'), $fields);
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
echo "not possible";
|
||||
}
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Migration_create_logbook_table extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$this->dbforge->add_field(array(
|
||||
'id' => array(
|
||||
'type' => 'INT',
|
||||
'constraint' => 5,
|
||||
'unsigned' => TRUE,
|
||||
'auto_increment' => TRUE
|
||||
),
|
||||
'logbook_name' => array(
|
||||
'type' => 'VARCHAR',
|
||||
'constraint' => '250',
|
||||
),
|
||||
'modified' => array(
|
||||
'type' => 'timestamp',
|
||||
'null' => TRUE,
|
||||
),
|
||||
));
|
||||
$this->dbforge->add_key('id', TRUE);
|
||||
$this->dbforge->create_table('logbooks');
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
echo "not possible";
|
||||
}
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Migration_addfield_to_logbooks_default extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$fields = array(
|
||||
'default_logbook tinyint(1) DEFAULT NULL',
|
||||
);
|
||||
|
||||
$this->dbforge->add_column('logbooks', $fields);
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
echo "not possible";
|
||||
}
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Migration_addfield_to_logbooks_active extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$fields = array(
|
||||
'active_logbook tinyint(1) DEFAULT NULL',
|
||||
);
|
||||
|
||||
$this->dbforge->add_column('logbooks', $fields);
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
echo "not possible";
|
||||
}
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Migration_logbooks_setkeys extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$this->db->db_debug = false;
|
||||
$this->db->query("ALTER TABLE `logbooks` ADD UNIQUE(`id`);");
|
||||
$this->db->query("ALTER TABLE `logbooks` ADD INDEX(`id`);");
|
||||
$this->db->query("ALTER TABLE `logbooks` ADD INDEX(`logbook_name`);");
|
||||
$this->db->db_debug = true;
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
echo "Not possible, sorry.";
|
||||
}
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Migration_delete_logbooks_table extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$this->dbforge->drop_table('logbooks');
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
echo "not possible";
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Migration_delete_logbookid extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$this->dbforge->drop_column($this->config->item('table_name'), 'logbook_id');
|
||||
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
echo "not possible";
|
||||
}
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Migration_add_station_id_to_logbook extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$fields = array(
|
||||
'station_id int(11) DEFAULT NULL',
|
||||
|
||||
);
|
||||
|
||||
$this->dbforge->add_column($this->config->item('table_name'), $fields);
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
echo "not possible";
|
||||
}
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Migration_add_station_active extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Migration_log_setindex_station_id extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$this->db->db_debug = false;
|
||||
$this->db->query("ALTER TABLE ".$this->config->item('table_name')." ADD INDEX(`station_id`);");
|
||||
$this->db->db_debug = true;
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
echo "Not possible, sorry.";
|
||||
}
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Migration_add_eqslqthnickname_to_stationprofile extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
class Migration_col_mode_tooshort extends CI_Migration {
|
||||
public function up()
|
||||
{
|
||||
$fields = array(
|
||||
'COL_MODE' => array(
|
||||
'name' => 'COL_MODE',
|
||||
'type' => 'VARCHAR',
|
||||
'constraint' => '12',
|
||||
)
|
||||
);
|
||||
$this->dbforge->modify_column($this->config->item('table_name'), $fields);
|
||||
}
|
||||
public function down()
|
||||
{
|
||||
echo "Not possible, sorry.";
|
||||
}
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Migration_create_eqsl_images_table extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$this->dbforge->add_field(array(
|
||||
'id' => array(
|
||||
'type' => 'INT',
|
||||
'constraint' => 5,
|
||||
'unsigned' => TRUE,
|
||||
'auto_increment' => TRUE
|
||||
),
|
||||
'qso_id' => array(
|
||||
'type' => 'VARCHAR',
|
||||
'constraint' => '250',
|
||||
),
|
||||
'image_file' => array(
|
||||
'type' => 'VARCHAR',
|
||||
'constraint' => '250',
|
||||
),
|
||||
'modified' => array(
|
||||
'type' => 'timestamp',
|
||||
'null' => TRUE,
|
||||
),
|
||||
));
|
||||
$this->dbforge->add_key('id', TRUE);
|
||||
$this->dbforge->create_table('eQSL_images');
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
echo "not possible";
|
||||
}
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Migration_update_lotw_url extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$sql = "UPDATE config SET lotw_download_url = 'https://lotw.arrl.org/lotwuser/lotwreport.adi' WHERE id=1";
|
||||
$this->db->query($sql);
|
||||
|
||||
$sql = "UPDATE config SET lotw_upload_url = 'https://lotw.arrl.org/lotwuser/upload' WHERE id=1";
|
||||
$this->db->query($sql);
|
||||
|
||||
$sql = "UPDATE config SET lotw_login_url = 'https://lotw.arrl.org/lotwuser/default' WHERE id=1";
|
||||
$this->db->query($sql);
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
?>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,16 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Migration_add_state_to_stationprofile extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Migration_add_qrz_api_to_stationprofile extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,185 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Migration_create_modes_table extends CI_Migration {
|
||||
|
||||
public function up() {
|
||||
$this->dbforge->add_field('id');
|
||||
|
||||
$this->dbforge->add_field(array(
|
||||
'mode' => array(
|
||||
'type' => 'VARCHAR',
|
||||
'constraint' => 12,
|
||||
),
|
||||
'submode' => array(
|
||||
'type' => 'VARCHAR',
|
||||
'constraint' => 12,
|
||||
'null' => TRUE,
|
||||
),
|
||||
'qrgmode' => array(
|
||||
'type' => 'VARCHAR',
|
||||
'constraint' => 4,
|
||||
),
|
||||
'active' => array(
|
||||
'type' => 'INT',
|
||||
),
|
||||
));
|
||||
$this->dbforge->create_table('adif_modes');
|
||||
|
||||
|
||||
$this->db->query("INSERT INTO `adif_modes` (`mode`, `submode`, `qrgmode`, `active`) VALUES('AM', NULL, 'SSB', 1)
|
||||
,('ARDOP', NULL, 'DATA', 0)
|
||||
,('ATV', NULL, 'DATA', 0)
|
||||
,('C4FM', NULL, 'DATA', 1)
|
||||
,('CHIP', NULL, 'DATA', 0)
|
||||
,('CHIP', 'CHIP128', 'DATA', 0)
|
||||
,('CHIP', 'CHIP64', 'DATA', 0)
|
||||
,('CLO', NULL, 'DATA', 0)
|
||||
,('CONTESTI', NULL, 'DATA', 0)
|
||||
,('CW', NULL, 'CW', 1)
|
||||
,('CW', 'PCW', 'CW', 0)
|
||||
,('DIGITALVOICE', NULL, 'DATA', 0)
|
||||
,('DOMINO', NULL, 'DATA', 0)
|
||||
,('DOMINO', 'DOMINOEX', 'DATA', 0)
|
||||
,('DOMINO', 'DOMINOF', 'DATA', 0)
|
||||
,('DSTAR', NULL, 'DATA', 0)
|
||||
,('FAX', NULL, 'DATA', 0)
|
||||
,('FM', NULL, 'SSB', 1)
|
||||
,('FSK441', NULL, 'DATA', 1)
|
||||
,('FT8', NULL, 'DATA', 1)
|
||||
,('HELL', NULL, 'DATA', 1)
|
||||
,('HELL', 'FMHELL', 'DATA', 0)
|
||||
,('HELL', 'FSKHELL', 'DATA', 0)
|
||||
,('HELL', 'HELL80', 'DATA', 1)
|
||||
,('HELL', 'HFSK', 'DATA', 0)
|
||||
,('HELL', 'PSKHELL', 'DATA', 0)
|
||||
,('ISCAT', NULL, 'DATA', 1)
|
||||
,('ISCAT', 'ISCAT-A', 'DATA', 1)
|
||||
,('ISCAT', 'ISCAT-B', 'DATA', 1)
|
||||
,('JT4', NULL, 'DATA', 0)
|
||||
,('JT4', 'JT4A', 'DATA', 0)
|
||||
,('JT4', 'JT4B', 'DATA', 0)
|
||||
,('JT4', 'JT4C', 'DATA', 0)
|
||||
,('JT4', 'JT4D', 'DATA', 0)
|
||||
,('JT4', 'JT4E', 'DATA', 0)
|
||||
,('JT4', 'JT4F', 'DATA', 0)
|
||||
,('JT4', 'JT4G', 'DATA', 0)
|
||||
,('JT44', NULL, 'DATA', 0)
|
||||
,('JT65', NULL, 'DATA', 1)
|
||||
,('JT65', 'JT65A', 'DATA', 0)
|
||||
,('JT65', 'JT65B', 'DATA', 1)
|
||||
,('JT65', 'JT65B2', 'DATA', 0)
|
||||
,('JT65', 'JT65C', 'DATA', 0)
|
||||
,('JT65', 'JT65C2', 'DATA', 0)
|
||||
,('JT6C', NULL, 'DATA', 1)
|
||||
,('JT6M', NULL, 'DATA', 1)
|
||||
,('JT9', NULL, 'DATA', 1)
|
||||
,('JT9', 'JT9-1', 'DATA', 1)
|
||||
,('JT9', 'JT9-10', 'DATA', 0)
|
||||
,('JT9', 'JT9-2', 'DATA', 0)
|
||||
,('JT9', 'JT9-30', 'DATA', 0)
|
||||
,('JT9', 'JT9-5', 'DATA', 0)
|
||||
,('JT9', 'JT9A', 'DATA', 0)
|
||||
,('JT9', 'JT9B', 'DATA', 0)
|
||||
,('JT9', 'JT9C', 'DATA', 0)
|
||||
,('JT9', 'JT9D', 'DATA', 0)
|
||||
,('JT9', 'JT9E', 'DATA', 0)
|
||||
,('JT9', 'JT9E FAST', 'DATA', 0)
|
||||
,('JT9', 'JT9F', 'DATA', 0)
|
||||
,('JT9', 'JT9F FAST', 'DATA', 0)
|
||||
,('JT9', 'JT9G', 'DATA', 0)
|
||||
,('JT9', 'JT9G FAST', 'DATA', 0)
|
||||
,('JT9', 'JT9H', 'DATA', 0)
|
||||
,('JT9', 'JT9H FAST', 'DATA', 0)
|
||||
,('JTMS', NULL, 'DATA', 0)
|
||||
,('JTMSK', NULL, 'DATA', 0)
|
||||
,('MFSK', NULL, 'DATA', 1)
|
||||
,('MFSK', 'FSQCALL', 'DATA', 0)
|
||||
,('MFSK', 'FT4', 'DATA', 1)
|
||||
,('MFSK', 'JS8', 'DATA', 1)
|
||||
,('MFSK', 'MFSK11', 'DATA', 0)
|
||||
,('MFSK', 'MFSK128', 'DATA', 0)
|
||||
,('MFSK', 'MFSK16', 'DATA', 1)
|
||||
,('MFSK', 'MFSK22', 'DATA', 0)
|
||||
,('MFSK', 'MFSK31', 'DATA', 0)
|
||||
,('MFSK', 'MFSK32', 'DATA', 0)
|
||||
,('MFSK', 'MFSK4', 'DATA', 0)
|
||||
,('MFSK', 'MFSK64', 'DATA', 0)
|
||||
,('MFSK', 'MFSK8', 'DATA', 0)
|
||||
,('MSK144', NULL, 'DATA', 1)
|
||||
,('MT63', NULL, 'DATA', 0)
|
||||
,('OLIVIA', NULL, 'DATA', 0)
|
||||
,('OLIVIA', 'OLIVIA 16/10', 'DATA', 0)
|
||||
,('OLIVIA', 'OLIVIA 16/50', 'DATA', 0)
|
||||
,('OLIVIA', 'OLIVIA 32/10', 'DATA', 0)
|
||||
,('OLIVIA', 'OLIVIA 4/125', 'DATA', 0)
|
||||
,('OLIVIA', 'OLIVIA 4/250', 'DATA', 0)
|
||||
,('OLIVIA', 'OLIVIA 8/250', 'DATA', 0)
|
||||
,('OLIVIA', 'OLIVIA 8/500', 'DATA', 0)
|
||||
,('OPERA', NULL, 'DATA', 0)
|
||||
,('OPERA', 'OPERA-BEACON', 'DATA', 0)
|
||||
,('OPERA', 'OPERA-QSO', 'DATA', 0)
|
||||
,('PAC', NULL, 'DATA', 0)
|
||||
,('PAC', 'PAC2', 'DATA', 0)
|
||||
,('PAC', 'PAC3', 'DATA', 0)
|
||||
,('PAC', 'PAC4', 'DATA', 0)
|
||||
,('PAX', NULL, 'DATA', 0)
|
||||
,('PAX', 'PAX2', 'DATA', 0)
|
||||
,('PKT', NULL, 'DATA', 1)
|
||||
,('PSK', NULL, 'DATA', 1)
|
||||
,('PSK', 'FSK31', 'DATA', 0)
|
||||
,('PSK', 'PSK10', 'DATA', 0)
|
||||
,('PSK', 'PSK1000', 'DATA', 0)
|
||||
,('PSK', 'PSK125', 'DATA', 1)
|
||||
,('PSK', 'PSK250', 'DATA', 0)
|
||||
,('PSK', 'PSK31', 'DATA', 1)
|
||||
,('PSK', 'PSK500', 'DATA', 0)
|
||||
,('PSK', 'PSK63', 'DATA', 1)
|
||||
,('PSK', 'PSK63F', 'DATA', 0)
|
||||
,('PSK', 'PSKAM10', 'DATA', 0)
|
||||
,('PSK', 'PSKAM31', 'DATA', 0)
|
||||
,('PSK', 'PSKAM50', 'DATA', 0)
|
||||
,('PSK', 'PSKFEC31', 'DATA', 0)
|
||||
,('PSK', 'QPSK125', 'DATA', 1)
|
||||
,('PSK', 'QPSK250', 'DATA', 0)
|
||||
,('PSK', 'QPSK31', 'DATA', 1)
|
||||
,('PSK', 'QPSK500', 'DATA', 0)
|
||||
,('PSK', 'QPSK63', 'DATA', 1)
|
||||
,('PSK', 'SIM31', 'DATA', 0)
|
||||
,('PSK2K', NULL, 'DATA', 0)
|
||||
,('Q15', NULL, 'DATA', 0)
|
||||
,('QRA64', NULL, 'DATA', 1)
|
||||
,('QRA64', 'QRA64A', 'DATA', 0)
|
||||
,('QRA64', 'QRA64B', 'DATA', 0)
|
||||
,('QRA64', 'QRA64C', 'DATA', 0)
|
||||
,('QRA64', 'QRA64D', 'DATA', 0)
|
||||
,('QRA64', 'QRA64E', 'DATA', 0)
|
||||
,('ROS', NULL, 'DATA', 1)
|
||||
,('ROS', 'ROS-EME', 'DATA', 0)
|
||||
,('ROS', 'ROS-HF', 'DATA', 0)
|
||||
,('ROS', 'ROS-MF', 'DATA', 0)
|
||||
,('RTTY', NULL, 'DATA', 1)
|
||||
,('RTTY', 'ASCI', 'DATA', 0)
|
||||
,('RTTYM', NULL, 'DATA', 0)
|
||||
,('SSB', NULL, 'SSB', 1)
|
||||
,('SSB', 'LSB', 'SSB', 1)
|
||||
,('SSB', 'USB', 'SSB', 1)
|
||||
,('SSTV', NULL, 'DATA', 1)
|
||||
,('T10', NULL, 'DATA', 0)
|
||||
,('THOR', NULL, 'DATA', 0)
|
||||
,('THRB', NULL, 'DATA', 0)
|
||||
,('THRB', 'THRBX', 'DATA', 0)
|
||||
,('TOR', NULL, 'DATA', 0)
|
||||
,('TOR', 'AMTORFEC', 'DATA', 0)
|
||||
,('TOR', 'GTOR', 'DATA', 0)
|
||||
,('V4', NULL, 'DATA', 0)
|
||||
,('VOI', NULL, 'DATA', 0)
|
||||
,('WINMOR', NULL, 'DATA', 0)
|
||||
,('WSPR', NULL, 'DATA', 0);");
|
||||
}
|
||||
|
||||
public function down(){
|
||||
$this->dbforge->drop_table('config');
|
||||
}
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Migration_modify_modes_table extends CI_Migration {
|
||||
|
||||
public function up() {
|
||||
$fields = array(
|
||||
'submode' => array(
|
||||
'name' => 'submode',
|
||||
'type' => 'VARCHAR',
|
||||
'constraint' => '25',
|
||||
)
|
||||
);
|
||||
$this->dbforge->modify_column('adif_modes', $fields);
|
||||
|
||||
$this->db->query("UPDATE `adif_modes` set submode = 'OLIVIA 16/500' where submode = 'OLIVIA 16/50';");
|
||||
$this->db->query("UPDATE `adif_modes` set submode = 'OLIVIA 16/1000' where submode = 'OLIVIA 16/10';");
|
||||
$this->db->query("UPDATE `adif_modes` set submode = 'OLIVIA 32/1000' where submode = 'OLIVIA 32/10';");
|
||||
|
||||
}
|
||||
|
||||
public function down(){
|
||||
echo "Not possible, sorry.";
|
||||
}
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Migration_add_lotw_certs_table extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$this->dbforge->add_field(array(
|
||||
'lotw_cert_id' => array(
|
||||
'type' => 'INT',
|
||||
'constraint' => 1,
|
||||
'unsigned' => TRUE,
|
||||
'auto_increment' => TRUE
|
||||
),
|
||||
|
||||
'callsign' => array(
|
||||
'type' => 'VARCHAR',
|
||||
'constraint' => '100',
|
||||
),
|
||||
|
||||
'cert_dxcc' => array(
|
||||
'type' => 'VARCHAR',
|
||||
'constraint' => '255',
|
||||
),
|
||||
|
||||
'date_created' => array(
|
||||
'type' => 'DATETIME',
|
||||
'null' => TRUE,
|
||||
),
|
||||
|
||||
'date_expires' => array(
|
||||
'type' => 'DATETIME',
|
||||
'null' => TRUE,
|
||||
),
|
||||
));
|
||||
|
||||
$this->dbforge->add_key('lotw_cert_id', TRUE);
|
||||
$this->dbforge->create_table('lotw_certs');
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_table('lotw_certs');
|
||||
}
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Migration_add_key_to_lotw_certs extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$fields = array(
|
||||
'cert_key TEXT',
|
||||
);
|
||||
|
||||
if (!$this->db->field_exists('cert_key', 'lotw_certs')) {
|
||||
$this->dbforge->add_column('lotw_certs', $fields);
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
if ($this->db->field_exists('cert_key', 'lotw_certs')) {
|
||||
$this->dbforge->drop_column('lotw_certs', 'cert_key');
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Migration_add_userid_to_lotw_certs extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$fields = array(
|
||||
'user_id int(11) DEFAULT NULL',
|
||||
);
|
||||
|
||||
|
||||
$this->dbforge->add_column('lotw_certs', $fields);
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_column('lotw_certs', 'user_id');
|
||||
}
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Migration_add_last_upload_to_lotw_certs extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$fields = array(
|
||||
'last_upload DATETIME DEFAULT NULL',
|
||||
);
|
||||
|
||||
|
||||
$this->dbforge->add_column('lotw_certs', $fields);
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_column('lotw_certs', 'last_upload');
|
||||
}
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Migration_add_cert_to_lotw_certs extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$fields = array(
|
||||
'cert TEXT',
|
||||
);
|
||||
|
||||
|
||||
$this->dbforge->add_column('lotw_certs', $fields);
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_column('lotw_certs', 'cert');
|
||||
}
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Migration_add_county_to_stationprofile extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Migration_add_users_measurement_base extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$fields = array(
|
||||
"user_measurement_base varchar(1) default 'K' ",
|
||||
);
|
||||
|
||||
$this->dbforge->add_column('users', $fields);
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_column('users', 'user_measurement_base');
|
||||
}
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Migration_add_dateformat_to_users extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$fields = array(
|
||||
'user_date_format varchar(15) DEFAULT \'d/m/y\'',
|
||||
);
|
||||
|
||||
$this->dbforge->add_column('users', $fields);
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_column('users', 'user_date_format');
|
||||
}
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Migration_delete_lotw_userlist_table extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$this->dbforge->drop_table('lotw_userlist');
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
echo "not possible";
|
||||
}
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Migration_add_user_stylesheet extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$fields = array(
|
||||
'user_stylesheet varchar(255) default "bootstrap.min.css"',
|
||||
);
|
||||
|
||||
$this->dbforge->add_column('users', $fields);
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_column('users', 'user_stylesheet');
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Migration_gridsquare_index extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$sql = "ALTER TABLE ".$this->config->item('table_name')." ADD INDEX `gridsquares` (`COL_GRIDSQUARE`);";
|
||||
$this->db->query($sql);
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Migration_add_qsl_images extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
// 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=InnoDB DEFAULT CHARSET=utf8;");
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->db->query("");
|
||||
}
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Migration_add_signature_to_station_profile extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Migration_add_qrz_upload_realtime_option extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Migration_new_stylesheet_default extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$sql = "UPDATE users SET user_stylesheet = 'darkly'";
|
||||
$this->db->query($sql);
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$sql = "UPDATE users SET user_stylesheet = 'bootstrap.min.css'";
|
||||
$this->db->query($sql);
|
||||
}
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
/*
|
||||
* This migration creates a table called options which will hold global options needed within wavelog
|
||||
* removing the need for lots of configuration files.
|
||||
*/
|
||||
|
||||
class Migration_new_options_table extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
// if table options doesn't exist
|
||||
if (!$this->db->table_exists('options')) {
|
||||
$this->dbforge->add_field(array(
|
||||
'option_id' => array(
|
||||
'type' => 'BIGINT',
|
||||
'constraint' => 20,
|
||||
'unsigned' => TRUE,
|
||||
'auto_increment' => TRUE
|
||||
),
|
||||
|
||||
'option_name' => array(
|
||||
'type' => 'VARCHAR',
|
||||
'constraint' => '191',
|
||||
'null' => TRUE,
|
||||
'unique' => TRUE,
|
||||
),
|
||||
|
||||
'option_value' => array(
|
||||
'type' => 'longtext',
|
||||
),
|
||||
|
||||
'autoload' => array(
|
||||
'type' => 'varchar',
|
||||
'constraint' => '20',
|
||||
'null' => TRUE,
|
||||
)
|
||||
));
|
||||
|
||||
$this->dbforge->add_key('option_id', TRUE);
|
||||
|
||||
$this->dbforge->create_table('options');
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_table('options');
|
||||
}
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
/*
|
||||
* This migration adds the theme 'darkly' as standard/default theme to wavelog.
|
||||
*/
|
||||
|
||||
class Migration_add_default_theme_to_options_table extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$data = array(
|
||||
array('option_name' => "theme", 'option_value' => "darkly", 'autoload' => "yes")
|
||||
);
|
||||
|
||||
$this->db->insert_batch('options', $data);
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
// No option to down
|
||||
}
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
/*
|
||||
* This migration adds the url for the maptileserver to the options table in wavelog
|
||||
*/
|
||||
|
||||
class Migration_add_tileserver_to_options extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$data = array(
|
||||
array('option_name' => "map_tile_server", 'option_value' => "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", 'autoload' => "yes"),
|
||||
array('option_name' => "map_tile_server_copyright", 'option_value' => "Map data © <a href=\"https://www.openstreetmap.org/\">OpenStreetMap</a>", 'autoload' => "yes")
|
||||
);
|
||||
|
||||
$this->db->insert_batch('options', $data);
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
// No option to down
|
||||
}
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
/*
|
||||
* This migration set's english as default language in the options table
|
||||
*/
|
||||
|
||||
class Migration_add_lang_to_options extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$data = array(
|
||||
array('option_name' => "language", 'option_value' => "english", 'autoload' => "yes"),
|
||||
);
|
||||
|
||||
$this->db->insert_batch('options', $data);
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
// No option to down
|
||||
}
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
/*
|
||||
* This migration adds the global_search to the options table.
|
||||
*/
|
||||
|
||||
class Migration_add_globalsearch_to_options extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$data = array(
|
||||
array('option_name' => "global_search", 'option_value' => "false", 'autoload' => "yes"),
|
||||
);
|
||||
|
||||
$this->db->insert_batch('options', $data);
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
// No option to down
|
||||
}
|
||||
}
|
||||
@@ -1,243 +0,0 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
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=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);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('PODXS Three Day Weekend','070-3-DAY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('PODXS 31 Flavors','070-31-FLAVORS',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('PODXS 40m Firecracker Sprint','070-40M-SPRINT',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('PODXS 80m Jay Hudak Memorial Sprint','070-80M-SPRINT',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('PODXS PSKFest','070-PSKFEST',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('PODXS St. Patricks Day','070-ST-PATS-DAY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('PODXS Valentine Sprint','070-VALENTINE-SPRINT',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Ten-Meter RTTY Contest (2011 onwards)','10-RTTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Open Season Ten Meter QSO Party','1010-OPEN-SEASON',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('7th-Area QSO Party','7QP',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Alabama QSO Party','AL-QSO-PARTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('JARL All Asian DX Contest (CW)','ALL-ASIAN-DX-CW',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('JARL All Asian DX Contest (PHONE)','ALL-ASIAN-DX-PHONE',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('ANARTS WW RTTY','ANARTS-RTTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Anatolian WW RTTY','ANATOLIAN-RTTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Asia - Pacific Sprint','AP-SPRINT',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Arkansas QSO Party','AR-QSO-PARTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('ARI DX Contest','ARI-DX',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('ARRL 10 Meter Contest','ARRL-10',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('ARRL 10 GHz and Up Contest','ARRL-10-GHZ',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('ARRL 160 Meter Contest','ARRL-160',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('ARRL 222 MHz and Up Distance Contest','ARRL-222',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('ARRL International DX Contest (CW)','ARRL-DX-CW',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('ARRL International DX Contest (Phone)','ARRL-DX-SSB',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('ARRL EME contest','ARRL-EME',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('ARRL Field Day','ARRL-FIELD-DAY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('ARRL Rookie Roundup (CW)','ARRL-RR-CW',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('ARRL Rookie Roundup (RTTY)','ARRL-RR-RTTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('ARRL Rookie Roundup (Phone)','ARRL-RR-SSB',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('ARRL RTTY Round-Up','ARRL-RTTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('ARRL School Club Roundup','ARRL-SCR',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('ARRL November Sweepstakes (CW)','ARRL-SS-CW',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('ARRL November Sweepstakes (Phone)','ARRL-SS-SSB',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('ARRL August UHF Contest','ARRL-UHF-AUG',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('ARRL January VHF Sweepstakes','ARRL-VHF-JAN',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('ARRL June VHF QSO Party','ARRL-VHF-JUN',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('ARRL September VHF QSO Party','ARRL-VHF-SEP',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Arizona QSO Party','AZ-QSO-PARTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('BARTG Spring RTTY Contest','BARTG-RTTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('BARTG Sprint Contest','BARTG-SPRINT',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('British Columbia QSO Party','BC-QSO-PARTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('California QSO Party','CA-QSO-PARTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('CIS DX Contest','CIS-DX',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Colorado QSO Party','CO-QSO-PARTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('CQ WW 160 Meter DX Contest (CW)','CQ-160-CW',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('CQ WW 160 Meter DX Contest (SSB)','CQ-160-SSB',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('CQ-M International DX Contest','CQ-M',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('CQ World-Wide VHF Contest','CQ-VHF',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('CQ WW WPX Contest (CW)','CQ-WPX-CW',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('CQ/RJ WW RTTY WPX Contest','CQ-WPX-RTTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('CQ WW WPX Contest (SSB)','CQ-WPX-SSB',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('CQ WW DX Contest (CW)','CQ-WW-CW',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('CQ/RJ WW RTTY DX Contest','CQ-WW-RTTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('CQ WW DX Contest (SSB)','CQ-WW-SSB',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Connecticut QSO Party','CT-QSO-PARTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Concurso Verde e Amarelo DX CW Contest','CVA-DX-CW',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Concurso Verde e Amarelo DX SSB Contest','CVA-DX-SSB',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('CWops CW Open Competition','CWOPS-CW-OPEN',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('CWops Mini-CWT Test','CWOPS-CWT',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('WAE DX Contest (CW)','DARC-WAEDC-CW',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('WAE DX Contest (RTTY)','DARC-WAEDC-RTTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('WAE DX Contest (SSB)','DARC-WAEDC-SSB',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('DARC Worked All Germany','DARC-WAG',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Delaware QSO Party','DE-QSO-PARTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('DL-DX RTTY Contest','DL-DX-RTTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('DMC RTTY Contest','DMC-RTTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Concurso Nacional de Telegrafía','EA-CNCW',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Municipios Españoles','EA-DME',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('EA PSK63','EA-PSK63',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Unión de Radioaficionados Españoles RTTY Contest','EA-RTTY (import-only)',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Su Majestad El Rey de España - CW','EA-SMRE-CW',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Su Majestad El Rey de España - SSB','EA-SMRE-SSB',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Atlántico V-UHF','EA-VHF-ATLANTIC',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Combinado de V-UHF','EA-VHF-COM',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Costa del Sol V-UHF','EA-VHF-COSTA-SOL',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Nacional VHF','EA-VHF-EA',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Segovia EA1RCS V-UHF','EA-VHF-EA1RCS',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('QSL V-UHF & 50MHz','EA-VHF-QSL',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Sant Sadurni V-UHF','EA-VHF-SADURNI',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Unión de Radioaficionados Españoles RTTY Contest','EA-WW-RTTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('PSK63 QSO Party','EPC-PSK63',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('EU Sprint','EU Sprint',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('EU HF Championship','EU-HF',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('EU PSK DX Contest','EU-PSK-DX',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('European CW Association 160m CW Party','EUCW160M',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('FISTS Fall Sprint','FALL SPRINT',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Florida QSO Party','FL-QSO-PARTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Georgia QSO Party','GA-QSO-PARTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Hungarian DX Contest','HA-DX',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Helvetia Contest','HELVETIA',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Hawaiian QSO Party','HI-QSO-PARTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('IARC Holyland Contest','HOLYLAND',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Iowa QSO Party','IA-QSO-PARTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('DARC IARU Region 1 Field Day','IARU-FIELD-DAY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('IARU HF World Championship','IARU-HF',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Idaho QSO Party','ID-QSO-PARTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Illinois QSO Party','IL QSO Party',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Indiana QSO Party','IN-QSO-PARTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('JARTS WW RTTY','JARTS-WW-RTTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Japan International DX Contest (CW)','JIDX-CW',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Japan International DX Contest (SSB)','JIDX-SSB',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Mongolian RTTY DX Contest','JT-DX-RTTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Kansas QSO Party','KS-QSO-PARTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Kentucky QSO Party','KY-QSO-PARTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Louisiana QSO Party','LA-QSO-PARTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('DRCG Long Distance Contest (RTTY)','LDC-RTTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('LZ DX Contest','LZ DX',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Maritimes QSO Party','MAR-QSO-PARTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Maryland QSO Party','MD-QSO-PARTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Maine QSO Party','ME-QSO-PARTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Michigan QSO Party','MI-QSO-PARTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Mid-Atlantic QSO Party','MIDATLANTIC-QSO-PARTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Minnesota QSO Party','MN-QSO-PARTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Missouri QSO Party','MO-QSO-PARTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Mississippi QSO Party','MS-QSO-PARTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Montana QSO Party','MT-QSO-PARTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('North America Sprint (CW)','NA-SPRINT-CW',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('North America Sprint (RTTY)','NA-SPRINT-RTTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('North America Sprint (Phone)','NA-SPRINT-SSB',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('North America QSO Party (CW)','NAQP-CW',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('North America QSO Party (RTTY)','NAQP-RTTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('North America QSO Party (Phone)','NAQP-SSB',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('North Carolina QSO Party','NC-QSO-PARTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('North Dakota QSO Party','ND-QSO-PARTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Nebraska QSO Party','NE-QSO-PARTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('New England QSO Party','NEQP',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('New Hampshire QSO Party','NH-QSO-PARTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('New Jersey QSO Party','NJ-QSO-PARTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('New Mexico QSO Party','NM-QSO-PARTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('NRAU-Baltic Contest (CW)','NRAU-BALTIC-CW',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('NRAU-Baltic Contest (SSB)','NRAU-BALTIC-SSB',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Nevada QSO Party','NV-QSO-PARTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('New York QSO Party','NY-QSO-PARTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Oceania DX Contest (CW)','OCEANIA-DX-CW',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Oceania DX Contest (SSB)','OCEANIA-DX-SSB',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Ohio QSO Party','OH-QSO-PARTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Czech Radio Club OK DX Contest','OK-DX-RTTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Czech Radio Club OK-OM DX Contest','OK-OM-DX',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Oklahoma QSO Party','OK-QSO-PARTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Old Man International Sideband Society QSO Party','OMISS-QSO-PARTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Ontario QSO Party','ON-QSO-PARTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Oregon QSO Party','OR-QSO-PARTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Pennsylvania QSO Party','PA-QSO-PARTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Dutch PACC Contest','PACC',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('MDXA PSK DeathMatch (2005-2010)','PSK-DEATHMATCH',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Quebec QSO Party','QC-QSO-PARTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Canadian Amateur Radio Society Contest','RAC (import-only)',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('RAC Canada Day Contest','RAC-CANADA-DAY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('RAC Canada Winter Contest','RAC-CANADA-WINTER',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Russian District Award Contest','RDAC',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Russian DX Contest','RDXC',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Reseau des Emetteurs Francais 160m Contest','REF-160M',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Reseau des Emetteurs Francais Contest (CW)','REF-CW',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Reseau des Emetteurs Francais Contest (SSB)','REF-SSB',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Rede dos Emissores Portugueses Portugal Day HF Contest','REP-PORTUGAL-DAY-HF',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Rhode Island QSO Party','RI-QSO-PARTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('1.8MHz Contest','RSGB-160',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('21/28 MHz Contest (CW)','RSGB-21/28-CW',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('21/28 MHz Contest (SSB)','RSGB-21/28-SSB',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('80m Club Championships','RSGB-80M-CC',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Affiliated Societies Team Contest (CW)','RSGB-AFS-CW',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Affiliated Societies Team Contest (SSB)','RSGB-AFS-SSB',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Club Calls','RSGB-CLUB-CALLS',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Commonwealth Contest','RSGB-COMMONWEALTH',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('IOTA Contest','RSGB-IOTA',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Low Power Field Day','RSGB-LOW-POWER',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('National Field Day','RSGB-NFD',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('RoPoCo','RSGB-ROPOCO',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('SSB Field Day','RSGB-SSB-FD',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Russian Radio RTTY Worldwide Contest','RUSSIAN-RTTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Scandinavian Activity Contest (CW)','SAC-CW',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Scandinavian Activity Contest (SSB)','SAC-SSB',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('SARTG WW RTTY','SARTG-RTTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('South Carolina QSO Party','SC-QSO-PARTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('SCC RTTY Championship','SCC-RTTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('South Dakota QSO Party','SD-QSO-PARTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('SSA Portabeltest','SMP-AUG',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('SSA Portabeltest','SMP-MAY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('PRC SPDX Contest (RTTY)','SP-DX-RTTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('SPAR Winter Field Day','SPAR-WINTER-FD',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('SP DX Contest','SPDXContest',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('FISTS Spring Sprint','SPRING SPRINT',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Scottish-Russian Marathon','SR-MARATHON',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Stew Perry Topband Distance Challenge','STEW-PERRY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('FISTS Summer Sprint','SUMMER SPRINT',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('TARA Grid Dip PSK-RTTY Shindig','TARA-GRID-DIP',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('TARA RTTY Mêlée','TARA-RTTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('TARA Rumble PSK Contest','TARA-RUMBLE',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('TARA Skirmish Digital Prefix Contest','TARA-SKIRMISH',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Ten-Meter RTTY Contest (before 2011)','TEN-RTTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('The Makrothen Contest','TMC-RTTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Tennessee QSO Party','TN-QSO-PARTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Texas QSO Party','TX-QSO-PARTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('UBA Contest (CW)','UBA-DX-CW',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('UBA Contest (SSB)','UBA-DX-SSB',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('European PSK Club BPSK63 Contest','UK-DX-BPSK63',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('UK DX RTTY Contest','UK-DX-RTTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Open Ukraine RTTY Championship','UKR-CHAMP-RTTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Ukrainian DX','UKRAINIAN DX',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('UKSMG 6m Marathon','UKSMG-6M-MARATHON',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('UKSMG Summer Es Contest','UKSMG-SUMMER-ES',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Ukrainian DX Contest','URE-DX (import-only)',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Mobile Amateur Awards Club','US-COUNTIES-QSO',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Utah QSO Party','UT-QSO-PARTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Virginia QSO Party','VA-QSO-PARTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('RCV Venezuelan Independence Day Contest','VENEZ-IND-DAY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Virginia QSO Party','VIRGINIA QSO PARTY (import-only)',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Alessandro Volta RTTY DX Contest','VOLTA-RTTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Washington QSO Party','WA-QSO-PARTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Wisconsin QSO Party','WI-QSO-PARTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('WIA Harry Angel Memorial 80m Sprint','WIA-HARRY ANGEL',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('WIA John Moyle Memorial Field Day','WIA-JMMFD',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('WIA Oceania DX (OCDX) Contest','WIA-OCDX',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('WIA Remembrance Day','WIA-REMEMBRANCE',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('WIA Ross Hull Memorial VHF/UHF Contest','WIA-ROSS HULL',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('WIA Trans Tasman Low Bands Challenge','WIA-TRANS TASMAN',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('WIA VHF UHF Field Days','WIA-VHF/UHF FD',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('WIA VK Shires','WIA-VK SHIRES',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('FISTS Winter Sprint','WINTER SPRINT',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('West Virginia QSO Party','WV-QSO-PARTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('World Wide Digi DX Contest','WW-DIGI',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Wyoming QSO Party','WY-QSO-PARTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('Mexico International Contest (RTTY)','XE-INTL-RTTY',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('YODX HF contest','YOHFDX',1);");
|
||||
$this->db->query("INSERT INTO contest (name, adifname, active) values ('YU DX Contest','YUDXC',1);");
|
||||
}
|
||||
|
||||
public function down(){
|
||||
$this->db->query("");
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
/*
|
||||
* This adds user_sota_lookup to the users table.
|
||||
*/
|
||||
|
||||
class Migration_add_user_sota_lookup extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$fields = array(
|
||||
'user_sota_lookup integer DEFAULT 0',
|
||||
);
|
||||
|
||||
$this->dbforge->add_column('users', $fields);
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_column('users', 'user_sota_lookup');
|
||||
}
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
/*
|
||||
* This migration converts the dxcc_* tables to a utf8mb4 charachter set.
|
||||
*/
|
||||
|
||||
class Migration_changed_dxcc_tables_utf8mb4 extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$this->db->query("ALTER TABLE dxcc_entities CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;");
|
||||
$this->db->query("ALTER TABLE dxcc_exceptions CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;");
|
||||
$this->db->query("ALTER TABLE dxcc_prefixes CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;");
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
/*
|
||||
* This allows the user to disable notes in the header menu.
|
||||
*/
|
||||
|
||||
class Migration_add_user_hide_notes extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$fields = array(
|
||||
'user_show_notes integer DEFAULT 1',
|
||||
);
|
||||
|
||||
$this->dbforge->add_column('users', $fields);
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_column('users', 'user_show_notes');
|
||||
}
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
/*
|
||||
* This migration adds index to COL_CQZ and COL_PROP_MODE in the QSO table.
|
||||
*/
|
||||
|
||||
class Migration_add_index_cqz_prop extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$sql = "ALTER TABLE ".$this->config->item('table_name')." ADD INDEX `HRD_IDX_COL_CQZ` (`COL_CQZ`);";
|
||||
$this->db->query($sql);
|
||||
$sql = "ALTER TABLE ".$this->config->item('table_name')." ADD INDEX `HRD_IDX_COL_PROP_MODE` (`COL_PROP_MODE`);";
|
||||
$this->db->query($sql);
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
/*
|
||||
* This migration adds a value to the options table which is used as cat_timeout
|
||||
*/
|
||||
|
||||
class Migration_add_cat_timeout_to_options extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$data = array(
|
||||
array('option_name' => "cat_timeout_interval", 'option_value' => "1800", 'autoload' => "yes"),
|
||||
);
|
||||
|
||||
$this->db->insert_batch('options', $data);
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
// No option to down
|
||||
}
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
/*
|
||||
* This migration allows the user to define which columns are shown in the logbook.
|
||||
*/
|
||||
|
||||
class Migration_add_user_definable_columns extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$fields = array(
|
||||
'user_column1 varchar(32) default "Mode"',
|
||||
);
|
||||
|
||||
$this->dbforge->add_column('users', $fields);
|
||||
|
||||
$fields = array(
|
||||
'user_column2 varchar(32) default "RSTS"',
|
||||
);
|
||||
|
||||
$this->dbforge->add_column('users', $fields);
|
||||
|
||||
$fields = array(
|
||||
'user_column3 varchar(32) default "RSTR"',
|
||||
);
|
||||
|
||||
$this->dbforge->add_column('users', $fields);
|
||||
|
||||
$fields = array(
|
||||
'user_column4 varchar(32) default "Band"',
|
||||
);
|
||||
|
||||
$this->dbforge->add_column('users', $fields);
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_column('users', 'user_column1');
|
||||
$this->dbforge->drop_column('users', 'user_column2');
|
||||
$this->dbforge->drop_column('users', 'user_column3');
|
||||
$this->dbforge->drop_column('users', 'user_column4');
|
||||
}
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
/*
|
||||
* This migration adds a fifth column recarding to migration no. 69
|
||||
*/
|
||||
|
||||
class Migration_add_fifth_column extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$fields = array(
|
||||
'user_column5 varchar(32) default "Country"',
|
||||
);
|
||||
|
||||
$this->dbforge->add_column('users', $fields);
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_column('users', 'user_column5');
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
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=InnoDB DEFAULT CHARSET=utf8;");
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
/*
|
||||
* Initial creation of the station logbooks database
|
||||
*/
|
||||
|
||||
class Migration_create_station_logbook_table extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
if (!$this->db->table_exists('station_logbooks')) {
|
||||
$this->dbforge->add_field(array(
|
||||
'logbook_id' => array(
|
||||
'type' => 'BIGINT',
|
||||
'constraint' => 20,
|
||||
'unsigned' => TRUE,
|
||||
'auto_increment' => TRUE,
|
||||
'unique' => TRUE
|
||||
),
|
||||
|
||||
'user_id' => array(
|
||||
'type' => 'BIGINT',
|
||||
'constraint' => 20,
|
||||
'unsigned' => TRUE,
|
||||
'auto_increment' => FALSE
|
||||
),
|
||||
|
||||
'logbook_name' => array(
|
||||
'type' => 'VARCHAR',
|
||||
'constraint' => '191',
|
||||
'null' => TRUE
|
||||
),
|
||||
|
||||
'modified' => array(
|
||||
'type' => 'timestamp',
|
||||
'null' => TRUE,
|
||||
)
|
||||
));
|
||||
|
||||
$this->dbforge->add_key('logbook_id', TRUE);
|
||||
$this->dbforge->add_key('user_id', TRUE);
|
||||
|
||||
$this->dbforge->create_table('station_logbooks');
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_table('station_logbooks');
|
||||
}
|
||||
}
|
||||
@@ -1,92 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
/*
|
||||
* Next step after Migration No. 72 is to create a datatable which contains the relations
|
||||
* between station logbooks and station locations.
|
||||
*/
|
||||
|
||||
class Migration_create_station_logbook_relationship_table extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
|
||||
if (!$this->db->table_exists('station_logbooks')) {
|
||||
$this->dbforge->add_field(array(
|
||||
'logbook_id' => array(
|
||||
'type' => 'BIGINT',
|
||||
'constraint' => 20,
|
||||
'unsigned' => TRUE,
|
||||
'auto_increment' => TRUE,
|
||||
'unique' => TRUE
|
||||
),
|
||||
|
||||
'user_id' => array(
|
||||
'type' => 'BIGINT',
|
||||
'constraint' => 20,
|
||||
'unsigned' => TRUE,
|
||||
'auto_increment' => FALSE
|
||||
),
|
||||
|
||||
'logbook_name' => array(
|
||||
'type' => 'VARCHAR',
|
||||
'constraint' => '191',
|
||||
'null' => TRUE
|
||||
),
|
||||
|
||||
'modified' => array(
|
||||
'type' => 'timestamp',
|
||||
'null' => TRUE,
|
||||
)
|
||||
));
|
||||
|
||||
$this->dbforge->add_key('logbook_id', TRUE);
|
||||
$this->dbforge->add_key('user_id', TRUE);
|
||||
|
||||
$this->dbforge->create_table('station_logbooks');
|
||||
}
|
||||
|
||||
if (!$this->db->table_exists('station_logbooks_relationship')) {
|
||||
$this->dbforge->add_field(array(
|
||||
'logbook_relation_id' => array(
|
||||
'type' => 'BIGINT',
|
||||
'constraint' => 20,
|
||||
'unsigned' => TRUE,
|
||||
'auto_increment' => TRUE,
|
||||
'unique' => TRUE
|
||||
),
|
||||
|
||||
'station_logbook_id' => array(
|
||||
'type' => 'BIGINT',
|
||||
'constraint' => 20,
|
||||
'unsigned' => TRUE,
|
||||
'auto_increment' => FALSE
|
||||
),
|
||||
|
||||
'station_location_id' => array(
|
||||
'type' => 'BIGINT',
|
||||
'constraint' => 20,
|
||||
'unsigned' => TRUE,
|
||||
'auto_increment' => FALSE
|
||||
),
|
||||
|
||||
'modified' => array(
|
||||
'type' => 'timestamp',
|
||||
'null' => TRUE,
|
||||
)
|
||||
));
|
||||
|
||||
$this->dbforge->add_key('logbook_relation_id', TRUE);
|
||||
$this->dbforge->add_key('station_logbook_id', TRUE);
|
||||
$this->dbforge->add_key('station_location_id', TRUE);
|
||||
|
||||
$this->dbforge->create_table('station_logbooks_relationship');
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_table('station_logbooks_relationship');
|
||||
}
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Migration_add_userid_to_station_profiles extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$fields = array(
|
||||
'user_id BIGINT(20) DEFAULT NULL',
|
||||
);
|
||||
|
||||
if (!$this->db->field_exists('user_id', 'station_profile')) {
|
||||
$this->dbforge->add_column('station_profile', $fields);
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_column('station_profile', 'user_id');
|
||||
}
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
/*
|
||||
* Allows the user to set which station logbook is the active/selected at the moment.
|
||||
*/
|
||||
|
||||
class Migration_add_active_station_logbook_to_user_table extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$fields = array(
|
||||
'active_station_logbook int(11)',
|
||||
);
|
||||
|
||||
if (!$this->db->field_exists('active_station_logbook', 'users')) {
|
||||
$this->dbforge->add_column('users', $fields);
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_column('users', 'active_station_logbook');
|
||||
}
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Migration_Theme_table extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
// 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=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');");
|
||||
$this->db->query("INSERT INTO themes (name, foldername) values ('Darkly (Dark)','darkly');");
|
||||
$this->db->query("INSERT INTO themes (name, foldername) values ('Default','default');");
|
||||
$this->db->query("INSERT INTO themes (name, foldername) values ('Superhero (Dark)','superhero');");
|
||||
}
|
||||
}
|
||||
|
||||
public function down(){
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
<?php
|
||||
defined('BASEPATH') or exit('No direct script access allowed');
|
||||
|
||||
class Migration_add_userid_to_notes extends CI_Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
$fields = array(
|
||||
'user_id BIGINT(20) DEFAULT NULL',
|
||||
);
|
||||
|
||||
if (!$this->db->field_exists('user_id', 'notes')) {
|
||||
$this->dbforge->add_column('notes', $fields);
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_column('notes', 'user_id');
|
||||
}
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Migration_add_userid_to_hardware extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$fields = array(
|
||||
'user_id BIGINT(20) DEFAULT NULL',
|
||||
);
|
||||
|
||||
if (!$this->db->field_exists('user_id', 'cat')) {
|
||||
$this->dbforge->add_column('cat', $fields);
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_column('cat', 'user_id');
|
||||
}
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
<?php
|
||||
defined('BASEPATH') or exit('No direct script access allowed');
|
||||
|
||||
class Migration_add_userid_to_api extends CI_Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
$fields = array(
|
||||
'user_id BIGINT(20) DEFAULT NULL',
|
||||
);
|
||||
|
||||
if (!$this->db->field_exists('user_id', 'api')) {
|
||||
$this->dbforge->add_column('api', $fields);
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_column('api', 'user_id');
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
<?php
|
||||
defined('BASEPATH') or exit('No direct script access allowed');
|
||||
|
||||
class Migration_update_cas9_qsos extends CI_Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
$this->db->set('COL_SAT_NAME', 'HO-113');
|
||||
$this->db->set('COL_LOTW_QSL_SENT', 'N');
|
||||
$this->db->where('COL_SAT_NAME', 'CAS-9');
|
||||
$this->db->update($this->config->item('table_name'));
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
// Not Possible
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
<?php
|
||||
defined('BASEPATH') or exit('No direct script access allowed');
|
||||
|
||||
class Migration_update_xw2_qsos extends CI_Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
$this->db->set('COL_SAT_NAME', 'HO-113');
|
||||
$this->db->set('COL_LOTW_QSL_SENT', 'N');
|
||||
$this->db->where('COL_SAT_NAME', 'XW-3(CAS-9)');
|
||||
$this->db->update($this->config->item('table_name'));
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
// Not Possible
|
||||
}
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* Class Migration_create_eqsl_images_table
|
||||
*
|
||||
* Creates columnns reset_password_code and reset_password_time in the users table
|
||||
*
|
||||
*/
|
||||
|
||||
class Migration_add_reset_pass_to_users extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
if (!$this->db->field_exists('reset_password_code', 'users')) {
|
||||
$fields = array(
|
||||
'reset_password_code varchar(50) DEFAULT NULL',
|
||||
);
|
||||
$this->dbforge->add_column('users', $fields);
|
||||
}
|
||||
|
||||
if (!$this->db->field_exists('reset_password_date', 'users')) {
|
||||
$fields = array(
|
||||
'reset_password_date TIMESTAMP NULL DEFAULT NULL',
|
||||
);
|
||||
$this->dbforge->add_column('users', $fields);
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_column('users', 'reset_password_code');
|
||||
$this->dbforge->drop_column('users', 'reset_password_date');
|
||||
}
|
||||
}
|
||||
@@ -1,91 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
/*
|
||||
* Same as Migration No. 073
|
||||
*/
|
||||
|
||||
class Migration_create_station_logbook_relationship_table2 extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
|
||||
if (!$this->db->table_exists('station_logbooks')) {
|
||||
$this->dbforge->add_field(array(
|
||||
'logbook_id' => array(
|
||||
'type' => 'BIGINT',
|
||||
'constraint' => 20,
|
||||
'unsigned' => TRUE,
|
||||
'auto_increment' => TRUE,
|
||||
'unique' => TRUE
|
||||
),
|
||||
|
||||
'user_id' => array(
|
||||
'type' => 'BIGINT',
|
||||
'constraint' => 20,
|
||||
'unsigned' => TRUE,
|
||||
'auto_increment' => FALSE
|
||||
),
|
||||
|
||||
'logbook_name' => array(
|
||||
'type' => 'VARCHAR',
|
||||
'constraint' => '191',
|
||||
'null' => TRUE
|
||||
),
|
||||
|
||||
'modified' => array(
|
||||
'type' => 'timestamp',
|
||||
'null' => TRUE,
|
||||
)
|
||||
));
|
||||
|
||||
$this->dbforge->add_key('logbook_id', TRUE);
|
||||
$this->dbforge->add_key('user_id', TRUE);
|
||||
|
||||
$this->dbforge->create_table('station_logbooks');
|
||||
}
|
||||
|
||||
if (!$this->db->table_exists('station_logbooks_relationship')) {
|
||||
$this->dbforge->add_field(array(
|
||||
'logbook_relation_id' => array(
|
||||
'type' => 'BIGINT',
|
||||
'constraint' => 20,
|
||||
'unsigned' => TRUE,
|
||||
'auto_increment' => TRUE,
|
||||
'unique' => TRUE
|
||||
),
|
||||
|
||||
'station_logbook_id' => array(
|
||||
'type' => 'BIGINT',
|
||||
'constraint' => 20,
|
||||
'unsigned' => TRUE,
|
||||
'auto_increment' => FALSE
|
||||
),
|
||||
|
||||
'station_location_id' => array(
|
||||
'type' => 'BIGINT',
|
||||
'constraint' => 20,
|
||||
'unsigned' => TRUE,
|
||||
'auto_increment' => FALSE
|
||||
),
|
||||
|
||||
'modified' => array(
|
||||
'type' => 'timestamp',
|
||||
'null' => TRUE,
|
||||
)
|
||||
));
|
||||
|
||||
$this->dbforge->add_key('logbook_relation_id', TRUE);
|
||||
$this->dbforge->add_key('station_logbook_id', TRUE);
|
||||
$this->dbforge->add_key('station_location_id', TRUE);
|
||||
|
||||
$this->dbforge->create_table('station_logbooks_relationship');
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_table('station_logbooks_relationship');
|
||||
}
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
<?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',
|
||||
'queries',
|
||||
'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
|
||||
}
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
/*
|
||||
Creates column public_slug in table station_logbooks
|
||||
*/
|
||||
|
||||
class Migration_add_public_slug_to_stationlogbooks extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
if ($this->db->table_exists('station_logbooks')) {
|
||||
|
||||
$fields = array(
|
||||
'public_slug' => array(
|
||||
'type' => 'VARCHAR',
|
||||
'constraint' => '191',
|
||||
'null' => TRUE,
|
||||
'unique' => TRUE
|
||||
)
|
||||
);
|
||||
|
||||
if (!$this->db->field_exists('public_slug', 'station_logbooks')) {
|
||||
$this->dbforge->add_column('station_logbooks', $fields);
|
||||
|
||||
$this->dbforge->add_key('public_slug');
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_column('station_logbooks', 'public_slug');
|
||||
}
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
/*
|
||||
Creates column public_slug in table station_logbooks
|
||||
*/
|
||||
|
||||
class Migration_options_autoload_theme extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$this->db->set('autoload', 'yes');
|
||||
$this->db->where('option_name', "theme");
|
||||
$this->db->update('options');
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->db->set('autoload', 'no');
|
||||
$this->db->where('option_name', "theme");
|
||||
$this->db->update('options');
|
||||
}
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* Class Migration_create_eqsl_images_table
|
||||
*
|
||||
* Creates a boolean column with option to allow for activating showing of
|
||||
* qrz.com profile picture in the log QSO section
|
||||
*
|
||||
*/
|
||||
|
||||
class Migration_add_qrz_image_option extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
if (!$this->db->field_exists('user_show_qrz_image', 'users')) {
|
||||
$fields = array(
|
||||
'user_show_qrz_image BOOLEAN DEFAULT FALSE',
|
||||
);
|
||||
$this->dbforge->add_column('users', $fields, 'user_column5');
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_column('users', 'user_show_qrz_image');
|
||||
}
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* Class Migration_add_power_to_cat
|
||||
*
|
||||
* Creates an int column in CAT table that holds value of radio output power
|
||||
*
|
||||
*/
|
||||
|
||||
class Migration_add_power_to_cat extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
if (!$this->db->field_exists('power', 'cat')) {
|
||||
$fields = array(
|
||||
'power INT NULL DEFAULT 0',
|
||||
);
|
||||
$this->dbforge->add_column('cat', $fields, 'sat_name');
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_column('cat', 'power');
|
||||
}
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* Class Migration_add_propmode_to_cat
|
||||
*
|
||||
* Creates a varchar column in CAT table that holds value of propagation mode
|
||||
*
|
||||
*/
|
||||
|
||||
class Migration_add_propmode_to_cat extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
if (!$this->db->field_exists('prop_mode', 'cat')) {
|
||||
$fields = array(
|
||||
'prop_mode VARCHAR(10) DEFAULT NULL',
|
||||
);
|
||||
$this->dbforge->add_column('cat', $fields, 'sat_name');
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_column('cat', 'propmode');
|
||||
}
|
||||
}
|
||||
@@ -1,54 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* Class Migration_make_mode_frequency_null
|
||||
*
|
||||
* Modify frequency and mode column so that NULL is allowed
|
||||
* Basically for propmode != SAT
|
||||
*
|
||||
*/
|
||||
|
||||
class Migration_make_mode_frequency_null extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
if ($this->db->field_exists('frequency', 'cat')) {
|
||||
$fields = array(
|
||||
'frequency' => array(
|
||||
'type' => 'VARCHAR(10) NULL',
|
||||
),
|
||||
);
|
||||
$this->dbforge->modify_column('cat', $fields);
|
||||
}
|
||||
if ($this->db->field_exists('mode', 'cat')) {
|
||||
$fields = array(
|
||||
'mode' => array(
|
||||
'type' => 'VARCHAR(10) NULL',
|
||||
),
|
||||
);
|
||||
$this->dbforge->modify_column('cat', $fields);
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
if ($this->db->field_exists('frequency', 'cat')) {
|
||||
$fields = array(
|
||||
'frequency' => array(
|
||||
'type' => 'VARCHAR(10) NOT NULL',
|
||||
),
|
||||
);
|
||||
$this->dbforge->modify_column('cat', $fields);
|
||||
}
|
||||
if ($this->db->field_exists('mode', 'cat')) {
|
||||
$fields = array(
|
||||
'mode' => array(
|
||||
'type' => 'VARCHAR(10) NOT NULL',
|
||||
),
|
||||
);
|
||||
$this->dbforge->modify_column('cat', $fields);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,65 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
/*
|
||||
* This migration creates a table called thirdparty_logins
|
||||
* This table is used to store third party login details
|
||||
*/
|
||||
|
||||
class Migration_create_thirdpartylogins_table extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
if (!$this->db->table_exists('thirdparty_logins')) {
|
||||
$this->dbforge->add_field(array(
|
||||
'service_id' => array(
|
||||
'type' => 'BIGINT',
|
||||
'constraint' => 20,
|
||||
'unsigned' => TRUE,
|
||||
'auto_increment' => TRUE,
|
||||
'unique' => TRUE
|
||||
),
|
||||
|
||||
'user_id' => array(
|
||||
'type' => 'BIGINT',
|
||||
'constraint' => 20,
|
||||
'unsigned' => TRUE,
|
||||
'auto_increment' => FALSE
|
||||
),
|
||||
|
||||
'service_name' => array(
|
||||
'type' => 'VARCHAR',
|
||||
'constraint' => '255',
|
||||
'null' => TRUE
|
||||
),
|
||||
|
||||
'service_password' => array(
|
||||
'type' => 'VARCHAR',
|
||||
'constraint' => '255',
|
||||
'null' => TRUE
|
||||
),
|
||||
|
||||
'active' => array(
|
||||
'type' => 'BOOLEAN',
|
||||
'null' => TRUE
|
||||
),
|
||||
|
||||
'modified' => array(
|
||||
'type' => 'timestamp',
|
||||
'null' => TRUE,
|
||||
)
|
||||
));
|
||||
|
||||
$this->dbforge->add_key('service_id', TRUE);
|
||||
$this->dbforge->add_key('user_id', TRUE);
|
||||
|
||||
$this->dbforge->create_table('thirdparty_logins');
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_table('thirdparty_logins');
|
||||
}
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
/*
|
||||
Creates column service_username in table thirdparty_logins
|
||||
*/
|
||||
|
||||
class Migration_add_service_username extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
if ($this->db->table_exists('thirdparty_logins')) {
|
||||
|
||||
$fields = array(
|
||||
'service_username' => array(
|
||||
'type' => 'VARCHAR',
|
||||
'constraint' => '255',
|
||||
'null' => TRUE
|
||||
)
|
||||
);
|
||||
|
||||
if (!$this->db->field_exists('service_username', 'thirdparty_logins')) {
|
||||
$this->dbforge->add_column('thirdparty_logins', $fields);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_column('thirdparty_logins', 'service_username');
|
||||
}
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* Class Migration_rename_profile_images
|
||||
*
|
||||
* Renames the qrz profile images column to also make it
|
||||
* suitable for hamqth.com
|
||||
*
|
||||
*/
|
||||
|
||||
class Migration_rename_profile_images extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
if ($this->db->field_exists('user_show_qrz_image', 'users') && !$this->db->field_exists('user_show_profile_image', 'users')) {
|
||||
$fields = array(
|
||||
'user_show_qrz_image' => [ 'name' => 'user_show_profile_image', 'type' => ' BOOLEAN DEFAULT FALSE', ]
|
||||
);
|
||||
$this->dbforge->modify_column('users', $fields);
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
if ($this->db->field_exists('user_show_profile_image', 'users')) {
|
||||
$fields = array(
|
||||
'user_show_profile_image' => [ 'name' => 'user_show_qrz_image', 'type' => ' BOOLEAN DEFAULT FALSE', ]
|
||||
);
|
||||
$this->dbforge->modify_column('users', $fields);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,113 +0,0 @@
|
||||
<?php
|
||||
defined('BASEPATH') or exit('No direct script access allowed');
|
||||
|
||||
class Migration_update_modes_adif313 extends CI_Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
// deactivate C4FM => Import only
|
||||
$this->db->set('active', 0);
|
||||
$this->db->where('mode', 'C4FM');
|
||||
$this->db->update('adif_modes');
|
||||
|
||||
// deactivate DSTAR => Import only
|
||||
$this->db->set('active', 0);
|
||||
$this->db->where('mode', 'DSTAR');
|
||||
$this->db->update('adif_modes');
|
||||
|
||||
// insert new C4FM
|
||||
$this->db->query("insert into adif_modes (mode,submode,qrgmode,active) values ('DIGITALVOICE','C4FM','DATA',1)
|
||||
,('DIGITALVOICE','DMR','DATA',1)
|
||||
,('DIGITALVOICE','DSTAR','DATA',1)
|
||||
,('DYNAMIC',NULL,'DATA',1)
|
||||
,('DYNAMIC','VARAHF','DATA',1)
|
||||
,('DYNAMIC','VARASATELLITE','DATA',1)
|
||||
,('DYNAMIC','VARAFM1200','DATA',1)
|
||||
,('DYNAMIC','VARAFM9600','DATA',1)
|
||||
,('DOMINO','DOM-M','DATA',1)
|
||||
,('DOMINO','DOM4','DATA',1)
|
||||
,('DOMINO','DOM5','DATA',1)
|
||||
,('DOMINO','DOM8','DATA',1)
|
||||
,('DOMINO','DOM11','DATA',1)
|
||||
,('DOMINO','VARAFM9600','DATA',1)
|
||||
,('DOMINO','DOM22','DATA',1)
|
||||
,('DOMINO','DOM44','DATA',1)
|
||||
,('DOMINO','DOM88','DATA',1)
|
||||
,('HELL','HELLX5','DATA',1)
|
||||
,('HELL','HELLX9','DATA',1)
|
||||
,('HELL','SLOWHELL','DATA',1)
|
||||
,('MFSK','FST4','DATA',1)
|
||||
,('MFSK','FST4W','DATA',1)
|
||||
,('MFSK','JTMS','DATA',1)
|
||||
,('MFSK','Q65','DATA',1)
|
||||
,('PSK','8PSK125','DATA',1)
|
||||
,('PSK','8PSK125F','DATA',1)
|
||||
,('PSK','8PSK125FL','DATA',1)
|
||||
,('PSK','8PSK250','DATA',1)
|
||||
,('PSK','8PSK250F','DATA',1)
|
||||
,('PSK','8PSK250FL','DATA',1)
|
||||
,('PSK','8PSK500','DATA',1)
|
||||
,('PSK','8PSK500F','DATA',1)
|
||||
,('PSK','8PSK1000','DATA',1)
|
||||
,('PSK','8PSK1000F','DATA',1)
|
||||
,('PSK','8PSK1200F','DATA',1)
|
||||
,('PSK','PSK63F','DATA',1)
|
||||
,('PSK','PSK63RC4','DATA',1)
|
||||
,('PSK','PSK63RC5','DATA',1)
|
||||
,('PSK','PSK63RC10','DATA',1)
|
||||
,('PSK','PSK63RC20','DATA',1)
|
||||
,('PSK','PSK63RC32','DATA',1)
|
||||
,('PSK','PSK125C12','DATA',1)
|
||||
,('PSK','PSK125R','DATA',1)
|
||||
,('PSK','PSK125RC10','DATA',1)
|
||||
,('PSK','PSK125RC12','DATA',1)
|
||||
,('PSK','PSK125RC16','DATA',1)
|
||||
,('PSK','PSK125RC4','DATA',1)
|
||||
,('PSK','PSK125RC5','DATA',1)
|
||||
,('PSK','PSK250C6','DATA',1)
|
||||
,('PSK','PSK250R','DATA',1)
|
||||
,('PSK','PSK250RC2','DATA',1)
|
||||
,('PSK','PSK250RC3','DATA',1)
|
||||
,('PSK','PSK250RC5','DATA',1)
|
||||
,('PSK','PSK250RC6','DATA',1)
|
||||
,('PSK','PSK250RC7','DATA',1)
|
||||
,('PSK','PSK500C2','DATA',1)
|
||||
,('PSK','PSK500C4','DATA',1)
|
||||
,('PSK','PSK500R','DATA',1)
|
||||
,('PSK','PSK500RC2','DATA',1)
|
||||
,('PSK','PSK500RC3','DATA',1)
|
||||
,('PSK','PSK500RC4','DATA',1)
|
||||
,('PSK','PSK800C2','DATA',1)
|
||||
,('PSK','PSK800RC2','DATA',1)
|
||||
,('PSK','PSK1000C2','DATA',1)
|
||||
,('PSK','PSK1000R','DATA',1)
|
||||
,('PSK','PSK1000RC2','DATA',1)
|
||||
,('THOR','THOR-M','DATA',1)
|
||||
,('THOR','THOR4','DATA',1)
|
||||
,('THOR','THOR5','DATA',1)
|
||||
,('THOR','THOR8','DATA',1)
|
||||
,('THOR','THOR11','DATA',1)
|
||||
,('THOR','THOR16','DATA',1)
|
||||
,('THOR','THOR22','DATA',1)
|
||||
,('THOR','THOR25X4','DATA',1)
|
||||
,('THOR','THOR50X1','DATA',1)
|
||||
,('THOR','THOR50X2','DATA',1)
|
||||
,('THOR','THOR100','DATA',1)
|
||||
,('THRB','THRBX1','DATA',1)
|
||||
,('THRB','THRBX2','DATA',1)
|
||||
,('THRB','THRBX4','DATA',1)
|
||||
,('THRB','THROB1','DATA',1)
|
||||
,('THRB','THROB2','DATA',1)
|
||||
,('THRB','THROB4','DATA',1)
|
||||
,('TOR','NAVTEX','DATA',1)
|
||||
,('TOR','SITORB','DATA',1)");
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
// Not Possible
|
||||
}
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* Class Migration_rename_profile_images
|
||||
*
|
||||
* Renames the qrz profile images column to also make it
|
||||
* suitable for hamqth.com
|
||||
*
|
||||
*/
|
||||
|
||||
class Migration_cat_change_timestamp extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
if ($this->db->field_exists('timestamp', 'cat')) {
|
||||
$this->db->query("ALTER TABLE `cat` CHANGE `timestamp` `timestamp` TIMESTAMP NULL DEFAULT NULL;");
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* Class Migration_add_wwff_columns
|
||||
*
|
||||
* Add WWFF columnds to database to reflect latest ADIF v3.1.3 spec changes
|
||||
* See http://www.adif.org.uk/313/ADIF_313_annotated.htm
|
||||
*
|
||||
*/
|
||||
|
||||
class Migration_add_wwff_columns extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
if (!$this->db->field_exists('COL_WWFF_REF', $this->config->item('table_name'))) {
|
||||
$fields = array(
|
||||
'COL_WWFF_REF VARCHAR(30) DEFAULT NULL',
|
||||
'COL_MY_WWFF_REF VARCHAR(50) DEFAULT NULL',
|
||||
);
|
||||
$this->dbforge->add_column($this->config->item('table_name'), $fields, 'COL_VUCC_GRIDS');
|
||||
|
||||
// Now copy over data from SIG_INFO fields and remove COL_SIG and COL_SIG_INFO only if COL_SIG is WWFF
|
||||
// This cannot be reverted on downgrade to prevent overwriting of other COL_SIG information
|
||||
$this->db->set('COL_WWFF_REF', 'COL_SIG_INFO', FALSE);
|
||||
$this->db->set('COL_SIG_INFO', '');
|
||||
$this->db->set('COL_SIG', '');
|
||||
$this->db->where('COL_SIG', 'WWFF');
|
||||
$this->db->update($this->config->item('table_name'));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_column($this->config->item('table_name'), 'COL_WWFF_REF');
|
||||
$this->dbforge->drop_column($this->config->item('table_name'), 'COL_MY_WWFF_REF');
|
||||
}
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* Class Migration_add_qso_dates_to_lotw_certs
|
||||
*
|
||||
* For validity checks of LoTW we need to check qso dates from
|
||||
* cvertificates rather than the cert issue date itself
|
||||
*
|
||||
*/
|
||||
|
||||
class Migration_add_qso_dates_to_lotw_certs extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
if (!$this->db->field_exists('qso_start_date', 'lotw_certs')) {
|
||||
$fields = array(
|
||||
'qso_end_date DATETIME NULL DEFAULT NULL AFTER `date_expires`',
|
||||
'qso_start_date DATETIME NULL DEFAULT NULL AFTER `date_expires`',
|
||||
);
|
||||
$this->dbforge->add_column('lotw_certs', $fields);
|
||||
}
|
||||
|
||||
// Extract QSO start and end date from x509 certs and insert into
|
||||
// newly created columns
|
||||
|
||||
$query = $this->db->query("SELECT `lotw_cert_id`, `cert` FROM `lotw_certs` WHERE 1");
|
||||
foreach ($query->result() as $cert) {
|
||||
$certdata = openssl_x509_parse($cert->cert,0);
|
||||
$data = array(
|
||||
'qso_start_date' => $certdata['extensions']['1.3.6.1.4.1.12348.1.2'],
|
||||
'qso_end_date' => $certdata['extensions']['1.3.6.1.4.1.12348.1.3'],
|
||||
);
|
||||
$this->db->where('lotw_cert_id', $cert->lotw_cert_id);
|
||||
$this->db->update('lotw_certs', $data);
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_column('lotw_certs', 'qso_start_date');
|
||||
$this->dbforge->drop_column('lotw_certs', 'qso_end_date');
|
||||
}
|
||||
}
|
||||
@@ -1,184 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Migration_add_band_bandxuser extends CI_Migration {
|
||||
public function up()
|
||||
{
|
||||
if (!$this->db->table_exists('bands')) {
|
||||
$this->dbforge->add_field(array(
|
||||
'id' => array(
|
||||
'type' => 'INT',
|
||||
'constraint' => 20,
|
||||
'unsigned' => TRUE,
|
||||
'auto_increment' => TRUE,
|
||||
'unique' => TRUE
|
||||
),
|
||||
|
||||
'band' => array(
|
||||
'type' => 'VARCHAR',
|
||||
'constraint' => 20,
|
||||
'unsigned' => TRUE,
|
||||
'auto_increment' => FALSE
|
||||
),
|
||||
'bandgroup' => array(
|
||||
'type' => 'VARCHAR',
|
||||
'constraint' => 20,
|
||||
'unsigned' => TRUE,
|
||||
'auto_increment' => FALSE
|
||||
),
|
||||
'ssb' => array(
|
||||
'type' => 'bigint',
|
||||
'unsigned' => TRUE,
|
||||
'auto_increment' => FALSE
|
||||
),
|
||||
'data' => array(
|
||||
'type' => 'bigint',
|
||||
'unsigned' => TRUE,
|
||||
'auto_increment' => FALSE
|
||||
),
|
||||
'cw' => array(
|
||||
'type' => 'bigint',
|
||||
'unsigned' => TRUE,
|
||||
'auto_increment' => FALSE
|
||||
)
|
||||
));
|
||||
|
||||
$this->dbforge->add_key('id', TRUE);
|
||||
|
||||
$this->dbforge->create_table('bands');
|
||||
|
||||
$this->db->query("INSERT INTO bands (band, bandgroup, ssb, data, cw) values ('160m', 'hf', '1900000', '1838000', '1830000');");
|
||||
$this->db->query("INSERT INTO bands (band, bandgroup, ssb, data, cw) values ('80m', 'hf', '3700000', '3583000', '3550000');");
|
||||
$this->db->query("INSERT INTO bands (band, bandgroup, ssb, data, cw) values ('60m', 'hf', '5330000', '5330000', '5260000');");
|
||||
$this->db->query("INSERT INTO bands (band, bandgroup, ssb, data, cw) values ('40m', 'hf', '7100000', '7040000', '7020000');");
|
||||
$this->db->query("INSERT INTO bands (band, bandgroup, ssb, data, cw) values ('30m', 'hf', '10120000', '10145000', '10120000');");
|
||||
$this->db->query("INSERT INTO bands (band, bandgroup, ssb, data, cw) values ('20m', 'hf', '14200000', '14080000', '14020000');");
|
||||
$this->db->query("INSERT INTO bands (band, bandgroup, ssb, data, cw) values ('17m', 'hf', '18130000', '18105000', '18080000');");
|
||||
$this->db->query("INSERT INTO bands (band, bandgroup, ssb, data, cw) values ('15m', 'hf', '21300000', '21080000', '21020000');");
|
||||
$this->db->query("INSERT INTO bands (band, bandgroup, ssb, data, cw) values ('12m', 'hf', '24950000', '24925000', '24900000');");
|
||||
$this->db->query("INSERT INTO bands (band, bandgroup, ssb, data, cw) values ('10m', 'hf', '28300000', '28120000', '28050000');");
|
||||
$this->db->query("INSERT INTO bands (band, bandgroup, ssb, data, cw) values ('6m', 'vhf', '50150000', '50230000', '50090000');");
|
||||
$this->db->query("INSERT INTO bands (band, bandgroup, ssb, data, cw) values ('4m', 'vhf', '70200000', '70200000', '70200000');");
|
||||
$this->db->query("INSERT INTO bands (band, bandgroup, ssb, data, cw) values ('2m', 'vhf', '144300000', '144370000', '144050000');");
|
||||
$this->db->query("INSERT INTO bands (band, bandgroup, ssb, data, cw) values ('1.25m', 'vhf', '222100000', '222100000', '222100000');");
|
||||
$this->db->query("INSERT INTO bands (band, bandgroup, ssb, data, cw) values ('70cm', 'uhf', '432200000', '432088000', '432050000');");
|
||||
$this->db->query("INSERT INTO bands (band, bandgroup, ssb, data, cw) values ('33cm', 'uhf', '902100000', '902100000', '902100000');");
|
||||
$this->db->query("INSERT INTO bands (band, bandgroup, ssb, data, cw) values ('23cm', 'shf', '1296000000', '1296138000', '129600000');");
|
||||
$this->db->query("INSERT INTO bands (band, bandgroup, ssb, data, cw) values ('13cm', 'shf', '2320800000', '2320800000', '2320800000');");
|
||||
$this->db->query("INSERT INTO bands (band, bandgroup, ssb, data, cw) values ('9cm', 'shf', '3410000000', '3410000000', '3400000000');");
|
||||
$this->db->query("INSERT INTO bands (band, bandgroup, ssb, data, cw) values ('6cm', 'shf', '5670000000', '5670000000', '5670000000');");
|
||||
$this->db->query("INSERT INTO bands (band, bandgroup, ssb, data, cw) values ('3cm', 'shf', '10225000000', '10225000000', '10225000000');");
|
||||
$this->db->query("INSERT INTO bands (band, bandgroup, ssb, data, cw) values ('1.25cm', 'shf', '24000000000', '24000000000', '240000000000');");
|
||||
$this->db->query("INSERT INTO bands (band, bandgroup, ssb, data, cw) values ('SAT', 'sat', 0, 0, 0);");
|
||||
}
|
||||
|
||||
if (!$this->db->table_exists('bandxuser')) {
|
||||
$this->dbforge->add_field(array(
|
||||
'id' => array(
|
||||
'type' => 'INT',
|
||||
'constraint' => 20,
|
||||
'unsigned' => TRUE,
|
||||
'auto_increment' => TRUE,
|
||||
'unique' => TRUE
|
||||
),
|
||||
|
||||
'bandid' => array(
|
||||
'type' => 'INT',
|
||||
'constraint' => 20,
|
||||
'unsigned' => TRUE,
|
||||
'auto_increment' => FALSE
|
||||
),
|
||||
|
||||
'userid' => array(
|
||||
'type' => 'INT',
|
||||
'constraint' => 20,
|
||||
'unsigned' => TRUE,
|
||||
'auto_increment' => FALSE
|
||||
),
|
||||
|
||||
'active' => array(
|
||||
'type' => 'INT',
|
||||
'constraint' => 20,
|
||||
'unsigned' => TRUE,
|
||||
'auto_increment' => FALSE
|
||||
),
|
||||
|
||||
'cq' => array(
|
||||
'type' => 'INT',
|
||||
'constraint' => 20,
|
||||
'unsigned' => TRUE,
|
||||
'auto_increment' => FALSE
|
||||
),
|
||||
|
||||
'dok' => array(
|
||||
'type' => 'INT',
|
||||
'constraint' => 20,
|
||||
'unsigned' => TRUE,
|
||||
'auto_increment' => FALSE
|
||||
),
|
||||
|
||||
'dxcc' => array(
|
||||
'type' => 'INT',
|
||||
'constraint' => 20,
|
||||
'unsigned' => TRUE,
|
||||
'auto_increment' => FALSE
|
||||
),
|
||||
|
||||
'iota' => array(
|
||||
'type' => 'INT',
|
||||
'constraint' => 20,
|
||||
'unsigned' => TRUE,
|
||||
'auto_increment' => FALSE
|
||||
),
|
||||
|
||||
'sig' => array(
|
||||
'type' => 'INT',
|
||||
'constraint' => 20,
|
||||
'unsigned' => TRUE,
|
||||
'auto_increment' => FALSE
|
||||
),
|
||||
|
||||
'sota' => array(
|
||||
'type' => 'INT',
|
||||
'constraint' => 20,
|
||||
'unsigned' => TRUE,
|
||||
'auto_increment' => FALSE
|
||||
),
|
||||
|
||||
'uscounties' => array(
|
||||
'type' => 'INT',
|
||||
'constraint' => 20,
|
||||
'unsigned' => TRUE,
|
||||
'auto_increment' => FALSE
|
||||
),
|
||||
|
||||
'was' => array(
|
||||
'type' => 'INT',
|
||||
'constraint' => 20,
|
||||
'unsigned' => TRUE,
|
||||
'auto_increment' => FALSE
|
||||
),
|
||||
|
||||
'vucc' => array(
|
||||
'type' => 'INT',
|
||||
'constraint' => 20,
|
||||
'unsigned' => TRUE,
|
||||
'auto_increment' => FALSE
|
||||
),
|
||||
));
|
||||
|
||||
$this->dbforge->add_key('id', TRUE);
|
||||
|
||||
$this->dbforge->create_table('bandxuser');
|
||||
|
||||
$this->db->query("insert into bandxuser (bandid, userid, active, cq, dok, dxcc, iota, sig, sota, uscounties, was, vucc) select bands.id, users.user_id, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 from bands join users on 1 = 1;");
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_table('bandxuser');
|
||||
$this->dbforge->drop_table('bands');
|
||||
}
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Migration_add_wwff_to_bandxuser extends CI_Migration {
|
||||
public function up()
|
||||
{
|
||||
if (!$this->db->field_exists('wwff', 'bandxuser')) {
|
||||
$fields = array(
|
||||
'wwff' => array(
|
||||
'type' => 'INT',
|
||||
'constraint' => 20,
|
||||
'unsigned' => TRUE,
|
||||
),
|
||||
);
|
||||
$this->dbforge->add_column('bandxuser', $fields);
|
||||
|
||||
$this->db->query("update bandxuser set wwff = 1");
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_column('bandxuser', 'wwff');
|
||||
}
|
||||
}
|
||||
@@ -1,86 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
/*
|
||||
Update CAT table
|
||||
*/
|
||||
|
||||
class Migration_update_cat_table extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
if ($this->db->table_exists('cat')) {
|
||||
if ($this->db->field_exists('uplink_freq', 'cat')) {
|
||||
$this->dbforge->drop_column('cat', 'uplink_freq');
|
||||
}
|
||||
if ($this->db->field_exists('uplink_mode', 'cat')) {
|
||||
$this->dbforge->drop_column('cat', 'uplink_mode');
|
||||
}
|
||||
if ($this->db->field_exists('downlink_freq', 'cat')) {
|
||||
|
||||
$fields = array(
|
||||
|
||||
'downlink_freq' => array(
|
||||
'name' => 'frequency_rx',
|
||||
'type' => 'BIGINT',
|
||||
'constraint' => '13',
|
||||
),
|
||||
);
|
||||
$this->dbforge->modify_column('cat', $fields);
|
||||
|
||||
}
|
||||
if ($this->db->field_exists('downlink_mode', 'cat')) {
|
||||
$fields = array(
|
||||
|
||||
'downlink_mode' => array(
|
||||
'name' => 'mode_rx',
|
||||
'type' => 'VARCHAR',
|
||||
'constraint' => '10',
|
||||
),
|
||||
);
|
||||
$this->dbforge->modify_column('cat', $fields);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
if ($this->db->table_exists('cat')) {
|
||||
if ($this->db->field_exists('frequency_rx', 'cat')) {
|
||||
$fields = array(
|
||||
'frequency_rx' => array(
|
||||
'name' => 'downlink_freq',
|
||||
'type' => 'BIGINT',
|
||||
'null' => TRUE,
|
||||
'default' => NULL,
|
||||
),
|
||||
);
|
||||
$this->dbforge->modify_column('cat', $fields);
|
||||
}
|
||||
if ($this->db->field_exists('mode_rx', 'cat')) {
|
||||
$fields = array(
|
||||
'mode_rx' => array(
|
||||
'name' => 'downlink_mode',
|
||||
'type' => 'VARCHAR(255)',
|
||||
'null' => TRUE,
|
||||
'default' => NULL,
|
||||
),
|
||||
);
|
||||
$this->dbforge->modify_column('cat', $fields);
|
||||
}
|
||||
if (!$this->db->field_exists('uplink_freq', 'cat')) {
|
||||
$fields = array(
|
||||
'uplink_freq bigint(13) DEFAULT NULL AFTER `downlink_freq`',
|
||||
);
|
||||
$this->dbforge->add_column('cat', $fields);
|
||||
}
|
||||
if (!$this->db->field_exists('uplink_mode', 'cat')) {
|
||||
$fields = array(
|
||||
'uplink_mode varchar(255) DEFAULT NULL AFTER `downlink_mode`',
|
||||
);
|
||||
$this->dbforge->add_column('cat', $fields);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
/*
|
||||
Restore initial field settings for frequency as it
|
||||
broke with commit f6feea5
|
||||
*/
|
||||
|
||||
class Migration_make_frequency_bigint_again extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
if ($this->db->table_exists('cat')) {
|
||||
if ($this->db->field_exists('frequency', 'cat')) {
|
||||
$fields = array(
|
||||
'frequency' => array(
|
||||
'name' => 'frequency',
|
||||
'type' => 'BIGINT',
|
||||
'null' => TRUE,
|
||||
'default' => NULL,
|
||||
),
|
||||
);
|
||||
$this->dbforge->modify_column('cat', $fields);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
if ($this->db->table_exists('cat')) {
|
||||
if ($this->db->field_exists('frequency', 'cat')) {
|
||||
$fields = array(
|
||||
'frequency' => array(
|
||||
'name' => 'frequency',
|
||||
'type' => 'VARCHAR(10)',
|
||||
'null' => TRUE,
|
||||
'default' => NULL,
|
||||
),
|
||||
);
|
||||
$this->dbforge->modify_column('cat', $fields);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user