mirror of
https://github.com/anomalyco/opencode.git
synced 2026-07-23 02:36:57 -04:00
15 lines
548 B
TypeScript
15 lines
548 B
TypeScript
import { integer, sqliteTable, text } from "drizzle-orm/sqlite-core"
|
|
import { Timestamps } from "../database/schema.sql"
|
|
import type { Credential } from "../credential"
|
|
|
|
export const CredentialTable = sqliteTable("credential", {
|
|
id: text().$type<Credential.ID>().primaryKey(),
|
|
integration_id: text().$type<Credential.Info["integrationID"]>(),
|
|
label: text().notNull(),
|
|
value: text({ mode: "json" }).$type<Credential.Value>().notNull(),
|
|
connector_id: text(),
|
|
method_id: text(),
|
|
active: integer({ mode: "boolean" }),
|
|
...Timestamps,
|
|
})
|