Update autologin table with more columns

This commit is contained in:
Kijin Sung 2017-02-08 16:16:31 +09:00
parent af41f36bf7
commit ca9a0aef25
5 changed files with 87 additions and 2 deletions

View file

@ -204,6 +204,9 @@ class member extends ModuleObject {
if(!$oDB->isColumnExists("member", "list_order")) return true;
if(!$oDB->isIndexExists("member","idx_list_order")) return true;
// Check autologin table
if(!$oDB->isColumnExists("member_autologin", "security_key")) return true;
$oModuleModel = getModel('module');
$config = $oModuleModel->getModuleConfig('member');
@ -314,6 +317,13 @@ class member extends ModuleObject {
{
$oDB->addIndex("member","idx_list_order", array("list_order"));
}
// Check autologin table
if(!$oDB->isColumnExists("member_autologin", "security_key"))
{
$oDB->dropTable('member_autologin');
$oDB->createTableByXmlFile($this->module_path . '/schemas/member_autologin.xml');
}
$oModuleModel = getModel('module');
$config = $oModuleModel->getModuleConfig('member');

View file

@ -1,4 +1,10 @@
<table name="member_autologin">
<column name="autologin_key" type="varchar" size="80" notnull="notnull" unique="unique_key" />
<column name="member_srl" type="number" size="11" notnull="notnull" unique="unique_key" />
<column name="autologin_key" type="varchar" size="80" notnull="notnull" primary_key="primary_key" />
<column name="security_key" type="varchar" size="80" notnull="notnull" />
<column name="member_srl" type="number" notnull="notnull" index="idx_member_srl" />
<column name="regdate" type="date" index="idx_regdate" />
<column name="ipaddress" type="varchar" size="80" />
<column name="last_visit" type="date" index="idx_last_visited" />
<column name="last_ipaddress" type="varchar" size="80" />
<column name="user_agent" type="varchar" size="160" />
</table>