Skip to content

Commit

Permalink
db table for poll answer
Browse files Browse the repository at this point in the history
  • Loading branch information
keaysma committed Dec 15, 2024
1 parent d99fb68 commit bb8b21b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/bsky/src/data-plane/server/db/database-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import * as blobTakedown from './tables/blob-takedown'
import * as labeler from './tables/labeler'
import * as starterPack from './tables/starter-pack'
import * as quote from './tables/quote'
import * as pollAnswer from './tables/poll-answer'

export type DatabaseSchemaType = duplicateRecord.PartialDB &
profile.PartialDB &
Expand Down Expand Up @@ -75,7 +76,8 @@ export type DatabaseSchemaType = duplicateRecord.PartialDB &
labeler.PartialDB &
starterPack.PartialDB &
taggedSuggestion.PartialDB &
quote.PartialDB
quote.PartialDB &
pollAnswer.PartialDB

export type DatabaseSchema = Kysely<DatabaseSchemaType>

Expand Down
17 changes: 17 additions & 0 deletions packages/bsky/src/data-plane/server/db/tables/poll-answer.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { GeneratedAlways } from 'kysely'

const tableName = 'poll_answer'

export interface PollAnswer {
uri: string
cid: string
creator: string
subject: string
subjectCid: string
createdAt: string
indexedAt: string
answer: number
sortAt: GeneratedAlways<string>
}

export type PartialDB = { [tableName]: PollAnswer }

0 comments on commit bb8b21b

Please sign in to comment.