connect-session-knex icon indicating copy to clipboard operation
connect-session-knex copied to clipboard

Use given schema

Open rkaw92 opened this issue 8 years ago • 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?

rkaw92 avatar Mar 20 '17 09:03 rkaw92

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

gx0r avatar Aug 02 '17 18:08 gx0r

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?

LantosIstvan avatar Mar 28 '21 20:03 LantosIstvan

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)...

CarpeNecopinum avatar Jan 20 '22 12:01 CarpeNecopinum