Advertisement
dashed-slug

Tables for Bitcoin and Altcoin Wallets 4.4.2 (prefix:H1S_)

Oct 4th, 2019
533
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 2.20 KB | None | 0 0
  1. CREATE TABLE H1S_wallets_txs (
  2.  
  3.     id int(10) unsigned NOT NULL AUTO_INCREMENT,
  4.     blog_id bigint(20) NOT NULL DEFAULT 1 COMMENT 'useful in multisite installs only if plugin is not network activated',
  5.     category enum('deposit','move','withdraw','trade') NOT NULL COMMENT 'type of transaction',
  6.     tags varchar(255) NOT NULL DEFAULT '' COMMENT 'space separated list of tags, slugs, etc that further describe the type of transaction',
  7.     account bigint(20) unsigned NOT NULL COMMENT 'H1S_users.ID',
  8.     other_account bigint(20) unsigned DEFAULT NULL COMMENT 'H1S_users.ID when category==move',
  9.     address varchar(120) NOT NULL DEFAULT '' COMMENT 'blockchain address when category==deposit or category==withdraw',
  10.     extra varchar(120) NOT NULL DEFAULT '' COMMENT 'extra info required by some coins such as XMR',
  11.     txid varchar(120) DEFAULT NULL COMMENT 'blockchain transaction id',
  12.     symbol varchar(8) NOT NULL COMMENT 'coin symbol (e.g. BTC for Bitcoin)',
  13.     amount decimal(20,10) signed NOT NULL COMMENT 'amount plus any fees deducted from account',
  14.     fee decimal(20,10) signed NOT NULL DEFAULT 0 COMMENT 'fees deducted from account',
  15.     comment TEXT DEFAULT NULL COMMENT 'transaction comment',
  16.     created_time datetime NOT NULL COMMENT 'when transaction was entered into the system in GMT',
  17.     updated_time datetime NOT NULL COMMENT 'when transaction was last updated in GMT (e.g. for update to confirmations count)',
  18.     confirmations mediumint unsigned DEFAULT 0 COMMENT 'amount of confirmations received from blockchain, or null for category IN (move,trade)',
  19.     status enum('unconfirmed','pending','done','failed','cancelled') NOT NULL DEFAULT 'unconfirmed' COMMENT 'state of transaction',
  20.     retries tinyint unsigned NOT NULL DEFAULT 1 COMMENT 'retries left before a pending transaction status becomes failed',
  21.     admin_confirm tinyint(1) NOT NULL DEFAULT 0 COMMENT '1 if an admin has confirmed this transaction',
  22.     user_confirm tinyint(1) NOT NULL DEFAULT 0 COMMENT '1 if the user has confirmed this transaction over email',
  23.     nonce char(32) DEFAULT NULL COMMENT 'nonce for user to confirm via emailed link',
  24.  
  25.     PRIMARY KEY  (id),
  26.     KEY  account_idx  (account),
  27.     KEY  blogid_idx  (blog_id),
  28.     UNIQUE KEY  uq_tx_idx (txid,address,symbol)
  29.  
  30. ) ENGINE = InnoDB;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement