Add migration to include payment network with addresses.
[?]
Jun 6, 2020, 4:44 AM
AWWC6P5ZVFDQHX3EAYDG4DKTUZ6A5LHQAV3NIUO3VP6FM7JKPK5ACDependencies
- [2]
EFSXYZPOAutoformat everything with brittany. - [3]
73NDXDEZBegin implementation of billing event persistence. - [4]
IPG33FAWAdd billing daemon - [5]
GMYPBCWEMake docker-compose work. - [6]
HMDM3B55Implement core of payments/billing infrastructure. - [7]
B6HWAPDPModularize & update to recent haskoin. - [8]
LEINLS3XUpdate deployment documentation. - [9]
SOIAMXLWBuild versioned docker images. - [*]
ADMKQQGCInitial empty Snap project. - [*]
PGZJ736CUpdate aftok.cfg.example and revise INSTALL instructions - [*]
VV6ESCEVUpdate .gitignore for client libs. - [*]
IZEVQF62Work in progress replacing sqlite with postgres. - [*]
2WOOGXDHUse dbmigrations to manage database state.
Change contents
- edit in .gitignore at line 6
dist-newstyle - edit in .gitignore at line 23
docker/fix-attrs.d - replacement in Makefile at line 8
docker build -t aftok/aftok:latest .docker build -t aftok/aftok-server:latest . - replacement in Makefile at line 11
docker tag aftok/aftok:latest aftok/aftok:$(VERSION)docker push docker.io/aftok/aftok:$(VERSION)docker tag aftok/aftok-server:latest aftok/aftok-server:$(VERSION)docker push docker.io/aftok/aftok-server:$(VERSION) - replacement in Makefile at line 15
docker run --net=host -it -v $(PWD)/local/conf/:/etc/aftok aftok/aftok:latest[3.1515]docker run --net=host -it -v $(PWD)/local/conf/:/etc/aftok aftok/aftok-server:latest - edit in docker-compose.yml at line 41
ports:- "5432:5432" - edit in lib/Aftok/Database/PostgreSQL.hs at line 31
import qualified Data.Text as T - replacement in lib/Aftok/Database/PostgreSQL.hs at line 108
addrMay <- stringToAddr n <$> fromField f vfieldValue <- fromField f vlet addrMay = stringToAddr n fieldValue - replacement in lib/Aftok/Database/PostgreSQL.hs at line 112
"could not deserialize value to a valid BTC address"("could not deserialize value " <> T.unpack fieldValue <> " to a valid BTC address") - replacement in lib/Aftok/Database/PostgreSQL.hs at line 374
credit_to_type, credit_to_address, credit_to_user_id, credit_to_project_id,credit_to_type,credit_to_network, credit_to_address, credit_to_user_id, credit_to_project_id, - replacement in lib/Aftok/Database/PostgreSQL.hs at line 385
[sql| SELECT credit_to_type, credit_to_address, credit_to_user_id, credit_to_project_id,[sql| SELECT credit_to_type,credit_to_network, credit_to_address, credit_to_user_id, credit_to_project_id, - replacement in lib/Aftok/Database/PostgreSQL.hs at line 394
[sql| SELECT credit_to_type, credit_to_address, credit_to_user_id, credit_to_project_id,[sql| SELECT credit_to_type,credit_to_network, credit_to_address, credit_to_user_id, credit_to_project_id, - replacement in lib/Aftok/Database/PostgreSQL.hs at line 403
[sql| SELECT credit_to_type, credit_to_address, credit_to_user_id, credit_to_project_id,[sql| SELECT credit_to_type,credit_to_network, credit_to_address, credit_to_user_id, credit_to_project_id, - replacement in lib/Aftok/Database/PostgreSQL.hs at line 459
[sql| SELECT credit_to_type, credit_to_address, credit_to_user_id, credit_to_project_id,[sql| SELECT credit_to_type,credit_to_network, credit_to_address, credit_to_user_id, credit_to_project_id, - replacement in lib/Aftok/Database/PostgreSQL.hs at line 511
[sql| INSERT INTO users (handle, network, addr, email)[sql| INSERT INTO users (handle, default_payment_network, default_payment_addr, email) - replacement in lib/Aftok/Database/PostgreSQL.hs at line 523
[sql| SELECT handle, btc_addr, email FROM users WHERE id = ? |][sql| SELECT handle, default_payment_network, default_payment_addr, email FROM users WHERE id = ? |] - replacement in lib/Aftok/Database/PostgreSQL.hs at line 530
[sql| SELECT id, handle, btc_addr, email FROM users WHERE handle = ? |][sql| SELECT id, handle, default_payment_network, default_payment_addr, email FROM users WHERE handle = ? |] - file addition: 2020-06-06_03-53-54_add-payment-networks.txt[15.1]
Description: (Describe migration here.)Created: 2020-06-06 03:54:56.188542 UTCDepends: 2016-10-13_05-36-55_user-event-logApply: |ALTER TABLE users ADD COLUMN default_payment_network text NOT NULL DEFAULT 'btc';ALTER TABLE users RENAME COLUMN btc_addr TO default_payment_addr;ALTER TABLE work_events ADD COLUMN credit_to_network text;UPDATE work_events SET credit_to_network = 'btc'WHERE credit_to_address IS NOT NULL;Revert: |ALTER TABLE work_events DROP COLUMN credit_to_network;ALTER TABLE users RENAME COLUMN default_payment_addr TO btc_addr;ALTER TABLE users DROP COLUMN default_payment_network;