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

Don't throw on duplicate column for shared tables #435

Merged
merged 1 commit into from
Aug 13, 2024

Conversation

abnegate
Copy link
Member

To allow multiple metadata entries to be updated. Temporary fix until all databases are using shared tables with a single metadata document for all projects.

@abnegate abnegate marked this pull request as ready for review August 12, 2024 05:28
*
* @return bool
*/
abstract public function getSupportForAttributes(): bool;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Required for Mongo

@abnegate abnegate requested a review from stnguyen90 August 12, 2024 05:31
Comment on lines +55 to +58
if ($e->getCode() === '42S21' && isset($e->errorInfo[1]) && $e->errorInfo[1] === 1060) {
throw new DuplicateException($e->getMessage(), $e->getCode(), $e);
} elseif ($e->getCode() === 1060 && isset($e->errorInfo[0]) && $e->errorInfo[0] === '42S21') {
throw new DuplicateException($e->getMessage(), $e->getCode(), $e);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For future, lets have a better way to identify the exception

@abnegate abnegate merged commit fd3b856 into main Aug 13, 2024
14 checks passed
@abnegate abnegate deleted the feat-allow-metadata-dupe-update branch August 13, 2024 03: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.

3 participants