Deployment Table Schema (domain/deployment.ts)

onlook · database, Database / ORM, db, schema, deployment, drizzle, zod

Defines the PostgreSQL schema for deployment records, including status, type enums, fields, and Zod validation schemas for insert and update operations.

// Source: https://github.com/mperkins0155/onlook | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
import { DeploymentStatus, DeploymentType } from '@onlook/models';
import { relations } from 'drizzle-orm';
import { integer, jsonb, pgEnum, pgTable, text, timestamp, uuid } from 'drizzle-orm/pg-core';
import { createInsertSchema, createUpdateSchema } from 'drizzle-zod';
import { z } from 'zod';
import { projects } from '../project';
import { users } from '../user/user';

export const deploymentStatus = pgEnum('deployment_status', DeploymentStatus);
export const deploymentType = pgEnum('deployment_type', DeploymentType);

export const deployments = pgTable('deployments', {
    id: uui

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search 40K more like it.

Get a free API key