Sifa professional network API (Fastify, AT Protocol, Jetstream) sifa.id/
at main 17 lines 614 B view raw
1import { pgTable, text, timestamp, primaryKey } from 'drizzle-orm/pg-core'; 2import { profiles } from './profiles.js'; 3 4export const languages = pgTable( 5 'languages', 6 { 7 did: text('did') 8 .notNull() 9 .references(() => profiles.did, { onDelete: 'cascade' }), 10 rkey: text('rkey').notNull(), 11 name: text('name').notNull(), 12 proficiency: text('proficiency'), 13 createdAt: timestamp('created_at', { withTimezone: true }).notNull(), 14 indexedAt: timestamp('indexed_at', { withTimezone: true }).notNull().defaultNow(), 15 }, 16 (table) => [primaryKey({ columns: [table.did, table.rkey] })], 17);