mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Add member_srl column and reorder columns in admin_log table #2421
This commit is contained in:
parent
e4a100c896
commit
e61723ce5c
2 changed files with 40 additions and 8 deletions
|
|
@ -18,7 +18,7 @@ class adminlogging extends ModuleObject
|
|||
*/
|
||||
function moduleInstall()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -27,7 +27,23 @@ class adminlogging extends ModuleObject
|
|||
*/
|
||||
function checkUpdate()
|
||||
{
|
||||
return FALSE;
|
||||
$oDB = DB::getInstance();
|
||||
if (!$oDB->isColumnExists('admin_log', 'member_srl'))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (!$oDB->isIndexExists('admin_log', 'idx_member_srl'))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
$column_info = $oDB->getColumnInfo('admin_log', 'request_vars');
|
||||
if ($column_info->xetype !== 'bigtext')
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -36,7 +52,21 @@ class adminlogging extends ModuleObject
|
|||
*/
|
||||
function moduleUpdate()
|
||||
{
|
||||
|
||||
$oDB = DB::getInstance();
|
||||
if (!$oDB->isColumnExists('admin_log', 'member_srl'))
|
||||
{
|
||||
$oDB->addColumn('admin_log', 'member_srl', 'number', null, 0, true, 'site_srl');
|
||||
}
|
||||
if (!$oDB->isIndexExists('admin_log', 'idx_member_srl'))
|
||||
{
|
||||
$oDB->addIndex('admin_log', 'idx_member_srl', ['member_srl']);
|
||||
}
|
||||
|
||||
$column_info = $oDB->getColumnInfo('admin_log', 'request_vars');
|
||||
if ($column_info->xetype !== 'bigtext')
|
||||
{
|
||||
$oDB->modifyColumn('admin_log', 'request_vars', 'bigtext');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -45,7 +75,7 @@ class adminlogging extends ModuleObject
|
|||
*/
|
||||
function recompileCache()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
<table name="admin_log">
|
||||
<column name="ipaddress" type="varchar" size="60" notnull="notnull" index="idx_admin_ip" />
|
||||
<column name="regdate" type="date" index="idx_admin_date" />
|
||||
<column name="site_srl" type="number" size="11" default="0" />
|
||||
<column name="id" type="number" notnull="notnull" primary_key="primary_key" auto_increment="auto_increment" />
|
||||
<column name="site_srl" type="number" default="0" />
|
||||
<column name="member_srl" type="number" default="0" index="idx_member_srl" />
|
||||
<column name="module" type="varchar" size="100" />
|
||||
<column name="act" type="varchar" size="100" />
|
||||
<column name="request_vars" type="text" />
|
||||
<column name="request_vars" type="bigtext" />
|
||||
<column name="regdate" type="date" index="idx_admin_date" />
|
||||
<column name="ipaddress" type="varchar" size="60" notnull="notnull" index="idx_admin_ip" />
|
||||
</table>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue