Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE TABLE wp_wallets_txs (
- id int(10) UNSIGNED NOT NULL,
- blog_id bigint(20) NOT NULL DEFAULT '1' COMMENT 'blog_id for multisite installs',
- category enum('deposit','move','withdraw') NOT NULL COMMENT 'type of transaction',
- tags varchar(255) NOT NULL DEFAULT '' COMMENT 'space separated list of tags, slugs, etc that further describe the type of transaction',
- account bigint(20) UNSIGNED NOT NULL COMMENT 'wp_users.ID',
- other_account bigint(20) UNSIGNED DEFAULT NULL COMMENT 'wp_users.ID when category==move',
- address varchar(255) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '' COMMENT 'blockchain address when category==deposit or category==withdraw',
- txid varchar(255) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL COMMENT 'blockchain transaction id',
- symbol varchar(5) NOT NULL COMMENT 'coin symbol (e.g. BTC for Bitcoin)',
- amount decimal(20,10) NOT NULL COMMENT 'amount plus any fees deducted from account',
- fee decimal(20,10) NOT NULL DEFAULT '0.0000000000' COMMENT 'fees deducted from account',
- comment text COMMENT 'transaction comment',
- created_time datetime NOT NULL COMMENT 'when transaction was entered into the system in GMT',
- updated_time datetime NOT NULL COMMENT 'when transaction was last updated in GMT (e.g. for update to confirmations count)',
- confirmations mediumint(8) UNSIGNED DEFAULT '0' COMMENT 'amount of confirmations received from blockchain, or null for category==move',
- status enum('unconfirmed','pending','done','failed','cancelled') NOT NULL DEFAULT 'unconfirmed' COMMENT 'state of transaction',
- retries tinyint(3) UNSIGNED NOT NULL DEFAULT '1' COMMENT 'retries left before a pending transaction status becomes failed',
- admin_confirm tinyint(1) NOT NULL DEFAULT '0' COMMENT '1 if an admin has confirmed this transaction',
- user_confirm tinyint(1) NOT NULL DEFAULT '0' COMMENT '1 if the user has confirmed this transaction over email',
- nonce char(32) DEFAULT NULL COMMENT 'nonce for user to confirm via emailed link',
- extra varchar(255) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL COMMENT 'extra info required by some coins such as XMR'
- ) ENGINE=InnoDB;
- ALTER TABLE wp_wallets_txs
- ADD PRIMARY KEY (id),
- ADD UNIQUE KEY uq_tx_idx (txid,symbol),
- ADD KEY account_idx (account),
- ADD KEY blogid_idx (blog_id);
- CREATE TABLE wp_wallets_adds (
- id int(10) UNSIGNED NOT NULL,
- blog_id bigint(20) NOT NULL DEFAULT '1' COMMENT 'blog_id for multisite installs',
- account bigint(20) UNSIGNED NOT NULL COMMENT 'wp_users.ID',
- symbol varchar(5) COLLATE latin1_bin NOT NULL COMMENT 'coin symbol (e.g. BTC for Bitcoin)',
- address varchar(255) COLLATE latin1_bin NOT NULL,
- created_time datetime NOT NULL COMMENT 'when address was requested in GMT',
- extra varchar(255) COLLATE latin1_bin NOT NULL DEFAULT '' COMMENT 'extra info required by some coins such as XMR'
- ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin;
- ALTER TABLE wp_wallets_adds
- ADD PRIMARY KEY (id),
- ADD UNIQUE KEY uq_ad_idx (address,symbol,extra),
- ADD KEY retrieve_idx (account,symbol),
- ADD KEY lookup_idx (address);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement