mirror of
https://github.com/claudehohl/Stikked.git
synced 2025-04-25 20:41:20 -05:00
fail on my side
This commit is contained in:
parent
9c5ae14f4a
commit
9b5fc8823b
@ -312,18 +312,25 @@ class Main extends CI_Controller
|
||||
|
||||
//upgrade to CI 3.1.2
|
||||
$fields = $this->db->field_data('sessions');
|
||||
|
||||
if ($field->max_length < 128)
|
||||
foreach ($fields as $field)
|
||||
{
|
||||
$db_prefix = config_item('db_prefix');
|
||||
|
||||
if ($this->db->dbdriver == "postgre")
|
||||
if ($field->name == 'id')
|
||||
{
|
||||
$this->db->query("ALTER TABLE " . $db_prefix . "sessions ALTER COLUMN id SET DATA TYPE varchar(128)");
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->db->query("ALTER TABLE " . $db_prefix . "sessions CHANGE id id VARCHAR(128) NOT NULL");
|
||||
|
||||
if ($field->max_length < 128)
|
||||
{
|
||||
$db_prefix = config_item('db_prefix');
|
||||
|
||||
if ($this->db->dbdriver == "postgre")
|
||||
{
|
||||
$this->db->query("ALTER TABLE " . $db_prefix . "sessions ALTER COLUMN id SET DATA TYPE varchar(128)");
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->db->query("ALTER TABLE " . $db_prefix . "sessions CHANGE id id VARCHAR(128) NOT NULL");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user