gx0r/connect-session-knex

Use given schema

rkaw92 opened this issue · 3 comments

Apparently, this module only allows one to pass a custom table name, but not a schema name. As a result, it is impossible to use a schema other than the default search path indicates.

An example usage of schema specification would look like this:

  new knexStore({
    knex: myKnexInstance,
    tablename: 'sessions',
    schemaname: 'myapp'
  })

Any thoughts?

gx0r commented

This is a good idea! If you are so inclined, feel free to make a pull request!

I find this thread with the same issue. It would be really useful to define custom schemas. But apart from giving columns custom names, such feature not so useful.

But what if you could collect some extra information regarding the request, for example User-Agent string or IP address? With Passport.js maybe it is possible to store such extra fields easily at authentication?

On some older version of this package, I had success using "schema.table" as tablename.
But some semi-recent update (I assume of knex, not this package) broke that work-around (it's now escaped as "schema.table" with double quotes around everything, which doesn't work with Postgres at least)...