Merge pull request #68 from TheSerapher/sql-structure
added latest DB layout
This commit is contained in:
commit
5ba2613d1d
@ -3,7 +3,7 @@
|
|||||||
-- http://www.phpmyadmin.net
|
-- http://www.phpmyadmin.net
|
||||||
--
|
--
|
||||||
-- Host: localhost
|
-- Host: localhost
|
||||||
-- Generation Time: May 20, 2013 at 07:35 PM
|
-- Generation Time: May 27, 2013 at 02:39 PM
|
||||||
-- Server version: 5.5.31-0ubuntu0.13.04.1
|
-- Server version: 5.5.31-0ubuntu0.13.04.1
|
||||||
-- PHP Version: 5.4.9-4ubuntu2
|
-- PHP Version: 5.4.9-4ubuntu2
|
||||||
|
|
||||||
@ -36,6 +36,7 @@ CREATE TABLE IF NOT EXISTS `accounts` (
|
|||||||
`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,
|
||||||
|
`token` varchar(65) DEFAULT NULL,
|
||||||
`donate_percent` float DEFAULT '0',
|
`donate_percent` float DEFAULT '0',
|
||||||
`ap_threshold` float DEFAULT '0',
|
`ap_threshold` float DEFAULT '0',
|
||||||
`coin_address` varchar(255) DEFAULT NULL,
|
`coin_address` varchar(255) DEFAULT NULL,
|
||||||
@ -53,7 +54,7 @@ CREATE TABLE IF NOT EXISTS `blocks` (
|
|||||||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
`height` int(10) unsigned NOT NULL,
|
`height` int(10) unsigned NOT NULL,
|
||||||
`blockhash` char(65) NOT NULL,
|
`blockhash` char(65) NOT NULL,
|
||||||
`confirmations` int(10) unsigned NOT NULL,
|
`confirmations` int(10) NOT NULL,
|
||||||
`amount` double NOT NULL,
|
`amount` double NOT NULL,
|
||||||
`difficulty` double NOT NULL,
|
`difficulty` double NOT NULL,
|
||||||
`time` int(11) NOT NULL,
|
`time` int(11) NOT NULL,
|
||||||
@ -112,9 +113,10 @@ CREATE TABLE IF NOT EXISTS `shares_archive` (
|
|||||||
`our_result` enum('Y','N') DEFAULT NULL,
|
`our_result` enum('Y','N') DEFAULT NULL,
|
||||||
`upstream_result` enum('Y','N') DEFAULT NULL,
|
`upstream_result` enum('Y','N') DEFAULT NULL,
|
||||||
`block_id` int(10) unsigned NOT NULL,
|
`block_id` int(10) unsigned NOT NULL,
|
||||||
`time` datetime DEFAULT NULL,
|
`time` datetime NOT NULL,
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
UNIQUE KEY `share_id` (`share_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';
|
||||||
|
|
||||||
-- --------------------------------------------------------
|
-- --------------------------------------------------------
|
||||||
@ -143,7 +145,7 @@ CREATE TABLE IF NOT EXISTS `statistics_shares` (
|
|||||||
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','Fee','Donation') DEFAULT NULL,
|
`type` enum('Credit','Debit_MP','Debit_AP','Donation','Fee','Orphan_Credit','Orphan_Fee','Orphan_Donation') 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,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user