Merge branch 'station_logbooks' of https://github.com/magicbug/Cloudlog into station_logbooks

这个提交包含在:
Peter Goodhall 2021-10-12 15:19:41 +01:00
当前提交 2d2a480fbb
共有 4 个文件被更改,包括 17 次插入12 次删除

查看文件

@ -5,17 +5,18 @@ class Migration_Theme_table extends CI_Migration {
public function up()
{
// create themes table
$this->db->query("create table themes (id integer not null auto_increment, name varchar(256) not null, foldername varchar(256) not null, primary key (id)) ENGINE=myisam DEFAULT CHARSET=utf8;");
$this->db->query("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');");
if (!$this->db->table_exists('themes')) {
$this->db->query("create table themes (id integer not null auto_increment, name varchar(256) not null, foldername varchar(256) not null, primary key (id)) ENGINE=myisam DEFAULT CHARSET=utf8;");
$this->db->query("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(){
$this->db->query("");
}
}

查看文件

@ -9,7 +9,9 @@ class Migration_add_userid_to_notes extends CI_Migration
'user_id BIGINT(20) DEFAULT NULL',
);
$this->dbforge->add_column('notes', $fields);
if (!$this->db->field_exists('user_id', 'notes')) {
$this->dbforge->add_column('notes', $fields);
}
}
public function down()

查看文件

@ -10,7 +10,9 @@ class Migration_add_userid_to_hardware extends CI_Migration {
'user_id BIGINT(20) DEFAULT NULL',
);
$this->dbforge->add_column('cat', $fields);
if (!$this->db->field_exists('user_id', 'cat')) {
$this->dbforge->add_column('cat', $fields);
}
}
public function down()

查看文件

@ -2216,8 +2216,8 @@ class Logbook_model extends CI_Model {
$dxcc_exceptions = $this->db->select('`entity`, `adif`, `cqz`')
->where('call', $call)
->where('(start <= CURDATE()')
->or_where('start is null', NULL, false)
->where('end >= CURDATE()')
->or_where('start is null)', NULL, false)
->where('(end >= CURDATE()')
->or_where('end is null)', NULL, false)
->get('dxcc_exceptions');