NOTICE: Rename of 'mysql' and 'sqlite' modules


#1

Hi Al,

Recently I added support for ‘sqlite’ Authenticator and Storage modules (in addition to mysql). And since they operate very similarly, I decided to merge them together. This makes sense since they pretty much use the same database driver abstraction (which also means adding support for pretty much every database server is now easy).

So instead of ‘mysql’ and ‘sqlite’, it is now just ‘database’. This means you have to migrate your configurations.

If you don’t change these, you’ll probably get a connection error of some sort.

With the old setup this was:

$ node osjs config:set --name=authenticator --value=mysql
$ node osjs config:set --name=server.modules.auth.mysql.host --value=localhost
$ node osjs config:set --name=server.modules.auth.mysql.user --value=osjsuser
$ node osjs config:set --name=server.modules.auth.mysql.password --value=osjspassword
$ node osjs config:set --name=server.modules.auth.mysql.database --value=osjs

$ node osjs config:set --name=storage --value=mysql
$ node osjs config:set --name=server.modules.storage.mysql.host --value=localhost
$ node osjs config:set --name=server.modules.storage.mysql.user --value=osjsuser
$ node osjs config:set --name=server.modules.storage.mysql.password --value=osjspassword
$ node osjs config:set --name=server.modules.storage.mysql.database --value=osjs

With the new layout this becomes:

$ node osjs config:set --name=authenticator --value=database
$ node osjs config:set --name=server.modules.auth.database.driver --value=mysql
$ node osjs config:set --name=server.modules.auth.database.mysql.host --value=localhost
$ node osjs config:set --name=server.modules.auth.database.mysql.user --value=osjsuser
$ node osjs config:set --name=server.modules.auth.database.mysql.password --value=osjspassword
$ node osjs config:set --name=server.modules.auth.database.mysql.database --value=osjs

$ node osjs config:set --name=storage --value=database
$ node osjs config:set --name=server.modules.storage.database.driver --value=mysql
$ node osjs config:set --name=server.modules.storage.database.mysql.host --value=localhost
$ node osjs config:set --name=server.modules.storage.database.mysql.user --value=osjsuser
$ node osjs config:set --name=server.modules.storage.database.mysql.password --value=osjspassword
$ node osjs config:set --name=server.modules.storage.database.mysql.database --value=osjs

You can of course just manually modify your settings file instead of re-entering these commands (Look at src/conf/900-custom.json)

Remeber to run node osjs build afterwards :wink:

The manual was also updated: