-
Notifications
You must be signed in to change notification settings - Fork 3
Added a comand for checking if user email exist in api and MW user tables #1031
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
base: main
Are you sure you want to change the base?
Conversation
tarrow
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a good direction to start in. Definitely a bit different from the raw string matching in the ticket but seems a fine idea to me. I like the test. I guess you're also working on one for Wiki data too?
One comment I added for myself to worry about because I have some vague memory about these connections being a bit odd when we set them like this but I need to do some research
|
|
||
| $manager = app()->db; | ||
| $manager->purge('mw'); | ||
| $mwConn = $manager->connection('mw'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For Tom to look up:
- do we also need to undo this?
| $mwConn = $manager->connection('mw'); | ||
| $pdo = $mwConn->getPdo(); | ||
|
|
||
| $dbStmt = $pdo->query("SHOW DATABASES LIKE 'mwdb_%'"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrapping this in a try-catch to log any errors that may happen?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure a try catch is necessary here. I think it is fine as we get the thrown exception on the console anyway.
Bug: T410856