diff options
Diffstat (limited to 'install')
-rw-r--r-- | install/database.sql | 4 | ||||
-rw-r--r-- | install/update.php | 11 |
2 files changed, 13 insertions, 2 deletions
diff --git a/install/database.sql b/install/database.sql index c0440c035..9d0401a44 100644 --- a/install/database.sql +++ b/install/database.sql @@ -55,6 +55,7 @@ CREATE TABLE IF NOT EXISTS `account` ( `account_expire_notified` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `account_service_class` char(32) NOT NULL DEFAULT '', `account_level` int(10) unsigned NOT NULL DEFAULT '0', + `account_password_changed` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', PRIMARY KEY (`account_id`), KEY `account_email` (`account_email`), KEY `account_service_class` (`account_service_class`), @@ -65,7 +66,8 @@ CREATE TABLE IF NOT EXISTS `account` ( KEY `account_expires` (`account_expires`), KEY `account_default_channel` (`account_default_channel`), KEY `account_external` (`account_external`), - KEY `account_level` (`account_level`) + KEY `account_level` (`account_level`), + KEY `account_password_changed` (`account_password_changed`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `addon` ( diff --git a/install/update.php b/install/update.php index 5bc5c9aa3..0818cc888 100644 --- a/install/update.php +++ b/install/update.php @@ -1,6 +1,6 @@ <?php -define( 'UPDATE_VERSION' , 1118 ); +define( 'UPDATE_VERSION' , 1119 ); /** * @@ -1314,3 +1314,12 @@ DROP INDEX `channel_a_bookmark` , ADD INDEX `channel_w_like` ( `channel_w_like` } +function update_r1118() { + $r = q("ALTER TABLE `account` ADD `account_password_changed` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', +ADD INDEX ( `account_password_changed` )"); + if($r) + return UPDATE_SUCCESS; + return UPDATE_FAILED; +} + + |