fix: improve SQLite support, fixes #46#51
Conversation
60fb095 to
a885671
Compare
stasadev
left a comment
There was a problem hiding this comment.
Thank you @codebymikey !
Does this new ddev-passwordless-login plugin can work with other database types as well? I wonder if we can remove ADMINER_DEFAULT_PASSWORD completely.
We also need to have some test coverage for SQLite (similar to what we have in other tests, check for redirect to the correct page).
BTW, I refactored ddev exec logic several releases ago, and it should work:
-ddev exec --raw -- sqlite3 ...
+ddev exec sqlite3 ...And restrict the passwordless behaviour to just sqlite for now.
|
Add the bats test case for sqlite, as well as checking if the site was able to successfully authenticate. The redirect check by itself did not suffice for that.
Yes, it should, however, I updated the plugin logic so that the passwordless behaviour is only for SQLite (for now), mainly for backwards-compatibility/security purposes (and those needing it for other databases, can override or add their own plugins). However, if you want to provide it for every driver, then feel free to update the PR, or introduce a new variable to make the passwordless global.
I thought the default |
stasadev
left a comment
There was a problem hiding this comment.
Thank you! Looks good to me.
Yes, it should, however, I updated the plugin logic so that the passwordless behaviour is only for SQLite (for now), mainly for backwards-compatibility/security purposes (and those needing it for other databases, can override or add their own plugins).
I thought the default
mysqlorpgsqlusers did require setting thedbpasswords - if so, then I think the password must still be specified in adminer (but I haven't tested).
I think you're right. We have autologin for ADMINER_DEFAULT_PASSWORD in all databases, but if people don't want that, they can simply remove the ddev-adminer.php config, and it's going to work as the expect.
The Issue
SQLite database are hard to open at the moment, because the default adminer user runs with a uid
100which typically differs from the uid used by the user.How This PR Solves The Issue
uidis used to run adminer.Manual Testing Instructions
Connect to the SQLite database:

SQLite database content should now be visible:

Automated Testing Overview
Release/Deployment Notes