connect-session-knex
connect-session-knex copied to clipboard
Add custom fields as a column
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 |
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.