Skip to content
This repository was archived by the owner on Jun 15, 2022. It is now read-only.

Address duplicate order keys #101

Merged
merged 5 commits into from
Dec 14, 2018
Merged

Address duplicate order keys #101

merged 5 commits into from
Dec 14, 2018

Conversation

stevegrunwell
Copy link
Contributor

@stevegrunwell stevegrunwell commented Dec 14, 2018

This PR supersedes #97 in addressing issues with duplicate order keys:

When saving an order to the custom table, an empty order key was being stored as '' (an empty string), rather than explicitly being NULL. Since there's a UNIQUE key on that column, only one order could have an empty order key, and others would fail due to the uniqueness constraint.

This PR ensures that an empty order key is explicitly being cast as NULL as data is being prepared to go into the custom table, avoiding the table constraint.

Fixes #69, fixes #96.

Caleb Stauffer and others added 5 commits November 8, 2018 23:08
Two tests, `DataStoreTest::test_populate_from_meta_handles_errors()` and `CLITest::test_migrate_skips_on_database_error()`, were explicitly setting order keys to empty strings, which is being fixed in #97. This commit changes the tests to use generic (but still identical) order key values.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

48554 orders were migrated, with 571 skipped. Check that "order_key" is not empty on migration
3 participants