Page MenuHomePhabricator

Create database migration to store url and external ID for paypal payments
Closed, ResolvedPublic

Description

Before creating the migration, you might want to change the Order class (PHP class and Doctrine XML Mapping) as described in T344839: Integrate PPL 5 - Adapt the Paypal notification controller to handle one-time payments:
"Add an OrderId to the Order class and make the transactionId nullable (and mutable). Edit the mapping file to reflect the changes and add an index for orderId".
Otherwise we'll have to create another migration when we tackle the one-time donations. No need to do any other changes in that ticket.

Create a database migration in the payment repository for adding the payment_paypal_identifier table. Use the Doctrine CLI in the payment repo to generate the base file, then use the fluent api to fill the file with the right statements.
Have a look at the SQL in the fundraising app (.docker/database/01_Schema.sql) to get an inspiration how the table should look like

Deploy the migration to the test server

Check the SQL output of the migration (using dry-run or dump-sql options) against the SQL in the fundraising app (.docker/database/01_Schema.sql). pay attention to the primary and foreign keys, they're the same in this table.