[Migration fix] Renames script 83 to avoid dupliate naming. Fixes script 85 with existing column and too long constraint on utf8mb4.
这个提交包含在:
父节点
dcc4f2b992
当前提交
77217186e5
共有 2 个文件被更改,包括 8 次插入 和 5 次删除
|
|
@ -7,7 +7,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||||
* removing the need for lots of configuration files.
|
* removing the need for lots of configuration files.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class Migration_create_station_logbook_relationship_table extends CI_Migration {
|
class Migration_create_station_logbook_relationship_table2 extends CI_Migration {
|
||||||
|
|
||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
|
|
@ -15,15 +15,18 @@ class Migration_add_public_slug_to_stationlogbooks extends CI_Migration {
|
||||||
$fields = array(
|
$fields = array(
|
||||||
'public_slug' => array(
|
'public_slug' => array(
|
||||||
'type' => 'VARCHAR',
|
'type' => 'VARCHAR',
|
||||||
'constraint' => '200',
|
'constraint' => '191',
|
||||||
'null' => TRUE,
|
'null' => TRUE,
|
||||||
'unique' => TRUE
|
'unique' => TRUE
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->dbforge->add_column('station_logbooks', $fields);
|
if (!$this->db->field_exists('public_slug', 'station_logbooks')) {
|
||||||
|
$this->dbforge->add_column('station_logbooks', $fields);
|
||||||
|
|
||||||
|
$this->dbforge->add_key('public_slug');
|
||||||
|
}
|
||||||
|
|
||||||
$this->dbforge->add_key('public_slug');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
正在加载…
在新工单中引用