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

Add custom fields as a column

Open Rokas0x opened this issue 3 years ago • 1 comments

Hi

I was wondering if it's possible to add custom fields as a column to the sessions table? Is there any specific way of doing that?

For example by default there are 3 columns: sid, sess and expired. Is there any way to add new columns like userid etc?

Column Type
userid int
sid character varying(255)
sess json
expired timestamp with time zone

Rokas0x avatar Jan 12 '22 22:01 Rokas0x

same request. IMO it's legitimate to expect having the option to save more information on each row. specifically in this case where we'll probably want to have a relation to our existing user table and having the option to disable all active sessions of a user in case of log out / deletion.

arielpollack avatar Jan 19 '22 20:01 arielpollack