mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-23 20:32:14 +09:00
Fix #797 add ipaddress column to member table
This commit is contained in:
parent
66a6834204
commit
2a6f991655
4 changed files with 33 additions and 5 deletions
|
|
@ -208,6 +208,12 @@ class member extends ModuleObject {
|
|||
if(!$oDB->isColumnExists("member", "phone_type")) return true;
|
||||
if(!$oDB->isIndexExists("member","idx_phone_type")) return true;
|
||||
|
||||
// Add columns for IP address
|
||||
if(!$oDB->isColumnExists("member", "ipaddress")) return true;
|
||||
if(!$oDB->isIndexExists("member","idx_ipaddress")) return true;
|
||||
if(!$oDB->isColumnExists("member", "last_login_ipaddress")) return true;
|
||||
if(!$oDB->isIndexExists("member","idx_last_login_ipaddress")) return true;
|
||||
|
||||
// Add column for list order
|
||||
if(!$oDB->isColumnExists("member", "list_order")) return true;
|
||||
if(!$oDB->isIndexExists("member","idx_list_order")) return true;
|
||||
|
|
@ -383,6 +389,24 @@ class member extends ModuleObject {
|
|||
{
|
||||
$oDB->addIndex("member","idx_phone_type", array("phone_type"));
|
||||
}
|
||||
|
||||
// Add columns for IP address
|
||||
if(!$oDB->isColumnExists("member", "ipaddress"))
|
||||
{
|
||||
$oDB->addColumn("member", "ipaddress", "varchar", 120, null, false, 'regdate');
|
||||
}
|
||||
if(!$oDB->isColumnExists("member", "last_login_ipaddress"))
|
||||
{
|
||||
$oDB->addColumn("member", "last_login_ipaddress", "varchar", 120, null, false, 'last_login');
|
||||
}
|
||||
if(!$oDB->isIndexExists("member","idx_ipaddress"))
|
||||
{
|
||||
$oDB->addIndex("member","idx_ipaddress", array("ipaddress"));
|
||||
}
|
||||
if(!$oDB->isIndexExists("member","idx_last_login_ipaddress"))
|
||||
{
|
||||
$oDB->addIndex("member","idx_last_login_ipaddress", array("last_login_ipaddress"));
|
||||
}
|
||||
|
||||
// Add column for list order
|
||||
if(!$oDB->isColumnExists("member", "list_order"))
|
||||
|
|
|
|||
|
|
@ -22,10 +22,12 @@
|
|||
<column name="allow_mailing" var="allow_mailing" default="Y" />
|
||||
<column name="allow_message" var="allow_message" default="Y" />
|
||||
<column name="denied" var="denied" default="N" />
|
||||
<column name="limit_date" var="limit_date" />
|
||||
<column name="regdate" var="regdate" default="curdate()" />
|
||||
<column name="change_password_date" var="change_password_date" default="curdate()" />
|
||||
<column name="ipaddress" var="ipaddress" default="ipaddress()" />
|
||||
<column name="last_login" var="last_login" default="curdate()" />
|
||||
<column name="last_login_ipaddress" var="last_login_ipaddress" default="ipaddress()" />
|
||||
<column name="change_password_date" var="change_password_date" default="curdate()" />
|
||||
<column name="limit_date" var="limit_date" />
|
||||
<column name="is_admin" var="is_admin" default="N" />
|
||||
<column name="description" var="description" />
|
||||
<column name="extra_vars" var="extra_vars" />
|
||||
|
|
|
|||
|
|
@ -3,10 +3,10 @@
|
|||
<table name="member" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="member_srl" var="member_srl" filter="number" notnull="notnull" />
|
||||
<column name="last_login" var="last_login" notnull="notnull" default="curdate()" />
|
||||
<column name="last_login_ipaddress" var="last_login_ipaddress" notnull="notnull" default="ipaddress()" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="member_srl" var="member_srl" notnull="notnull" filter="number" />
|
||||
</conditions>
|
||||
</query>
|
||||
</query>
|
||||
|
|
|
|||
|
|
@ -18,9 +18,11 @@
|
|||
<column name="allow_mailing" type="char" size="1" default="Y" notnull="notnull" index="idx_allow_mailing" />
|
||||
<column name="allow_message" type="char" size="1" default="Y" notnull="notnull" />
|
||||
<column name="denied" type="char" size="1" default="N" index="idx_is_denied" />
|
||||
<column name="limit_date" type="date" />
|
||||
<column name="regdate" type="date" index="idx_regdate" />
|
||||
<column name="ipaddress" type="varchar" size="128" index="idx_ipaddress" />
|
||||
<column name="last_login" type="date" index="idx_last_login" />
|
||||
<column name="last_login_ipaddress" type="varchar" size="128" index="idx_last_login_ipaddress" />
|
||||
<column name="limit_date" type="date" />
|
||||
<column name="change_password_date" type="date" />
|
||||
<column name="is_admin" type="char" size="1" default="N" index="idx_is_admin" />
|
||||
<column name="description" type="text" />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue