adding most recent full structure for DB

This commit is contained in:
Sebastian Grewe 2013-06-30 12:20:10 +02:00
parent 294b50ccde
commit 1ae93a8db8

View File

@ -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,
@ -67,7 +68,7 @@ CREATE TABLE IF NOT EXISTS `notifications` (
) 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',
@ -135,7 +136,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','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,