Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/meta tables #1958

Merged
merged 26 commits into from
Aug 5, 2017
Merged

Conversation

ravinderk
Copy link
Collaborator

Description

This PR will setup custom tables for payment meta, Log meta and Form meta. It also adds support WP_Query when doing any meta related query.

How Has This Been Tested?

This PR is tested with:

  1. View mostly Give listing page ( Log, Payment, Form )
  2. Payment related use cases like search, sorting, add donation etc.
  3. Form related user cases like setup add & update form etc.
  4. Log related user case like sorting logs etc.

Types of changes

New feature (non-breaking change which adds functionality)

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows has proper inline documentation.

@ravinderk ravinderk added the ready label Aug 4, 2017
@ravinderk ravinderk added this to the 2.0 milestone Aug 4, 2017
@DevinWalker
Copy link
Member

DevinWalker commented Aug 5, 2017

Manual Tests

  1. Tested frontend donation forms without doing the upgrade: I switch to the PR branch, and haven't ran db updates. All donation forms appear to be working as expected. Verified donations meta still being added to wp_postmeta => _give_payment_meta meta_key.

2017-08-04_16-41-05

  1. Ran upgrade routines using large dataset from givewp.com - then ran into a timeout error:
    2017-08-04_16-49-38
    I'm not sure why this happened on my local install because we are polling the upgrade: https://github.com/WordImpress/Give/pull/1958/files#diff-fe0e36d5cf90056ccea283fd3c6daa71R1379 Do you have any idea? Anyways, I refreshed and restarted and it appears to have finished the upgrades:
    2017-08-04_16-56-21
    The data appears to properly have been moved over as well:
    2017-08-04_16-57-37

  2. _give_payment_meta appears still within the new table using the same structure. I'm assuming this will be dealt with in additional PRs for Clarify structure of payment meta #1132
    2017-08-04_17-27-29

  3. Logs appear preserved and and moved to the new db :)
    2017-08-04_17-33-29

Additional Items

  1. I'd like to rename give_customermeta and give_customers tables within the 2.0 milestone as well to give_donormeta and give_donors.
    2017-08-04_17-13-08
    I've created an issue for that here: Rename give_customers and give_customermeta db tables #1960
  2. There is a single unit test failing - it's only one and it's minor so I'm merging anyways and we can fix that later.
  3. For naming, I'd prefer if we could insert an underscore between the word meta and the name of the table. For instance, give_form_meta, give_payment_meta, give_donor_meta, give_log_meta. Sorry I realized this after merging the PR.

Excellent job on this PR @ravinderk

@DevinWalker DevinWalker merged commit c89aa64 into impress-org:release/2.0 Aug 5, 2017
@ravinderk
Copy link
Collaborator Author

@DevinWalker Point 3 under Additional Items: WordPress automatically creates table name from meta type.
for ref: https://github.com/WordPress/WordPress/blob/master/wp-includes/meta.php#L900
Post meta table name generates by same function (*_postmeta)

@DevinWalker
Copy link
Member

Per discussion w/ @ravinderk we decided to go with items 1. - see his comment above for why naming it this way is the WP way.

@ravinderk ravinderk removed this from the 2.0 milestone Nov 30, 2017
@ravinderk ravinderk deleted the feature/meta-tables branch October 27, 2023 06:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants