added new block table structure
This commit is contained in:
parent
df8b1bb974
commit
94c59d043d
@ -3,7 +3,7 @@
|
||||
-- http://www.phpmyadmin.net
|
||||
--
|
||||
-- Host: localhost
|
||||
-- Erstellungszeit: 12. Mai 2013 um 16:52
|
||||
-- Erstellungszeit: 13. Mai 2013 um 16:03
|
||||
-- Server Version: 5.5.31-0ubuntu0.13.04.1
|
||||
-- PHP-Version: 5.4.9-4ubuntu2
|
||||
|
||||
@ -41,7 +41,7 @@ CREATE TABLE IF NOT EXISTS `accounts` (
|
||||
`coin_address` varchar(255) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `username` (`username`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
@ -52,16 +52,18 @@ CREATE TABLE IF NOT EXISTS `accounts` (
|
||||
CREATE TABLE IF NOT EXISTS `blocks` (
|
||||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`height` int(10) unsigned NOT NULL,
|
||||
`blockhash` char(64) NOT NULL,
|
||||
`blockhash` char(65) NOT NULL,
|
||||
`confirmations` int(10) unsigned NOT NULL,
|
||||
`amount` float NOT NULL,
|
||||
`difficulty` float NOT NULL,
|
||||
`amount` double NOT NULL,
|
||||
`difficulty` double NOT NULL,
|
||||
`time` int(11) NOT NULL,
|
||||
`accounted` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`account_id` int(255) unsigned DEFAULT NULL,
|
||||
`shares` int(255) unsigned DEFAULT NULL,
|
||||
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';
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
@ -94,7 +96,7 @@ CREATE TABLE IF NOT EXISTS `shares` (
|
||||
KEY `time` (`time`),
|
||||
KEY `upstream_result` (`upstream_result`),
|
||||
KEY `our_result` (`our_result`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
@ -111,7 +113,7 @@ CREATE TABLE IF NOT EXISTS `shares_archive` (
|
||||
`block_id` int(10) unsigned NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `share_id` (`share_id`)
|
||||
) 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';
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
@ -128,7 +130,7 @@ 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;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
@ -149,7 +151,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;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
@ -167,7 +169,7 @@ CREATE TABLE IF NOT EXISTS `workers` (
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `username` (`username`),
|
||||
KEY `account_id` (`account_id`)
|
||||
) 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 */;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user