Drizzle TeamDT
Drizzle Team•3y ago
Scott

sqlite encode

I'm trying to encode some data in the schema.

I thought I could use the sql command, but I think that's only for doing default values

Like for this table:

export const contacts = sqliteTable(
    'contacts',
    {
        contact_id: integer('contact_id').primaryKey(),
        user_id: text('user_id')
            .notNull()
            .references(() => user.id),
        name: text('name').notNull(),
        relationship: text('relationship'),
        birthday: integer('birthday', { mode: 'timestamp' }),


I'd like to use the sqlean encode function for sensitive information like the birthday but don't know where to add that or if I can 🫠
Was this page helpful?