1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/agendav_ynh.git synced 2024-09-03 20:36:12 +02:00
agendav_ynh/sources/web/application/migrations/004_ipv6.php
2014-01-07 17:53:08 +01:00

25 lines
813 B
PHP

<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Migration_Ipv6 extends CI_Migration {
public function up() {
// Alter ip address field length
echo "Enlarging ip_address field to support IPv6...\n";
$this->dbforge->modify_column('sessions',
array(
'ip_address' => array(
'TYPE' => 'varchar(45)',
'DEFAULT' => '0',
),
));
}
public function down() {
$this->dbforge->modify_column('sessions',
array(
'ip_address' => array(
'TYPE' => 'varchar(16)',
'DEFAULT' => '0',
),
));
}
}