mirror of
https://github.com/slawkens/myaac.git
synced 2026-04-23 10:53:32 +02:00
Add indexes to myaac_account_actions table
This commit is contained in:
@@ -27,7 +27,7 @@ if (version_compare(phpversion(), '8.1', '<')) die('PHP version 8.1 or higher is
|
|||||||
|
|
||||||
const MYAAC = true;
|
const MYAAC = true;
|
||||||
const MYAAC_VERSION = '2.0-dev';
|
const MYAAC_VERSION = '2.0-dev';
|
||||||
const DATABASE_VERSION = 51;
|
const DATABASE_VERSION = 52;
|
||||||
const TABLE_PREFIX = 'myaac_';
|
const TABLE_PREFIX = 'myaac_';
|
||||||
define('START_TIME', microtime(true));
|
define('START_TIME', microtime(true));
|
||||||
define('MYAAC_OS', stripos(PHP_OS, 'WIN') === 0 ? 'WINDOWS' : (strtoupper(PHP_OS) === 'DARWIN' ? 'MAC' : 'LINUX'));
|
define('MYAAC_OS', stripos(PHP_OS, 'WIN') === 0 ? 'WINDOWS' : (strtoupper(PHP_OS) === 'DARWIN' ? 'MAC' : 'LINUX'));
|
||||||
|
|||||||
@@ -5,7 +5,9 @@ CREATE TABLE IF NOT EXISTS `myaac_account_actions`
|
|||||||
`ip` varchar(45) NOT NULL DEFAULT '',
|
`ip` varchar(45) NOT NULL DEFAULT '',
|
||||||
`date` int NOT NULL DEFAULT 0,
|
`date` int NOT NULL DEFAULT 0,
|
||||||
`action` varchar(255) NOT NULL DEFAULT '',
|
`action` varchar(255) NOT NULL DEFAULT '',
|
||||||
PRIMARY KEY (`id`)
|
PRIMARY KEY (`id`),
|
||||||
|
INDEX `myaac_account_actions_account_id` (`account_id`),
|
||||||
|
INDEX `myaac_account_actions_ip` (`ip`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARACTER SET=utf8mb4;
|
) ENGINE=InnoDB DEFAULT CHARACTER SET=utf8mb4;
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS `myaac_account_emails_verify`
|
CREATE TABLE IF NOT EXISTS `myaac_account_emails_verify`
|
||||||
|
|||||||
13
system/migrations/52.php
Normal file
13
system/migrations/52.php
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* 2026-04-12
|
||||||
|
* Add indexes to myaac_account_actions table
|
||||||
|
*/
|
||||||
|
$up = function () use ($db) {
|
||||||
|
$db->query("CREATE INDEX `myaac_account_actions_account_id` ON `myaac_account_actions` (`account_id`);");
|
||||||
|
$db->query("CREATE INDEX `myaac_account_actions_ip` ON `myaac_account_actions` (`ip`);");
|
||||||
|
};
|
||||||
|
|
||||||
|
$down = function () {
|
||||||
|
// nothing to do, to not lose data
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user