mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 17:21:39 +09:00
Fix #1387 increase MIME type field length
This commit is contained in:
parent
a22f6e5805
commit
2fc5850406
1 changed files with 16 additions and 0 deletions
|
|
@ -93,10 +93,18 @@ class file extends ModuleObject
|
|||
{
|
||||
return true;
|
||||
}
|
||||
if($oDB->getColumnInfo('files', 'mime_type')->size < 100)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if(!$oDB->isColumnExists('files', 'original_type'))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if($oDB->getColumnInfo('files', 'original_type')->size < 100)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if(!$oDB->isColumnExists('files', 'width'))
|
||||
{
|
||||
return true;
|
||||
|
|
@ -192,6 +200,10 @@ class file extends ModuleObject
|
|||
{
|
||||
$oDB->addColumn('files', 'mime_type', 'varchar', '100', '', true, 'file_size');
|
||||
}
|
||||
if($oDB->getColumnInfo('files', 'mime_type')->size < 100)
|
||||
{
|
||||
$oDB->modifyColumn('files', 'mime_type', 'varchar', 100, '', true);
|
||||
}
|
||||
if(!$oDB->isIndexExists('files', 'idx_mime_type'))
|
||||
{
|
||||
$oDB->addIndex('files', 'idx_mime_type', 'mime_type');
|
||||
|
|
@ -200,6 +212,10 @@ class file extends ModuleObject
|
|||
{
|
||||
$oDB->addColumn('files', 'original_type', 'varchar', '100', null, false, 'mime_type');
|
||||
}
|
||||
if($oDB->getColumnInfo('files', 'original_type')->size < 100)
|
||||
{
|
||||
$oDB->modifyColumn('files', 'original_type', 'varchar', 100, '', false);
|
||||
}
|
||||
if(!$oDB->isColumnExists('files', 'width'))
|
||||
{
|
||||
$oDB->addColumn('files', 'width', 'number', '11', null, false, 'original_type');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue