SHOW:
|
|
- or go back to the newest paste.
1 | - | CREATE TABLE wp_wallets_txs ( |
1 | + | CREATE TABLE wpdb_wallets_txs ( |
2 | id int(10) unsigned NOT NULL AUTO_INCREMENT, | |
3 | blog_id bigint(20) NOT NULL DEFAULT 1 COMMENT 'useful in multisite installs only if plugin is not network activated', | |
4 | category enum('deposit','move','withdraw','trade') NOT NULL COMMENT 'type of transaction', | |
5 | tags varchar(255) NOT NULL DEFAULT '' COMMENT 'space separated list of tags, slugs, etc that further describe the type of transaction', | |
6 | - | account bigint(20) unsigned NOT NULL COMMENT 'wp_users.ID', |
6 | + | account bigint(20) unsigned NOT NULL COMMENT 'wpdb_users.ID', |
7 | - | other_account bigint(20) unsigned DEFAULT NULL COMMENT 'wp_users.ID when category==move', |
7 | + | other_account bigint(20) unsigned DEFAULT NULL COMMENT 'wpdb_users.ID when category==move', |
8 | address varchar(128) NOT NULL DEFAULT '' COMMENT 'blockchain address when category==deposit or category==withdraw', | |
9 | extra varchar(128) NOT NULL DEFAULT '' COMMENT 'extra info required by some coins such as XMR', | |
10 | txid varchar(128) DEFAULT NULL COMMENT 'blockchain transaction id', | |
11 | symbol varchar(8) NOT NULL COMMENT 'coin symbol (e.g. BTC for Bitcoin)', | |
12 | amount decimal(20,10) signed NOT NULL COMMENT 'amount plus any fees deducted from account', | |
13 | fee decimal(20,10) signed NOT NULL DEFAULT 0 COMMENT 'fees deducted from account', | |
14 | comment TEXT DEFAULT NULL COMMENT 'transaction comment', | |
15 | created_time datetime NOT NULL COMMENT 'when transaction was entered into the system in GMT', | |
16 | updated_time datetime NOT NULL COMMENT 'when transaction was last updated in GMT (e.g. for update to confirmations count)', | |
17 | confirmations mediumint unsigned DEFAULT 0 COMMENT 'amount of confirmations received from blockchain, or null for category IN (move,trade)', | |
18 | status enum('unconfirmed','pending','done','failed','cancelled') NOT NULL DEFAULT 'unconfirmed' COMMENT 'state of transaction', | |
19 | retries tinyint unsigned NOT NULL DEFAULT 1 COMMENT 'retries left before a pending transaction status becomes failed', | |
20 | admin_confirm tinyint(1) NOT NULL DEFAULT 0 COMMENT '1 if an admin has confirmed this transaction', | |
21 | user_confirm tinyint(1) NOT NULL DEFAULT 0 COMMENT '1 if the user has confirmed this transaction over email', | |
22 | nonce char(32) DEFAULT NULL COMMENT 'nonce for user to confirm via emailed link', | |
23 | PRIMARY KEY (id), | |
24 | KEY account_idx (account), | |
25 | KEY blogid_idx (blog_id), | |
26 | UNIQUE KEY uq_tx_idx (txid,address,symbol) | |
27 | ); | |
28 | ||
29 | - | CREATE TABLE wp_wallets_adds ( |
29 | + | CREATE TABLE wpdb_wallets_adds ( |
30 | id int(10) unsigned NOT NULL AUTO_INCREMENT, | |
31 | blog_id bigint(20) NOT NULL DEFAULT 1 COMMENT 'blog_id for multisite installs', | |
32 | - | account bigint(20) unsigned NOT NULL COMMENT 'wp_users.ID', |
32 | + | account bigint(20) unsigned NOT NULL COMMENT 'wpdb_users.ID', |
33 | symbol varchar(8) NOT NULL COMMENT 'coin symbol (e.g. BTC for Bitcoin)', | |
34 | address varchar(128) NOT NULL, | |
35 | extra varchar(128) NOT NULL DEFAULT '' COMMENT 'extra info required by some coins such as XMR', | |
36 | created_time datetime NOT NULL COMMENT 'when address was requested in GMT', | |
37 | status enum('old','current') NOT NULL COMMENT 'all addresses are used to perform deposits, but only the current one is displayed', | |
38 | PRIMARY KEY (id), | |
39 | KEY retrieve_idx (account,symbol), | |
40 | KEY lookup_idx (address), | |
41 | UNIQUE KEY uq_ad_idx (address,symbol,extra) | |
42 | ); |