mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Update autologin table with more columns
This commit is contained in:
parent
af41f36bf7
commit
ca9a0aef25
5 changed files with 87 additions and 2 deletions
|
|
@ -956,6 +956,29 @@ class DBCubrid extends DB
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Drop table
|
||||
*
|
||||
* @param string $name
|
||||
* @return bool
|
||||
*/
|
||||
function dropTable($table_name)
|
||||
{
|
||||
// Generate the drop query
|
||||
$query = sprintf('drop class "%s"', $this->addQuotes($this->prefix . $table_name));
|
||||
|
||||
// Execute the drop query
|
||||
$output = $this->_query($query);
|
||||
if($output)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles insertAct
|
||||
* @param Object $queryObject
|
||||
|
|
|
|||
|
|
@ -748,6 +748,29 @@ class DBMssql extends DB
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Drop table
|
||||
*
|
||||
* @param string $name
|
||||
* @return bool
|
||||
*/
|
||||
function dropTable($table_name)
|
||||
{
|
||||
// Generate the drop query
|
||||
$query = sprintf('DROP TABLE %s', $this->addQuotes($this->prefix . $table_name));
|
||||
|
||||
// Execute the drop query
|
||||
$output = $this->_query($query);
|
||||
if($output)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles insertAct
|
||||
* @todo Lookup _filterNumber against sql injection - see if it is still needed and how to integrate
|
||||
|
|
|
|||
|
|
@ -682,6 +682,29 @@ class DBMysql extends DB
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Drop table
|
||||
*
|
||||
* @param string $name
|
||||
* @return bool
|
||||
*/
|
||||
function dropTable($table_name)
|
||||
{
|
||||
// Generate the drop query
|
||||
$query = sprintf('DROP TABLE `%s`', $this->addQuotes($this->prefix . $table_name));
|
||||
|
||||
// Execute the drop query
|
||||
$output = $this->_query($query);
|
||||
if($output)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles insertAct
|
||||
* @param Object $queryObject
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue