Closed vacarsu closed 3 months ago
Session id logged when session is created plw3dgqfw75qsxa09bktfidd663dk8xveojg0u2h
plw3dgqfw75qsxa09bktfidd663dk8xveojg0u2h
Session id logged from session inserted in db
[ { id: '1.0', expiresAt: 2024-04-25T18:20:01.912Z, userId: 1 } ]
My table definitions
const User = defineTable({ columns: { id: column.number({ primaryKey: true }), email: column.text(), name: column.text(), password: column.text(), role: column.text(), createdAt: column.date(), updatedAt: column.date(), }, }); const Session = defineTable({ columns: { id: column.text({ primaryKey: true }), expiresAt: column.date(), userId: column.number({ references: () => User.columns.id }) } });
I'm also getting type errors as I'm not using text ids for the User table.
My mistake when creating the session I thought the attributes param was the user attributes so I was passing in the userId there.
Session id logged when session is created
plw3dgqfw75qsxa09bktfidd663dk8xveojg0u2h
Session id logged from session inserted in db
My table definitions
I'm also getting type errors as I'm not using text ids for the User table.