Merge pull request #1751 from MPOS/transaction-index
[UPDATE] Added INDEX to transactions table
This commit is contained in:
commit
8589d84ba9
@ -2,7 +2,7 @@
|
|||||||
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
|
|
||||||
define('MPOS_VERSION', '0.0.4');
|
define('MPOS_VERSION', '0.0.4');
|
||||||
define('DB_VERSION', '0.0.5');
|
define('DB_VERSION', '0.0.6');
|
||||||
define('CONFIG_VERSION', '0.0.7');
|
define('CONFIG_VERSION', '0.0.7');
|
||||||
|
|
||||||
// Fetch installed database version
|
// Fetch installed database version
|
||||||
|
|||||||
@ -133,7 +133,7 @@ CREATE TABLE IF NOT EXISTS `settings` (
|
|||||||
UNIQUE KEY `setting` (`name`)
|
UNIQUE KEY `setting` (`name`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) 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` (
|
CREATE TABLE IF NOT EXISTS `shares` (
|
||||||
`id` bigint(30) NOT NULL AUTO_INCREMENT,
|
`id` bigint(30) NOT NULL AUTO_INCREMENT,
|
||||||
@ -224,7 +224,8 @@ CREATE TABLE IF NOT EXISTS `transactions` (
|
|||||||
KEY `block_id` (`block_id`),
|
KEY `block_id` (`block_id`),
|
||||||
KEY `account_id` (`account_id`),
|
KEY `account_id` (`account_id`),
|
||||||
KEY `type` (`type`),
|
KEY `type` (`type`),
|
||||||
KEY `archived` (`archived`)
|
KEY `archived` (`archived`),
|
||||||
|
KEY `account_id_archived` (`account_id`,`archived`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS `templates` (
|
CREATE TABLE IF NOT EXISTS `templates` (
|
||||||
|
|||||||
2
sql/016_transactions_update.sql
Normal file
2
sql/016_transactions_update.sql
Normal 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';
|
||||||
Loading…
Reference in New Issue
Block a user