[DXpedition] Create a dxpedition table
Creates a dxpedition table this will be used to store upcoming dxpedition data from external sources.
这个提交包含在:
父节点
ae2bd9ee94
当前提交
43c44bdd02
共有 2 个文件被更改,包括 60 次插入 和 1 次删除
|
|
@ -22,7 +22,7 @@ $config['migration_enabled'] = TRUE;
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$config['migration_version'] = 153;
|
$config['migration_version'] = 154;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,59 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
defined('BASEPATH') or exit('No direct script access allowed');
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Create a dxpedition table
|
||||||
|
*/
|
||||||
|
|
||||||
|
class Migration_create_dxpedition_table extends CI_Migration
|
||||||
|
{
|
||||||
|
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
/* check if the dxpedition table exists if not create dxpedition table */
|
||||||
|
if (!$this->db->table_exists('dxpedition')) {
|
||||||
|
|
||||||
|
$this->dbforge->add_field(array(
|
||||||
|
'id' => array(
|
||||||
|
'type' => 'INT',
|
||||||
|
'constraint' => 6,
|
||||||
|
'unsigned' => TRUE,
|
||||||
|
'auto_increment' => TRUE
|
||||||
|
),
|
||||||
|
'start_date' => array(
|
||||||
|
'type' => 'DATE',
|
||||||
|
'null' => TRUE,
|
||||||
|
),
|
||||||
|
'end_date' => array(
|
||||||
|
'type' => 'DATE',
|
||||||
|
'null' => TRUE,
|
||||||
|
),
|
||||||
|
'callsign' => array(
|
||||||
|
'type' => 'VARCHAR',
|
||||||
|
'constraint' => '255',
|
||||||
|
'null' => TRUE,
|
||||||
|
),
|
||||||
|
'country' => array(
|
||||||
|
'type' => 'VARCHAR',
|
||||||
|
'constraint' => '255',
|
||||||
|
'null' => TRUE,
|
||||||
|
),
|
||||||
|
'notes' => array(
|
||||||
|
'type' => 'VARCHAR',
|
||||||
|
'constraint' => '255',
|
||||||
|
'null' => TRUE,
|
||||||
|
),
|
||||||
|
));
|
||||||
|
$this->dbforge->add_key('id', TRUE);
|
||||||
|
$this->dbforge->add_key('callsign', TRUE);
|
||||||
|
|
||||||
|
$this->dbforge->create_table('dxpedition');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
$this->dbforge->drop_table('dxpedition');
|
||||||
|
}
|
||||||
|
}
|
||||||
正在加载…
在新工单中引用