Barazo AppView backend barazo.forum
at main 20 lines 713 B view raw
1import { pgTable, text, timestamp, index } from 'drizzle-orm/pg-core' 2 3export const crossPosts = pgTable( 4 'cross_posts', 5 { 6 id: text('id') 7 .primaryKey() 8 .$defaultFn(() => crypto.randomUUID()), 9 topicUri: text('topic_uri').notNull(), 10 service: text('service', { enum: ['bluesky', 'frontpage'] }).notNull(), 11 crossPostUri: text('cross_post_uri').notNull(), 12 crossPostCid: text('cross_post_cid').notNull(), 13 authorDid: text('author_did').notNull(), 14 createdAt: timestamp('created_at', { withTimezone: true }).notNull().defaultNow(), 15 }, 16 (table) => [ 17 index('cross_posts_topic_uri_idx').on(table.topicUri), 18 index('cross_posts_author_did_idx').on(table.authorDid), 19 ] 20)