parent
209600b217
commit
a76f4f3588
@ -4,7 +4,10 @@ BEGIN;
|
||||
ADD COLUMN independent boolean DEFAULT true,
|
||||
ADD COLUMN loss_taker loss_taker DEFAULT 'provider',
|
||||
ADD COLUMN details_submitted boolean,
|
||||
ADD COLUMN allow_payout boolean;
|
||||
ADD COLUMN allow_payout boolean,
|
||||
DROP CONSTRAINT payment_accounts_participant_provider_country_is_current_key;
|
||||
CREATE INDEX payment_accounts_participant_provider_country_is_current_idx
|
||||
ON payment_accounts (participant, provider, country, is_current);
|
||||
END;
|
||||
SELECT 'after deployment';
|
||||
BEGIN;
|
||||
|
@ -61,12 +61,6 @@ if request.method == 'POST':
|
||||
else:
|
||||
loss_taker = 'platform'
|
||||
serial_number = website.db.one("""
|
||||
UPDATE payment_accounts
|
||||
SET is_current = NULL
|
||||
WHERE participant = %(p_id)s
|
||||
AND provider = 'stripe'
|
||||
AND country = %(country)s;
|
||||
|
||||
INSERT INTO payment_accounts
|
||||
(participant, provider, country, id,
|
||||
default_currency, charges_enabled, verified,
|
||||
|
@ -185,12 +185,6 @@ elif 'state' in request.qs:
|
||||
account_data['token'] = json.dumps(account_data['token'])
|
||||
with website.db.get_cursor() as cursor:
|
||||
cursor.run("""
|
||||
UPDATE payment_accounts
|
||||
SET is_current = NULL
|
||||
WHERE participant = %(p_id)s
|
||||
AND provider = %(provider)s
|
||||
AND country = %(country)s;
|
||||
|
||||
INSERT INTO payment_accounts
|
||||
(participant, provider, country, id,
|
||||
default_currency, charges_enabled, verified,
|
||||
|
@ -25,12 +25,6 @@ if request.method == 'POST':
|
||||
)
|
||||
with website.db.get_cursor() as cursor:
|
||||
cursor.run("""
|
||||
UPDATE payment_accounts
|
||||
SET is_current = NULL
|
||||
WHERE participant = %(p_id)s
|
||||
AND provider = 'paypal'
|
||||
AND country = %(country)s;
|
||||
|
||||
INSERT INTO payment_accounts
|
||||
(participant, provider, country, id, verified,
|
||||
independent, loss_taker)
|
||||
|
Loading…
x
Reference in New Issue
Block a user