mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-26 05:42:13 +09:00
Fix #2335 allow selecting a category as default
This commit is contained in:
parent
d3415b5e01
commit
684b86a636
11 changed files with 106 additions and 29 deletions
|
|
@ -105,6 +105,10 @@ class Document extends ModuleObject
|
|||
// 2017.12.21 Add an index for nick_name
|
||||
if(!$oDB->isIndexExists('documents', 'idx_nick_name')) return true;
|
||||
|
||||
// 2024.05.04 Add default category
|
||||
if(!$oDB->isColumnExists('document_categories', 'is_default')) return true;
|
||||
if(!$oDB->isIndexExists('document_categories', 'idx_list_order')) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -205,6 +209,16 @@ class Document extends ModuleObject
|
|||
{
|
||||
$oDB->addIndex('documents', 'idx_nick_name', array('nick_name'));
|
||||
}
|
||||
|
||||
// 2024.05.04 Add default category
|
||||
if(!$oDB->isColumnExists('document_categories', 'is_default'))
|
||||
{
|
||||
$oDB->addColumn('document_categories', 'is_default', 'char', '1', 'N', true, 'expand');
|
||||
}
|
||||
if(!$oDB->isIndexExists('document_categories', 'idx_list_order'))
|
||||
{
|
||||
$oDB->addIndex('document_categories', 'idx_list_order', array('list_order'));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue