[aur-dev] [PATCH] Fix DB.class.php to match config
Mark Weiman
mark.weiman at markzz.com
Wed Nov 9 19:32:18 UTC 2016
On Wed, 2016-11-09 at 19:56 +0100, Lukas Fleischer wrote:
> Good catch. The dsn_prefix parameter was indeed replaced by the backend
> parameter in commit baf8a22 (git-interface: Support SQLite as database
> backend, 2016-08-03). However, it is more than a simple rename. The new
> parameter allows for using SQLite instead of MySQL and I doubt that this
> actually works after your patch; especially since host, socket, user and
> password can be unset if SQLite is used.
>
> So instead of pretending that the variable was renamed, we should either
> add SQLite support to DB.class.php or simply check whether backend is
> something other than "mysql" and bail out. Since the main reason for
> adding SQLite was making the test suite simpler and faster, I am fine
> with the second option. Opinions?
>
Adding support to DB.class.php to work with sqlite shouldn't be too difficult to
implement. The only thing that would need to be decided is where in the config
should the location of the database be. Perhaps if backend is set to sqlite,
have it look for a location setting and ignore the rest?
Having this support sqlite would be very convenient as it means when working on
the aurweb web interface, I wouldn't need to start a mysql service and could
take the sqlite file around with me to make setting up a new instance easier.
More information about the aur-dev
mailing list