Summary: fcdb: Add config file variable to select backend
Submitted by: jtn
Submitted on: Fri May 4 23:41:30 2012
Priority: 5 - Normal
Status: In Progress
Assigned to: jtn
Discussion Lock: Any
Planned Release: 2.4.0,2.5.0
Currently, the only way for a server administrator to change which database
backend is used for user authentication (fcdb) would be to hack on
data/database.lua -- there's no way of affecting this in the --Database config
file, server command-line etc.
This is unwieldy. Since the database script file data/database.lua can't be
moved either, it also means we can't supply a database.lua that works out of
the box with multiple database backends (the current one only supports
I propose adding a new directive to the config file supplied to --Database
where server operators put database details, "backend", e.g. backend="mysql"
or backend="sqlite". The script data/database.lua would look at that variable
and switch its function suite based on it.
Attached patch is the minimal implementation of this (database.lua just checks
that the backend specifies is "mysql" and barfs otherwise).
Reply to this item at:
Message sent via/by Gna!
Freeciv-dev mailing list