CodeIssuesDiscussionsWikiPull RequestsProjectsCommitsActionsReleasesContributorsPulse● GatesSecuritySettingsDeploymentsPipelineInsightsAgents✨ Explain✨ Ask AI✨ Workspace✨ Spec✨ Tests▓ Debt Map✨ NL Search🏛 Archaeology
Blame · Line-by-line history
schema-deploys.ts
Each line is annotated with the commit that last touched it. Click any SHA to jump to that commit and see the surrounding change.
| f764c07 | 1 | /** |
| 2 | * Block N3 — Drizzle schema for the platform-deploy timeline table. | |
| 3 | * | |
| 4 | * Defined in a SEPARATE module because `src/db/schema.ts` is listed in | |
| 5 | * §4 LOCKED BLOCKS of BUILD_BIBLE.md ("New tables only via new migration"). | |
| 6 | * The matching migration is `drizzle/0046_platform_deploys.sql`. Import | |
| 7 | * `platformDeploys` directly from this module. | |
| 8 | * | |
| 9 | * Columns mirror the SQL migration 1:1 — keep in sync when superseded by a | |
| 10 | * follow-up additive migration. | |
| 11 | */ | |
| 12 | ||
| 13 | import { | |
| 14 | index, | |
| 15 | integer, | |
| 16 | pgTable, | |
| 17 | text, | |
| 18 | timestamp, | |
| 19 | uuid, | |
| 20 | } from "drizzle-orm/pg-core"; | |
| 21 | ||
| 22 | export const platformDeploys = pgTable( | |
| 23 | "platform_deploys", | |
| 24 | { | |
| 25 | id: uuid("id").primaryKey().defaultRandom(), | |
| 26 | runId: text("run_id").notNull().unique(), | |
| 27 | sha: text("sha").notNull(), | |
| 28 | source: text("source").notNull(), | |
| 29 | // 'in_progress' | 'succeeded' | 'failed' | |
| 30 | status: text("status").notNull().default("in_progress"), | |
| 31 | startedAt: timestamp("started_at", { withTimezone: true }) | |
| 32 | .defaultNow() | |
| 33 | .notNull(), | |
| 34 | finishedAt: timestamp("finished_at", { withTimezone: true }), | |
| 35 | durationMs: integer("duration_ms"), | |
| 36 | error: text("error"), | |
| 37 | createdAt: timestamp("created_at", { withTimezone: true }) | |
| 38 | .defaultNow() | |
| 39 | .notNull(), | |
| 40 | }, | |
| 41 | (table) => [index("idx_platform_deploys_started").on(table.startedAt)] | |
| 42 | ); | |
| 43 | ||
| 44 | export type PlatformDeployRow = typeof platformDeploys.$inferSelect; | |
| 45 | export type NewPlatformDeployRow = typeof platformDeploys.$inferInsert; |