mirror of
https://github.com/LBRYFoundation/pool.git
synced 2025-08-23 17:37:25 +00:00
sql: new payouts and account fields
This commit is contained in:
parent
45823c84c5
commit
4c7cd95fa4
2 changed files with 29 additions and 0 deletions
9
sql/2017-05-accounts_case_swaptime.sql
Normal file
9
sql/2017-05-accounts_case_swaptime.sql
Normal file
|
@ -0,0 +1,9 @@
|
|||
-- Recent additions to add after db init (.gz)
|
||||
-- mysql yaamp -p < file.sql
|
||||
|
||||
-- Adds binary type to be case sensitive
|
||||
ALTER TABLE accounts CHANGE `username` `username` varchar(128) binary NOT NULL;
|
||||
|
||||
-- Remember last coin id swap
|
||||
ALTER TABLE accounts ADD `swap_time` INT(10) UNSIGNED NULL AFTER `coinsymbol`;
|
||||
|
20
sql/2017-06-payouts_coinid_memo.sql
Normal file
20
sql/2017-06-payouts_coinid_memo.sql
Normal file
|
@ -0,0 +1,20 @@
|
|||
-- Recent additions to add after db init (.gz)
|
||||
-- mysql yaamp -p < file.sql
|
||||
|
||||
-- Store coin id used on payment, memoid could be used later for xrp
|
||||
|
||||
ALTER TABLE `payouts`
|
||||
ADD `idcoin` int(11) NULL AFTER `account_id`,
|
||||
ADD `memoid` varchar(128) NULL AFTER `tx`;
|
||||
|
||||
ALTER TABLE `payouts` DROP COLUMN `account_ids`;
|
||||
|
||||
ALTER TABLE `payouts`
|
||||
ADD KEY `payouts_coin` (`idcoin`);
|
||||
|
||||
ALTER TABLE `payouts` ADD CONSTRAINT fk_payouts_coin FOREIGN KEY (`idcoin`)
|
||||
REFERENCES coins (`id`) ON DELETE CASCADE;
|
||||
|
||||
ALTER TABLE `payouts` ADD CONSTRAINT fk_payouts_account FOREIGN KEY (`account_id`)
|
||||
REFERENCES accounts (`id`) ON DELETE CASCADE;
|
||||
|
Loading…
Add table
Reference in a new issue