adding most recent full structure for DB
This commit is contained in:
parent
294b50ccde
commit
1ae93a8db8
@ -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";
|
SET time_zone = "+00:00";
|
||||||
|
|
||||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
/*!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 @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
||||||
/*!40101 SET NAMES utf8 */;
|
/*!40101 SET NAMES utf8 */;
|
||||||
|
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS `accounts` (
|
CREATE TABLE IF NOT EXISTS `accounts` (
|
||||||
`id` int(255) NOT NULL AUTO_INCREMENT,
|
`id` int(255) NOT NULL AUTO_INCREMENT,
|
||||||
`is_admin` tinyint(1) NOT NULL DEFAULT '0',
|
`is_admin` tinyint(1) NOT NULL DEFAULT '0',
|
||||||
`username` varchar(40) NOT NULL,
|
`username` varchar(40) NOT NULL,
|
||||||
`pass` varchar(255) NOT NULL,
|
`pass` varchar(255) NOT NULL,
|
||||||
`email` varchar(255) DEFAULT NULL COMMENT 'Assocaited email: used for validating users, and re-setting passwords',
|
`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',
|
`is_locked` tinyint(1) NOT NULL DEFAULT '0',
|
||||||
`failed_logins` int(5) unsigned DEFAULT '0',
|
`failed_logins` int(5) unsigned DEFAULT '0',
|
||||||
`loggedIp` varchar(255) DEFAULT NULL,
|
|
||||||
`sessionTimeoutStamp` int(255) DEFAULT NULL,
|
`sessionTimeoutStamp` int(255) DEFAULT NULL,
|
||||||
`pin` varchar(255) NOT NULL COMMENT 'four digit pin to allow account changes',
|
`pin` varchar(255) NOT NULL COMMENT 'four digit pin to allow account changes',
|
||||||
`api_key` varchar(255) DEFAULT NULL,
|
`api_key` varchar(255) DEFAULT NULL,
|
||||||
@ -41,7 +42,7 @@ CREATE TABLE IF NOT EXISTS `blocks` (
|
|||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
UNIQUE KEY `height` (`height`,`blockhash`),
|
UNIQUE KEY `height` (`height`,`blockhash`),
|
||||||
KEY `time` (`time`)
|
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` (
|
CREATE TABLE IF NOT EXISTS `news` (
|
||||||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
@ -64,10 +65,10 @@ CREATE TABLE IF NOT EXISTS `notifications` (
|
|||||||
KEY `active` (`active`),
|
KEY `active` (`active`),
|
||||||
KEY `data` (`data`),
|
KEY `data` (`data`),
|
||||||
KEY `account_id` (`account_id`)
|
KEY `account_id` (`account_id`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS `notification_settings` (
|
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,
|
`type` varchar(15) NOT NULL,
|
||||||
`account_id` int(11) NOT NULL,
|
`account_id` int(11) NOT NULL,
|
||||||
`active` tinyint(1) NOT NULL DEFAULT '0',
|
`active` tinyint(1) NOT NULL DEFAULT '0',
|
||||||
@ -106,7 +107,7 @@ CREATE TABLE IF NOT EXISTS `shares` (
|
|||||||
KEY `upstream_result` (`upstream_result`),
|
KEY `upstream_result` (`upstream_result`),
|
||||||
KEY `our_result` (`our_result`),
|
KEY `our_result` (`our_result`),
|
||||||
KEY `username` (`username`)
|
KEY `username` (`username`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS `shares_archive` (
|
CREATE TABLE IF NOT EXISTS `shares_archive` (
|
||||||
`id` int(255) unsigned NOT NULL AUTO_INCREMENT,
|
`id` int(255) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
@ -119,7 +120,7 @@ CREATE TABLE IF NOT EXISTS `shares_archive` (
|
|||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
UNIQUE KEY `share_id` (`share_id`),
|
UNIQUE KEY `share_id` (`share_id`),
|
||||||
KEY `time` (`time`)
|
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` (
|
CREATE TABLE IF NOT EXISTS `statistics_shares` (
|
||||||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
@ -130,12 +131,12 @@ CREATE TABLE IF NOT EXISTS `statistics_shares` (
|
|||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
KEY `account_id` (`account_id`),
|
KEY `account_id` (`account_id`),
|
||||||
KEY `block_id` (`block_id`)
|
KEY `block_id` (`block_id`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS `transactions` (
|
CREATE TABLE IF NOT EXISTS `transactions` (
|
||||||
`id` int(255) NOT NULL AUTO_INCREMENT,
|
`id` int(255) NOT NULL AUTO_INCREMENT,
|
||||||
`account_id` int(255) unsigned NOT NULL,
|
`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,
|
`coin_address` varchar(255) DEFAULT NULL,
|
||||||
`amount` double DEFAULT '0',
|
`amount` double DEFAULT '0',
|
||||||
`block_id` int(255) DEFAULT NULL,
|
`block_id` int(255) DEFAULT NULL,
|
||||||
@ -144,7 +145,7 @@ 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`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||||
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user