diff --git a/sql/mmcfe_ng_structure.sql b/sql/mmcfe_ng_structure.sql index 6fd3457a..6f475060 100644 --- a/sql/mmcfe_ng_structure.sql +++ b/sql/mmcfe_ng_structure.sql @@ -1,4 +1,4 @@ -SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; +SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; @@ -6,15 +6,16 @@ SET time_zone = "+00:00"; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; + CREATE TABLE IF NOT EXISTS `accounts` ( `id` int(255) NOT NULL AUTO_INCREMENT, `is_admin` tinyint(1) NOT NULL DEFAULT '0', `username` varchar(40) NOT NULL, `pass` varchar(255) NOT NULL, `email` varchar(255) DEFAULT NULL COMMENT 'Assocaited email: used for validating users, and re-setting passwords', + `loggedIp` varchar(255) DEFAULT NULL, `is_locked` tinyint(1) NOT NULL DEFAULT '0', `failed_logins` int(5) unsigned DEFAULT '0', - `loggedIp` varchar(255) DEFAULT NULL, `sessionTimeoutStamp` int(255) DEFAULT NULL, `pin` varchar(255) NOT NULL COMMENT 'four digit pin to allow account changes', `api_key` varchar(255) DEFAULT NULL, @@ -41,7 +42,7 @@ CREATE TABLE IF NOT EXISTS `blocks` ( PRIMARY KEY (`id`), UNIQUE KEY `height` (`height`,`blockhash`), KEY `time` (`time`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Discovered blocks persisted from Litecoin Service'; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Discovered blocks persisted from Litecoin Service'; CREATE TABLE IF NOT EXISTS `news` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, @@ -64,10 +65,10 @@ CREATE TABLE IF NOT EXISTS `notifications` ( KEY `active` (`active`), KEY `data` (`data`), KEY `account_id` (`account_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `notification_settings` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `type` varchar(15) NOT NULL, `account_id` int(11) NOT NULL, `active` tinyint(1) NOT NULL DEFAULT '0', @@ -106,7 +107,7 @@ CREATE TABLE IF NOT EXISTS `shares` ( KEY `upstream_result` (`upstream_result`), KEY `our_result` (`our_result`), KEY `username` (`username`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `shares_archive` ( `id` int(255) unsigned NOT NULL AUTO_INCREMENT, @@ -119,7 +120,7 @@ CREATE TABLE IF NOT EXISTS `shares_archive` ( PRIMARY KEY (`id`), UNIQUE KEY `share_id` (`share_id`), KEY `time` (`time`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Archive shares for potential later debugging purposes'; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Archive shares for potential later debugging purposes'; CREATE TABLE IF NOT EXISTS `statistics_shares` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, @@ -130,12 +131,12 @@ CREATE TABLE IF NOT EXISTS `statistics_shares` ( PRIMARY KEY (`id`), KEY `account_id` (`account_id`), KEY `block_id` (`block_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `transactions` ( `id` int(255) NOT NULL AUTO_INCREMENT, `account_id` int(255) unsigned NOT NULL, - `type` enum('Credit','Debit_MP','Debit_AP','Donation','Fee','Orphan_Credit','Orphan_Fee','Orphan_Donation','Credit_PPS','Fee_PPS','Donation_PPS','TXFee','Bonus') DEFAULT NULL, + `type` varchar(25) DEFAULT NULL, `coin_address` varchar(255) DEFAULT NULL, `amount` double DEFAULT '0', `block_id` int(255) DEFAULT NULL, @@ -144,7 +145,7 @@ CREATE TABLE IF NOT EXISTS `transactions` ( KEY `block_id` (`block_id`), KEY `account_id` (`account_id`), KEY `type` (`type`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;