-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: update sql queries for v2 and run migrations
- Loading branch information
Showing
5 changed files
with
61 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 51 additions & 4 deletions
55
migrations/2025-01-09-135057_increase_connector_transaction_data_length/up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,51 @@ | ||
ALTER TABLE payment_attempt ALTER COLUMN connector_transaction_data TYPE VARCHAR(1024); | ||
ALTER TABLE refund ALTER COLUMN connector_refund_data TYPE VARCHAR(1024); | ||
ALTER TABLE refund ALTER COLUMN connector_transaction_data TYPE VARCHAR(1024); | ||
ALTER TABLE captures ALTER COLUMN connector_capture_data TYPE VARCHAR(1024); | ||
DO $$ | ||
BEGIN | ||
IF EXISTS ( | ||
SELECT 1 | ||
FROM information_schema.columns | ||
WHERE table_name = 'payment_attempt' | ||
AND column_name = 'connector_transaction_data' | ||
) THEN | ||
ALTER TABLE payment_attempt | ||
ALTER COLUMN connector_transaction_data TYPE VARCHAR(1024); | ||
END IF; | ||
END $$; | ||
|
||
DO $$ | ||
BEGIN | ||
IF EXISTS ( | ||
SELECT 1 | ||
FROM information_schema.columns | ||
WHERE table_name = 'refund' | ||
AND column_name = 'connector_refund_data' | ||
) THEN | ||
ALTER TABLE refund | ||
ALTER COLUMN connector_refund_data TYPE VARCHAR(1024); | ||
END IF; | ||
END $$; | ||
|
||
DO $$ | ||
BEGIN | ||
IF EXISTS ( | ||
SELECT 1 | ||
FROM information_schema.columns | ||
WHERE table_name = 'refund' | ||
AND column_name = 'connector_transaction_data' | ||
) THEN | ||
ALTER TABLE refund | ||
ALTER COLUMN connector_transaction_data TYPE VARCHAR(1024); | ||
END IF; | ||
END $$; | ||
|
||
DO $$ | ||
BEGIN | ||
IF EXISTS ( | ||
SELECT 1 | ||
FROM information_schema.columns | ||
WHERE table_name = 'captures' | ||
AND column_name = 'connector_capture_data' | ||
) THEN | ||
ALTER TABLE captures | ||
ALTER COLUMN connector_capture_data TYPE VARCHAR(1024); | ||
END IF; | ||
END $$; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters