blob: 327d8dcaea11c76c71eb1b859d4810158d79df8d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Migration_change_filesize_type extends CI_Migration {
public function up()
{
$prefix = $this->db->dbprefix;
if ($this->db->dbdriver == 'postgre') {
$this->db->query('
ALTER TABLE "'.$prefix.'file_storage"
ALTER "filesize" TYPE bigint;
');
} else {
$this->db->query('
ALTER TABLE `'.$prefix.'file_storage`
MODIFY `filesize` bigint;
');
}
}
public function down()
{
throw new \exceptions\ApiException("migration/downgrade-not-supported", "downgrade not supported");
}
}
|