mirror of
https://github.com/magicbug/Cloudlog
synced 2024-11-23 01:59:14 +00:00
43f46f9879
Signed-off-by: phl0 <github@florian-wolters.de>
46 lines
1.3 KiB
PHP
46 lines
1.3 KiB
PHP
<?php
|
|
|
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
|
|
|
/*
|
|
Restore initial field settings for frequency as it
|
|
broke with commit f6feea5
|
|
*/
|
|
|
|
class Migration_make_frequency_bigint_again extends CI_Migration {
|
|
|
|
public function up()
|
|
{
|
|
if ($this->db->table_exists('cat')) {
|
|
if ($this->db->field_exists('frequency', 'cat')) {
|
|
$fields = array(
|
|
'frequency' => array(
|
|
'name' => 'frequency',
|
|
'type' => 'BIGINT',
|
|
'null' => TRUE,
|
|
'default' => NULL,
|
|
),
|
|
);
|
|
$this->dbforge->modify_column('cat', $fields);
|
|
}
|
|
}
|
|
}
|
|
|
|
public function down()
|
|
{
|
|
if ($this->db->table_exists('cat')) {
|
|
if ($this->db->field_exists('frequency', 'cat')) {
|
|
$fields = array(
|
|
'frequency' => array(
|
|
'name' => 'frequency',
|
|
'type' => 'VARCHAR(10)',
|
|
'null' => TRUE,
|
|
'default' => NULL,
|
|
),
|
|
);
|
|
$this->dbforge->modify_column('cat', $fields);
|
|
}
|
|
}
|
|
}
|
|
}
|