Merge pull request #1751 from MPOS/transaction-index

[UPDATE] Added INDEX to transactions table
This commit is contained in:
Sebastian Grewe 2014-02-13 14:58:39 +01:00
commit 8589d84ba9
3 changed files with 6 additions and 3 deletions

View File

@ -2,7 +2,7 @@
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
define('MPOS_VERSION', '0.0.4');
define('DB_VERSION', '0.0.5');
define('DB_VERSION', '0.0.6');
define('CONFIG_VERSION', '0.0.7');
// Fetch installed database version

View File

@ -133,7 +133,7 @@ CREATE TABLE IF NOT EXISTS `settings` (
UNIQUE KEY `setting` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `settings` (`name`, `value`) VALUES ('DB_VERSION', '0.0.5');
INSERT INTO `settings` (`name`, `value`) VALUES ('DB_VERSION', '0.0.6');
CREATE TABLE IF NOT EXISTS `shares` (
`id` bigint(30) NOT NULL AUTO_INCREMENT,
@ -224,7 +224,8 @@ CREATE TABLE IF NOT EXISTS `transactions` (
KEY `block_id` (`block_id`),
KEY `account_id` (`account_id`),
KEY `type` (`type`),
KEY `archived` (`archived`)
KEY `archived` (`archived`),
KEY `account_id_archived` (`account_id`,`archived`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `templates` (

View File

@ -0,0 +1,2 @@
CREATE INDEX `account_id_archived` ON `transactions` (`account_id`,`archived`);
INSERT INTO `settings` (`name`, `value`) VALUES ('DB_VERSION', '0.0.6') ON DUPLICATE KEY UPDATE `value` = '0.0.6';