[Migration] Creates station_logbook table in database.
这个提交包含在:
父节点
9e058dac9a
当前提交
c05d8f8fe0
共有 2 个文件被更改,包括 53 次插入 和 1 次删除
|
|
@ -21,7 +21,7 @@ $config['migration_enabled'] = TRUE;
|
||||||
| be upgraded / downgraded to.
|
| be upgraded / downgraded to.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
$config['migration_version'] = 70;
|
$config['migration_version'] = 71;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,52 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This migration creates a table called options which will hold global options needed within cloudlog
|
||||||
|
* removing the need for lots of configuration files.
|
||||||
|
*/
|
||||||
|
|
||||||
|
class Migration_create_station_logbook_table extends CI_Migration {
|
||||||
|
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
$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');
|
||||||
|
}
|
||||||
|
}
|
||||||
正在加载…
在新工单中引用