[Station Logbooks] Adds column public_slug this will be used for generating the publicly sharable dashboard in v2 cloudlog
这个提交包含在:
父节点
415a24eaf6
当前提交
73d4e8bcff
共有 2 个文件被更改,包括 35 次插入 和 1 次删除
|
|
@ -21,7 +21,7 @@ $config['migration_enabled'] = TRUE;
|
||||||
| be upgraded / downgraded to.
|
| be upgraded / downgraded to.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
$config['migration_version'] = 84;
|
$config['migration_version'] = 85;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,34 @@
|
||||||
|
<?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' => '200',
|
||||||
|
'null' => TRUE,
|
||||||
|
'unique' => TRUE
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->dbforge->add_column('station_logbooks', $fields);
|
||||||
|
|
||||||
|
$this->dbforge->add_key('public_slug');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
$this->dbforge->drop_column('station_logbooks', 'public_slug');
|
||||||
|
}
|
||||||
|
}
|
||||||
正在加载…
在新工单中引用