diff --git a/.agents/skills/compute-worker/SKILL.md b/.agents/skills/compute-worker/SKILL.md new file mode 100644 index 00000000..4eddce30 --- /dev/null +++ b/.agents/skills/compute-worker/SKILL.md @@ -0,0 +1,157 @@ +--- +name: compute-worker +description: Platform-aware compute worker and service for constructive-functions. Discovers functions from the database, tracks invocations, dispatches via HTTP. Use when working on the compute-worker, compute-service, function discovery, or invocation tracking. +--- + +# Compute Worker & Service + +The compute-worker is a platform-aware replacement for the legacy knative-job-worker. Instead of discovering functions from a static manifest or env vars, it queries `constructive_infra_public.platform_function_definitions` and tracks every invocation in `platform_function_invocations`. + +## Architecture + +``` +┌─────────────────────────────────────────────────────────┐ +│ compute-service (orchestrator) │ +│ │ +│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │ +│ │ HTTP callback │ │ ComputeWorker│ │ Scheduler │ │ +│ │ server (:8080)│ │ (polls jobs) │ │ (cron jobs) │ │ +│ └──────────────┘ └──────┬───────┘ └──────────────┘ │ +│ │ │ +│ ┌──────────────┼──────────────┐ │ +│ │ │ │ │ +│ ▼ ▼ ▼ │ +│ FunctionDiscovery InvocationTracker compute_request │ +│ (TTL-cached DB (INSERT/UPDATE (HTTP POST to │ +│ lookups) invocations) function URL) │ +└─────────────────────────────────────────────────────────┘ + │ │ │ + ▼ ▼ ▼ + platform_function platform_function Function HTTP + _definitions _invocations endpoint + (read) (write) (send-email:8081) +``` + +## Packages + +### job/compute-worker (`@constructive-io/compute-worker`) + +Core worker class and supporting modules: + +| File | Purpose | +|------|---------| +| `src/index.ts` | `ComputeWorker` class — lifecycle, job polling, dispatch | +| `src/discovery.ts` | `FunctionDiscovery` — lazy TTL-cached DB lookups | +| `src/invocation.ts` | `InvocationTracker` — create/complete/fail invocation records | +| `src/req.ts` | `compute_request()` — HTTP POST dispatch with X-* headers | +| `src/cache.ts` | `TtlCache` — generic TTL cache | +| `src/types.ts` | TypeScript interfaces | + +### job/compute-service (`@constructive-io/compute-service`) + +Orchestrator that starts the callback server, ComputeWorker, and Scheduler: + +| File | Purpose | +|------|---------| +| `src/index.ts` | `ComputeService` class + `bootCompute()` entry point | +| `src/run.ts` | CLI entry point (`node dist/run.js`) | +| `src/registry.ts` | Function registry loader (for optional in-process function servers) | +| `src/types.ts` | TypeScript interfaces | + +## Key differences from legacy worker + +| Feature | knative-job-worker | compute-worker | +|---------|-------------------|----------------| +| Function discovery | Static manifest / `JOBS_SUPPORTED` env | DB query (TTL-cached) | +| Invocation tracking | None | `platform_function_invocations` table | +| Task filtering | `JOBS_SUPPORTED` allowlist | Accepts any registered task | +| URL resolution | Gateway URL + dev map | `service_url` from DB → dev map → gateway fallback | +| Infra requirement | Only needs `app_jobs` schema | Needs `app_jobs` + `constructive_infra_public` | + +## Function discovery flow + +``` +Job arrives (task_identifier = "send-email") + │ + ▼ +FunctionDiscovery.resolve("send-email") + │ + ├─ Cache hit? → return cached definition + │ + └─ Cache miss? → SQL query: + SELECT * FROM constructive_infra_public.platform_function_definitions + WHERE task_identifier = 'send-email' + │ + └─ Cache result (TTL default: 60s) + │ + ▼ + PlatformFunctionDefinition { + id, name, task_identifier, service_url, + is_invocable, max_attempts, priority, ... + } +``` + +## Invocation lifecycle + +``` +1. create() → INSERT INTO platform_function_invocations + (status='running', started_at=now()) + → returns invocation_id + +2a. complete() → UPDATE SET status='completed', + completed_at=now(), duration_ms=X + +2b. fail() → UPDATE SET status='failed', + completed_at=now(), duration_ms=X, error='...' +``` + +## Running locally + +```bash +# Tier 1: pgpm-local +pgpm docker start --image docker.io/constructiveio/postgres-plus:18 +eval "$(pgpm env)" +make setup-platform # deploy infra + seed functions +make dev-compute # start compute-service + functions + +# Tier 2: compose-local +make dev # docker compose up +make dev-compute # start compute-service + functions +``` + +## Testing a job manually + +```bash +# Insert a test job +eval "$(pgpm env)" +psql -d constructive-functions-db1 -c " + INSERT INTO app_jobs.jobs (task_identifier, payload) + VALUES ('send-email', '{\"to\":\"test@example.com\",\"subject\":\"test\",\"html\":\"

hi

\"}'::json) +" + +# Check invocation records +psql -d constructive-functions-db1 -c " + SELECT id, task_identifier, status, duration_ms, error + FROM constructive_infra_public.platform_function_invocations + ORDER BY started_at DESC LIMIT 5 +" +``` + +## Environment variables + +| Variable | Default | Description | +|----------|---------|-------------| +| `COMPUTE_JOBS_ENABLED` | `true` | Enable/disable the compute worker | +| `COMPUTE_CALLBACK_URL` | — | URL functions POST to on completion | +| `COMPUTE_GATEWAY_URL` | — | Fallback gateway URL for functions without `service_url` | +| `JOBS_SCHEMA` | `app_jobs` | PostgreSQL schema for the jobs table | +| `INTERNAL_JOBS_CALLBACK_PORT` | `8080` | Port for the HTTP callback server | +| `INTERNAL_GATEWAY_DEVELOPMENT_MAP` | — | JSON map of task→URL for local dev | + +## Database requirements + +The compute-service checks two things at boot: +1. `app_jobs.jobs` table exists (deployed by `@pgpm/database-jobs`, a dependency of `constructive-infra`) +2. `constructive_infra_public.platform_function_definitions` table exists (deployed by `constructive-infra`) + +Both are deployed together via `make setup-platform` or the `platform-setup` Docker Compose service. diff --git a/.agents/skills/dev-tiers/SKILL.md b/.agents/skills/dev-tiers/SKILL.md new file mode 100644 index 00000000..78bcc5ad --- /dev/null +++ b/.agents/skills/dev-tiers/SKILL.md @@ -0,0 +1,171 @@ +--- +name: dev-tiers +description: Three-tier local development environment for constructive-functions. Covers pgpm-local (Tier 1), compose-local (Tier 2), and k8s-local (Tier 3). Use when setting up the dev environment, starting services, or debugging infrastructure. +--- + +# Development Tiers + +constructive-functions supports three tiers of local development, each adding more infrastructure while keeping the same function code. Choose based on what you need. + +## Tier 1 — pgpm-local + +**What it is:** Postgres only via `pgpm docker`. Functions + services run as bare Node.js processes on the host. Fastest edit-run cycle. + +**When to use:** Day-to-day function development, quick iteration, debugging a single function. + +**Setup:** +```bash +# Start Postgres +pgpm docker start --image docker.io/constructiveio/postgres-plus:18 +eval "$(pgpm env)" + +# Deploy infra schema + seed function definitions +make setup-platform + +# Generate function packages (if not done) +pnpm generate && pnpm install && pnpm build + +# Start functions + compute-service (platform-aware) +make dev-compute + +# Or start functions + legacy job-service +make dev-fn +``` + +**What runs where:** +| Component | Where | +|-----------|-------| +| PostgreSQL | Docker container (via pgpm) | +| MinIO (optional) | Docker container (via pgpm) | +| Functions (send-email, etc.) | Local Node.js process | +| compute-service / job-service | Local Node.js process | +| GraphQL server | Not running (unless started manually) | + +**Database:** `constructive-functions-db1` (configurable via `DB_NAME` env var) + +**Ports:** +| Service | Port | +|---------|------| +| PostgreSQL | 5432 | +| compute-service / job-service | 8080 | +| send-email | 8081 | +| send-verification-link | 8082 | + +--- + +## Tier 2 — compose-local + +**What it is:** Docker Compose runs infrastructure (Postgres, db-setup, GraphQL server, mailpit, platform-setup). Functions still run as local Node.js processes. + +**When to use:** Testing with full infrastructure, working with email, needing GraphQL API, integration testing. + +**Setup:** +```bash +# Create .env from example +cp .env.example .env + +# Start infrastructure +make dev # docker compose up -d + +# Wait for db-setup + platform-setup to complete +docker compose logs -f db-setup platform-setup + +# Start functions + compute-service +make dev-compute + +# Or start functions + legacy job-service +make dev-fn +``` + +**What runs where:** +| Component | Where | +|-----------|-------| +| PostgreSQL | Docker container | +| db-setup (deploys constructive, metaschema) | Docker container (runs once) | +| platform-setup (deploys constructive-infra, seeds functions) | Docker container (runs once) | +| GraphQL server | Docker container (port 3002) | +| Mailpit (email testing) | Docker container (SMTP 1025, UI 8025) | +| Functions | Local Node.js process | +| compute-service / job-service | Local Node.js process | + +**Database:** `constructive` (full constructive stack) + +**Ports:** +| Service | Port | +|---------|------| +| PostgreSQL | 5432 | +| GraphQL server | 3002 | +| Mailpit SMTP | 1025 | +| Mailpit UI | 8025 | +| compute-service / job-service | 8080 | +| send-email | 8081 | +| send-verification-link | 8082 | + +--- + +## Tier 3 — k8s-local + +**What it is:** Everything runs in a local Kubernetes cluster via Skaffold. Two sub-profiles: `local-simple` (plain Deployments) and `local` (Knative Serving). + +**When to use:** Testing K8s manifests, verifying production-like behavior, testing Knative scaling, pre-deployment validation. + +**Setup (local-simple — no Knative):** +```bash +# One-time: install K8s tooling +make setup-dev + +# Start everything +make skaffold-dev +``` + +**Setup (local — Knative):** +```bash +# One-time: install Knative operators +cd k8s && make operators-knative-only + +# Start everything +make skaffold-dev-knative +``` + +**What runs where:** +| Component | Where | +|-----------|-------| +| Everything | Kubernetes pods | + +**Key manifests (local-simple overlay):** +- `k8s/overlays/local-simple/postgres-local.yaml` — PostgreSQL StatefulSet +- `k8s/overlays/local-simple/constructive-db-job.yaml` — DB setup Job +- `k8s/overlays/local-simple/job-service.yaml` — Legacy job service Deployment +- `k8s/overlays/local-simple/compute-service.yaml` — Platform-aware compute service Deployment +- `k8s/overlays/local-simple/constructive-server.yaml` — GraphQL server + +--- + +## Switching between tiers + +The tiers are independent. Tear down one before starting another to avoid port conflicts: + +```bash +# Stop Tier 2 +make dev-down + +# Stop Tier 3 +# Ctrl+C in the skaffold terminal + +# Stop Tier 1 +pgpm docker stop +``` + +## Environment variables + +Common env vars across all tiers: + +| Variable | Tier 1 Default | Tier 2 Default | Description | +|----------|---------------|---------------|-------------| +| `PGHOST` | localhost | localhost | PostgreSQL host | +| `PGPORT` | 5432 | 5432 | PostgreSQL port | +| `PGUSER` | postgres | postgres | PostgreSQL user | +| `PGPASSWORD` | (from pgpm env) | (from .env) | PostgreSQL password | +| `PGDATABASE` | constructive-functions-db1 | constructive | Database name | +| `JOBS_SCHEMA` | app_jobs | app_jobs | Jobs table schema | +| `COMPUTE_JOBS_ENABLED` | true | true | Enable compute worker | diff --git a/.agents/skills/fbp/SKILL.md b/.agents/skills/fbp/SKILL.md new file mode 100644 index 00000000..c021e436 --- /dev/null +++ b/.agents/skills/fbp/SKILL.md @@ -0,0 +1,97 @@ +--- +name: fbp +description: Flow-Based Programming integration for the Constructive Functions platform. Maps FBP NodeDefinitions to platform_function_definitions and handler.json, enabling visual flow graphs where each function is a node with typed input/output ports. +--- + +# FBP Integration Skill + +## When to Apply + +Use this skill when: +- Mapping platform functions to FBP node definitions +- Building or modifying the Flow Graph UI +- Connecting function outputs to function inputs via edges +- Working with the `@fbp/spec` or `@fbp/types` packages in this repo + +## Core Mapping + +Each `platform_function_definition` row (from `constructive_infra_public.platform_function_definitions`) maps to an FBP `NodeDefinition`: + +| Platform Field | FBP Field | Notes | +|---|---|---| +| `name` | `NodeDefinition.name` | e.g. `send-email` | +| `task_identifier` | `NodeDefinition.context` | e.g. `email:send_email` — acts as the dispatch key | +| `description` | `NodeDefinition.description` | Human-readable | +| `required_secrets` | `NodeDefinition.props[]` | Each secret becomes a `PropDef` with `required` flag | +| `required_configs` | `NodeDefinition.props[]` | Each config becomes a `PropDef` | +| `scope` | `NodeDefinition.category` | Groups nodes in the palette | + +### Port Model + +Functions have a single implicit input port (`payload`) and a single implicit output port (`result`): + +```typescript +// Every function node has these ports by default +inputs: [{ name: 'payload', type: 'json' }] +outputs: [{ name: 'result', type: 'json' }] +``` + +An edge from `functionA.result` to `functionB.payload` means: "the output of job A is piped as the input payload of job B." + +### handler.json → NodeDefinition + +The `handler.json` manifest enriches the definition: + +| handler.json Field | FBP Field | +|---|---| +| `name` | `NodeDefinition.name` | +| `version` | stored in `meta` | +| `type` | template type (not FBP type) | +| `port` | stored in `meta` (runtime detail) | +| `taskIdentifier` | `NodeDefinition.context` | +| `description` | `NodeDefinition.description` | +| `dependencies` | not mapped (build-time only) | + +## FBP Spec Quick Reference + +### Graph Structure + +```typescript +interface Graph { + name?: string; + nodes: Node[]; // Function instances + edges: Edge[]; // Data flow connections + definitions?: NodeDefinition[]; // Available function types +} +``` + +### Edge (connection between functions) + +```typescript +interface Edge { + src: { node: string; port: string }; // e.g. { node: 'send-email', port: 'result' } + dst: { node: string; port: string }; // e.g. { node: 'log-result', port: 'payload' } +} +``` + +### Node (function instance in a flow) + +```typescript +interface Node { + name: string; // Instance name (unique within flow) + type: string; // References a NodeDefinition name + meta?: { x?: number; y?: number; description?: string }; + props?: Array<{ name: string; value?: any }>; +} +``` + +## Persistence + +Flows are stored as JSON objects conforming to the `Graph` interface. Initial implementation uses `localStorage`; production will use a database table. + +## Source Packages + +- `@fbp/spec` — Storage types + manipulation API (from `constructive-io/fbp`) +- `@fbp/types` — Core TypeScript type definitions +- `@fbp/graph-editor` — React visual editor component +- `@fbp/evaluator` — Graph execution engine diff --git a/.env.example b/.env.example index 05eb2b0d..abb77ac5 100644 --- a/.env.example +++ b/.env.example @@ -8,14 +8,35 @@ POSTGRES_PASSWORD=changeme-set-a-strong-password # pgAdmin login password (only used by k8s overlays that deploy pgAdmin). PGADMIN_DEFAULT_PASSWORD=changeme-set-a-strong-password -# MinIO root credentials (S3-compatible local storage). -MINIO_ROOT_USER=changeme-set-a-username -MINIO_ROOT_PASSWORD=changeme-set-a-strong-password +# MinIO / S3-compatible object storage (used by constructive-storage module). +# Local dev uses MinIO; production uses real S3 or compatible. +MINIO_ROOT_USER=minioadmin +MINIO_ROOT_PASSWORD=minioadmin +MINIO_ENDPOINT=http://localhost:9000 +AWS_ACCESS_KEY=minioadmin +AWS_SECRET_KEY=minioadmin +AWS_REGION=us-east-1 -# Mailgun (only required if EMAIL_SEND_USE_SMTP is false in dev). +# --- Email: Mailgun (production) --- +# Only required if EMAIL_SEND_USE_SMTP is false. MAILGUN_API_KEY= MAILGUN_KEY= MAILGUN_DOMAIN= +MAILGUN_FROM=no-reply@mg.constructive.io +MAILGUN_REPLY=info@mg.constructive.io + +# --- Email: SMTP / Mailpit (local dev) --- +# Set EMAIL_SEND_USE_SMTP=true to use Mailpit instead of Mailgun. +# Then view emails at http://localhost:8025 +EMAIL_SEND_USE_SMTP=true +SMTP_HOST=localhost +SMTP_PORT=1025 +SMTP_FROM=test@localhost + +# --- Function dry-run toggles --- +# Set to false to actually send emails (requires SMTP or Mailgun config above). +SEND_EMAIL_DRY_RUN=false +SEND_VERIFICATION_LINK_DRY_RUN=false # AWS Route53 access key ID for cert-manager DNS01 challenges (per-environment). ROUTE53_ACCESS_KEY_ID= diff --git a/Makefile b/Makefile index 95b32482..6204695e 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,10 @@ -.PHONY: install build clean lint generate dev dev-fn dev-down dev-logs docker-build skaffold-dev skaffold-dev-knative +.PHONY: install build clean lint generate register \ + up down status verify-platform check-env setup-platform \ + up\:email-job down\:email-job \ + up\:www \ + dev dev-fn dev-compute dev-down dev-logs setup-dev setup-check \ + secrets\:sync \ + skaffold-dev skaffold-dev-knative docker-build install: node --experimental-strip-types scripts/generate.ts @@ -16,9 +22,69 @@ lint: generate: pnpm run generate -# --- Local development --- +register: + node --experimental-strip-types scripts/register-functions.ts + +# ═══════════════════════════════════════════════════════════════════════════════ +# Lifecycle — up / down +# ═══════════════════════════════════════════════════════════════════════════════ +# +# Full procedural setup and teardown. Idempotent — safe to run repeatedly. +# +# make up # postgres + deploy infra + seed + verify +# make up DB_NAME=mydb # same, custom DB name +# make up:email-job # add mailpit + compute-service (SMTP mode) +# make down:email-job # stop mailpit + compute-service +# make down # stop everything (postgres, compose, etc.) +# DROP=1 make down DB_NAME=mydb # also drop the database + +up: + ./scripts/up.sh $(DB_NAME) + +down: + ./scripts/down.sh $(DB_NAME) + +up\:email-job: + ./scripts/email-job-up.sh $(DB_NAME) + +down\:email-job: + ./scripts/email-job-down.sh + +up\:www: + ./scripts/www-up.sh $(DB_NAME) + +# ═══════════════════════════════════════════════════════════════════════════════ +# Tier 1 — pgpm-local +# ═══════════════════════════════════════════════════════════════════════════════ +# Postgres only (via pgpm docker). Functions + services run as local Node +# processes. Fastest edit-run cycle. +# +# Quick start: +# make up # full setup +# make up:email-job # start mailpit + compute-service + +setup-platform: + ./scripts/setup-platform-db.sh + +status: + @./scripts/status.sh + +verify-platform: + @./scripts/verify-platform.sh $(DB_NAME) + +check-env: + @./scripts/load-platform-env.sh $(ENV_FILE) $(DB_NAME) + +# ═══════════════════════════════════════════════════════════════════════════════ +# Tier 2 — compose-local +# ═══════════════════════════════════════════════════════════════════════════════ # Infrastructure (postgres, db-setup, graphql-server, mailpit) runs in Docker. # Functions run as local Node processes for fast edit-run cycles. +# +# Quick start: +# make dev # docker compose up -d +# make dev-fn # start existing job-service + functions +# make dev-compute # or start compute-service + functions dev: docker compose up -d @@ -26,6 +92,9 @@ dev: dev-fn: node --experimental-strip-types scripts/dev.ts +dev-compute: + node --experimental-strip-types scripts/dev-compute.ts + dev-down: docker compose down @@ -39,7 +108,18 @@ setup-dev: setup-check: ./scripts/setup-dev.sh --check -# --- Skaffold k8s development --- +secrets\:sync: + ./scripts/secrets-sync.sh $(ENV_FILE) $(DB_NAME) + +# ═══════════════════════════════════════════════════════════════════════════════ +# Tier 3 — k8s-local +# ═══════════════════════════════════════════════════════════════════════════════ +# Everything runs in a local Kubernetes cluster via Skaffold. +# +# Quick start: +# make skaffold-dev # plain k8s (no Knative needed) +# make skaffold-dev-knative # full Knative setup + # Plain k8s (Deployments + Services, no Knative operators needed) skaffold-dev: skaffold dev -p local-simple diff --git a/docker-compose.yml b/docker-compose.yml index 0717362c..cb306972 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -56,7 +56,37 @@ services: pgpm deploy --yes --database "$$PGDATABASE" --package metaschema pgpm deploy --yes --database "$$PGDATABASE" --package pgpm-database-jobs - echo "Done" + echo "Done (core packages)" + + # Deploy the local constructive-infra package and seed function definitions. + # This runs after db-setup and mounts the local pgpm/ and scripts/ dirs. + platform-setup: + image: ghcr.io/constructive-io/constructive:latest + depends_on: + db-setup: + condition: service_completed_successfully + environment: + PGHOST: postgres + PGPORT: "5432" + PGUSER: postgres + PGPASSWORD: ${POSTGRES_PASSWORD:?POSTGRES_PASSWORD must be set (see .env.example)} + PGDATABASE: constructive + volumes: + - ./pgpm:/workspace/pgpm:ro + - ./extensions:/workspace/extensions:ro + entrypoint: ["bash", "-c"] + command: + - | + cd /workspace/pgpm + for mod in constructive-infra constructive-store constructive-objects constructive-fbp constructive-storage; do + if [ -d "$$mod" ]; then + echo "Deploying $$mod..." + pgpm deploy --yes --database "$$PGDATABASE" --package "$$mod" + fi + done + echo "Deploying constructive-infra-seed..." + pgpm deploy --yes --database "$$PGDATABASE" --package constructive-infra-seed + echo "Platform setup done" graphql-server: image: ghcr.io/constructive-io/constructive:latest @@ -87,6 +117,23 @@ services: ports: - "3002:3000" + minio: + image: minio/minio:latest + command: server /data --console-address ":9001" + environment: + MINIO_ROOT_USER: minioadmin + MINIO_ROOT_PASSWORD: minioadmin + ports: + - "9000:9000" # S3 API + - "9001:9001" # Console UI + volumes: + - minio-data:/data + healthcheck: + test: ["CMD", "mc", "ready", "local"] + interval: 5s + timeout: 5s + retries: 5 + mailpit: image: axllent/mailpit:latest ports: @@ -95,3 +142,4 @@ services: volumes: pgdata: + minio-data: diff --git a/docs/spec/fbp-integration.md b/docs/spec/fbp-integration.md new file mode 100644 index 00000000..106dc392 --- /dev/null +++ b/docs/spec/fbp-integration.md @@ -0,0 +1,190 @@ +# FBP Integration with Constructive Functions + +## Overview + +This document describes how [Flow-Based Programming](https://en.wikipedia.org/wiki/Flow-based_programming) (FBP) concepts map onto the Constructive Functions platform, enabling visual flow graphs where each registered platform function becomes a draggable node with typed ports. + +## Background + +### Platform Function Definitions + +Functions are registered in `constructive_infra_public.platform_function_definitions`: + +```sql +CREATE TABLE platform_function_definitions ( + name TEXT PRIMARY KEY, + task_identifier TEXT NOT NULL, -- dispatch key, e.g. 'email:send_email' + service_url TEXT, + is_invocable BOOLEAN DEFAULT true, + is_built_in BOOLEAN DEFAULT false, + scope TEXT, -- e.g. 'platform', 'app' + description TEXT, + required_secrets composite[], -- (name, required) pairs + required_configs composite[], -- (name, required) pairs + namespace_id UUID REFERENCES platform_namespaces(id), + created_at TIMESTAMPTZ, + updated_at TIMESTAMPTZ +); +``` + +### handler.json Manifest + +Each function's source directory contains a `handler.json`: + +```json +{ + "name": "send-email", + "version": "1.6.4", + "type": "node-graphql", + "port": 8081, + "taskIdentifier": "email:send_email", + "description": "Sends emails directly from job payload", + "dependencies": { ... } +} +``` + +### FBP NodeDefinition (from `@fbp/types`) + +```typescript +interface NodeDefinition { + context: string; // namespace, e.g. "email" + name: string; // e.g. "send-email" + category?: string; // palette group + inputs?: PortDef[]; // input ports + outputs?: PortDef[]; // output ports + props?: PropDef[]; // configuration properties + description?: string; + icon?: string; +} +``` + +## Mapping: platform_function_definitions → NodeDefinition + +### Direct Field Mapping + +| DB Column / handler.json | NodeDefinition Field | Transformation | +|---|---|---| +| `name` | `name` | Direct copy | +| `task_identifier` | `context` | The `task_identifier` doubles as the FBP context (dispatch address) | +| `scope` | `category` | Groups functions in the visual palette | +| `description` | `description` | Direct copy | +| `required_secrets[]` | `props[]` | Each `(secret_name, required)` → `{ name, type: 'secret', required }` | +| `required_configs[]` | `props[]` | Each `(config_name, required)` → `{ name, type: 'config', required }` | + +### Port Model + +Every function has an identical port signature — one JSON input, one JSON output: + +``` +┌────────────────────────┐ +│ send-email │ +│ │ +payload ──►│ handler(params, ctx) │──► result +│ │ +└────────────────────────┘ +``` + +```typescript +const toNodeDefinition = (fn: PlatformFunction): NodeDefinition => ({ + context: fn.task_identifier, + name: fn.name, + category: fn.scope || 'default', + description: fn.description, + inputs: [ + { name: 'payload', type: 'json', description: 'Job payload object' } + ], + outputs: [ + { name: 'result', type: 'json', description: 'Handler return value' } + ], + props: [ + ...fn.required_secrets.map(s => ({ + name: s.name, + type: 'secret', + required: s.required, + description: `Secret: ${s.name}` + })), + ...fn.required_configs.map(c => ({ + name: c.name, + type: 'config', + required: c.required, + description: `Config: ${c.name}` + })) + ] +}); +``` + +### Edge Semantics + +An edge connects one function's output to another's input: + +```typescript +// "Pipe result of send-email into log-result" +{ + src: { node: 'send-email-1', port: 'result' }, + dst: { node: 'log-result-1', port: 'payload' } +} +``` + +At runtime this means: when the job for `send-email-1` completes, its return value is used as the `payload` for a new job dispatched to `log-result-1`. + +### Job Payload Flow + +``` +User triggers flow + │ + ▼ +Job A inserted into app_jobs.jobs + │ task_identifier = fn_a.task_identifier + │ payload = user-provided or upstream result + │ + ▼ +Worker picks up Job A → calls fn_a handler + │ + ▼ +fn_a returns { complete: true, data: {...} } + │ + ▼ +For each outgoing edge from fn_a: + │ Insert new job with: + │ task_identifier = edge.dst function's task_identifier + │ payload = fn_a's result (or mapped subset) + │ + ▼ +Job B inserted → worker picks up → fn_b handler runs → ... +``` + +## Flow Graph (UI Model) + +A flow is persisted as an FBP `Graph`: + +```typescript +interface Flow { + name: string; + nodes: Array<{ + name: string; // instance id, e.g. "send-email-1" + type: string; // function name, e.g. "send-email" + meta?: { x: number; y: number }; + props?: Array<{ name: string; value?: any }>; + }>; + edges: Array<{ + src: { node: string; port: string }; + dst: { node: string; port: string }; + }>; + definitions: NodeDefinition[]; // populated from GET /api/functions +} +``` + +### Persistence Strategy + +| Phase | Storage | Notes | +|---|---|---| +| MVP | `localStorage` | Immediate, no backend changes needed | +| Production | DB table `constructive_infra_public.platform_flows` | Content-addressable via merkle hashing (aligned with `@fbp/spec` design) | + +## Future Extensions + +- **Typed ports**: Parse handler signatures to generate richer port schemas (beyond generic JSON) +- **Conditional routing**: Use FBP channels (`edge.channel`) for error vs. success paths +- **Subnets**: Compose flows of flows using FBP's nested graph model +- **Live execution**: Trigger a flow and watch job status propagate through the graph in real-time +- **Flow evaluation**: Use `@fbp/evaluator` to validate graphs before execution diff --git a/extensions/@pgpm/database-jobs/LICENSE b/extensions/@pgpm/database-jobs/LICENSE new file mode 100644 index 00000000..7b18c918 --- /dev/null +++ b/extensions/@pgpm/database-jobs/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2025 Dan Lynch +Copyright (c) 2025 Constructive + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/extensions/@pgpm/database-jobs/Makefile b/extensions/@pgpm/database-jobs/Makefile new file mode 100644 index 00000000..a7d586e4 --- /dev/null +++ b/extensions/@pgpm/database-jobs/Makefile @@ -0,0 +1,6 @@ +EXTENSION = pgpm-database-jobs +DATA = sql/pgpm-database-jobs--0.26.3.sql + +PG_CONFIG = pg_config +PGXS := $(shell $(PG_CONFIG) --pgxs) +include $(PGXS) diff --git a/extensions/@pgpm/database-jobs/README.md b/extensions/@pgpm/database-jobs/README.md new file mode 100644 index 00000000..1015d10e --- /dev/null +++ b/extensions/@pgpm/database-jobs/README.md @@ -0,0 +1,363 @@ +# @pgpm/database-jobs + +

+ +

+ +

+ + + + + +

+ +Database-specific job handling and queue management. + +## Overview + +`@pgpm/database-jobs` provides a complete PostgreSQL-based background job processing system with persistent queues, scheduled jobs, and worker management. This package implements a robust job queue system entirely within PostgreSQL, enabling reliable background task processing with features like job locking, retries, priorities, and cron-style scheduling. + +## Features + +- **Persistent Job Queue**: Store jobs in PostgreSQL with ACID guarantees +- **Job Scheduling**: Cron-style and rule-based job scheduling +- **Worker Management**: Multiple workers with job locking and expiry +- **Priority Queue**: Process jobs by priority and run time +- **Automatic Retries**: Configurable retry attempts with exponential backoff +- **Job Keys**: Upsert semantics for idempotent job creation +- **Queue Management**: Named queues with independent locking +- **Notifications**: PostgreSQL LISTEN/NOTIFY for real-time job processing + +## Installation + +If you have `pgpm` installed: + +```bash +pgpm install @pgpm/database-jobs +pgpm deploy +``` + +This is a quick way to get started. The sections below provide more detailed installation options. + +### Prerequisites + +```bash +# Install pgpm CLI +npm install -g pgpm + +# Start local Postgres (via Docker) and export env vars +pgpm docker start +eval "$(pgpm env)" +``` + +> **Tip:** Already running Postgres? Skip the Docker step and just export your `PG*` environment variables. + +### **Add to an Existing Package** + +```bash +# 1. Install the package +pgpm install @pgpm/database-jobs + +# 2. Deploy locally +pgpm deploy +``` + +### **Add to a New Project** + +```bash +# 1. Create a workspace +pgpm init workspace + +# 2. Create your first module +cd my-workspace +pgpm init + +# 3. Install a package +cd packages/my-module +pgpm install @pgpm/database-jobs + +# 4. Deploy everything +pgpm deploy --createdb --database mydb1 +``` + +## Core Concepts + +### Jobs Table + +The `app_jobs.jobs` table stores active jobs with the following key fields: +- `id`: Unique job identifier +- `database_id`: Database/tenant identifier +- `task_identifier`: Job type/handler name +- `payload`: JSON data for the job +- `priority`: Lower numbers = higher priority (default: 0) +- `run_at`: When the job should run +- `attempts`: Current attempt count +- `max_attempts`: Maximum retry attempts (default: 25) +- `locked_by`: Worker ID that locked this job +- `locked_at`: When the job was locked +- `key`: Optional unique key for upsert semantics + +### Scheduled Jobs Table + +The `app_jobs.scheduled_jobs` table stores recurring jobs with cron-style or rule-based scheduling. + +### Job Queues Table + +The `app_jobs.job_queues` table tracks queue statistics and locking state. + +## Usage + +### Adding Jobs + +```sql +-- Add a simple job +SELECT app_jobs.add_job( + db_id := '5b720132-17d5-424d-9bcb-ee7b17c13d43'::uuid, + identifier := 'send_email', + payload := '{"to": "user@example.com", "subject": "Hello"}'::json +); + +-- Add a job with priority and delayed execution +SELECT app_jobs.add_job( + db_id := '5b720132-17d5-424d-9bcb-ee7b17c13d43'::uuid, + identifier := 'generate_report', + payload := '{"report_id": 123}'::json, + run_at := now() + interval '1 hour', + priority := 10, + max_attempts := 5 +); + +-- Add a job with a unique key (upsert semantics) +SELECT app_jobs.add_job( + db_id := '5b720132-17d5-424d-9bcb-ee7b17c13d43'::uuid, + identifier := 'daily_summary', + payload := '{"date": "2025-01-15"}'::json, + job_key := 'daily_summary_2025_01_15', + queue_name := 'reports' +); +``` + +### Getting Jobs (Worker Side) + +```sql +-- Worker fetches next available job +SELECT * FROM app_jobs.get_job( + worker_id := 'worker-1', + task_identifiers := ARRAY['send_email', 'generate_report'], + job_expiry := interval '4 hours' +); + +-- Returns NULL if no jobs available +-- Returns job row if job was successfully locked +``` + +### Completing Jobs + +```sql +-- Mark job as complete +SELECT app_jobs.complete_job( + worker_id := 'worker-1', + job_id := 123 +); +``` + +### Failing Jobs + +```sql +-- Mark job as failed (will retry if attempts < max_attempts) +SELECT app_jobs.fail_job( + worker_id := 'worker-1', + job_id := 123, + error_message := 'Connection timeout' +); +``` + +### Scheduled Jobs + +```sql +-- Schedule a job with cron-style timing +INSERT INTO app_jobs.scheduled_jobs ( + database_id, + task_identifier, + payload, + schedule_info +) VALUES ( + '5b720132-17d5-424d-9bcb-ee7b17c13d43'::uuid, + 'cleanup_old_data', + '{"days": 30}'::json, + '{ + "hour": [2], + "minute": [0], + "dayOfWeek": [0, 1, 2, 3, 4, 5, 6] + }'::json +); + +-- Schedule a job with a rule (every minute for 3 minutes) +SELECT app_jobs.add_scheduled_job( + db_id := '5b720132-17d5-424d-9bcb-ee7b17c13d43'::uuid, + identifier := 'heartbeat', + payload := '{}'::json, + schedule_info := json_build_object( + 'start', now() + interval '10 seconds', + 'end', now() + interval '3 minutes', + 'rule', '*/1 * * * *' + ) +); + +-- Run a scheduled job (creates a job in the jobs table) +SELECT * FROM app_jobs.run_scheduled_job(scheduled_job_id := 1); +``` + +## Functions Reference + +### app_jobs.add_job(...) + +Adds a new job to the queue or updates an existing job if a key is provided. + +**Parameters:** +- `db_id` (uuid): Database/tenant identifier +- `identifier` (text): Job type/handler name +- `payload` (json): Job data (default: `{}`) +- `job_key` (text): Optional unique key for upsert (default: NULL) +- `queue_name` (text): Optional queue name (default: random UUID) +- `run_at` (timestamptz): When to run (default: now()) +- `max_attempts` (integer): Maximum retries (default: 25) +- `priority` (integer): Job priority (default: 0) + +**Returns:** `app_jobs.jobs` row + +**Behavior:** +- If `job_key` is provided and exists, updates the job (if not locked) +- If job is locked, removes the key and creates a new job +- Triggers notifications for workers + +### app_jobs.get_job(...) + +Fetches and locks the next available job for a worker. + +**Parameters:** +- `worker_id` (text): Unique worker identifier +- `task_identifiers` (text[]): Optional filter for job types (default: NULL = all) +- `job_expiry` (interval): How long before locked jobs expire (default: 4 hours) + +**Returns:** `app_jobs.jobs` row or NULL + +**Behavior:** +- Selects jobs by priority, run_at, and id +- Locks the job and its queue +- Increments attempt counter +- Uses `FOR UPDATE SKIP LOCKED` for concurrency + +### app_jobs.complete_job(...) + +Marks a job as successfully completed and removes it from the queue. + +**Parameters:** +- `worker_id` (text): Worker that processed the job +- `job_id` (bigint): Job identifier + +**Returns:** `app_jobs.jobs` row + +### app_jobs.fail_job(...) + +Marks a job as failed and schedules retry if attempts remain. + +**Parameters:** +- `worker_id` (text): Worker that processed the job +- `job_id` (bigint): Job identifier +- `error_message` (text): Error description (default: NULL) + +**Returns:** `app_jobs.jobs` row + +**Behavior:** +- Records error message +- Unlocks the job for retry if attempts < max_attempts +- Permanently fails if max_attempts reached + +### app_jobs.add_scheduled_job(...) + +Creates a scheduled job with cron-style or rule-based timing. + +**Parameters:** +- `db_id` (uuid): Database/tenant identifier +- `identifier` (text): Job type/handler name +- `payload` (json): Job data +- `schedule_info` (json): Scheduling configuration +- `job_key` (text): Optional unique key +- `queue_name` (text): Optional queue name +- `max_attempts` (integer): Maximum retries +- `priority` (integer): Job priority + +**Returns:** `app_jobs.scheduled_jobs` row + +### app_jobs.run_scheduled_job(...) + +Executes a scheduled job by creating a job in the jobs table. + +**Parameters:** +- `scheduled_job_id` (bigint): Scheduled job identifier + +**Returns:** `app_jobs.jobs` row + +## Job Processing Pattern + +```sql +-- Worker loop (simplified) +LOOP + -- 1. Get next job + SELECT * FROM app_jobs.get_job('worker-1', ARRAY['my_task']); + + -- 2. Process job + -- ... application logic ... + + -- 3. Mark as complete or failed + IF success THEN + SELECT app_jobs.complete_job('worker-1', job_id); + ELSE + SELECT app_jobs.fail_job('worker-1', job_id, error_msg); + END IF; +END LOOP; +``` + +## Triggers and Automation + +The package includes several triggers for automatic management: + +- **timestamps**: Automatically sets created_at/updated_at +- **notify_worker**: Sends LISTEN/NOTIFY events when jobs are added +- **increase_job_queue_count**: Updates queue statistics on insert +- **decrease_job_queue_count**: Updates queue statistics on delete/update + +## Dependencies + +- PGPM roles (anonymous, authenticated, administrator) +- `@pgpm/verify`: Verification utilities for database objects + +## Testing + +```bash +pnpm test +``` + +The test suite validates: +- Job creation and retrieval +- Scheduled job creation with cron and rule-based timing +- Job key upsert semantics +- Worker locking and concurrency + +## Related Tooling + +* [pgpm](https://github.com/constructive-io/constructive/tree/main/packages/pgpm): **🖥️ PostgreSQL Package Manager** for modular Postgres development. Works with database workspaces, scaffolding, migrations, seeding, and installing database packages. +* [pgsql-test](https://github.com/constructive-io/constructive/tree/main/packages/pgsql-test): **📊 Isolated testing environments** with per-test transaction rollbacks—ideal for integration tests, complex migrations, and RLS simulation. +* [supabase-test](https://github.com/constructive-io/constructive/tree/main/packages/supabase-test): **🧪 Supabase-native test harness** preconfigured for the local Supabase stack—per-test rollbacks, JWT/role context helpers, and CI/GitHub Actions ready. +* [graphile-test](https://github.com/constructive-io/constructive/tree/main/packages/graphile-test): **🔐 Authentication mocking** for Graphile-focused test helpers and emulating row-level security contexts. +* [pgsql-parser](https://github.com/constructive-io/pgsql-parser): **🔄 SQL conversion engine** that interprets and converts PostgreSQL syntax. +* [libpg-query-node](https://github.com/constructive-io/libpg-query-node): **🌉 Node.js bindings** for `libpg_query`, converting SQL into parse trees. +* [pg-proto-parser](https://github.com/constructive-io/pg-proto-parser): **📦 Protobuf parser** for parsing PostgreSQL Protocol Buffers definitions to generate TypeScript interfaces, utility functions, and JSON mappings for enums. + +## Disclaimer + +AS DESCRIBED IN THE LICENSES, THE SOFTWARE IS PROVIDED "AS IS", AT YOUR OWN RISK, AND WITHOUT WARRANTIES OF ANY KIND. + +No developer or entity involved in creating this software will be liable for any claims or damages whatsoever associated with your use, inability to use, or your interaction with other users of the code, including any direct, indirect, incidental, special, exemplary, punitive or consequential damages, or loss of profits, cryptocurrencies, tokens, or anything else of value. diff --git a/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/helpers/json_build_object_apply.sql b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/helpers/json_build_object_apply.sql new file mode 100644 index 00000000..2a835248 --- /dev/null +++ b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/helpers/json_build_object_apply.sql @@ -0,0 +1,28 @@ +-- Deploy schemas/app_jobs/helpers/json_build_object_apply to pg +-- requires: schemas/app_jobs/schema + +BEGIN; +CREATE FUNCTION app_jobs.json_build_object_apply (arguments text[]) + RETURNS json + AS $$ +DECLARE + arg text; + _sql text; + _res json; + args text[]; +BEGIN + _sql = 'SELECT json_build_object('; + FOR arg IN + SELECT + unnest(arguments) + LOOP + args = array_append(args, format('''%s''', arg)); + END LOOP; + _sql = _sql || format('%s);', array_to_string(args, ',')); + EXECUTE _sql INTO _res; + RETURN _res; +END; +$$ +LANGUAGE 'plpgsql'; +COMMIT; + diff --git a/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/procedures/add_job.sql b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/procedures/add_job.sql new file mode 100644 index 00000000..5cf035d1 --- /dev/null +++ b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/procedures/add_job.sql @@ -0,0 +1,125 @@ +-- Deploy schemas/app_jobs/procedures/add_job to pg +-- requires: schemas/app_jobs/schema +-- requires: schemas/app_jobs/tables/jobs/table +-- requires: schemas/app_jobs/tables/job_queues/table +-- requires: pgpm-jwt-claims:schemas/jwt_private/procedures/current_database_id +-- requires: pgpm-jwt-claims:schemas/jwt_public/procedures/current_user_id + +BEGIN; +CREATE FUNCTION app_jobs.add_job ( + identifier text, + payload json DEFAULT '{}' ::json, + job_key text DEFAULT NULL, + queue_name text DEFAULT NULL, + run_at timestamptz DEFAULT now(), + max_attempts integer DEFAULT 25, + priority integer DEFAULT 0, + entity_id uuid DEFAULT NULL, + organization_id uuid DEFAULT NULL, + entity_type text DEFAULT NULL +) + RETURNS app_jobs.jobs + AS $$ +DECLARE + v_job app_jobs.jobs; + v_database_id uuid; + v_actor_id uuid; +BEGIN + -- Read context from JWT claims + v_database_id := jwt_private.current_database_id(); + v_actor_id := jwt_public.current_user_id(); + + IF job_key IS NOT NULL THEN + -- Upsert job + INSERT INTO app_jobs.jobs ( + database_id, + actor_id, + entity_id, + organization_id, + entity_type, + task_identifier, + payload, + queue_name, + run_at, + max_attempts, + key, + priority + ) VALUES ( + v_database_id, + v_actor_id, + add_job.entity_id, + add_job.organization_id, + add_job.entity_type, + identifier, + coalesce(payload, '{}'::json), + queue_name, + coalesce(run_at, now()), + coalesce(max_attempts, 25), + job_key, + coalesce(priority, 0) + ) + ON CONFLICT (key) + DO UPDATE SET + task_identifier = EXCLUDED.task_identifier, + payload = EXCLUDED.payload, + queue_name = EXCLUDED.queue_name, + max_attempts = EXCLUDED.max_attempts, + run_at = EXCLUDED.run_at, + priority = EXCLUDED.priority, + -- always reset error/retry state + attempts = 0, last_error = NULL + WHERE + jobs.locked_at IS NULL + RETURNING + * INTO v_job; + + -- If upsert succeeded (insert or update), return early + IF NOT (v_job IS NULL) THEN + RETURN v_job; + END IF; + + -- Upsert failed -> there must be an existing job that is locked. Remove + -- existing key to allow a new one to be inserted, and prevent any + -- subsequent retries by bumping attempts to the max allowed. + UPDATE + app_jobs.jobs + SET + key = NULL, + attempts = jobs.max_attempts + WHERE + key = job_key; + END IF; + + INSERT INTO app_jobs.jobs ( + database_id, + actor_id, + entity_id, + organization_id, + entity_type, + task_identifier, + payload, + queue_name, + run_at, + max_attempts, + priority + ) VALUES ( + v_database_id, + v_actor_id, + add_job.entity_id, + add_job.organization_id, + add_job.entity_type, + identifier, + payload, + queue_name, + run_at, + max_attempts, + priority + ) + RETURNING * INTO v_job; + + RETURN v_job; +END; +$$ +LANGUAGE 'plpgsql' VOLATILE SECURITY DEFINER; + +COMMIT; diff --git a/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/procedures/add_scheduled_job.sql b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/procedures/add_scheduled_job.sql new file mode 100644 index 00000000..e9d86777 --- /dev/null +++ b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/procedures/add_scheduled_job.sql @@ -0,0 +1,112 @@ +-- Deploy schemas/app_jobs/procedures/add_scheduled_job to pg + +-- requires: schemas/app_jobs/schema +-- requires: schemas/app_jobs/tables/scheduled_jobs/table +-- requires: pgpm-jwt-claims:schemas/jwt_private/procedures/current_database_id +-- requires: pgpm-jwt-claims:schemas/jwt_public/procedures/current_user_id + +BEGIN; + +CREATE FUNCTION app_jobs.add_scheduled_job( + identifier text, + payload json DEFAULT '{}'::json, + schedule_info json DEFAULT '{}'::json, + job_key text DEFAULT NULL, + queue_name text DEFAULT NULL, + max_attempts integer DEFAULT 25, + priority integer DEFAULT 0, + entity_id uuid DEFAULT NULL +) + RETURNS app_jobs.scheduled_jobs + AS $$ +DECLARE + v_job app_jobs.scheduled_jobs; + v_database_id uuid; + v_actor_id uuid; +BEGIN + v_database_id := jwt_private.current_database_id(); + v_actor_id := jwt_public.current_user_id(); + + IF job_key IS NOT NULL THEN + + -- Upsert job + INSERT INTO app_jobs.scheduled_jobs ( + database_id, + actor_id, + entity_id, + task_identifier, + payload, + queue_name, + schedule_info, + max_attempts, + key, + priority + ) VALUES ( + v_database_id, + v_actor_id, + add_scheduled_job.entity_id, + identifier, + coalesce(payload, '{}'::json), + queue_name, + schedule_info, + coalesce(max_attempts, 25), + job_key, + coalesce(priority, 0) + ) + ON CONFLICT (key) + DO UPDATE SET + task_identifier = EXCLUDED.task_identifier, + payload = EXCLUDED.payload, + queue_name = EXCLUDED.queue_name, + max_attempts = EXCLUDED.max_attempts, + schedule_info = EXCLUDED.schedule_info, + priority = EXCLUDED.priority + WHERE + scheduled_jobs.locked_at IS NULL + RETURNING + * INTO v_job; + + -- If upsert succeeded (insert or update), return early + + IF NOT (v_job IS NULL) THEN + RETURN v_job; + END IF; + + -- Upsert failed -> there must be an existing scheduled job that is locked. Remove + -- and allow a new one to be inserted + + DELETE FROM + app_jobs.scheduled_jobs + WHERE + KEY = job_key; + END IF; + + INSERT INTO app_jobs.scheduled_jobs ( + database_id, + actor_id, + entity_id, + task_identifier, + payload, + queue_name, + schedule_info, + max_attempts, + priority + ) VALUES ( + v_database_id, + v_actor_id, + add_scheduled_job.entity_id, + identifier, + payload, + queue_name, + schedule_info, + max_attempts, + priority + ) RETURNING * INTO v_job; + RETURN v_job; +END; +$$ +LANGUAGE 'plpgsql' +VOLATILE +SECURITY DEFINER; +COMMIT; + diff --git a/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/procedures/complete_job.sql b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/procedures/complete_job.sql new file mode 100644 index 00000000..afafdbb2 --- /dev/null +++ b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/procedures/complete_job.sql @@ -0,0 +1,32 @@ +-- Deploy schemas/app_jobs/procedures/complete_job to pg +-- requires: schemas/app_jobs/schema +-- requires: schemas/app_jobs/tables/jobs/table +-- requires: schemas/app_jobs/tables/job_queues/table + +BEGIN; +CREATE FUNCTION app_jobs.complete_job (worker_id text, job_id bigint) + RETURNS app_jobs.jobs + LANGUAGE plpgsql + AS $$ +DECLARE + v_row app_jobs.jobs; +BEGIN + DELETE FROM app_jobs.jobs + WHERE id = job_id + RETURNING + * INTO v_row; + IF v_row.queue_name IS NOT NULL THEN + UPDATE + app_jobs.job_queues + SET + locked_by = NULL, + locked_at = NULL + WHERE + queue_name = v_row.queue_name + AND locked_by = worker_id; + END IF; + RETURN v_row; +END; +$$; +COMMIT; + diff --git a/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/procedures/complete_jobs.sql b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/procedures/complete_jobs.sql new file mode 100644 index 00000000..1b14dffc --- /dev/null +++ b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/procedures/complete_jobs.sql @@ -0,0 +1,19 @@ +-- Deploy schemas/app_jobs/procedures/complete_jobs to pg +-- requires: schemas/app_jobs/schema +-- requires: schemas/app_jobs/tables/job_queues/table +-- requires: schemas/app_jobs/tables/jobs/table + +BEGIN; +CREATE FUNCTION app_jobs.complete_jobs (job_ids bigint[]) + RETURNS SETOF app_jobs.jobs + LANGUAGE sql + AS $$ + DELETE FROM app_jobs.jobs + WHERE id = ANY (job_ids) + AND (locked_by IS NULL + OR locked_at < NOW() - interval '4 hours') + RETURNING + *; +$$; +COMMIT; + diff --git a/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/procedures/do_notify.sql b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/procedures/do_notify.sql new file mode 100644 index 00000000..82d92525 --- /dev/null +++ b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/procedures/do_notify.sql @@ -0,0 +1,16 @@ +-- Deploy schemas/app_jobs/procedures/do_notify to pg +-- requires: schemas/app_jobs/schema + +BEGIN; +CREATE FUNCTION app_jobs.do_notify () + RETURNS TRIGGER + AS $$ +BEGIN + PERFORM + pg_notify(TG_ARGV[0], ''); + RETURN NEW; +END; +$$ +LANGUAGE plpgsql; +COMMIT; + diff --git a/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/procedures/fail_job.sql b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/procedures/fail_job.sql new file mode 100644 index 00000000..a5b38c68 --- /dev/null +++ b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/procedures/fail_job.sql @@ -0,0 +1,41 @@ +-- Deploy schemas/app_jobs/procedures/fail_job to pg +-- requires: schemas/app_jobs/schema +-- requires: schemas/app_jobs/tables/jobs/table +-- requires: schemas/app_jobs/tables/job_queues/table + +BEGIN; +CREATE FUNCTION app_jobs.fail_job (worker_id text, job_id bigint, error_message text) + RETURNS app_jobs.jobs + LANGUAGE plpgsql + STRICT + AS $$ +DECLARE + v_row app_jobs.jobs; +BEGIN + UPDATE + app_jobs.jobs + SET + last_error = error_message, + run_at = greatest (now(), run_at) + (exp(least (attempts, 10))::text || ' seconds')::interval, + locked_by = NULL, + locked_at = NULL + WHERE + id = job_id + AND locked_by = worker_id + RETURNING + * INTO v_row; + IF v_row.queue_name IS NOT NULL THEN + UPDATE + app_jobs.job_queues + SET + locked_by = NULL, + locked_at = NULL + WHERE + queue_name = v_row.queue_name + AND locked_by = worker_id; + END IF; + RETURN v_row; +END; +$$; +COMMIT; + diff --git a/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/procedures/force_unlock_workers.sql b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/procedures/force_unlock_workers.sql new file mode 100644 index 00000000..c28392ca --- /dev/null +++ b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/procedures/force_unlock_workers.sql @@ -0,0 +1,20 @@ +-- Deploy schemas/app_jobs/procedures/force_unlock_workers to pg +-- requires: schemas/app_jobs/schema +-- requires: schemas/app_jobs/tables/jobs/table +-- requires: schemas/app_jobs/tables/job_queues/table + +BEGIN; +CREATE FUNCTION app_jobs.force_unlock_workers (worker_ids text[]) + RETURNS void + LANGUAGE sql + VOLATILE + AS $$ + UPDATE app_jobs.jobs + SET locked_at = NULL, locked_by = NULL + WHERE locked_by = ANY (worker_ids); + + UPDATE app_jobs.job_queues + SET locked_at = NULL, locked_by = NULL + WHERE locked_by = ANY (worker_ids); +$$; +COMMIT; diff --git a/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/procedures/get_job.sql b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/procedures/get_job.sql new file mode 100644 index 00000000..e3ac03fb --- /dev/null +++ b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/procedures/get_job.sql @@ -0,0 +1,68 @@ +-- Deploy schemas/app_jobs/procedures/get_job to pg +-- requires: schemas/app_jobs/schema +-- requires: schemas/app_jobs/tables/job_queues/table +-- requires: schemas/app_jobs/tables/jobs/table + +BEGIN; +CREATE FUNCTION app_jobs.get_job ( + worker_id text, + task_identifiers text[] DEFAULT NULL, + job_expiry interval DEFAULT '4 hours' +) + RETURNS app_jobs.jobs + LANGUAGE plpgsql + AS $$ +DECLARE + v_job_id bigint; + v_queue_name text; + v_row app_jobs.jobs; + v_now timestamptz = now(); +BEGIN + IF worker_id IS NULL THEN + RAISE EXCEPTION 'INVALID_WORKER_ID'; + END IF; + + SELECT jobs.queue_name, jobs.id + INTO v_queue_name, v_job_id + FROM app_jobs.jobs + WHERE is_available = true + AND (jobs.locked_at IS NULL + OR jobs.locked_at < (v_now - job_expiry)) + AND (jobs.queue_name IS NULL + OR jobs.queue_name IN ( + SELECT jq.queue_name + FROM app_jobs.job_queues jq + WHERE (jq.locked_at IS NULL + OR jq.locked_at < (v_now - job_expiry)) + FOR UPDATE SKIP LOCKED + )) + AND run_at <= v_now + AND attempts < max_attempts + AND (task_identifiers IS NULL + OR task_identifier = ANY (task_identifiers)) + ORDER BY priority ASC, run_at ASC, id ASC + LIMIT 1 + FOR UPDATE SKIP LOCKED; + + IF v_job_id IS NULL THEN + RETURN NULL; + END IF; + + IF v_queue_name IS NOT NULL THEN + UPDATE app_jobs.job_queues + SET locked_by = worker_id, locked_at = v_now + WHERE job_queues.queue_name = v_queue_name; + END IF; + + UPDATE app_jobs.jobs + SET + attempts = attempts + 1, + locked_by = worker_id, + locked_at = v_now + WHERE id = v_job_id + RETURNING * INTO v_row; + + RETURN v_row; +END; +$$; +COMMIT; diff --git a/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/procedures/get_scheduled_job.sql b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/procedures/get_scheduled_job.sql new file mode 100644 index 00000000..b8fa5a66 --- /dev/null +++ b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/procedures/get_scheduled_job.sql @@ -0,0 +1,61 @@ +-- Deploy schemas/app_jobs/procedures/get_scheduled_job to pg +-- requires: schemas/app_jobs/schema +-- requires: schemas/app_jobs/tables/scheduled_jobs/table + +BEGIN; +CREATE FUNCTION app_jobs.get_scheduled_job (worker_id text, task_identifiers text[] DEFAULT NULL) + RETURNS app_jobs.scheduled_jobs + LANGUAGE plpgsql + AS $$ +DECLARE + v_job_id bigint; + v_row app_jobs.scheduled_jobs; +BEGIN + + -- + + IF worker_id IS NULL THEN + RAISE exception 'INVALID_WORKER_ID'; + END IF; + + -- + + SELECT + scheduled_jobs.id INTO v_job_id + FROM + app_jobs.scheduled_jobs + WHERE (scheduled_jobs.locked_at IS NULL) + AND (task_identifiers IS NULL + OR task_identifier = ANY (task_identifiers)) + ORDER BY + priority ASC, + id ASC + LIMIT 1 + FOR UPDATE + SKIP LOCKED; + + -- + + IF v_job_id IS NULL THEN + RETURN NULL; + END IF; + + -- + + UPDATE + app_jobs.scheduled_jobs + SET + locked_by = worker_id, + locked_at = NOW() + WHERE + id = v_job_id + RETURNING + * INTO v_row; + + -- + + RETURN v_row; +END; +$$; +COMMIT; + diff --git a/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/procedures/grants/grant_execute_add_job_to_authenticated.sql b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/procedures/grants/grant_execute_add_job_to_authenticated.sql new file mode 100644 index 00000000..23a3fab0 --- /dev/null +++ b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/procedures/grants/grant_execute_add_job_to_authenticated.sql @@ -0,0 +1,10 @@ +-- Deploy schemas/app_jobs/procedures/grants/grant_execute_add_job_to_authenticated to pg + +-- requires: schemas/app_jobs/schema +-- requires: schemas/app_jobs/procedures/add_job + +BEGIN; + +GRANT EXECUTE ON FUNCTION app_jobs.add_job(text, json, text, text, timestamptz, integer, integer, uuid, uuid, text) TO authenticated; + +COMMIT; diff --git a/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/procedures/permanently_fail_jobs.sql b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/procedures/permanently_fail_jobs.sql new file mode 100644 index 00000000..3c732806 --- /dev/null +++ b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/procedures/permanently_fail_jobs.sql @@ -0,0 +1,24 @@ +-- Deploy schemas/app_jobs/procedures/permanently_fail_jobs to pg +-- requires: schemas/app_jobs/schema +-- requires: schemas/app_jobs/tables/job_queues/table +-- requires: schemas/app_jobs/tables/jobs/table + +BEGIN; +CREATE FUNCTION app_jobs.permanently_fail_jobs (job_ids bigint[], error_message text DEFAULT NULL) + RETURNS SETOF app_jobs.jobs + LANGUAGE sql + AS $$ + UPDATE + app_jobs.jobs + SET + last_error = coalesce(error_message, 'Manually marked as failed'), + attempts = max_attempts + WHERE + id = ANY (job_ids) + AND (locked_by IS NULL + OR locked_at < NOW() - interval '4 hours') + RETURNING + *; +$$; +COMMIT; + diff --git a/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/procedures/release_jobs.sql b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/procedures/release_jobs.sql new file mode 100644 index 00000000..2fd06336 --- /dev/null +++ b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/procedures/release_jobs.sql @@ -0,0 +1,34 @@ +-- Deploy schemas/app_jobs/procedures/release_jobs to pg +-- requires: schemas/app_jobs/schema +-- requires: schemas/app_jobs/tables/jobs/table +-- requires: schemas/app_jobs/tables/job_queues/table + +BEGIN; +CREATE FUNCTION app_jobs.release_jobs (worker_id text) + RETURNS void + AS $$ +DECLARE +BEGIN + -- clear the job + UPDATE + app_jobs.jobs + SET + locked_at = NULL, + locked_by = NULL, + attempts = GREATEST (attempts - 1, 0) + WHERE + locked_by = worker_id; + -- clear the queue + UPDATE + app_jobs.job_queues + SET + locked_at = NULL, + locked_by = NULL + WHERE + locked_by = worker_id; +END; +$$ +LANGUAGE 'plpgsql' +VOLATILE; +COMMIT; + diff --git a/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/procedures/release_scheduled_jobs.sql b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/procedures/release_scheduled_jobs.sql new file mode 100644 index 00000000..ec66b60a --- /dev/null +++ b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/procedures/release_scheduled_jobs.sql @@ -0,0 +1,26 @@ +-- Deploy schemas/app_jobs/procedures/release_scheduled_jobs to pg +-- requires: schemas/app_jobs/schema +-- requires: schemas/app_jobs/tables/scheduled_jobs/table + +BEGIN; +CREATE FUNCTION app_jobs.release_scheduled_jobs (worker_id text, ids bigint[] DEFAULT NULL) + RETURNS void + AS $$ +DECLARE +BEGIN + -- clear the scheduled job + UPDATE + app_jobs.scheduled_jobs s + SET + locked_at = NULL, + locked_by = NULL + WHERE + locked_by = worker_id + AND (ids IS NULL + OR s.id = ANY (ids)); +END; +$$ +LANGUAGE 'plpgsql' +VOLATILE; +COMMIT; + diff --git a/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/procedures/remove_job.sql b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/procedures/remove_job.sql new file mode 100644 index 00000000..b6688afe --- /dev/null +++ b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/procedures/remove_job.sql @@ -0,0 +1,34 @@ +-- Deploy schemas/app_jobs/procedures/remove_job to pg +-- requires: schemas/app_jobs/schema +-- requires: schemas/app_jobs/tables/jobs/table + +BEGIN; +CREATE FUNCTION app_jobs.remove_job (job_key text) + RETURNS app_jobs.jobs + LANGUAGE plpgsql + STRICT + AS $$ +DECLARE + v_job app_jobs.jobs; +BEGIN + DELETE FROM app_jobs.jobs + WHERE key = job_key + AND (locked_at IS NULL + OR locked_at < NOW() - interval '4 hours') + RETURNING * INTO v_job; + + IF NOT (v_job IS NULL) THEN + RETURN v_job; + END IF; + + UPDATE app_jobs.jobs + SET + key = NULL, + attempts = jobs.max_attempts + WHERE key = job_key + RETURNING * INTO v_job; + + RETURN v_job; +END; +$$; +COMMIT; diff --git a/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/procedures/reschedule_jobs.sql b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/procedures/reschedule_jobs.sql new file mode 100644 index 00000000..b39d884d --- /dev/null +++ b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/procedures/reschedule_jobs.sql @@ -0,0 +1,26 @@ +-- Deploy schemas/app_jobs/procedures/reschedule_jobs to pg +-- requires: schemas/app_jobs/schema +-- requires: schemas/app_jobs/tables/jobs/table + +BEGIN; +-- NOTE this should be renamed to reset_jobs to avoid confusion of scheduled jobs +CREATE FUNCTION app_jobs.reschedule_jobs (job_ids bigint[], run_at timestamptz DEFAULT NULL, priority integer DEFAULT NULL, attempts integer DEFAULT NULL, max_attempts integer DEFAULT NULL) + RETURNS SETOF app_jobs.jobs + LANGUAGE sql + AS $$ + UPDATE + app_jobs.jobs + SET + run_at = coalesce(reschedule_jobs.run_at, jobs.run_at), + priority = coalesce(reschedule_jobs.priority, jobs.priority), + attempts = coalesce(reschedule_jobs.attempts, jobs.attempts), + max_attempts = coalesce(reschedule_jobs.max_attempts, jobs.max_attempts) + WHERE + id = ANY (job_ids) + AND (locked_by IS NULL + OR locked_at < NOW() - interval '4 hours') + RETURNING + *; +$$; +COMMIT; + diff --git a/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/procedures/run_scheduled_job.sql b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/procedures/run_scheduled_job.sql new file mode 100644 index 00000000..7bdb4399 --- /dev/null +++ b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/procedures/run_scheduled_job.sql @@ -0,0 +1,82 @@ +-- Deploy schemas/app_jobs/procedures/run_scheduled_job to pg +-- requires: schemas/app_jobs/schema +-- requires: schemas/app_jobs/tables/jobs/table +-- requires: schemas/app_jobs/tables/scheduled_jobs/table + +BEGIN; +CREATE FUNCTION app_jobs.run_scheduled_job (id bigint, job_expiry interval DEFAULT '1 hours') + RETURNS app_jobs.jobs + AS $$ +DECLARE + j app_jobs.jobs; + last_id bigint; + lkd_by text; +BEGIN + -- check last scheduled + SELECT + last_scheduled_id + FROM + app_jobs.scheduled_jobs s + WHERE + s.id = run_scheduled_job.id INTO last_id; + + -- if it's been scheduled check if it's been run + + IF (last_id IS NOT NULL) THEN + SELECT + locked_by + FROM + app_jobs.jobs js + WHERE + js.id = last_id + AND (js.locked_at IS NULL -- never been run + OR js.locked_at >= (NOW() - job_expiry) + -- still running within a safe interval +) INTO lkd_by; + IF (FOUND) THEN + RAISE EXCEPTION 'ALREADY_SCHEDULED'; + END IF; + END IF; + + -- insert new job + INSERT INTO app_jobs.jobs ( + database_id, + actor_id, + entity_id, + queue_name, + task_identifier, + payload, + priority, + max_attempts, + key + ) SELECT + database_id, + actor_id, + entity_id, + queue_name, + task_identifier, + payload, + priority, + max_attempts, + key + FROM + app_jobs.scheduled_jobs s + WHERE + s.id = run_scheduled_job.id + RETURNING + * INTO j; + -- update the scheduled job + UPDATE + app_jobs.scheduled_jobs s + SET + last_scheduled = NOW(), + last_scheduled_id = j.id + WHERE + s.id = run_scheduled_job.id; + RETURN j; +END; +$$ +LANGUAGE 'plpgsql' +VOLATILE; +COMMIT; + diff --git a/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/schema.sql b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/schema.sql new file mode 100644 index 00000000..8c3339c3 --- /dev/null +++ b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/schema.sql @@ -0,0 +1,8 @@ +-- Deploy schemas/app_jobs/schema to pg +BEGIN; +CREATE SCHEMA IF NOT EXISTS app_jobs; +GRANT USAGE ON SCHEMA app_jobs TO administrator; +GRANT USAGE ON SCHEMA app_jobs TO authenticated; +ALTER DEFAULT PRIVILEGES IN SCHEMA app_jobs GRANT EXECUTE ON FUNCTIONS TO administrator; +COMMIT; + diff --git a/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/tables/job_queues/grants/grant_select_insert_update_delete_to_administrator.sql b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/tables/job_queues/grants/grant_select_insert_update_delete_to_administrator.sql new file mode 100644 index 00000000..6f0fc3be --- /dev/null +++ b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/tables/job_queues/grants/grant_select_insert_update_delete_to_administrator.sql @@ -0,0 +1,12 @@ +-- Deploy schemas/app_jobs/tables/job_queues/grants/grant_select_insert_update_delete_to_administrator to pg + +-- requires: schemas/app_jobs/schema +-- requires: schemas/app_jobs/tables/job_queues/table + +BEGIN; + +-- TODO make sure to require any policies on this table! + +GRANT SELECT, INSERT, UPDATE, DELETE ON TABLE app_jobs.job_queues TO administrator; + +COMMIT; diff --git a/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/tables/job_queues/indexes/job_queues_locked_by_idx.sql b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/tables/job_queues/indexes/job_queues_locked_by_idx.sql new file mode 100644 index 00000000..cc78f18a --- /dev/null +++ b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/tables/job_queues/indexes/job_queues_locked_by_idx.sql @@ -0,0 +1,8 @@ +-- Deploy schemas/app_jobs/tables/job_queues/indexes/job_queues_locked_by_idx to pg +-- requires: schemas/app_jobs/schema +-- requires: schemas/app_jobs/tables/job_queues/table + +BEGIN; +CREATE INDEX job_queues_locked_by_idx ON app_jobs.job_queues (locked_by); +COMMIT; + diff --git a/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/tables/job_queues/table.sql b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/tables/job_queues/table.sql new file mode 100644 index 00000000..dd003c34 --- /dev/null +++ b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/tables/job_queues/table.sql @@ -0,0 +1,19 @@ +-- Deploy schemas/app_jobs/tables/job_queues/table to pg +-- requires: schemas/app_jobs/schema + +BEGIN; +CREATE TABLE app_jobs.job_queues ( + queue_name text NOT NULL PRIMARY KEY, + job_count int DEFAULT 0 NOT NULL, + locked_at timestamptz, + locked_by text +); + +COMMENT ON TABLE app_jobs.job_queues IS 'Queue metadata: tracks job counts and locking state for each named queue'; +COMMENT ON COLUMN app_jobs.job_queues.queue_name IS 'Unique name identifying this queue'; +COMMENT ON COLUMN app_jobs.job_queues.job_count IS 'Number of pending jobs in this queue'; +COMMENT ON COLUMN app_jobs.job_queues.locked_at IS 'Timestamp when this queue was locked for batch processing'; +COMMENT ON COLUMN app_jobs.job_queues.locked_by IS 'Identifier of the worker that currently holds the queue lock'; + +COMMIT; + diff --git a/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/tables/jobs/grants/grant_select_insert_update_delete_to_administrator.sql b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/tables/jobs/grants/grant_select_insert_update_delete_to_administrator.sql new file mode 100644 index 00000000..11a3ac34 --- /dev/null +++ b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/tables/jobs/grants/grant_select_insert_update_delete_to_administrator.sql @@ -0,0 +1,12 @@ +-- Deploy schemas/app_jobs/tables/jobs/grants/grant_select_insert_update_delete_to_administrator to pg + +-- requires: schemas/app_jobs/schema +-- requires: schemas/app_jobs/tables/jobs/table + +BEGIN; + +-- TODO make sure to require any policies on this table! + +GRANT SELECT, INSERT, UPDATE, DELETE ON TABLE app_jobs.jobs TO administrator; + +COMMIT; diff --git a/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/tables/jobs/indexes/jobs_locked_by_idx.sql b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/tables/jobs/indexes/jobs_locked_by_idx.sql new file mode 100644 index 00000000..d4168037 --- /dev/null +++ b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/tables/jobs/indexes/jobs_locked_by_idx.sql @@ -0,0 +1,8 @@ +-- Deploy schemas/app_jobs/tables/jobs/indexes/jobs_locked_by_idx to pg +-- requires: schemas/app_jobs/schema +-- requires: schemas/app_jobs/tables/jobs/table + +BEGIN; +CREATE INDEX jobs_locked_by_idx ON app_jobs.jobs (locked_by); +COMMIT; + diff --git a/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/tables/jobs/indexes/priority_run_at_id_idx.sql b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/tables/jobs/indexes/priority_run_at_id_idx.sql new file mode 100644 index 00000000..35bf1d6e --- /dev/null +++ b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/tables/jobs/indexes/priority_run_at_id_idx.sql @@ -0,0 +1,17 @@ +-- Deploy schemas/app_jobs/tables/jobs/indexes/priority_run_at_id_idx to pg +-- requires: schemas/app_jobs/schema +-- requires: schemas/app_jobs/tables/jobs/table + +BEGIN; + +CREATE INDEX jobs_main_index + ON app_jobs.jobs USING btree (priority, run_at) + INCLUDE (id, queue_name) + WHERE (is_available = true); + +CREATE INDEX jobs_no_queue_index + ON app_jobs.jobs USING btree (priority, run_at) + INCLUDE (id) + WHERE (is_available = true AND queue_name IS NULL); + +COMMIT; diff --git a/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/tables/jobs/table.sql b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/tables/jobs/table.sql new file mode 100644 index 00000000..e562e591 --- /dev/null +++ b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/tables/jobs/table.sql @@ -0,0 +1,53 @@ +-- Deploy schemas/app_jobs/tables/jobs/table to pg +-- requires: schemas/app_jobs/schema + +BEGIN; +CREATE TABLE app_jobs.jobs ( + id bigserial PRIMARY KEY, + database_id uuid, + actor_id uuid, + entity_id uuid, + organization_id uuid, + entity_type text, + queue_name text DEFAULT NULL, + task_identifier text NOT NULL, + payload json DEFAULT '{}' ::json NOT NULL, + priority integer DEFAULT 0 NOT NULL, + run_at timestamptz DEFAULT now() NOT NULL, + attempts integer DEFAULT 0 NOT NULL, + max_attempts integer DEFAULT 25 NOT NULL, + key text, + last_error text, + locked_at timestamptz, + locked_by text, + is_available boolean GENERATED ALWAYS AS ((locked_at IS NULL) AND (attempts < max_attempts)) STORED NOT NULL, + CHECK (length(key) < 513), + CHECK (length(task_identifier) < 127), + CHECK (max_attempts >= 1), + CHECK (length(queue_name) < 127), + CHECK (length(locked_by) > 3), + UNIQUE (key) +); + +COMMENT ON TABLE app_jobs.jobs IS 'Background job queue: each row is a pending or in-progress task, optionally scoped to a database'; +COMMENT ON COLUMN app_jobs.jobs.id IS 'Auto-incrementing job identifier'; +COMMENT ON COLUMN app_jobs.jobs.database_id IS 'Database this job belongs to (nullable for system-level jobs without tenant context)'; +COMMENT ON COLUMN app_jobs.jobs.actor_id IS 'User who triggered this job, read from JWT claims at enqueue time'; +COMMENT ON COLUMN app_jobs.jobs.entity_id IS 'Entity (org/team) this job is scoped to for billing; NULL means platform-level (resolved via database_id → owner_id)'; +COMMENT ON COLUMN app_jobs.jobs.organization_id IS 'Top-level organization for this entity; resolved at enqueue time via get_organization_id(entity_type, entity_id)'; +COMMENT ON COLUMN app_jobs.jobs.entity_type IS 'Entity type prefix (org, team, app, etc.) for interpreting entity_id'; +COMMENT ON COLUMN app_jobs.jobs.queue_name IS 'Name of the queue this job belongs to; used for worker routing and concurrency control'; +COMMENT ON COLUMN app_jobs.jobs.task_identifier IS 'Identifier for the task type (maps to a worker handler function)'; +COMMENT ON COLUMN app_jobs.jobs.payload IS 'JSON payload of arguments passed to the task handler'; +COMMENT ON COLUMN app_jobs.jobs.priority IS 'Execution priority; lower numbers run first (default 0)'; +COMMENT ON COLUMN app_jobs.jobs.run_at IS 'Earliest time this job should be executed; used for delayed/scheduled execution'; +COMMENT ON COLUMN app_jobs.jobs.attempts IS 'Number of times this job has been attempted so far'; +COMMENT ON COLUMN app_jobs.jobs.max_attempts IS 'Maximum retry attempts before the job is considered permanently failed'; +COMMENT ON COLUMN app_jobs.jobs.key IS 'Optional unique deduplication key; prevents duplicate jobs with the same key'; +COMMENT ON COLUMN app_jobs.jobs.last_error IS 'Error message from the most recent failed attempt'; +COMMENT ON COLUMN app_jobs.jobs.locked_at IS 'Timestamp when a worker locked this job for processing'; +COMMENT ON COLUMN app_jobs.jobs.locked_by IS 'Identifier of the worker that currently holds the lock'; +COMMENT ON COLUMN app_jobs.jobs.is_available IS 'Generated column: true when job is unlocked and has remaining attempts'; + +COMMIT; + diff --git a/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/tables/jobs/triggers/decrease_job_queue_count.sql b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/tables/jobs/triggers/decrease_job_queue_count.sql new file mode 100644 index 00000000..c87bf7bc --- /dev/null +++ b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/tables/jobs/triggers/decrease_job_queue_count.sql @@ -0,0 +1,45 @@ +-- Deploy schemas/app_jobs/tables/jobs/triggers/decrease_job_queue_count to pg +-- requires: schemas/app_jobs/schema +-- requires: schemas/app_jobs/tables/jobs/table + +BEGIN; +CREATE FUNCTION app_jobs.tg_decrease_job_queue_count () + RETURNS TRIGGER + AS $$ +DECLARE + v_new_job_count int; +BEGIN + UPDATE + app_jobs.job_queues + SET + job_count = job_queues.job_count - 1 + WHERE + queue_name = OLD.queue_name + RETURNING + job_count INTO v_new_job_count; + IF v_new_job_count <= 0 THEN + DELETE FROM app_jobs.job_queues + WHERE queue_name = OLD.queue_name + AND job_count <= 0; + END IF; + RETURN OLD; +END; +$$ +LANGUAGE 'plpgsql' +VOLATILE; + +CREATE TRIGGER decrease_job_queue_count_on_delete + AFTER DELETE ON app_jobs.jobs + FOR EACH ROW + WHEN ((OLD.queue_name IS NOT NULL)) + EXECUTE PROCEDURE app_jobs.tg_decrease_job_queue_count (); + +-- only a person would do this... +CREATE TRIGGER decrease_job_queue_count_on_update + AFTER UPDATE OF queue_name ON app_jobs.jobs + FOR EACH ROW + WHEN (((NEW.queue_name IS DISTINCT FROM OLD.queue_name) AND (OLD.queue_name IS NOT NULL))) + EXECUTE PROCEDURE app_jobs.tg_decrease_job_queue_count (); + +COMMIT; + diff --git a/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/tables/jobs/triggers/increase_job_queue_count.sql b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/tables/jobs/triggers/increase_job_queue_count.sql new file mode 100644 index 00000000..b25b3f1a --- /dev/null +++ b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/tables/jobs/triggers/increase_job_queue_count.sql @@ -0,0 +1,32 @@ +-- Deploy schemas/app_jobs/tables/jobs/triggers/increase_job_queue_count to pg +-- requires: schemas/app_jobs/schema +-- requires: schemas/app_jobs/tables/jobs/table + +BEGIN; +CREATE FUNCTION app_jobs.tg_increase_job_queue_count () + RETURNS TRIGGER + AS $$ +BEGIN + INSERT INTO app_jobs.job_queues (queue_name, job_count) + VALUES (NEW.queue_name, 1) + ON CONFLICT (queue_name) + DO UPDATE SET + job_count = job_queues.job_count + 1; + RETURN NEW; +END; +$$ +LANGUAGE 'plpgsql' +VOLATILE; +CREATE TRIGGER _500_increase_job_queue_count_on_insert + AFTER INSERT ON app_jobs.jobs + FOR EACH ROW + WHEN ((NEW.queue_name IS NOT NULL)) + EXECUTE PROCEDURE app_jobs.tg_increase_job_queue_count (); +-- only a person would do this +CREATE TRIGGER _500_increase_job_queue_count_on_update + AFTER UPDATE OF queue_name ON app_jobs.jobs + FOR EACH ROW + WHEN (((NEW.queue_name IS DISTINCT FROM OLD.queue_name) AND (NEW.queue_name IS NOT NULL))) + EXECUTE PROCEDURE app_jobs.tg_increase_job_queue_count (); +COMMIT; + diff --git a/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/tables/jobs/triggers/notify_worker.sql b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/tables/jobs/triggers/notify_worker.sql new file mode 100644 index 00000000..e847ebbf --- /dev/null +++ b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/tables/jobs/triggers/notify_worker.sql @@ -0,0 +1,23 @@ +-- Deploy schemas/app_jobs/tables/jobs/triggers/notify_worker to pg +-- requires: schemas/app_jobs/schema +-- requires: schemas/app_jobs/tables/jobs/table +-- requires: schemas/app_jobs/procedures/do_notify +-- requires: schemas/app_jobs/tables/jobs/triggers/increase_job_queue_count + +BEGIN; +CREATE FUNCTION app_jobs.tg_jobs__after_insert () + RETURNS TRIGGER + AS $$ +BEGIN + PERFORM + pg_notify('jobs:insert', ''); + RETURN NULL; +END; +$$ +LANGUAGE plpgsql; + +CREATE TRIGGER _900_after_insert + AFTER INSERT ON app_jobs.jobs + FOR EACH STATEMENT + EXECUTE PROCEDURE app_jobs.tg_jobs__after_insert (); +COMMIT; diff --git a/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/tables/jobs/triggers/timestamps.sql b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/tables/jobs/triggers/timestamps.sql new file mode 100644 index 00000000..b2629695 --- /dev/null +++ b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/tables/jobs/triggers/timestamps.sql @@ -0,0 +1,20 @@ +-- Deploy schemas/app_jobs/tables/jobs/triggers/timestamps to pg +-- requires: schemas/app_jobs/schema +-- requires: schemas/app_jobs/tables/jobs/table +-- requires: schemas/app_jobs/triggers/tg_update_timestamps + +BEGIN; +ALTER TABLE app_jobs.jobs + ADD COLUMN created_at timestamptz; +ALTER TABLE app_jobs.jobs + ALTER COLUMN created_at SET DEFAULT NOW(); +ALTER TABLE app_jobs.jobs + ADD COLUMN updated_at timestamptz; +ALTER TABLE app_jobs.jobs + ALTER COLUMN updated_at SET DEFAULT NOW(); +CREATE TRIGGER _100_update_jobs_modtime_tg + BEFORE UPDATE OR INSERT ON app_jobs.jobs + FOR EACH ROW + EXECUTE PROCEDURE app_jobs.tg_update_timestamps (); +COMMIT; + diff --git a/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/tables/scheduled_jobs/grants/grant_select_insert_update_delete_to_administrator.sql b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/tables/scheduled_jobs/grants/grant_select_insert_update_delete_to_administrator.sql new file mode 100644 index 00000000..914166bd --- /dev/null +++ b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/tables/scheduled_jobs/grants/grant_select_insert_update_delete_to_administrator.sql @@ -0,0 +1,12 @@ +-- Deploy schemas/app_jobs/tables/scheduled_jobs/grants/grant_select_insert_update_delete_to_administrator to pg + +-- requires: schemas/app_jobs/schema +-- requires: schemas/app_jobs/tables/scheduled_jobs/table + +BEGIN; + +-- TODO make sure to require any policies on this table! + +GRANT SELECT, INSERT, UPDATE, DELETE ON TABLE app_jobs.scheduled_jobs TO administrator; + +COMMIT; diff --git a/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/tables/scheduled_jobs/indexes/scheduled_jobs_locked_by_idx.sql b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/tables/scheduled_jobs/indexes/scheduled_jobs_locked_by_idx.sql new file mode 100644 index 00000000..d222737f --- /dev/null +++ b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/tables/scheduled_jobs/indexes/scheduled_jobs_locked_by_idx.sql @@ -0,0 +1,8 @@ +-- Deploy schemas/app_jobs/tables/scheduled_jobs/indexes/scheduled_jobs_locked_by_idx to pg +-- requires: schemas/app_jobs/schema +-- requires: schemas/app_jobs/tables/scheduled_jobs/table + +BEGIN; +CREATE INDEX scheduled_jobs_locked_by_idx ON app_jobs.scheduled_jobs (locked_by); +COMMIT; + diff --git a/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/tables/scheduled_jobs/indexes/scheduled_jobs_priority_id_idx.sql b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/tables/scheduled_jobs/indexes/scheduled_jobs_priority_id_idx.sql new file mode 100644 index 00000000..9bd54879 --- /dev/null +++ b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/tables/scheduled_jobs/indexes/scheduled_jobs_priority_id_idx.sql @@ -0,0 +1,8 @@ +-- Deploy schemas/app_jobs/tables/scheduled_jobs/indexes/scheduled_jobs_priority_id_idx to pg +-- requires: schemas/app_jobs/schema +-- requires: schemas/app_jobs/tables/scheduled_jobs/table + +BEGIN; +CREATE INDEX scheduled_jobs_priority_id_idx ON app_jobs.scheduled_jobs (priority, id); +COMMIT; + diff --git a/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/tables/scheduled_jobs/table.sql b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/tables/scheduled_jobs/table.sql new file mode 100644 index 00000000..bbf7820a --- /dev/null +++ b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/tables/scheduled_jobs/table.sql @@ -0,0 +1,47 @@ +-- Deploy schemas/app_jobs/tables/scheduled_jobs/table to pg +-- requires: schemas/app_jobs/schema + +BEGIN; +CREATE TABLE app_jobs.scheduled_jobs ( + id bigserial PRIMARY KEY, + database_id uuid, + actor_id uuid, + entity_id uuid, + queue_name text DEFAULT NULL, + task_identifier text NOT NULL, + payload json DEFAULT '{}' ::json NOT NULL, + priority integer DEFAULT 0 NOT NULL, + max_attempts integer DEFAULT 25 NOT NULL, + key text, + locked_at timestamptz, + locked_by text, + schedule_info json NOT NULL, + last_scheduled timestamptz, + last_scheduled_id bigint, + CHECK (length(key) < 513), + CHECK (length(task_identifier) < 127), + CHECK (max_attempts >= 1), + CHECK (length(queue_name) < 127), + CHECK (length(locked_by) > 3), + UNIQUE (key) +); + +COMMENT ON TABLE app_jobs.scheduled_jobs IS 'Recurring/cron-style job definitions: each row spawns jobs on a schedule, optionally scoped to a database'; +COMMENT ON COLUMN app_jobs.scheduled_jobs.id IS 'Auto-incrementing scheduled job identifier'; +COMMENT ON COLUMN app_jobs.scheduled_jobs.database_id IS 'Database this scheduled job belongs to (nullable for system-level schedules without tenant context)'; +COMMENT ON COLUMN app_jobs.scheduled_jobs.actor_id IS 'User who created this scheduled job, read from JWT claims at creation time'; +COMMENT ON COLUMN app_jobs.scheduled_jobs.entity_id IS 'Entity (org/team) this scheduled job is scoped to for billing; NULL means platform-level (resolved via database_id → owner_id)'; +COMMENT ON COLUMN app_jobs.scheduled_jobs.queue_name IS 'Name of the queue spawned jobs are placed into'; +COMMENT ON COLUMN app_jobs.scheduled_jobs.task_identifier IS 'Task type identifier for spawned jobs'; +COMMENT ON COLUMN app_jobs.scheduled_jobs.payload IS 'JSON payload passed to each spawned job'; +COMMENT ON COLUMN app_jobs.scheduled_jobs.priority IS 'Priority assigned to spawned jobs (lower = higher priority)'; +COMMENT ON COLUMN app_jobs.scheduled_jobs.max_attempts IS 'Max retry attempts for spawned jobs'; +COMMENT ON COLUMN app_jobs.scheduled_jobs.key IS 'Optional unique deduplication key'; +COMMENT ON COLUMN app_jobs.scheduled_jobs.locked_at IS 'Timestamp when the scheduler locked this record for processing'; +COMMENT ON COLUMN app_jobs.scheduled_jobs.locked_by IS 'Identifier of the scheduler worker holding the lock'; +COMMENT ON COLUMN app_jobs.scheduled_jobs.schedule_info IS 'JSON schedule configuration (e.g. cron expression, interval)'; +COMMENT ON COLUMN app_jobs.scheduled_jobs.last_scheduled IS 'Timestamp when a job was last spawned from this schedule'; +COMMENT ON COLUMN app_jobs.scheduled_jobs.last_scheduled_id IS 'ID of the last job spawned from this schedule'; + +COMMIT; + diff --git a/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/tables/scheduled_jobs/triggers/notify_scheduled_job.sql b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/tables/scheduled_jobs/triggers/notify_scheduled_job.sql new file mode 100644 index 00000000..51e17d4c --- /dev/null +++ b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/tables/scheduled_jobs/triggers/notify_scheduled_job.sql @@ -0,0 +1,12 @@ +-- Deploy schemas/app_jobs/tables/scheduled_jobs/triggers/notify_scheduled_job to pg +-- requires: schemas/app_jobs/schema +-- requires: schemas/app_jobs/tables/scheduled_jobs/table +-- requires: schemas/app_jobs/procedures/do_notify + +BEGIN; +CREATE TRIGGER _900_notify_scheduled_job + AFTER INSERT ON app_jobs.scheduled_jobs + FOR EACH ROW + EXECUTE PROCEDURE app_jobs.do_notify ('scheduled_jobs:insert'); +COMMIT; + diff --git a/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/triggers/tg_add_job_with_fields.sql b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/triggers/tg_add_job_with_fields.sql new file mode 100644 index 00000000..314ad2ba --- /dev/null +++ b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/triggers/tg_add_job_with_fields.sql @@ -0,0 +1,50 @@ +-- Deploy schemas/app_jobs/triggers/tg_add_job_with_fields to pg +-- requires: schemas/app_jobs/schema +-- requires: schemas/app_jobs/helpers/json_build_object_apply + +BEGIN; +CREATE FUNCTION app_jobs.trigger_job_with_fields () + RETURNS TRIGGER + AS $$ +DECLARE + arg text; + fn text; + i int; + args text[]; +BEGIN + FOR i IN + SELECT + * + FROM + generate_series(1, TG_NARGS) g (i) + LOOP + IF (i = 1) THEN + fn = TG_ARGV[i - 1]; + ELSE + args = array_append(args, TG_ARGV[i - 1]); + IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN + EXECUTE format('SELECT ($1).%s::text', TG_ARGV[i - 1]) + USING NEW INTO arg; + END IF; + IF (TG_OP = 'DELETE') THEN + EXECUTE format('SELECT ($1).%s::text', TG_ARGV[i - 1]) + USING OLD INTO arg; + END IF; + args = array_append(args, arg); + END IF; + END LOOP; + PERFORM + app_jobs.add_job (fn, app_jobs.json_build_object_apply (args)); + IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN + RETURN NEW; + END IF; + IF (TG_OP = 'DELETE') THEN + RETURN OLD; + END IF; +END; +$$ +LANGUAGE plpgsql +VOLATILE +SECURITY DEFINER; +COMMIT; + diff --git a/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/triggers/tg_add_job_with_row.sql b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/triggers/tg_add_job_with_row.sql new file mode 100644 index 00000000..6dec82ff --- /dev/null +++ b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/triggers/tg_add_job_with_row.sql @@ -0,0 +1,26 @@ +-- Deploy schemas/app_jobs/triggers/tg_add_job_with_row to pg +-- requires: schemas/app_jobs/schema + +BEGIN; +CREATE FUNCTION app_jobs.tg_add_job_with_row () + RETURNS TRIGGER + AS $$ +BEGIN + IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN + PERFORM + app_jobs.add_job (TG_ARGV[0], to_json(NEW)); + RETURN NEW; + END IF; + IF (TG_OP = 'DELETE') THEN + PERFORM + app_jobs.add_job (TG_ARGV[0], to_json(OLD)); + RETURN OLD; + END IF; +END; +$$ +LANGUAGE plpgsql +VOLATILE +SECURITY DEFINER; +COMMENT ON FUNCTION app_jobs.tg_add_job_with_row IS E'Useful shortcut to create a job on insert or update. Pass the task name as the trigger argument, and the record data will automatically be available on the JSON payload.'; +COMMIT; + diff --git a/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/triggers/tg_add_job_with_row_id.sql b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/triggers/tg_add_job_with_row_id.sql new file mode 100644 index 00000000..64ad8c30 --- /dev/null +++ b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/triggers/tg_add_job_with_row_id.sql @@ -0,0 +1,27 @@ +-- Deploy schemas/app_jobs/triggers/tg_add_job_with_row_id to pg + +-- requires: schemas/app_jobs/schema + +BEGIN; +CREATE FUNCTION app_jobs.tg_add_job_with_row_id () + RETURNS TRIGGER + AS $$ +BEGIN + IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN + PERFORM + app_jobs.add_job (tg_argv[0], json_build_object('id', NEW.id)); + RETURN NEW; + END IF; + IF (TG_OP = 'DELETE') THEN + PERFORM + app_jobs.add_job (tg_argv[0], json_build_object('id', OLD.id)); + RETURN OLD; + END IF; +END; +$$ +LANGUAGE plpgsql +VOLATILE +SECURITY DEFINER; +COMMENT ON FUNCTION app_jobs.tg_add_job_with_row_id IS E'Useful shortcut to create a job on insert or update. Pass the task name as the trigger argument, and the record id will automatically be available on the JSON payload.'; +COMMIT; + diff --git a/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/triggers/tg_update_timestamps.sql b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/triggers/tg_update_timestamps.sql new file mode 100644 index 00000000..e74c4abf --- /dev/null +++ b/extensions/@pgpm/database-jobs/deploy/schemas/app_jobs/triggers/tg_update_timestamps.sql @@ -0,0 +1,21 @@ +-- Deploy schemas/app_jobs/triggers/tg_update_timestamps to pg +-- requires: schemas/app_jobs/schema + +BEGIN; +CREATE FUNCTION app_jobs.tg_update_timestamps () + RETURNS TRIGGER + AS $$ +BEGIN + IF TG_OP = 'INSERT' THEN + NEW.created_at = NOW(); + NEW.updated_at = NOW(); + ELSIF TG_OP = 'UPDATE' THEN + NEW.created_at = OLD.created_at; + NEW.updated_at = greatest (now(), OLD.updated_at + interval '1 millisecond'); + END IF; + RETURN NEW; +END; +$$ +LANGUAGE 'plpgsql'; +COMMIT; + diff --git a/extensions/@pgpm/database-jobs/package.json b/extensions/@pgpm/database-jobs/package.json new file mode 100644 index 00000000..5a0bcb55 --- /dev/null +++ b/extensions/@pgpm/database-jobs/package.json @@ -0,0 +1,39 @@ +{ + "name": "@pgpm/database-jobs", + "version": "0.26.5", + "description": "Database-specific job handling and queue management", + "author": "Dan Lynch ", + "contributors": [ + "Constructive " + ], + "keywords": [ + "postgresql", + "pgpm", + "jobs", + "queue" + ], + "publishConfig": { + "access": "public" + }, + "scripts": { + "bundle": "pgpm package", + "test": "jest", + "test:watch": "jest --watch" + }, + "devDependencies": { + "pgpm": "^4.23.2" + }, + "dependencies": { + "@pgpm/jwt-claims": "0.26.0", + "@pgpm/verify": "0.26.0" + }, + "repository": { + "type": "git", + "url": "https://github.com/constructive-io/pgpm-modules" + }, + "homepage": "https://github.com/constructive-io/pgpm-modules", + "bugs": { + "url": "https://github.com/constructive-io/pgpm-modules/issues" + }, + "gitHead": "a496a00d89c37d874f4a7207265b9972b6f05c7d" +} diff --git a/extensions/@pgpm/database-jobs/pgpm-database-jobs.control b/extensions/@pgpm/database-jobs/pgpm-database-jobs.control new file mode 100644 index 00000000..22f6e534 --- /dev/null +++ b/extensions/@pgpm/database-jobs/pgpm-database-jobs.control @@ -0,0 +1,8 @@ +# pgpm-database-jobs extension +comment = 'pgpm-database-jobs extension' +default_version = '0.26.3' +module_pathname = '$libdir/pgpm-database-jobs' +requires = 'plpgsql,pgcrypto,pgpm-verify,pgpm-jwt-claims' +relocatable = false +superuser = false + diff --git a/extensions/@pgpm/database-jobs/pgpm.plan b/extensions/@pgpm/database-jobs/pgpm.plan new file mode 100644 index 00000000..b7f96107 --- /dev/null +++ b/extensions/@pgpm/database-jobs/pgpm.plan @@ -0,0 +1,41 @@ +%syntax-version=1.0.0 +%project=pgpm-database-jobs +%uri=pgpm-database-jobs +schemas/app_jobs/schema [pgpm-verify:@0.1.0] 2025-08-26T23:57:41Z pgpm # add schemas/app_jobs/schema +schemas/app_jobs/triggers/tg_update_timestamps [schemas/app_jobs/schema] 2025-08-26T23:57:41Z pgpm # add schemas/app_jobs/triggers/tg_update_timestamps +schemas/app_jobs/triggers/tg_add_job_with_row_id [schemas/app_jobs/schema] 2025-08-26T23:57:41Z pgpm # add schemas/app_jobs/triggers/tg_add_job_with_row_id +schemas/app_jobs/triggers/tg_add_job_with_row [schemas/app_jobs/schema] 2025-08-26T23:57:41Z pgpm # add schemas/app_jobs/triggers/tg_add_job_with_row +schemas/app_jobs/helpers/json_build_object_apply [schemas/app_jobs/schema] 2025-08-26T23:57:41Z pgpm # add schemas/app_jobs/helpers/json_build_object_apply +schemas/app_jobs/triggers/tg_add_job_with_fields [schemas/app_jobs/schema schemas/app_jobs/helpers/json_build_object_apply] 2025-08-26T23:57:41Z pgpm # add schemas/app_jobs/triggers/tg_add_job_with_fields +schemas/app_jobs/tables/scheduled_jobs/table [schemas/app_jobs/schema] 2025-08-26T23:57:41Z pgpm # add schemas/app_jobs/tables/scheduled_jobs/table +schemas/app_jobs/procedures/do_notify [schemas/app_jobs/schema] 2025-08-26T23:57:41Z pgpm # add schemas/app_jobs/procedures/do_notify +schemas/app_jobs/tables/scheduled_jobs/triggers/notify_scheduled_job [schemas/app_jobs/schema schemas/app_jobs/tables/scheduled_jobs/table schemas/app_jobs/procedures/do_notify] 2025-08-26T23:57:41Z pgpm # add schemas/app_jobs/tables/scheduled_jobs/triggers/notify_scheduled_job +schemas/app_jobs/tables/scheduled_jobs/indexes/scheduled_jobs_priority_id_idx [schemas/app_jobs/schema schemas/app_jobs/tables/scheduled_jobs/table] 2025-08-26T23:57:41Z pgpm # add schemas/app_jobs/tables/scheduled_jobs/indexes/scheduled_jobs_priority_id_idx +schemas/app_jobs/tables/scheduled_jobs/indexes/scheduled_jobs_locked_by_idx [schemas/app_jobs/schema schemas/app_jobs/tables/scheduled_jobs/table] 2025-08-26T23:57:41Z pgpm # add schemas/app_jobs/tables/scheduled_jobs/indexes/scheduled_jobs_locked_by_idx +schemas/app_jobs/tables/scheduled_jobs/grants/grant_select_insert_update_delete_to_administrator [schemas/app_jobs/schema schemas/app_jobs/tables/scheduled_jobs/table] 2025-08-26T23:57:41Z pgpm # add schemas/app_jobs/tables/scheduled_jobs/grants/grant_select_insert_update_delete_to_administrator +schemas/app_jobs/tables/jobs/table [schemas/app_jobs/schema] 2025-08-26T23:57:41Z pgpm # add schemas/app_jobs/tables/jobs/table +schemas/app_jobs/tables/jobs/triggers/timestamps [schemas/app_jobs/schema schemas/app_jobs/tables/jobs/table schemas/app_jobs/triggers/tg_update_timestamps] 2025-08-26T23:57:41Z pgpm # add schemas/app_jobs/tables/jobs/triggers/timestamps +schemas/app_jobs/tables/jobs/triggers/increase_job_queue_count [schemas/app_jobs/schema schemas/app_jobs/tables/jobs/table] 2025-08-26T23:57:41Z pgpm # add schemas/app_jobs/tables/jobs/triggers/increase_job_queue_count +schemas/app_jobs/tables/jobs/triggers/notify_worker [schemas/app_jobs/schema schemas/app_jobs/tables/jobs/table schemas/app_jobs/procedures/do_notify schemas/app_jobs/tables/jobs/triggers/increase_job_queue_count] 2025-08-26T23:57:41Z pgpm # add schemas/app_jobs/tables/jobs/triggers/notify_worker +schemas/app_jobs/tables/jobs/triggers/decrease_job_queue_count [schemas/app_jobs/schema schemas/app_jobs/tables/jobs/table] 2025-08-26T23:57:41Z pgpm # add schemas/app_jobs/tables/jobs/triggers/decrease_job_queue_count +schemas/app_jobs/tables/jobs/indexes/priority_run_at_id_idx [schemas/app_jobs/schema schemas/app_jobs/tables/jobs/table] 2025-08-26T23:57:41Z pgpm # add schemas/app_jobs/tables/jobs/indexes/priority_run_at_id_idx +schemas/app_jobs/tables/jobs/indexes/jobs_locked_by_idx [schemas/app_jobs/schema schemas/app_jobs/tables/jobs/table] 2025-08-26T23:57:41Z pgpm # add schemas/app_jobs/tables/jobs/indexes/jobs_locked_by_idx +schemas/app_jobs/tables/jobs/grants/grant_select_insert_update_delete_to_administrator [schemas/app_jobs/schema schemas/app_jobs/tables/jobs/table] 2025-08-26T23:57:41Z pgpm # add schemas/app_jobs/tables/jobs/grants/grant_select_insert_update_delete_to_administrator +schemas/app_jobs/tables/job_queues/table [schemas/app_jobs/schema] 2025-08-26T23:57:41Z pgpm # add schemas/app_jobs/tables/job_queues/table +schemas/app_jobs/tables/job_queues/indexes/job_queues_locked_by_idx [schemas/app_jobs/schema schemas/app_jobs/tables/job_queues/table] 2025-08-26T23:57:41Z pgpm # add schemas/app_jobs/tables/job_queues/indexes/job_queues_locked_by_idx +schemas/app_jobs/tables/job_queues/grants/grant_select_insert_update_delete_to_administrator [schemas/app_jobs/schema schemas/app_jobs/tables/job_queues/table] 2025-08-26T23:57:41Z pgpm # add schemas/app_jobs/tables/job_queues/grants/grant_select_insert_update_delete_to_administrator +schemas/app_jobs/procedures/run_scheduled_job [schemas/app_jobs/schema schemas/app_jobs/tables/jobs/table schemas/app_jobs/tables/scheduled_jobs/table] 2025-08-26T23:57:41Z pgpm # add schemas/app_jobs/procedures/run_scheduled_job +schemas/app_jobs/procedures/reschedule_jobs [schemas/app_jobs/schema schemas/app_jobs/tables/jobs/table] 2025-08-26T23:57:41Z pgpm # add schemas/app_jobs/procedures/reschedule_jobs +schemas/app_jobs/procedures/release_scheduled_jobs [schemas/app_jobs/schema schemas/app_jobs/tables/scheduled_jobs/table] 2025-08-26T23:57:41Z pgpm # add schemas/app_jobs/procedures/release_scheduled_jobs +schemas/app_jobs/procedures/release_jobs [schemas/app_jobs/schema schemas/app_jobs/tables/jobs/table schemas/app_jobs/tables/job_queues/table] 2025-08-26T23:57:41Z pgpm # add schemas/app_jobs/procedures/release_jobs +schemas/app_jobs/procedures/permanently_fail_jobs [schemas/app_jobs/schema schemas/app_jobs/tables/job_queues/table schemas/app_jobs/tables/jobs/table] 2025-08-26T23:57:41Z pgpm # add schemas/app_jobs/procedures/permanently_fail_jobs +schemas/app_jobs/procedures/get_scheduled_job [schemas/app_jobs/schema schemas/app_jobs/tables/scheduled_jobs/table] 2025-08-26T23:57:41Z pgpm # add schemas/app_jobs/procedures/get_scheduled_job +schemas/app_jobs/procedures/get_job [schemas/app_jobs/schema schemas/app_jobs/tables/job_queues/table schemas/app_jobs/tables/jobs/table] 2025-08-26T23:57:41Z pgpm # add schemas/app_jobs/procedures/get_job +schemas/app_jobs/procedures/fail_job [schemas/app_jobs/schema schemas/app_jobs/tables/jobs/table schemas/app_jobs/tables/job_queues/table] 2025-08-26T23:57:41Z pgpm # add schemas/app_jobs/procedures/fail_job +schemas/app_jobs/procedures/complete_jobs [schemas/app_jobs/schema schemas/app_jobs/tables/job_queues/table schemas/app_jobs/tables/jobs/table] 2025-08-26T23:57:41Z pgpm # add schemas/app_jobs/procedures/complete_jobs +schemas/app_jobs/procedures/complete_job [schemas/app_jobs/schema schemas/app_jobs/tables/jobs/table schemas/app_jobs/tables/job_queues/table] 2025-08-26T23:57:41Z pgpm # add schemas/app_jobs/procedures/complete_job +schemas/app_jobs/procedures/add_scheduled_job [schemas/app_jobs/schema schemas/app_jobs/tables/scheduled_jobs/table pgpm-jwt-claims:schemas/jwt_private/procedures/current_database_id] 2025-08-26T23:57:41Z pgpm # add schemas/app_jobs/procedures/add_scheduled_job +schemas/app_jobs/procedures/add_job [schemas/app_jobs/schema schemas/app_jobs/tables/jobs/table schemas/app_jobs/tables/job_queues/table pgpm-jwt-claims:schemas/jwt_private/procedures/current_database_id pgpm-jwt-claims:schemas/jwt_public/procedures/current_user_id] 2025-08-26T23:57:41Z pgpm # add schemas/app_jobs/procedures/add_job +schemas/app_jobs/procedures/grants/grant_execute_add_job_to_authenticated [schemas/app_jobs/schema schemas/app_jobs/procedures/add_job] 2026-06-03T01:15:00Z pgpm # grant authenticated EXECUTE on add_job for INVOKER trigger support +schemas/app_jobs/procedures/remove_job [schemas/app_jobs/schema schemas/app_jobs/tables/jobs/table] 2025-08-26T23:57:41Z pgpm # add schemas/app_jobs/procedures/remove_job +schemas/app_jobs/procedures/force_unlock_workers [schemas/app_jobs/schema schemas/app_jobs/tables/jobs/table schemas/app_jobs/tables/job_queues/table] 2025-08-26T23:57:41Z pgpm # add schemas/app_jobs/procedures/force_unlock_workers diff --git a/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/helpers/json_build_object_apply.sql b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/helpers/json_build_object_apply.sql new file mode 100644 index 00000000..b1778898 --- /dev/null +++ b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/helpers/json_build_object_apply.sql @@ -0,0 +1,7 @@ +-- Revert schemas/app_jobs/helpers/json_build_object_apply from pg + +BEGIN; + +DROP FUNCTION app_jobs.json_build_object_apply; + +COMMIT; diff --git a/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/procedures/add_job.sql b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/procedures/add_job.sql new file mode 100644 index 00000000..44a65ae8 --- /dev/null +++ b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/procedures/add_job.sql @@ -0,0 +1,7 @@ +-- Revert schemas/app_jobs/procedures/add_job from pg + +BEGIN; + +DROP FUNCTION app_jobs.add_job; + +COMMIT; diff --git a/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/procedures/add_scheduled_job.sql b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/procedures/add_scheduled_job.sql new file mode 100644 index 00000000..882a98f9 --- /dev/null +++ b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/procedures/add_scheduled_job.sql @@ -0,0 +1,7 @@ +-- Revert schemas/app_jobs/procedures/add_scheduled_job from pg + +BEGIN; + +DROP FUNCTION app_jobs.add_scheduled_job; + +COMMIT; diff --git a/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/procedures/complete_job.sql b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/procedures/complete_job.sql new file mode 100644 index 00000000..7c0ea9df --- /dev/null +++ b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/procedures/complete_job.sql @@ -0,0 +1,7 @@ +-- Revert schemas/app_jobs/procedures/complete_job from pg + +BEGIN; + +DROP FUNCTION app_jobs.complete_job; + +COMMIT; diff --git a/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/procedures/complete_jobs.sql b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/procedures/complete_jobs.sql new file mode 100644 index 00000000..3db9150e --- /dev/null +++ b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/procedures/complete_jobs.sql @@ -0,0 +1,7 @@ +-- Revert schemas/app_jobs/procedures/complete_jobs from pg + +BEGIN; + +DROP FUNCTION app_jobs.complete_jobs; + +COMMIT; diff --git a/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/procedures/do_notify.sql b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/procedures/do_notify.sql new file mode 100644 index 00000000..58a8138a --- /dev/null +++ b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/procedures/do_notify.sql @@ -0,0 +1,7 @@ +-- Revert schemas/app_jobs/procedures/do_notify from pg + +BEGIN; + +DROP FUNCTION app_jobs.do_notify; + +COMMIT; diff --git a/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/procedures/fail_job.sql b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/procedures/fail_job.sql new file mode 100644 index 00000000..ed96e401 --- /dev/null +++ b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/procedures/fail_job.sql @@ -0,0 +1,7 @@ +-- Revert schemas/app_jobs/procedures/fail_job from pg + +BEGIN; + +DROP FUNCTION app_jobs.fail_job; + +COMMIT; diff --git a/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/procedures/force_unlock_workers.sql b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/procedures/force_unlock_workers.sql new file mode 100644 index 00000000..aac5d270 --- /dev/null +++ b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/procedures/force_unlock_workers.sql @@ -0,0 +1,7 @@ +-- Revert schemas/app_jobs/procedures/force_unlock_workers from pg + +BEGIN; + +DROP FUNCTION app_jobs.force_unlock_workers; + +COMMIT; diff --git a/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/procedures/get_job.sql b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/procedures/get_job.sql new file mode 100644 index 00000000..469f6b4d --- /dev/null +++ b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/procedures/get_job.sql @@ -0,0 +1,7 @@ +-- Revert schemas/app_jobs/procedures/get_job from pg + +BEGIN; + +DROP FUNCTION app_jobs.get_job; + +COMMIT; diff --git a/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/procedures/get_scheduled_job.sql b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/procedures/get_scheduled_job.sql new file mode 100644 index 00000000..f41f8fdb --- /dev/null +++ b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/procedures/get_scheduled_job.sql @@ -0,0 +1,7 @@ +-- Revert schemas/app_jobs/procedures/get_scheduled_job from pg + +BEGIN; + +DROP FUNCTION app_jobs.get_scheduled_job; + +COMMIT; diff --git a/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/procedures/grants/grant_execute_add_job_to_authenticated.sql b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/procedures/grants/grant_execute_add_job_to_authenticated.sql new file mode 100644 index 00000000..e020b77c --- /dev/null +++ b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/procedures/grants/grant_execute_add_job_to_authenticated.sql @@ -0,0 +1,7 @@ +-- Revert schemas/app_jobs/procedures/grants/grant_execute_add_job_to_authenticated from pg + +BEGIN; + +REVOKE EXECUTE ON FUNCTION app_jobs.add_job(text, json, text, text, timestamptz, integer, integer, uuid, uuid, text) FROM authenticated; + +COMMIT; diff --git a/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/procedures/permanently_fail_jobs.sql b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/procedures/permanently_fail_jobs.sql new file mode 100644 index 00000000..f0299ea8 --- /dev/null +++ b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/procedures/permanently_fail_jobs.sql @@ -0,0 +1,7 @@ +-- Revert schemas/app_jobs/procedures/permanently_fail_jobs from pg + +BEGIN; + +DROP FUNCTION app_jobs.permanently_fail_jobs; + +COMMIT; diff --git a/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/procedures/release_jobs.sql b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/procedures/release_jobs.sql new file mode 100644 index 00000000..8ece69ef --- /dev/null +++ b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/procedures/release_jobs.sql @@ -0,0 +1,7 @@ +-- Revert schemas/app_jobs/procedures/release_jobs from pg + +BEGIN; + +DROP FUNCTION app_jobs.release_jobs; + +COMMIT; diff --git a/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/procedures/release_scheduled_jobs.sql b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/procedures/release_scheduled_jobs.sql new file mode 100644 index 00000000..a16e6e9a --- /dev/null +++ b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/procedures/release_scheduled_jobs.sql @@ -0,0 +1,7 @@ +-- Revert schemas/app_jobs/procedures/release_scheduled_jobs from pg + +BEGIN; + +DROP FUNCTION app_jobs.release_scheduled_jobs; + +COMMIT; diff --git a/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/procedures/remove_job.sql b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/procedures/remove_job.sql new file mode 100644 index 00000000..e673bdee --- /dev/null +++ b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/procedures/remove_job.sql @@ -0,0 +1,7 @@ +-- Revert schemas/app_jobs/procedures/remove_job from pg + +BEGIN; + +DROP FUNCTION app_jobs.remove_job; + +COMMIT; diff --git a/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/procedures/reschedule_jobs.sql b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/procedures/reschedule_jobs.sql new file mode 100644 index 00000000..34a44171 --- /dev/null +++ b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/procedures/reschedule_jobs.sql @@ -0,0 +1,7 @@ +-- Revert schemas/app_jobs/procedures/reschedule_jobs from pg + +BEGIN; + +DROP FUNCTION app_jobs.reschedule_jobs; + +COMMIT; diff --git a/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/procedures/run_scheduled_job.sql b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/procedures/run_scheduled_job.sql new file mode 100644 index 00000000..77886fc0 --- /dev/null +++ b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/procedures/run_scheduled_job.sql @@ -0,0 +1,7 @@ +-- Revert schemas/app_jobs/procedures/run_scheduled_job from pg + +BEGIN; + +DROP FUNCTION app_jobs.run_scheduled_job; + +COMMIT; diff --git a/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/schema.sql b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/schema.sql new file mode 100644 index 00000000..2b238d0f --- /dev/null +++ b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/schema.sql @@ -0,0 +1,7 @@ +-- Revert schemas/app_jobs/schema from pg + +BEGIN; + +DROP SCHEMA app_jobs; + +COMMIT; diff --git a/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/tables/job_queues/grants/grant_select_insert_update_delete_to_administrator.sql b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/tables/job_queues/grants/grant_select_insert_update_delete_to_administrator.sql new file mode 100644 index 00000000..06a83378 --- /dev/null +++ b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/tables/job_queues/grants/grant_select_insert_update_delete_to_administrator.sql @@ -0,0 +1,7 @@ +-- Revert schemas/app_jobs/tables/job_queues/grants/grant_select_insert_update_delete_to_administrator from pg + +BEGIN; + +REVOKE SELECT, INSERT, UPDATE, DELETE ON TABLE app_jobs.job_queues FROM administrator; + +COMMIT; diff --git a/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/tables/job_queues/indexes/job_queues_locked_by_idx.sql b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/tables/job_queues/indexes/job_queues_locked_by_idx.sql new file mode 100644 index 00000000..20290a2a --- /dev/null +++ b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/tables/job_queues/indexes/job_queues_locked_by_idx.sql @@ -0,0 +1,7 @@ +-- Revert schemas/app_jobs/tables/job_queues/indexes/job_queues_locked_by_idx from pg + +BEGIN; + +DROP INDEX app_jobs.job_queues_locked_by_idx; + +COMMIT; diff --git a/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/tables/job_queues/table.sql b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/tables/job_queues/table.sql new file mode 100644 index 00000000..79c62cbc --- /dev/null +++ b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/tables/job_queues/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/app_jobs/tables/job_queues/table from pg + +BEGIN; + +DROP TABLE app_jobs.job_queues; + +COMMIT; diff --git a/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/tables/jobs/grants/grant_select_insert_update_delete_to_administrator.sql b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/tables/jobs/grants/grant_select_insert_update_delete_to_administrator.sql new file mode 100644 index 00000000..c67b07e2 --- /dev/null +++ b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/tables/jobs/grants/grant_select_insert_update_delete_to_administrator.sql @@ -0,0 +1,7 @@ +-- Revert schemas/app_jobs/tables/jobs/grants/grant_select_insert_update_delete_to_administrator from pg + +BEGIN; + +REVOKE SELECT, INSERT, UPDATE, DELETE ON TABLE app_jobs.jobs FROM administrator; + +COMMIT; diff --git a/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/tables/jobs/indexes/jobs_locked_by_idx.sql b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/tables/jobs/indexes/jobs_locked_by_idx.sql new file mode 100644 index 00000000..f26cb13e --- /dev/null +++ b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/tables/jobs/indexes/jobs_locked_by_idx.sql @@ -0,0 +1,7 @@ +-- Revert schemas/app_jobs/tables/jobs/indexes/jobs_locked_by_idx from pg + +BEGIN; + +DROP INDEX app_jobs.jobs_locked_by_idx; + +COMMIT; diff --git a/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/tables/jobs/indexes/priority_run_at_id_idx.sql b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/tables/jobs/indexes/priority_run_at_id_idx.sql new file mode 100644 index 00000000..2268c2a0 --- /dev/null +++ b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/tables/jobs/indexes/priority_run_at_id_idx.sql @@ -0,0 +1,9 @@ +-- Revert schemas/app_jobs/tables/jobs/indexes/priority_run_at_id_idx from pg + +BEGIN; + +DROP INDEX IF EXISTS app_jobs.priority_run_at_id_idx; +DROP INDEX IF EXISTS app_jobs.jobs_main_index; +DROP INDEX IF EXISTS app_jobs.jobs_no_queue_index; + +COMMIT; diff --git a/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/tables/jobs/table.sql b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/tables/jobs/table.sql new file mode 100644 index 00000000..b4156ad3 --- /dev/null +++ b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/tables/jobs/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/app_jobs/tables/jobs/table from pg + +BEGIN; + +DROP TABLE app_jobs.jobs; + +COMMIT; diff --git a/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/tables/jobs/triggers/decrease_job_queue_count.sql b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/tables/jobs/triggers/decrease_job_queue_count.sql new file mode 100644 index 00000000..bf4f88c6 --- /dev/null +++ b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/tables/jobs/triggers/decrease_job_queue_count.sql @@ -0,0 +1,7 @@ +-- Revert schemas/app_jobs/tables/jobs/triggers/decrease_job_queue_count from pg +BEGIN; +DROP TRIGGER decrease_job_queue_count_on_delete ON app_jobs.jobs; +DROP TRIGGER decrease_job_queue_count_on_update ON app_jobs.jobs; +DROP FUNCTION app_jobs.tg_decrease_job_queue_count; +COMMIT; + diff --git a/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/tables/jobs/triggers/increase_job_queue_count.sql b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/tables/jobs/triggers/increase_job_queue_count.sql new file mode 100644 index 00000000..5098a651 --- /dev/null +++ b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/tables/jobs/triggers/increase_job_queue_count.sql @@ -0,0 +1,7 @@ +-- Revert schemas/app_jobs/tables/jobs/triggers/increase_job_queue_count from pg +BEGIN; +DROP TRIGGER _500_increase_job_queue_count_on_insert ON app_jobs.jobs; +DROP TRIGGER _500_increase_job_queue_count_on_update ON app_jobs.jobs; +DROP FUNCTION app_jobs.tg_increase_job_queue_count; +COMMIT; + diff --git a/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/tables/jobs/triggers/notify_worker.sql b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/tables/jobs/triggers/notify_worker.sql new file mode 100644 index 00000000..37a5f531 --- /dev/null +++ b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/tables/jobs/triggers/notify_worker.sql @@ -0,0 +1,6 @@ +-- Revert schemas/app_jobs/tables/jobs/triggers/notify_worker from pg +BEGIN; +DROP TRIGGER IF EXISTS _900_notify_worker ON app_jobs.jobs; +DROP TRIGGER IF EXISTS _900_after_insert ON app_jobs.jobs; +DROP FUNCTION IF EXISTS app_jobs.tg_jobs__after_insert; +COMMIT; diff --git a/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/tables/jobs/triggers/timestamps.sql b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/tables/jobs/triggers/timestamps.sql new file mode 100644 index 00000000..7dc2f048 --- /dev/null +++ b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/tables/jobs/triggers/timestamps.sql @@ -0,0 +1,9 @@ +-- Revert schemas/app_jobs/tables/jobs/triggers/timestamps from pg +BEGIN; +ALTER TABLE app_jobs.jobs + DROP COLUMN created_at; +ALTER TABLE app_jobs.jobs + DROP COLUMN updated_at; +DROP TRIGGER _100_update_jobs_modtime_tg ON app_jobs.jobs; +COMMIT; + diff --git a/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/tables/scheduled_jobs/grants/grant_select_insert_update_delete_to_administrator.sql b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/tables/scheduled_jobs/grants/grant_select_insert_update_delete_to_administrator.sql new file mode 100644 index 00000000..0990e98d --- /dev/null +++ b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/tables/scheduled_jobs/grants/grant_select_insert_update_delete_to_administrator.sql @@ -0,0 +1,7 @@ +-- Revert schemas/app_jobs/tables/scheduled_jobs/grants/grant_select_insert_update_delete_to_administrator from pg + +BEGIN; + +REVOKE SELECT, INSERT, UPDATE, DELETE ON TABLE app_jobs.scheduled_jobs FROM administrator; + +COMMIT; diff --git a/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/tables/scheduled_jobs/indexes/scheduled_jobs_locked_by_idx.sql b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/tables/scheduled_jobs/indexes/scheduled_jobs_locked_by_idx.sql new file mode 100644 index 00000000..5ff1e6d5 --- /dev/null +++ b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/tables/scheduled_jobs/indexes/scheduled_jobs_locked_by_idx.sql @@ -0,0 +1,7 @@ +-- Revert schemas/app_jobs/tables/scheduled_jobs/indexes/scheduled_jobs_locked_by_idx from pg + +BEGIN; + +DROP INDEX app_jobs.scheduled_jobs_locked_by_idx; + +COMMIT; diff --git a/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/tables/scheduled_jobs/indexes/scheduled_jobs_priority_id_idx.sql b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/tables/scheduled_jobs/indexes/scheduled_jobs_priority_id_idx.sql new file mode 100644 index 00000000..be4b5878 --- /dev/null +++ b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/tables/scheduled_jobs/indexes/scheduled_jobs_priority_id_idx.sql @@ -0,0 +1,7 @@ +-- Revert schemas/app_jobs/tables/scheduled_jobs/indexes/scheduled_jobs_priority_id_idx from pg + +BEGIN; + +DROP INDEX app_jobs.scheduled_jobs_priority_id_idx; + +COMMIT; diff --git a/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/tables/scheduled_jobs/table.sql b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/tables/scheduled_jobs/table.sql new file mode 100644 index 00000000..3a06f0da --- /dev/null +++ b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/tables/scheduled_jobs/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/app_jobs/tables/scheduled_jobs/table from pg + +BEGIN; + +DROP TABLE app_jobs.scheduled_jobs; + +COMMIT; diff --git a/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/tables/scheduled_jobs/triggers/notify_scheduled_job.sql b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/tables/scheduled_jobs/triggers/notify_scheduled_job.sql new file mode 100644 index 00000000..5c1852c7 --- /dev/null +++ b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/tables/scheduled_jobs/triggers/notify_scheduled_job.sql @@ -0,0 +1,8 @@ +-- Revert schemas/app_jobs/tables/scheduled_jobs/triggers/notify_scheduled_job from pg + +BEGIN; + +DROP TRIGGER _900_notify_scheduled_job ON app_jobs.scheduled_jobs; + + +COMMIT; diff --git a/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/triggers/tg_add_job_with_fields.sql b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/triggers/tg_add_job_with_fields.sql new file mode 100644 index 00000000..5384edfc --- /dev/null +++ b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/triggers/tg_add_job_with_fields.sql @@ -0,0 +1,7 @@ +-- Revert schemas/app_jobs/triggers/tg_add_job_with_fields from pg + +BEGIN; + +DROP FUNCTION app_jobs.trigger_job_with_fields; + +COMMIT; diff --git a/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/triggers/tg_add_job_with_row.sql b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/triggers/tg_add_job_with_row.sql new file mode 100644 index 00000000..9d6b68a2 --- /dev/null +++ b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/triggers/tg_add_job_with_row.sql @@ -0,0 +1,7 @@ +-- Revert schemas/app_jobs/triggers/tg_add_job_with_row from pg + +BEGIN; + +DROP FUNCTION app_jobs.tg_add_job_with_row; + +COMMIT; diff --git a/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/triggers/tg_add_job_with_row_id.sql b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/triggers/tg_add_job_with_row_id.sql new file mode 100644 index 00000000..1f0fb04b --- /dev/null +++ b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/triggers/tg_add_job_with_row_id.sql @@ -0,0 +1,5 @@ +-- Revert schemas/app_jobs/triggers/tg_add_job_with_row_id from pg +BEGIN; +DROP FUNCTION app_jobs.tg_add_job_with_row_id; +COMMIT; + diff --git a/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/triggers/tg_update_timestamps.sql b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/triggers/tg_update_timestamps.sql new file mode 100644 index 00000000..37378b14 --- /dev/null +++ b/extensions/@pgpm/database-jobs/revert/schemas/app_jobs/triggers/tg_update_timestamps.sql @@ -0,0 +1,7 @@ +-- Revert schemas/app_jobs/triggers/tg_update_timestamps from pg + +BEGIN; + +DROP FUNCTION app_jobs.tg_update_timestamps; + +COMMIT; diff --git a/extensions/@pgpm/database-jobs/sql/pgpm-database-jobs--0.26.3.sql b/extensions/@pgpm/database-jobs/sql/pgpm-database-jobs--0.26.3.sql new file mode 100644 index 00000000..ab219b9e --- /dev/null +++ b/extensions/@pgpm/database-jobs/sql/pgpm-database-jobs--0.26.3.sql @@ -0,0 +1,916 @@ +\echo Use "CREATE EXTENSION pgpm-database-jobs" to load this file. \quit +CREATE SCHEMA IF NOT EXISTS app_jobs; + +GRANT USAGE ON SCHEMA app_jobs TO administrator; + +GRANT USAGE ON SCHEMA app_jobs TO authenticated; + +ALTER DEFAULT PRIVILEGES IN SCHEMA app_jobs + GRANT EXECUTE ON FUNCTIONS TO administrator; + +CREATE FUNCTION app_jobs.tg_update_timestamps() RETURNS trigger AS $EOFCODE$ +BEGIN + IF TG_OP = 'INSERT' THEN + NEW.created_at = NOW(); + NEW.updated_at = NOW(); + ELSIF TG_OP = 'UPDATE' THEN + NEW.created_at = OLD.created_at; + NEW.updated_at = greatest (now(), OLD.updated_at + interval '1 millisecond'); + END IF; + RETURN NEW; +END; +$EOFCODE$ LANGUAGE plpgsql; + +CREATE FUNCTION app_jobs.tg_add_job_with_row_id() RETURNS trigger AS $EOFCODE$ +BEGIN + IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN + PERFORM + app_jobs.add_job (tg_argv[0], json_build_object('id', NEW.id)); + RETURN NEW; + END IF; + IF (TG_OP = 'DELETE') THEN + PERFORM + app_jobs.add_job (tg_argv[0], json_build_object('id', OLD.id)); + RETURN OLD; + END IF; +END; +$EOFCODE$ LANGUAGE plpgsql VOLATILE SECURITY DEFINER; + +COMMENT ON FUNCTION app_jobs.tg_add_job_with_row_id IS 'Useful shortcut to create a job on insert or update. Pass the task name as the trigger argument, and the record id will automatically be available on the JSON payload.'; + +CREATE FUNCTION app_jobs.tg_add_job_with_row() RETURNS trigger AS $EOFCODE$ +BEGIN + IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN + PERFORM + app_jobs.add_job (TG_ARGV[0], to_json(NEW)); + RETURN NEW; + END IF; + IF (TG_OP = 'DELETE') THEN + PERFORM + app_jobs.add_job (TG_ARGV[0], to_json(OLD)); + RETURN OLD; + END IF; +END; +$EOFCODE$ LANGUAGE plpgsql VOLATILE SECURITY DEFINER; + +COMMENT ON FUNCTION app_jobs.tg_add_job_with_row IS 'Useful shortcut to create a job on insert or update. Pass the task name as the trigger argument, and the record data will automatically be available on the JSON payload.'; + +CREATE FUNCTION app_jobs.json_build_object_apply(arguments text[]) RETURNS pg_catalog.json AS $EOFCODE$ +DECLARE + arg text; + _sql text; + _res json; + args text[]; +BEGIN + _sql = 'SELECT json_build_object('; + FOR arg IN + SELECT + unnest(arguments) + LOOP + args = array_append(args, format('''%s''', arg)); + END LOOP; + _sql = _sql || format('%s);', array_to_string(args, ',')); + EXECUTE _sql INTO _res; + RETURN _res; +END; +$EOFCODE$ LANGUAGE plpgsql; + +CREATE FUNCTION app_jobs.trigger_job_with_fields() RETURNS trigger AS $EOFCODE$ +DECLARE + arg text; + fn text; + i int; + args text[]; +BEGIN + FOR i IN + SELECT + * + FROM + generate_series(1, TG_NARGS) g (i) + LOOP + IF (i = 1) THEN + fn = TG_ARGV[i - 1]; + ELSE + args = array_append(args, TG_ARGV[i - 1]); + IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN + EXECUTE format('SELECT ($1).%s::text', TG_ARGV[i - 1]) + USING NEW INTO arg; + END IF; + IF (TG_OP = 'DELETE') THEN + EXECUTE format('SELECT ($1).%s::text', TG_ARGV[i - 1]) + USING OLD INTO arg; + END IF; + args = array_append(args, arg); + END IF; + END LOOP; + PERFORM + app_jobs.add_job (fn, app_jobs.json_build_object_apply (args)); + IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN + RETURN NEW; + END IF; + IF (TG_OP = 'DELETE') THEN + RETURN OLD; + END IF; +END; +$EOFCODE$ LANGUAGE plpgsql VOLATILE SECURITY DEFINER; + +CREATE TABLE app_jobs.scheduled_jobs ( + id bigserial PRIMARY KEY, + database_id uuid, + actor_id uuid, + entity_id uuid, + queue_name text DEFAULT NULL, + task_identifier text NOT NULL, + payload pg_catalog.json DEFAULT '{}'::json NOT NULL, + priority int DEFAULT 0 NOT NULL, + max_attempts int DEFAULT 25 NOT NULL, + key text, + locked_at timestamptz, + locked_by text, + schedule_info pg_catalog.json NOT NULL, + last_scheduled timestamptz, + last_scheduled_id bigint, + CHECK (length(key) < 513), + CHECK (length(task_identifier) < 127), + CHECK (max_attempts >= 1), + CHECK (length(queue_name) < 127), + CHECK (length(locked_by) > 3), + UNIQUE (key) +); + +COMMENT ON TABLE app_jobs.scheduled_jobs IS 'Recurring/cron-style job definitions: each row spawns jobs on a schedule, optionally scoped to a database'; + +COMMENT ON COLUMN app_jobs.scheduled_jobs.id IS 'Auto-incrementing scheduled job identifier'; + +COMMENT ON COLUMN app_jobs.scheduled_jobs.database_id IS 'Database this scheduled job belongs to (nullable for system-level schedules without tenant context)'; + +COMMENT ON COLUMN app_jobs.scheduled_jobs.actor_id IS 'User who created this scheduled job, read from JWT claims at creation time'; + +COMMENT ON COLUMN app_jobs.scheduled_jobs.entity_id IS 'Entity (org/team) this scheduled job is scoped to for billing; NULL means platform-level (resolved via database_id → owner_id)'; + +COMMENT ON COLUMN app_jobs.scheduled_jobs.queue_name IS 'Name of the queue spawned jobs are placed into'; + +COMMENT ON COLUMN app_jobs.scheduled_jobs.task_identifier IS 'Task type identifier for spawned jobs'; + +COMMENT ON COLUMN app_jobs.scheduled_jobs.payload IS 'JSON payload passed to each spawned job'; + +COMMENT ON COLUMN app_jobs.scheduled_jobs.priority IS 'Priority assigned to spawned jobs (lower = higher priority)'; + +COMMENT ON COLUMN app_jobs.scheduled_jobs.max_attempts IS 'Max retry attempts for spawned jobs'; + +COMMENT ON COLUMN app_jobs.scheduled_jobs.key IS 'Optional unique deduplication key'; + +COMMENT ON COLUMN app_jobs.scheduled_jobs.locked_at IS 'Timestamp when the scheduler locked this record for processing'; + +COMMENT ON COLUMN app_jobs.scheduled_jobs.locked_by IS 'Identifier of the scheduler worker holding the lock'; + +COMMENT ON COLUMN app_jobs.scheduled_jobs.schedule_info IS 'JSON schedule configuration (e.g. cron expression, interval)'; + +COMMENT ON COLUMN app_jobs.scheduled_jobs.last_scheduled IS 'Timestamp when a job was last spawned from this schedule'; + +COMMENT ON COLUMN app_jobs.scheduled_jobs.last_scheduled_id IS 'ID of the last job spawned from this schedule'; + +CREATE FUNCTION app_jobs.do_notify() RETURNS trigger AS $EOFCODE$ +BEGIN + PERFORM + pg_notify(TG_ARGV[0], ''); + RETURN NEW; +END; +$EOFCODE$ LANGUAGE plpgsql; + +CREATE TRIGGER _900_notify_scheduled_job + AFTER INSERT + ON app_jobs.scheduled_jobs + FOR EACH ROW + EXECUTE PROCEDURE app_jobs.do_notify('scheduled_jobs:insert'); + +CREATE INDEX scheduled_jobs_priority_id_idx ON app_jobs.scheduled_jobs (priority, id); + +CREATE INDEX scheduled_jobs_locked_by_idx ON app_jobs.scheduled_jobs (locked_by); + +GRANT SELECT, INSERT, UPDATE, DELETE ON app_jobs.scheduled_jobs TO administrator; + +CREATE TABLE app_jobs.jobs ( + id bigserial PRIMARY KEY, + database_id uuid, + actor_id uuid, + entity_id uuid, + organization_id uuid, + entity_type text, + queue_name text DEFAULT NULL, + task_identifier text NOT NULL, + payload pg_catalog.json DEFAULT '{}'::json NOT NULL, + priority int DEFAULT 0 NOT NULL, + run_at timestamptz DEFAULT now() NOT NULL, + attempts int DEFAULT 0 NOT NULL, + max_attempts int DEFAULT 25 NOT NULL, + key text, + last_error text, + locked_at timestamptz, + locked_by text, + is_available boolean GENERATED ALWAYS AS (locked_at IS NULL + AND attempts < max_attempts) STORED NOT NULL, + CHECK (length(key) < 513), + CHECK (length(task_identifier) < 127), + CHECK (max_attempts >= 1), + CHECK (length(queue_name) < 127), + CHECK (length(locked_by) > 3), + UNIQUE (key) +); + +COMMENT ON TABLE app_jobs.jobs IS 'Background job queue: each row is a pending or in-progress task, optionally scoped to a database'; + +COMMENT ON COLUMN app_jobs.jobs.id IS 'Auto-incrementing job identifier'; + +COMMENT ON COLUMN app_jobs.jobs.database_id IS 'Database this job belongs to (nullable for system-level jobs without tenant context)'; + +COMMENT ON COLUMN app_jobs.jobs.actor_id IS 'User who triggered this job, read from JWT claims at enqueue time'; + +COMMENT ON COLUMN app_jobs.jobs.entity_id IS 'Entity (org/team) this job is scoped to for billing; NULL means platform-level (resolved via database_id → owner_id)'; + +COMMENT ON COLUMN app_jobs.jobs.organization_id IS 'Top-level organization for this entity; resolved at enqueue time via get_organization_id(entity_type, entity_id)'; + +COMMENT ON COLUMN app_jobs.jobs.entity_type IS 'Entity type prefix (org, team, app, etc.) for interpreting entity_id'; + +COMMENT ON COLUMN app_jobs.jobs.queue_name IS 'Name of the queue this job belongs to; used for worker routing and concurrency control'; + +COMMENT ON COLUMN app_jobs.jobs.task_identifier IS 'Identifier for the task type (maps to a worker handler function)'; + +COMMENT ON COLUMN app_jobs.jobs.payload IS 'JSON payload of arguments passed to the task handler'; + +COMMENT ON COLUMN app_jobs.jobs.priority IS 'Execution priority; lower numbers run first (default 0)'; + +COMMENT ON COLUMN app_jobs.jobs.run_at IS 'Earliest time this job should be executed; used for delayed/scheduled execution'; + +COMMENT ON COLUMN app_jobs.jobs.attempts IS 'Number of times this job has been attempted so far'; + +COMMENT ON COLUMN app_jobs.jobs.max_attempts IS 'Maximum retry attempts before the job is considered permanently failed'; + +COMMENT ON COLUMN app_jobs.jobs.key IS 'Optional unique deduplication key; prevents duplicate jobs with the same key'; + +COMMENT ON COLUMN app_jobs.jobs.last_error IS 'Error message from the most recent failed attempt'; + +COMMENT ON COLUMN app_jobs.jobs.locked_at IS 'Timestamp when a worker locked this job for processing'; + +COMMENT ON COLUMN app_jobs.jobs.locked_by IS 'Identifier of the worker that currently holds the lock'; + +COMMENT ON COLUMN app_jobs.jobs.is_available IS 'Generated column: true when job is unlocked and has remaining attempts'; + +ALTER TABLE app_jobs.jobs + ADD COLUMN created_at timestamptz; + +ALTER TABLE app_jobs.jobs + ALTER COLUMN created_at SET DEFAULT now(); + +ALTER TABLE app_jobs.jobs + ADD COLUMN updated_at timestamptz; + +ALTER TABLE app_jobs.jobs + ALTER COLUMN updated_at SET DEFAULT now(); + +CREATE TRIGGER _100_update_jobs_modtime_tg + BEFORE INSERT OR UPDATE + ON app_jobs.jobs + FOR EACH ROW + EXECUTE PROCEDURE app_jobs.tg_update_timestamps(); + +CREATE FUNCTION app_jobs.tg_increase_job_queue_count() RETURNS trigger AS $EOFCODE$ +BEGIN + INSERT INTO app_jobs.job_queues (queue_name, job_count) + VALUES (NEW.queue_name, 1) + ON CONFLICT (queue_name) + DO UPDATE SET + job_count = job_queues.job_count + 1; + RETURN NEW; +END; +$EOFCODE$ LANGUAGE plpgsql VOLATILE; + +CREATE TRIGGER _500_increase_job_queue_count_on_insert + AFTER INSERT + ON app_jobs.jobs + FOR EACH ROW + WHEN (new.queue_name IS NOT NULL) + EXECUTE PROCEDURE app_jobs.tg_increase_job_queue_count(); + +CREATE TRIGGER _500_increase_job_queue_count_on_update + AFTER UPDATE OF queue_name + ON app_jobs.jobs + FOR EACH ROW + WHEN (new.queue_name IS DISTINCT FROM old.queue_name + AND new.queue_name IS NOT NULL) + EXECUTE PROCEDURE app_jobs.tg_increase_job_queue_count(); + +CREATE FUNCTION app_jobs.tg_jobs__after_insert() RETURNS trigger AS $EOFCODE$ +BEGIN + PERFORM + pg_notify('jobs:insert', ''); + RETURN NULL; +END; +$EOFCODE$ LANGUAGE plpgsql; + +CREATE TRIGGER _900_after_insert + AFTER INSERT + ON app_jobs.jobs + FOR EACH STATEMENT + EXECUTE PROCEDURE app_jobs.tg_jobs__after_insert(); + +CREATE FUNCTION app_jobs.tg_decrease_job_queue_count() RETURNS trigger AS $EOFCODE$ +DECLARE + v_new_job_count int; +BEGIN + UPDATE + app_jobs.job_queues + SET + job_count = job_queues.job_count - 1 + WHERE + queue_name = OLD.queue_name + RETURNING + job_count INTO v_new_job_count; + IF v_new_job_count <= 0 THEN + DELETE FROM app_jobs.job_queues + WHERE queue_name = OLD.queue_name + AND job_count <= 0; + END IF; + RETURN OLD; +END; +$EOFCODE$ LANGUAGE plpgsql VOLATILE; + +CREATE TRIGGER decrease_job_queue_count_on_delete + AFTER DELETE + ON app_jobs.jobs + FOR EACH ROW + WHEN (old.queue_name IS NOT NULL) + EXECUTE PROCEDURE app_jobs.tg_decrease_job_queue_count(); + +CREATE TRIGGER decrease_job_queue_count_on_update + AFTER UPDATE OF queue_name + ON app_jobs.jobs + FOR EACH ROW + WHEN (new.queue_name IS DISTINCT FROM old.queue_name + AND old.queue_name IS NOT NULL) + EXECUTE PROCEDURE app_jobs.tg_decrease_job_queue_count(); + +CREATE INDEX jobs_main_index ON app_jobs.jobs (priority, run_at) INCLUDE (id, queue_name) WHERE is_available = true; + +CREATE INDEX jobs_no_queue_index ON app_jobs.jobs (priority, run_at) INCLUDE (id) WHERE is_available = true + AND queue_name IS NULL; + +CREATE INDEX jobs_locked_by_idx ON app_jobs.jobs (locked_by); + +GRANT SELECT, INSERT, UPDATE, DELETE ON app_jobs.jobs TO administrator; + +CREATE TABLE app_jobs.job_queues ( + queue_name text NOT NULL PRIMARY KEY, + job_count int DEFAULT 0 NOT NULL, + locked_at timestamptz, + locked_by text +); + +COMMENT ON TABLE app_jobs.job_queues IS 'Queue metadata: tracks job counts and locking state for each named queue'; + +COMMENT ON COLUMN app_jobs.job_queues.queue_name IS 'Unique name identifying this queue'; + +COMMENT ON COLUMN app_jobs.job_queues.job_count IS 'Number of pending jobs in this queue'; + +COMMENT ON COLUMN app_jobs.job_queues.locked_at IS 'Timestamp when this queue was locked for batch processing'; + +COMMENT ON COLUMN app_jobs.job_queues.locked_by IS 'Identifier of the worker that currently holds the queue lock'; + +CREATE INDEX job_queues_locked_by_idx ON app_jobs.job_queues (locked_by); + +GRANT SELECT, INSERT, UPDATE, DELETE ON app_jobs.job_queues TO administrator; + +CREATE FUNCTION app_jobs.run_scheduled_job(id bigint, job_expiry interval DEFAULT '1 hours') RETURNS app_jobs.jobs AS $EOFCODE$ +DECLARE + j app_jobs.jobs; + last_id bigint; + lkd_by text; +BEGIN + -- check last scheduled + SELECT + last_scheduled_id + FROM + app_jobs.scheduled_jobs s + WHERE + s.id = run_scheduled_job.id INTO last_id; + + -- if it's been scheduled check if it's been run + + IF (last_id IS NOT NULL) THEN + SELECT + locked_by + FROM + app_jobs.jobs js + WHERE + js.id = last_id + AND (js.locked_at IS NULL -- never been run + OR js.locked_at >= (NOW() - job_expiry) + -- still running within a safe interval +) INTO lkd_by; + IF (FOUND) THEN + RAISE EXCEPTION 'ALREADY_SCHEDULED'; + END IF; + END IF; + + -- insert new job + INSERT INTO app_jobs.jobs ( + database_id, + actor_id, + entity_id, + queue_name, + task_identifier, + payload, + priority, + max_attempts, + key + ) SELECT + database_id, + actor_id, + entity_id, + queue_name, + task_identifier, + payload, + priority, + max_attempts, + key + FROM + app_jobs.scheduled_jobs s + WHERE + s.id = run_scheduled_job.id + RETURNING + * INTO j; + -- update the scheduled job + UPDATE + app_jobs.scheduled_jobs s + SET + last_scheduled = NOW(), + last_scheduled_id = j.id + WHERE + s.id = run_scheduled_job.id; + RETURN j; +END; +$EOFCODE$ LANGUAGE plpgsql VOLATILE; + +CREATE FUNCTION app_jobs.reschedule_jobs(job_ids bigint[], run_at timestamptz DEFAULT NULL, priority int DEFAULT NULL, attempts int DEFAULT NULL, max_attempts int DEFAULT NULL) RETURNS SETOF app_jobs.jobs LANGUAGE sql AS $EOFCODE$ + UPDATE + app_jobs.jobs + SET + run_at = coalesce(reschedule_jobs.run_at, jobs.run_at), + priority = coalesce(reschedule_jobs.priority, jobs.priority), + attempts = coalesce(reschedule_jobs.attempts, jobs.attempts), + max_attempts = coalesce(reschedule_jobs.max_attempts, jobs.max_attempts) + WHERE + id = ANY (job_ids) + AND (locked_by IS NULL + OR locked_at < NOW() - interval '4 hours') + RETURNING + *; +$EOFCODE$; + +CREATE FUNCTION app_jobs.release_scheduled_jobs(worker_id text, ids bigint[] DEFAULT NULL) RETURNS void AS $EOFCODE$ +DECLARE +BEGIN + -- clear the scheduled job + UPDATE + app_jobs.scheduled_jobs s + SET + locked_at = NULL, + locked_by = NULL + WHERE + locked_by = worker_id + AND (ids IS NULL + OR s.id = ANY (ids)); +END; +$EOFCODE$ LANGUAGE plpgsql VOLATILE; + +CREATE FUNCTION app_jobs.release_jobs(worker_id text) RETURNS void AS $EOFCODE$ +DECLARE +BEGIN + -- clear the job + UPDATE + app_jobs.jobs + SET + locked_at = NULL, + locked_by = NULL, + attempts = GREATEST (attempts - 1, 0) + WHERE + locked_by = worker_id; + -- clear the queue + UPDATE + app_jobs.job_queues + SET + locked_at = NULL, + locked_by = NULL + WHERE + locked_by = worker_id; +END; +$EOFCODE$ LANGUAGE plpgsql VOLATILE; + +CREATE FUNCTION app_jobs.permanently_fail_jobs(job_ids bigint[], error_message text DEFAULT NULL) RETURNS SETOF app_jobs.jobs LANGUAGE sql AS $EOFCODE$ + UPDATE + app_jobs.jobs + SET + last_error = coalesce(error_message, 'Manually marked as failed'), + attempts = max_attempts + WHERE + id = ANY (job_ids) + AND (locked_by IS NULL + OR locked_at < NOW() - interval '4 hours') + RETURNING + *; +$EOFCODE$; + +CREATE FUNCTION app_jobs.get_scheduled_job(worker_id text, task_identifiers text[] DEFAULT NULL) RETURNS app_jobs.scheduled_jobs LANGUAGE plpgsql AS $EOFCODE$ +DECLARE + v_job_id bigint; + v_row app_jobs.scheduled_jobs; +BEGIN + + -- + + IF worker_id IS NULL THEN + RAISE exception 'INVALID_WORKER_ID'; + END IF; + + -- + + SELECT + scheduled_jobs.id INTO v_job_id + FROM + app_jobs.scheduled_jobs + WHERE (scheduled_jobs.locked_at IS NULL) + AND (task_identifiers IS NULL + OR task_identifier = ANY (task_identifiers)) + ORDER BY + priority ASC, + id ASC + LIMIT 1 + FOR UPDATE + SKIP LOCKED; + + -- + + IF v_job_id IS NULL THEN + RETURN NULL; + END IF; + + -- + + UPDATE + app_jobs.scheduled_jobs + SET + locked_by = worker_id, + locked_at = NOW() + WHERE + id = v_job_id + RETURNING + * INTO v_row; + + -- + + RETURN v_row; +END; +$EOFCODE$; + +CREATE FUNCTION app_jobs.get_job(worker_id text, task_identifiers text[] DEFAULT NULL, job_expiry interval DEFAULT '4 hours') RETURNS app_jobs.jobs LANGUAGE plpgsql AS $EOFCODE$ +DECLARE + v_job_id bigint; + v_queue_name text; + v_row app_jobs.jobs; + v_now timestamptz = now(); +BEGIN + IF worker_id IS NULL THEN + RAISE EXCEPTION 'INVALID_WORKER_ID'; + END IF; + + SELECT jobs.queue_name, jobs.id + INTO v_queue_name, v_job_id + FROM app_jobs.jobs + WHERE is_available = true + AND (jobs.locked_at IS NULL + OR jobs.locked_at < (v_now - job_expiry)) + AND (jobs.queue_name IS NULL + OR jobs.queue_name IN ( + SELECT jq.queue_name + FROM app_jobs.job_queues jq + WHERE (jq.locked_at IS NULL + OR jq.locked_at < (v_now - job_expiry)) + FOR UPDATE SKIP LOCKED + )) + AND run_at <= v_now + AND attempts < max_attempts + AND (task_identifiers IS NULL + OR task_identifier = ANY (task_identifiers)) + ORDER BY priority ASC, run_at ASC, id ASC + LIMIT 1 + FOR UPDATE SKIP LOCKED; + + IF v_job_id IS NULL THEN + RETURN NULL; + END IF; + + IF v_queue_name IS NOT NULL THEN + UPDATE app_jobs.job_queues + SET locked_by = worker_id, locked_at = v_now + WHERE job_queues.queue_name = v_queue_name; + END IF; + + UPDATE app_jobs.jobs + SET + attempts = attempts + 1, + locked_by = worker_id, + locked_at = v_now + WHERE id = v_job_id + RETURNING * INTO v_row; + + RETURN v_row; +END; +$EOFCODE$; + +CREATE FUNCTION app_jobs.fail_job(worker_id text, job_id bigint, error_message text) RETURNS app_jobs.jobs LANGUAGE plpgsql STRICT AS $EOFCODE$ +DECLARE + v_row app_jobs.jobs; +BEGIN + UPDATE + app_jobs.jobs + SET + last_error = error_message, + run_at = greatest (now(), run_at) + (exp(least (attempts, 10))::text || ' seconds')::interval, + locked_by = NULL, + locked_at = NULL + WHERE + id = job_id + AND locked_by = worker_id + RETURNING + * INTO v_row; + IF v_row.queue_name IS NOT NULL THEN + UPDATE + app_jobs.job_queues + SET + locked_by = NULL, + locked_at = NULL + WHERE + queue_name = v_row.queue_name + AND locked_by = worker_id; + END IF; + RETURN v_row; +END; +$EOFCODE$; + +CREATE FUNCTION app_jobs.complete_jobs(job_ids bigint[]) RETURNS SETOF app_jobs.jobs LANGUAGE sql AS $EOFCODE$ + DELETE FROM app_jobs.jobs + WHERE id = ANY (job_ids) + AND (locked_by IS NULL + OR locked_at < NOW() - interval '4 hours') + RETURNING + *; +$EOFCODE$; + +CREATE FUNCTION app_jobs.complete_job(worker_id text, job_id bigint) RETURNS app_jobs.jobs LANGUAGE plpgsql AS $EOFCODE$ +DECLARE + v_row app_jobs.jobs; +BEGIN + DELETE FROM app_jobs.jobs + WHERE id = job_id + RETURNING + * INTO v_row; + IF v_row.queue_name IS NOT NULL THEN + UPDATE + app_jobs.job_queues + SET + locked_by = NULL, + locked_at = NULL + WHERE + queue_name = v_row.queue_name + AND locked_by = worker_id; + END IF; + RETURN v_row; +END; +$EOFCODE$; + +CREATE FUNCTION app_jobs.add_scheduled_job(identifier text, payload pg_catalog.json DEFAULT '{}'::json, schedule_info pg_catalog.json DEFAULT '{}'::json, job_key text DEFAULT NULL, queue_name text DEFAULT NULL, max_attempts int DEFAULT 25, priority int DEFAULT 0, entity_id uuid DEFAULT NULL) RETURNS app_jobs.scheduled_jobs AS $EOFCODE$ +DECLARE + v_job app_jobs.scheduled_jobs; + v_database_id uuid; + v_actor_id uuid; +BEGIN + v_database_id := jwt_private.current_database_id(); + v_actor_id := jwt_public.current_user_id(); + + IF job_key IS NOT NULL THEN + + -- Upsert job + INSERT INTO app_jobs.scheduled_jobs ( + database_id, + actor_id, + entity_id, + task_identifier, + payload, + queue_name, + schedule_info, + max_attempts, + key, + priority + ) VALUES ( + v_database_id, + v_actor_id, + add_scheduled_job.entity_id, + identifier, + coalesce(payload, '{}'::json), + queue_name, + schedule_info, + coalesce(max_attempts, 25), + job_key, + coalesce(priority, 0) + ) + ON CONFLICT (key) + DO UPDATE SET + task_identifier = EXCLUDED.task_identifier, + payload = EXCLUDED.payload, + queue_name = EXCLUDED.queue_name, + max_attempts = EXCLUDED.max_attempts, + schedule_info = EXCLUDED.schedule_info, + priority = EXCLUDED.priority + WHERE + scheduled_jobs.locked_at IS NULL + RETURNING + * INTO v_job; + + -- If upsert succeeded (insert or update), return early + + IF NOT (v_job IS NULL) THEN + RETURN v_job; + END IF; + + -- Upsert failed -> there must be an existing scheduled job that is locked. Remove + -- and allow a new one to be inserted + + DELETE FROM + app_jobs.scheduled_jobs + WHERE + KEY = job_key; + END IF; + + INSERT INTO app_jobs.scheduled_jobs ( + database_id, + actor_id, + entity_id, + task_identifier, + payload, + queue_name, + schedule_info, + max_attempts, + priority + ) VALUES ( + v_database_id, + v_actor_id, + add_scheduled_job.entity_id, + identifier, + payload, + queue_name, + schedule_info, + max_attempts, + priority + ) RETURNING * INTO v_job; + RETURN v_job; +END; +$EOFCODE$ LANGUAGE plpgsql VOLATILE SECURITY DEFINER; + +CREATE FUNCTION app_jobs.add_job(identifier text, payload pg_catalog.json DEFAULT '{}'::json, job_key text DEFAULT NULL, queue_name text DEFAULT NULL, run_at timestamptz DEFAULT now(), max_attempts int DEFAULT 25, priority int DEFAULT 0, entity_id uuid DEFAULT NULL, organization_id uuid DEFAULT NULL, entity_type text DEFAULT NULL) RETURNS app_jobs.jobs AS $EOFCODE$ +DECLARE + v_job app_jobs.jobs; + v_database_id uuid; + v_actor_id uuid; +BEGIN + -- Read context from JWT claims + v_database_id := jwt_private.current_database_id(); + v_actor_id := jwt_public.current_user_id(); + + IF job_key IS NOT NULL THEN + -- Upsert job + INSERT INTO app_jobs.jobs ( + database_id, + actor_id, + entity_id, + organization_id, + entity_type, + task_identifier, + payload, + queue_name, + run_at, + max_attempts, + key, + priority + ) VALUES ( + v_database_id, + v_actor_id, + add_job.entity_id, + add_job.organization_id, + add_job.entity_type, + identifier, + coalesce(payload, '{}'::json), + queue_name, + coalesce(run_at, now()), + coalesce(max_attempts, 25), + job_key, + coalesce(priority, 0) + ) + ON CONFLICT (key) + DO UPDATE SET + task_identifier = EXCLUDED.task_identifier, + payload = EXCLUDED.payload, + queue_name = EXCLUDED.queue_name, + max_attempts = EXCLUDED.max_attempts, + run_at = EXCLUDED.run_at, + priority = EXCLUDED.priority, + -- always reset error/retry state + attempts = 0, last_error = NULL + WHERE + jobs.locked_at IS NULL + RETURNING + * INTO v_job; + + -- If upsert succeeded (insert or update), return early + IF NOT (v_job IS NULL) THEN + RETURN v_job; + END IF; + + -- Upsert failed -> there must be an existing job that is locked. Remove + -- existing key to allow a new one to be inserted, and prevent any + -- subsequent retries by bumping attempts to the max allowed. + UPDATE + app_jobs.jobs + SET + key = NULL, + attempts = jobs.max_attempts + WHERE + key = job_key; + END IF; + + INSERT INTO app_jobs.jobs ( + database_id, + actor_id, + entity_id, + organization_id, + entity_type, + task_identifier, + payload, + queue_name, + run_at, + max_attempts, + priority + ) VALUES ( + v_database_id, + v_actor_id, + add_job.entity_id, + add_job.organization_id, + add_job.entity_type, + identifier, + payload, + queue_name, + run_at, + max_attempts, + priority + ) + RETURNING * INTO v_job; + + RETURN v_job; +END; +$EOFCODE$ LANGUAGE plpgsql VOLATILE SECURITY DEFINER; + +GRANT EXECUTE ON FUNCTION app_jobs.add_job(text, pg_catalog.json, text, text, timestamptz, int, int, uuid, uuid, text) TO authenticated; + +CREATE FUNCTION app_jobs.remove_job(job_key text) RETURNS app_jobs.jobs LANGUAGE plpgsql STRICT AS $EOFCODE$ +DECLARE + v_job app_jobs.jobs; +BEGIN + DELETE FROM app_jobs.jobs + WHERE key = job_key + AND (locked_at IS NULL + OR locked_at < NOW() - interval '4 hours') + RETURNING * INTO v_job; + + IF NOT (v_job IS NULL) THEN + RETURN v_job; + END IF; + + UPDATE app_jobs.jobs + SET + key = NULL, + attempts = jobs.max_attempts + WHERE key = job_key + RETURNING * INTO v_job; + + RETURN v_job; +END; +$EOFCODE$; + +CREATE FUNCTION app_jobs.force_unlock_workers(worker_ids text[]) RETURNS void LANGUAGE sql VOLATILE AS $EOFCODE$ + UPDATE app_jobs.jobs + SET locked_at = NULL, locked_by = NULL + WHERE locked_by = ANY (worker_ids); + + UPDATE app_jobs.job_queues + SET locked_at = NULL, locked_by = NULL + WHERE locked_by = ANY (worker_ids); +$EOFCODE$; \ No newline at end of file diff --git a/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/helpers/json_build_object_apply.sql b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/helpers/json_build_object_apply.sql new file mode 100644 index 00000000..e05072cf --- /dev/null +++ b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/helpers/json_build_object_apply.sql @@ -0,0 +1,7 @@ +-- Verify schemas/app_jobs/helpers/json_build_object_apply on pg + +BEGIN; + +SELECT verify_function ('app_jobs.json_build_object_apply'); + +ROLLBACK; diff --git a/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/procedures/add_job.sql b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/procedures/add_job.sql new file mode 100644 index 00000000..c841e7d0 --- /dev/null +++ b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/procedures/add_job.sql @@ -0,0 +1,7 @@ +-- Verify schemas/app_jobs/procedures/add_job on pg + +BEGIN; + +SELECT verify_function ('app_jobs.add_job'); + +ROLLBACK; diff --git a/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/procedures/add_scheduled_job.sql b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/procedures/add_scheduled_job.sql new file mode 100644 index 00000000..a2f7d481 --- /dev/null +++ b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/procedures/add_scheduled_job.sql @@ -0,0 +1,7 @@ +-- Verify schemas/app_jobs/procedures/add_scheduled_job on pg + +BEGIN; + +SELECT verify_function ('app_jobs.add_scheduled_job'); + +ROLLBACK; diff --git a/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/procedures/complete_job.sql b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/procedures/complete_job.sql new file mode 100644 index 00000000..4bd179ae --- /dev/null +++ b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/procedures/complete_job.sql @@ -0,0 +1,7 @@ +-- Verify schemas/app_jobs/procedures/complete_job on pg + +BEGIN; + +SELECT verify_function ('app_jobs.complete_job'); + +ROLLBACK; diff --git a/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/procedures/complete_jobs.sql b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/procedures/complete_jobs.sql new file mode 100644 index 00000000..aa9a5a45 --- /dev/null +++ b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/procedures/complete_jobs.sql @@ -0,0 +1,7 @@ +-- Verify schemas/app_jobs/procedures/complete_jobs on pg + +BEGIN; + +SELECT verify_function ('app_jobs.complete_jobs'); + +ROLLBACK; diff --git a/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/procedures/do_notify.sql b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/procedures/do_notify.sql new file mode 100644 index 00000000..df64a9f4 --- /dev/null +++ b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/procedures/do_notify.sql @@ -0,0 +1,7 @@ +-- Verify schemas/app_jobs/procedures/do_notify on pg + +BEGIN; + +SELECT verify_function ('app_jobs.do_notify'); + +ROLLBACK; diff --git a/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/procedures/fail_job.sql b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/procedures/fail_job.sql new file mode 100644 index 00000000..b9c65b48 --- /dev/null +++ b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/procedures/fail_job.sql @@ -0,0 +1,7 @@ +-- Verify schemas/app_jobs/procedures/fail_job on pg + +BEGIN; + +SELECT verify_function ('app_jobs.fail_job'); + +ROLLBACK; diff --git a/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/procedures/force_unlock_workers.sql b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/procedures/force_unlock_workers.sql new file mode 100644 index 00000000..a71b0bbd --- /dev/null +++ b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/procedures/force_unlock_workers.sql @@ -0,0 +1,7 @@ +-- Verify schemas/app_jobs/procedures/force_unlock_workers on pg + +BEGIN; + +SELECT verify_function ('app_jobs.force_unlock_workers'); + +ROLLBACK; diff --git a/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/procedures/get_job.sql b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/procedures/get_job.sql new file mode 100644 index 00000000..86170be1 --- /dev/null +++ b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/procedures/get_job.sql @@ -0,0 +1,7 @@ +-- Verify schemas/app_jobs/procedures/get_job on pg + +BEGIN; + +SELECT verify_function ('app_jobs.get_job'); + +ROLLBACK; diff --git a/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/procedures/get_scheduled_job.sql b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/procedures/get_scheduled_job.sql new file mode 100644 index 00000000..bb7e58d7 --- /dev/null +++ b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/procedures/get_scheduled_job.sql @@ -0,0 +1,7 @@ +-- Verify schemas/app_jobs/procedures/get_scheduled_job on pg + +BEGIN; + +SELECT verify_function ('app_jobs.get_scheduled_job'); + +ROLLBACK; diff --git a/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/procedures/grants/grant_execute_add_job_to_authenticated.sql b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/procedures/grants/grant_execute_add_job_to_authenticated.sql new file mode 100644 index 00000000..75a33c48 --- /dev/null +++ b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/procedures/grants/grant_execute_add_job_to_authenticated.sql @@ -0,0 +1,7 @@ +-- Verify schemas/app_jobs/procedures/grants/grant_execute_add_job_to_authenticated on pg + +BEGIN; + +SELECT has_function_privilege('authenticated', 'app_jobs.add_job(text, json, text, text, timestamptz, integer, integer, uuid, uuid, text)', 'EXECUTE'); + +ROLLBACK; diff --git a/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/procedures/permanently_fail_jobs.sql b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/procedures/permanently_fail_jobs.sql new file mode 100644 index 00000000..dfd8852f --- /dev/null +++ b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/procedures/permanently_fail_jobs.sql @@ -0,0 +1,7 @@ +-- Verify schemas/app_jobs/procedures/permanently_fail_jobs on pg + +BEGIN; + +SELECT verify_function ('app_jobs.permanently_fail_jobs'); + +ROLLBACK; diff --git a/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/procedures/release_jobs.sql b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/procedures/release_jobs.sql new file mode 100644 index 00000000..70004e7e --- /dev/null +++ b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/procedures/release_jobs.sql @@ -0,0 +1,7 @@ +-- Verify schemas/app_jobs/procedures/release_jobs on pg + +BEGIN; + +SELECT verify_function ('app_jobs.release_jobs'); + +ROLLBACK; diff --git a/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/procedures/release_scheduled_jobs.sql b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/procedures/release_scheduled_jobs.sql new file mode 100644 index 00000000..5b9b5929 --- /dev/null +++ b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/procedures/release_scheduled_jobs.sql @@ -0,0 +1,7 @@ +-- Verify schemas/app_jobs/procedures/release_scheduled_jobs on pg + +BEGIN; + +SELECT verify_function ('app_jobs.release_scheduled_jobs'); + +ROLLBACK; diff --git a/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/procedures/remove_job.sql b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/procedures/remove_job.sql new file mode 100644 index 00000000..b855f409 --- /dev/null +++ b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/procedures/remove_job.sql @@ -0,0 +1,7 @@ +-- Verify schemas/app_jobs/procedures/remove_job on pg + +BEGIN; + +SELECT verify_function ('app_jobs.remove_job'); + +ROLLBACK; diff --git a/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/procedures/reschedule_jobs.sql b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/procedures/reschedule_jobs.sql new file mode 100644 index 00000000..80ab587b --- /dev/null +++ b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/procedures/reschedule_jobs.sql @@ -0,0 +1,7 @@ +-- Verify schemas/app_jobs/procedures/reschedule_jobs on pg + +BEGIN; + +SELECT verify_function ('app_jobs.reschedule_jobs'); + +ROLLBACK; diff --git a/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/procedures/run_scheduled_job.sql b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/procedures/run_scheduled_job.sql new file mode 100644 index 00000000..02257023 --- /dev/null +++ b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/procedures/run_scheduled_job.sql @@ -0,0 +1,7 @@ +-- Verify schemas/app_jobs/procedures/run_scheduled_job on pg + +BEGIN; + +SELECT verify_function ('app_jobs.run_scheduled_job'); + +ROLLBACK; diff --git a/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/schema.sql b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/schema.sql new file mode 100644 index 00000000..5e0b19d4 --- /dev/null +++ b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/schema.sql @@ -0,0 +1,7 @@ +-- Verify schemas/app_jobs/schema on pg + +BEGIN; + +SELECT verify_schema ('app_jobs'); + +ROLLBACK; diff --git a/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/tables/job_queues/grants/grant_select_insert_update_delete_to_administrator.sql b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/tables/job_queues/grants/grant_select_insert_update_delete_to_administrator.sql new file mode 100644 index 00000000..d645d855 --- /dev/null +++ b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/tables/job_queues/grants/grant_select_insert_update_delete_to_administrator.sql @@ -0,0 +1,10 @@ +-- Verify schemas/app_jobs/tables/job_queues/grants/grant_select_insert_update_delete_to_administrator on pg + +BEGIN; + + SELECT has_table_privilege('administrator', 'app_jobs.job_queues', 'SELECT'); + SELECT has_table_privilege('administrator', 'app_jobs.job_queues', 'INSERT'); + SELECT has_table_privilege('administrator', 'app_jobs.job_queues', 'UPDATE'); + SELECT has_table_privilege('administrator', 'app_jobs.job_queues', 'DELETE'); + +ROLLBACK; diff --git a/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/tables/job_queues/indexes/job_queues_locked_by_idx.sql b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/tables/job_queues/indexes/job_queues_locked_by_idx.sql new file mode 100644 index 00000000..bb378660 --- /dev/null +++ b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/tables/job_queues/indexes/job_queues_locked_by_idx.sql @@ -0,0 +1,7 @@ +-- Verify schemas/app_jobs/tables/job_queues/indexes/job_queues_locked_by_idx on pg + +BEGIN; + +SELECT verify_index ('app_jobs.job_queues', 'job_queues_locked_by_idx'); + +ROLLBACK; diff --git a/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/tables/job_queues/table.sql b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/tables/job_queues/table.sql new file mode 100644 index 00000000..3a5e4b1c --- /dev/null +++ b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/tables/job_queues/table.sql @@ -0,0 +1,7 @@ +-- Verify schemas/app_jobs/tables/job_queues/table on pg + +BEGIN; + +SELECT verify_table ('app_jobs.job_queues'); + +ROLLBACK; diff --git a/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/tables/jobs/grants/grant_select_insert_update_delete_to_administrator.sql b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/tables/jobs/grants/grant_select_insert_update_delete_to_administrator.sql new file mode 100644 index 00000000..6255d716 --- /dev/null +++ b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/tables/jobs/grants/grant_select_insert_update_delete_to_administrator.sql @@ -0,0 +1,10 @@ +-- Verify schemas/app_jobs/tables/jobs/grants/grant_select_insert_update_delete_to_administrator on pg + +BEGIN; + + SELECT has_table_privilege('administrator', 'app_jobs.jobs', 'SELECT'); + SELECT has_table_privilege('administrator', 'app_jobs.jobs', 'INSERT'); + SELECT has_table_privilege('administrator', 'app_jobs.jobs', 'UPDATE'); + SELECT has_table_privilege('administrator', 'app_jobs.jobs', 'DELETE'); + +ROLLBACK; diff --git a/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/tables/jobs/indexes/jobs_locked_by_idx.sql b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/tables/jobs/indexes/jobs_locked_by_idx.sql new file mode 100644 index 00000000..3635677a --- /dev/null +++ b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/tables/jobs/indexes/jobs_locked_by_idx.sql @@ -0,0 +1,7 @@ +-- Verify schemas/app_jobs/tables/jobs/indexes/jobs_locked_by_idx on pg + +BEGIN; + +SELECT verify_index ('app_jobs.jobs', 'jobs_locked_by_idx'); + +ROLLBACK; diff --git a/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/tables/jobs/indexes/priority_run_at_id_idx.sql b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/tables/jobs/indexes/priority_run_at_id_idx.sql new file mode 100644 index 00000000..eeec4f53 --- /dev/null +++ b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/tables/jobs/indexes/priority_run_at_id_idx.sql @@ -0,0 +1,8 @@ +-- Verify schemas/app_jobs/tables/jobs/indexes/priority_run_at_id_idx on pg + +BEGIN; + +SELECT verify_index ('app_jobs.jobs', 'jobs_main_index'); +SELECT verify_index ('app_jobs.jobs', 'jobs_no_queue_index'); + +ROLLBACK; diff --git a/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/tables/jobs/table.sql b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/tables/jobs/table.sql new file mode 100644 index 00000000..aaa0584d --- /dev/null +++ b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/tables/jobs/table.sql @@ -0,0 +1,7 @@ +-- Verify schemas/app_jobs/tables/jobs/table on pg + +BEGIN; + +SELECT verify_table ('app_jobs.jobs'); + +ROLLBACK; diff --git a/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/tables/jobs/triggers/decrease_job_queue_count.sql b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/tables/jobs/triggers/decrease_job_queue_count.sql new file mode 100644 index 00000000..97b717d0 --- /dev/null +++ b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/tables/jobs/triggers/decrease_job_queue_count.sql @@ -0,0 +1,10 @@ +-- Verify schemas/app_jobs/tables/jobs/triggers/decrease_job_queue_count on pg +BEGIN; +SELECT + verify_function ('app_jobs.tg_decrease_job_queue_count'); +SELECT + verify_trigger ('app_jobs.decrease_job_queue_count_on_delete'); +SELECT + verify_trigger ('app_jobs.decrease_job_queue_count_on_update'); +ROLLBACK; + diff --git a/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/tables/jobs/triggers/increase_job_queue_count.sql b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/tables/jobs/triggers/increase_job_queue_count.sql new file mode 100644 index 00000000..a6e89dd1 --- /dev/null +++ b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/tables/jobs/triggers/increase_job_queue_count.sql @@ -0,0 +1,10 @@ +-- Verify schemas/app_jobs/tables/jobs/triggers/increase_job_queue_count on pg +BEGIN; +SELECT + verify_function ('app_jobs.tg_increase_job_queue_count'); +SELECT + verify_trigger ('app_jobs._500_increase_job_queue_count_on_insert'); +SELECT + verify_trigger ('app_jobs._500_increase_job_queue_count_on_update'); +ROLLBACK; + diff --git a/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/tables/jobs/triggers/notify_worker.sql b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/tables/jobs/triggers/notify_worker.sql new file mode 100644 index 00000000..96a054a0 --- /dev/null +++ b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/tables/jobs/triggers/notify_worker.sql @@ -0,0 +1,5 @@ +-- Verify schemas/app_jobs/tables/jobs/triggers/notify_worker on pg +BEGIN; +SELECT + verify_trigger ('app_jobs._900_after_insert'); +ROLLBACK; diff --git a/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/tables/jobs/triggers/timestamps.sql b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/tables/jobs/triggers/timestamps.sql new file mode 100644 index 00000000..ed9466a3 --- /dev/null +++ b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/tables/jobs/triggers/timestamps.sql @@ -0,0 +1,16 @@ +-- Verify schemas/app_jobs/tables/jobs/triggers/timestamps on pg +BEGIN; +SELECT + created_at +FROM + app_jobs.jobs +LIMIT 1; +SELECT + updated_at +FROM + app_jobs.jobs +LIMIT 1; +SELECT + verify_trigger ('app_jobs._100_update_jobs_modtime_tg'); +ROLLBACK; + diff --git a/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/tables/scheduled_jobs/grants/grant_select_insert_update_delete_to_administrator.sql b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/tables/scheduled_jobs/grants/grant_select_insert_update_delete_to_administrator.sql new file mode 100644 index 00000000..c4aa4eb6 --- /dev/null +++ b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/tables/scheduled_jobs/grants/grant_select_insert_update_delete_to_administrator.sql @@ -0,0 +1,10 @@ +-- Verify schemas/app_jobs/tables/scheduled_jobs/grants/grant_select_insert_update_delete_to_administrator on pg + +BEGIN; + + SELECT has_table_privilege('administrator', 'app_jobs.scheduled_jobs', 'SELECT'); + SELECT has_table_privilege('administrator', 'app_jobs.scheduled_jobs', 'INSERT'); + SELECT has_table_privilege('administrator', 'app_jobs.scheduled_jobs', 'UPDATE'); + SELECT has_table_privilege('administrator', 'app_jobs.scheduled_jobs', 'DELETE'); + +ROLLBACK; diff --git a/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/tables/scheduled_jobs/indexes/scheduled_jobs_locked_by_idx.sql b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/tables/scheduled_jobs/indexes/scheduled_jobs_locked_by_idx.sql new file mode 100644 index 00000000..34ee9f11 --- /dev/null +++ b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/tables/scheduled_jobs/indexes/scheduled_jobs_locked_by_idx.sql @@ -0,0 +1,7 @@ +-- Verify schemas/app_jobs/tables/scheduled_jobs/indexes/scheduled_jobs_locked_by_idx on pg + +BEGIN; + +SELECT verify_index ('app_jobs.scheduled_jobs', 'scheduled_jobs_locked_by_idx'); + +ROLLBACK; diff --git a/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/tables/scheduled_jobs/indexes/scheduled_jobs_priority_id_idx.sql b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/tables/scheduled_jobs/indexes/scheduled_jobs_priority_id_idx.sql new file mode 100644 index 00000000..d26a6822 --- /dev/null +++ b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/tables/scheduled_jobs/indexes/scheduled_jobs_priority_id_idx.sql @@ -0,0 +1,7 @@ +-- Verify schemas/app_jobs/tables/scheduled_jobs/indexes/scheduled_jobs_priority_id_idx on pg + +BEGIN; + +SELECT verify_index ('app_jobs.scheduled_jobs', 'scheduled_jobs_priority_id_idx'); + +ROLLBACK; diff --git a/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/tables/scheduled_jobs/table.sql b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/tables/scheduled_jobs/table.sql new file mode 100644 index 00000000..065f427b --- /dev/null +++ b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/tables/scheduled_jobs/table.sql @@ -0,0 +1,7 @@ +-- Verify schemas/app_jobs/tables/scheduled_jobs/table on pg + +BEGIN; + +SELECT verify_table ('app_jobs.scheduled_jobs'); + +ROLLBACK; diff --git a/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/tables/scheduled_jobs/triggers/notify_scheduled_job.sql b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/tables/scheduled_jobs/triggers/notify_scheduled_job.sql new file mode 100644 index 00000000..599c63a3 --- /dev/null +++ b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/tables/scheduled_jobs/triggers/notify_scheduled_job.sql @@ -0,0 +1,8 @@ +-- Verify schemas/app_jobs/tables/scheduled_jobs/triggers/notify_scheduled_job on pg + +BEGIN; + + +SELECT verify_trigger ('app_jobs._900_notify_scheduled_job'); + +ROLLBACK; diff --git a/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/triggers/tg_add_job_with_fields.sql b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/triggers/tg_add_job_with_fields.sql new file mode 100644 index 00000000..9b36e4f2 --- /dev/null +++ b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/triggers/tg_add_job_with_fields.sql @@ -0,0 +1,7 @@ +-- Verify schemas/app_jobs/triggers/tg_add_job_with_fields on pg + +BEGIN; + +SELECT verify_function ('app_jobs.trigger_job_with_fields'); + +ROLLBACK; diff --git a/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/triggers/tg_add_job_with_row.sql b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/triggers/tg_add_job_with_row.sql new file mode 100644 index 00000000..bdf8cc7e --- /dev/null +++ b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/triggers/tg_add_job_with_row.sql @@ -0,0 +1,7 @@ +-- Verify schemas/app_jobs/triggers/tg_add_job_with_row on pg + +BEGIN; + +SELECT verify_function ('app_jobs.tg_add_job_with_row'); + +ROLLBACK; diff --git a/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/triggers/tg_add_job_with_row_id.sql b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/triggers/tg_add_job_with_row_id.sql new file mode 100644 index 00000000..72b5a7b9 --- /dev/null +++ b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/triggers/tg_add_job_with_row_id.sql @@ -0,0 +1,6 @@ +-- Verify schemas/app_jobs/triggers/tg_add_job_with_row_id on pg +BEGIN; +SELECT + verify_function ('app_jobs.tg_add_job_with_row_id'); +ROLLBACK; + diff --git a/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/triggers/tg_update_timestamps.sql b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/triggers/tg_update_timestamps.sql new file mode 100644 index 00000000..fd53ed3e --- /dev/null +++ b/extensions/@pgpm/database-jobs/verify/schemas/app_jobs/triggers/tg_update_timestamps.sql @@ -0,0 +1,7 @@ +-- Verify schemas/app_jobs/triggers/tg_update_timestamps on pg + +BEGIN; + +SELECT verify_function ('app_jobs.tg_update_timestamps'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-modules/LICENSE b/extensions/@pgpm/metaschema-modules/LICENSE new file mode 100644 index 00000000..7b18c918 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2025 Dan Lynch +Copyright (c) 2025 Constructive + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/extensions/@pgpm/metaschema-modules/Makefile b/extensions/@pgpm/metaschema-modules/Makefile new file mode 100644 index 00000000..f8bc992d --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/Makefile @@ -0,0 +1,6 @@ +EXTENSION = metaschema-modules +DATA = sql/metaschema-modules--0.26.3.sql + +PG_CONFIG = pg_config +PGXS := $(shell $(PG_CONFIG) --pgxs) +include $(PGXS) diff --git a/extensions/@pgpm/metaschema-modules/README.md b/extensions/@pgpm/metaschema-modules/README.md new file mode 100644 index 00000000..535f67c8 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/README.md @@ -0,0 +1,238 @@ +# @pgpm/db-meta-modules + +

+ +

+ +

+ + + + + +

+ +Module metadata handling and dependency tracking. + +## Overview + +`@pgpm/db-meta-modules` extends the `@pgpm/db-meta-schema` package with module-specific metadata tables. This package provides tables for tracking various pgpm modules including authentication, permissions, memberships, encrypted secrets, and more. It enables configuration and metadata storage for modular application features. + +## Features + +- **Module Metadata Tables**: Store configuration for various application modules +- **Authentication Modules**: Track user authentication, connected accounts, and crypto auth +- **Permission System**: Store permissions and membership configurations +- **Security Modules**: Track encrypted secrets and tokens +- **User Management**: Store user and membership module configurations +- **Field Modules**: Track custom field configurations +- **API Configuration**: Store API and RLS module settings + +## Installation + +If you have `pgpm` installed: + +```bash +pgpm install @pgpm/db-meta-modules +pgpm deploy +``` + +This is a quick way to get started. The sections below provide more detailed installation options. + +### Prerequisites + +```bash +# Install pgpm CLI +npm install -g pgpm + +# Start local Postgres (via Docker) and export env vars +pgpm docker start +eval "$(pgpm env)" +``` + +> **Tip:** Already running Postgres? Skip the Docker step and just export your `PG*` environment variables. + +### **Add to an Existing Package** + +```bash +# 1. Install the package +pgpm install @pgpm/db-meta-modules + +# 2. Deploy locally +pgpm deploy +``` + +### **Add to a New Project** + +```bash +# 1. Create a workspace +pgpm init workspace + +# 2. Create your first module +cd my-workspace +pgpm init + +# 3. Install a package +cd packages/my-module +pgpm install @pgpm/db-meta-modules + +# 4. Deploy everything +pgpm deploy --createdb --database mydb1 +``` + +## Module Tables + +The package provides metadata tables for the following modules: + +### Authentication & Users +- **users_module**: User management configuration +- **user_auth_module**: User authentication settings +- **connected_accounts_module**: Connected account configurations +- **crypto_auth_module**: Cryptocurrency authentication settings +- **crypto_addresses_module**: Crypto address management + +### Permissions & Memberships +- **permissions_module**: Permission system configuration +- **memberships_module**: Membership management settings +- **membership_types_module**: Membership type definitions +- **events_module**: User level configurations + +### Security +- **encrypted_secrets_module**: Encrypted secrets configuration +- **secrets_module**: Secret management settings +- **tokens_module**: Token management configuration + +### Communication +- **emails_module**: Email module configuration +- **phone_numbers_module**: Phone number management settings +- **invites_module**: Invitation system configuration + +### Other Modules +- **default_ids_module**: Default ID generation settings +- **limits_module**: Rate limiting and quota configurations +- **rls_module**: Row-level security configurations +- **denormalized_table_field**: Denormalized field tracking + +### Application Structure +- **apis**: API configurations +- **sites**: Site definitions + +## Usage + +### Storing Module Configuration + +```sql +-- Configure users module +INSERT INTO metaschema_modules_public.users_module ( + database_id, + api_id, + enabled, + settings +) VALUES ( + 'database-uuid', + 'api-uuid', + true, + '{"require_email_verification": true}'::jsonb +); + +-- Configure permissions module +INSERT INTO metaschema_modules_public.permissions_module ( + database_id, + api_id, + enabled, + settings +) VALUES ( + 'database-uuid', + 'api-uuid', + true, + '{"default_role": "user"}'::jsonb +); + +-- Configure encrypted secrets module +INSERT INTO metaschema_modules_public.encrypted_secrets_module ( + database_id, + api_id, + enabled, + encryption_key_id +) VALUES ( + 'database-uuid', + 'api-uuid', + true, + 'key-uuid' +); +``` + +### Querying Module Configuration + +```sql +-- Get all enabled modules for a database +SELECT + 'users' as module_name, enabled +FROM metaschema_modules_public.users_module +WHERE database_id = 'database-uuid' +UNION ALL +SELECT + 'permissions' as module_name, enabled +FROM metaschema_modules_public.permissions_module +WHERE database_id = 'database-uuid' +UNION ALL +SELECT + 'encrypted_secrets' as module_name, enabled +FROM metaschema_modules_public.encrypted_secrets_module +WHERE database_id = 'database-uuid'; + +-- Get RLS module configuration +SELECT * FROM metaschema_modules_public.rls_module +WHERE api_id = 'api-uuid'; +``` + +## Use Cases + +### Modular Application Configuration + +Store and manage configuration for optional application features: +- Enable/disable modules per database or API +- Store module-specific settings +- Track module dependencies +- Configure module behavior + +### Multi-Tenant Applications + +Manage module configurations per tenant: +- Different modules enabled per tenant +- Tenant-specific module settings +- Isolated module configurations + +### Dynamic Feature Flags + +Use module tables as feature flags: +- Enable/disable features at runtime +- A/B testing configurations +- Gradual feature rollouts + +## Dependencies + +- `@pgpm/db-meta-schema`: Core metadata management +- `@pgpm/verify`: Verification utilities + +## Testing + +```bash +pnpm test +``` + +## Related Tooling + +* [pgpm](https://github.com/constructive-io/constructive/tree/main/packages/pgpm): **🖥️ PostgreSQL Package Manager** for modular Postgres development. Works with database workspaces, scaffolding, migrations, seeding, and installing database packages. +* [pgsql-test](https://github.com/constructive-io/constructive/tree/main/packages/pgsql-test): **📊 Isolated testing environments** with per-test transaction rollbacks—ideal for integration tests, complex migrations, and RLS simulation. +* [supabase-test](https://github.com/constructive-io/constructive/tree/main/packages/supabase-test): **🧪 Supabase-native test harness** preconfigured for the local Supabase stack—per-test rollbacks, JWT/role context helpers, and CI/GitHub Actions ready. +* [graphile-test](https://github.com/constructive-io/constructive/tree/main/packages/graphile-test): **🔐 Authentication mocking** for Graphile-focused test helpers and emulating row-level security contexts. +* [pgsql-parser](https://github.com/constructive-io/pgsql-parser): **🔄 SQL conversion engine** that interprets and converts PostgreSQL syntax. +* [libpg-query-node](https://github.com/constructive-io/libpg-query-node): **🌉 Node.js bindings** for `libpg_query`, converting SQL into parse trees. +* [pg-proto-parser](https://github.com/constructive-io/pg-proto-parser): **📦 Protobuf parser** for parsing PostgreSQL Protocol Buffers definitions to generate TypeScript interfaces, utility functions, and JSON mappings for enums. + +## Disclaimer + +AS DESCRIBED IN THE LICENSES, THE SOFTWARE IS PROVIDED "AS IS", AT YOUR OWN RISK, AND WITHOUT WARRANTIES OF ANY KIND. + +No developer or entity involved in creating this software will be liable for any claims or damages whatsoever associated with your use, inability to use, or your interaction with other users of the code, including any direct, indirect, incidental, special, exemplary, punitive or consequential damages, or loss of profits, cryptocurrencies, tokens, or anything else of value. diff --git a/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/schema.sql b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/schema.sql new file mode 100644 index 00000000..a80c249e --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/schema.sql @@ -0,0 +1,16 @@ +-- Deploy schemas/metaschema_modules_public/schema to pg + +BEGIN; + +CREATE SCHEMA metaschema_modules_public; + +GRANT USAGE ON SCHEMA metaschema_modules_public TO authenticated; +GRANT USAGE ON SCHEMA metaschema_modules_public TO administrator; +ALTER DEFAULT PRIVILEGES IN SCHEMA metaschema_modules_public GRANT ALL ON TABLES TO authenticated; +ALTER DEFAULT PRIVILEGES IN SCHEMA metaschema_modules_public GRANT ALL ON SEQUENCES TO authenticated; +ALTER DEFAULT PRIVILEGES IN SCHEMA metaschema_modules_public GRANT ALL ON FUNCTIONS TO authenticated; +ALTER DEFAULT PRIVILEGES IN SCHEMA metaschema_modules_public GRANT ALL ON TABLES TO administrator; +ALTER DEFAULT PRIVILEGES IN SCHEMA metaschema_modules_public GRANT ALL ON SEQUENCES TO administrator; +ALTER DEFAULT PRIVILEGES IN SCHEMA metaschema_modules_public GRANT ALL ON FUNCTIONS TO administrator; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/agent_module/table.sql b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/agent_module/table.sql new file mode 100644 index 00000000..777deca2 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/agent_module/table.sql @@ -0,0 +1,94 @@ +-- Deploy schemas/metaschema_modules_public/tables/agent_module/table to pg + +-- requires: schemas/metaschema_modules_public/schema + +BEGIN; + +CREATE TABLE metaschema_modules_public.agent_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + + -- Schema references (if uuid_nil, resolved from schema name or default) + schema_id uuid NOT NULL DEFAULT uuid_nil(), + private_schema_id uuid NOT NULL DEFAULT uuid_nil(), + + -- Generated table IDs (populated by the generator) + thread_table_id uuid NOT NULL DEFAULT uuid_nil(), + message_table_id uuid NOT NULL DEFAULT uuid_nil(), + task_table_id uuid NOT NULL DEFAULT uuid_nil(), + prompts_table_id uuid NOT NULL DEFAULT uuid_nil(), + plan_table_id uuid DEFAULT NULL, + agent_table_id uuid DEFAULT NULL, + persona_table_id uuid DEFAULT NULL, + resource_table_id uuid DEFAULT NULL, + + -- Table names (input to the generator) + thread_table_name text NOT NULL DEFAULT 'agent_thread', + message_table_name text NOT NULL DEFAULT 'agent_message', + task_table_name text NOT NULL DEFAULT 'agent_task', + prompts_table_name text NOT NULL DEFAULT 'agent_prompt', + plan_table_name text NOT NULL DEFAULT 'agent_plan', + agent_table_name text NOT NULL DEFAULT 'agent', + persona_table_name text NOT NULL DEFAULT 'agent_persona', + resource_table_name text NOT NULL DEFAULT 'agent_resource', + + -- Feature flags + has_plans boolean NOT NULL DEFAULT false, + has_resources boolean NOT NULL DEFAULT false, + has_agents boolean NOT NULL DEFAULT false, + shared boolean NOT NULL DEFAULT false, + + -- API routing (configurable per-module) + api_name text DEFAULT 'agent', + private_api_name text DEFAULT NULL, + + -- Scope: determines the security level for this module instance. + -- Resolved to a membership_type integer at trigger time via membership_types table. + scope text NOT NULL DEFAULT 'app', + + -- Table name prefix. Auto-derived from scope by the trigger when empty. + -- Override to create multiple module instances at the same scope. + prefix text NOT NULL DEFAULT '', + + -- Entity table for RLS (NULL for app-level, entity table for entity-scoped) + entity_table_id uuid NULL, + + -- Configurable security policies (NULL = use defaults based on scope) + policies jsonb NULL, + + -- Resource configuration array (dimensions, chunk_size, chunk_strategy, etc.) + -- NULL = use sensible defaults (768d, 1000 chunk_size, paragraph strategy) + -- Example: [{"dimensions": 1536, "chunk_size": 500, "chunk_strategy": "sentence"}] + resources jsonb NULL, + + -- Per-table provisions overrides from blueprint config. + -- Keys are table keys (thread, message, task, prompt, knowledge). + -- When a key is present, the module trigger skips default security for that table; + -- secure_table_provision applies the custom grants/policies instead. + provisions jsonb NULL, + + -- Default permissions: permission names auto-granted to new members. + -- NULL uses the module's built-in defaults; explicit array overrides them. + default_permissions text[] DEFAULT NULL, + + -- Constraints + CONSTRAINT agent_module_db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT agent_module_schema_fkey FOREIGN KEY (schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + CONSTRAINT agent_module_private_schema_fkey FOREIGN KEY (private_schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + CONSTRAINT agent_module_thread_table_fkey FOREIGN KEY (thread_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT agent_module_message_table_fkey FOREIGN KEY (message_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT agent_module_task_table_fkey FOREIGN KEY (task_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT agent_module_prompts_table_fkey FOREIGN KEY (prompts_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT agent_module_plan_table_fkey FOREIGN KEY (plan_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT agent_module_agent_table_fkey FOREIGN KEY (agent_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT agent_module_persona_table_fkey FOREIGN KEY (persona_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT agent_module_resource_table_fkey FOREIGN KEY (resource_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT agent_module_entity_table_fkey FOREIGN KEY (entity_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE +); + +CREATE INDEX agent_module_database_id_idx ON metaschema_modules_public.agent_module ( database_id ); + +-- Unique constraint: one agent module per database per scope per prefix. +CREATE UNIQUE INDEX agent_module_unique_scope ON metaschema_modules_public.agent_module ( database_id, scope, prefix ); + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/billing_module/table.sql b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/billing_module/table.sql new file mode 100644 index 00000000..4d2aa0b5 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/billing_module/table.sql @@ -0,0 +1,70 @@ +-- Deploy schemas/metaschema_modules_public/tables/billing_module/table to pg + +-- requires: schemas/metaschema_modules_public/schema + +BEGIN; + +CREATE TABLE metaschema_modules_public.billing_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + + schema_id uuid NOT NULL DEFAULT uuid_nil(), + private_schema_id uuid NOT NULL DEFAULT uuid_nil(), + + -- Meters table: defines what you track (quota, boolean, credit_pool) + meters_table_id uuid NOT NULL DEFAULT uuid_nil(), + meters_table_name text NOT NULL DEFAULT '', + + -- Plan subscriptions table: assigns plans to entities with lifecycle + plan_subscriptions_table_id uuid NOT NULL DEFAULT uuid_nil(), + plan_subscriptions_table_name text NOT NULL DEFAULT '', + + -- Ledger table: append-only event log + ledger_table_id uuid NOT NULL DEFAULT uuid_nil(), + ledger_table_name text NOT NULL DEFAULT '', + + -- Balances SPRT: denormalized current state (RLS-exempt fast lookups) + balances_table_id uuid NOT NULL DEFAULT uuid_nil(), + balances_table_name text NOT NULL DEFAULT '', + + -- Meter credits table: append-only credit grants for billing meters + meter_credits_table_id uuid NOT NULL DEFAULT uuid_nil(), + meter_credits_table_name text NOT NULL DEFAULT '', + + -- Meter sources table: maps billing meters to typed daily summary table columns + meter_sources_table_id uuid NOT NULL DEFAULT uuid_nil(), + meter_sources_table_name text NOT NULL DEFAULT '', + + -- Meter defaults table: app-scope default meter catalog seeded at provision time + meter_defaults_table_id uuid NOT NULL DEFAULT uuid_nil(), + meter_defaults_table_name text NOT NULL DEFAULT '', + + -- Generated functions + record_usage_function text NOT NULL DEFAULT '', + + prefix text NULL, + + -- Default permissions: permission names auto-granted to new members. + -- NULL uses the module's built-in defaults; explicit array overrides them. + default_permissions text[] DEFAULT NULL, + + -- API routing (configurable per-module) + api_name text DEFAULT 'usage', + private_api_name text DEFAULT NULL, + + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT schema_fkey FOREIGN KEY (schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + CONSTRAINT private_schema_fkey FOREIGN KEY (private_schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + CONSTRAINT meters_table_fkey FOREIGN KEY (meters_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT plan_subscriptions_table_fkey FOREIGN KEY (plan_subscriptions_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT ledger_table_fkey FOREIGN KEY (ledger_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT balances_table_fkey FOREIGN KEY (balances_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT meter_credits_table_fkey FOREIGN KEY (meter_credits_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT meter_sources_table_fkey FOREIGN KEY (meter_sources_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT meter_defaults_table_fkey FOREIGN KEY (meter_defaults_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT billing_module_database_id_unique UNIQUE (database_id) +); + +CREATE INDEX billing_module_database_id_idx ON metaschema_modules_public.billing_module ( database_id ); + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/billing_provider_module/table.sql b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/billing_provider_module/table.sql new file mode 100644 index 00000000..22adc393 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/billing_provider_module/table.sql @@ -0,0 +1,65 @@ +-- Deploy schemas/metaschema_modules_public/tables/billing_provider_module/table to pg + +-- requires: schemas/metaschema_modules_public/schema + +BEGIN; + +CREATE TABLE metaschema_modules_public.billing_provider_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + + schema_id uuid NOT NULL DEFAULT uuid_nil(), + private_schema_id uuid NOT NULL DEFAULT uuid_nil(), + + -- Provider: which billing provider (stripe, paddle, lemon_squeezy, etc.) + provider text NOT NULL DEFAULT 'stripe', + + -- Parameterized FK targets: pass in your own tables + -- For SaaS: plans, plan_pricing, plan_subscriptions + -- For e-commerce: products, product_variants, orders + products_table_id uuid NULL, + prices_table_id uuid NULL, + subscriptions_table_id uuid NULL, + + -- Created mapping tables + billing_customers_table_id uuid NOT NULL DEFAULT uuid_nil(), + billing_customers_table_name text NOT NULL DEFAULT '', + + billing_products_table_id uuid NOT NULL DEFAULT uuid_nil(), + billing_products_table_name text NOT NULL DEFAULT '', + + billing_prices_table_id uuid NOT NULL DEFAULT uuid_nil(), + billing_prices_table_name text NOT NULL DEFAULT '', + + billing_subscriptions_table_id uuid NOT NULL DEFAULT uuid_nil(), + billing_subscriptions_table_name text NOT NULL DEFAULT '', + + billing_webhook_events_table_id uuid NOT NULL DEFAULT uuid_nil(), + billing_webhook_events_table_name text NOT NULL DEFAULT '', + + -- Generated functions + process_billing_event_function text NOT NULL DEFAULT '', + + prefix text NULL, + + -- API routing (configurable per-module) + api_name text DEFAULT NULL, + private_api_name text DEFAULT NULL, + + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT schema_fkey FOREIGN KEY (schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + CONSTRAINT private_schema_fkey FOREIGN KEY (private_schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + CONSTRAINT billing_customers_table_fkey FOREIGN KEY (billing_customers_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT billing_products_table_fkey FOREIGN KEY (billing_products_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT billing_prices_table_fkey FOREIGN KEY (billing_prices_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT billing_subscriptions_table_fkey FOREIGN KEY (billing_subscriptions_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT billing_webhook_events_table_fkey FOREIGN KEY (billing_webhook_events_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT products_table_fkey FOREIGN KEY (products_table_id) REFERENCES metaschema_public.table (id) ON DELETE SET NULL, + CONSTRAINT prices_table_fkey FOREIGN KEY (prices_table_id) REFERENCES metaschema_public.table (id) ON DELETE SET NULL, + CONSTRAINT subscriptions_table_fkey FOREIGN KEY (subscriptions_table_id) REFERENCES metaschema_public.table (id) ON DELETE SET NULL, + CONSTRAINT billing_provider_module_database_id_unique UNIQUE (database_id) +); + +CREATE INDEX billing_provider_module_database_id_idx ON metaschema_modules_public.billing_provider_module ( database_id ); + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/blueprint/table.sql b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/blueprint/table.sql new file mode 100644 index 00000000..7dc5a609 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/blueprint/table.sql @@ -0,0 +1,89 @@ +-- Deploy schemas/metaschema_modules_public/tables/blueprint/table to pg + +-- requires: schemas/metaschema_modules_public/schema +-- requires: schemas/metaschema_modules_public/tables/blueprint_template/table + +BEGIN; + +CREATE TABLE metaschema_modules_public.blueprint ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + + -- Ownership + scoping + owner_id uuid NOT NULL, + + database_id uuid NOT NULL, + + -- Identity + name text NOT NULL, + + display_name text NOT NULL, + + description text, + + -- The blueprint definition (tables with nodes[] and policies[], relations with $type) + -- This is a mutable copy — the owner can customize before executing + definition jsonb NOT NULL, + + -- Lineage: where did this come from? + template_id uuid DEFAULT NULL, + + -- Content-addressable Merkle hashes (backend-computed via trigger) + definition_hash uuid, + + table_hashes jsonb, + + created_at timestamptz NOT NULL DEFAULT now(), + + updated_at timestamptz NOT NULL DEFAULT now(), + + CONSTRAINT blueprint_unique_database_name UNIQUE (database_id, name), + CONSTRAINT blueprint_db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT blueprint_template_fkey FOREIGN KEY (template_id) REFERENCES metaschema_modules_public.blueprint_template (id) +); + +COMMENT ON TABLE metaschema_modules_public.blueprint IS + 'An owned, editable blueprint scoped to a specific database. Created by copying from a blueprint_template via copy_template_to_blueprint() or built from scratch. The owner can customize the definition at any time. Execute it with construct_blueprint() which creates a separate blueprint_construction record to track the build.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint.id IS + 'Unique identifier for this blueprint.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint.owner_id IS + 'The user who owns this blueprint.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint.database_id IS + 'The database this blueprint is scoped to. Tables created by construct_blueprint() are provisioned in this database.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint.name IS + 'Machine-readable name for the blueprint. Must be unique per database.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint.display_name IS + 'Human-readable display name for the blueprint.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint.description IS + 'Optional description of the blueprint.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint.definition IS + 'The blueprint definition as a JSONB document. Contains tables[] (each with table_name, optional schema_name, nodes[] for data behaviors, fields[], grants[], and policies[] using $type), relations[] (using $type with source_table/target_table and optional source_schema/target_schema), indexes[] (using table_name + column), and full_text_searches[] (using table_name + field + sources[]). Everything is name-based — no UUIDs in the definition.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint.template_id IS + 'If this blueprint was created by copying a template, the ID of the source template. NULL if built from scratch.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint.created_at IS + 'Timestamp when this blueprint was created.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint.definition_hash IS + 'UUIDv5 Merkle root hash of the definition. Computed automatically via trigger from the ordered table_hashes. Used for content-addressable deduplication and provenance tracking. Backend-computed — clients should never set this directly.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint.table_hashes IS + 'JSONB map of table names to their individual UUIDv5 content hashes. Each table hash is computed from the canonical jsonb::text of the table entry. Enables structural comparison at the table level across blueprints and templates. Backend-computed via trigger.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint.updated_at IS + 'Timestamp when this blueprint was last modified.'; + + +CREATE INDEX blueprint_owner_id_idx ON metaschema_modules_public.blueprint (owner_id); +CREATE INDEX blueprint_database_id_idx ON metaschema_modules_public.blueprint (database_id); +CREATE INDEX blueprint_template_id_idx ON metaschema_modules_public.blueprint (template_id); +CREATE INDEX blueprint_definition_hash_idx ON metaschema_modules_public.blueprint (definition_hash); + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/blueprint_construction/table.sql b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/blueprint_construction/table.sql new file mode 100644 index 00000000..f28d49df --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/blueprint_construction/table.sql @@ -0,0 +1,84 @@ +-- Deploy schemas/metaschema_modules_public/tables/blueprint_construction/table to pg + +-- requires: schemas/metaschema_modules_public/schema +-- requires: schemas/metaschema_modules_public/tables/blueprint/table + +BEGIN; + +CREATE TABLE metaschema_modules_public.blueprint_construction ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + + -- What was constructed + blueprint_id uuid NOT NULL, + + database_id uuid NOT NULL, + + -- The schema used as the default for tables without an explicit schema_name + schema_id uuid, + + -- Execution state + status text NOT NULL DEFAULT 'pending' + CHECK (status IN ('pending', 'constructing', 'constructed', 'failed')), + + error_details text, + + -- Output: mapping of table names to created table IDs (populated after construct) + table_map jsonb NOT NULL DEFAULT '{}', + + -- Snapshot of the definition at construct-time (immutable record of what was actually executed) + constructed_definition jsonb, + + constructed_at timestamptz, + + created_at timestamptz NOT NULL DEFAULT now(), + + updated_at timestamptz NOT NULL DEFAULT now(), + + CONSTRAINT blueprint_construction_blueprint_fkey + FOREIGN KEY (blueprint_id) REFERENCES metaschema_modules_public.blueprint(id) ON DELETE CASCADE, + CONSTRAINT blueprint_construction_db_fkey + FOREIGN KEY (database_id) REFERENCES metaschema_public.database(id) ON DELETE CASCADE +); + +COMMENT ON TABLE metaschema_modules_public.blueprint_construction IS + 'Tracks individual construction attempts of a blueprint. Each time construct_blueprint() is called, a new record is created here. This separates the editable blueprint definition from its build history, allowing blueprints to be re-executed, constructed into multiple databases, and maintain an audit trail of all construction attempts.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint_construction.id IS + 'Unique identifier for this construction attempt.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint_construction.blueprint_id IS + 'The blueprint that was constructed.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint_construction.database_id IS + 'The database the blueprint was constructed into.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint_construction.schema_id IS + 'The default schema used for tables that did not specify an explicit schema_name. NULL if not yet resolved.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint_construction.status IS + 'Execution state of this construction attempt. pending: created but not yet started. constructing: currently executing. constructed: successfully completed. failed: execution failed (see error_details).'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint_construction.error_details IS + 'Error message from a failed construction attempt. NULL unless status is failed.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint_construction.table_map IS + 'Mapping of table names to created table UUIDs, populated after successful construction. Format: {"products": "uuid", "categories": "uuid", ...}. Defaults to empty object.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint_construction.constructed_definition IS + 'Immutable snapshot of the definition at construct-time. Preserved so the exact definition that was executed is recorded even if the user later modifies the blueprint definition.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint_construction.constructed_at IS + 'Timestamp when construction successfully completed. NULL until constructed.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint_construction.created_at IS + 'Timestamp when this construction attempt was created.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint_construction.updated_at IS + 'Timestamp when this construction attempt was last modified.'; + + +CREATE INDEX blueprint_construction_blueprint_id_idx ON metaschema_modules_public.blueprint_construction (blueprint_id); +CREATE INDEX blueprint_construction_database_id_idx ON metaschema_modules_public.blueprint_construction (database_id); +CREATE INDEX blueprint_construction_status_idx ON metaschema_modules_public.blueprint_construction (status); + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/blueprint_template/table.sql b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/blueprint_template/table.sql new file mode 100644 index 00000000..d634212e --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/blueprint_template/table.sql @@ -0,0 +1,137 @@ +-- Deploy schemas/metaschema_modules_public/tables/blueprint_template/table to pg + +-- requires: schemas/metaschema_modules_public/schema + +BEGIN; + +CREATE TABLE metaschema_modules_public.blueprint_template ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + + -- Identity + name text NOT NULL, + + version text NOT NULL DEFAULT '1.0.0', + + display_name text NOT NULL, + + description text, + + -- Ownership + owner_id uuid NOT NULL, + + -- Visibility + visibility text NOT NULL DEFAULT 'private' + CHECK (visibility IN ('private', 'public')), + + -- Categorization + categories text[] NOT NULL DEFAULT '{}', + + tags text[] NOT NULL DEFAULT '{}', + + -- The blueprint definition (tables with nodes[] and policies[], relations with $type) + definition jsonb NOT NULL, + + -- Schema for validating definition structure + definition_schema_version text NOT NULL DEFAULT '1', + + -- Provenance + source text NOT NULL DEFAULT 'user' + CHECK (source IN ('user', 'system', 'agent')), + + -- Complexity indicator + complexity text DEFAULT NULL + CHECK (complexity IS NULL OR complexity IN ('simple', 'moderate', 'complex')), + + -- Marketplace stats (denormalized for query perf) + copy_count integer NOT NULL DEFAULT 0, + + fork_count integer NOT NULL DEFAULT 0, + + -- If this template was forked from another + forked_from_id uuid DEFAULT NULL, + + -- Content-addressable Merkle hashes (backend-computed via trigger) + definition_hash uuid, + + table_hashes jsonb, + + created_at timestamptz NOT NULL DEFAULT now(), + + updated_at timestamptz NOT NULL DEFAULT now(), + + CONSTRAINT blueprint_template_unique_owner_name_version UNIQUE (owner_id, name, version), + CONSTRAINT blueprint_template_forked_from_fkey FOREIGN KEY (forked_from_id) REFERENCES metaschema_modules_public.blueprint_template(id) +); + +COMMENT ON TABLE metaschema_modules_public.blueprint_template IS + 'A shareable, versioned schema recipe for the blueprint marketplace. Templates define arrays of secure_table_provision + relation_provision inputs that together describe a complete domain schema (e.g. e-commerce, telemedicine, habit tracker). Templates are never executed directly — they are copied into a blueprint first via copy_template_to_blueprint(). Can be private (owner-only) or public (marketplace-visible).'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint_template.id IS + 'Unique identifier for this template.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint_template.name IS + 'Machine-readable name for the template (e.g. e_commerce_basic). Must be unique per owner + version.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint_template.version IS + 'Semantic version string. Defaults to 1.0.0.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint_template.display_name IS + 'Human-readable display name for the template (e.g. E-Commerce Basic).'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint_template.description IS + 'Optional description of what the template provisions.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint_template.owner_id IS + 'The user who created or published this template.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint_template.visibility IS + 'Access control for the template. private: only the owner can see and copy. public: anyone can browse and copy from the marketplace. Defaults to private.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint_template.categories IS + 'Domain categories for marketplace browsing (e.g. e-commerce, healthcare, social). Defaults to empty array.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint_template.tags IS + 'Freeform tags for search and discovery (e.g. products, orders, payments). Defaults to empty array.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint_template.definition IS + 'The blueprint definition as a JSONB document. Contains tables[] (each with nodes[] for data behaviors via string shorthand or {"$type": "...", "data": {...}} objects, fields[], grants[], and policies[] using {"$type": "...", "data": {...}}), and relations[] (using $type for relation_type with junction config in data). This is the core payload that gets copied into a blueprint for execution.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint_template.definition_schema_version IS + 'Version of the definition format schema. Used for forward-compatible parsing. Defaults to 1.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint_template.source IS + 'Provenance of the template. user: manually created by a human. system: official curated template from the Constructive team. agent: AI-generated. Defaults to user.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint_template.complexity IS + 'Complexity indicator for marketplace filtering. simple: 3-5 tables. moderate: 6-12 tables. complex: 13+ tables. NULL if not categorized.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint_template.copy_count IS + 'Denormalized count of how many blueprints have been created from this template via copy_template_to_blueprint(). Incremented automatically. Defaults to 0.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint_template.fork_count IS + 'Denormalized count of how many derivative templates have been forked from this template. Defaults to 0.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint_template.forked_from_id IS + 'If this template was forked from another template, the ID of the parent. NULL for original templates.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint_template.created_at IS + 'Timestamp when this template was created.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint_template.definition_hash IS + 'UUIDv5 Merkle root hash of the definition. Computed automatically via trigger from the ordered table_hashes. Used for content-addressable deduplication, provenance tracking, and cross-blueprint structural comparison. NULL columns are backend-computed — clients should never set this directly.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint_template.table_hashes IS + 'JSONB map of table ref names to their individual UUIDv5 content hashes (e.g. {"products": "uuid", "categories": "uuid"}). Each table hash is computed from the canonical jsonb::text of the table entry. Enables structural comparison at the table level across different blueprints. Backend-computed via trigger.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint_template.updated_at IS + 'Timestamp when this template was last modified.'; + + +CREATE INDEX blueprint_template_owner_id_idx ON metaschema_modules_public.blueprint_template (owner_id); +CREATE INDEX blueprint_template_visibility_idx ON metaschema_modules_public.blueprint_template (visibility); +CREATE INDEX blueprint_template_forked_from_id_idx ON metaschema_modules_public.blueprint_template (forked_from_id); +CREATE INDEX blueprint_template_categories_idx ON metaschema_modules_public.blueprint_template USING gin (categories); +CREATE INDEX blueprint_template_tags_idx ON metaschema_modules_public.blueprint_template USING gin (tags); +CREATE INDEX blueprint_template_definition_hash_idx ON metaschema_modules_public.blueprint_template (definition_hash); + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/compute_log_module/table.sql b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/compute_log_module/table.sql new file mode 100644 index 00000000..cda421e2 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/compute_log_module/table.sql @@ -0,0 +1,49 @@ +-- Deploy schemas/metaschema_modules_public/tables/compute_log_module/table to pg + +-- requires: schemas/metaschema_modules_public/schema + +BEGIN; + +CREATE TABLE metaschema_modules_public.compute_log_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + + schema_id uuid NOT NULL DEFAULT uuid_nil(), + private_schema_id uuid NOT NULL DEFAULT uuid_nil(), + + -- Compute log table (partitioned by completed_at) + compute_log_table_id uuid NOT NULL DEFAULT uuid_nil(), + compute_log_table_name text NOT NULL DEFAULT '', + + -- Pre-aggregated daily rollup table + usage_daily_table_id uuid NOT NULL DEFAULT uuid_nil(), + usage_daily_table_name text NOT NULL DEFAULT '', + + -- Partition lifecycle configuration + "interval" text NOT NULL DEFAULT '1 month', + retention text NOT NULL DEFAULT '12 months', + premake int NOT NULL DEFAULT 2, + + -- Scope configuration: 'app' = per-app usage (actor_id RLS) + scope text NOT NULL DEFAULT 'app', + actor_fk_table_id uuid NULL, + entity_fk_table_id uuid NULL, + + -- Table name prefix. Auto-derived from scope by the trigger when empty. + prefix text NOT NULL DEFAULT '', + + -- API routing (configurable per-module) + api_name text DEFAULT 'usage', + private_api_name text DEFAULT NULL, + + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT schema_fkey FOREIGN KEY (schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + CONSTRAINT private_schema_fkey FOREIGN KEY (private_schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + CONSTRAINT compute_log_table_fkey FOREIGN KEY (compute_log_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT usage_daily_table_fkey FOREIGN KEY (usage_daily_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT compute_log_module_database_id_prefix_unique UNIQUE NULLS NOT DISTINCT (database_id, prefix) +); + +CREATE INDEX compute_log_module_database_id_idx ON metaschema_modules_public.compute_log_module ( database_id ); + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/config_secrets_module/table.sql b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/config_secrets_module/table.sql new file mode 100644 index 00000000..9d320395 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/config_secrets_module/table.sql @@ -0,0 +1,82 @@ +-- Deploy schemas/metaschema_modules_public/tables/config_secrets_module/table to pg + +-- requires: schemas/metaschema_modules_public/schema + +BEGIN; + +CREATE TABLE metaschema_modules_public.config_secrets_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + + -- Schema references (resolved by BEFORE INSERT trigger when uuid_nil) + schema_id uuid NOT NULL DEFAULT uuid_nil(), + private_schema_id uuid NOT NULL DEFAULT uuid_nil(), + + -- Generated table IDs (populated by the generator) + table_id uuid NOT NULL DEFAULT uuid_nil(), + config_definitions_table_id uuid NULL DEFAULT NULL, + + -- Table name (input — bare name without scope prefix). + -- The trigger prepends the scope prefix automatically. + table_name text NOT NULL DEFAULT 'secrets', + + -- API routing (get-or-create: if set, schema is added to this API) + api_name text DEFAULT 'config', + private_api_name text DEFAULT NULL, + + -- Scope: determines the security level for this module instance. + -- Resolved to a membership_type integer at trigger time via membership_types table. + -- 'app' = app-level (AuthzAppMembership, admin-only secrets + config) + -- 'org' = org-scoped (AuthzEntityMembership, per-org secrets with manage_secrets permission) + -- custom entity type names for entity-scoped secrets + -- Note: user-scoped credentials are handled by user_credentials_module (separate module) + scope text NOT NULL DEFAULT 'app', + + -- Table name prefix. Auto-derived from scope by the trigger when empty. + -- Override to create multiple module instances at the same scope. + prefix text NOT NULL DEFAULT '', + + -- Entity table for RLS (NULL for app-level, entity table for entity-scoped) + entity_table_id uuid NULL, + + -- Configurable security policies (NULL = use defaults based on scope). + -- When provided, replaces the default policy set in the security function. + -- Accepts a JSON array of policy objects: + -- {"$type": "AuthzEntityMembership", "privileges": ["select", "update"], "data": {...}} + policies jsonb NULL, + + -- Per-table provisions overrides from blueprint config. + -- Keys are table keys (secrets, config_definitions). + -- When a key is present, the module trigger skips default security for that table; + -- secure_table_provision applies the custom grants/policies instead. + provisions jsonb NULL, + + -- Feature flags + + -- When true, also creates a plaintext config table ({prefix}_config) and + -- a config definitions registry table ({prefix}_config_definitions). + -- Only meaningful for app-level scope (scope = 'app'). + has_config boolean NOT NULL DEFAULT false, + + -- Constraints + CONSTRAINT config_secrets_module_db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT config_secrets_module_schema_fkey FOREIGN KEY (schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + CONSTRAINT config_secrets_module_private_schema_fkey FOREIGN KEY (private_schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + CONSTRAINT config_secrets_module_table_fkey FOREIGN KEY (table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT config_secrets_module_config_defs_table_fkey FOREIGN KEY (config_definitions_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT config_secrets_module_entity_table_fkey FOREIGN KEY (entity_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE +); + +CREATE INDEX config_secrets_module_database_id_idx ON metaschema_modules_public.config_secrets_module ( database_id ); +CREATE INDEX config_secrets_module_schema_id_idx ON metaschema_modules_public.config_secrets_module ( schema_id ); +CREATE INDEX config_secrets_module_table_id_idx ON metaschema_modules_public.config_secrets_module ( table_id ); + +-- Unique constraint: one config_secrets module per database per scope per prefix. +CREATE UNIQUE INDEX config_secrets_module_unique_scope ON metaschema_modules_public.config_secrets_module ( database_id, scope, prefix ); + +COMMENT ON TABLE metaschema_modules_public.config_secrets_module IS + 'Entity-aware PGP-encrypted key-value config/secrets module. Supports app-level (admin-only) + and org-scoped (per-org secrets with manage_secrets permission) via the scope column. + User-scoped bcrypt credentials are handled by user_credentials_module.'; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/config_secrets_org_module/table.sql b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/config_secrets_org_module/table.sql new file mode 100644 index 00000000..0a9465b3 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/config_secrets_org_module/table.sql @@ -0,0 +1,32 @@ +-- Deploy schemas/metaschema_modules_public/tables/config_secrets_org_module/table to pg + +-- requires: schemas/metaschema_modules_public/schema + +BEGIN; + +CREATE TABLE metaschema_modules_public.config_secrets_org_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + + -- + schema_id uuid NOT NULL DEFAULT uuid_nil(), + table_id uuid NOT NULL DEFAULT uuid_nil(), + table_name text NOT NULL DEFAULT 'org_secrets', + -- + + -- API routing (configurable per-module) + api_name text DEFAULT 'config', + private_api_name text DEFAULT NULL, + + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT schema_fkey FOREIGN KEY (schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + CONSTRAINT table_fkey FOREIGN KEY (table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE +); + +CREATE INDEX config_secrets_org_module_database_id_idx ON metaschema_modules_public.config_secrets_org_module ( database_id ); +CREATE INDEX config_secrets_org_module_schema_id_idx ON metaschema_modules_public.config_secrets_org_module ( schema_id ); +CREATE INDEX config_secrets_org_module_table_id_idx ON metaschema_modules_public.config_secrets_org_module ( table_id ); + +COMMENT ON TABLE metaschema_modules_public.config_secrets_org_module IS 'Config row for the config_secrets_org_module, which provisions an organization-scoped encrypted key-value secrets store with manage_secrets permission and entity-membership RLS.'; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/config_secrets_user_module/table.sql b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/config_secrets_user_module/table.sql new file mode 100644 index 00000000..e0e6c5a2 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/config_secrets_user_module/table.sql @@ -0,0 +1,32 @@ +-- Deploy schemas/metaschema_modules_public/tables/config_secrets_user_module/table to pg + +-- requires: schemas/metaschema_modules_public/schema + +BEGIN; + +CREATE TABLE metaschema_modules_public.config_secrets_user_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + + -- + schema_id uuid NOT NULL DEFAULT uuid_nil(), + table_id uuid NOT NULL DEFAULT uuid_nil(), + table_name text NOT NULL DEFAULT 'user_secrets', + + -- Config definitions table ID (populated by the generator) + config_definitions_table_id uuid NOT NULL DEFAULT uuid_nil(), + -- + + -- API routing (configurable per-module) + api_name text DEFAULT 'config', + private_api_name text DEFAULT NULL, + + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT schema_fkey FOREIGN KEY (schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + CONSTRAINT table_fkey FOREIGN KEY (table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT config_defs_table_fkey FOREIGN KEY (config_definitions_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE +); + +CREATE INDEX config_secrets_user_module_database_id_idx ON metaschema_modules_public.config_secrets_user_module ( database_id ); + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/connected_accounts_module/table.sql b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/connected_accounts_module/table.sql new file mode 100644 index 00000000..6f831d86 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/connected_accounts_module/table.sql @@ -0,0 +1,33 @@ +-- Deploy schemas/metaschema_modules_public/tables/connected_accounts_module/table to pg + +-- requires: schemas/metaschema_modules_public/schema + +BEGIN; + +CREATE TABLE metaschema_modules_public.connected_accounts_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + + schema_id uuid NOT NULL DEFAULT uuid_nil(), + private_schema_id uuid NOT NULL DEFAULT uuid_nil(), + + table_id uuid NOT NULL DEFAULT uuid_nil(), + owner_table_id uuid NOT NULL DEFAULT uuid_nil(), + + table_name text NOT NULL, + + -- API routing (configurable per-module) + api_name text DEFAULT 'auth', + private_api_name text DEFAULT NULL, + + -- + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT table_fkey FOREIGN KEY (table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT owner_table_fkey FOREIGN KEY (owner_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT schema_fkey FOREIGN KEY (schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + CONSTRAINT private_schema_fkey FOREIGN KEY (private_schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE +); + +CREATE INDEX connected_accounts_module_database_id_idx ON metaschema_modules_public.connected_accounts_module ( database_id ); + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/crypto_addresses_module/table.sql b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/crypto_addresses_module/table.sql new file mode 100644 index 00000000..7e3747fd --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/crypto_addresses_module/table.sql @@ -0,0 +1,34 @@ +-- Deploy schemas/metaschema_modules_public/tables/crypto_addresses_module/table to pg + +-- requires: schemas/metaschema_modules_public/schema + +BEGIN; + +CREATE TABLE metaschema_modules_public.crypto_addresses_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + + schema_id uuid NOT NULL DEFAULT uuid_nil(), + private_schema_id uuid NOT NULL DEFAULT uuid_nil(), + + table_id uuid NOT NULL DEFAULT uuid_nil(), + owner_table_id uuid NOT NULL DEFAULT uuid_nil(), + + table_name text NOT NULL, + crypto_network text NOT NULL DEFAULT 'BTC', + + -- API routing (configurable per-module) + api_name text DEFAULT 'auth', + private_api_name text DEFAULT NULL, + + -- + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT table_fkey FOREIGN KEY (table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT owner_table_fkey FOREIGN KEY (owner_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT schema_fkey FOREIGN KEY (schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + CONSTRAINT private_schema_fkey FOREIGN KEY (private_schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE +); + +CREATE INDEX crypto_addresses_module_database_id_idx ON metaschema_modules_public.crypto_addresses_module ( database_id ); + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/crypto_auth_module/table.sql b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/crypto_auth_module/table.sql new file mode 100644 index 00000000..639475bd --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/crypto_auth_module/table.sql @@ -0,0 +1,41 @@ +-- Deploy schemas/metaschema_modules_public/tables/crypto_auth_module/table to pg + +-- requires: schemas/metaschema_modules_public/schema + +BEGIN; + +CREATE TABLE metaschema_modules_public.crypto_auth_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + + schema_id uuid NOT NULL DEFAULT uuid_nil(), + + users_table_id uuid NOT NULL DEFAULT uuid_nil(), + -- TOKENS_REMOVAL: tokens_table_id removed - crypto auth now uses sessions_module + secrets_table_id uuid NOT NULL DEFAULT uuid_nil(), + sessions_table_id uuid NOT NULL DEFAULT uuid_nil(), + session_credentials_table_id uuid NOT NULL DEFAULT uuid_nil(), + addresses_table_id uuid NOT NULL DEFAULT uuid_nil(), + + user_field text NOT NULL, + + crypto_network text NOT NULL DEFAULT 'BTC', + sign_in_request_challenge text NOT NULL DEFAULT 'sign_in_request_challenge', + sign_in_record_failure text NOT NULL DEFAULT 'sign_in_record_failure', + sign_up_with_key text NOT NULL DEFAULT 'sign_up_with_key', + sign_in_with_challenge text NOT NULL DEFAULT 'sign_in_with_challenge', + + -- + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT secrets_table_fkey FOREIGN KEY (secrets_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT users_table_fkey FOREIGN KEY (users_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + -- TOKENS_REMOVAL: tokens_table_fkey removed - crypto auth now uses sessions_module + CONSTRAINT sessions_table_fkey FOREIGN KEY (sessions_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT session_credentials_table_fkey FOREIGN KEY (session_credentials_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT schema_fkey FOREIGN KEY (schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE +); + +-- TOKENS_REMOVAL: tokens_table_fkey comment removed +CREATE INDEX crypto_auth_module_database_id_idx ON metaschema_modules_public.crypto_auth_module ( database_id ); + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/db_usage_module/table.sql b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/db_usage_module/table.sql new file mode 100644 index 00000000..9a667fef --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/db_usage_module/table.sql @@ -0,0 +1,61 @@ +-- Deploy schemas/metaschema_modules_public/tables/db_usage_module/table to pg + +-- requires: schemas/metaschema_modules_public/schema + +BEGIN; + +CREATE TABLE metaschema_modules_public.db_usage_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + + schema_id uuid NOT NULL DEFAULT uuid_nil(), + private_schema_id uuid NOT NULL DEFAULT uuid_nil(), + + -- DB table stats log (partitioned — per-table reads/writes/size from pg_stat_user_tables) + table_stats_log_table_id uuid NOT NULL DEFAULT uuid_nil(), + table_stats_log_table_name text NOT NULL DEFAULT '', + + -- DB table stats daily rollup + table_stats_daily_table_id uuid NOT NULL DEFAULT uuid_nil(), + table_stats_daily_table_name text NOT NULL DEFAULT '', + + -- DB query stats log (partitioned — query execution time from pg_stat_statements) + query_stats_log_table_id uuid NOT NULL DEFAULT uuid_nil(), + query_stats_log_table_name text NOT NULL DEFAULT '', + + -- DB query stats daily rollup + query_stats_daily_table_id uuid NOT NULL DEFAULT uuid_nil(), + query_stats_daily_table_name text NOT NULL DEFAULT '', + + -- Partition lifecycle configuration + "interval" text NOT NULL DEFAULT '1 month', + retention text NOT NULL DEFAULT '12 months', + premake int NOT NULL DEFAULT 2, + + -- Scope configuration: 'app' = per-app usage + scope text NOT NULL DEFAULT 'app', + + -- Table name prefix. Auto-derived from scope by the trigger when empty. + prefix text NOT NULL DEFAULT '', + + -- Default permissions: permission names auto-granted to new members. + -- NULL uses the module's built-in defaults; explicit array overrides them. + default_permissions text[] DEFAULT NULL, + + -- API routing (configurable per-module) + api_name text DEFAULT 'usage', + private_api_name text DEFAULT NULL, + + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT schema_fkey FOREIGN KEY (schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + CONSTRAINT private_schema_fkey FOREIGN KEY (private_schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + CONSTRAINT table_stats_log_table_fkey FOREIGN KEY (table_stats_log_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT table_stats_daily_table_fkey FOREIGN KEY (table_stats_daily_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT query_stats_log_table_fkey FOREIGN KEY (query_stats_log_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT query_stats_daily_table_fkey FOREIGN KEY (query_stats_daily_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT db_usage_module_database_id_prefix_unique UNIQUE NULLS NOT DISTINCT (database_id, prefix) +); + +CREATE INDEX db_usage_module_database_id_idx ON metaschema_modules_public.db_usage_module ( database_id ); + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/default_ids_module/table.sql b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/default_ids_module/table.sql new file mode 100644 index 00000000..15fa40a6 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/default_ids_module/table.sql @@ -0,0 +1,18 @@ +-- Deploy schemas/metaschema_modules_public/tables/default_ids_module/table to pg + +-- requires: schemas/metaschema_modules_public/schema + +BEGIN; + +CREATE TABLE metaschema_modules_public.default_ids_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + + -- + + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE +); + +CREATE INDEX default_ids_module_database_id_idx ON metaschema_modules_public.default_ids_module ( database_id ); + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/denormalized_table_field/table.sql b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/denormalized_table_field/table.sql new file mode 100644 index 00000000..e6ea588a --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/denormalized_table_field/table.sql @@ -0,0 +1,36 @@ +-- Deploy schemas/metaschema_modules_public/tables/denormalized_table_field/table to pg + +-- requires: schemas/metaschema_modules_public/schema + +BEGIN; + +CREATE TABLE metaschema_modules_public.denormalized_table_field ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + + table_id uuid NOT NULL, + field_id uuid NOT NULL, + + set_ids uuid[], + + ref_table_id uuid NOT NULL, + ref_field_id uuid NOT NULL, + ref_ids uuid[], + + use_updates bool NOT NULL DEFAULT TRUE, + update_defaults bool NOT NULL DEFAULT TRUE, + + func_name text NULL, + func_order int NOT NULL DEFAULT 0, + + -- + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT table_fkey FOREIGN KEY (table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT ref_table_fkey FOREIGN KEY (ref_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT field_fkey FOREIGN KEY (field_id) REFERENCES metaschema_public.field (id) ON DELETE CASCADE, + CONSTRAINT ref_field_fkey FOREIGN KEY (ref_field_id) REFERENCES metaschema_public.field (id) ON DELETE CASCADE +); + +CREATE INDEX denormalized_table_field_database_id_idx ON metaschema_modules_public.denormalized_table_field ( database_id ); + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/devices_module/table.sql b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/devices_module/table.sql new file mode 100644 index 00000000..b6c5837e --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/devices_module/table.sql @@ -0,0 +1,36 @@ +-- Deploy schemas/metaschema_modules_public/tables/devices_module/table to pg + +-- requires: schemas/metaschema_modules_public/schema + +BEGIN; + +CREATE TABLE metaschema_modules_public.devices_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + + -- + schema_id uuid NOT NULL DEFAULT uuid_nil(), + user_devices_table_id uuid NOT NULL DEFAULT uuid_nil(), + device_settings_table_id uuid NOT NULL DEFAULT uuid_nil(), + + user_devices_table text NOT NULL DEFAULT 'auth_user_devices', + device_settings_table text NOT NULL DEFAULT 'app_settings_device', + -- + + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT schema_fkey FOREIGN KEY (schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + CONSTRAINT user_devices_table_fkey FOREIGN KEY (user_devices_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT device_settings_table_fkey FOREIGN KEY (device_settings_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + + -- + CONSTRAINT devices_module_database_id_uniq UNIQUE(database_id) +); + +CREATE INDEX devices_module_database_id_idx ON metaschema_modules_public.devices_module ( database_id ); + +COMMENT ON CONSTRAINT user_devices_table_fkey + ON metaschema_modules_public.devices_module IS E'@fieldName userDevicesTableByUserDevicesTableId'; +COMMENT ON CONSTRAINT device_settings_table_fkey + ON metaschema_modules_public.devices_module IS E'@fieldName deviceSettingsTableByDeviceSettingsTableId'; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/emails_module/table.sql b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/emails_module/table.sql new file mode 100644 index 00000000..ee831229 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/emails_module/table.sql @@ -0,0 +1,33 @@ +-- Deploy schemas/metaschema_modules_public/tables/emails_module/table to pg + +-- requires: schemas/metaschema_modules_public/schema + +BEGIN; + +CREATE TABLE metaschema_modules_public.emails_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + + schema_id uuid NOT NULL DEFAULT uuid_nil(), + private_schema_id uuid NOT NULL DEFAULT uuid_nil(), + + table_id uuid NOT NULL DEFAULT uuid_nil(), + owner_table_id uuid NOT NULL DEFAULT uuid_nil(), + + table_name text NOT NULL, + + -- API routing (configurable per-module) + api_name text DEFAULT 'auth', + private_api_name text DEFAULT NULL, + + -- + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT table_fkey FOREIGN KEY (table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT owner_table_fkey FOREIGN KEY (owner_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT schema_fkey FOREIGN KEY (schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + CONSTRAINT private_schema_fkey FOREIGN KEY (private_schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE +); + +CREATE INDEX emails_module_database_id_idx ON metaschema_modules_public.emails_module ( database_id ); + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/entity_type_provision/table.sql b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/entity_type_provision/table.sql new file mode 100644 index 00000000..d5285446 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/entity_type_provision/table.sql @@ -0,0 +1,421 @@ +-- Deploy schemas/metaschema_modules_public/tables/entity_type_provision/table to pg + +-- requires: schemas/metaschema_modules_public/schema + +BEGIN; + +CREATE TABLE metaschema_modules_public.entity_type_provision ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + + database_id uuid NOT NULL, + + -- ========================================================================= + -- Identity: what this membership type is called + -- ========================================================================= + + name text NOT NULL, + + prefix text NOT NULL, + + description text NOT NULL DEFAULT '', + + -- ========================================================================= + -- Parentage: which entity type is the parent (resolved by trigger) + -- ========================================================================= + + parent_entity text NOT NULL DEFAULT 'org', + + -- ========================================================================= + -- Entity table name override + -- ========================================================================= + + table_name text DEFAULT NULL, + + -- ========================================================================= + -- Visibility: can parent members see child entities? + -- ========================================================================= + + is_visible boolean NOT NULL DEFAULT true, + + -- ========================================================================= + -- Optional modules + -- ========================================================================= + + has_limits boolean NOT NULL DEFAULT false, + + has_profiles boolean NOT NULL DEFAULT false, + + has_levels boolean NOT NULL DEFAULT false, + + has_invites boolean NOT NULL DEFAULT false, + + has_invite_achievements boolean NOT NULL DEFAULT false, + + -- ========================================================================= + -- Storage configuration: JSON array of storage module definitions. + -- Each element provisions a separate storage module with its own tables, + -- RLS policies, and feature flags. Presence triggers provisioning + -- (same inference model as namespaces, functions, agents). + -- NULL = do not provision. '[{}]' = provision one default storage module. + -- ========================================================================= + + storage jsonb DEFAULT NULL, + + -- ========================================================================= + -- Module configuration arrays: presence triggers provisioning. + -- Each is a JSON array of module definitions (like storage). + -- NULL = do not provision. '[{}]' = provision one default instance. + -- Each element may include "key" (discriminator) and "policies" (override). + -- ========================================================================= + + namespaces jsonb DEFAULT NULL, + + functions jsonb DEFAULT NULL, + + graphs jsonb DEFAULT NULL, + + agents jsonb DEFAULT NULL, + + -- ========================================================================= + -- Escape hatch: skip default entity table RLS policies + -- ========================================================================= + + skip_entity_policies boolean NOT NULL DEFAULT false, + + -- ========================================================================= + -- Table provisioning override: single jsonb object describing the full + -- security setup to apply to the entity table, using the same vocabulary + -- as metaschema_modules_public.provision_table() and blueprint tables[] + -- entries (policies[], nodes[], fields[], grants[], use_rls). + -- + -- Semantics: + -- - NULL (default) -> apply the 5 default entity-table policies + -- (gated by is_visible / skip_entity_policies) + -- - non-NULL object -> fan table_provision.policies[] into N + -- secure_table_provision rows; the 5 defaults + -- are implicitly skipped, and is_visible is + -- a no-op on this path. + -- ========================================================================= + + table_provision jsonb DEFAULT NULL, + + -- ========================================================================= + -- Output columns (populated by the trigger, not set by callers) + -- ========================================================================= + + out_membership_type int DEFAULT NULL, + + out_entity_table_id uuid DEFAULT NULL, + + out_entity_table_name text DEFAULT NULL, + + out_installed_modules text[] DEFAULT NULL, + + out_storage_module_id uuid DEFAULT NULL, + + out_buckets_table_id uuid DEFAULT NULL, + + out_files_table_id uuid DEFAULT NULL, + + out_path_shares_table_id uuid DEFAULT NULL, + + out_invites_module_id uuid DEFAULT NULL, + + out_namespace_module_id uuid DEFAULT NULL, + + out_namespaces_table_id uuid DEFAULT NULL, + + out_namespace_events_table_id uuid DEFAULT NULL, + + out_function_module_id uuid DEFAULT NULL, + + out_definitions_table_id uuid DEFAULT NULL, + + out_invocations_table_id uuid DEFAULT NULL, + + out_execution_logs_table_id uuid DEFAULT NULL, + + out_secret_definitions_table_id uuid DEFAULT NULL, + + out_graph_module_id uuid DEFAULT NULL, + + out_graphs_table_id uuid DEFAULT NULL, + + out_agent_module_id uuid DEFAULT NULL, + + -- ========================================================================= + -- Constraints + -- ========================================================================= + + CONSTRAINT entity_type_provision_unique_prefix UNIQUE (database_id, prefix), + CONSTRAINT entity_type_provision_db_fkey FOREIGN KEY (database_id) + REFERENCES metaschema_public.database (id) ON DELETE CASCADE +); + +-- ============================================================================= +-- Table-level comment +-- ============================================================================= + +COMMENT ON TABLE metaschema_modules_public.entity_type_provision IS + 'Provisions a new membership entity type. Each INSERT creates an entity table, registers a membership type, + and installs the required modules (permissions, memberships, limits) plus optional modules (profiles, levels, invites). + Uses provision_membership_table() internally. Graceful: duplicate (database_id, prefix) pairs are silently skipped + via the unique constraint (use INSERT ... ON CONFLICT DO NOTHING). + Policy behavior: by default the five entity-table RLS policies are applied (gated by is_visible). + Set table_provision to a single jsonb object (using the same shape as provision_table() / + blueprint tables[] entries) to replace the defaults with your own; set skip_entity_policies=true + as an escape hatch to apply zero policies.'; + +-- ============================================================================= +-- Identity columns +-- ============================================================================= + +COMMENT ON COLUMN metaschema_modules_public.entity_type_provision.id IS + 'Unique identifier for this provision row.'; + +COMMENT ON COLUMN metaschema_modules_public.entity_type_provision.database_id IS + 'The database to provision this entity type in. Required.'; + +COMMENT ON COLUMN metaschema_modules_public.entity_type_provision.name IS + 'Human-readable name for this entity type, e.g. ''Data Room'', ''Team Channel''. Required. + Stored in the entity_types registry table.'; + +COMMENT ON COLUMN metaschema_modules_public.entity_type_provision.prefix IS + 'SQL prefix used for table and module naming, e.g. ''data_room'', ''team_channel''. Required. + Drives entity table name (prefix || ''s'' by default), module labels (permissions_module:prefix), + and membership table names (prefix_memberships, prefix_members, etc.). + Must be unique per database — the (database_id, prefix) constraint ensures graceful ON CONFLICT DO NOTHING.'; + +COMMENT ON COLUMN metaschema_modules_public.entity_type_provision.description IS + 'Description of this entity type. Stored in the entity_types registry table. Defaults to empty string.'; + +-- ============================================================================= +-- Parentage +-- ============================================================================= + +COMMENT ON COLUMN metaschema_modules_public.entity_type_provision.parent_entity IS + 'Prefix of the parent entity type. The trigger resolves this to a membership_type integer + by looking up memberships_module WHERE prefix = parent_entity. + Defaults to ''org'' (the organization-level type). For nested types, set to the parent''s prefix + (e.g. ''data_room'' for a team_channel nested under data_room). + The parent type must already be provisioned before this INSERT.'; + +-- ============================================================================= +-- Entity table name override +-- ============================================================================= + +COMMENT ON COLUMN metaschema_modules_public.entity_type_provision.table_name IS + 'Override the entity table name. When NULL (default), the table name is derived as prefix || ''s'' + (e.g. prefix ''data_room'' produces table ''data_rooms''). + Set this when the pluralization rule doesn''t apply (e.g. prefix ''staff'' should produce ''staff'' not ''staffs'').'; + +-- ============================================================================= +-- Visibility +-- ============================================================================= + +COMMENT ON COLUMN metaschema_modules_public.entity_type_provision.is_visible IS + 'Whether members of the parent entity can see child entities. Defaults to true. + When true: a SELECT policy allows parent members to list child entities (e.g. org members can see all data rooms). + When false: only direct members of the entity itself can see it (private entity mode). + Controls whether the parent_member SELECT policy is created on the entity table. + Only meaningful on the defaults path — ignored (no-op) when table_provision is non-NULL or + skip_entity_policies=true, since no default policies are being applied in those cases.'; + +-- ============================================================================= +-- Optional modules +-- ============================================================================= + +COMMENT ON COLUMN metaschema_modules_public.entity_type_provision.has_limits IS + 'Whether to apply limits_module security for this type. Defaults to false. + The limits_module table structure is always created (memberships_module requires it), + but when false, no RLS policies are applied to the limits tables. + Set to true if this entity type needs configurable resource limits per membership.'; + +COMMENT ON COLUMN metaschema_modules_public.entity_type_provision.has_profiles IS + 'Whether to provision profiles_module for this type. Defaults to false. + Profiles provide named permission roles (e.g. ''Editor'', ''Viewer'') with pre-configured permission bitmasks. + When true, creates profile tables and applies profiles security.'; + +COMMENT ON COLUMN metaschema_modules_public.entity_type_provision.has_levels IS + 'Whether to provision events_module for this type. Defaults to false. + Levels provide gamification/achievement tracking for members. + When true, creates level steps, achievements, and level tables with security.'; + +COMMENT ON COLUMN metaschema_modules_public.entity_type_provision.has_invites IS + 'Whether to provision invites_module for this type. Defaults to false. + When true, the trigger inserts a row into invites_module which in turn + (via insert_invites_module BEFORE INSERT) creates {prefix}_invites and + {prefix}_claimed_invites tables plus the submit_{prefix}_invite_code() function. + Re-provisioning is idempotent: the UNIQUE (database_id, membership_type) constraint + on invites_module combined with ON CONFLICT DO NOTHING in the fan-out makes + repeated INSERTs safe.'; + +COMMENT ON COLUMN metaschema_modules_public.entity_type_provision.has_invite_achievements IS + 'Whether to auto-attach an EventTracker to the claimed_invites table for invite-based + achievements. Defaults to false. Requires has_invites=true AND has_levels=true. + When true, the trigger calls event_tracker() on the claimed_invites table with + event_name=''invite_claimed'', actor_field=''sender_id'', events=[''INSERT''], + crediting the SENDER (inviter) when someone claims their invite code. + Developers can then define achievements in the blueprint achievements[] section + that reference the ''invite_claimed'' event (e.g., "Invite 5 friends" = count: 5).'; + +-- ============================================================================= +-- Escape hatch +-- ============================================================================= + +COMMENT ON COLUMN metaschema_modules_public.entity_type_provision.skip_entity_policies IS + 'Escape hatch: when true, apply zero RLS policies to the entity table. Defaults to false. + Use this only when you want the entity table provisioned with zero policies (e.g. because you + plan to insert secure_table_provision rows yourself later). In most cases, prefer leaving this + false and either accepting the five defaults (table_provision=NULL) or overriding them via + table_provision. + Defaults (applied when table_provision IS NULL and skip_entity_policies=false): + - SELECT (parent_member): parent entity members can see child entities (only when is_visible=true) + - SELECT (self_member): direct members of the entity can see it + - INSERT: create_entity permission on the parent entity + - UPDATE: admin_entity permission on the entity itself + - DELETE: owner of the entity can delete it'; + +COMMENT ON COLUMN metaschema_modules_public.entity_type_provision.table_provision IS + 'Single jsonb object describing the full security setup to apply to the entity table. + Uses the same vocabulary as metaschema_modules_public.provision_table() and blueprint tables[] + entries, so an entity table is configured the same way an ordinary blueprint table is. + Defaults to NULL; when non-NULL, the five default policies are implicitly replaced by + table_provision.policies[] (is_visible becomes a no-op on this path). + Recognized keys (all optional): + - use_rls (boolean, default true) + - nodes (jsonb array of {"$type","data"} Data* module entries) + - fields (jsonb array of field objects: name,type,is_required,default,min,max,regexp,index) + - grants (jsonb array of grant objects; each with roles[] and privileges[]) + - policies (jsonb array of policy objects; each with $type, privileges, data, name, role, permissive) + The trigger forwards all setup (nodes/fields/grants/policies) as a single secure_table_provision row + against the newly created entity table. + Example — override with two SELECT policies: + table_provision := jsonb_build_object( + ''policies'', jsonb_build_array( + jsonb_build_object( + ''$type'', ''AuthzEntityMembership'', + ''privileges'', jsonb_build_array(''select''), + ''data'', jsonb_build_object(''entity_field'', ''id'', ''membership_type'', 3), + ''name'', ''self_member'' + ), + jsonb_build_object( + ''$type'', ''AuthzDirectOwner'', + ''privileges'', jsonb_build_array(''select'', ''update''), + ''data'', jsonb_build_object(''owner_field'', ''owner_id'') + ) + ) + )'; + +-- ============================================================================= +-- Output columns +-- ============================================================================= + +COMMENT ON COLUMN metaschema_modules_public.entity_type_provision.out_membership_type IS + 'Output: the auto-assigned integer membership type ID. Populated by the trigger after successful provisioning. + This is the ID used in entity_types, memberships_module, and all module tables.'; + +COMMENT ON COLUMN metaschema_modules_public.entity_type_provision.out_entity_table_id IS + 'Output: the UUID of the created entity table. Populated by the trigger. + Use this to reference the entity table in subsequent relation_provision or secure_table_provision rows.'; + +COMMENT ON COLUMN metaschema_modules_public.entity_type_provision.out_entity_table_name IS + 'Output: the name of the created entity table (e.g. ''data_rooms''). Populated by the trigger.'; + +COMMENT ON COLUMN metaschema_modules_public.entity_type_provision.out_installed_modules IS + 'Output: array of installed module labels (e.g. ARRAY[''permissions_module:data_room'', ''memberships_module:data_room'', ''invites_module:data_room'']). + Populated by the trigger. Useful for verifying which modules were provisioned.'; + +COMMENT ON COLUMN metaschema_modules_public.entity_type_provision.storage IS + 'Optional JSON array of storage module definitions. Presence triggers provisioning + (same inference model as namespaces, functions, agents). + Each element provisions a separate storage module with its own tables + ({prefix}_{key}_buckets/files), RLS policies, and feature flags. + NULL = do not provision storage. ''[{}]'' = provision one default storage module. + Each array element recognizes (all optional): + - key (text) module discriminator, max 16 chars, lowercase snake_case. + Defaults to ''default'' (omitted from table names). + Non-default keys become infixes: {prefix}_{key}_buckets. + (storage_key accepted for backward compat) + - upload_url_expiry_seconds (integer) presigned PUT URL expiry override + - download_url_expiry_seconds (integer) presigned GET URL expiry override + - default_max_file_size (bigint) global max file size in bytes for this module + - allowed_origins (text[]) default CORS origins for all buckets in this module + - restrict_reads (boolean) require read_files permission for SELECT on files + - has_path_shares (boolean) enable virtual filesystem + path share policies + - has_versioning (boolean) enable file version chains + - has_content_hash (boolean) enable content hash for dedup + - has_custom_keys (boolean) allow client-provided S3 keys + - has_audit_log (boolean) enable file events audit table + - has_confirm_upload (boolean) enable HeadObject confirmation flow + - confirm_upload_delay (interval) delay before first confirmation attempt + - buckets (jsonb[]) array of initial bucket definitions to seed. + Each bucket: { name (required), description, is_public, allowed_mime_types, max_file_size, allowed_origins } + - provisions (jsonb object) per-table customization keyed by "files" or "buckets". + Each value: { nodes, fields, grants, use_rls, policies }. + Example (single module, backward compat): + storage := ''[{"buckets": [{"name": "documents"}]}]''::jsonb + Example (multi-module): + storage := ''[{"has_path_shares": true, "buckets": [{"name": "documents"}]}, {"key": "fn", "has_custom_keys": true, "buckets": [{"name": "functions"}]}]''::jsonb'; + +COMMENT ON COLUMN metaschema_modules_public.entity_type_provision.out_storage_module_id IS + 'Output: the UUID of the storage_module row created for this entity type. Populated by the trigger when storage is non-NULL and non-empty.'; + +COMMENT ON COLUMN metaschema_modules_public.entity_type_provision.out_buckets_table_id IS + 'Output: the UUID of the generated buckets table (e.g. data_room_buckets). Populated by the trigger when storage is non-NULL and non-empty.'; + +COMMENT ON COLUMN metaschema_modules_public.entity_type_provision.out_files_table_id IS + 'Output: the UUID of the generated files table (e.g. data_room_files). Populated by the trigger when storage is non-NULL and non-empty.'; + +COMMENT ON COLUMN metaschema_modules_public.entity_type_provision.out_invites_module_id IS + 'Output: the UUID of the invites_module row created for this entity type. Populated by the trigger when has_invites=true. + NULL when has_invites=false, or when re-provisioning hits ON CONFLICT DO NOTHING + (i.e. the invites_module row was created in a previous run).'; + +COMMENT ON COLUMN metaschema_modules_public.entity_type_provision.namespaces IS + 'Optional JSON array of namespace module definitions. Presence triggers provisioning. + NULL = do not provision namespaces. ''[{}]'' = provision one default namespace module. + Each element recognizes (all optional): + - key (text) module discriminator. Defaults to ''default''. + - policies (jsonb array) RLS policy overrides. NULL = apply defaults from apply_namespace_security(). + Creates {prefix}_namespaces (or {prefix}_{key}_namespaces for non-default keys) + with entity-scoped RLS (AuthzEntityMembership) and a rename proxy trigger. + Registers manage_namespaces permission bit on first provision. + Example: namespaces := ''[{}]''::jsonb'; + +COMMENT ON COLUMN metaschema_modules_public.entity_type_provision.functions IS + 'Optional JSON array of function module definitions. Presence triggers provisioning. + NULL = do not provision functions. ''[{}]'' = provision one default function module. + Each element recognizes (all optional): + - key (text) module discriminator. Defaults to ''default''. + - policies (jsonb array) RLS policy overrides. NULL = apply defaults from apply_function_security(). + Creates {prefix}_function_definitions (or {prefix}_{key}_function_definitions for non-default keys) + with entity-scoped RLS and a job trigger dispatching function:provision tasks. + Registers manage_functions + invoke_functions permission bits on first provision. + Example: functions := ''[{}]''::jsonb'; + +COMMENT ON COLUMN metaschema_modules_public.entity_type_provision.graphs IS + 'Optional JSON array of graph module definitions. Presence triggers provisioning. + NULL = do not provision graphs. ''[{}]'' = provision one default graph module. + Each element recognizes (all optional): + - key (text) module discriminator. Defaults to ''default''. + - policies (jsonb array) RLS policy overrides. NULL = apply defaults from apply_graph_security(). + Registers manage_graphs + execute_graphs permission bits on first provision. + Graph module requires a merkle_store_module_id dependency, so entity_type_provision + only registers permissions here. The graph module itself must be provisioned + separately with the merkle store dependency resolved. + Example: graphs := ''[{}]''::jsonb'; + +COMMENT ON COLUMN metaschema_modules_public.entity_type_provision.out_namespace_module_id IS + 'Output: the UUID of the namespace_module row created (or found) for this entity type. + Populated by the trigger when namespaces is non-NULL. NULL otherwise.'; + +COMMENT ON COLUMN metaschema_modules_public.entity_type_provision.out_namespaces_table_id IS + 'Output: the UUID of the generated namespaces table (e.g. data_room_namespaces). + Populated by the trigger when namespaces is non-NULL. NULL otherwise.'; + +COMMENT ON COLUMN metaschema_modules_public.entity_type_provision.out_namespace_events_table_id IS + 'Output: the UUID of the generated namespace_events partitioned table (e.g. data_room_namespace_events). + Monthly partitioned, 12-month retention. Populated by the trigger when namespaces is non-NULL. NULL otherwise.'; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/events_module/table.sql b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/events_module/table.sql new file mode 100644 index 00000000..d363250c --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/events_module/table.sql @@ -0,0 +1,95 @@ +-- Deploy schemas/metaschema_modules_public/tables/events_module/table to pg + +-- requires: schemas/metaschema_modules_public/schema + +BEGIN; + +CREATE TABLE metaschema_modules_public.events_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + + -- + schema_id uuid NOT NULL DEFAULT uuid_nil(), + private_schema_id uuid NOT NULL DEFAULT uuid_nil(), + -- + + events_table_id uuid NOT NULL DEFAULT uuid_nil(), + events_table_name text NOT NULL DEFAULT '', + + event_aggregates_table_id uuid NOT NULL DEFAULT uuid_nil(), + event_aggregates_table_name text NOT NULL DEFAULT '', + + event_types_table_id uuid NOT NULL DEFAULT uuid_nil(), + event_types_table_name text NOT NULL DEFAULT '', + + levels_table_id uuid NOT NULL DEFAULT uuid_nil(), + levels_table_name text NOT NULL DEFAULT '', + + level_requirements_table_id uuid NOT NULL DEFAULT uuid_nil(), + level_requirements_table_name text NOT NULL DEFAULT '', + + level_grants_table_id uuid NOT NULL DEFAULT uuid_nil(), + level_grants_table_name text NOT NULL DEFAULT '', + + achievement_rewards_table_id uuid NOT NULL DEFAULT uuid_nil(), + achievement_rewards_table_name text NOT NULL DEFAULT '', + + record_event text NOT NULL DEFAULT '', + remove_event text NOT NULL DEFAULT '', + tg_event text NOT NULL DEFAULT '', + tg_event_toggle text NOT NULL DEFAULT '', + tg_event_toggle_bool text NOT NULL DEFAULT '', + tg_event_bool text NOT NULL DEFAULT '', + upsert_aggregate text NOT NULL DEFAULT '', + tg_update_aggregates text NOT NULL DEFAULT '', + prune_events text NOT NULL DEFAULT '', + steps_required text NOT NULL DEFAULT '', + level_achieved text NOT NULL DEFAULT '', + tg_check_achievements text NOT NULL DEFAULT '', + grant_achievement text NOT NULL DEFAULT '', + tg_achievement_reward text NOT NULL DEFAULT '', + + -- Partition lifecycle configuration for events table + "interval" text NOT NULL DEFAULT '1 month', + retention text DEFAULT '12 months', + premake int NOT NULL DEFAULT 2, + + -- Scope: determines the security level for this module instance. + scope text NOT NULL DEFAULT 'app', + + -- Table name prefix. Auto-derived from scope by the trigger when empty. + prefix text NOT NULL DEFAULT '', + + -- Entity table for RLS (NULL for app-level, entity table for entity-scoped) + entity_table_id uuid NULL, + + -- required tables + actor_table_id uuid NOT NULL DEFAULT uuid_nil(), + + + -- Default permissions: permission names auto-granted to new members. + -- NULL uses the module's built-in defaults; explicit array overrides them. + default_permissions text[] DEFAULT NULL, + + -- API routing (configurable per-module) + api_name text DEFAULT 'usage', + private_api_name text DEFAULT NULL, + + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT schema_fkey FOREIGN KEY (schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + CONSTRAINT private_schema_fkey FOREIGN KEY (private_schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + + CONSTRAINT events_table_fkey FOREIGN KEY (events_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT event_aggregates_table_fkey FOREIGN KEY (event_aggregates_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT event_types_table_fkey FOREIGN KEY (event_types_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT levels_table_fkey FOREIGN KEY (levels_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT level_requirements_table_fkey FOREIGN KEY (level_requirements_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT level_grants_table_fkey FOREIGN KEY (level_grants_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT achievement_rewards_table_fkey FOREIGN KEY (achievement_rewards_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT entity_table_fkey FOREIGN KEY (entity_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT actor_table_fkey FOREIGN KEY (actor_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE +); + +CREATE INDEX events_module_database_id_idx ON metaschema_modules_public.events_module ( database_id ); + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/function_module/table.sql b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/function_module/table.sql new file mode 100644 index 00000000..841d5345 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/function_module/table.sql @@ -0,0 +1,79 @@ +-- Deploy schemas/metaschema_modules_public/tables/function_module/table to pg + +-- requires: schemas/metaschema_modules_public/schema + +BEGIN; + +CREATE TABLE metaschema_modules_public.function_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + + -- Schema references (if uuid_nil, resolved from schema name or default) + schema_id uuid NOT NULL DEFAULT uuid_nil(), + private_schema_id uuid NOT NULL DEFAULT uuid_nil(), + + -- Optional schema name overrides (used when schema IDs are not provided) + public_schema_name text, + private_schema_name text, + + -- Generated table IDs (populated by the generator) + definitions_table_id uuid NOT NULL DEFAULT uuid_nil(), + invocations_table_id uuid NOT NULL DEFAULT uuid_nil(), + execution_logs_table_id uuid NOT NULL DEFAULT uuid_nil(), + secret_definitions_table_id uuid NOT NULL DEFAULT uuid_nil(), + + -- Table names (input to the generator — bare names without scope prefix). + -- The trigger prepends the scope prefix automatically. + definitions_table_name text NOT NULL DEFAULT 'function_definitions', + invocations_table_name text NOT NULL DEFAULT 'function_invocations', + execution_logs_table_name text NOT NULL DEFAULT 'function_execution_logs', + secret_definitions_table_name text NOT NULL DEFAULT 'secret_definitions', + + -- API routing (get-or-create: if set, schema is added to this API; if NULL, no API is added) + api_name text, + private_api_name text, + + -- Scope: determines the security level for this module instance. + -- Resolved to a membership_type integer at trigger time via membership_types table. + scope text NOT NULL DEFAULT 'app', + + -- Table name prefix. Auto-derived from scope by the trigger when empty. + -- Override to create multiple module instances at the same scope. + prefix text NOT NULL DEFAULT '', + + -- Entity table for RLS (NULL for app-level functions, entity table for entity-scoped functions) + entity_table_id uuid NULL, + + -- Configurable security policies (NULL = use defaults based on scope). + -- When provided, replaces the default policy set in apply_function_security. + -- Accepts a JSON array of policy objects: + -- {"$type": "AuthzEntityMembership", "privileges": ["select", "update"], "data": {...}} + policies jsonb NULL, + + -- Per-table provisions overrides from blueprint config. + -- Keys are table keys (definitions, invocations, execution_logs, secret_definitions). + -- When a key is present, the module trigger skips default security for that table; + -- secure_table_provision applies the custom grants/policies instead. + provisions jsonb NULL, + + -- Default permissions: permission names auto-granted to new members. + -- NULL uses the module's built-in defaults; explicit array overrides them. + default_permissions text[] DEFAULT NULL, + + -- Constraints + CONSTRAINT function_module_db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT function_module_schema_fkey FOREIGN KEY (schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + CONSTRAINT function_module_private_schema_fkey FOREIGN KEY (private_schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + CONSTRAINT function_module_definitions_table_fkey FOREIGN KEY (definitions_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT function_module_invocations_table_fkey FOREIGN KEY (invocations_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT function_module_execution_logs_table_fkey FOREIGN KEY (execution_logs_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT function_module_secret_defs_table_fkey FOREIGN KEY (secret_definitions_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT function_module_entity_table_fkey FOREIGN KEY (entity_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE +); + +CREATE INDEX function_module_database_id_idx ON metaschema_modules_public.function_module ( database_id ); + +-- Unique constraint: one function module per database per scope per prefix. +CREATE UNIQUE INDEX function_module_unique_scope ON metaschema_modules_public.function_module ( database_id, scope, prefix ); + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/graph_module/table.sql b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/graph_module/table.sql new file mode 100644 index 00000000..1eaf0750 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/graph_module/table.sql @@ -0,0 +1,75 @@ +-- Deploy schemas/metaschema_modules_public/tables/graph_module/table to pg + +-- requires: schemas/metaschema_modules_public/schema +-- requires: schemas/metaschema_modules_public/tables/merkle_store_module/table + +BEGIN; + +CREATE TABLE metaschema_modules_public.graph_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + + -- Schema references (if uuid_nil, resolved from schema name or default) + public_schema_id uuid NOT NULL DEFAULT uuid_nil(), + private_schema_id uuid NOT NULL DEFAULT uuid_nil(), + + -- Optional schema name overrides (used when schema IDs are not provided) + public_schema_name text, + private_schema_name text, + + -- Scope: determines the security level for this module instance. + scope text NOT NULL DEFAULT 'app', + + -- Table name prefix. Auto-derived from scope by the trigger when empty. + prefix text NOT NULL DEFAULT '', + + -- Reference to the Merkle store this graph module depends on + merkle_store_module_id uuid NOT NULL, + + -- Generated table IDs (populated by BEFORE INSERT trigger) + graphs_table_id uuid NOT NULL DEFAULT uuid_nil(), + executions_table_id uuid NOT NULL DEFAULT uuid_nil(), + outputs_table_id uuid NOT NULL DEFAULT uuid_nil(), + + -- API routing (get-or-create: if set, schema is added to this API; if NULL, no API is added) + api_name text, + private_api_name text, + + -- Entity table for RLS (NULL for app-level, entity table for entity-scoped) + entity_table_id uuid NULL, + + -- Configurable security policies (NULL = use defaults). + -- Accepts a JSON array of policy objects: + -- {"$type": "AuthzEntityMembership", "privileges": ["select", "update"], "data": {...}} + policies jsonb NULL, + + -- Per-table provisions overrides from blueprint config. + -- Keys are table keys (graphs, executions, outputs). + -- When a key is present, the module trigger skips default security for that table; + -- secure_table_provision applies the custom grants/policies instead. + provisions jsonb NULL, + + -- Default permissions: permission names auto-granted to new members. + -- NULL uses the module's built-in defaults; explicit array overrides them. + default_permissions text[] DEFAULT NULL, + + -- Timestamps + created_at timestamptz NOT NULL DEFAULT now(), + + -- Constraints + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT public_schema_fkey FOREIGN KEY (public_schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + CONSTRAINT private_schema_fkey FOREIGN KEY (private_schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + CONSTRAINT merkle_store_fkey FOREIGN KEY (merkle_store_module_id) REFERENCES metaschema_modules_public.merkle_store_module (id) ON DELETE CASCADE, + CONSTRAINT graphs_table_fkey FOREIGN KEY (graphs_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT executions_table_fkey FOREIGN KEY (executions_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT outputs_table_fkey FOREIGN KEY (outputs_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT graph_module_entity_table_fkey FOREIGN KEY (entity_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + + -- Only one graph module per database + merkle store combination + CONSTRAINT graph_module_database_merkle_unique UNIQUE (database_id, merkle_store_module_id) +); + +CREATE INDEX graph_module_database_id_idx ON metaschema_modules_public.graph_module ( database_id ); + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/hierarchy_module/table.sql b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/hierarchy_module/table.sql new file mode 100644 index 00000000..d85ad586 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/hierarchy_module/table.sql @@ -0,0 +1,68 @@ +-- Deploy schemas/metaschema_modules_public/tables/hierarchy_module/table to pg + +-- requires: schemas/metaschema_modules_public/schema + +BEGIN; + +CREATE TABLE metaschema_modules_public.hierarchy_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + + -- Schema references + schema_id uuid NOT NULL DEFAULT uuid_nil(), + private_schema_id uuid NOT NULL DEFAULT uuid_nil(), + + -- Table references for created tables + chart_edges_table_id uuid NOT NULL DEFAULT uuid_nil(), + chart_edges_table_name text NOT NULL DEFAULT '', + + hierarchy_sprt_table_id uuid NOT NULL DEFAULT uuid_nil(), + hierarchy_sprt_table_name text NOT NULL DEFAULT '', + + chart_edge_grants_table_id uuid NOT NULL DEFAULT uuid_nil(), + chart_edge_grants_table_name text NOT NULL DEFAULT '', + + -- Required external table references + entity_table_id uuid NOT NULL, -- Organizations table (entity-scoped) + users_table_id uuid NOT NULL, -- Users table + + -- Scope: determines the security level for this module instance. + scope text NOT NULL DEFAULT 'org', + + -- Table name prefix. Auto-derived from scope by the trigger when empty. + prefix text NOT NULL DEFAULT '', + + -- Resolved names for RLS parser lookups + private_schema_name text NOT NULL DEFAULT '', + sprt_table_name text NOT NULL DEFAULT '', + + -- Function names for helper functions + rebuild_hierarchy_function text NOT NULL DEFAULT '', + get_subordinates_function text NOT NULL DEFAULT '', + get_managers_function text NOT NULL DEFAULT '', + is_manager_of_function text NOT NULL DEFAULT '', + + -- Default permissions: permission names auto-granted to new members. + -- NULL uses the module's built-in defaults; explicit array overrides them. + default_permissions text[] DEFAULT NULL, + + -- Timestamps + created_at timestamptz NOT NULL DEFAULT now(), + + -- Constraints + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT schema_fkey FOREIGN KEY (schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + CONSTRAINT private_schema_fkey FOREIGN KEY (private_schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + CONSTRAINT chart_edges_table_fkey FOREIGN KEY (chart_edges_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT hierarchy_sprt_table_fkey FOREIGN KEY (hierarchy_sprt_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT chart_edge_grants_table_fkey FOREIGN KEY (chart_edge_grants_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT entity_table_fkey FOREIGN KEY (entity_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT users_table_fkey FOREIGN KEY (users_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + + -- Only one hierarchy module per database + CONSTRAINT hierarchy_module_database_unique UNIQUE (database_id) +); + +CREATE INDEX hierarchy_module_database_id_idx ON metaschema_modules_public.hierarchy_module ( database_id ); + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/i18n_module/table.sql b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/i18n_module/table.sql new file mode 100644 index 00000000..df567812 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/i18n_module/table.sql @@ -0,0 +1,31 @@ +-- Deploy schemas/metaschema_modules_public/tables/i18n_module/table to pg + +-- requires: schemas/metaschema_modules_public/schema + +BEGIN; + +CREATE TABLE metaschema_modules_public.i18n_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + + -- Schema references (populated by the insert trigger) + schema_id uuid NOT NULL DEFAULT uuid_nil(), + private_schema_id uuid NOT NULL DEFAULT uuid_nil(), + + -- Settings table (populated by the generator) + settings_table_id uuid NOT NULL DEFAULT uuid_nil(), + + -- API routing (configurable per-module) + api_name text DEFAULT NULL, + private_api_name text DEFAULT NULL, + + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT schema_fkey FOREIGN KEY (schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + CONSTRAINT private_schema_fkey FOREIGN KEY (private_schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + CONSTRAINT settings_table_fkey FOREIGN KEY (settings_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE +); + +CREATE INDEX i18n_module_database_id_idx ON metaschema_modules_public.i18n_module ( database_id ); +CREATE UNIQUE INDEX i18n_module_unique_per_db ON metaschema_modules_public.i18n_module ( database_id ); + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/identity_providers_module/table.sql b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/identity_providers_module/table.sql new file mode 100644 index 00000000..ae017f4d --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/identity_providers_module/table.sql @@ -0,0 +1,65 @@ +-- Deploy schemas/metaschema_modules_public/tables/identity_providers_module/table to pg + +-- requires: schemas/metaschema_modules_public/schema + +BEGIN; + +CREATE TABLE metaschema_modules_public.identity_providers_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + + schema_id uuid NOT NULL DEFAULT uuid_nil(), + private_schema_id uuid NOT NULL DEFAULT uuid_nil(), + + table_id uuid NOT NULL DEFAULT uuid_nil(), + + table_name text NOT NULL DEFAULT 'identity_providers', + + -- API routing (configurable per-module) + api_name text DEFAULT 'auth', + private_api_name text DEFAULT NULL, + + -- Entity-aware scope: determines which config_secrets_module table + -- the rotate_identity_provider_{prefix}_secret proc targets. + -- 'app' = app_secrets (AuthzAppMembership, admin-only) + -- 'org' = org_secrets (AuthzEntityMembership, per-org) + -- Future entity types are also supported via the membership_types table. + scope text NOT NULL DEFAULT 'app', + + -- Table name prefix for the generated rotate proc. + -- Auto-derived from scope by the trigger when empty. + -- e.g. scope='app' → prefix='app' → rotate_identity_provider_app_secret + prefix text NOT NULL DEFAULT '', + + -- Entity table for RLS (NULL for app-level, entity table for entity-scoped) + entity_table_id uuid NULL, + + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT table_fkey FOREIGN KEY (table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT schema_fkey FOREIGN KEY (schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + CONSTRAINT private_schema_fkey FOREIGN KEY (private_schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + CONSTRAINT entity_table_fkey FOREIGN KEY (entity_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE +); + +CREATE INDEX identity_providers_module_database_id_idx ON metaschema_modules_public.identity_providers_module ( database_id ); +CREATE INDEX identity_providers_module_schema_id_idx ON metaschema_modules_public.identity_providers_module ( schema_id ); +CREATE INDEX identity_providers_module_private_schema_id_idx ON metaschema_modules_public.identity_providers_module ( private_schema_id ); +CREATE INDEX identity_providers_module_table_id_idx ON metaschema_modules_public.identity_providers_module ( table_id ); + +-- One install per database per scope +CREATE UNIQUE INDEX identity_providers_module_unique_scope ON metaschema_modules_public.identity_providers_module ( database_id, scope ); + +COMMENT ON TABLE metaschema_modules_public.identity_providers_module IS + 'Entity-aware config row for the identity_providers_module, which provisions a per-database + identity_providers table holding OAuth2 / OIDC (and future SAML) provider definitions. + The scope column determines which config_secrets_module table the rotate proc targets + (app_secrets for app scope, org_secrets for org scope). When scope = platform, + the secrets table gets a database_id column and platform-level RLS via + AuthzRelatedEntityMembership through database.owner_id. + Scoping matrix: + scope=app → per-database flat, in-app admin manages + scope=platform → per-database, platform admin manages (generate:constructive) + scope=org → per-org tenant, org admin manages'; +COMMENT ON COLUMN metaschema_modules_public.identity_providers_module.private_schema_id IS 'Private schema that hosts SECURITY DEFINER admin helpers which write to identity_providers (create / update / enable / disable / rotate-secret / delete) and the per-app quota check.'; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/inference_log_module/table.sql b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/inference_log_module/table.sql new file mode 100644 index 00000000..8c94221b --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/inference_log_module/table.sql @@ -0,0 +1,49 @@ +-- Deploy schemas/metaschema_modules_public/tables/inference_log_module/table to pg + +-- requires: schemas/metaschema_modules_public/schema + +BEGIN; + +CREATE TABLE metaschema_modules_public.inference_log_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + + schema_id uuid NOT NULL DEFAULT uuid_nil(), + private_schema_id uuid NOT NULL DEFAULT uuid_nil(), + + -- Inference log table (partitioned by created_at) + inference_log_table_id uuid NOT NULL DEFAULT uuid_nil(), + inference_log_table_name text NOT NULL DEFAULT '', + + -- Pre-aggregated daily rollup table + usage_daily_table_id uuid NOT NULL DEFAULT uuid_nil(), + usage_daily_table_name text NOT NULL DEFAULT '', + + -- Partition lifecycle configuration + "interval" text NOT NULL DEFAULT '1 month', + retention text NOT NULL DEFAULT '12 months', + premake int NOT NULL DEFAULT 2, + + -- Scope configuration: 'app' = per-app usage (actor_id RLS) + scope text NOT NULL DEFAULT 'app', + actor_fk_table_id uuid NULL, + entity_fk_table_id uuid NULL, + + -- Table name prefix. Auto-derived from scope by the trigger when empty. + prefix text NOT NULL DEFAULT '', + + -- API routing (configurable per-module) + api_name text DEFAULT 'usage', + private_api_name text DEFAULT NULL, + + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT schema_fkey FOREIGN KEY (schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + CONSTRAINT private_schema_fkey FOREIGN KEY (private_schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + CONSTRAINT inference_log_table_fkey FOREIGN KEY (inference_log_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT usage_daily_table_fkey FOREIGN KEY (usage_daily_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT inference_log_module_database_id_prefix_unique UNIQUE NULLS NOT DISTINCT (database_id, prefix) +); + +CREATE INDEX inference_log_module_database_id_idx ON metaschema_modules_public.inference_log_module ( database_id ); + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/invites_module/table.sql b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/invites_module/table.sql new file mode 100644 index 00000000..8a1a1297 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/invites_module/table.sql @@ -0,0 +1,54 @@ +-- Deploy schemas/metaschema_modules_public/tables/invites_module/table to pg + +-- requires: schemas/metaschema_modules_public/schema + +BEGIN; + +CREATE TABLE metaschema_modules_public.invites_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + + schema_id uuid NOT NULL DEFAULT uuid_nil(), + private_schema_id uuid NOT NULL DEFAULT uuid_nil(), + + emails_table_id uuid NOT NULL DEFAULT uuid_nil(), + users_table_id uuid NOT NULL DEFAULT uuid_nil(), + + invites_table_id uuid NOT NULL DEFAULT uuid_nil(), + claimed_invites_table_id uuid NOT NULL DEFAULT uuid_nil(), + + invites_table_name text NOT NULL DEFAULT '', + claimed_invites_table_name text NOT NULL DEFAULT '', + submit_invite_code_function text NOT NULL DEFAULT '', + + -- Scope: determines the security level for this module instance. + scope text NOT NULL DEFAULT 'app', + + -- Table name prefix. Auto-derived from scope by the trigger when empty. + prefix text NOT NULL DEFAULT '', + + -- Entity table for RLS (NULL for app-level, entity table for entity-scoped) + entity_table_id uuid NULL, + + -- API routing (configurable per-module) + api_name text DEFAULT 'admin', + private_api_name text DEFAULT NULL, + + -- + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT invites_table_fkey FOREIGN KEY (invites_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT emails_table_fkey FOREIGN KEY (emails_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT users_table_fkey FOREIGN KEY (users_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT entity_table_fkey FOREIGN KEY (entity_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT claimed_invites_table_fkey FOREIGN KEY (claimed_invites_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT schema_fkey FOREIGN KEY (schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + CONSTRAINT pschema_fkey FOREIGN KEY (private_schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE +); + +CREATE INDEX invites_module_database_id_idx ON metaschema_modules_public.invites_module ( database_id ); + +-- Unique constraint: one invites module per database per scope per prefix. +CREATE UNIQUE INDEX invites_module_unique_scope + ON metaschema_modules_public.invites_module (database_id, scope, prefix); + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/limits_module/table.sql b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/limits_module/table.sql new file mode 100644 index 00000000..bde28379 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/limits_module/table.sql @@ -0,0 +1,102 @@ +-- Deploy schemas/metaschema_modules_public/tables/limits_module/table to pg + +-- requires: schemas/metaschema_modules_public/schema + +BEGIN; + +CREATE TABLE metaschema_modules_public.limits_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + -- + schema_id uuid NOT NULL DEFAULT uuid_nil(), + private_schema_id uuid NOT NULL DEFAULT uuid_nil(), + --- + table_id uuid NOT NULL DEFAULT uuid_nil(), + table_name text NOT NULL DEFAULT '', + + default_table_id uuid NOT NULL DEFAULT uuid_nil(), + default_table_name text NOT NULL DEFAULT '', + -- + + limit_increment_function text NOT NULL DEFAULT '', + limit_decrement_function text NOT NULL DEFAULT '', + limit_increment_trigger text NOT NULL DEFAULT '', + limit_decrement_trigger text NOT NULL DEFAULT '', + limit_update_trigger text NOT NULL DEFAULT '', + limit_check_function text NOT NULL DEFAULT '', + + -- Credit grants ledger table + limit_credits_table_id uuid NULL, + + -- Events audit trail table + events_table_id uuid NULL, + + -- Credit codes table (app-level only, database-wide) + credit_codes_table_id uuid NULL, + + -- Credit code items table (app-level only, database-wide) + credit_code_items_table_id uuid NULL, + + -- Credit redemptions table (app-level only, database-wide) + credit_redemptions_table_id uuid NULL, + + -- Aggregate entity limits (org-level caps, no actor_id) + aggregate_table_id uuid NULL, + + -- Cap tables (static config limits, no metering) + limit_caps_table_id uuid NULL, + limit_caps_defaults_table_id uuid NULL, + + -- Cap check trigger function (gates inserts behind cap/feature flag values) + cap_check_trigger text NOT NULL DEFAULT '', + + -- Resolve cap function (COALESCE lookup: per-entity → default → 0) + resolve_cap_function text NOT NULL DEFAULT '', + + -- Warning tables for soft-limit notifications + limit_warnings_table_id uuid NULL, + limit_warning_state_table_id uuid NULL, + + -- Soft limit check functions + limit_check_soft_function text NOT NULL DEFAULT '', + limit_aggregate_check_soft_function text NOT NULL DEFAULT '', + + -- Scope: determines the security level for this module instance. + scope text NOT NULL DEFAULT 'app', + + -- Table name prefix. Auto-derived from scope by the trigger when empty. + prefix text NOT NULL DEFAULT '', + + -- Entity table for RLS (NULL for app-level, entity table for entity-scoped) + entity_table_id uuid NULL, + + -- required tables + actor_table_id uuid NOT NULL DEFAULT uuid_nil(), + + -- API routing (configurable per-module) + api_name text DEFAULT 'usage', + private_api_name text DEFAULT NULL, + + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT schema_fkey FOREIGN KEY (schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + CONSTRAINT private_schema_fkey FOREIGN KEY (private_schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + CONSTRAINT table_fkey FOREIGN KEY (table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT default_table_fkey FOREIGN KEY (default_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT entity_table_fkey FOREIGN KEY (entity_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT actor_table_fkey FOREIGN KEY (actor_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT aggregate_table_fkey FOREIGN KEY (aggregate_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT limit_credits_table_fkey FOREIGN KEY (limit_credits_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT events_table_fkey FOREIGN KEY (events_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT credit_codes_table_fkey FOREIGN KEY (credit_codes_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT credit_code_items_table_fkey FOREIGN KEY (credit_code_items_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT credit_redemptions_table_fkey FOREIGN KEY (credit_redemptions_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT limit_caps_table_fkey FOREIGN KEY (limit_caps_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT limit_caps_defaults_table_fkey FOREIGN KEY (limit_caps_defaults_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT limit_warnings_table_fkey FOREIGN KEY (limit_warnings_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT limit_warning_state_table_fkey FOREIGN KEY (limit_warning_state_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE + +); + +CREATE INDEX limits_module_database_id_idx ON metaschema_modules_public.limits_module ( database_id ); + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/membership_types_module/table.sql b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/membership_types_module/table.sql new file mode 100644 index 00000000..dc5c8a6f --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/membership_types_module/table.sql @@ -0,0 +1,25 @@ +-- Deploy schemas/metaschema_modules_public/tables/membership_types_module/table to pg + +-- requires: schemas/metaschema_modules_public/schema + +BEGIN; + +CREATE TABLE metaschema_modules_public.membership_types_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + -- + schema_id uuid NOT NULL DEFAULT uuid_nil(), + + table_id uuid NOT NULL DEFAULT uuid_nil(), + table_name text NOT NULL DEFAULT 'membership_types', + + -- + + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT schema_fkey FOREIGN KEY (schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + CONSTRAINT table_fkey FOREIGN KEY (table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE +); + +CREATE INDEX membership_types_module_database_id_idx ON metaschema_modules_public.membership_types_module ( database_id ); + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/memberships_module/table.sql b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/memberships_module/table.sql new file mode 100644 index 00000000..fa07cdfb --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/memberships_module/table.sql @@ -0,0 +1,98 @@ +-- Deploy schemas/metaschema_modules_public/tables/memberships_module/table to pg + +-- requires: schemas/metaschema_modules_public/schema + +BEGIN; + +CREATE TABLE metaschema_modules_public.memberships_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + -- + schema_id uuid NOT NULL DEFAULT uuid_nil(), + private_schema_id uuid NOT NULL DEFAULT uuid_nil(), + + memberships_table_id uuid NOT NULL DEFAULT uuid_nil(), + memberships_table_name text NOT NULL DEFAULT '', + + members_table_id uuid NOT NULL DEFAULT uuid_nil(), + members_table_name text NOT NULL DEFAULT '', + + membership_defaults_table_id uuid NOT NULL DEFAULT uuid_nil(), + membership_defaults_table_name text NOT NULL DEFAULT '', + + -- Nullable: only created when entity_table_id IS NOT NULL (entity-scoped membership types) + membership_settings_table_id uuid NULL, + membership_settings_table_name text NOT NULL DEFAULT '', + + grants_table_id uuid NOT NULL DEFAULT uuid_nil(), + grants_table_name text NOT NULL DEFAULT '', + + -- required tables + actor_table_id uuid NOT NULL DEFAULT uuid_nil(), + limits_table_id uuid NOT NULL DEFAULT uuid_nil(), + default_limits_table_id uuid NOT NULL DEFAULT uuid_nil(), + permissions_table_id uuid NOT NULL DEFAULT uuid_nil(), + default_permissions_table_id uuid NOT NULL DEFAULT uuid_nil(), + sprt_table_id uuid NOT NULL DEFAULT uuid_nil(), + + admin_grants_table_id uuid NOT NULL DEFAULT uuid_nil(), + admin_grants_table_name text NOT NULL DEFAULT '', + + owner_grants_table_id uuid NOT NULL DEFAULT uuid_nil(), + owner_grants_table_name text NOT NULL DEFAULT '', + + -- Scope: determines the security level for this module instance. + scope text NOT NULL DEFAULT 'app', + + -- Table name prefix. Auto-derived from scope by the trigger when empty. + prefix text NOT NULL DEFAULT '', + + -- Entity table for RLS (NULL for app-level, entity table for entity-scoped) + entity_table_id uuid NULL, + entity_table_owner_id uuid NULL, + + -- Populated by memberships_module generator when get_organization_id is created + get_org_fn text NULL, + + -- + + actor_mask_check text NOT NULL DEFAULT '', + actor_perm_check text NOT NULL DEFAULT '', + entity_ids_by_mask text NULL, + entity_ids_by_perm text NULL, + entity_ids_function text NULL, + + member_profiles_table_id uuid NULL, + + -- + + -- API routing (configurable per-module) + api_name text DEFAULT 'admin', + private_api_name text DEFAULT NULL, + + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT schema_fkey FOREIGN KEY (schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + CONSTRAINT private_schema_fkey FOREIGN KEY (private_schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + + CONSTRAINT memberships_table_fkey FOREIGN KEY (memberships_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT membership_defaults_table_fkey FOREIGN KEY (membership_defaults_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT membership_settings_table_fkey FOREIGN KEY (membership_settings_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT members_table_fkey FOREIGN KEY (members_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT grants_table_fkey FOREIGN KEY (grants_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT sprt_table_fkey FOREIGN KEY (sprt_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + + CONSTRAINT entity_table_fkey FOREIGN KEY (entity_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT entity_table_owner_fkey FOREIGN KEY (entity_table_owner_id) REFERENCES metaschema_public.field (id) ON DELETE CASCADE, + CONSTRAINT actor_table_fkey FOREIGN KEY (actor_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT limits_table_fkey FOREIGN KEY (limits_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT default_limits_table_fkey FOREIGN KEY (default_limits_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + + CONSTRAINT permissions_table_fkey FOREIGN KEY (permissions_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT default_permissions_table_fkey FOREIGN KEY (default_permissions_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + + CONSTRAINT memberships_module_unique UNIQUE (database_id, scope, prefix) +); + +CREATE INDEX memberships_module_database_id_idx ON metaschema_modules_public.memberships_module ( database_id ); + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/merkle_store_module/table.sql b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/merkle_store_module/table.sql new file mode 100644 index 00000000..744c5f66 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/merkle_store_module/table.sql @@ -0,0 +1,56 @@ +-- Deploy schemas/metaschema_modules_public/tables/merkle_store_module/table to pg + +-- requires: schemas/metaschema_modules_public/schema + +BEGIN; + +CREATE TABLE metaschema_modules_public.merkle_store_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + + -- Schema references (if uuid_nil, resolved from schema name or default) + schema_id uuid NOT NULL DEFAULT uuid_nil(), + private_schema_id uuid NOT NULL DEFAULT uuid_nil(), + + -- Optional schema name overrides (used when schema IDs are not provided) + public_schema_name text, + private_schema_name text, + + -- Generated table IDs (populated by BEFORE INSERT trigger) + object_table_id uuid NOT NULL DEFAULT uuid_nil(), + store_table_id uuid NOT NULL DEFAULT uuid_nil(), + commit_table_id uuid NOT NULL DEFAULT uuid_nil(), + ref_table_id uuid NOT NULL DEFAULT uuid_nil(), + + -- Table/function prefix (e.g., 'graph' -> graph_object, graph_store, ...) + -- Stored normalized (no trailing underscore); underscore added at generation time + prefix text NOT NULL DEFAULT '', + + -- API routing (get-or-create: if set, schema is added to this API; if NULL, no API is added) + api_name text, + private_api_name text, + + -- Scope: 'app' for app-level, 'platform' for database-scoped with + -- RLS through metaschema_public.database ownership. + scope text NOT NULL DEFAULT 'app', + + -- Timestamps + created_at timestamptz NOT NULL DEFAULT now(), + + -- Constraints + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT schema_fkey FOREIGN KEY (schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + CONSTRAINT private_schema_fkey FOREIGN KEY (private_schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + CONSTRAINT object_table_fkey FOREIGN KEY (object_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT store_table_fkey FOREIGN KEY (store_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT commit_table_fkey FOREIGN KEY (commit_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT ref_table_fkey FOREIGN KEY (ref_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + + -- Only one merkle store module per database + prefix combination + CONSTRAINT merkle_store_module_database_prefix_unique UNIQUE (database_id, prefix) +); + +CREATE INDEX merkle_store_module_database_id_idx ON metaschema_modules_public.merkle_store_module ( database_id ); +CREATE INDEX merkle_store_module_private_schema_id_idx ON metaschema_modules_public.merkle_store_module ( private_schema_id ); + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/namespace_module/table.sql b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/namespace_module/table.sql new file mode 100644 index 00000000..2015322a --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/namespace_module/table.sql @@ -0,0 +1,72 @@ +-- Deploy schemas/metaschema_modules_public/tables/namespace_module/table to pg + +-- requires: schemas/metaschema_modules_public/schema + +BEGIN; + +CREATE TABLE metaschema_modules_public.namespace_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + + -- Schema references (if uuid_nil, resolved from schema name or default) + schema_id uuid NOT NULL DEFAULT uuid_nil(), + private_schema_id uuid NOT NULL DEFAULT uuid_nil(), + + -- Optional schema name overrides (used when schema IDs are not provided) + public_schema_name text, + private_schema_name text, + + -- Generated table IDs (populated by the generator) + namespaces_table_id uuid NOT NULL DEFAULT uuid_nil(), + namespace_events_table_id uuid NOT NULL DEFAULT uuid_nil(), + + -- Table names (input to the generator) + namespaces_table_name text NOT NULL DEFAULT 'namespaces', + namespace_events_table_name text NOT NULL DEFAULT 'namespace_events', + + -- API routing (get-or-create: if set, schema is added to this API; if NULL, no API is added) + api_name text, + private_api_name text, + + -- Scope: determines the security level for this module instance. + -- Resolved to a membership_type integer at trigger time via membership_types table. + scope text NOT NULL DEFAULT 'app', + + -- Table name prefix. Auto-derived from scope by the trigger when empty. + -- Override to create multiple module instances at the same scope. + prefix text NOT NULL DEFAULT '', + + -- Entity table for RLS (NULL for app-level namespaces, entity table for entity-scoped namespaces) + entity_table_id uuid NULL, + + -- Configurable security policies (NULL = use defaults based on scope). + -- When provided, replaces the default policy set in apply_namespace_security. + -- Accepts a JSON array of policy objects: + -- {"$type": "AuthzEntityMembership", "privileges": ["select", "update"], "data": {...}} + policies jsonb NULL, + + -- Per-table provisions overrides from blueprint config. + -- Keys are table keys (namespaces, namespace_events). + -- When a key is present, the module trigger skips default security for that table; + -- secure_table_provision applies the custom grants/policies instead. + provisions jsonb NULL, + + -- Default permissions: permission names auto-granted to new members. + -- NULL uses the module's built-in defaults; explicit array overrides them. + default_permissions text[] DEFAULT NULL, + + -- Constraints + CONSTRAINT namespace_module_db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT namespace_module_schema_fkey FOREIGN KEY (schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + CONSTRAINT namespace_module_private_schema_fkey FOREIGN KEY (private_schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + CONSTRAINT namespace_module_namespaces_table_fkey FOREIGN KEY (namespaces_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT namespace_module_events_table_fkey FOREIGN KEY (namespace_events_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT namespace_module_entity_table_fkey FOREIGN KEY (entity_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE +); + +CREATE INDEX namespace_module_database_id_idx ON metaschema_modules_public.namespace_module ( database_id ); + +-- Unique constraint: one namespace module per database per scope per prefix. +CREATE UNIQUE INDEX namespace_module_unique_scope ON metaschema_modules_public.namespace_module ( database_id, scope, prefix ); + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/notifications_module/table.sql b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/notifications_module/table.sql new file mode 100644 index 00000000..0acd075b --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/notifications_module/table.sql @@ -0,0 +1,74 @@ +-- Deploy schemas/metaschema_modules_public/tables/notifications_module/table to pg + +-- requires: schemas/metaschema_modules_public/schema + +BEGIN; + +CREATE TABLE metaschema_modules_public.notifications_module ( + id uuid PRIMARY KEY DEFAULT uuid_generate_v4 (), + database_id uuid NOT NULL, + + schema_id uuid NOT NULL DEFAULT uuid_nil(), + private_schema_id uuid NOT NULL DEFAULT uuid_nil(), + + notifications_table_id uuid NOT NULL DEFAULT uuid_nil(), + read_state_table_id uuid NOT NULL DEFAULT uuid_nil(), + -- Feature-gated tables: NULL when the corresponding has_* flag is off. + -- The generator returns NULL for tables it skipped; the insert trigger + -- forwards that through unchanged. + preferences_table_id uuid, + channels_table_id uuid, + delivery_log_table_id uuid, + + owner_table_id uuid NOT NULL DEFAULT uuid_nil(), + + -- Optional: table_template_module rows to extend with notifs_* columns. + -- Resolved at install time; NULL disables the corresponding extension. + user_settings_table_id uuid, + organization_settings_table_id uuid, + + -- Sub-feature toggles. Resolved at module-generation time so the generated + -- schema has zero dead code. Validated by the BEFORE INSERT trigger; see + -- insert_notifications_module for dependency rules. + has_channels boolean NOT NULL DEFAULT true, + has_preferences boolean NOT NULL DEFAULT true, + has_settings_extension boolean NOT NULL DEFAULT false, + has_digest_metadata boolean NOT NULL DEFAULT false, + has_subscriptions boolean NOT NULL DEFAULT false, + + -- Default permissions: permission names auto-granted to new members. + -- NULL uses the module's built-in defaults; explicit array overrides them. + default_permissions text[] DEFAULT NULL, + + -- API routing (configurable per-module) + api_name text DEFAULT 'notifications', + private_api_name text DEFAULT NULL, + + -- + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT notifications_table_fkey FOREIGN KEY (notifications_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT read_state_table_fkey FOREIGN KEY (read_state_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT preferences_table_fkey FOREIGN KEY (preferences_table_id) REFERENCES metaschema_public.table (id) ON DELETE SET NULL, + CONSTRAINT channels_table_fkey FOREIGN KEY (channels_table_id) REFERENCES metaschema_public.table (id) ON DELETE SET NULL, + CONSTRAINT delivery_log_table_fkey FOREIGN KEY (delivery_log_table_id) REFERENCES metaschema_public.table (id) ON DELETE SET NULL, + CONSTRAINT owner_table_fkey FOREIGN KEY (owner_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT user_settings_table_fkey FOREIGN KEY (user_settings_table_id) REFERENCES metaschema_public.table (id) ON DELETE SET NULL, + CONSTRAINT organization_settings_table_fkey FOREIGN KEY (organization_settings_table_id) REFERENCES metaschema_public.table (id) ON DELETE SET NULL, + CONSTRAINT schema_fkey FOREIGN KEY (schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + CONSTRAINT private_schema_fkey FOREIGN KEY (private_schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE +); + +COMMENT ON CONSTRAINT schema_fkey ON metaschema_modules_public.notifications_module IS E'@omit manyToMany'; +COMMENT ON CONSTRAINT private_schema_fkey ON metaschema_modules_public.notifications_module IS E'@omit manyToMany'; +COMMENT ON CONSTRAINT notifications_table_fkey ON metaschema_modules_public.notifications_module IS E'@fieldName notificationsTableByNotificationsTableId\n@omit manyToMany'; +COMMENT ON CONSTRAINT read_state_table_fkey ON metaschema_modules_public.notifications_module IS E'@fieldName readStateTableByReadStateTableId\n@omit manyToMany'; +COMMENT ON CONSTRAINT preferences_table_fkey ON metaschema_modules_public.notifications_module IS E'@fieldName preferencesTableByPreferencesTableId\n@omit manyToMany'; +COMMENT ON CONSTRAINT channels_table_fkey ON metaschema_modules_public.notifications_module IS E'@fieldName channelsTableByChannelsTableId\n@omit manyToMany'; +COMMENT ON CONSTRAINT delivery_log_table_fkey ON metaschema_modules_public.notifications_module IS E'@fieldName deliveryLogTableByDeliveryLogTableId\n@omit manyToMany'; +COMMENT ON CONSTRAINT owner_table_fkey ON metaschema_modules_public.notifications_module IS E'@omit manyToMany'; +COMMENT ON CONSTRAINT user_settings_table_fkey ON metaschema_modules_public.notifications_module IS E'@fieldName userSettingsTableByUserSettingsTableId\n@omit manyToMany'; +COMMENT ON CONSTRAINT organization_settings_table_fkey ON metaschema_modules_public.notifications_module IS E'@fieldName organizationSettingsTableByOrganizationSettingsTableId\n@omit manyToMany'; +COMMENT ON CONSTRAINT db_fkey ON metaschema_modules_public.notifications_module IS E'@omit manyToMany'; +CREATE INDEX notifications_module_database_id_idx ON metaschema_modules_public.notifications_module ( database_id ); + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/permissions_module/table.sql b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/permissions_module/table.sql new file mode 100644 index 00000000..9017fe42 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/permissions_module/table.sql @@ -0,0 +1,82 @@ +-- Deploy schemas/metaschema_modules_public/tables/permissions_module/table to pg + +-- requires: schemas/metaschema_modules_public/schema + +BEGIN; + +CREATE TABLE metaschema_modules_public.permissions_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + -- + schema_id uuid NOT NULL DEFAULT uuid_nil(), + private_schema_id uuid NOT NULL DEFAULT uuid_nil(), + table_id uuid NOT NULL DEFAULT uuid_nil(), + table_name text NOT NULL DEFAULT '', + -- + + -- + default_table_id uuid NOT NULL DEFAULT uuid_nil(), + default_table_name text NOT NULL DEFAULT '', + -- + + -- Default bit-width of the permission mask for this module. + -- + -- Chosen to maximize permission headroom without costing extra storage or + -- compute. PostgreSQL lays out heap tuples to MAXALIGN (8 bytes on x86_64), + -- so the row-size bucket that holds bit(24) already extends up to bit(64): + -- + -- bitlen | row bytes | heap (1M rows) | btree idx (1M rows) + -- -------+-----------+----------------+-------------------- + -- 24 | 67 | 74 MB | 47 MB + -- 48 | 70 | 74 MB | 47 MB + -- 64 | 72 | 74 MB | 47 MB <-- same bucket + -- 65 | 73 | 81 MB | 47 MB <-- next bucket + -- + -- Bitwise AND/OR on bit(<=64) fits in a single 64-bit machine word, so + -- permission checks at 64 cost the same as at 24. Raising the default from + -- 24 to 64 gives new modules 6.4x more permission slots before anyone has + -- to think about running update_bitlen_permissions, at identical storage + -- and compute cost. Do not raise past 64 casually -- bit(65+) jumps to the + -- next 8-byte tuple bucket (+~10% heap) and pays on every write. + -- + -- Existing databases are unaffected; this only changes the default for + -- newly inserted permissions_module rows. + bitlen int NOT NULL DEFAULT 64, + + -- Scope: determines the security level for this module instance. + scope text NOT NULL DEFAULT 'app', + + -- Table name prefix. Auto-derived from scope by the trigger when empty. + prefix text NOT NULL DEFAULT '', + + -- Entity table for RLS (NULL for app-level, entity table for entity-scoped) + entity_table_id uuid NULL, + + -- required tables + actor_table_id uuid NOT NULL DEFAULT uuid_nil(), + + -- + + get_padded_mask text NOT NULL DEFAULT '', + get_mask text NOT NULL DEFAULT '', + get_by_mask text NOT NULL DEFAULT '', + get_mask_by_name text NOT NULL DEFAULT '', + + -- + + -- API routing (configurable per-module) + api_name text DEFAULT 'admin', + private_api_name text DEFAULT NULL, + + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT schema_fkey FOREIGN KEY (schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + CONSTRAINT private_schema_fkey FOREIGN KEY (private_schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + CONSTRAINT table_fkey FOREIGN KEY (table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT default_table_fkey FOREIGN KEY (default_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT entity_table_fkey FOREIGN KEY (entity_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT actor_table_fkey FOREIGN KEY (actor_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE +); + +CREATE INDEX permissions_module_database_id_idx ON metaschema_modules_public.permissions_module ( database_id ); + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/phone_numbers_module/table.sql b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/phone_numbers_module/table.sql new file mode 100644 index 00000000..35db3eb8 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/phone_numbers_module/table.sql @@ -0,0 +1,33 @@ +-- Deploy schemas/metaschema_modules_public/tables/phone_numbers_module/table to pg + +-- requires: schemas/metaschema_modules_public/schema + +BEGIN; + +CREATE TABLE metaschema_modules_public.phone_numbers_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + + schema_id uuid NOT NULL DEFAULT uuid_nil(), + private_schema_id uuid NOT NULL DEFAULT uuid_nil(), + + table_id uuid NOT NULL DEFAULT uuid_nil(), + owner_table_id uuid NOT NULL DEFAULT uuid_nil(), + + table_name text NOT NULL, + + -- API routing (configurable per-module) + api_name text DEFAULT 'auth', + private_api_name text DEFAULT NULL, + + -- + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT table_fkey FOREIGN KEY (table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT owner_table_fkey FOREIGN KEY (owner_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT schema_fkey FOREIGN KEY (schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + CONSTRAINT private_schema_fkey FOREIGN KEY (private_schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE +); + +CREATE INDEX phone_numbers_module_database_id_idx ON metaschema_modules_public.phone_numbers_module ( database_id ); + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/plans_module/table.sql b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/plans_module/table.sql new file mode 100644 index 00000000..3f51ff9a --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/plans_module/table.sql @@ -0,0 +1,62 @@ +-- Deploy schemas/metaschema_modules_public/tables/plans_module/table to pg + +-- requires: schemas/metaschema_modules_public/schema + +BEGIN; + +CREATE TABLE metaschema_modules_public.plans_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + + schema_id uuid NOT NULL DEFAULT uuid_nil(), + private_schema_id uuid NOT NULL DEFAULT uuid_nil(), + + -- Plans table: defines plan tiers (Free, Pro, Enterprise) + plans_table_id uuid NOT NULL DEFAULT uuid_nil(), + plans_table_name text NOT NULL DEFAULT '', + + -- Plan limits table: maps plan → limit name → max value + plan_limits_table_id uuid NOT NULL DEFAULT uuid_nil(), + plan_limits_table_name text NOT NULL DEFAULT '', + + -- Plan pricing table: billing cycles, prices, discounts per plan + plan_pricing_table_id uuid NULL, + + -- Plan overrides table: per-entity custom limit overrides + plan_overrides_table_id uuid NULL, + + -- Plan meter limits table: maps plan → meter slug → billing quota + plan_meter_limits_table_id uuid NULL, + + -- Plan caps table: maps plan → cap name → cap value (feature flags) + plan_caps_table_id uuid NULL, + + -- Generated apply_plan functions (one per limits scope) + apply_plan_function text NOT NULL DEFAULT '', + apply_plan_aggregate_function text NOT NULL DEFAULT '', + + -- Generated apply functions for billing and caps (set when respective modules are installed) + apply_billing_plan_function text NULL, + apply_plan_caps_function text NULL, + + prefix text NULL, + + -- API routing (configurable per-module) + api_name text DEFAULT 'usage', + private_api_name text DEFAULT NULL, + + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT schema_fkey FOREIGN KEY (schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + CONSTRAINT private_schema_fkey FOREIGN KEY (private_schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + CONSTRAINT plans_table_fkey FOREIGN KEY (plans_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT plan_limits_table_fkey FOREIGN KEY (plan_limits_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT plan_pricing_table_fkey FOREIGN KEY (plan_pricing_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT plan_overrides_table_fkey FOREIGN KEY (plan_overrides_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT plan_meter_limits_table_fkey FOREIGN KEY (plan_meter_limits_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT plan_caps_table_fkey FOREIGN KEY (plan_caps_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT plans_module_database_id_unique UNIQUE (database_id) +); + +CREATE INDEX plans_module_database_id_idx ON metaschema_modules_public.plans_module ( database_id ); + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/profiles_module/table.sql b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/profiles_module/table.sql new file mode 100644 index 00000000..13728055 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/profiles_module/table.sql @@ -0,0 +1,71 @@ +-- Deploy schemas/metaschema_modules_public/tables/profiles_module/table to pg + +-- requires: schemas/metaschema_modules_public/schema + +BEGIN; + +CREATE TABLE metaschema_modules_public.profiles_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + -- + schema_id uuid NOT NULL DEFAULT uuid_nil(), + private_schema_id uuid NOT NULL DEFAULT uuid_nil(), + + -- Main profiles table + table_id uuid NOT NULL DEFAULT uuid_nil(), + table_name text NOT NULL DEFAULT '', + + -- Profile permissions join table (for UI) + profile_permissions_table_id uuid NOT NULL DEFAULT uuid_nil(), + profile_permissions_table_name text NOT NULL DEFAULT '', + + -- Profile grants audit table + profile_grants_table_id uuid NOT NULL DEFAULT uuid_nil(), + profile_grants_table_name text NOT NULL DEFAULT '', + + -- Profile definition grants audit table + profile_definition_grants_table_id uuid NOT NULL DEFAULT uuid_nil(), + profile_definition_grants_table_name text NOT NULL DEFAULT '', + + -- Profile templates table (for seeding profiles into new entities) + profile_templates_table_id uuid NOT NULL DEFAULT uuid_nil(), + profile_templates_table_name text NOT NULL DEFAULT '', + + -- Scope: determines the security level for this module instance. + scope text NOT NULL DEFAULT 'app', + + -- Table name prefix. Auto-derived from scope by the trigger when empty. + prefix text NOT NULL DEFAULT '', + + -- Entity table for org/group scoped profiles (NULL for app-level) + entity_table_id uuid NULL, + + -- Required tables + actor_table_id uuid NOT NULL DEFAULT uuid_nil(), + permissions_table_id uuid NOT NULL DEFAULT uuid_nil(), + memberships_table_id uuid NOT NULL DEFAULT uuid_nil(), + + -- API routing (configurable per-module) + api_name text DEFAULT 'admin', + private_api_name text DEFAULT NULL, + + -- + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT schema_fkey FOREIGN KEY (schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + CONSTRAINT private_schema_fkey FOREIGN KEY (private_schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + CONSTRAINT table_fkey FOREIGN KEY (table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT profile_permissions_table_fkey FOREIGN KEY (profile_permissions_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT profile_grants_table_fkey FOREIGN KEY (profile_grants_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT profile_definition_grants_table_fkey FOREIGN KEY (profile_definition_grants_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT profile_templates_table_fkey FOREIGN KEY (profile_templates_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT entity_table_fkey FOREIGN KEY (entity_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT actor_table_fkey FOREIGN KEY (actor_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT permissions_table_fkey FOREIGN KEY (permissions_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT memberships_table_fkey FOREIGN KEY (memberships_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + + CONSTRAINT profiles_module_unique UNIQUE (database_id, scope, prefix) +); + +CREATE INDEX profiles_module_database_id_idx ON metaschema_modules_public.profiles_module ( database_id ); + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/rate_limit_meters_module/table.sql b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/rate_limit_meters_module/table.sql new file mode 100644 index 00000000..984e7f47 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/rate_limit_meters_module/table.sql @@ -0,0 +1,59 @@ +-- Deploy schemas/metaschema_modules_public/tables/rate_limit_meters_module/table to pg + +-- requires: schemas/metaschema_modules_public/schema + +BEGIN; + +CREATE TABLE metaschema_modules_public.rate_limit_meters_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + + -- Public schema: rate_limit_overrides table (admin-manageable via GraphQL API) + schema_id uuid NOT NULL DEFAULT uuid_nil(), + -- Private schema: rate_limit_state table, check_rate_limit function (internal) + private_schema_id uuid NOT NULL DEFAULT uuid_nil(), + + -- State table: sliding window tracking per entity/actor/meter/window (private) + rate_limit_state_table_id uuid NOT NULL DEFAULT uuid_nil(), + rate_limit_state_table_name text NOT NULL DEFAULT '', + + -- Overrides table: per-entity and per-actor rate limit overrides (public) + rate_limit_overrides_table_id uuid NULL, + rate_limit_overrides_table_name text NOT NULL DEFAULT '', + + -- Rate window limits table: per-plan rate limit configuration (public) + rate_window_limits_table_id uuid NULL, + rate_window_limits_table_name text NOT NULL DEFAULT '', + + -- Generated check function (private) + check_rate_limit_function text NOT NULL DEFAULT '', + + prefix text NULL, + + -- Default permissions: permission names auto-granted to new members. + -- NULL uses the module's built-in defaults; explicit array overrides them. + default_permissions text[] DEFAULT NULL, + + -- API routing (configurable per-module) + api_name text DEFAULT 'usage', + private_api_name text DEFAULT NULL, + + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT schema_fkey FOREIGN KEY (schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + CONSTRAINT private_schema_fkey FOREIGN KEY (private_schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + CONSTRAINT rate_limit_state_table_fkey FOREIGN KEY (rate_limit_state_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT rate_limit_overrides_table_fkey FOREIGN KEY (rate_limit_overrides_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT rate_window_limits_table_fkey FOREIGN KEY (rate_window_limits_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT rate_limit_meters_module_database_id_unique UNIQUE (database_id) +); + +CREATE INDEX rate_limit_meters_module_database_id_idx ON metaschema_modules_public.rate_limit_meters_module ( database_id ); + +COMMENT ON CONSTRAINT rate_limit_state_table_fkey + ON metaschema_modules_public.rate_limit_meters_module IS E'@fieldName rateLimitStateTableByRateLimitStateTableId'; +COMMENT ON CONSTRAINT rate_limit_overrides_table_fkey + ON metaschema_modules_public.rate_limit_meters_module IS E'@fieldName rateLimitOverridesTableByRateLimitOverridesTableId'; +COMMENT ON CONSTRAINT rate_window_limits_table_fkey + ON metaschema_modules_public.rate_limit_meters_module IS E'@fieldName rateWindowLimitsTableByRateWindowLimitsTableId'; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/rate_limits_module/table.sql b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/rate_limits_module/table.sql new file mode 100644 index 00000000..b53e8927 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/rate_limits_module/table.sql @@ -0,0 +1,41 @@ +-- Deploy schemas/metaschema_modules_public/tables/rate_limits_module/table to pg + +-- requires: schemas/metaschema_modules_public/schema + +BEGIN; + +CREATE TABLE metaschema_modules_public.rate_limits_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + + -- + schema_id uuid NOT NULL DEFAULT uuid_nil(), + rate_limit_settings_table_id uuid NOT NULL DEFAULT uuid_nil(), + ip_rate_limits_table_id uuid NOT NULL DEFAULT uuid_nil(), + rate_limits_table_id uuid NOT NULL DEFAULT uuid_nil(), + + rate_limit_settings_table text NOT NULL DEFAULT 'app_settings_rate_limit', + ip_rate_limits_table text NOT NULL DEFAULT 'auth_ip_rate_limits', + rate_limits_table text NOT NULL DEFAULT 'auth_rate_limits', + -- + + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT schema_fkey FOREIGN KEY (schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + CONSTRAINT rate_limit_settings_table_fkey FOREIGN KEY (rate_limit_settings_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT ip_rate_limits_table_fkey FOREIGN KEY (ip_rate_limits_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT rate_limits_table_fkey FOREIGN KEY (rate_limits_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + + -- + CONSTRAINT rate_limits_module_database_id_uniq UNIQUE(database_id) +); + +CREATE INDEX rate_limits_module_database_id_idx ON metaschema_modules_public.rate_limits_module ( database_id ); + +COMMENT ON CONSTRAINT rate_limit_settings_table_fkey + ON metaschema_modules_public.rate_limits_module IS E'@fieldName rateLimitSettingsTableByRateLimitSettingsTableId'; +COMMENT ON CONSTRAINT ip_rate_limits_table_fkey + ON metaschema_modules_public.rate_limits_module IS E'@fieldName ipRateLimitsTableByIpRateLimitsTableId'; +COMMENT ON CONSTRAINT rate_limits_table_fkey + ON metaschema_modules_public.rate_limits_module IS E'@fieldName rateLimitsTableByRateLimitsTableId'; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/realtime_module/table.sql b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/realtime_module/table.sql new file mode 100644 index 00000000..41973324 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/realtime_module/table.sql @@ -0,0 +1,52 @@ +-- Deploy schemas/metaschema_modules_public/tables/realtime_module/table to pg + +-- requires: schemas/metaschema_modules_public/schema + +BEGIN; + +CREATE TABLE metaschema_modules_public.realtime_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + + -- Schema references (populated by the insert trigger) + schema_id uuid NOT NULL DEFAULT uuid_nil(), + private_schema_id uuid NOT NULL DEFAULT uuid_nil(), + subscriptions_schema_id uuid NOT NULL DEFAULT uuid_nil(), + + -- Generated table IDs (populated by the generator) + change_log_table_id uuid NOT NULL DEFAULT uuid_nil(), + listener_node_table_id uuid NOT NULL DEFAULT uuid_nil(), + source_registry_table_id uuid NOT NULL DEFAULT uuid_nil(), + + -- Partition lifecycle configuration for change_log + retention_hours integer NOT NULL DEFAULT 168, + premake int NOT NULL DEFAULT 7, + "interval" text NOT NULL DEFAULT '1 day', + + -- NOTIFY hybrid wake-up channel name (NULL = use default) + notify_channel text NULL, + + -- Constraints + -- API routing (configurable per-module) + api_name text DEFAULT 'realtime', + private_api_name text DEFAULT NULL, + + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT schema_fkey FOREIGN KEY (schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + CONSTRAINT private_schema_fkey FOREIGN KEY (private_schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + CONSTRAINT subscriptions_schema_fkey FOREIGN KEY (subscriptions_schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + CONSTRAINT change_log_table_fkey FOREIGN KEY (change_log_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT listener_node_table_fkey FOREIGN KEY (listener_node_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT source_registry_table_fkey FOREIGN KEY (source_registry_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE +); + +CREATE INDEX realtime_module_database_id_idx ON metaschema_modules_public.realtime_module ( database_id ); +CREATE UNIQUE INDEX realtime_module_unique_per_db ON metaschema_modules_public.realtime_module ( database_id ); +CREATE INDEX realtime_module_schema_id_idx ON metaschema_modules_public.realtime_module ( schema_id ); +CREATE INDEX realtime_module_private_schema_id_idx ON metaschema_modules_public.realtime_module ( private_schema_id ); +CREATE INDEX realtime_module_subscriptions_schema_id_idx ON metaschema_modules_public.realtime_module ( subscriptions_schema_id ); +CREATE INDEX realtime_module_change_log_table_id_idx ON metaschema_modules_public.realtime_module ( change_log_table_id ); +CREATE INDEX realtime_module_listener_node_table_id_idx ON metaschema_modules_public.realtime_module ( listener_node_table_id ); +CREATE INDEX realtime_module_source_registry_table_id_idx ON metaschema_modules_public.realtime_module ( source_registry_table_id ); + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/relation_provision/table.sql b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/relation_provision/table.sql new file mode 100644 index 00000000..9ce83634 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/relation_provision/table.sql @@ -0,0 +1,279 @@ +-- Deploy schemas/metaschema_modules_public/tables/relation_provision/table to pg + +-- requires: schemas/metaschema_modules_public/schema + +BEGIN; + +CREATE TABLE metaschema_modules_public.relation_provision ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + + database_id uuid NOT NULL, + + -- ========================================================================= + -- Relation type and tables + -- ========================================================================= + + relation_type text NOT NULL CHECK (relation_type IN ( + 'RelationBelongsTo', 'RelationHasOne', 'RelationHasMany', 'RelationManyToMany' + )), + + source_table_id uuid NOT NULL, + + target_table_id uuid NOT NULL, + + -- ========================================================================= + -- BelongsTo / HasOne / HasMany: FK field config + -- ========================================================================= + + field_name text DEFAULT NULL, + + delete_action text DEFAULT NULL, + + is_required boolean NOT NULL DEFAULT true, + + api_required boolean NOT NULL DEFAULT false, + + -- ========================================================================= + -- ManyToMany: junction table identity + -- ========================================================================= + + junction_table_id uuid NOT NULL DEFAULT uuid_nil(), + + junction_table_name text DEFAULT NULL, + + junction_schema_id uuid DEFAULT NULL, + + source_field_name text DEFAULT NULL, + + target_field_name text DEFAULT NULL, + + -- ========================================================================= + -- ManyToMany: junction table primary key strategy + -- ========================================================================= + + use_composite_key boolean NOT NULL DEFAULT false, + + -- ========================================================================= + -- Index creation on FK fields + -- ========================================================================= + + create_index boolean NOT NULL DEFAULT true, + + -- ========================================================================= + -- ManyToMany: API visibility (PostGraphile v5 @behavior +manyToMany) + -- ========================================================================= + + expose_in_api boolean NOT NULL DEFAULT true, + + -- ========================================================================= + -- ManyToMany: field creation (forwarded to provision_table) + -- ========================================================================= + + nodes jsonb NOT NULL DEFAULT '[]', + + -- ========================================================================= + -- ManyToMany: grants (forwarded to provision_table) + -- ========================================================================= + + grants jsonb NOT NULL DEFAULT '[]', + + -- ========================================================================= + -- ManyToMany: RLS policies (forwarded to secure_table_provision) + -- ========================================================================= + + policies jsonb NOT NULL DEFAULT '[]', + + -- ========================================================================= + -- Output columns (populated by the trigger, not set by callers) + -- ========================================================================= + + out_field_id uuid DEFAULT NULL, + + out_junction_table_id uuid DEFAULT NULL, + + out_source_field_id uuid DEFAULT NULL, + + out_target_field_id uuid DEFAULT NULL, + + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT source_table_fkey FOREIGN KEY (source_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT target_table_fkey FOREIGN KEY (target_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE +); + +-- ============================================================================= +-- Table-level comment +-- ============================================================================= + +COMMENT ON TABLE metaschema_modules_public.relation_provision IS + 'Provisions relational structure between tables. Supports four relation types: + - RelationBelongsTo: adds a FK field on the source table referencing the target table (child perspective: "tasks belongs to projects" -> tasks.project_id). + - RelationHasMany: adds a FK field on the target table referencing the source table (parent perspective: "projects has many tasks" -> tasks.project_id). Inverse of BelongsTo. + - RelationHasOne: adds a FK field with a unique constraint on the source table referencing the target table. Also supports shared-primary-key patterns where the FK field IS the primary key (set field_name to the existing PK field name). + - RelationManyToMany: creates a junction table with FK fields to both source and target tables, delegating table creation and security to secure_table_provision. + This is a one-and-done structural provisioner. To layer additional security onto junction tables after creation, use secure_table_provision directly. + All operations are graceful: existing fields, FK constraints, and unique constraints are reused if found. + The trigger never injects values the caller did not provide. All security config is forwarded to secure_table_provision as-is.'; + +-- ============================================================================= +-- Relation type and tables +-- ============================================================================= + +COMMENT ON COLUMN metaschema_modules_public.relation_provision.id IS + 'Unique identifier for this relation provision row.'; + +COMMENT ON COLUMN metaschema_modules_public.relation_provision.database_id IS + 'The database this relation belongs to. Required. Must match the database of both source_table_id and target_table_id.'; + +COMMENT ON COLUMN metaschema_modules_public.relation_provision.relation_type IS + 'The type of relation to create. Uses SuperCase naming: + - RelationBelongsTo: creates a FK field on source_table referencing target_table (e.g., tasks belongs to projects -> tasks.project_id). Field name auto-derived from target table. + - RelationHasMany: creates a FK field on target_table referencing source_table (e.g., projects has many tasks -> tasks.project_id). Field name auto-derived from source table. Inverse of BelongsTo — same FK, different perspective. + - RelationHasOne: creates a FK field + unique constraint on source_table referencing target_table (e.g., user_settings has one user -> user_settings.user_id with UNIQUE). Also supports shared-primary-key patterns (e.g., user_profiles.id = users.id) by setting field_name to the existing PK field. + - RelationManyToMany: creates a junction table with FK fields to both tables (e.g., projects and tags -> project_tags table). + Each relation type uses a different subset of columns on this table. Required.'; + +COMMENT ON COLUMN metaschema_modules_public.relation_provision.source_table_id IS + 'The source table in the relation. Required. + - RelationBelongsTo: the table that receives the FK field (e.g., tasks in "tasks belongs to projects"). + - RelationHasMany: the parent table being referenced (e.g., projects in "projects has many tasks"). The FK field is created on the target table. + - RelationHasOne: the table that receives the FK field + unique constraint (e.g., user_settings in "user_settings has one user"). + - RelationManyToMany: one of the two tables being joined (e.g., projects in "projects and tags"). The junction table will have a FK field referencing this table.'; + +COMMENT ON COLUMN metaschema_modules_public.relation_provision.target_table_id IS + 'The target table in the relation. Required. + - RelationBelongsTo: the table being referenced by the FK (e.g., projects in "tasks belongs to projects"). + - RelationHasMany: the table that receives the FK field (e.g., tasks in "projects has many tasks"). + - RelationHasOne: the table being referenced by the FK (e.g., users in "user_settings has one user"). + - RelationManyToMany: the other table being joined (e.g., tags in "projects and tags"). The junction table will have a FK field referencing this table.'; + +-- ============================================================================= +-- BelongsTo / HasOne / HasMany: FK field config +-- ============================================================================= + +COMMENT ON COLUMN metaschema_modules_public.relation_provision.field_name IS + 'FK field name for RelationBelongsTo, RelationHasOne, and RelationHasMany. + - RelationBelongsTo/RelationHasOne: if NULL, auto-derived from the target table name (e.g., target "projects" derives "project_id"). + - RelationHasMany: if NULL, auto-derived from the source table name (e.g., source "projects" derives "project_id"). + For RelationHasOne shared-primary-key patterns, set field_name to the existing PK field (e.g., "id") so the FK reuses it. + Ignored for RelationManyToMany — use source_field_name/target_field_name instead.'; + +COMMENT ON COLUMN metaschema_modules_public.relation_provision.delete_action IS + 'FK delete action for RelationBelongsTo, RelationHasOne, and RelationHasMany. One of: c (CASCADE), r (RESTRICT), n (SET NULL), d (SET DEFAULT), a (NO ACTION). Required — the trigger raises an error if not provided. The caller must explicitly choose the cascade behavior; there is no default. Ignored for RelationManyToMany (junction FK fields always use CASCADE).'; + +COMMENT ON COLUMN metaschema_modules_public.relation_provision.is_required IS + 'Whether the FK field is NOT NULL. Defaults to true. + - RelationBelongsTo: set to false for optional associations (e.g., tasks.assignee_id that can be NULL). + - RelationHasMany: set to false if the child can exist without a parent. + - RelationHasOne: typically true. + Ignored for RelationManyToMany (junction FK fields are always required).'; + +COMMENT ON COLUMN metaschema_modules_public.relation_provision.api_required IS + 'Whether the FK field should be required at the API level even though it is nullable at the database level. Defaults to false. + When true and is_required is false, the field is created as nullable (allowing SET NULL cascade) but a @requiredInput smart tag is added so PostGraphile treats it as non-null in create/update input types. + When is_required is true, api_required is ignored (the field is already required at both levels). + Ignored for RelationManyToMany (junction FK fields are always required).'; + +-- ============================================================================= +-- ManyToMany: junction table identity +-- ============================================================================= + +COMMENT ON COLUMN metaschema_modules_public.relation_provision.junction_table_id IS + 'For RelationManyToMany: an existing junction table to use. Defaults to uuid_nil(). + - When uuid_nil(): the trigger creates a new junction table via secure_table_provision using junction_table_name. + - When set to a valid table UUID: the trigger skips table creation and only adds FK fields, composite key (if use_composite_key is true), and security to the existing table. + Ignored for RelationBelongsTo/RelationHasOne.'; + +COMMENT ON COLUMN metaschema_modules_public.relation_provision.junction_table_name IS + 'For RelationManyToMany: name of the junction table to create or look up. If NULL, auto-derived from source and target table names using inflection_db (e.g., "projects" + "tags" derives "project_tags"). Only used when junction_table_id is uuid_nil(). Ignored for RelationBelongsTo/RelationHasOne.'; + +COMMENT ON COLUMN metaschema_modules_public.relation_provision.junction_schema_id IS + 'For RelationManyToMany: schema for the junction table. If NULL, defaults to the source table''s schema. Ignored for RelationBelongsTo/RelationHasOne.'; + +COMMENT ON COLUMN metaschema_modules_public.relation_provision.source_field_name IS + 'For RelationManyToMany: FK field name on the junction table referencing the source table. If NULL, auto-derived from the source table name using inflection_db.get_foreign_key_field_name() (e.g., source table "projects" derives "project_id"). Ignored for RelationBelongsTo/RelationHasOne.'; + +COMMENT ON COLUMN metaschema_modules_public.relation_provision.target_field_name IS + 'For RelationManyToMany: FK field name on the junction table referencing the target table. If NULL, auto-derived from the target table name using inflection_db.get_foreign_key_field_name() (e.g., target table "tags" derives "tag_id"). Ignored for RelationBelongsTo/RelationHasOne.'; + +-- ============================================================================= +-- ManyToMany: junction table primary key strategy +-- ============================================================================= + +COMMENT ON COLUMN metaschema_modules_public.relation_provision.use_composite_key IS + 'For RelationManyToMany: whether to create a composite primary key from the two FK fields (source + target) on the junction table. Defaults to false. + - When true: the trigger calls metaschema.pk() with ARRAY[source_field_id, target_field_id] to create a composite PK. No separate id column is created. This enforces uniqueness of the pair and is suitable for simple junction tables. + - When false: no primary key is created by the trigger. The caller should provide node_type=''DataId'' to create a UUID primary key, or handle the PK strategy via a separate secure_table_provision row. + use_composite_key and node_type=''DataId'' are mutually exclusive — using both would create two conflicting PKs. + Ignored for RelationBelongsTo/RelationHasOne.'; + +COMMENT ON COLUMN metaschema_modules_public.relation_provision.create_index IS + 'Whether to create a btree index on FK fields created by this relation. Defaults to true. + PostgreSQL does not automatically index foreign key columns (only the referenced PK side is indexed). + Without indexes on FK columns, JOINs, CASCADE deletes, and RLS policy lookups perform sequential scans. + - RelationBelongsTo: creates an index on the FK field on the source table. + - RelationHasMany: creates an index on the FK field on the target table. + - RelationHasOne: skipped — the unique constraint already creates an implicit index. + - RelationManyToMany: creates indexes on both FK fields on the junction table. + Set to false only for very small tables or write-heavy tables where index maintenance cost outweighs read performance.'; + +-- ============================================================================= +-- ManyToMany: API visibility +-- ============================================================================= + +COMMENT ON COLUMN metaschema_modules_public.relation_provision.expose_in_api IS + 'For RelationManyToMany: whether to expose the M:N shortcut fields in the GraphQL API. Defaults to true. + When true, sets @behavior +manyToMany on the junction table smart_tags so PostGraphile generates + clean M:N connection fields (e.g., event.contacts instead of event.contactEventsByEventId). + When false (or toggled off via UPDATE), the behavior tag is removed and the M:N fields disappear from GraphQL. + Toggling is supported: UPDATE expose_in_api to true/false and the smart tag is added/removed automatically. + Ignored for RelationBelongsTo/RelationHasOne/RelationHasMany.'; + +-- ============================================================================= +-- ManyToMany: field creation (forwarded to secure_table_provision) +-- ============================================================================= + +COMMENT ON COLUMN metaschema_modules_public.relation_provision.nodes IS + 'For RelationManyToMany: array of node objects to apply to the junction table. Each element is a jsonb object with a required "$type" key and an optional "data" key. Forwarded to provision_table as-is. The trigger does not interpret or validate this value. + Examples: [{"$type": "DataId"}, {"$type": "DataTimestamps"}, {"$type": "DataDirectOwner", "data": {"owner_field_name": "author_id"}}]. + Defaults to ''[]'' (no node processing beyond the FK fields and composite key if use_composite_key is true). + Ignored for RelationBelongsTo/RelationHasOne/RelationHasMany.'; + +-- ============================================================================= +-- ManyToMany: grants (forwarded to secure_table_provision) +-- ============================================================================= + +COMMENT ON COLUMN metaschema_modules_public.relation_provision.grants IS + 'For RelationManyToMany: array of grant objects for the junction table. Forwarded to provision_table as-is. Each element is a jsonb object with keys: "roles" (text[], required), "privileges" (jsonb[], required — array of [privilege, columns] tuples). Example: [{"roles":["authenticated"],"privileges":[["select","*"],["insert","*"],["delete","*"]]}]. Defaults to ''[]'' (no grants). Ignored for RelationBelongsTo/RelationHasOne.'; + +-- ============================================================================= +-- ManyToMany: RLS policies (forwarded to secure_table_provision) +-- ============================================================================= + +COMMENT ON COLUMN metaschema_modules_public.relation_provision.policies IS + 'For RelationManyToMany: array of policy objects for the junction table. Forwarded to provision_table as-is. Each element is a jsonb object with keys: "$type" (text, required — the Authz* policy generator type), "data" (jsonb, optional — opaque config), "privileges" (text[], optional — e.g. ["select","insert"]; if omitted, derived from grants[] privilege verbs), "policy_role" (text, optional — falls back to first role in first grants[] entry, or ''authenticated''), "permissive" (boolean, optional, defaults to true), "policy_name" (text, optional). Supports multiple policies per row. + Example: [{"$type": "AuthzEntityMembership", "data": {"entity_field": "entity_id", "membership_type": 2}, "privileges": ["select", "insert", "delete"]}]. + Defaults to ''[]'' (no policies — the junction table will have RLS enabled but no policies unless added separately). + Ignored for RelationBelongsTo/RelationHasOne/RelationHasMany.'; + +-- ============================================================================= +-- Output columns +-- ============================================================================= + +COMMENT ON COLUMN metaschema_modules_public.relation_provision.out_field_id IS + 'Output column for RelationBelongsTo/RelationHasOne/RelationHasMany: the UUID of the FK field created (or found). For BelongsTo/HasOne this is on the source table; for HasMany this is on the target table. Populated by the trigger. NULL for RelationManyToMany. Callers should not set this directly.'; + +COMMENT ON COLUMN metaschema_modules_public.relation_provision.out_junction_table_id IS + 'Output column for RelationManyToMany: the UUID of the junction table created (or found). Populated by the trigger. NULL for RelationBelongsTo/RelationHasOne. Callers should not set this directly.'; + +COMMENT ON COLUMN metaschema_modules_public.relation_provision.out_source_field_id IS + 'Output column for RelationManyToMany: the UUID of the FK field on the junction table referencing the source table. Populated by the trigger. NULL for RelationBelongsTo/RelationHasOne. Callers should not set this directly.'; + +COMMENT ON COLUMN metaschema_modules_public.relation_provision.out_target_field_id IS + 'Output column for RelationManyToMany: the UUID of the FK field on the junction table referencing the target table. Populated by the trigger. NULL for RelationBelongsTo/RelationHasOne. Callers should not set this directly.'; + +CREATE INDEX relation_provision_database_id_idx ON metaschema_modules_public.relation_provision ( database_id ); +CREATE INDEX relation_provision_relation_type_idx ON metaschema_modules_public.relation_provision ( relation_type ); +CREATE INDEX relation_provision_source_table_id_idx ON metaschema_modules_public.relation_provision ( source_table_id ); +CREATE INDEX relation_provision_target_table_id_idx ON metaschema_modules_public.relation_provision ( target_table_id ); + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/rls_module/table.sql b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/rls_module/table.sql new file mode 100644 index 00000000..ef6d8bf0 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/rls_module/table.sql @@ -0,0 +1,48 @@ +-- Deploy schemas/metaschema_modules_public/tables/rls_module/table to pg + +-- requires: schemas/metaschema_modules_public/schema +-- requires: schemas/services_public/tables/apis/table + +BEGIN; + +CREATE TABLE metaschema_modules_public.rls_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + + schema_id uuid NOT NULL DEFAULT uuid_nil(), + private_schema_id uuid NOT NULL DEFAULT uuid_nil(), + session_credentials_table_id uuid NOT NULL DEFAULT uuid_nil(), + sessions_table_id uuid NOT NULL DEFAULT uuid_nil(), + users_table_id uuid NOT NULL DEFAULT uuid_nil(), + + -- + + authenticate text NOT NULL DEFAULT 'authenticate', + authenticate_strict text NOT NULL DEFAULT 'authenticate_strict', + "current_role" text NOT NULL DEFAULT 'current_user', + current_role_id text NOT NULL DEFAULT 'current_user_id', + + -- API routing (configurable per-module) + api_name text DEFAULT 'auth', + private_api_name text DEFAULT NULL, + + -- + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT session_credentials_table_fkey FOREIGN KEY (session_credentials_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT sessions_table_fkey FOREIGN KEY (sessions_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT users_table_fkey FOREIGN KEY (users_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT schema_fkey FOREIGN KEY (schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + CONSTRAINT pschema_fkey FOREIGN KEY (private_schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + + -- + CONSTRAINT database_id_uniq UNIQUE(database_id) +); + + +COMMENT ON CONSTRAINT db_fkey ON metaschema_modules_public.rls_module IS E'@omit'; +COMMENT ON CONSTRAINT session_credentials_table_fkey ON metaschema_modules_public.rls_module IS E'@omit'; +COMMENT ON CONSTRAINT sessions_table_fkey ON metaschema_modules_public.rls_module IS E'@omit'; +COMMENT ON CONSTRAINT users_table_fkey ON metaschema_modules_public.rls_module IS E'@omit'; +CREATE INDEX rls_module_database_id_idx ON metaschema_modules_public.rls_module ( database_id ); + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/secure_table_provision/table.sql b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/secure_table_provision/table.sql new file mode 100644 index 00000000..3737c975 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/secure_table_provision/table.sql @@ -0,0 +1,75 @@ +-- Deploy schemas/metaschema_modules_public/tables/secure_table_provision/table to pg + +-- requires: schemas/metaschema_modules_public/schema + +BEGIN; + +CREATE TABLE metaschema_modules_public.secure_table_provision ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + + database_id uuid NOT NULL, + + schema_id uuid NOT NULL DEFAULT uuid_nil(), + + table_id uuid NOT NULL DEFAULT uuid_nil(), + + table_name text DEFAULT NULL, + + nodes jsonb NOT NULL DEFAULT '[]', + + use_rls boolean NOT NULL DEFAULT true, + + fields jsonb[] NOT NULL DEFAULT '{}', + + grants jsonb NOT NULL DEFAULT '[]', + + policies jsonb NOT NULL DEFAULT '[]', + + out_fields uuid[] DEFAULT NULL, + + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT table_fkey FOREIGN KEY (table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT schema_fkey FOREIGN KEY (schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE +); + +COMMENT ON TABLE metaschema_modules_public.secure_table_provision IS + 'Provisions security, fields, grants, and policies onto a table. Each row can independently: (1) create fields via nodes[] array (supporting multiple Data* modules per row), (2) grant privileges via grants[] array (supporting per-role privilege targeting), (3) create RLS policies via policies[] array (supporting multiple Authz* policies per row). Multiple rows can target the same table to compose different concerns. All three concerns are optional and independent.'; + +COMMENT ON COLUMN metaschema_modules_public.secure_table_provision.id IS + 'Unique identifier for this provision row.'; + +COMMENT ON COLUMN metaschema_modules_public.secure_table_provision.database_id IS + 'The database this provision belongs to. Required.'; + +COMMENT ON COLUMN metaschema_modules_public.secure_table_provision.schema_id IS + 'Target schema for the table. Defaults to uuid_nil(); the trigger resolves this to the app_public schema if not explicitly provided.'; + +COMMENT ON COLUMN metaschema_modules_public.secure_table_provision.table_id IS + 'Target table to provision. Defaults to uuid_nil(); the trigger creates or resolves the table via table_name if not explicitly provided.'; + +COMMENT ON COLUMN metaschema_modules_public.secure_table_provision.table_name IS + 'Name of the target table. Used to create or look up the table when table_id is not provided. If omitted, it is backfilled from the resolved table.'; + +COMMENT ON COLUMN metaschema_modules_public.secure_table_provision.nodes IS + 'Array of node objects to apply to the table. Each element is a jsonb object with a required "$type" key (one of: DataId, DataDirectOwner, DataEntityMembership, DataOwnershipInEntity, DataTimestamps, DataPeoplestamps, DataPublishable, DataSoftDelete, DataEmbedding, DataFullTextSearch, DataSlug, etc.) and an optional "data" key containing generator-specific configuration. Supports multiple nodes per row, matching the blueprint definition format. Example: [{"$type": "DataId"}, {"$type": "DataTimestamps"}, {"$type": "DataDirectOwner", "data": {"owner_field_name": "author_id"}}]. Defaults to ''[]'' (no node processing).'; + +COMMENT ON COLUMN metaschema_modules_public.secure_table_provision.use_rls IS + 'If true and Row Level Security is not yet enabled on the target table, enable it. Automatically set to true by the trigger when policies[] is non-empty. Defaults to true.'; + +COMMENT ON COLUMN metaschema_modules_public.secure_table_provision.fields IS + 'PostgreSQL array of jsonb field definition objects to create on the target table. Each object has keys: "name" (text, required), "type" (text, required), "default" (text, optional), "is_required" (boolean, optional, defaults to false), "min" (float, optional), "max" (float, optional), "regexp" (text, optional), "index" (boolean, optional, defaults to false — creates a btree index on the field). min/max generate CHECK constraints: for text/citext they constrain character_length, for integer/float types they constrain the value. regexp generates a CHECK (col ~ pattern) constraint for text/citext. Fields are created via metaschema.create_field() after any node_type generator runs, and their IDs are appended to out_fields. Example: ARRAY[''{"name":"username","type":"citext","max":256,"regexp":"^[a-z0-9_]+$"}''::jsonb, ''{"name":"score","type":"integer","min":0,"max":100}''::jsonb]. Defaults to ''{}'' (no additional fields).'; + +COMMENT ON COLUMN metaschema_modules_public.secure_table_provision.grants IS + 'Array of grant objects defining table privileges. Each element is a jsonb object with keys: "roles" (text[], required — database roles to grant to, e.g. ["authenticated","admin"]), "privileges" (jsonb[], required — array of [privilege, columns] tuples, e.g. [["select","*"],["insert","*"]]). "*" means all columns; an array means column-level grant. Supports per-role privilege targeting: different grant entries can target different roles with different privileges. Example: [{"roles":["authenticated"],"privileges":[["select","*"]]},{"roles":["admin"],"privileges":[["insert","*"],["update","*"],["delete","*"]]}]. Defaults to ''[]'' (no grants). When policies[] omit explicit privileges/policy_role, they fall back to the verbs and first role from grants[].'; + +COMMENT ON COLUMN metaschema_modules_public.secure_table_provision.policies IS + 'Array of policy objects to create on the target table. Each element is a jsonb object with keys: "$type" (text, required — the Authz* policy generator type, e.g. AuthzEntityMembership, AuthzMembership, AuthzDirectOwner, AuthzPublishable, AuthzAllowAll), "data" (jsonb, optional — opaque configuration passed to metaschema.create_policy(), structure varies by type), "privileges" (text[], optional — privileges the policy applies to, e.g. ["select","insert"]; if omitted, derived from grants[] privilege verbs), "policy_role" (text, optional — role the policy targets; if omitted, falls back to first role in first grants[] entry, or ''authenticated'' if no grants), "permissive" (boolean, optional — PERMISSIVE or RESTRICTIVE; defaults to true), "policy_name" (text, optional — custom suffix for the generated policy name; if omitted, auto-derived from $type by stripping Authz prefix). Supports multiple policies per row. Example: [{"$type": "AuthzEntityMembership", "data": {"entity_field": "owner_id", "membership_type": 3}, "privileges": ["select", "insert"]}, {"$type": "AuthzDirectOwner", "data": {"entity_field": "actor_id"}, "privileges": ["update", "delete"]}]. Defaults to ''[]'' (no policies created). When non-empty, the trigger automatically enables RLS.'; + +COMMENT ON COLUMN metaschema_modules_public.secure_table_provision.out_fields IS + 'Output column populated by the trigger after field creation. Contains the UUIDs of the metaschema fields created on the target table by this provision row''s nodes. NULL when nodes is empty or before the trigger runs. Callers should not set this directly.'; + + +CREATE INDEX secure_table_provision_database_id_idx ON metaschema_modules_public.secure_table_provision ( database_id ); +CREATE INDEX secure_table_provision_table_id_idx ON metaschema_modules_public.secure_table_provision ( table_id ); + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/session_secrets_module/table.sql b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/session_secrets_module/table.sql new file mode 100644 index 00000000..fac26eba --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/session_secrets_module/table.sql @@ -0,0 +1,31 @@ +-- Deploy schemas/metaschema_modules_public/tables/session_secrets_module/table to pg + +-- requires: schemas/metaschema_modules_public/schema + +BEGIN; + +CREATE TABLE metaschema_modules_public.session_secrets_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + -- + schema_id uuid NOT NULL DEFAULT uuid_nil(), + table_id uuid NOT NULL DEFAULT uuid_nil(), + table_name text NOT NULL DEFAULT 'session_secrets', + -- + sessions_table_id uuid NOT NULL DEFAULT uuid_nil(), + -- + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT schema_fkey FOREIGN KEY (schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + CONSTRAINT table_fkey FOREIGN KEY (table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT sessions_table_fkey FOREIGN KEY (sessions_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE +); + +CREATE INDEX session_secrets_module_database_id_idx ON metaschema_modules_public.session_secrets_module ( database_id ); +CREATE INDEX session_secrets_module_schema_id_idx ON metaschema_modules_public.session_secrets_module ( schema_id ); +CREATE INDEX session_secrets_module_table_id_idx ON metaschema_modules_public.session_secrets_module ( table_id ); +CREATE INDEX session_secrets_module_sessions_table_id_idx ON metaschema_modules_public.session_secrets_module ( sessions_table_id ); + +COMMENT ON TABLE metaschema_modules_public.session_secrets_module IS 'Config row for the session_secrets_module, which provisions a DB-private, session-scoped ephemeral key-value store for challenges, nonces, and one-time tokens that must never be readable by end users.'; +COMMENT ON COLUMN metaschema_modules_public.session_secrets_module.sessions_table_id IS 'Resolved reference to sessions_module.sessions_table, used to FK session_secrets.session_id with ON DELETE CASCADE.'; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/sessions_module/table.sql b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/sessions_module/table.sql new file mode 100644 index 00000000..c1ffb797 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/sessions_module/table.sql @@ -0,0 +1,41 @@ +-- Deploy schemas/metaschema_modules_public/tables/sessions_module/table to pg + +-- requires: schemas/metaschema_modules_public/schema + +BEGIN; + +CREATE TABLE metaschema_modules_public.sessions_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + + -- + schema_id uuid NOT NULL DEFAULT uuid_nil(), + sessions_table_id uuid NOT NULL DEFAULT uuid_nil(), + session_credentials_table_id uuid NOT NULL DEFAULT uuid_nil(), + auth_settings_table_id uuid NOT NULL DEFAULT uuid_nil(), + users_table_id uuid NOT NULL DEFAULT uuid_nil(), + + sessions_default_expiration interval NOT NULL DEFAULT '30 days'::interval, + sessions_table text NOT NULL DEFAULT 'sessions', + session_credentials_table text NOT NULL DEFAULT 'session_credentials', + auth_settings_table text NOT NULL DEFAULT 'app_settings_auth', + -- + + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT schema_fkey FOREIGN KEY (schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + CONSTRAINT sessions_table_fkey FOREIGN KEY (sessions_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT session_credentials_table_fkey FOREIGN KEY (session_credentials_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT auth_settings_table_fkey FOREIGN KEY (auth_settings_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT users_table_fkey FOREIGN KEY (users_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE +); + +CREATE INDEX sessions_module_database_id_idx ON metaschema_modules_public.sessions_module ( database_id ); + +COMMENT ON CONSTRAINT sessions_table_fkey + ON metaschema_modules_public.sessions_module IS E'@fieldName sessionsTableBySessionsTableId'; +COMMENT ON CONSTRAINT session_credentials_table_fkey + ON metaschema_modules_public.sessions_module IS E'@fieldName sessionCredentialsTableBySessionCredentialsTableId'; +COMMENT ON CONSTRAINT auth_settings_table_fkey + ON metaschema_modules_public.sessions_module IS E'@fieldName authSettingsTableByAuthSettingsTableId'; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/storage_log_module/table.sql b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/storage_log_module/table.sql new file mode 100644 index 00000000..e11ecd67 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/storage_log_module/table.sql @@ -0,0 +1,49 @@ +-- Deploy schemas/metaschema_modules_public/tables/storage_log_module/table to pg + +-- requires: schemas/metaschema_modules_public/schema + +BEGIN; + +CREATE TABLE metaschema_modules_public.storage_log_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + + schema_id uuid NOT NULL DEFAULT uuid_nil(), + private_schema_id uuid NOT NULL DEFAULT uuid_nil(), + + -- Storage log table (partitioned by snapshot_at) + storage_log_table_id uuid NOT NULL DEFAULT uuid_nil(), + storage_log_table_name text NOT NULL DEFAULT '', + + -- Pre-aggregated daily rollup table + usage_daily_table_id uuid NOT NULL DEFAULT uuid_nil(), + usage_daily_table_name text NOT NULL DEFAULT '', + + -- Partition lifecycle configuration + "interval" text NOT NULL DEFAULT '1 month', + retention text NOT NULL DEFAULT '12 months', + premake int NOT NULL DEFAULT 2, + + -- Scope configuration: 'app' = per-app usage (actor_id RLS) + scope text NOT NULL DEFAULT 'app', + actor_fk_table_id uuid NULL, + entity_fk_table_id uuid NULL, + + -- Table name prefix. Auto-derived from scope by the trigger when empty. + prefix text NOT NULL DEFAULT '', + + -- API routing (configurable per-module) + api_name text DEFAULT 'usage', + private_api_name text DEFAULT NULL, + + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT schema_fkey FOREIGN KEY (schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + CONSTRAINT private_schema_fkey FOREIGN KEY (private_schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + CONSTRAINT storage_log_table_fkey FOREIGN KEY (storage_log_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT usage_daily_table_fkey FOREIGN KEY (usage_daily_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT storage_log_module_database_id_prefix_unique UNIQUE NULLS NOT DISTINCT (database_id, prefix) +); + +CREATE INDEX storage_log_module_database_id_idx ON metaschema_modules_public.storage_log_module ( database_id ); + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/storage_module/table.sql b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/storage_module/table.sql new file mode 100644 index 00000000..52c907ca --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/storage_module/table.sql @@ -0,0 +1,113 @@ +-- Deploy schemas/metaschema_modules_public/tables/storage_module/table to pg + +-- requires: schemas/metaschema_modules_public/schema + +BEGIN; + +CREATE TABLE metaschema_modules_public.storage_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + + -- Schema references + schema_id uuid NOT NULL DEFAULT uuid_nil(), + private_schema_id uuid NOT NULL DEFAULT uuid_nil(), + + -- Generated table IDs (populated by the generator) + buckets_table_id uuid NOT NULL DEFAULT uuid_nil(), + files_table_id uuid NOT NULL DEFAULT uuid_nil(), + + -- Table names (input to the generator) + buckets_table_name text NOT NULL DEFAULT 'buckets', + files_table_name text NOT NULL DEFAULT 'files', + + -- Scope: determines the security level for this module instance. + -- Resolved to a membership_type integer at trigger time via membership_types table. + scope text NOT NULL DEFAULT 'app', + + -- Table name prefix. Auto-derived from scope by the trigger when empty. + -- Override to create multiple module instances at the same scope. + prefix text NOT NULL DEFAULT '', + + -- Configurable security policies (NULL = use defaults based on scope). + -- When provided, replaces the default policy set in apply_storage_security. + -- Accepts a JSON array of policy objects: + -- {"$type": "AuthzEntityMembership", "privileges": ["select", "update"], "data": {...}} + policies jsonb NULL, + + -- Per-table provisions overrides from blueprint config. + -- Keys are table keys (files, buckets). + -- When a key is present, the module trigger skips default security for that table; + -- secure_table_provision applies the custom grants/policies instead. + provisions jsonb NULL, + + -- Entity table for RLS (NULL for app-level storage, entity table for entity-scoped storage) + entity_table_id uuid NULL, + + -- S3 connection config (NULL = use global env/plugin defaults) + endpoint text NULL, -- S3-compatible API endpoint URL (MinIO, R2, DO Spaces, GCS, etc.) + public_url_prefix text NULL, -- Public URL prefix for generating download URLs (e.g., CDN domain) + provider text NULL, -- Storage provider type: 'minio', 's3', 'gcs', etc. + + -- CORS configuration (NULL = use plugin defaults) + allowed_origins text[] NULL, -- Default CORS origins for all buckets in this database (e.g., ARRAY['https://app.example.com']). ['*'] = open/CDN mode. + + -- Storage permissions: when true, SELECT on files requires read_files permission + -- (opt-in restrictive mode for sensitive entity types like data rooms with confidential docs). + -- When false (default), any entity member can read all files (baseline = membership). + restrict_reads boolean NOT NULL DEFAULT false, + + -- Virtual filesystem + path shares: when true, generates the ltree path column + -- on files, the file_path_shares table, and path share RLS policies. + -- Enables folder hierarchy, per-folder/file sharing, and version chains. + has_path_shares boolean NOT NULL DEFAULT false, + + -- Generated table ID for file_path_shares (populated by the generator when has_path_shares=true) + path_shares_table_id uuid NULL DEFAULT NULL, + + -- Per-database configurable settings (NULL = use plugin defaults) + upload_url_expiry_seconds integer NULL, -- Presigned PUT URL expiry (default: 900 = 15 min) + download_url_expiry_seconds integer NULL, -- Presigned GET URL expiry (default: 3600 = 1 hour) + default_max_file_size bigint NULL, -- Global max file size in bytes (default: 200MB). Bucket-level overrides this. + max_filename_length integer NULL, -- Max filename length in chars (default: 1024) + cache_ttl_seconds integer NULL, -- LRU cache TTL for this config (default: 300 dev / 3600 prod) + + -- Bulk upload limits (NULL = use plugin defaults) + max_bulk_files integer NULL, -- Max files per requestBulkUploadUrls batch (default: 100) + max_bulk_total_size bigint NULL, -- Max total size per batch in bytes (default: 1GB = 1073741824) + + -- Feature flags: toggleable storage capabilities (all default false for minimal footprint) + has_versioning boolean NOT NULL DEFAULT false, -- Version chains: previous_version_id, is_latest, version_history() + has_content_hash boolean NOT NULL DEFAULT false, -- Content hash column for dedup + integrity verification + has_custom_keys boolean NOT NULL DEFAULT false, -- allow_custom_keys on buckets (implies has_versioning + has_content_hash) + has_audit_log boolean NOT NULL DEFAULT false, -- File events audit table: upload, delete, move, rename, download, share events + has_confirm_upload boolean NOT NULL DEFAULT false, -- Deferred HeadObject confirmation: enqueues storage:confirm_upload job on INSERT, creates status transition functions + confirm_upload_delay interval NOT NULL DEFAULT '30 seconds', -- Delay before first confirmation attempt (only used when has_confirm_upload = true) + + -- Generated table ID for file_events (populated by the generator when has_audit_log=true) + file_events_table_id uuid NULL DEFAULT NULL, + + -- Default permissions: permission names auto-granted to new members. + -- NULL uses the module's built-in defaults; explicit array overrides them. + default_permissions text[] DEFAULT NULL, + + -- Constraints + -- API routing (configurable per-module) + api_name text DEFAULT 'admin', + private_api_name text DEFAULT NULL, + + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT schema_fkey FOREIGN KEY (schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + CONSTRAINT private_schema_fkey FOREIGN KEY (private_schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + CONSTRAINT buckets_table_fkey FOREIGN KEY (buckets_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT files_table_fkey FOREIGN KEY (files_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT entity_table_fkey FOREIGN KEY (entity_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT path_shares_table_fkey FOREIGN KEY (path_shares_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT file_events_table_fkey FOREIGN KEY (file_events_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE +); + +CREATE INDEX storage_module_database_id_idx ON metaschema_modules_public.storage_module ( database_id ); + +-- Unique constraint: one storage module per database per scope per prefix. +CREATE UNIQUE INDEX storage_module_unique_scope ON metaschema_modules_public.storage_module ( database_id, scope, prefix ); + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/transfer_log_module/table.sql b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/transfer_log_module/table.sql new file mode 100644 index 00000000..05d1a9c7 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/transfer_log_module/table.sql @@ -0,0 +1,49 @@ +-- Deploy schemas/metaschema_modules_public/tables/transfer_log_module/table to pg + +-- requires: schemas/metaschema_modules_public/schema + +BEGIN; + +CREATE TABLE metaschema_modules_public.transfer_log_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + + schema_id uuid NOT NULL DEFAULT uuid_nil(), + private_schema_id uuid NOT NULL DEFAULT uuid_nil(), + + -- Transfer log table (partitioned by created_at) + transfer_log_table_id uuid NOT NULL DEFAULT uuid_nil(), + transfer_log_table_name text NOT NULL DEFAULT '', + + -- Pre-aggregated daily rollup table + usage_daily_table_id uuid NOT NULL DEFAULT uuid_nil(), + usage_daily_table_name text NOT NULL DEFAULT '', + + -- Partition lifecycle configuration + "interval" text NOT NULL DEFAULT '1 month', + retention text NOT NULL DEFAULT '12 months', + premake int NOT NULL DEFAULT 2, + + -- Scope configuration: 'app' = per-app usage (actor_id RLS) + scope text NOT NULL DEFAULT 'app', + actor_fk_table_id uuid NULL, + entity_fk_table_id uuid NULL, + + -- Table name prefix. Auto-derived from scope by the trigger when empty. + prefix text NOT NULL DEFAULT '', + + -- API routing (configurable per-module) + api_name text DEFAULT 'usage', + private_api_name text DEFAULT NULL, + + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT schema_fkey FOREIGN KEY (schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + CONSTRAINT private_schema_fkey FOREIGN KEY (private_schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + CONSTRAINT transfer_log_table_fkey FOREIGN KEY (transfer_log_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT usage_daily_table_fkey FOREIGN KEY (usage_daily_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT transfer_log_module_database_id_prefix_unique UNIQUE NULLS NOT DISTINCT (database_id, prefix) +); + +CREATE INDEX transfer_log_module_database_id_idx ON metaschema_modules_public.transfer_log_module ( database_id ); + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/user_auth_module/table.sql b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/user_auth_module/table.sql new file mode 100644 index 00000000..3d49988d --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/user_auth_module/table.sql @@ -0,0 +1,80 @@ +-- Deploy schemas/metaschema_modules_public/tables/user_auth_module/table to pg + +-- requires: schemas/metaschema_modules_public/schema + +BEGIN; + +CREATE TABLE metaschema_modules_public.user_auth_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + + schema_id uuid NOT NULL DEFAULT uuid_nil(), + emails_table_id uuid NOT NULL DEFAULT uuid_nil(), + users_table_id uuid NOT NULL DEFAULT uuid_nil(), + secrets_table_id uuid NOT NULL DEFAULT uuid_nil(), + encrypted_table_id uuid NOT NULL DEFAULT uuid_nil(), + -- TOKENS_REMOVAL: tokens_table_id removed - all auth now uses sessions_module + -- SESSION_MIGRATION: sessions and session_credentials for session-centric auth + sessions_table_id uuid NOT NULL DEFAULT uuid_nil(), + session_credentials_table_id uuid NOT NULL DEFAULT uuid_nil(), + + audits_table_id uuid NOT NULL DEFAULT uuid_nil(), + audits_table_name text NOT NULL DEFAULT 'audit_log_auth', + + -- api_id uuid NOT NULL REFERENCES services_public.apis (id), + + sign_in_function text NOT NULL DEFAULT 'sign_in', + sign_up_function text NOT NULL DEFAULT 'sign_up', + sign_out_function text NOT NULL DEFAULT 'sign_out', + set_password_function text NOT NULL DEFAULT 'set_password', + reset_password_function text NOT NULL DEFAULT 'reset_password', + forgot_password_function text NOT NULL DEFAULT 'forgot_password', + send_verification_email_function text NOT NULL DEFAULT 'send_verification_email', + verify_email_function text NOT NULL DEFAULT 'verify_email', + + verify_password_function text NOT NULL DEFAULT 'verify_password', + check_password_function text NOT NULL DEFAULT 'check_password', + + send_account_deletion_email_function text NOT NULL DEFAULT 'send_account_deletion_email', + delete_account_function text NOT NULL DEFAULT 'confirm_delete_account', + + sign_in_cross_origin_function text NOT NULL DEFAULT 'sign_in_cross_origin', + request_cross_origin_token_function text NOT NULL DEFAULT 'request_cross_origin_token', + extend_token_expires text NOT NULL DEFAULT 'extend_token_expires', + + -- UNIQUE(api_id), + + -- API routing (configurable per-module) + api_name text DEFAULT 'auth', + private_api_name text DEFAULT NULL, + + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT schema_fkey FOREIGN KEY (schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + CONSTRAINT email_table_fkey FOREIGN KEY (emails_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT users_table_fkey FOREIGN KEY (users_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT secrets_table_fkey FOREIGN KEY (secrets_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT encrypted_table_fkey FOREIGN KEY (encrypted_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + -- TOKENS_REMOVAL: tokens_table_fkey removed - all auth now uses sessions_module + -- SESSION_MIGRATION: foreign keys for sessions and session_credentials + CONSTRAINT sessions_table_fkey FOREIGN KEY (sessions_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT session_credentials_table_fkey FOREIGN KEY (session_credentials_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE +); + +CREATE INDEX user_auth_module_database_id_idx ON metaschema_modules_public.user_auth_module ( database_id ); + +COMMENT ON CONSTRAINT email_table_fkey + ON metaschema_modules_public.user_auth_module IS E'@omit'; +COMMENT ON CONSTRAINT users_table_fkey + ON metaschema_modules_public.user_auth_module IS E'@omit'; +COMMENT ON CONSTRAINT secrets_table_fkey + ON metaschema_modules_public.user_auth_module IS E'@omit'; +COMMENT ON CONSTRAINT encrypted_table_fkey + ON metaschema_modules_public.user_auth_module IS E'@omit'; +-- TOKENS_REMOVAL: tokens_table_fkey comment removed +-- SESSION_MIGRATION: omit comments for sessions and session_credentials foreign keys +COMMENT ON CONSTRAINT sessions_table_fkey + ON metaschema_modules_public.user_auth_module IS E'@omit'; +COMMENT ON CONSTRAINT session_credentials_table_fkey + ON metaschema_modules_public.user_auth_module IS E'@omit'; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/user_credentials_module/table.sql b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/user_credentials_module/table.sql new file mode 100644 index 00000000..d5bf3533 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/user_credentials_module/table.sql @@ -0,0 +1,42 @@ +-- Deploy schemas/metaschema_modules_public/tables/user_credentials_module/table to pg + +-- requires: schemas/metaschema_modules_public/schema + +BEGIN; + +CREATE TABLE metaschema_modules_public.user_credentials_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + + -- Schema references (resolved by BEFORE INSERT trigger when uuid_nil) + schema_id uuid NOT NULL DEFAULT uuid_nil(), + + -- Generated table ID (populated by the generator) + table_id uuid NOT NULL DEFAULT uuid_nil(), + + -- Table name (input — defaults to 'user_secrets') + table_name text NOT NULL DEFAULT 'user_secrets', + + -- API routing (get-or-create: if set, schema is added to this API) + api_name text DEFAULT 'config', + private_api_name text DEFAULT NULL, + + -- Constraints + CONSTRAINT user_credentials_module_db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT user_credentials_module_schema_fkey FOREIGN KEY (schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + CONSTRAINT user_credentials_module_table_fkey FOREIGN KEY (table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE +); + +CREATE INDEX user_credentials_module_database_id_idx ON metaschema_modules_public.user_credentials_module ( database_id ); +CREATE INDEX user_credentials_module_schema_id_idx ON metaschema_modules_public.user_credentials_module ( schema_id ); +CREATE INDEX user_credentials_module_table_id_idx ON metaschema_modules_public.user_credentials_module ( table_id ); + +-- One user_credentials_module per database. +CREATE UNIQUE INDEX user_credentials_module_unique ON metaschema_modules_public.user_credentials_module ( database_id ); + +COMMENT ON TABLE metaschema_modules_public.user_credentials_module IS + 'Per-user bcrypt credential store (password hashes, API key hashes). + Always user-scoped with AuthzDirectOwner RLS. Consumed by user_auth_module, + identity_providers_module, and bootstrap procedures.'; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/user_settings_module/table.sql b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/user_settings_module/table.sql new file mode 100644 index 00000000..5a50044b --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/user_settings_module/table.sql @@ -0,0 +1,34 @@ +-- Deploy schemas/metaschema_modules_public/tables/user_settings_module/table to pg + +-- requires: schemas/metaschema_modules_public/schema + +BEGIN; + +CREATE TABLE metaschema_modules_public.user_settings_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + + -- Schema reference (populated by the insert trigger) + schema_id uuid NOT NULL DEFAULT uuid_nil(), + + -- Table reference (populated by the generator) + table_id uuid NOT NULL DEFAULT uuid_nil(), + + -- Owner table reference (resolved to users table by trigger) + owner_table_id uuid NOT NULL DEFAULT uuid_nil(), + + table_name text NOT NULL DEFAULT 'user_settings', + + -- API routing (configurable per-module) + api_name text DEFAULT NULL, + + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT schema_fkey FOREIGN KEY (schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + CONSTRAINT table_fkey FOREIGN KEY (table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT owner_table_fkey FOREIGN KEY (owner_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE +); + +CREATE INDEX user_settings_module_database_id_idx ON metaschema_modules_public.user_settings_module ( database_id ); +CREATE UNIQUE INDEX user_settings_module_unique_per_db ON metaschema_modules_public.user_settings_module ( database_id ); + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/user_state_module/table.sql b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/user_state_module/table.sql new file mode 100644 index 00000000..521f5dce --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/user_state_module/table.sql @@ -0,0 +1,23 @@ +-- Deploy schemas/metaschema_modules_public/tables/user_state_module/table to pg + +-- requires: schemas/metaschema_modules_public/schema + +BEGIN; + +CREATE TABLE metaschema_modules_public.user_state_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + -- + schema_id uuid NOT NULL DEFAULT uuid_nil(), + table_id uuid NOT NULL DEFAULT uuid_nil(), + table_name text NOT NULL DEFAULT 'user_state', + -- + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT schema_fkey FOREIGN KEY (schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + CONSTRAINT table_fkey FOREIGN KEY (table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE + +); + +CREATE INDEX user_state_module_database_id_idx ON metaschema_modules_public.user_state_module ( database_id ); + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/users_module/table.sql b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/users_module/table.sql new file mode 100644 index 00000000..8a9a727b --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/users_module/table.sql @@ -0,0 +1,33 @@ +-- Deploy schemas/metaschema_modules_public/tables/users_module/table to pg + +-- requires: schemas/metaschema_modules_public/schema + +BEGIN; + +CREATE TABLE metaschema_modules_public.users_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + -- + schema_id uuid NOT NULL DEFAULT uuid_nil(), + table_id uuid NOT NULL DEFAULT uuid_nil(), + table_name text NOT NULL DEFAULT 'users', + -- + + -- + type_table_id uuid NOT NULL DEFAULT uuid_nil(), + type_table_name text NOT NULL DEFAULT 'role_types', + -- + + -- API routing (configurable per-module) + api_name text DEFAULT 'auth', + private_api_name text DEFAULT NULL, + + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT schema_fkey FOREIGN KEY (schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + CONSTRAINT table_fkey FOREIGN KEY (table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT type_table_fkey FOREIGN KEY (type_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE +); + +CREATE INDEX users_module_database_id_idx ON metaschema_modules_public.users_module ( database_id ); + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/webauthn_auth_module/table.sql b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/webauthn_auth_module/table.sql new file mode 100644 index 00000000..609f3c96 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/webauthn_auth_module/table.sql @@ -0,0 +1,63 @@ +-- Deploy schemas/metaschema_modules_public/tables/webauthn_auth_module/table to pg + +-- requires: schemas/metaschema_modules_public/schema + +BEGIN; + +-- WebAuthn / Passkey auth module config. +-- Sibling of crypto_auth_module. Registers a `webauthn_challenge` entry in +-- services_public.api_modules for every authenticated API in the database, +-- so the Node relying-party (using @simplewebauthn/server) knows where to +-- read and write passkey challenges + where the credentials table lives. +-- +-- RP config (rp_id, rp_name, origin_allowlist, attestation_type, +-- require_user_verification, resident_key) lives on this row (not on +-- app_auth_settings) because RP identity varies per deployment, not per +-- user choice. +-- +-- All fields default to safe passwordless-passkey values per SimpleWebAuthn's +-- consumer guidance: attestation_type='none', require_user_verification=false, +-- resident_key='required'. +CREATE TABLE metaschema_modules_public.webauthn_auth_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + + schema_id uuid NOT NULL DEFAULT uuid_nil(), + + users_table_id uuid NOT NULL DEFAULT uuid_nil(), + credentials_table_id uuid NOT NULL DEFAULT uuid_nil(), + sessions_table_id uuid NOT NULL DEFAULT uuid_nil(), + session_credentials_table_id uuid NOT NULL DEFAULT uuid_nil(), + session_secrets_table_id uuid NOT NULL DEFAULT uuid_nil(), + auth_settings_table_id uuid NOT NULL DEFAULT uuid_nil(), + + -- Relying Party config. Empty defaults require the caller to populate + -- via UPDATE / ALTER on the row before the first registration. + rp_id text NOT NULL DEFAULT '', + rp_name text NOT NULL DEFAULT '', + origin_allowlist text[] NOT NULL DEFAULT '{}', + + -- Consumer defaults per SimpleWebAuthn passkey guidance. + attestation_type text NOT NULL DEFAULT 'none' + CHECK (attestation_type IN ('none', 'indirect', 'direct', 'enterprise')), + require_user_verification boolean NOT NULL DEFAULT false, + resident_key text NOT NULL DEFAULT 'required' + CHECK (resident_key IN ('discouraged', 'preferred', 'required')), + + -- Challenge TTL (mirrors mfa_challenge_expiry on app_auth_settings). + -- 5 minutes matches SimpleWebAuthn's recommended cookie-based TTL. + challenge_expiry interval NOT NULL DEFAULT '5 minutes', + + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT schema_fkey FOREIGN KEY (schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + CONSTRAINT users_table_fkey FOREIGN KEY (users_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT credentials_table_fkey FOREIGN KEY (credentials_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT sessions_table_fkey FOREIGN KEY (sessions_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT session_credentials_table_fkey FOREIGN KEY (session_credentials_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT session_secrets_table_fkey FOREIGN KEY (session_secrets_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT auth_settings_table_fkey FOREIGN KEY (auth_settings_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE +); + +CREATE INDEX webauthn_auth_module_database_id_idx ON metaschema_modules_public.webauthn_auth_module ( database_id ); + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/webauthn_credentials_module/table.sql b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/webauthn_credentials_module/table.sql new file mode 100644 index 00000000..f540f4b4 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/webauthn_credentials_module/table.sql @@ -0,0 +1,36 @@ +-- Deploy schemas/metaschema_modules_public/tables/webauthn_credentials_module/table to pg + +-- requires: schemas/metaschema_modules_public/schema + +BEGIN; + +CREATE TABLE metaschema_modules_public.webauthn_credentials_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + + schema_id uuid NOT NULL DEFAULT uuid_nil(), + private_schema_id uuid NOT NULL DEFAULT uuid_nil(), + + table_id uuid NOT NULL DEFAULT uuid_nil(), + owner_table_id uuid NOT NULL DEFAULT uuid_nil(), + + table_name text NOT NULL DEFAULT 'webauthn_credentials', + + -- API routing (configurable per-module) + api_name text DEFAULT 'auth', + private_api_name text DEFAULT NULL, + + -- + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT table_fkey FOREIGN KEY (table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT owner_table_fkey FOREIGN KEY (owner_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT schema_fkey FOREIGN KEY (schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + CONSTRAINT private_schema_fkey FOREIGN KEY (private_schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE +); + +CREATE INDEX webauthn_credentials_module_database_id_idx ON metaschema_modules_public.webauthn_credentials_module ( database_id ); + +COMMENT ON TABLE metaschema_modules_public.webauthn_credentials_module IS 'Config row for the webauthn_credentials_module, which provisions the per-user WebAuthn/passkey credentials table (public key, counter, transports, device type, backup state) mirroring crypto_addresses_module. The sibling webauthn_auth_module holds RP config and the registration/sign-in challenge state.'; +COMMENT ON COLUMN metaschema_modules_public.webauthn_credentials_module.private_schema_id IS 'Private schema that hosts SECURITY DEFINER helpers which write to webauthn_credentials (registration / counter-bump / delete).'; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/deploy/schemas/services_private/schema.sql b/extensions/@pgpm/metaschema-modules/deploy/schemas/services_private/schema.sql new file mode 100644 index 00000000..36722a2a --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/deploy/schemas/services_private/schema.sql @@ -0,0 +1,2 @@ +-- Deploy schemas/services_private/schema to pg + diff --git a/extensions/@pgpm/metaschema-modules/deploy/schemas/services_public/schema.sql b/extensions/@pgpm/metaschema-modules/deploy/schemas/services_public/schema.sql new file mode 100644 index 00000000..be8d3e9e --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/deploy/schemas/services_public/schema.sql @@ -0,0 +1,2 @@ +-- Deploy schemas/services_public/schema to pg + diff --git a/extensions/@pgpm/metaschema-modules/deploy/schemas/services_public/tables/apis/table.sql b/extensions/@pgpm/metaschema-modules/deploy/schemas/services_public/tables/apis/table.sql new file mode 100644 index 00000000..038b8b00 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/deploy/schemas/services_public/tables/apis/table.sql @@ -0,0 +1,3 @@ +-- Deploy schemas/services_public/tables/apis/table to pg + +-- requires: schemas/services_public/schema diff --git a/extensions/@pgpm/metaschema-modules/deploy/schemas/services_public/tables/sites/table.sql b/extensions/@pgpm/metaschema-modules/deploy/schemas/services_public/tables/sites/table.sql new file mode 100644 index 00000000..52ee3dd3 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/deploy/schemas/services_public/tables/sites/table.sql @@ -0,0 +1,3 @@ +-- Deploy schemas/services_public/tables/sites/table to pg + +-- requires: schemas/services_public/schema diff --git a/extensions/@pgpm/metaschema-modules/metaschema-modules.control b/extensions/@pgpm/metaschema-modules/metaschema-modules.control new file mode 100644 index 00000000..f7dd5703 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/metaschema-modules.control @@ -0,0 +1,7 @@ +# metaschema-modules extension +comment = 'metaschema-modules extension' +default_version = '0.26.3' +module_pathname = '$libdir/metaschema-modules' +requires = 'plpgsql,uuid-ossp,metaschema-schema,services,pgpm-verify' +relocatable = false +superuser = false diff --git a/extensions/@pgpm/metaschema-modules/package.json b/extensions/@pgpm/metaschema-modules/package.json new file mode 100644 index 00000000..b34e78fe --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/package.json @@ -0,0 +1,39 @@ +{ + "name": "@pgpm/metaschema-modules", + "version": "0.26.5", + "description": "Module metadata handling and dependency tracking", + "author": "Dan Lynch ", + "contributors": [ + "Constructive " + ], + "keywords": [ + "postgresql", + "pgpm", + "metadata", + "modules" + ], + "publishConfig": { + "access": "public" + }, + "scripts": { + "bundle": "pgpm package", + "test": "jest", + "test:watch": "jest --watch" + }, + "dependencies": { + "@pgpm/metaschema-schema": "0.26.5", + "@pgpm/verify": "0.26.0" + }, + "devDependencies": { + "pgpm": "^4.23.2" + }, + "repository": { + "type": "git", + "url": "https://github.com/constructive-io/pgpm-modules" + }, + "homepage": "https://github.com/constructive-io/pgpm-modules", + "bugs": { + "url": "https://github.com/constructive-io/pgpm-modules/issues" + }, + "gitHead": "a496a00d89c37d874f4a7207265b9972b6f05c7d" +} diff --git a/extensions/@pgpm/metaschema-modules/pgpm.plan b/extensions/@pgpm/metaschema-modules/pgpm.plan new file mode 100644 index 00000000..ba706dd3 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/pgpm.plan @@ -0,0 +1,67 @@ +%syntax-version=1.0.0 +%project=metaschema-modules +%uri=metaschema-modules + +schemas/services_private/schema [services:schemas/services_public/tables/site_themes/table] 2017-08-11T08:11:51Z skitch # add schemas/services_private/schema +schemas/services_public/schema 2017-08-11T08:11:51Z skitch # add schemas/services_public/schema +schemas/metaschema_modules_public/schema 2026-01-04T08:28:00Z devin # add schemas/metaschema_modules_public/schema +schemas/services_public/tables/apis/table [schemas/services_public/schema] 2017-08-11T08:11:51Z skitch # add schemas/services_public/tables/apis/table +schemas/metaschema_modules_public/tables/connected_accounts_module/table [schemas/metaschema_modules_public/schema] 2017-08-11T08:11:51Z skitch # add schemas/metaschema_modules_public/tables/connected_accounts_module/table +schemas/metaschema_modules_public/tables/crypto_addresses_module/table [schemas/metaschema_modules_public/schema] 2017-08-11T08:11:51Z skitch # add schemas/metaschema_modules_public/tables/crypto_addresses_module/table +schemas/metaschema_modules_public/tables/crypto_auth_module/table [schemas/metaschema_modules_public/schema] 2017-08-11T08:11:51Z skitch # add schemas/metaschema_modules_public/tables/crypto_auth_module/table +schemas/metaschema_modules_public/tables/default_ids_module/table [schemas/metaschema_modules_public/schema] 2017-08-11T08:11:51Z skitch # add schemas/metaschema_modules_public/tables/default_ids_module/table +schemas/metaschema_modules_public/tables/denormalized_table_field/table [schemas/metaschema_modules_public/schema] 2017-08-11T08:11:51Z skitch # add schemas/metaschema_modules_public/tables/denormalized_table_field/table +schemas/metaschema_modules_public/tables/emails_module/table [schemas/metaschema_modules_public/schema] 2017-08-11T08:11:51Z skitch # add schemas/metaschema_modules_public/tables/emails_module/table +schemas/metaschema_modules_public/tables/config_secrets_user_module/table [schemas/metaschema_modules_public/schema] 2017-08-11T08:11:51Z skitch # add schemas/metaschema_modules_public/tables/config_secrets_user_module/table +schemas/metaschema_modules_public/tables/invites_module/table [schemas/metaschema_modules_public/schema] 2017-08-11T08:11:51Z skitch # add schemas/metaschema_modules_public/tables/invites_module/table +schemas/metaschema_modules_public/tables/events_module/table [schemas/metaschema_modules_public/schema] 2017-08-11T08:11:51Z skitch # add schemas/metaschema_modules_public/tables/events_module/table +schemas/metaschema_modules_public/tables/limits_module/table [schemas/metaschema_modules_public/schema] 2017-08-11T08:11:51Z skitch # add schemas/metaschema_modules_public/tables/limits_module/table +schemas/metaschema_modules_public/tables/membership_types_module/table [schemas/metaschema_modules_public/schema] 2017-08-11T08:11:51Z skitch # add schemas/metaschema_modules_public/tables/membership_types_module/table +schemas/metaschema_modules_public/tables/memberships_module/table [schemas/metaschema_modules_public/schema] 2017-08-11T08:11:51Z skitch # add schemas/metaschema_modules_public/tables/memberships_module/table +schemas/metaschema_modules_public/tables/permissions_module/table [schemas/metaschema_modules_public/schema] 2017-08-11T08:11:51Z skitch # add schemas/metaschema_modules_public/tables/permissions_module/table +schemas/metaschema_modules_public/tables/phone_numbers_module/table [schemas/metaschema_modules_public/schema] 2017-08-11T08:11:51Z skitch # add schemas/metaschema_modules_public/tables/phone_numbers_module/table +schemas/metaschema_modules_public/tables/profiles_module/table [schemas/metaschema_modules_public/schema] 2026-01-01T00:00:00Z devin # add schemas/metaschema_modules_public/tables/profiles_module/table +schemas/metaschema_modules_public/tables/rls_module/table [schemas/metaschema_modules_public/schema schemas/services_public/tables/apis/table] 2017-08-11T08:11:51Z skitch # add schemas/metaschema_modules_public/tables/rls_module/table +schemas/metaschema_modules_public/tables/user_state_module/table [schemas/metaschema_modules_public/schema] 2017-08-11T08:11:51Z skitch # add schemas/metaschema_modules_public/tables/user_state_module/table +schemas/services_public/tables/sites/table [schemas/services_public/schema] 2017-08-11T08:11:51Z skitch # add schemas/services_public/tables/sites/table +schemas/metaschema_modules_public/tables/sessions_module/table [schemas/metaschema_modules_public/schema] 2026-01-24T00:00:00Z devin # add schemas/metaschema_modules_public/tables/sessions_module/table +schemas/metaschema_modules_public/tables/user_auth_module/table [schemas/metaschema_modules_public/schema] 2017-08-11T08:11:51Z skitch # add schemas/metaschema_modules_public/tables/user_auth_module/table +schemas/metaschema_modules_public/tables/users_module/table [schemas/metaschema_modules_public/schema] 2017-08-11T08:11:51Z skitch # add schemas/metaschema_modules_public/tables/users_module/table + +schemas/metaschema_modules_public/tables/hierarchy_module/table [schemas/metaschema_modules_public/schema] 2024-12-28T00:00:00Z skitch # add schemas/metaschema_modules_public/tables/hierarchy_module/table +schemas/metaschema_modules_public/tables/secure_table_provision/table [schemas/metaschema_modules_public/schema] 2026-02-25T00:00:00Z Constructive # add schemas/metaschema_modules_public/tables/secure_table_provision/table +schemas/metaschema_modules_public/tables/relation_provision/table [schemas/metaschema_modules_public/schema] 2026-02-26T00:00:00Z Constructive # add schemas/metaschema_modules_public/tables/relation_provision/table +schemas/metaschema_modules_public/tables/blueprint_template/table [schemas/metaschema_modules_public/schema] 2026-03-20T00:00:00Z Constructive # add blueprint_template table for shareable schema recipes +schemas/metaschema_modules_public/tables/blueprint/table [schemas/metaschema_modules_public/schema schemas/metaschema_modules_public/tables/blueprint_template/table] 2026-03-20T00:00:01Z Constructive # add blueprint table for owned executable blueprints +schemas/metaschema_modules_public/tables/blueprint_construction/table [schemas/metaschema_modules_public/schema schemas/metaschema_modules_public/tables/blueprint/table] 2026-03-31T00:00:00Z Constructive # add blueprint_construction table for construction state tracking +schemas/metaschema_modules_public/tables/storage_module/table [schemas/metaschema_modules_public/schema] 2026-03-24T00:00:00Z devin # add storage_module config table for files and buckets +schemas/metaschema_modules_public/tables/entity_type_provision/table [schemas/metaschema_modules_public/schema] 2026-04-11T00:00:00Z Constructive # add entity_type_provision table for dynamic membership type provisioning + +schemas/metaschema_modules_public/tables/rate_limits_module/table [schemas/metaschema_modules_public/schema] 2026-04-15T00:00:00Z devin # add rate_limits_module for centralized throttle configuration +schemas/metaschema_modules_public/tables/devices_module/table [schemas/metaschema_modules_public/schema] 2026-04-16T00:00:00Z devin # add devices_module for trusted device tracking and recognition +schemas/metaschema_modules_public/tables/session_secrets_module/table [schemas/metaschema_modules_public/schema] 2026-04-17T00:00:00Z devin # add session_secrets_module config table for DB-private session-scoped ephemeral store +schemas/metaschema_modules_public/tables/webauthn_credentials_module/table [schemas/metaschema_modules_public/schema] 2026-04-18T00:00:00Z devin # add webauthn_credentials_module config table for WebAuthn/passkey credentials (phase 11a) +schemas/metaschema_modules_public/tables/webauthn_auth_module/table [schemas/metaschema_modules_public/schema] 2026-04-18T01:00:00Z devin # add webauthn_auth_module config table for WebAuthn/passkey RP config + api_modules publishing (phase 11b) +schemas/metaschema_modules_public/tables/identity_providers_module/table [schemas/metaschema_modules_public/schema] 2026-04-19T00:00:00Z devin # add identity_providers_module config table for OAuth2/OIDC custom identity providers (phase 12a) +schemas/metaschema_modules_public/tables/notifications_module/table [schemas/metaschema_modules_public/schema] 2026-04-19T10:00:00Z devin # add notifications_module config table for v2 notifications (events + scoped inbox) +schemas/metaschema_modules_public/tables/plans_module/table [schemas/metaschema_modules_public/schema] 2026-05-02T23:30:00Z devin # add plans_module config table for plan tiers and plan_limits +schemas/metaschema_modules_public/tables/billing_module/table [schemas/metaschema_modules_public/schema] 2026-05-02T23:45:00Z devin # add billing_module config table for meters, plan_subscriptions, ledger, and balances +schemas/metaschema_modules_public/tables/billing_provider_module/table [schemas/metaschema_modules_public/schema] 2026-05-03T01:00:00Z devin # add billing_provider_module config table for external billing provider integration +schemas/metaschema_modules_public/tables/realtime_module/table [schemas/metaschema_modules_public/schema] 2026-05-09T10:00:00Z devin # add realtime_module config table for real-time subscription infrastructure +schemas/metaschema_modules_public/tables/rate_limit_meters_module/table [schemas/metaschema_modules_public/schema] 2026-05-16T00:00:00Z devin # add rate_limit_meters_module for rolling window abuse protection (standalone rate limiting) +schemas/metaschema_modules_public/tables/config_secrets_org_module/table [schemas/metaschema_modules_public/schema] 2026-05-18T00:00:00Z devin # add config_secrets_org_module config table for org-scoped encrypted secrets +schemas/metaschema_modules_public/tables/inference_log_module/table [schemas/metaschema_modules_public/schema] 2026-05-12T23:00:00Z devin # add inference_log_module config table for partitioned LLM inference logging +schemas/metaschema_modules_public/tables/compute_log_module/table [schemas/metaschema_modules_public/schema] 2026-05-18T20:00:00Z devin # add compute_log_module config table for partitioned compute usage logging +schemas/metaschema_modules_public/tables/transfer_log_module/table [schemas/metaschema_modules_public/schema] 2026-05-18T21:00:00Z devin # add transfer_log_module config table for partitioned transfer/bandwidth logging +schemas/metaschema_modules_public/tables/storage_log_module/table [schemas/metaschema_modules_public/schema] 2026-05-18T21:00:01Z devin # add storage_log_module config table for partitioned object storage usage logging +schemas/metaschema_modules_public/tables/db_usage_module/table [schemas/metaschema_modules_public/schema] 2026-05-18T21:00:02Z devin # add db_usage_module config table for partitioned database-level usage metrics +schemas/metaschema_modules_public/tables/agent_module/table [schemas/metaschema_modules_public/schema] 2026-05-12T23:01:00Z devin # add agent_module config table for AI agent conversation threads, messages, and tasks +schemas/metaschema_modules_public/tables/merkle_store_module/table [schemas/metaschema_modules_public/schema] 2026-05-21T00:00:00Z devin # add merkle_store_module config table for content-addressed Merkle object stores +schemas/metaschema_modules_public/tables/graph_module/table [schemas/metaschema_modules_public/schema schemas/metaschema_modules_public/tables/merkle_store_module/table] 2026-05-21T01:00:00Z devin # add graph_module config table for FBP graph utilities on top of merkle store +schemas/metaschema_modules_public/tables/namespace_module/table [schemas/metaschema_modules_public/schema] 2026-05-21T02:00:00Z devin # add namespace_module config table for entity-aware namespace provisioning +schemas/metaschema_modules_public/tables/function_module/table [schemas/metaschema_modules_public/schema] 2026-05-21T03:00:00Z devin # add function_module config table for entity-aware function definitions +schemas/metaschema_modules_public/tables/config_secrets_module/table [schemas/metaschema_modules_public/schema] 2026-05-29T00:00:00Z devin # add entity-aware config_secrets_module (replaces config_secrets_user_module + config_secrets_org_module) +schemas/metaschema_modules_public/tables/user_credentials_module/table [schemas/metaschema_modules_public/schema] 2026-05-30T00:00:00Z devin # add user_credentials_module for per-user bcrypt credential store (split from config_secrets_module) +schemas/metaschema_modules_public/tables/user_settings_module/table [schemas/metaschema_modules_public/schema] 2026-05-28T00:00:00Z devin # add user_settings_module for extensible per-user preferences (1:1 with users) + +schemas/metaschema_modules_public/tables/i18n_module/table [schemas/metaschema_modules_public/schema] 2026-05-28T00:00:00Z devin # add i18n_module config table for internationalization settings diff --git a/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/schema.sql b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/schema.sql new file mode 100644 index 00000000..3e540bc2 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/schema.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_modules_public/schema from pg + +BEGIN; + +DROP SCHEMA metaschema_modules_public; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/agent_chat_module/table.sql b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/agent_chat_module/table.sql new file mode 100644 index 00000000..c5a40cd9 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/agent_chat_module/table.sql @@ -0,0 +1,3 @@ +-- Revert schemas/metaschema_modules_public/tables/agent_module/table from pg + +DROP TABLE IF EXISTS metaschema_modules_public.agent_module; diff --git a/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/agent_module/table.sql b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/agent_module/table.sql new file mode 100644 index 00000000..28c79525 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/agent_module/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_modules_public/tables/agent_module/table from pg + +BEGIN; + +DROP TABLE metaschema_modules_public.agent_module; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/billing_module/table.sql b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/billing_module/table.sql new file mode 100644 index 00000000..37fce82a --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/billing_module/table.sql @@ -0,0 +1,3 @@ +-- Revert schemas/metaschema_modules_public/tables/billing_module/table from pg + +DROP TABLE IF EXISTS metaschema_modules_public.billing_module; diff --git a/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/billing_provider_module/table.sql b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/billing_provider_module/table.sql new file mode 100644 index 00000000..d9a5ed89 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/billing_provider_module/table.sql @@ -0,0 +1,3 @@ +-- Revert schemas/metaschema_modules_public/tables/billing_provider_module/table from pg + +DROP TABLE IF EXISTS metaschema_modules_public.billing_provider_module; diff --git a/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/blueprint/table.sql b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/blueprint/table.sql new file mode 100644 index 00000000..2c916fd8 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/blueprint/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_modules_public/tables/blueprint/table from pg + +BEGIN; + +DROP TABLE IF EXISTS metaschema_modules_public.blueprint; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/blueprint_construction/table.sql b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/blueprint_construction/table.sql new file mode 100644 index 00000000..f920d1a5 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/blueprint_construction/table.sql @@ -0,0 +1,3 @@ +-- Revert schemas/metaschema_modules_public/tables/blueprint_construction/table + +DROP TABLE IF EXISTS metaschema_modules_public.blueprint_construction; diff --git a/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/blueprint_template/table.sql b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/blueprint_template/table.sql new file mode 100644 index 00000000..29c2dd41 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/blueprint_template/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_modules_public/tables/blueprint_template/table from pg + +BEGIN; + +DROP TABLE IF EXISTS metaschema_modules_public.blueprint_template; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/compute_log_module/table.sql b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/compute_log_module/table.sql new file mode 100644 index 00000000..2ed455e0 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/compute_log_module/table.sql @@ -0,0 +1,3 @@ +-- Revert schemas/metaschema_modules_public/tables/compute_log_module/table from pg + +DROP TABLE IF EXISTS metaschema_modules_public.compute_log_module; diff --git a/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/config_secrets_module/table.sql b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/config_secrets_module/table.sql new file mode 100644 index 00000000..4a00859e --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/config_secrets_module/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_modules_public/tables/config_secrets_module/table from pg + +BEGIN; + +DROP TABLE IF EXISTS metaschema_modules_public.config_secrets_module; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/config_secrets_org_module/table.sql b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/config_secrets_org_module/table.sql new file mode 100644 index 00000000..d16a1759 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/config_secrets_org_module/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_modules_public/tables/config_secrets_org_module/table from pg + +BEGIN; + +DROP TABLE metaschema_modules_public.config_secrets_org_module; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/config_secrets_user_module/table.sql b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/config_secrets_user_module/table.sql new file mode 100644 index 00000000..fcc2139c --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/config_secrets_user_module/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_modules_public/tables/config_secrets_user_module/table from pg + +BEGIN; + +DROP TABLE metaschema_modules_public.config_secrets_user_module; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/connected_accounts_module/table.sql b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/connected_accounts_module/table.sql new file mode 100644 index 00000000..978964cd --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/connected_accounts_module/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_modules_public/tables/connected_accounts_module/table from pg + +BEGIN; + +DROP TABLE metaschema_modules_public.connected_accounts_module; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/crypto_addresses_module/table.sql b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/crypto_addresses_module/table.sql new file mode 100644 index 00000000..4504c875 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/crypto_addresses_module/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_modules_public/tables/crypto_addresses_module/table from pg + +BEGIN; + +DROP TABLE metaschema_modules_public.crypto_addresses_module; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/crypto_auth_module/table.sql b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/crypto_auth_module/table.sql new file mode 100644 index 00000000..34ac69de --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/crypto_auth_module/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_modules_public/tables/crypto_auth_module/table from pg + +BEGIN; + +DROP TABLE metaschema_modules_public.crypto_auth_module; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/db_usage_module/table.sql b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/db_usage_module/table.sql new file mode 100644 index 00000000..f29203aa --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/db_usage_module/table.sql @@ -0,0 +1,3 @@ +-- Revert schemas/metaschema_modules_public/tables/db_usage_module/table from pg + +DROP TABLE IF EXISTS metaschema_modules_public.db_usage_module; diff --git a/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/default_ids_module/table.sql b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/default_ids_module/table.sql new file mode 100644 index 00000000..039f78ba --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/default_ids_module/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_modules_public/tables/default_ids_module/table from pg + +BEGIN; + +DROP TABLE metaschema_modules_public.default_ids_module; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/denormalized_table_field/table.sql b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/denormalized_table_field/table.sql new file mode 100644 index 00000000..c63082a2 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/denormalized_table_field/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_modules_public/tables/denormalized_table_field/table from pg + +BEGIN; + +DROP TABLE metaschema_modules_public.denormalized_table_field; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/devices_module/table.sql b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/devices_module/table.sql new file mode 100644 index 00000000..5fb0bebf --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/devices_module/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_modules_public/tables/devices_module/table from pg + +BEGIN; + +DROP TABLE metaschema_modules_public.devices_module; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/emails_module/table.sql b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/emails_module/table.sql new file mode 100644 index 00000000..e88362ba --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/emails_module/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_modules_public/tables/emails_module/table from pg + +BEGIN; + +DROP TABLE metaschema_modules_public.emails_module; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/entity_type_provision/table.sql b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/entity_type_provision/table.sql new file mode 100644 index 00000000..4af43127 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/entity_type_provision/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_modules_public/tables/entity_type_provision/table from pg + +BEGIN; + +DROP TABLE metaschema_modules_public.entity_type_provision; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/events_module/table.sql b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/events_module/table.sql new file mode 100644 index 00000000..3363a2dd --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/events_module/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_modules_public/tables/events_module/table from pg + +BEGIN; + +DROP TABLE metaschema_modules_public.events_module; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/function_module/table.sql b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/function_module/table.sql new file mode 100644 index 00000000..7d3f3dee --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/function_module/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_modules_public/tables/function_module/table from pg + +BEGIN; + +DROP TABLE metaschema_modules_public.function_module; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/graph_module/table.sql b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/graph_module/table.sql new file mode 100644 index 00000000..735fc8f5 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/graph_module/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_modules_public/tables/graph_module/table from pg + +BEGIN; + +DROP TABLE metaschema_modules_public.graph_module; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/hierarchy_module/table.sql b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/hierarchy_module/table.sql new file mode 100644 index 00000000..07be3976 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/hierarchy_module/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_modules_public/tables/hierarchy_module/table from pg + +BEGIN; + +DROP TABLE IF EXISTS metaschema_modules_public.hierarchy_module; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/i18n_module/table.sql b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/i18n_module/table.sql new file mode 100644 index 00000000..63e7cdfe --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/i18n_module/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_modules_public/tables/i18n_module/table from pg + +BEGIN; + +DROP TABLE IF EXISTS metaschema_modules_public.i18n_module; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/identity_providers_module/table.sql b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/identity_providers_module/table.sql new file mode 100644 index 00000000..3f1f3b16 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/identity_providers_module/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_modules_public/tables/identity_providers_module/table from pg + +BEGIN; + +DROP TABLE metaschema_modules_public.identity_providers_module; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/inference_log_module/table.sql b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/inference_log_module/table.sql new file mode 100644 index 00000000..7824e3c7 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/inference_log_module/table.sql @@ -0,0 +1,3 @@ +-- Revert schemas/metaschema_modules_public/tables/inference_log_module/table from pg + +DROP TABLE IF EXISTS metaschema_modules_public.inference_log_module; diff --git a/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/invites_module/table.sql b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/invites_module/table.sql new file mode 100644 index 00000000..9e72640d --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/invites_module/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_modules_public/tables/invites_module/table from pg + +BEGIN; + +DROP TABLE metaschema_modules_public.invites_module; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/limits_module/table.sql b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/limits_module/table.sql new file mode 100644 index 00000000..cd3d4fcb --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/limits_module/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_modules_public/tables/limits_module/table from pg + +BEGIN; + +DROP TABLE metaschema_modules_public.limits_module; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/membership_types_module/table.sql b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/membership_types_module/table.sql new file mode 100644 index 00000000..bc50b5b9 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/membership_types_module/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_modules_public/tables/membership_types_module/table from pg + +BEGIN; + +DROP TABLE metaschema_modules_public.membership_types_module; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/memberships_module/table.sql b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/memberships_module/table.sql new file mode 100644 index 00000000..3f005d09 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/memberships_module/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_modules_public/tables/memberships_module/table from pg + +BEGIN; + +DROP TABLE metaschema_modules_public.memberships_module; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/merkle_store_module/table.sql b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/merkle_store_module/table.sql new file mode 100644 index 00000000..34afce6f --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/merkle_store_module/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_modules_public/tables/merkle_store_module/table from pg + +BEGIN; + +DROP TABLE metaschema_modules_public.merkle_store_module; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/namespace_module/table.sql b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/namespace_module/table.sql new file mode 100644 index 00000000..babff77c --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/namespace_module/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_modules_public/tables/namespace_module/table from pg + +BEGIN; + +DROP TABLE IF EXISTS metaschema_modules_public.namespace_module; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/notifications_module/table.sql b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/notifications_module/table.sql new file mode 100644 index 00000000..0e4167b4 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/notifications_module/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_modules_public/tables/notifications_module/table from pg + +BEGIN; + +DROP TABLE metaschema_modules_public.notifications_module; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/permissions_module/table.sql b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/permissions_module/table.sql new file mode 100644 index 00000000..42ace72b --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/permissions_module/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_modules_public/tables/permissions_module/table from pg + +BEGIN; + +DROP TABLE metaschema_modules_public.permissions_module; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/phone_numbers_module/table.sql b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/phone_numbers_module/table.sql new file mode 100644 index 00000000..5c2d6a6c --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/phone_numbers_module/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_modules_public/tables/phone_numbers_module/table from pg + +BEGIN; + +DROP TABLE metaschema_modules_public.phone_numbers_module; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/plans_module/table.sql b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/plans_module/table.sql new file mode 100644 index 00000000..ce7986a4 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/plans_module/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_modules_public/tables/plans_module/table from pg + +BEGIN; + +DROP TABLE IF EXISTS metaschema_modules_public.plans_module; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/profiles_module/table.sql b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/profiles_module/table.sql new file mode 100644 index 00000000..6efa3aa9 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/profiles_module/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_modules_public/tables/profiles_module/table from pg + +BEGIN; + +DROP TABLE IF EXISTS metaschema_modules_public.profiles_module; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/rate_limit_meters_module/table.sql b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/rate_limit_meters_module/table.sql new file mode 100644 index 00000000..b8d2b674 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/rate_limit_meters_module/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_modules_public/tables/rate_limit_meters_module/table from pg + +BEGIN; + +DROP TABLE metaschema_modules_public.rate_limit_meters_module; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/rate_limits_module/table.sql b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/rate_limits_module/table.sql new file mode 100644 index 00000000..9b9015d7 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/rate_limits_module/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_modules_public/tables/rate_limits_module/table from pg + +BEGIN; + +DROP TABLE metaschema_modules_public.rate_limits_module; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/realtime_module/table.sql b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/realtime_module/table.sql new file mode 100644 index 00000000..b6c11f1a --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/realtime_module/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_modules_public/tables/realtime_module/table from pg + +BEGIN; + +DROP TABLE metaschema_modules_public.realtime_module; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/relation_provision/table.sql b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/relation_provision/table.sql new file mode 100644 index 00000000..d85cc87d --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/relation_provision/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_modules_public/tables/relation_provision/table from pg + +BEGIN; + +DROP TABLE IF EXISTS metaschema_modules_public.relation_provision; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/rls_module/table.sql b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/rls_module/table.sql new file mode 100644 index 00000000..0075e359 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/rls_module/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_modules_public/tables/rls_module/table from pg + +BEGIN; + +DROP TABLE metaschema_modules_public.rls_module; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/secure_table_provision/table.sql b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/secure_table_provision/table.sql new file mode 100644 index 00000000..3582dd74 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/secure_table_provision/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_modules_public/tables/secure_table_provision/table from pg + +BEGIN; + +DROP TABLE IF EXISTS metaschema_modules_public.secure_table_provision; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/session_secrets_module/table.sql b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/session_secrets_module/table.sql new file mode 100644 index 00000000..fbb4553b --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/session_secrets_module/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_modules_public/tables/session_secrets_module/table from pg + +BEGIN; + +DROP TABLE metaschema_modules_public.session_secrets_module; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/sessions_module/table.sql b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/sessions_module/table.sql new file mode 100644 index 00000000..7a945fd5 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/sessions_module/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_modules_public/tables/sessions_module/table from pg + +BEGIN; + +DROP TABLE metaschema_modules_public.sessions_module; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/storage_log_module/table.sql b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/storage_log_module/table.sql new file mode 100644 index 00000000..174bd954 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/storage_log_module/table.sql @@ -0,0 +1,3 @@ +-- Revert schemas/metaschema_modules_public/tables/storage_log_module/table from pg + +DROP TABLE IF EXISTS metaschema_modules_public.storage_log_module; diff --git a/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/storage_module/table.sql b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/storage_module/table.sql new file mode 100644 index 00000000..e0b6d0f3 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/storage_module/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_modules_public/tables/storage_module/table from pg + +BEGIN; + +DROP TABLE metaschema_modules_public.storage_module; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/transfer_log_module/table.sql b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/transfer_log_module/table.sql new file mode 100644 index 00000000..d0299682 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/transfer_log_module/table.sql @@ -0,0 +1,3 @@ +-- Revert schemas/metaschema_modules_public/tables/transfer_log_module/table from pg + +DROP TABLE IF EXISTS metaschema_modules_public.transfer_log_module; diff --git a/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/user_auth_module/table.sql b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/user_auth_module/table.sql new file mode 100644 index 00000000..aa22c602 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/user_auth_module/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_modules_public/tables/user_auth_module/table from pg + +BEGIN; + +DROP TABLE metaschema_modules_public.user_auth_module; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/user_credentials_module/table.sql b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/user_credentials_module/table.sql new file mode 100644 index 00000000..bca115ea --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/user_credentials_module/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_modules_public/tables/user_credentials_module/table from pg + +BEGIN; + +DROP TABLE IF EXISTS metaschema_modules_public.user_credentials_module; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/user_settings_module/table.sql b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/user_settings_module/table.sql new file mode 100644 index 00000000..95138ae6 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/user_settings_module/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_modules_public/tables/user_settings_module/table from pg + +BEGIN; + +DROP TABLE IF EXISTS metaschema_modules_public.user_settings_module; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/user_state_module/table.sql b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/user_state_module/table.sql new file mode 100644 index 00000000..78077172 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/user_state_module/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_modules_public/tables/user_state_module/table from pg + +BEGIN; + +DROP TABLE metaschema_modules_public.user_state_module; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/users_module/table.sql b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/users_module/table.sql new file mode 100644 index 00000000..0233bfe8 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/users_module/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_modules_public/tables/users_module/table from pg + +BEGIN; + +DROP TABLE metaschema_modules_public.users_module; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/webauthn_auth_module/table.sql b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/webauthn_auth_module/table.sql new file mode 100644 index 00000000..562524f7 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/webauthn_auth_module/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_modules_public/tables/webauthn_auth_module/table from pg + +BEGIN; + +DROP TABLE metaschema_modules_public.webauthn_auth_module; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/webauthn_credentials_module/table.sql b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/webauthn_credentials_module/table.sql new file mode 100644 index 00000000..983fd1df --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/revert/schemas/metaschema_modules_public/tables/webauthn_credentials_module/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_modules_public/tables/webauthn_credentials_module/table from pg + +BEGIN; + +DROP TABLE metaschema_modules_public.webauthn_credentials_module; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-modules/revert/schemas/services_private/schema.sql b/extensions/@pgpm/metaschema-modules/revert/schemas/services_private/schema.sql new file mode 100644 index 00000000..44a09520 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/revert/schemas/services_private/schema.sql @@ -0,0 +1 @@ +-- Revert schemas/services_private/schema from pg diff --git a/extensions/@pgpm/metaschema-modules/revert/schemas/services_public/schema.sql b/extensions/@pgpm/metaschema-modules/revert/schemas/services_public/schema.sql new file mode 100644 index 00000000..5858afc2 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/revert/schemas/services_public/schema.sql @@ -0,0 +1 @@ +-- Revert schemas/services_public/schema from pg diff --git a/extensions/@pgpm/metaschema-modules/revert/schemas/services_public/tables/apis/table.sql b/extensions/@pgpm/metaschema-modules/revert/schemas/services_public/tables/apis/table.sql new file mode 100644 index 00000000..2dc0ce44 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/revert/schemas/services_public/tables/apis/table.sql @@ -0,0 +1 @@ +-- Revert schemas/services_public/tables/apis/table from pg diff --git a/extensions/@pgpm/metaschema-modules/revert/schemas/services_public/tables/sites/table.sql b/extensions/@pgpm/metaschema-modules/revert/schemas/services_public/tables/sites/table.sql new file mode 100644 index 00000000..12270657 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/revert/schemas/services_public/tables/sites/table.sql @@ -0,0 +1 @@ +-- Revert schemas/services_public/tables/sites/table from pg diff --git a/extensions/@pgpm/metaschema-modules/sql/metaschema-modules--0.26.3.sql b/extensions/@pgpm/metaschema-modules/sql/metaschema-modules--0.26.3.sql new file mode 100644 index 00000000..91453238 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/sql/metaschema-modules--0.26.3.sql @@ -0,0 +1,3209 @@ +\echo Use "CREATE EXTENSION metaschema-modules" to load this file. \quit +CREATE SCHEMA metaschema_modules_public; + +GRANT USAGE ON SCHEMA metaschema_modules_public TO authenticated; + +GRANT USAGE ON SCHEMA metaschema_modules_public TO administrator; + +ALTER DEFAULT PRIVILEGES IN SCHEMA metaschema_modules_public + GRANT ALL ON TABLES TO authenticated; + +ALTER DEFAULT PRIVILEGES IN SCHEMA metaschema_modules_public + GRANT ALL ON SEQUENCES TO authenticated; + +ALTER DEFAULT PRIVILEGES IN SCHEMA metaschema_modules_public + GRANT ALL ON FUNCTIONS TO authenticated; + +ALTER DEFAULT PRIVILEGES IN SCHEMA metaschema_modules_public + GRANT ALL ON TABLES TO administrator; + +ALTER DEFAULT PRIVILEGES IN SCHEMA metaschema_modules_public + GRANT ALL ON SEQUENCES TO administrator; + +ALTER DEFAULT PRIVILEGES IN SCHEMA metaschema_modules_public + GRANT ALL ON FUNCTIONS TO administrator; + +CREATE TABLE metaschema_modules_public.connected_accounts_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + schema_id uuid NOT NULL DEFAULT uuid_nil(), + private_schema_id uuid NOT NULL DEFAULT uuid_nil(), + table_id uuid NOT NULL DEFAULT uuid_nil(), + owner_table_id uuid NOT NULL DEFAULT uuid_nil(), + table_name text NOT NULL, + api_name text DEFAULT 'auth', + private_api_name text DEFAULT NULL, + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT table_fkey + FOREIGN KEY(table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT owner_table_fkey + FOREIGN KEY(owner_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT schema_fkey + FOREIGN KEY(schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT private_schema_fkey + FOREIGN KEY(private_schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE +); + +CREATE INDEX connected_accounts_module_database_id_idx ON metaschema_modules_public.connected_accounts_module (database_id); + +CREATE TABLE metaschema_modules_public.crypto_addresses_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + schema_id uuid NOT NULL DEFAULT uuid_nil(), + private_schema_id uuid NOT NULL DEFAULT uuid_nil(), + table_id uuid NOT NULL DEFAULT uuid_nil(), + owner_table_id uuid NOT NULL DEFAULT uuid_nil(), + table_name text NOT NULL, + crypto_network text NOT NULL DEFAULT 'BTC', + api_name text DEFAULT 'auth', + private_api_name text DEFAULT NULL, + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT table_fkey + FOREIGN KEY(table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT owner_table_fkey + FOREIGN KEY(owner_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT schema_fkey + FOREIGN KEY(schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT private_schema_fkey + FOREIGN KEY(private_schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE +); + +CREATE INDEX crypto_addresses_module_database_id_idx ON metaschema_modules_public.crypto_addresses_module (database_id); + +CREATE TABLE metaschema_modules_public.crypto_auth_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + schema_id uuid NOT NULL DEFAULT uuid_nil(), + users_table_id uuid NOT NULL DEFAULT uuid_nil(), + secrets_table_id uuid NOT NULL DEFAULT uuid_nil(), + sessions_table_id uuid NOT NULL DEFAULT uuid_nil(), + session_credentials_table_id uuid NOT NULL DEFAULT uuid_nil(), + addresses_table_id uuid NOT NULL DEFAULT uuid_nil(), + user_field text NOT NULL, + crypto_network text NOT NULL DEFAULT 'BTC', + sign_in_request_challenge text NOT NULL DEFAULT 'sign_in_request_challenge', + sign_in_record_failure text NOT NULL DEFAULT 'sign_in_record_failure', + sign_up_with_key text NOT NULL DEFAULT 'sign_up_with_key', + sign_in_with_challenge text NOT NULL DEFAULT 'sign_in_with_challenge', + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT secrets_table_fkey + FOREIGN KEY(secrets_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT users_table_fkey + FOREIGN KEY(users_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT sessions_table_fkey + FOREIGN KEY(sessions_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT session_credentials_table_fkey + FOREIGN KEY(session_credentials_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT schema_fkey + FOREIGN KEY(schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE +); + +CREATE INDEX crypto_auth_module_database_id_idx ON metaschema_modules_public.crypto_auth_module (database_id); + +CREATE TABLE metaschema_modules_public.default_ids_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE +); + +CREATE INDEX default_ids_module_database_id_idx ON metaschema_modules_public.default_ids_module (database_id); + +CREATE TABLE metaschema_modules_public.denormalized_table_field ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + table_id uuid NOT NULL, + field_id uuid NOT NULL, + set_ids uuid[], + ref_table_id uuid NOT NULL, + ref_field_id uuid NOT NULL, + ref_ids uuid[], + use_updates bool NOT NULL DEFAULT true, + update_defaults bool NOT NULL DEFAULT true, + func_name text NULL, + func_order int NOT NULL DEFAULT 0, + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT table_fkey + FOREIGN KEY(table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT ref_table_fkey + FOREIGN KEY(ref_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT field_fkey + FOREIGN KEY(field_id) + REFERENCES metaschema_public.field (id) + ON DELETE CASCADE, + CONSTRAINT ref_field_fkey + FOREIGN KEY(ref_field_id) + REFERENCES metaschema_public.field (id) + ON DELETE CASCADE +); + +CREATE INDEX denormalized_table_field_database_id_idx ON metaschema_modules_public.denormalized_table_field (database_id); + +CREATE TABLE metaschema_modules_public.emails_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + schema_id uuid NOT NULL DEFAULT uuid_nil(), + private_schema_id uuid NOT NULL DEFAULT uuid_nil(), + table_id uuid NOT NULL DEFAULT uuid_nil(), + owner_table_id uuid NOT NULL DEFAULT uuid_nil(), + table_name text NOT NULL, + api_name text DEFAULT 'auth', + private_api_name text DEFAULT NULL, + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT table_fkey + FOREIGN KEY(table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT owner_table_fkey + FOREIGN KEY(owner_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT schema_fkey + FOREIGN KEY(schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT private_schema_fkey + FOREIGN KEY(private_schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE +); + +CREATE INDEX emails_module_database_id_idx ON metaschema_modules_public.emails_module (database_id); + +CREATE TABLE metaschema_modules_public.config_secrets_user_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + schema_id uuid NOT NULL DEFAULT uuid_nil(), + table_id uuid NOT NULL DEFAULT uuid_nil(), + table_name text NOT NULL DEFAULT 'user_secrets', + config_definitions_table_id uuid NOT NULL DEFAULT uuid_nil(), + api_name text DEFAULT 'config', + private_api_name text DEFAULT NULL, + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT schema_fkey + FOREIGN KEY(schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT table_fkey + FOREIGN KEY(table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT config_defs_table_fkey + FOREIGN KEY(config_definitions_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE +); + +CREATE INDEX config_secrets_user_module_database_id_idx ON metaschema_modules_public.config_secrets_user_module (database_id); + +CREATE TABLE metaschema_modules_public.invites_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + schema_id uuid NOT NULL DEFAULT uuid_nil(), + private_schema_id uuid NOT NULL DEFAULT uuid_nil(), + emails_table_id uuid NOT NULL DEFAULT uuid_nil(), + users_table_id uuid NOT NULL DEFAULT uuid_nil(), + invites_table_id uuid NOT NULL DEFAULT uuid_nil(), + claimed_invites_table_id uuid NOT NULL DEFAULT uuid_nil(), + invites_table_name text NOT NULL DEFAULT '', + claimed_invites_table_name text NOT NULL DEFAULT '', + submit_invite_code_function text NOT NULL DEFAULT '', + scope text NOT NULL DEFAULT 'app', + prefix text NOT NULL DEFAULT '', + entity_table_id uuid NULL, + api_name text DEFAULT 'admin', + private_api_name text DEFAULT NULL, + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT invites_table_fkey + FOREIGN KEY(invites_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT emails_table_fkey + FOREIGN KEY(emails_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT users_table_fkey + FOREIGN KEY(users_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT entity_table_fkey + FOREIGN KEY(entity_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT claimed_invites_table_fkey + FOREIGN KEY(claimed_invites_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT schema_fkey + FOREIGN KEY(schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT pschema_fkey + FOREIGN KEY(private_schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE +); + +CREATE INDEX invites_module_database_id_idx ON metaschema_modules_public.invites_module (database_id); + +CREATE UNIQUE INDEX invites_module_unique_scope ON metaschema_modules_public.invites_module (database_id, scope, prefix); + +CREATE TABLE metaschema_modules_public.events_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + schema_id uuid NOT NULL DEFAULT uuid_nil(), + private_schema_id uuid NOT NULL DEFAULT uuid_nil(), + events_table_id uuid NOT NULL DEFAULT uuid_nil(), + events_table_name text NOT NULL DEFAULT '', + event_aggregates_table_id uuid NOT NULL DEFAULT uuid_nil(), + event_aggregates_table_name text NOT NULL DEFAULT '', + event_types_table_id uuid NOT NULL DEFAULT uuid_nil(), + event_types_table_name text NOT NULL DEFAULT '', + levels_table_id uuid NOT NULL DEFAULT uuid_nil(), + levels_table_name text NOT NULL DEFAULT '', + level_requirements_table_id uuid NOT NULL DEFAULT uuid_nil(), + level_requirements_table_name text NOT NULL DEFAULT '', + level_grants_table_id uuid NOT NULL DEFAULT uuid_nil(), + level_grants_table_name text NOT NULL DEFAULT '', + achievement_rewards_table_id uuid NOT NULL DEFAULT uuid_nil(), + achievement_rewards_table_name text NOT NULL DEFAULT '', + record_event text NOT NULL DEFAULT '', + remove_event text NOT NULL DEFAULT '', + tg_event text NOT NULL DEFAULT '', + tg_event_toggle text NOT NULL DEFAULT '', + tg_event_toggle_bool text NOT NULL DEFAULT '', + tg_event_bool text NOT NULL DEFAULT '', + upsert_aggregate text NOT NULL DEFAULT '', + tg_update_aggregates text NOT NULL DEFAULT '', + prune_events text NOT NULL DEFAULT '', + steps_required text NOT NULL DEFAULT '', + level_achieved text NOT NULL DEFAULT '', + tg_check_achievements text NOT NULL DEFAULT '', + grant_achievement text NOT NULL DEFAULT '', + tg_achievement_reward text NOT NULL DEFAULT '', + interval text NOT NULL DEFAULT '1 month', + retention text DEFAULT '12 months', + premake int NOT NULL DEFAULT 2, + scope text NOT NULL DEFAULT 'app', + prefix text NOT NULL DEFAULT '', + entity_table_id uuid NULL, + actor_table_id uuid NOT NULL DEFAULT uuid_nil(), + default_permissions text[] DEFAULT NULL, + api_name text DEFAULT 'usage', + private_api_name text DEFAULT NULL, + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT schema_fkey + FOREIGN KEY(schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT private_schema_fkey + FOREIGN KEY(private_schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT events_table_fkey + FOREIGN KEY(events_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT event_aggregates_table_fkey + FOREIGN KEY(event_aggregates_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT event_types_table_fkey + FOREIGN KEY(event_types_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT levels_table_fkey + FOREIGN KEY(levels_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT level_requirements_table_fkey + FOREIGN KEY(level_requirements_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT level_grants_table_fkey + FOREIGN KEY(level_grants_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT achievement_rewards_table_fkey + FOREIGN KEY(achievement_rewards_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT entity_table_fkey + FOREIGN KEY(entity_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT actor_table_fkey + FOREIGN KEY(actor_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE +); + +CREATE INDEX events_module_database_id_idx ON metaschema_modules_public.events_module (database_id); + +CREATE TABLE metaschema_modules_public.limits_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + schema_id uuid NOT NULL DEFAULT uuid_nil(), + private_schema_id uuid NOT NULL DEFAULT uuid_nil(), + table_id uuid NOT NULL DEFAULT uuid_nil(), + table_name text NOT NULL DEFAULT '', + default_table_id uuid NOT NULL DEFAULT uuid_nil(), + default_table_name text NOT NULL DEFAULT '', + limit_increment_function text NOT NULL DEFAULT '', + limit_decrement_function text NOT NULL DEFAULT '', + limit_increment_trigger text NOT NULL DEFAULT '', + limit_decrement_trigger text NOT NULL DEFAULT '', + limit_update_trigger text NOT NULL DEFAULT '', + limit_check_function text NOT NULL DEFAULT '', + limit_credits_table_id uuid NULL, + events_table_id uuid NULL, + credit_codes_table_id uuid NULL, + credit_code_items_table_id uuid NULL, + credit_redemptions_table_id uuid NULL, + aggregate_table_id uuid NULL, + limit_caps_table_id uuid NULL, + limit_caps_defaults_table_id uuid NULL, + cap_check_trigger text NOT NULL DEFAULT '', + resolve_cap_function text NOT NULL DEFAULT '', + limit_warnings_table_id uuid NULL, + limit_warning_state_table_id uuid NULL, + limit_check_soft_function text NOT NULL DEFAULT '', + limit_aggregate_check_soft_function text NOT NULL DEFAULT '', + scope text NOT NULL DEFAULT 'app', + prefix text NOT NULL DEFAULT '', + entity_table_id uuid NULL, + actor_table_id uuid NOT NULL DEFAULT uuid_nil(), + api_name text DEFAULT 'usage', + private_api_name text DEFAULT NULL, + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT schema_fkey + FOREIGN KEY(schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT private_schema_fkey + FOREIGN KEY(private_schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT table_fkey + FOREIGN KEY(table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT default_table_fkey + FOREIGN KEY(default_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT entity_table_fkey + FOREIGN KEY(entity_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT actor_table_fkey + FOREIGN KEY(actor_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT aggregate_table_fkey + FOREIGN KEY(aggregate_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT limit_credits_table_fkey + FOREIGN KEY(limit_credits_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT events_table_fkey + FOREIGN KEY(events_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT credit_codes_table_fkey + FOREIGN KEY(credit_codes_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT credit_code_items_table_fkey + FOREIGN KEY(credit_code_items_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT credit_redemptions_table_fkey + FOREIGN KEY(credit_redemptions_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT limit_caps_table_fkey + FOREIGN KEY(limit_caps_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT limit_caps_defaults_table_fkey + FOREIGN KEY(limit_caps_defaults_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT limit_warnings_table_fkey + FOREIGN KEY(limit_warnings_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT limit_warning_state_table_fkey + FOREIGN KEY(limit_warning_state_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE +); + +CREATE INDEX limits_module_database_id_idx ON metaschema_modules_public.limits_module (database_id); + +CREATE TABLE metaschema_modules_public.membership_types_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + schema_id uuid NOT NULL DEFAULT uuid_nil(), + table_id uuid NOT NULL DEFAULT uuid_nil(), + table_name text NOT NULL DEFAULT 'membership_types', + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT schema_fkey + FOREIGN KEY(schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT table_fkey + FOREIGN KEY(table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE +); + +CREATE INDEX membership_types_module_database_id_idx ON metaschema_modules_public.membership_types_module (database_id); + +CREATE TABLE metaschema_modules_public.memberships_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + schema_id uuid NOT NULL DEFAULT uuid_nil(), + private_schema_id uuid NOT NULL DEFAULT uuid_nil(), + memberships_table_id uuid NOT NULL DEFAULT uuid_nil(), + memberships_table_name text NOT NULL DEFAULT '', + members_table_id uuid NOT NULL DEFAULT uuid_nil(), + members_table_name text NOT NULL DEFAULT '', + membership_defaults_table_id uuid NOT NULL DEFAULT uuid_nil(), + membership_defaults_table_name text NOT NULL DEFAULT '', + membership_settings_table_id uuid NULL, + membership_settings_table_name text NOT NULL DEFAULT '', + grants_table_id uuid NOT NULL DEFAULT uuid_nil(), + grants_table_name text NOT NULL DEFAULT '', + actor_table_id uuid NOT NULL DEFAULT uuid_nil(), + limits_table_id uuid NOT NULL DEFAULT uuid_nil(), + default_limits_table_id uuid NOT NULL DEFAULT uuid_nil(), + permissions_table_id uuid NOT NULL DEFAULT uuid_nil(), + default_permissions_table_id uuid NOT NULL DEFAULT uuid_nil(), + sprt_table_id uuid NOT NULL DEFAULT uuid_nil(), + admin_grants_table_id uuid NOT NULL DEFAULT uuid_nil(), + admin_grants_table_name text NOT NULL DEFAULT '', + owner_grants_table_id uuid NOT NULL DEFAULT uuid_nil(), + owner_grants_table_name text NOT NULL DEFAULT '', + scope text NOT NULL DEFAULT 'app', + prefix text NOT NULL DEFAULT '', + entity_table_id uuid NULL, + entity_table_owner_id uuid NULL, + get_org_fn text NULL, + actor_mask_check text NOT NULL DEFAULT '', + actor_perm_check text NOT NULL DEFAULT '', + entity_ids_by_mask text NULL, + entity_ids_by_perm text NULL, + entity_ids_function text NULL, + member_profiles_table_id uuid NULL, + api_name text DEFAULT 'admin', + private_api_name text DEFAULT NULL, + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT schema_fkey + FOREIGN KEY(schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT private_schema_fkey + FOREIGN KEY(private_schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT memberships_table_fkey + FOREIGN KEY(memberships_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT membership_defaults_table_fkey + FOREIGN KEY(membership_defaults_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT membership_settings_table_fkey + FOREIGN KEY(membership_settings_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT members_table_fkey + FOREIGN KEY(members_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT grants_table_fkey + FOREIGN KEY(grants_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT sprt_table_fkey + FOREIGN KEY(sprt_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT entity_table_fkey + FOREIGN KEY(entity_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT entity_table_owner_fkey + FOREIGN KEY(entity_table_owner_id) + REFERENCES metaschema_public.field (id) + ON DELETE CASCADE, + CONSTRAINT actor_table_fkey + FOREIGN KEY(actor_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT limits_table_fkey + FOREIGN KEY(limits_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT default_limits_table_fkey + FOREIGN KEY(default_limits_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT permissions_table_fkey + FOREIGN KEY(permissions_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT default_permissions_table_fkey + FOREIGN KEY(default_permissions_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT memberships_module_unique + UNIQUE (database_id, scope, prefix) +); + +CREATE INDEX memberships_module_database_id_idx ON metaschema_modules_public.memberships_module (database_id); + +CREATE TABLE metaschema_modules_public.permissions_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + schema_id uuid NOT NULL DEFAULT uuid_nil(), + private_schema_id uuid NOT NULL DEFAULT uuid_nil(), + table_id uuid NOT NULL DEFAULT uuid_nil(), + table_name text NOT NULL DEFAULT '', + default_table_id uuid NOT NULL DEFAULT uuid_nil(), + default_table_name text NOT NULL DEFAULT '', + bitlen int NOT NULL DEFAULT 64, + scope text NOT NULL DEFAULT 'app', + prefix text NOT NULL DEFAULT '', + entity_table_id uuid NULL, + actor_table_id uuid NOT NULL DEFAULT uuid_nil(), + get_padded_mask text NOT NULL DEFAULT '', + get_mask text NOT NULL DEFAULT '', + get_by_mask text NOT NULL DEFAULT '', + get_mask_by_name text NOT NULL DEFAULT '', + api_name text DEFAULT 'admin', + private_api_name text DEFAULT NULL, + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT schema_fkey + FOREIGN KEY(schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT private_schema_fkey + FOREIGN KEY(private_schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT table_fkey + FOREIGN KEY(table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT default_table_fkey + FOREIGN KEY(default_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT entity_table_fkey + FOREIGN KEY(entity_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT actor_table_fkey + FOREIGN KEY(actor_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE +); + +CREATE INDEX permissions_module_database_id_idx ON metaschema_modules_public.permissions_module (database_id); + +CREATE TABLE metaschema_modules_public.phone_numbers_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + schema_id uuid NOT NULL DEFAULT uuid_nil(), + private_schema_id uuid NOT NULL DEFAULT uuid_nil(), + table_id uuid NOT NULL DEFAULT uuid_nil(), + owner_table_id uuid NOT NULL DEFAULT uuid_nil(), + table_name text NOT NULL, + api_name text DEFAULT 'auth', + private_api_name text DEFAULT NULL, + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT table_fkey + FOREIGN KEY(table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT owner_table_fkey + FOREIGN KEY(owner_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT schema_fkey + FOREIGN KEY(schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT private_schema_fkey + FOREIGN KEY(private_schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE +); + +CREATE INDEX phone_numbers_module_database_id_idx ON metaschema_modules_public.phone_numbers_module (database_id); + +CREATE TABLE metaschema_modules_public.profiles_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + schema_id uuid NOT NULL DEFAULT uuid_nil(), + private_schema_id uuid NOT NULL DEFAULT uuid_nil(), + table_id uuid NOT NULL DEFAULT uuid_nil(), + table_name text NOT NULL DEFAULT '', + profile_permissions_table_id uuid NOT NULL DEFAULT uuid_nil(), + profile_permissions_table_name text NOT NULL DEFAULT '', + profile_grants_table_id uuid NOT NULL DEFAULT uuid_nil(), + profile_grants_table_name text NOT NULL DEFAULT '', + profile_definition_grants_table_id uuid NOT NULL DEFAULT uuid_nil(), + profile_definition_grants_table_name text NOT NULL DEFAULT '', + profile_templates_table_id uuid NOT NULL DEFAULT uuid_nil(), + profile_templates_table_name text NOT NULL DEFAULT '', + scope text NOT NULL DEFAULT 'app', + prefix text NOT NULL DEFAULT '', + entity_table_id uuid NULL, + actor_table_id uuid NOT NULL DEFAULT uuid_nil(), + permissions_table_id uuid NOT NULL DEFAULT uuid_nil(), + memberships_table_id uuid NOT NULL DEFAULT uuid_nil(), + api_name text DEFAULT 'admin', + private_api_name text DEFAULT NULL, + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT schema_fkey + FOREIGN KEY(schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT private_schema_fkey + FOREIGN KEY(private_schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT table_fkey + FOREIGN KEY(table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT profile_permissions_table_fkey + FOREIGN KEY(profile_permissions_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT profile_grants_table_fkey + FOREIGN KEY(profile_grants_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT profile_definition_grants_table_fkey + FOREIGN KEY(profile_definition_grants_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT profile_templates_table_fkey + FOREIGN KEY(profile_templates_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT entity_table_fkey + FOREIGN KEY(entity_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT actor_table_fkey + FOREIGN KEY(actor_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT permissions_table_fkey + FOREIGN KEY(permissions_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT memberships_table_fkey + FOREIGN KEY(memberships_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT profiles_module_unique + UNIQUE (database_id, scope, prefix) +); + +CREATE INDEX profiles_module_database_id_idx ON metaschema_modules_public.profiles_module (database_id); + +CREATE TABLE metaschema_modules_public.rls_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + schema_id uuid NOT NULL DEFAULT uuid_nil(), + private_schema_id uuid NOT NULL DEFAULT uuid_nil(), + session_credentials_table_id uuid NOT NULL DEFAULT uuid_nil(), + sessions_table_id uuid NOT NULL DEFAULT uuid_nil(), + users_table_id uuid NOT NULL DEFAULT uuid_nil(), + authenticate text NOT NULL DEFAULT 'authenticate', + authenticate_strict text NOT NULL DEFAULT 'authenticate_strict', + "current_role" text NOT NULL DEFAULT 'current_user', + current_role_id text NOT NULL DEFAULT 'current_user_id', + api_name text DEFAULT 'auth', + private_api_name text DEFAULT NULL, + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT session_credentials_table_fkey + FOREIGN KEY(session_credentials_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT sessions_table_fkey + FOREIGN KEY(sessions_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT users_table_fkey + FOREIGN KEY(users_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT schema_fkey + FOREIGN KEY(schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT pschema_fkey + FOREIGN KEY(private_schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT database_id_uniq + UNIQUE (database_id) +); + +COMMENT ON CONSTRAINT db_fkey ON metaschema_modules_public.rls_module IS '@omit'; + +COMMENT ON CONSTRAINT session_credentials_table_fkey ON metaschema_modules_public.rls_module IS '@omit'; + +COMMENT ON CONSTRAINT sessions_table_fkey ON metaschema_modules_public.rls_module IS '@omit'; + +COMMENT ON CONSTRAINT users_table_fkey ON metaschema_modules_public.rls_module IS '@omit'; + +CREATE INDEX rls_module_database_id_idx ON metaschema_modules_public.rls_module (database_id); + +CREATE TABLE metaschema_modules_public.user_state_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + schema_id uuid NOT NULL DEFAULT uuid_nil(), + table_id uuid NOT NULL DEFAULT uuid_nil(), + table_name text NOT NULL DEFAULT 'user_state', + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT schema_fkey + FOREIGN KEY(schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT table_fkey + FOREIGN KEY(table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE +); + +CREATE INDEX user_state_module_database_id_idx ON metaschema_modules_public.user_state_module (database_id); + +CREATE TABLE metaschema_modules_public.sessions_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + schema_id uuid NOT NULL DEFAULT uuid_nil(), + sessions_table_id uuid NOT NULL DEFAULT uuid_nil(), + session_credentials_table_id uuid NOT NULL DEFAULT uuid_nil(), + auth_settings_table_id uuid NOT NULL DEFAULT uuid_nil(), + users_table_id uuid NOT NULL DEFAULT uuid_nil(), + sessions_default_expiration interval NOT NULL DEFAULT '30 days'::interval, + sessions_table text NOT NULL DEFAULT 'sessions', + session_credentials_table text NOT NULL DEFAULT 'session_credentials', + auth_settings_table text NOT NULL DEFAULT 'app_settings_auth', + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT schema_fkey + FOREIGN KEY(schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT sessions_table_fkey + FOREIGN KEY(sessions_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT session_credentials_table_fkey + FOREIGN KEY(session_credentials_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT auth_settings_table_fkey + FOREIGN KEY(auth_settings_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT users_table_fkey + FOREIGN KEY(users_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE +); + +CREATE INDEX sessions_module_database_id_idx ON metaschema_modules_public.sessions_module (database_id); + +COMMENT ON CONSTRAINT sessions_table_fkey ON metaschema_modules_public.sessions_module IS '@fieldName sessionsTableBySessionsTableId'; + +COMMENT ON CONSTRAINT session_credentials_table_fkey ON metaschema_modules_public.sessions_module IS '@fieldName sessionCredentialsTableBySessionCredentialsTableId'; + +COMMENT ON CONSTRAINT auth_settings_table_fkey ON metaschema_modules_public.sessions_module IS '@fieldName authSettingsTableByAuthSettingsTableId'; + +CREATE TABLE metaschema_modules_public.user_auth_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + schema_id uuid NOT NULL DEFAULT uuid_nil(), + emails_table_id uuid NOT NULL DEFAULT uuid_nil(), + users_table_id uuid NOT NULL DEFAULT uuid_nil(), + secrets_table_id uuid NOT NULL DEFAULT uuid_nil(), + encrypted_table_id uuid NOT NULL DEFAULT uuid_nil(), + sessions_table_id uuid NOT NULL DEFAULT uuid_nil(), + session_credentials_table_id uuid NOT NULL DEFAULT uuid_nil(), + audits_table_id uuid NOT NULL DEFAULT uuid_nil(), + audits_table_name text NOT NULL DEFAULT 'audit_log_auth', + sign_in_function text NOT NULL DEFAULT 'sign_in', + sign_up_function text NOT NULL DEFAULT 'sign_up', + sign_out_function text NOT NULL DEFAULT 'sign_out', + set_password_function text NOT NULL DEFAULT 'set_password', + reset_password_function text NOT NULL DEFAULT 'reset_password', + forgot_password_function text NOT NULL DEFAULT 'forgot_password', + send_verification_email_function text NOT NULL DEFAULT 'send_verification_email', + verify_email_function text NOT NULL DEFAULT 'verify_email', + verify_password_function text NOT NULL DEFAULT 'verify_password', + check_password_function text NOT NULL DEFAULT 'check_password', + send_account_deletion_email_function text NOT NULL DEFAULT 'send_account_deletion_email', + delete_account_function text NOT NULL DEFAULT 'confirm_delete_account', + sign_in_cross_origin_function text NOT NULL DEFAULT 'sign_in_cross_origin', + request_cross_origin_token_function text NOT NULL DEFAULT 'request_cross_origin_token', + extend_token_expires text NOT NULL DEFAULT 'extend_token_expires', + api_name text DEFAULT 'auth', + private_api_name text DEFAULT NULL, + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT schema_fkey + FOREIGN KEY(schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT email_table_fkey + FOREIGN KEY(emails_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT users_table_fkey + FOREIGN KEY(users_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT secrets_table_fkey + FOREIGN KEY(secrets_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT encrypted_table_fkey + FOREIGN KEY(encrypted_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT sessions_table_fkey + FOREIGN KEY(sessions_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT session_credentials_table_fkey + FOREIGN KEY(session_credentials_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE +); + +CREATE INDEX user_auth_module_database_id_idx ON metaschema_modules_public.user_auth_module (database_id); + +COMMENT ON CONSTRAINT email_table_fkey ON metaschema_modules_public.user_auth_module IS '@omit'; + +COMMENT ON CONSTRAINT users_table_fkey ON metaschema_modules_public.user_auth_module IS '@omit'; + +COMMENT ON CONSTRAINT secrets_table_fkey ON metaschema_modules_public.user_auth_module IS '@omit'; + +COMMENT ON CONSTRAINT encrypted_table_fkey ON metaschema_modules_public.user_auth_module IS '@omit'; + +COMMENT ON CONSTRAINT sessions_table_fkey ON metaschema_modules_public.user_auth_module IS '@omit'; + +COMMENT ON CONSTRAINT session_credentials_table_fkey ON metaschema_modules_public.user_auth_module IS '@omit'; + +CREATE TABLE metaschema_modules_public.users_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + schema_id uuid NOT NULL DEFAULT uuid_nil(), + table_id uuid NOT NULL DEFAULT uuid_nil(), + table_name text NOT NULL DEFAULT 'users', + type_table_id uuid NOT NULL DEFAULT uuid_nil(), + type_table_name text NOT NULL DEFAULT 'role_types', + api_name text DEFAULT 'auth', + private_api_name text DEFAULT NULL, + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT schema_fkey + FOREIGN KEY(schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT table_fkey + FOREIGN KEY(table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT type_table_fkey + FOREIGN KEY(type_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE +); + +CREATE INDEX users_module_database_id_idx ON metaschema_modules_public.users_module (database_id); + +CREATE TABLE metaschema_modules_public.hierarchy_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + schema_id uuid NOT NULL DEFAULT uuid_nil(), + private_schema_id uuid NOT NULL DEFAULT uuid_nil(), + chart_edges_table_id uuid NOT NULL DEFAULT uuid_nil(), + chart_edges_table_name text NOT NULL DEFAULT '', + hierarchy_sprt_table_id uuid NOT NULL DEFAULT uuid_nil(), + hierarchy_sprt_table_name text NOT NULL DEFAULT '', + chart_edge_grants_table_id uuid NOT NULL DEFAULT uuid_nil(), + chart_edge_grants_table_name text NOT NULL DEFAULT '', + entity_table_id uuid NOT NULL, + users_table_id uuid NOT NULL, + scope text NOT NULL DEFAULT 'org', + prefix text NOT NULL DEFAULT '', + private_schema_name text NOT NULL DEFAULT '', + sprt_table_name text NOT NULL DEFAULT '', + rebuild_hierarchy_function text NOT NULL DEFAULT '', + get_subordinates_function text NOT NULL DEFAULT '', + get_managers_function text NOT NULL DEFAULT '', + is_manager_of_function text NOT NULL DEFAULT '', + default_permissions text[] DEFAULT NULL, + created_at timestamptz NOT NULL DEFAULT now(), + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT schema_fkey + FOREIGN KEY(schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT private_schema_fkey + FOREIGN KEY(private_schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT chart_edges_table_fkey + FOREIGN KEY(chart_edges_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT hierarchy_sprt_table_fkey + FOREIGN KEY(hierarchy_sprt_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT chart_edge_grants_table_fkey + FOREIGN KEY(chart_edge_grants_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT entity_table_fkey + FOREIGN KEY(entity_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT users_table_fkey + FOREIGN KEY(users_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT hierarchy_module_database_unique + UNIQUE (database_id) +); + +CREATE INDEX hierarchy_module_database_id_idx ON metaschema_modules_public.hierarchy_module (database_id); + +CREATE TABLE metaschema_modules_public.secure_table_provision ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + schema_id uuid NOT NULL DEFAULT uuid_nil(), + table_id uuid NOT NULL DEFAULT uuid_nil(), + table_name text DEFAULT NULL, + nodes jsonb NOT NULL DEFAULT '[]', + use_rls boolean NOT NULL DEFAULT true, + fields jsonb[] NOT NULL DEFAULT '{}', + grants jsonb NOT NULL DEFAULT '[]', + policies jsonb NOT NULL DEFAULT '[]', + out_fields uuid[] DEFAULT NULL, + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT table_fkey + FOREIGN KEY(table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT schema_fkey + FOREIGN KEY(schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE +); + +COMMENT ON TABLE metaschema_modules_public.secure_table_provision IS 'Provisions security, fields, grants, and policies onto a table. Each row can independently: (1) create fields via nodes[] array (supporting multiple Data* modules per row), (2) grant privileges via grants[] array (supporting per-role privilege targeting), (3) create RLS policies via policies[] array (supporting multiple Authz* policies per row). Multiple rows can target the same table to compose different concerns. All three concerns are optional and independent.'; + +COMMENT ON COLUMN metaschema_modules_public.secure_table_provision.id IS 'Unique identifier for this provision row.'; + +COMMENT ON COLUMN metaschema_modules_public.secure_table_provision.database_id IS 'The database this provision belongs to. Required.'; + +COMMENT ON COLUMN metaschema_modules_public.secure_table_provision.schema_id IS 'Target schema for the table. Defaults to uuid_nil(); the trigger resolves this to the app_public schema if not explicitly provided.'; + +COMMENT ON COLUMN metaschema_modules_public.secure_table_provision.table_id IS 'Target table to provision. Defaults to uuid_nil(); the trigger creates or resolves the table via table_name if not explicitly provided.'; + +COMMENT ON COLUMN metaschema_modules_public.secure_table_provision.table_name IS 'Name of the target table. Used to create or look up the table when table_id is not provided. If omitted, it is backfilled from the resolved table.'; + +COMMENT ON COLUMN metaschema_modules_public.secure_table_provision.nodes IS 'Array of node objects to apply to the table. Each element is a jsonb object with a required "$type" key (one of: DataId, DataDirectOwner, DataEntityMembership, DataOwnershipInEntity, DataTimestamps, DataPeoplestamps, DataPublishable, DataSoftDelete, DataEmbedding, DataFullTextSearch, DataSlug, etc.) and an optional "data" key containing generator-specific configuration. Supports multiple nodes per row, matching the blueprint definition format. Example: [{"$type": "DataId"}, {"$type": "DataTimestamps"}, {"$type": "DataDirectOwner", "data": {"owner_field_name": "author_id"}}]. Defaults to ''[]'' (no node processing).'; + +COMMENT ON COLUMN metaschema_modules_public.secure_table_provision.use_rls IS 'If true and Row Level Security is not yet enabled on the target table, enable it. Automatically set to true by the trigger when policies[] is non-empty. Defaults to true.'; + +COMMENT ON COLUMN metaschema_modules_public.secure_table_provision.fields IS 'PostgreSQL array of jsonb field definition objects to create on the target table. Each object has keys: "name" (text, required), "type" (text, required), "default" (text, optional), "is_required" (boolean, optional, defaults to false), "min" (float, optional), "max" (float, optional), "regexp" (text, optional), "index" (boolean, optional, defaults to false — creates a btree index on the field). min/max generate CHECK constraints: for text/citext they constrain character_length, for integer/float types they constrain the value. regexp generates a CHECK (col ~ pattern) constraint for text/citext. Fields are created via metaschema.create_field() after any node_type generator runs, and their IDs are appended to out_fields. Example: ARRAY[''{"name":"username","type":"citext","max":256,"regexp":"^[a-z0-9_]+$"}''::jsonb, ''{"name":"score","type":"integer","min":0,"max":100}''::jsonb]. Defaults to ''{}'' (no additional fields).'; + +COMMENT ON COLUMN metaschema_modules_public.secure_table_provision.grants IS 'Array of grant objects defining table privileges. Each element is a jsonb object with keys: "roles" (text[], required — database roles to grant to, e.g. ["authenticated","admin"]), "privileges" (jsonb[], required — array of [privilege, columns] tuples, e.g. [["select","*"],["insert","*"]]). "*" means all columns; an array means column-level grant. Supports per-role privilege targeting: different grant entries can target different roles with different privileges. Example: [{"roles":["authenticated"],"privileges":[["select","*"]]},{"roles":["admin"],"privileges":[["insert","*"],["update","*"],["delete","*"]]}]. Defaults to ''[]'' (no grants). When policies[] omit explicit privileges/policy_role, they fall back to the verbs and first role from grants[].'; + +COMMENT ON COLUMN metaschema_modules_public.secure_table_provision.policies IS 'Array of policy objects to create on the target table. Each element is a jsonb object with keys: "$type" (text, required — the Authz* policy generator type, e.g. AuthzEntityMembership, AuthzMembership, AuthzDirectOwner, AuthzPublishable, AuthzAllowAll), "data" (jsonb, optional — opaque configuration passed to metaschema.create_policy(), structure varies by type), "privileges" (text[], optional — privileges the policy applies to, e.g. ["select","insert"]; if omitted, derived from grants[] privilege verbs), "policy_role" (text, optional — role the policy targets; if omitted, falls back to first role in first grants[] entry, or ''authenticated'' if no grants), "permissive" (boolean, optional — PERMISSIVE or RESTRICTIVE; defaults to true), "policy_name" (text, optional — custom suffix for the generated policy name; if omitted, auto-derived from $type by stripping Authz prefix). Supports multiple policies per row. Example: [{"$type": "AuthzEntityMembership", "data": {"entity_field": "owner_id", "membership_type": 3}, "privileges": ["select", "insert"]}, {"$type": "AuthzDirectOwner", "data": {"entity_field": "actor_id"}, "privileges": ["update", "delete"]}]. Defaults to ''[]'' (no policies created). When non-empty, the trigger automatically enables RLS.'; + +COMMENT ON COLUMN metaschema_modules_public.secure_table_provision.out_fields IS 'Output column populated by the trigger after field creation. Contains the UUIDs of the metaschema fields created on the target table by this provision row''s nodes. NULL when nodes is empty or before the trigger runs. Callers should not set this directly.'; + +CREATE INDEX secure_table_provision_database_id_idx ON metaschema_modules_public.secure_table_provision (database_id); + +CREATE INDEX secure_table_provision_table_id_idx ON metaschema_modules_public.secure_table_provision (table_id); + +CREATE TABLE metaschema_modules_public.relation_provision ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + relation_type text NOT NULL CHECK (relation_type IN ('RelationBelongsTo', 'RelationHasOne', 'RelationHasMany', 'RelationManyToMany')), + source_table_id uuid NOT NULL, + target_table_id uuid NOT NULL, + field_name text DEFAULT NULL, + delete_action text DEFAULT NULL, + is_required boolean NOT NULL DEFAULT true, + api_required boolean NOT NULL DEFAULT false, + junction_table_id uuid NOT NULL DEFAULT uuid_nil(), + junction_table_name text DEFAULT NULL, + junction_schema_id uuid DEFAULT NULL, + source_field_name text DEFAULT NULL, + target_field_name text DEFAULT NULL, + use_composite_key boolean NOT NULL DEFAULT false, + create_index boolean NOT NULL DEFAULT true, + expose_in_api boolean NOT NULL DEFAULT true, + nodes jsonb NOT NULL DEFAULT '[]', + grants jsonb NOT NULL DEFAULT '[]', + policies jsonb NOT NULL DEFAULT '[]', + out_field_id uuid DEFAULT NULL, + out_junction_table_id uuid DEFAULT NULL, + out_source_field_id uuid DEFAULT NULL, + out_target_field_id uuid DEFAULT NULL, + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT source_table_fkey + FOREIGN KEY(source_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT target_table_fkey + FOREIGN KEY(target_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE +); + +COMMENT ON TABLE metaschema_modules_public.relation_provision IS 'Provisions relational structure between tables. Supports four relation types: + - RelationBelongsTo: adds a FK field on the source table referencing the target table (child perspective: "tasks belongs to projects" -> tasks.project_id). + - RelationHasMany: adds a FK field on the target table referencing the source table (parent perspective: "projects has many tasks" -> tasks.project_id). Inverse of BelongsTo. + - RelationHasOne: adds a FK field with a unique constraint on the source table referencing the target table. Also supports shared-primary-key patterns where the FK field IS the primary key (set field_name to the existing PK field name). + - RelationManyToMany: creates a junction table with FK fields to both source and target tables, delegating table creation and security to secure_table_provision. + This is a one-and-done structural provisioner. To layer additional security onto junction tables after creation, use secure_table_provision directly. + All operations are graceful: existing fields, FK constraints, and unique constraints are reused if found. + The trigger never injects values the caller did not provide. All security config is forwarded to secure_table_provision as-is.'; + +COMMENT ON COLUMN metaschema_modules_public.relation_provision.id IS 'Unique identifier for this relation provision row.'; + +COMMENT ON COLUMN metaschema_modules_public.relation_provision.database_id IS 'The database this relation belongs to. Required. Must match the database of both source_table_id and target_table_id.'; + +COMMENT ON COLUMN metaschema_modules_public.relation_provision.relation_type IS 'The type of relation to create. Uses SuperCase naming: + - RelationBelongsTo: creates a FK field on source_table referencing target_table (e.g., tasks belongs to projects -> tasks.project_id). Field name auto-derived from target table. + - RelationHasMany: creates a FK field on target_table referencing source_table (e.g., projects has many tasks -> tasks.project_id). Field name auto-derived from source table. Inverse of BelongsTo — same FK, different perspective. + - RelationHasOne: creates a FK field + unique constraint on source_table referencing target_table (e.g., user_settings has one user -> user_settings.user_id with UNIQUE). Also supports shared-primary-key patterns (e.g., user_profiles.id = users.id) by setting field_name to the existing PK field. + - RelationManyToMany: creates a junction table with FK fields to both tables (e.g., projects and tags -> project_tags table). + Each relation type uses a different subset of columns on this table. Required.'; + +COMMENT ON COLUMN metaschema_modules_public.relation_provision.source_table_id IS 'The source table in the relation. Required. + - RelationBelongsTo: the table that receives the FK field (e.g., tasks in "tasks belongs to projects"). + - RelationHasMany: the parent table being referenced (e.g., projects in "projects has many tasks"). The FK field is created on the target table. + - RelationHasOne: the table that receives the FK field + unique constraint (e.g., user_settings in "user_settings has one user"). + - RelationManyToMany: one of the two tables being joined (e.g., projects in "projects and tags"). The junction table will have a FK field referencing this table.'; + +COMMENT ON COLUMN metaschema_modules_public.relation_provision.target_table_id IS 'The target table in the relation. Required. + - RelationBelongsTo: the table being referenced by the FK (e.g., projects in "tasks belongs to projects"). + - RelationHasMany: the table that receives the FK field (e.g., tasks in "projects has many tasks"). + - RelationHasOne: the table being referenced by the FK (e.g., users in "user_settings has one user"). + - RelationManyToMany: the other table being joined (e.g., tags in "projects and tags"). The junction table will have a FK field referencing this table.'; + +COMMENT ON COLUMN metaschema_modules_public.relation_provision.field_name IS 'FK field name for RelationBelongsTo, RelationHasOne, and RelationHasMany. + - RelationBelongsTo/RelationHasOne: if NULL, auto-derived from the target table name (e.g., target "projects" derives "project_id"). + - RelationHasMany: if NULL, auto-derived from the source table name (e.g., source "projects" derives "project_id"). + For RelationHasOne shared-primary-key patterns, set field_name to the existing PK field (e.g., "id") so the FK reuses it. + Ignored for RelationManyToMany — use source_field_name/target_field_name instead.'; + +COMMENT ON COLUMN metaschema_modules_public.relation_provision.delete_action IS 'FK delete action for RelationBelongsTo, RelationHasOne, and RelationHasMany. One of: c (CASCADE), r (RESTRICT), n (SET NULL), d (SET DEFAULT), a (NO ACTION). Required — the trigger raises an error if not provided. The caller must explicitly choose the cascade behavior; there is no default. Ignored for RelationManyToMany (junction FK fields always use CASCADE).'; + +COMMENT ON COLUMN metaschema_modules_public.relation_provision.is_required IS 'Whether the FK field is NOT NULL. Defaults to true. + - RelationBelongsTo: set to false for optional associations (e.g., tasks.assignee_id that can be NULL). + - RelationHasMany: set to false if the child can exist without a parent. + - RelationHasOne: typically true. + Ignored for RelationManyToMany (junction FK fields are always required).'; + +COMMENT ON COLUMN metaschema_modules_public.relation_provision.api_required IS 'Whether the FK field should be required at the API level even though it is nullable at the database level. Defaults to false. + When true and is_required is false, the field is created as nullable (allowing SET NULL cascade) but a @requiredInput smart tag is added so PostGraphile treats it as non-null in create/update input types. + When is_required is true, api_required is ignored (the field is already required at both levels). + Ignored for RelationManyToMany (junction FK fields are always required).'; + +COMMENT ON COLUMN metaschema_modules_public.relation_provision.junction_table_id IS 'For RelationManyToMany: an existing junction table to use. Defaults to uuid_nil(). + - When uuid_nil(): the trigger creates a new junction table via secure_table_provision using junction_table_name. + - When set to a valid table UUID: the trigger skips table creation and only adds FK fields, composite key (if use_composite_key is true), and security to the existing table. + Ignored for RelationBelongsTo/RelationHasOne.'; + +COMMENT ON COLUMN metaschema_modules_public.relation_provision.junction_table_name IS 'For RelationManyToMany: name of the junction table to create or look up. If NULL, auto-derived from source and target table names using inflection_db (e.g., "projects" + "tags" derives "project_tags"). Only used when junction_table_id is uuid_nil(). Ignored for RelationBelongsTo/RelationHasOne.'; + +COMMENT ON COLUMN metaschema_modules_public.relation_provision.junction_schema_id IS 'For RelationManyToMany: schema for the junction table. If NULL, defaults to the source table''s schema. Ignored for RelationBelongsTo/RelationHasOne.'; + +COMMENT ON COLUMN metaschema_modules_public.relation_provision.source_field_name IS 'For RelationManyToMany: FK field name on the junction table referencing the source table. If NULL, auto-derived from the source table name using inflection_db.get_foreign_key_field_name() (e.g., source table "projects" derives "project_id"). Ignored for RelationBelongsTo/RelationHasOne.'; + +COMMENT ON COLUMN metaschema_modules_public.relation_provision.target_field_name IS 'For RelationManyToMany: FK field name on the junction table referencing the target table. If NULL, auto-derived from the target table name using inflection_db.get_foreign_key_field_name() (e.g., target table "tags" derives "tag_id"). Ignored for RelationBelongsTo/RelationHasOne.'; + +COMMENT ON COLUMN metaschema_modules_public.relation_provision.use_composite_key IS 'For RelationManyToMany: whether to create a composite primary key from the two FK fields (source + target) on the junction table. Defaults to false. + - When true: the trigger calls metaschema.pk() with ARRAY[source_field_id, target_field_id] to create a composite PK. No separate id column is created. This enforces uniqueness of the pair and is suitable for simple junction tables. + - When false: no primary key is created by the trigger. The caller should provide node_type=''DataId'' to create a UUID primary key, or handle the PK strategy via a separate secure_table_provision row. + use_composite_key and node_type=''DataId'' are mutually exclusive — using both would create two conflicting PKs. + Ignored for RelationBelongsTo/RelationHasOne.'; + +COMMENT ON COLUMN metaschema_modules_public.relation_provision.create_index IS 'Whether to create a btree index on FK fields created by this relation. Defaults to true. + PostgreSQL does not automatically index foreign key columns (only the referenced PK side is indexed). + Without indexes on FK columns, JOINs, CASCADE deletes, and RLS policy lookups perform sequential scans. + - RelationBelongsTo: creates an index on the FK field on the source table. + - RelationHasMany: creates an index on the FK field on the target table. + - RelationHasOne: skipped — the unique constraint already creates an implicit index. + - RelationManyToMany: creates indexes on both FK fields on the junction table. + Set to false only for very small tables or write-heavy tables where index maintenance cost outweighs read performance.'; + +COMMENT ON COLUMN metaschema_modules_public.relation_provision.expose_in_api IS 'For RelationManyToMany: whether to expose the M:N shortcut fields in the GraphQL API. Defaults to true. + When true, sets @behavior +manyToMany on the junction table smart_tags so PostGraphile generates + clean M:N connection fields (e.g., event.contacts instead of event.contactEventsByEventId). + When false (or toggled off via UPDATE), the behavior tag is removed and the M:N fields disappear from GraphQL. + Toggling is supported: UPDATE expose_in_api to true/false and the smart tag is added/removed automatically. + Ignored for RelationBelongsTo/RelationHasOne/RelationHasMany.'; + +COMMENT ON COLUMN metaschema_modules_public.relation_provision.nodes IS 'For RelationManyToMany: array of node objects to apply to the junction table. Each element is a jsonb object with a required "$type" key and an optional "data" key. Forwarded to provision_table as-is. The trigger does not interpret or validate this value. + Examples: [{"$type": "DataId"}, {"$type": "DataTimestamps"}, {"$type": "DataDirectOwner", "data": {"owner_field_name": "author_id"}}]. + Defaults to ''[]'' (no node processing beyond the FK fields and composite key if use_composite_key is true). + Ignored for RelationBelongsTo/RelationHasOne/RelationHasMany.'; + +COMMENT ON COLUMN metaschema_modules_public.relation_provision.grants IS 'For RelationManyToMany: array of grant objects for the junction table. Forwarded to provision_table as-is. Each element is a jsonb object with keys: "roles" (text[], required), "privileges" (jsonb[], required — array of [privilege, columns] tuples). Example: [{"roles":["authenticated"],"privileges":[["select","*"],["insert","*"],["delete","*"]]}]. Defaults to ''[]'' (no grants). Ignored for RelationBelongsTo/RelationHasOne.'; + +COMMENT ON COLUMN metaschema_modules_public.relation_provision.policies IS 'For RelationManyToMany: array of policy objects for the junction table. Forwarded to provision_table as-is. Each element is a jsonb object with keys: "$type" (text, required — the Authz* policy generator type), "data" (jsonb, optional — opaque config), "privileges" (text[], optional — e.g. ["select","insert"]; if omitted, derived from grants[] privilege verbs), "policy_role" (text, optional — falls back to first role in first grants[] entry, or ''authenticated''), "permissive" (boolean, optional, defaults to true), "policy_name" (text, optional). Supports multiple policies per row. + Example: [{"$type": "AuthzEntityMembership", "data": {"entity_field": "entity_id", "membership_type": 2}, "privileges": ["select", "insert", "delete"]}]. + Defaults to ''[]'' (no policies — the junction table will have RLS enabled but no policies unless added separately). + Ignored for RelationBelongsTo/RelationHasOne/RelationHasMany.'; + +COMMENT ON COLUMN metaschema_modules_public.relation_provision.out_field_id IS 'Output column for RelationBelongsTo/RelationHasOne/RelationHasMany: the UUID of the FK field created (or found). For BelongsTo/HasOne this is on the source table; for HasMany this is on the target table. Populated by the trigger. NULL for RelationManyToMany. Callers should not set this directly.'; + +COMMENT ON COLUMN metaschema_modules_public.relation_provision.out_junction_table_id IS 'Output column for RelationManyToMany: the UUID of the junction table created (or found). Populated by the trigger. NULL for RelationBelongsTo/RelationHasOne. Callers should not set this directly.'; + +COMMENT ON COLUMN metaschema_modules_public.relation_provision.out_source_field_id IS 'Output column for RelationManyToMany: the UUID of the FK field on the junction table referencing the source table. Populated by the trigger. NULL for RelationBelongsTo/RelationHasOne. Callers should not set this directly.'; + +COMMENT ON COLUMN metaschema_modules_public.relation_provision.out_target_field_id IS 'Output column for RelationManyToMany: the UUID of the FK field on the junction table referencing the target table. Populated by the trigger. NULL for RelationBelongsTo/RelationHasOne. Callers should not set this directly.'; + +CREATE INDEX relation_provision_database_id_idx ON metaschema_modules_public.relation_provision (database_id); + +CREATE INDEX relation_provision_relation_type_idx ON metaschema_modules_public.relation_provision (relation_type); + +CREATE INDEX relation_provision_source_table_id_idx ON metaschema_modules_public.relation_provision (source_table_id); + +CREATE INDEX relation_provision_target_table_id_idx ON metaschema_modules_public.relation_provision (target_table_id); + +CREATE TABLE metaschema_modules_public.blueprint_template ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + name text NOT NULL, + version text NOT NULL DEFAULT '1.0.0', + display_name text NOT NULL, + description text, + owner_id uuid NOT NULL, + visibility text NOT NULL DEFAULT 'private' CHECK (visibility IN ('private', 'public')), + categories text[] NOT NULL DEFAULT '{}', + tags text[] NOT NULL DEFAULT '{}', + definition jsonb NOT NULL, + definition_schema_version text NOT NULL DEFAULT '1', + source text NOT NULL DEFAULT 'user' CHECK (source IN ('user', 'system', 'agent')), + complexity text DEFAULT NULL CHECK ( + complexity IS NULL + OR complexity IN ('simple', 'moderate', 'complex') + ), + copy_count int NOT NULL DEFAULT 0, + fork_count int NOT NULL DEFAULT 0, + forked_from_id uuid DEFAULT NULL, + definition_hash uuid, + table_hashes jsonb, + created_at timestamptz NOT NULL DEFAULT now(), + updated_at timestamptz NOT NULL DEFAULT now(), + CONSTRAINT blueprint_template_unique_owner_name_version + UNIQUE (owner_id, name, version), + CONSTRAINT blueprint_template_forked_from_fkey + FOREIGN KEY(forked_from_id) + REFERENCES metaschema_modules_public.blueprint_template (id) +); + +COMMENT ON TABLE metaschema_modules_public.blueprint_template IS 'A shareable, versioned schema recipe for the blueprint marketplace. Templates define arrays of secure_table_provision + relation_provision inputs that together describe a complete domain schema (e.g. e-commerce, telemedicine, habit tracker). Templates are never executed directly — they are copied into a blueprint first via copy_template_to_blueprint(). Can be private (owner-only) or public (marketplace-visible).'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint_template.id IS 'Unique identifier for this template.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint_template.name IS 'Machine-readable name for the template (e.g. e_commerce_basic). Must be unique per owner + version.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint_template.version IS 'Semantic version string. Defaults to 1.0.0.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint_template.display_name IS 'Human-readable display name for the template (e.g. E-Commerce Basic).'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint_template.description IS 'Optional description of what the template provisions.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint_template.owner_id IS 'The user who created or published this template.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint_template.visibility IS 'Access control for the template. private: only the owner can see and copy. public: anyone can browse and copy from the marketplace. Defaults to private.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint_template.categories IS 'Domain categories for marketplace browsing (e.g. e-commerce, healthcare, social). Defaults to empty array.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint_template.tags IS 'Freeform tags for search and discovery (e.g. products, orders, payments). Defaults to empty array.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint_template.definition IS 'The blueprint definition as a JSONB document. Contains tables[] (each with nodes[] for data behaviors via string shorthand or {"$type": "...", "data": {...}} objects, fields[], grants[], and policies[] using {"$type": "...", "data": {...}}), and relations[] (using $type for relation_type with junction config in data). This is the core payload that gets copied into a blueprint for execution.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint_template.definition_schema_version IS 'Version of the definition format schema. Used for forward-compatible parsing. Defaults to 1.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint_template.source IS 'Provenance of the template. user: manually created by a human. system: official curated template from the Constructive team. agent: AI-generated. Defaults to user.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint_template.complexity IS 'Complexity indicator for marketplace filtering. simple: 3-5 tables. moderate: 6-12 tables. complex: 13+ tables. NULL if not categorized.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint_template.copy_count IS 'Denormalized count of how many blueprints have been created from this template via copy_template_to_blueprint(). Incremented automatically. Defaults to 0.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint_template.fork_count IS 'Denormalized count of how many derivative templates have been forked from this template. Defaults to 0.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint_template.forked_from_id IS 'If this template was forked from another template, the ID of the parent. NULL for original templates.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint_template.created_at IS 'Timestamp when this template was created.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint_template.definition_hash IS 'UUIDv5 Merkle root hash of the definition. Computed automatically via trigger from the ordered table_hashes. Used for content-addressable deduplication, provenance tracking, and cross-blueprint structural comparison. NULL columns are backend-computed — clients should never set this directly.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint_template.table_hashes IS 'JSONB map of table ref names to their individual UUIDv5 content hashes (e.g. {"products": "uuid", "categories": "uuid"}). Each table hash is computed from the canonical jsonb::text of the table entry. Enables structural comparison at the table level across different blueprints. Backend-computed via trigger.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint_template.updated_at IS 'Timestamp when this template was last modified.'; + +CREATE INDEX blueprint_template_owner_id_idx ON metaschema_modules_public.blueprint_template (owner_id); + +CREATE INDEX blueprint_template_visibility_idx ON metaschema_modules_public.blueprint_template (visibility); + +CREATE INDEX blueprint_template_forked_from_id_idx ON metaschema_modules_public.blueprint_template (forked_from_id); + +CREATE INDEX blueprint_template_categories_idx ON metaschema_modules_public.blueprint_template USING gin (categories); + +CREATE INDEX blueprint_template_tags_idx ON metaschema_modules_public.blueprint_template USING gin (tags); + +CREATE INDEX blueprint_template_definition_hash_idx ON metaschema_modules_public.blueprint_template (definition_hash); + +CREATE TABLE metaschema_modules_public.blueprint ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + owner_id uuid NOT NULL, + database_id uuid NOT NULL, + name text NOT NULL, + display_name text NOT NULL, + description text, + definition jsonb NOT NULL, + template_id uuid DEFAULT NULL, + definition_hash uuid, + table_hashes jsonb, + created_at timestamptz NOT NULL DEFAULT now(), + updated_at timestamptz NOT NULL DEFAULT now(), + CONSTRAINT blueprint_unique_database_name + UNIQUE (database_id, name), + CONSTRAINT blueprint_db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT blueprint_template_fkey + FOREIGN KEY(template_id) + REFERENCES metaschema_modules_public.blueprint_template (id) +); + +COMMENT ON TABLE metaschema_modules_public.blueprint IS 'An owned, editable blueprint scoped to a specific database. Created by copying from a blueprint_template via copy_template_to_blueprint() or built from scratch. The owner can customize the definition at any time. Execute it with construct_blueprint() which creates a separate blueprint_construction record to track the build.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint.id IS 'Unique identifier for this blueprint.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint.owner_id IS 'The user who owns this blueprint.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint.database_id IS 'The database this blueprint is scoped to. Tables created by construct_blueprint() are provisioned in this database.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint.name IS 'Machine-readable name for the blueprint. Must be unique per database.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint.display_name IS 'Human-readable display name for the blueprint.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint.description IS 'Optional description of the blueprint.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint.definition IS 'The blueprint definition as a JSONB document. Contains tables[] (each with table_name, optional schema_name, nodes[] for data behaviors, fields[], grants[], and policies[] using $type), relations[] (using $type with source_table/target_table and optional source_schema/target_schema), indexes[] (using table_name + column), and full_text_searches[] (using table_name + field + sources[]). Everything is name-based — no UUIDs in the definition.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint.template_id IS 'If this blueprint was created by copying a template, the ID of the source template. NULL if built from scratch.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint.created_at IS 'Timestamp when this blueprint was created.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint.definition_hash IS 'UUIDv5 Merkle root hash of the definition. Computed automatically via trigger from the ordered table_hashes. Used for content-addressable deduplication and provenance tracking. Backend-computed — clients should never set this directly.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint.table_hashes IS 'JSONB map of table names to their individual UUIDv5 content hashes. Each table hash is computed from the canonical jsonb::text of the table entry. Enables structural comparison at the table level across blueprints and templates. Backend-computed via trigger.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint.updated_at IS 'Timestamp when this blueprint was last modified.'; + +CREATE INDEX blueprint_owner_id_idx ON metaschema_modules_public.blueprint (owner_id); + +CREATE INDEX blueprint_database_id_idx ON metaschema_modules_public.blueprint (database_id); + +CREATE INDEX blueprint_template_id_idx ON metaschema_modules_public.blueprint (template_id); + +CREATE INDEX blueprint_definition_hash_idx ON metaschema_modules_public.blueprint (definition_hash); + +CREATE TABLE metaschema_modules_public.blueprint_construction ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + blueprint_id uuid NOT NULL, + database_id uuid NOT NULL, + schema_id uuid, + status text NOT NULL DEFAULT 'pending' CHECK (status IN ('pending', 'constructing', 'constructed', 'failed')), + error_details text, + table_map jsonb NOT NULL DEFAULT '{}', + constructed_definition jsonb, + constructed_at timestamptz, + created_at timestamptz NOT NULL DEFAULT now(), + updated_at timestamptz NOT NULL DEFAULT now(), + CONSTRAINT blueprint_construction_blueprint_fkey + FOREIGN KEY(blueprint_id) + REFERENCES metaschema_modules_public.blueprint (id) + ON DELETE CASCADE, + CONSTRAINT blueprint_construction_db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE +); + +COMMENT ON TABLE metaschema_modules_public.blueprint_construction IS 'Tracks individual construction attempts of a blueprint. Each time construct_blueprint() is called, a new record is created here. This separates the editable blueprint definition from its build history, allowing blueprints to be re-executed, constructed into multiple databases, and maintain an audit trail of all construction attempts.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint_construction.id IS 'Unique identifier for this construction attempt.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint_construction.blueprint_id IS 'The blueprint that was constructed.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint_construction.database_id IS 'The database the blueprint was constructed into.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint_construction.schema_id IS 'The default schema used for tables that did not specify an explicit schema_name. NULL if not yet resolved.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint_construction.status IS 'Execution state of this construction attempt. pending: created but not yet started. constructing: currently executing. constructed: successfully completed. failed: execution failed (see error_details).'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint_construction.error_details IS 'Error message from a failed construction attempt. NULL unless status is failed.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint_construction.table_map IS 'Mapping of table names to created table UUIDs, populated after successful construction. Format: {"products": "uuid", "categories": "uuid", ...}. Defaults to empty object.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint_construction.constructed_definition IS 'Immutable snapshot of the definition at construct-time. Preserved so the exact definition that was executed is recorded even if the user later modifies the blueprint definition.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint_construction.constructed_at IS 'Timestamp when construction successfully completed. NULL until constructed.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint_construction.created_at IS 'Timestamp when this construction attempt was created.'; + +COMMENT ON COLUMN metaschema_modules_public.blueprint_construction.updated_at IS 'Timestamp when this construction attempt was last modified.'; + +CREATE INDEX blueprint_construction_blueprint_id_idx ON metaschema_modules_public.blueprint_construction (blueprint_id); + +CREATE INDEX blueprint_construction_database_id_idx ON metaschema_modules_public.blueprint_construction (database_id); + +CREATE INDEX blueprint_construction_status_idx ON metaschema_modules_public.blueprint_construction (status); + +CREATE TABLE metaschema_modules_public.storage_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + schema_id uuid NOT NULL DEFAULT uuid_nil(), + private_schema_id uuid NOT NULL DEFAULT uuid_nil(), + buckets_table_id uuid NOT NULL DEFAULT uuid_nil(), + files_table_id uuid NOT NULL DEFAULT uuid_nil(), + buckets_table_name text NOT NULL DEFAULT 'buckets', + files_table_name text NOT NULL DEFAULT 'files', + scope text NOT NULL DEFAULT 'app', + prefix text NOT NULL DEFAULT '', + policies jsonb NULL, + provisions jsonb NULL, + entity_table_id uuid NULL, + endpoint text NULL, + public_url_prefix text NULL, + provider text NULL, + allowed_origins text[] NULL, + restrict_reads boolean NOT NULL DEFAULT false, + has_path_shares boolean NOT NULL DEFAULT false, + path_shares_table_id uuid NULL DEFAULT NULL, + upload_url_expiry_seconds int NULL, + download_url_expiry_seconds int NULL, + default_max_file_size bigint NULL, + max_filename_length int NULL, + cache_ttl_seconds int NULL, + max_bulk_files int NULL, + max_bulk_total_size bigint NULL, + has_versioning boolean NOT NULL DEFAULT false, + has_content_hash boolean NOT NULL DEFAULT false, + has_custom_keys boolean NOT NULL DEFAULT false, + has_audit_log boolean NOT NULL DEFAULT false, + has_confirm_upload boolean NOT NULL DEFAULT false, + confirm_upload_delay interval NOT NULL DEFAULT '30 seconds', + file_events_table_id uuid NULL DEFAULT NULL, + default_permissions text[] DEFAULT NULL, + api_name text DEFAULT 'admin', + private_api_name text DEFAULT NULL, + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT schema_fkey + FOREIGN KEY(schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT private_schema_fkey + FOREIGN KEY(private_schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT buckets_table_fkey + FOREIGN KEY(buckets_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT files_table_fkey + FOREIGN KEY(files_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT entity_table_fkey + FOREIGN KEY(entity_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT path_shares_table_fkey + FOREIGN KEY(path_shares_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT file_events_table_fkey + FOREIGN KEY(file_events_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE +); + +CREATE INDEX storage_module_database_id_idx ON metaschema_modules_public.storage_module (database_id); + +CREATE UNIQUE INDEX storage_module_unique_scope ON metaschema_modules_public.storage_module (database_id, scope, prefix); + +CREATE TABLE metaschema_modules_public.entity_type_provision ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + name text NOT NULL, + prefix text NOT NULL, + description text NOT NULL DEFAULT '', + parent_entity text NOT NULL DEFAULT 'org', + table_name text DEFAULT NULL, + is_visible boolean NOT NULL DEFAULT true, + has_limits boolean NOT NULL DEFAULT false, + has_profiles boolean NOT NULL DEFAULT false, + has_levels boolean NOT NULL DEFAULT false, + has_invites boolean NOT NULL DEFAULT false, + has_invite_achievements boolean NOT NULL DEFAULT false, + storage jsonb DEFAULT NULL, + namespaces jsonb DEFAULT NULL, + functions jsonb DEFAULT NULL, + graphs jsonb DEFAULT NULL, + agents jsonb DEFAULT NULL, + skip_entity_policies boolean NOT NULL DEFAULT false, + table_provision jsonb DEFAULT NULL, + out_membership_type int DEFAULT NULL, + out_entity_table_id uuid DEFAULT NULL, + out_entity_table_name text DEFAULT NULL, + out_installed_modules text[] DEFAULT NULL, + out_storage_module_id uuid DEFAULT NULL, + out_buckets_table_id uuid DEFAULT NULL, + out_files_table_id uuid DEFAULT NULL, + out_path_shares_table_id uuid DEFAULT NULL, + out_invites_module_id uuid DEFAULT NULL, + out_namespace_module_id uuid DEFAULT NULL, + out_namespaces_table_id uuid DEFAULT NULL, + out_namespace_events_table_id uuid DEFAULT NULL, + out_function_module_id uuid DEFAULT NULL, + out_definitions_table_id uuid DEFAULT NULL, + out_invocations_table_id uuid DEFAULT NULL, + out_execution_logs_table_id uuid DEFAULT NULL, + out_secret_definitions_table_id uuid DEFAULT NULL, + out_graph_module_id uuid DEFAULT NULL, + out_graphs_table_id uuid DEFAULT NULL, + out_agent_module_id uuid DEFAULT NULL, + CONSTRAINT entity_type_provision_unique_prefix + UNIQUE (database_id, prefix), + CONSTRAINT entity_type_provision_db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE +); + +COMMENT ON TABLE metaschema_modules_public.entity_type_provision IS 'Provisions a new membership entity type. Each INSERT creates an entity table, registers a membership type, + and installs the required modules (permissions, memberships, limits) plus optional modules (profiles, levels, invites). + Uses provision_membership_table() internally. Graceful: duplicate (database_id, prefix) pairs are silently skipped + via the unique constraint (use INSERT ... ON CONFLICT DO NOTHING). + Policy behavior: by default the five entity-table RLS policies are applied (gated by is_visible). + Set table_provision to a single jsonb object (using the same shape as provision_table() / + blueprint tables[] entries) to replace the defaults with your own; set skip_entity_policies=true + as an escape hatch to apply zero policies.'; + +COMMENT ON COLUMN metaschema_modules_public.entity_type_provision.id IS 'Unique identifier for this provision row.'; + +COMMENT ON COLUMN metaschema_modules_public.entity_type_provision.database_id IS 'The database to provision this entity type in. Required.'; + +COMMENT ON COLUMN metaschema_modules_public.entity_type_provision.name IS 'Human-readable name for this entity type, e.g. ''Data Room'', ''Team Channel''. Required. + Stored in the entity_types registry table.'; + +COMMENT ON COLUMN metaschema_modules_public.entity_type_provision.prefix IS 'SQL prefix used for table and module naming, e.g. ''data_room'', ''team_channel''. Required. + Drives entity table name (prefix || ''s'' by default), module labels (permissions_module:prefix), + and membership table names (prefix_memberships, prefix_members, etc.). + Must be unique per database — the (database_id, prefix) constraint ensures graceful ON CONFLICT DO NOTHING.'; + +COMMENT ON COLUMN metaschema_modules_public.entity_type_provision.description IS 'Description of this entity type. Stored in the entity_types registry table. Defaults to empty string.'; + +COMMENT ON COLUMN metaschema_modules_public.entity_type_provision.parent_entity IS 'Prefix of the parent entity type. The trigger resolves this to a membership_type integer + by looking up memberships_module WHERE prefix = parent_entity. + Defaults to ''org'' (the organization-level type). For nested types, set to the parent''s prefix + (e.g. ''data_room'' for a team_channel nested under data_room). + The parent type must already be provisioned before this INSERT.'; + +COMMENT ON COLUMN metaschema_modules_public.entity_type_provision.table_name IS 'Override the entity table name. When NULL (default), the table name is derived as prefix || ''s'' + (e.g. prefix ''data_room'' produces table ''data_rooms''). + Set this when the pluralization rule doesn''t apply (e.g. prefix ''staff'' should produce ''staff'' not ''staffs'').'; + +COMMENT ON COLUMN metaschema_modules_public.entity_type_provision.is_visible IS 'Whether members of the parent entity can see child entities. Defaults to true. + When true: a SELECT policy allows parent members to list child entities (e.g. org members can see all data rooms). + When false: only direct members of the entity itself can see it (private entity mode). + Controls whether the parent_member SELECT policy is created on the entity table. + Only meaningful on the defaults path — ignored (no-op) when table_provision is non-NULL or + skip_entity_policies=true, since no default policies are being applied in those cases.'; + +COMMENT ON COLUMN metaschema_modules_public.entity_type_provision.has_limits IS 'Whether to apply limits_module security for this type. Defaults to false. + The limits_module table structure is always created (memberships_module requires it), + but when false, no RLS policies are applied to the limits tables. + Set to true if this entity type needs configurable resource limits per membership.'; + +COMMENT ON COLUMN metaschema_modules_public.entity_type_provision.has_profiles IS 'Whether to provision profiles_module for this type. Defaults to false. + Profiles provide named permission roles (e.g. ''Editor'', ''Viewer'') with pre-configured permission bitmasks. + When true, creates profile tables and applies profiles security.'; + +COMMENT ON COLUMN metaschema_modules_public.entity_type_provision.has_levels IS 'Whether to provision events_module for this type. Defaults to false. + Levels provide gamification/achievement tracking for members. + When true, creates level steps, achievements, and level tables with security.'; + +COMMENT ON COLUMN metaschema_modules_public.entity_type_provision.has_invites IS 'Whether to provision invites_module for this type. Defaults to false. + When true, the trigger inserts a row into invites_module which in turn + (via insert_invites_module BEFORE INSERT) creates {prefix}_invites and + {prefix}_claimed_invites tables plus the submit_{prefix}_invite_code() function. + Re-provisioning is idempotent: the UNIQUE (database_id, membership_type) constraint + on invites_module combined with ON CONFLICT DO NOTHING in the fan-out makes + repeated INSERTs safe.'; + +COMMENT ON COLUMN metaschema_modules_public.entity_type_provision.has_invite_achievements IS 'Whether to auto-attach an EventTracker to the claimed_invites table for invite-based + achievements. Defaults to false. Requires has_invites=true AND has_levels=true. + When true, the trigger calls event_tracker() on the claimed_invites table with + event_name=''invite_claimed'', actor_field=''sender_id'', events=[''INSERT''], + crediting the SENDER (inviter) when someone claims their invite code. + Developers can then define achievements in the blueprint achievements[] section + that reference the ''invite_claimed'' event (e.g., "Invite 5 friends" = count: 5).'; + +COMMENT ON COLUMN metaschema_modules_public.entity_type_provision.skip_entity_policies IS 'Escape hatch: when true, apply zero RLS policies to the entity table. Defaults to false. + Use this only when you want the entity table provisioned with zero policies (e.g. because you + plan to insert secure_table_provision rows yourself later). In most cases, prefer leaving this + false and either accepting the five defaults (table_provision=NULL) or overriding them via + table_provision. + Defaults (applied when table_provision IS NULL and skip_entity_policies=false): + - SELECT (parent_member): parent entity members can see child entities (only when is_visible=true) + - SELECT (self_member): direct members of the entity can see it + - INSERT: create_entity permission on the parent entity + - UPDATE: admin_entity permission on the entity itself + - DELETE: owner of the entity can delete it'; + +COMMENT ON COLUMN metaschema_modules_public.entity_type_provision.table_provision IS 'Single jsonb object describing the full security setup to apply to the entity table. + Uses the same vocabulary as metaschema_modules_public.provision_table() and blueprint tables[] + entries, so an entity table is configured the same way an ordinary blueprint table is. + Defaults to NULL; when non-NULL, the five default policies are implicitly replaced by + table_provision.policies[] (is_visible becomes a no-op on this path). + Recognized keys (all optional): + - use_rls (boolean, default true) + - nodes (jsonb array of {"$type","data"} Data* module entries) + - fields (jsonb array of field objects: name,type,is_required,default,min,max,regexp,index) + - grants (jsonb array of grant objects; each with roles[] and privileges[]) + - policies (jsonb array of policy objects; each with $type, privileges, data, name, role, permissive) + The trigger forwards all setup (nodes/fields/grants/policies) as a single secure_table_provision row + against the newly created entity table. + Example — override with two SELECT policies: + table_provision := jsonb_build_object( + ''policies'', jsonb_build_array( + jsonb_build_object( + ''$type'', ''AuthzEntityMembership'', + ''privileges'', jsonb_build_array(''select''), + ''data'', jsonb_build_object(''entity_field'', ''id'', ''membership_type'', 3), + ''name'', ''self_member'' + ), + jsonb_build_object( + ''$type'', ''AuthzDirectOwner'', + ''privileges'', jsonb_build_array(''select'', ''update''), + ''data'', jsonb_build_object(''owner_field'', ''owner_id'') + ) + ) + )'; + +COMMENT ON COLUMN metaschema_modules_public.entity_type_provision.out_membership_type IS 'Output: the auto-assigned integer membership type ID. Populated by the trigger after successful provisioning. + This is the ID used in entity_types, memberships_module, and all module tables.'; + +COMMENT ON COLUMN metaschema_modules_public.entity_type_provision.out_entity_table_id IS 'Output: the UUID of the created entity table. Populated by the trigger. + Use this to reference the entity table in subsequent relation_provision or secure_table_provision rows.'; + +COMMENT ON COLUMN metaschema_modules_public.entity_type_provision.out_entity_table_name IS 'Output: the name of the created entity table (e.g. ''data_rooms''). Populated by the trigger.'; + +COMMENT ON COLUMN metaschema_modules_public.entity_type_provision.out_installed_modules IS 'Output: array of installed module labels (e.g. ARRAY[''permissions_module:data_room'', ''memberships_module:data_room'', ''invites_module:data_room'']). + Populated by the trigger. Useful for verifying which modules were provisioned.'; + +COMMENT ON COLUMN metaschema_modules_public.entity_type_provision.storage IS 'Optional JSON array of storage module definitions. Presence triggers provisioning + (same inference model as namespaces, functions, agents). + Each element provisions a separate storage module with its own tables + ({prefix}_{key}_buckets/files), RLS policies, and feature flags. + NULL = do not provision storage. ''[{}]'' = provision one default storage module. + Each array element recognizes (all optional): + - key (text) module discriminator, max 16 chars, lowercase snake_case. + Defaults to ''default'' (omitted from table names). + Non-default keys become infixes: {prefix}_{key}_buckets. + (storage_key accepted for backward compat) + - upload_url_expiry_seconds (integer) presigned PUT URL expiry override + - download_url_expiry_seconds (integer) presigned GET URL expiry override + - default_max_file_size (bigint) global max file size in bytes for this module + - allowed_origins (text[]) default CORS origins for all buckets in this module + - restrict_reads (boolean) require read_files permission for SELECT on files + - has_path_shares (boolean) enable virtual filesystem + path share policies + - has_versioning (boolean) enable file version chains + - has_content_hash (boolean) enable content hash for dedup + - has_custom_keys (boolean) allow client-provided S3 keys + - has_audit_log (boolean) enable file events audit table + - has_confirm_upload (boolean) enable HeadObject confirmation flow + - confirm_upload_delay (interval) delay before first confirmation attempt + - buckets (jsonb[]) array of initial bucket definitions to seed. + Each bucket: { name (required), description, is_public, allowed_mime_types, max_file_size, allowed_origins } + - provisions (jsonb object) per-table customization keyed by "files" or "buckets". + Each value: { nodes, fields, grants, use_rls, policies }. + Example (single module, backward compat): + storage := ''[{"buckets": [{"name": "documents"}]}]''::jsonb + Example (multi-module): + storage := ''[{"has_path_shares": true, "buckets": [{"name": "documents"}]}, {"key": "fn", "has_custom_keys": true, "buckets": [{"name": "functions"}]}]''::jsonb'; + +COMMENT ON COLUMN metaschema_modules_public.entity_type_provision.out_storage_module_id IS 'Output: the UUID of the storage_module row created for this entity type. Populated by the trigger when storage is non-NULL and non-empty.'; + +COMMENT ON COLUMN metaschema_modules_public.entity_type_provision.out_buckets_table_id IS 'Output: the UUID of the generated buckets table (e.g. data_room_buckets). Populated by the trigger when storage is non-NULL and non-empty.'; + +COMMENT ON COLUMN metaschema_modules_public.entity_type_provision.out_files_table_id IS 'Output: the UUID of the generated files table (e.g. data_room_files). Populated by the trigger when storage is non-NULL and non-empty.'; + +COMMENT ON COLUMN metaschema_modules_public.entity_type_provision.out_invites_module_id IS 'Output: the UUID of the invites_module row created for this entity type. Populated by the trigger when has_invites=true. + NULL when has_invites=false, or when re-provisioning hits ON CONFLICT DO NOTHING + (i.e. the invites_module row was created in a previous run).'; + +COMMENT ON COLUMN metaschema_modules_public.entity_type_provision.namespaces IS 'Optional JSON array of namespace module definitions. Presence triggers provisioning. + NULL = do not provision namespaces. ''[{}]'' = provision one default namespace module. + Each element recognizes (all optional): + - key (text) module discriminator. Defaults to ''default''. + - policies (jsonb array) RLS policy overrides. NULL = apply defaults from apply_namespace_security(). + Creates {prefix}_namespaces (or {prefix}_{key}_namespaces for non-default keys) + with entity-scoped RLS (AuthzEntityMembership) and a rename proxy trigger. + Registers manage_namespaces permission bit on first provision. + Example: namespaces := ''[{}]''::jsonb'; + +COMMENT ON COLUMN metaschema_modules_public.entity_type_provision.functions IS 'Optional JSON array of function module definitions. Presence triggers provisioning. + NULL = do not provision functions. ''[{}]'' = provision one default function module. + Each element recognizes (all optional): + - key (text) module discriminator. Defaults to ''default''. + - policies (jsonb array) RLS policy overrides. NULL = apply defaults from apply_function_security(). + Creates {prefix}_function_definitions (or {prefix}_{key}_function_definitions for non-default keys) + with entity-scoped RLS and a job trigger dispatching function:provision tasks. + Registers manage_functions + invoke_functions permission bits on first provision. + Example: functions := ''[{}]''::jsonb'; + +COMMENT ON COLUMN metaschema_modules_public.entity_type_provision.graphs IS 'Optional JSON array of graph module definitions. Presence triggers provisioning. + NULL = do not provision graphs. ''[{}]'' = provision one default graph module. + Each element recognizes (all optional): + - key (text) module discriminator. Defaults to ''default''. + - policies (jsonb array) RLS policy overrides. NULL = apply defaults from apply_graph_security(). + Registers manage_graphs + execute_graphs permission bits on first provision. + Graph module requires a merkle_store_module_id dependency, so entity_type_provision + only registers permissions here. The graph module itself must be provisioned + separately with the merkle store dependency resolved. + Example: graphs := ''[{}]''::jsonb'; + +COMMENT ON COLUMN metaschema_modules_public.entity_type_provision.out_namespace_module_id IS 'Output: the UUID of the namespace_module row created (or found) for this entity type. + Populated by the trigger when namespaces is non-NULL. NULL otherwise.'; + +COMMENT ON COLUMN metaschema_modules_public.entity_type_provision.out_namespaces_table_id IS 'Output: the UUID of the generated namespaces table (e.g. data_room_namespaces). + Populated by the trigger when namespaces is non-NULL. NULL otherwise.'; + +COMMENT ON COLUMN metaschema_modules_public.entity_type_provision.out_namespace_events_table_id IS 'Output: the UUID of the generated namespace_events partitioned table (e.g. data_room_namespace_events). + Monthly partitioned, 12-month retention. Populated by the trigger when namespaces is non-NULL. NULL otherwise.'; + +CREATE TABLE metaschema_modules_public.rate_limits_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + schema_id uuid NOT NULL DEFAULT uuid_nil(), + rate_limit_settings_table_id uuid NOT NULL DEFAULT uuid_nil(), + ip_rate_limits_table_id uuid NOT NULL DEFAULT uuid_nil(), + rate_limits_table_id uuid NOT NULL DEFAULT uuid_nil(), + rate_limit_settings_table text NOT NULL DEFAULT 'app_settings_rate_limit', + ip_rate_limits_table text NOT NULL DEFAULT 'auth_ip_rate_limits', + rate_limits_table text NOT NULL DEFAULT 'auth_rate_limits', + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT schema_fkey + FOREIGN KEY(schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT rate_limit_settings_table_fkey + FOREIGN KEY(rate_limit_settings_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT ip_rate_limits_table_fkey + FOREIGN KEY(ip_rate_limits_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT rate_limits_table_fkey + FOREIGN KEY(rate_limits_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT rate_limits_module_database_id_uniq + UNIQUE (database_id) +); + +CREATE INDEX rate_limits_module_database_id_idx ON metaschema_modules_public.rate_limits_module (database_id); + +COMMENT ON CONSTRAINT rate_limit_settings_table_fkey ON metaschema_modules_public.rate_limits_module IS '@fieldName rateLimitSettingsTableByRateLimitSettingsTableId'; + +COMMENT ON CONSTRAINT ip_rate_limits_table_fkey ON metaschema_modules_public.rate_limits_module IS '@fieldName ipRateLimitsTableByIpRateLimitsTableId'; + +COMMENT ON CONSTRAINT rate_limits_table_fkey ON metaschema_modules_public.rate_limits_module IS '@fieldName rateLimitsTableByRateLimitsTableId'; + +CREATE TABLE metaschema_modules_public.devices_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + schema_id uuid NOT NULL DEFAULT uuid_nil(), + user_devices_table_id uuid NOT NULL DEFAULT uuid_nil(), + device_settings_table_id uuid NOT NULL DEFAULT uuid_nil(), + user_devices_table text NOT NULL DEFAULT 'auth_user_devices', + device_settings_table text NOT NULL DEFAULT 'app_settings_device', + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT schema_fkey + FOREIGN KEY(schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT user_devices_table_fkey + FOREIGN KEY(user_devices_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT device_settings_table_fkey + FOREIGN KEY(device_settings_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT devices_module_database_id_uniq + UNIQUE (database_id) +); + +CREATE INDEX devices_module_database_id_idx ON metaschema_modules_public.devices_module (database_id); + +COMMENT ON CONSTRAINT user_devices_table_fkey ON metaschema_modules_public.devices_module IS '@fieldName userDevicesTableByUserDevicesTableId'; + +COMMENT ON CONSTRAINT device_settings_table_fkey ON metaschema_modules_public.devices_module IS '@fieldName deviceSettingsTableByDeviceSettingsTableId'; + +CREATE TABLE metaschema_modules_public.session_secrets_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + schema_id uuid NOT NULL DEFAULT uuid_nil(), + table_id uuid NOT NULL DEFAULT uuid_nil(), + table_name text NOT NULL DEFAULT 'session_secrets', + sessions_table_id uuid NOT NULL DEFAULT uuid_nil(), + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT schema_fkey + FOREIGN KEY(schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT table_fkey + FOREIGN KEY(table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT sessions_table_fkey + FOREIGN KEY(sessions_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE +); + +CREATE INDEX session_secrets_module_database_id_idx ON metaschema_modules_public.session_secrets_module (database_id); + +CREATE INDEX session_secrets_module_schema_id_idx ON metaschema_modules_public.session_secrets_module (schema_id); + +CREATE INDEX session_secrets_module_table_id_idx ON metaschema_modules_public.session_secrets_module (table_id); + +CREATE INDEX session_secrets_module_sessions_table_id_idx ON metaschema_modules_public.session_secrets_module (sessions_table_id); + +COMMENT ON TABLE metaschema_modules_public.session_secrets_module IS 'Config row for the session_secrets_module, which provisions a DB-private, session-scoped ephemeral key-value store for challenges, nonces, and one-time tokens that must never be readable by end users.'; + +COMMENT ON COLUMN metaschema_modules_public.session_secrets_module.sessions_table_id IS 'Resolved reference to sessions_module.sessions_table, used to FK session_secrets.session_id with ON DELETE CASCADE.'; + +CREATE TABLE metaschema_modules_public.webauthn_credentials_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + schema_id uuid NOT NULL DEFAULT uuid_nil(), + private_schema_id uuid NOT NULL DEFAULT uuid_nil(), + table_id uuid NOT NULL DEFAULT uuid_nil(), + owner_table_id uuid NOT NULL DEFAULT uuid_nil(), + table_name text NOT NULL DEFAULT 'webauthn_credentials', + api_name text DEFAULT 'auth', + private_api_name text DEFAULT NULL, + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT table_fkey + FOREIGN KEY(table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT owner_table_fkey + FOREIGN KEY(owner_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT schema_fkey + FOREIGN KEY(schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT private_schema_fkey + FOREIGN KEY(private_schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE +); + +CREATE INDEX webauthn_credentials_module_database_id_idx ON metaschema_modules_public.webauthn_credentials_module (database_id); + +COMMENT ON TABLE metaschema_modules_public.webauthn_credentials_module IS 'Config row for the webauthn_credentials_module, which provisions the per-user WebAuthn/passkey credentials table (public key, counter, transports, device type, backup state) mirroring crypto_addresses_module. The sibling webauthn_auth_module holds RP config and the registration/sign-in challenge state.'; + +COMMENT ON COLUMN metaschema_modules_public.webauthn_credentials_module.private_schema_id IS 'Private schema that hosts SECURITY DEFINER helpers which write to webauthn_credentials (registration / counter-bump / delete).'; + +CREATE TABLE metaschema_modules_public.webauthn_auth_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + schema_id uuid NOT NULL DEFAULT uuid_nil(), + users_table_id uuid NOT NULL DEFAULT uuid_nil(), + credentials_table_id uuid NOT NULL DEFAULT uuid_nil(), + sessions_table_id uuid NOT NULL DEFAULT uuid_nil(), + session_credentials_table_id uuid NOT NULL DEFAULT uuid_nil(), + session_secrets_table_id uuid NOT NULL DEFAULT uuid_nil(), + auth_settings_table_id uuid NOT NULL DEFAULT uuid_nil(), + rp_id text NOT NULL DEFAULT '', + rp_name text NOT NULL DEFAULT '', + origin_allowlist text[] NOT NULL DEFAULT '{}', + attestation_type text NOT NULL DEFAULT 'none' CHECK (attestation_type IN ('none', 'indirect', 'direct', 'enterprise')), + require_user_verification boolean NOT NULL DEFAULT false, + resident_key text NOT NULL DEFAULT 'required' CHECK (resident_key IN ('discouraged', 'preferred', 'required')), + challenge_expiry interval NOT NULL DEFAULT '5 minutes', + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT schema_fkey + FOREIGN KEY(schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT users_table_fkey + FOREIGN KEY(users_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT credentials_table_fkey + FOREIGN KEY(credentials_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT sessions_table_fkey + FOREIGN KEY(sessions_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT session_credentials_table_fkey + FOREIGN KEY(session_credentials_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT session_secrets_table_fkey + FOREIGN KEY(session_secrets_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT auth_settings_table_fkey + FOREIGN KEY(auth_settings_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE +); + +CREATE INDEX webauthn_auth_module_database_id_idx ON metaschema_modules_public.webauthn_auth_module (database_id); + +CREATE TABLE metaschema_modules_public.identity_providers_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + schema_id uuid NOT NULL DEFAULT uuid_nil(), + private_schema_id uuid NOT NULL DEFAULT uuid_nil(), + table_id uuid NOT NULL DEFAULT uuid_nil(), + table_name text NOT NULL DEFAULT 'identity_providers', + api_name text DEFAULT 'auth', + private_api_name text DEFAULT NULL, + scope text NOT NULL DEFAULT 'app', + prefix text NOT NULL DEFAULT '', + entity_table_id uuid NULL, + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT table_fkey + FOREIGN KEY(table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT schema_fkey + FOREIGN KEY(schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT private_schema_fkey + FOREIGN KEY(private_schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT entity_table_fkey + FOREIGN KEY(entity_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE +); + +CREATE INDEX identity_providers_module_database_id_idx ON metaschema_modules_public.identity_providers_module (database_id); + +CREATE INDEX identity_providers_module_schema_id_idx ON metaschema_modules_public.identity_providers_module (schema_id); + +CREATE INDEX identity_providers_module_private_schema_id_idx ON metaschema_modules_public.identity_providers_module (private_schema_id); + +CREATE INDEX identity_providers_module_table_id_idx ON metaschema_modules_public.identity_providers_module (table_id); + +CREATE UNIQUE INDEX identity_providers_module_unique_scope ON metaschema_modules_public.identity_providers_module (database_id, scope); + +COMMENT ON TABLE metaschema_modules_public.identity_providers_module IS 'Entity-aware config row for the identity_providers_module, which provisions a per-database + identity_providers table holding OAuth2 / OIDC (and future SAML) provider definitions. + The scope column determines which config_secrets_module table the rotate proc targets + (app_secrets for app scope, org_secrets for org scope). When scope = platform, + the secrets table gets a database_id column and platform-level RLS via + AuthzRelatedEntityMembership through database.owner_id. + Scoping matrix: + scope=app → per-database flat, in-app admin manages + scope=platform → per-database, platform admin manages (generate:constructive) + scope=org → per-org tenant, org admin manages'; + +COMMENT ON COLUMN metaschema_modules_public.identity_providers_module.private_schema_id IS 'Private schema that hosts SECURITY DEFINER admin helpers which write to identity_providers (create / update / enable / disable / rotate-secret / delete) and the per-app quota check.'; + +CREATE TABLE metaschema_modules_public.notifications_module ( + id uuid PRIMARY KEY DEFAULT uuid_generate_v4(), + database_id uuid NOT NULL, + schema_id uuid NOT NULL DEFAULT uuid_nil(), + private_schema_id uuid NOT NULL DEFAULT uuid_nil(), + notifications_table_id uuid NOT NULL DEFAULT uuid_nil(), + read_state_table_id uuid NOT NULL DEFAULT uuid_nil(), + preferences_table_id uuid, + channels_table_id uuid, + delivery_log_table_id uuid, + owner_table_id uuid NOT NULL DEFAULT uuid_nil(), + user_settings_table_id uuid, + organization_settings_table_id uuid, + has_channels boolean NOT NULL DEFAULT true, + has_preferences boolean NOT NULL DEFAULT true, + has_settings_extension boolean NOT NULL DEFAULT false, + has_digest_metadata boolean NOT NULL DEFAULT false, + has_subscriptions boolean NOT NULL DEFAULT false, + default_permissions text[] DEFAULT NULL, + api_name text DEFAULT 'notifications', + private_api_name text DEFAULT NULL, + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT notifications_table_fkey + FOREIGN KEY(notifications_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT read_state_table_fkey + FOREIGN KEY(read_state_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT preferences_table_fkey + FOREIGN KEY(preferences_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE SET NULL, + CONSTRAINT channels_table_fkey + FOREIGN KEY(channels_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE SET NULL, + CONSTRAINT delivery_log_table_fkey + FOREIGN KEY(delivery_log_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE SET NULL, + CONSTRAINT owner_table_fkey + FOREIGN KEY(owner_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT user_settings_table_fkey + FOREIGN KEY(user_settings_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE SET NULL, + CONSTRAINT organization_settings_table_fkey + FOREIGN KEY(organization_settings_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE SET NULL, + CONSTRAINT schema_fkey + FOREIGN KEY(schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT private_schema_fkey + FOREIGN KEY(private_schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE +); + +COMMENT ON CONSTRAINT schema_fkey ON metaschema_modules_public.notifications_module IS '@omit manyToMany'; + +COMMENT ON CONSTRAINT private_schema_fkey ON metaschema_modules_public.notifications_module IS '@omit manyToMany'; + +COMMENT ON CONSTRAINT notifications_table_fkey ON metaschema_modules_public.notifications_module IS '@fieldName notificationsTableByNotificationsTableId +@omit manyToMany'; + +COMMENT ON CONSTRAINT read_state_table_fkey ON metaschema_modules_public.notifications_module IS '@fieldName readStateTableByReadStateTableId +@omit manyToMany'; + +COMMENT ON CONSTRAINT preferences_table_fkey ON metaschema_modules_public.notifications_module IS '@fieldName preferencesTableByPreferencesTableId +@omit manyToMany'; + +COMMENT ON CONSTRAINT channels_table_fkey ON metaschema_modules_public.notifications_module IS '@fieldName channelsTableByChannelsTableId +@omit manyToMany'; + +COMMENT ON CONSTRAINT delivery_log_table_fkey ON metaschema_modules_public.notifications_module IS '@fieldName deliveryLogTableByDeliveryLogTableId +@omit manyToMany'; + +COMMENT ON CONSTRAINT owner_table_fkey ON metaschema_modules_public.notifications_module IS '@omit manyToMany'; + +COMMENT ON CONSTRAINT user_settings_table_fkey ON metaschema_modules_public.notifications_module IS '@fieldName userSettingsTableByUserSettingsTableId +@omit manyToMany'; + +COMMENT ON CONSTRAINT organization_settings_table_fkey ON metaschema_modules_public.notifications_module IS '@fieldName organizationSettingsTableByOrganizationSettingsTableId +@omit manyToMany'; + +COMMENT ON CONSTRAINT db_fkey ON metaschema_modules_public.notifications_module IS '@omit manyToMany'; + +CREATE INDEX notifications_module_database_id_idx ON metaschema_modules_public.notifications_module (database_id); + +CREATE TABLE metaschema_modules_public.plans_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + schema_id uuid NOT NULL DEFAULT uuid_nil(), + private_schema_id uuid NOT NULL DEFAULT uuid_nil(), + plans_table_id uuid NOT NULL DEFAULT uuid_nil(), + plans_table_name text NOT NULL DEFAULT '', + plan_limits_table_id uuid NOT NULL DEFAULT uuid_nil(), + plan_limits_table_name text NOT NULL DEFAULT '', + plan_pricing_table_id uuid NULL, + plan_overrides_table_id uuid NULL, + plan_meter_limits_table_id uuid NULL, + plan_caps_table_id uuid NULL, + apply_plan_function text NOT NULL DEFAULT '', + apply_plan_aggregate_function text NOT NULL DEFAULT '', + apply_billing_plan_function text NULL, + apply_plan_caps_function text NULL, + prefix text NULL, + api_name text DEFAULT 'usage', + private_api_name text DEFAULT NULL, + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT schema_fkey + FOREIGN KEY(schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT private_schema_fkey + FOREIGN KEY(private_schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT plans_table_fkey + FOREIGN KEY(plans_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT plan_limits_table_fkey + FOREIGN KEY(plan_limits_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT plan_pricing_table_fkey + FOREIGN KEY(plan_pricing_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT plan_overrides_table_fkey + FOREIGN KEY(plan_overrides_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT plan_meter_limits_table_fkey + FOREIGN KEY(plan_meter_limits_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT plan_caps_table_fkey + FOREIGN KEY(plan_caps_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT plans_module_database_id_unique + UNIQUE (database_id) +); + +CREATE INDEX plans_module_database_id_idx ON metaschema_modules_public.plans_module (database_id); + +CREATE TABLE metaschema_modules_public.billing_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + schema_id uuid NOT NULL DEFAULT uuid_nil(), + private_schema_id uuid NOT NULL DEFAULT uuid_nil(), + meters_table_id uuid NOT NULL DEFAULT uuid_nil(), + meters_table_name text NOT NULL DEFAULT '', + plan_subscriptions_table_id uuid NOT NULL DEFAULT uuid_nil(), + plan_subscriptions_table_name text NOT NULL DEFAULT '', + ledger_table_id uuid NOT NULL DEFAULT uuid_nil(), + ledger_table_name text NOT NULL DEFAULT '', + balances_table_id uuid NOT NULL DEFAULT uuid_nil(), + balances_table_name text NOT NULL DEFAULT '', + meter_credits_table_id uuid NOT NULL DEFAULT uuid_nil(), + meter_credits_table_name text NOT NULL DEFAULT '', + meter_sources_table_id uuid NOT NULL DEFAULT uuid_nil(), + meter_sources_table_name text NOT NULL DEFAULT '', + meter_defaults_table_id uuid NOT NULL DEFAULT uuid_nil(), + meter_defaults_table_name text NOT NULL DEFAULT '', + record_usage_function text NOT NULL DEFAULT '', + prefix text NULL, + default_permissions text[] DEFAULT NULL, + api_name text DEFAULT 'usage', + private_api_name text DEFAULT NULL, + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT schema_fkey + FOREIGN KEY(schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT private_schema_fkey + FOREIGN KEY(private_schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT meters_table_fkey + FOREIGN KEY(meters_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT plan_subscriptions_table_fkey + FOREIGN KEY(plan_subscriptions_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT ledger_table_fkey + FOREIGN KEY(ledger_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT balances_table_fkey + FOREIGN KEY(balances_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT meter_credits_table_fkey + FOREIGN KEY(meter_credits_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT meter_sources_table_fkey + FOREIGN KEY(meter_sources_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT meter_defaults_table_fkey + FOREIGN KEY(meter_defaults_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT billing_module_database_id_unique + UNIQUE (database_id) +); + +CREATE INDEX billing_module_database_id_idx ON metaschema_modules_public.billing_module (database_id); + +CREATE TABLE metaschema_modules_public.billing_provider_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + schema_id uuid NOT NULL DEFAULT uuid_nil(), + private_schema_id uuid NOT NULL DEFAULT uuid_nil(), + provider text NOT NULL DEFAULT 'stripe', + products_table_id uuid NULL, + prices_table_id uuid NULL, + subscriptions_table_id uuid NULL, + billing_customers_table_id uuid NOT NULL DEFAULT uuid_nil(), + billing_customers_table_name text NOT NULL DEFAULT '', + billing_products_table_id uuid NOT NULL DEFAULT uuid_nil(), + billing_products_table_name text NOT NULL DEFAULT '', + billing_prices_table_id uuid NOT NULL DEFAULT uuid_nil(), + billing_prices_table_name text NOT NULL DEFAULT '', + billing_subscriptions_table_id uuid NOT NULL DEFAULT uuid_nil(), + billing_subscriptions_table_name text NOT NULL DEFAULT '', + billing_webhook_events_table_id uuid NOT NULL DEFAULT uuid_nil(), + billing_webhook_events_table_name text NOT NULL DEFAULT '', + process_billing_event_function text NOT NULL DEFAULT '', + prefix text NULL, + api_name text DEFAULT NULL, + private_api_name text DEFAULT NULL, + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT schema_fkey + FOREIGN KEY(schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT private_schema_fkey + FOREIGN KEY(private_schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT billing_customers_table_fkey + FOREIGN KEY(billing_customers_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT billing_products_table_fkey + FOREIGN KEY(billing_products_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT billing_prices_table_fkey + FOREIGN KEY(billing_prices_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT billing_subscriptions_table_fkey + FOREIGN KEY(billing_subscriptions_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT billing_webhook_events_table_fkey + FOREIGN KEY(billing_webhook_events_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT products_table_fkey + FOREIGN KEY(products_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE SET NULL, + CONSTRAINT prices_table_fkey + FOREIGN KEY(prices_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE SET NULL, + CONSTRAINT subscriptions_table_fkey + FOREIGN KEY(subscriptions_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE SET NULL, + CONSTRAINT billing_provider_module_database_id_unique + UNIQUE (database_id) +); + +CREATE INDEX billing_provider_module_database_id_idx ON metaschema_modules_public.billing_provider_module (database_id); + +CREATE TABLE metaschema_modules_public.realtime_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + schema_id uuid NOT NULL DEFAULT uuid_nil(), + private_schema_id uuid NOT NULL DEFAULT uuid_nil(), + subscriptions_schema_id uuid NOT NULL DEFAULT uuid_nil(), + change_log_table_id uuid NOT NULL DEFAULT uuid_nil(), + listener_node_table_id uuid NOT NULL DEFAULT uuid_nil(), + source_registry_table_id uuid NOT NULL DEFAULT uuid_nil(), + retention_hours int NOT NULL DEFAULT 168, + premake int NOT NULL DEFAULT 7, + interval text NOT NULL DEFAULT '1 day', + notify_channel text NULL, + api_name text DEFAULT 'realtime', + private_api_name text DEFAULT NULL, + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT schema_fkey + FOREIGN KEY(schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT private_schema_fkey + FOREIGN KEY(private_schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT subscriptions_schema_fkey + FOREIGN KEY(subscriptions_schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT change_log_table_fkey + FOREIGN KEY(change_log_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT listener_node_table_fkey + FOREIGN KEY(listener_node_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT source_registry_table_fkey + FOREIGN KEY(source_registry_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE +); + +CREATE INDEX realtime_module_database_id_idx ON metaschema_modules_public.realtime_module (database_id); + +CREATE UNIQUE INDEX realtime_module_unique_per_db ON metaschema_modules_public.realtime_module (database_id); + +CREATE INDEX realtime_module_schema_id_idx ON metaschema_modules_public.realtime_module (schema_id); + +CREATE INDEX realtime_module_private_schema_id_idx ON metaschema_modules_public.realtime_module (private_schema_id); + +CREATE INDEX realtime_module_subscriptions_schema_id_idx ON metaschema_modules_public.realtime_module (subscriptions_schema_id); + +CREATE INDEX realtime_module_change_log_table_id_idx ON metaschema_modules_public.realtime_module (change_log_table_id); + +CREATE INDEX realtime_module_listener_node_table_id_idx ON metaschema_modules_public.realtime_module (listener_node_table_id); + +CREATE INDEX realtime_module_source_registry_table_id_idx ON metaschema_modules_public.realtime_module (source_registry_table_id); + +CREATE TABLE metaschema_modules_public.rate_limit_meters_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + schema_id uuid NOT NULL DEFAULT uuid_nil(), + private_schema_id uuid NOT NULL DEFAULT uuid_nil(), + rate_limit_state_table_id uuid NOT NULL DEFAULT uuid_nil(), + rate_limit_state_table_name text NOT NULL DEFAULT '', + rate_limit_overrides_table_id uuid NULL, + rate_limit_overrides_table_name text NOT NULL DEFAULT '', + rate_window_limits_table_id uuid NULL, + rate_window_limits_table_name text NOT NULL DEFAULT '', + check_rate_limit_function text NOT NULL DEFAULT '', + prefix text NULL, + default_permissions text[] DEFAULT NULL, + api_name text DEFAULT 'usage', + private_api_name text DEFAULT NULL, + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT schema_fkey + FOREIGN KEY(schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT private_schema_fkey + FOREIGN KEY(private_schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT rate_limit_state_table_fkey + FOREIGN KEY(rate_limit_state_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT rate_limit_overrides_table_fkey + FOREIGN KEY(rate_limit_overrides_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT rate_window_limits_table_fkey + FOREIGN KEY(rate_window_limits_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT rate_limit_meters_module_database_id_unique + UNIQUE (database_id) +); + +CREATE INDEX rate_limit_meters_module_database_id_idx ON metaschema_modules_public.rate_limit_meters_module (database_id); + +COMMENT ON CONSTRAINT rate_limit_state_table_fkey ON metaschema_modules_public.rate_limit_meters_module IS '@fieldName rateLimitStateTableByRateLimitStateTableId'; + +COMMENT ON CONSTRAINT rate_limit_overrides_table_fkey ON metaschema_modules_public.rate_limit_meters_module IS '@fieldName rateLimitOverridesTableByRateLimitOverridesTableId'; + +COMMENT ON CONSTRAINT rate_window_limits_table_fkey ON metaschema_modules_public.rate_limit_meters_module IS '@fieldName rateWindowLimitsTableByRateWindowLimitsTableId'; + +CREATE TABLE metaschema_modules_public.config_secrets_org_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + schema_id uuid NOT NULL DEFAULT uuid_nil(), + table_id uuid NOT NULL DEFAULT uuid_nil(), + table_name text NOT NULL DEFAULT 'org_secrets', + api_name text DEFAULT 'config', + private_api_name text DEFAULT NULL, + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT schema_fkey + FOREIGN KEY(schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT table_fkey + FOREIGN KEY(table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE +); + +CREATE INDEX config_secrets_org_module_database_id_idx ON metaschema_modules_public.config_secrets_org_module (database_id); + +CREATE INDEX config_secrets_org_module_schema_id_idx ON metaschema_modules_public.config_secrets_org_module (schema_id); + +CREATE INDEX config_secrets_org_module_table_id_idx ON metaschema_modules_public.config_secrets_org_module (table_id); + +COMMENT ON TABLE metaschema_modules_public.config_secrets_org_module IS 'Config row for the config_secrets_org_module, which provisions an organization-scoped encrypted key-value secrets store with manage_secrets permission and entity-membership RLS.'; + +CREATE TABLE metaschema_modules_public.inference_log_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + schema_id uuid NOT NULL DEFAULT uuid_nil(), + private_schema_id uuid NOT NULL DEFAULT uuid_nil(), + inference_log_table_id uuid NOT NULL DEFAULT uuid_nil(), + inference_log_table_name text NOT NULL DEFAULT '', + usage_daily_table_id uuid NOT NULL DEFAULT uuid_nil(), + usage_daily_table_name text NOT NULL DEFAULT '', + interval text NOT NULL DEFAULT '1 month', + retention text NOT NULL DEFAULT '12 months', + premake int NOT NULL DEFAULT 2, + scope text NOT NULL DEFAULT 'app', + actor_fk_table_id uuid NULL, + entity_fk_table_id uuid NULL, + prefix text NOT NULL DEFAULT '', + api_name text DEFAULT 'usage', + private_api_name text DEFAULT NULL, + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT schema_fkey + FOREIGN KEY(schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT private_schema_fkey + FOREIGN KEY(private_schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT inference_log_table_fkey + FOREIGN KEY(inference_log_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT usage_daily_table_fkey + FOREIGN KEY(usage_daily_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT inference_log_module_database_id_prefix_unique + UNIQUE NULLS NOT DISTINCT (database_id, prefix) +); + +CREATE INDEX inference_log_module_database_id_idx ON metaschema_modules_public.inference_log_module (database_id); + +CREATE TABLE metaschema_modules_public.compute_log_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + schema_id uuid NOT NULL DEFAULT uuid_nil(), + private_schema_id uuid NOT NULL DEFAULT uuid_nil(), + compute_log_table_id uuid NOT NULL DEFAULT uuid_nil(), + compute_log_table_name text NOT NULL DEFAULT '', + usage_daily_table_id uuid NOT NULL DEFAULT uuid_nil(), + usage_daily_table_name text NOT NULL DEFAULT '', + interval text NOT NULL DEFAULT '1 month', + retention text NOT NULL DEFAULT '12 months', + premake int NOT NULL DEFAULT 2, + scope text NOT NULL DEFAULT 'app', + actor_fk_table_id uuid NULL, + entity_fk_table_id uuid NULL, + prefix text NOT NULL DEFAULT '', + api_name text DEFAULT 'usage', + private_api_name text DEFAULT NULL, + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT schema_fkey + FOREIGN KEY(schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT private_schema_fkey + FOREIGN KEY(private_schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT compute_log_table_fkey + FOREIGN KEY(compute_log_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT usage_daily_table_fkey + FOREIGN KEY(usage_daily_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT compute_log_module_database_id_prefix_unique + UNIQUE NULLS NOT DISTINCT (database_id, prefix) +); + +CREATE INDEX compute_log_module_database_id_idx ON metaschema_modules_public.compute_log_module (database_id); + +CREATE TABLE metaschema_modules_public.transfer_log_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + schema_id uuid NOT NULL DEFAULT uuid_nil(), + private_schema_id uuid NOT NULL DEFAULT uuid_nil(), + transfer_log_table_id uuid NOT NULL DEFAULT uuid_nil(), + transfer_log_table_name text NOT NULL DEFAULT '', + usage_daily_table_id uuid NOT NULL DEFAULT uuid_nil(), + usage_daily_table_name text NOT NULL DEFAULT '', + interval text NOT NULL DEFAULT '1 month', + retention text NOT NULL DEFAULT '12 months', + premake int NOT NULL DEFAULT 2, + scope text NOT NULL DEFAULT 'app', + actor_fk_table_id uuid NULL, + entity_fk_table_id uuid NULL, + prefix text NOT NULL DEFAULT '', + api_name text DEFAULT 'usage', + private_api_name text DEFAULT NULL, + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT schema_fkey + FOREIGN KEY(schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT private_schema_fkey + FOREIGN KEY(private_schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT transfer_log_table_fkey + FOREIGN KEY(transfer_log_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT usage_daily_table_fkey + FOREIGN KEY(usage_daily_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT transfer_log_module_database_id_prefix_unique + UNIQUE NULLS NOT DISTINCT (database_id, prefix) +); + +CREATE INDEX transfer_log_module_database_id_idx ON metaschema_modules_public.transfer_log_module (database_id); + +CREATE TABLE metaschema_modules_public.storage_log_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + schema_id uuid NOT NULL DEFAULT uuid_nil(), + private_schema_id uuid NOT NULL DEFAULT uuid_nil(), + storage_log_table_id uuid NOT NULL DEFAULT uuid_nil(), + storage_log_table_name text NOT NULL DEFAULT '', + usage_daily_table_id uuid NOT NULL DEFAULT uuid_nil(), + usage_daily_table_name text NOT NULL DEFAULT '', + interval text NOT NULL DEFAULT '1 month', + retention text NOT NULL DEFAULT '12 months', + premake int NOT NULL DEFAULT 2, + scope text NOT NULL DEFAULT 'app', + actor_fk_table_id uuid NULL, + entity_fk_table_id uuid NULL, + prefix text NOT NULL DEFAULT '', + api_name text DEFAULT 'usage', + private_api_name text DEFAULT NULL, + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT schema_fkey + FOREIGN KEY(schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT private_schema_fkey + FOREIGN KEY(private_schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT storage_log_table_fkey + FOREIGN KEY(storage_log_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT usage_daily_table_fkey + FOREIGN KEY(usage_daily_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT storage_log_module_database_id_prefix_unique + UNIQUE NULLS NOT DISTINCT (database_id, prefix) +); + +CREATE INDEX storage_log_module_database_id_idx ON metaschema_modules_public.storage_log_module (database_id); + +CREATE TABLE metaschema_modules_public.db_usage_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + schema_id uuid NOT NULL DEFAULT uuid_nil(), + private_schema_id uuid NOT NULL DEFAULT uuid_nil(), + table_stats_log_table_id uuid NOT NULL DEFAULT uuid_nil(), + table_stats_log_table_name text NOT NULL DEFAULT '', + table_stats_daily_table_id uuid NOT NULL DEFAULT uuid_nil(), + table_stats_daily_table_name text NOT NULL DEFAULT '', + query_stats_log_table_id uuid NOT NULL DEFAULT uuid_nil(), + query_stats_log_table_name text NOT NULL DEFAULT '', + query_stats_daily_table_id uuid NOT NULL DEFAULT uuid_nil(), + query_stats_daily_table_name text NOT NULL DEFAULT '', + interval text NOT NULL DEFAULT '1 month', + retention text NOT NULL DEFAULT '12 months', + premake int NOT NULL DEFAULT 2, + scope text NOT NULL DEFAULT 'app', + prefix text NOT NULL DEFAULT '', + default_permissions text[] DEFAULT NULL, + api_name text DEFAULT 'usage', + private_api_name text DEFAULT NULL, + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT schema_fkey + FOREIGN KEY(schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT private_schema_fkey + FOREIGN KEY(private_schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT table_stats_log_table_fkey + FOREIGN KEY(table_stats_log_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT table_stats_daily_table_fkey + FOREIGN KEY(table_stats_daily_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT query_stats_log_table_fkey + FOREIGN KEY(query_stats_log_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT query_stats_daily_table_fkey + FOREIGN KEY(query_stats_daily_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT db_usage_module_database_id_prefix_unique + UNIQUE NULLS NOT DISTINCT (database_id, prefix) +); + +CREATE INDEX db_usage_module_database_id_idx ON metaschema_modules_public.db_usage_module (database_id); + +CREATE TABLE metaschema_modules_public.agent_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + schema_id uuid NOT NULL DEFAULT uuid_nil(), + private_schema_id uuid NOT NULL DEFAULT uuid_nil(), + thread_table_id uuid NOT NULL DEFAULT uuid_nil(), + message_table_id uuid NOT NULL DEFAULT uuid_nil(), + task_table_id uuid NOT NULL DEFAULT uuid_nil(), + prompts_table_id uuid NOT NULL DEFAULT uuid_nil(), + plan_table_id uuid DEFAULT NULL, + agent_table_id uuid DEFAULT NULL, + persona_table_id uuid DEFAULT NULL, + resource_table_id uuid DEFAULT NULL, + thread_table_name text NOT NULL DEFAULT 'agent_thread', + message_table_name text NOT NULL DEFAULT 'agent_message', + task_table_name text NOT NULL DEFAULT 'agent_task', + prompts_table_name text NOT NULL DEFAULT 'agent_prompt', + plan_table_name text NOT NULL DEFAULT 'agent_plan', + agent_table_name text NOT NULL DEFAULT 'agent', + persona_table_name text NOT NULL DEFAULT 'agent_persona', + resource_table_name text NOT NULL DEFAULT 'agent_resource', + has_plans boolean NOT NULL DEFAULT false, + has_resources boolean NOT NULL DEFAULT false, + has_agents boolean NOT NULL DEFAULT false, + shared boolean NOT NULL DEFAULT false, + api_name text DEFAULT 'agent', + private_api_name text DEFAULT NULL, + scope text NOT NULL DEFAULT 'app', + prefix text NOT NULL DEFAULT '', + entity_table_id uuid NULL, + policies jsonb NULL, + resources jsonb NULL, + provisions jsonb NULL, + default_permissions text[] DEFAULT NULL, + CONSTRAINT agent_module_db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT agent_module_schema_fkey + FOREIGN KEY(schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT agent_module_private_schema_fkey + FOREIGN KEY(private_schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT agent_module_thread_table_fkey + FOREIGN KEY(thread_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT agent_module_message_table_fkey + FOREIGN KEY(message_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT agent_module_task_table_fkey + FOREIGN KEY(task_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT agent_module_prompts_table_fkey + FOREIGN KEY(prompts_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT agent_module_plan_table_fkey + FOREIGN KEY(plan_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT agent_module_agent_table_fkey + FOREIGN KEY(agent_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT agent_module_persona_table_fkey + FOREIGN KEY(persona_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT agent_module_resource_table_fkey + FOREIGN KEY(resource_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT agent_module_entity_table_fkey + FOREIGN KEY(entity_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE +); + +CREATE INDEX agent_module_database_id_idx ON metaschema_modules_public.agent_module (database_id); + +CREATE UNIQUE INDEX agent_module_unique_scope ON metaschema_modules_public.agent_module (database_id, scope, prefix); + +CREATE TABLE metaschema_modules_public.merkle_store_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + schema_id uuid NOT NULL DEFAULT uuid_nil(), + private_schema_id uuid NOT NULL DEFAULT uuid_nil(), + public_schema_name text, + private_schema_name text, + object_table_id uuid NOT NULL DEFAULT uuid_nil(), + store_table_id uuid NOT NULL DEFAULT uuid_nil(), + commit_table_id uuid NOT NULL DEFAULT uuid_nil(), + ref_table_id uuid NOT NULL DEFAULT uuid_nil(), + prefix text NOT NULL DEFAULT '', + api_name text, + private_api_name text, + scope text NOT NULL DEFAULT 'app', + created_at timestamptz NOT NULL DEFAULT now(), + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT schema_fkey + FOREIGN KEY(schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT private_schema_fkey + FOREIGN KEY(private_schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT object_table_fkey + FOREIGN KEY(object_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT store_table_fkey + FOREIGN KEY(store_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT commit_table_fkey + FOREIGN KEY(commit_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT ref_table_fkey + FOREIGN KEY(ref_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT merkle_store_module_database_prefix_unique + UNIQUE (database_id, prefix) +); + +CREATE INDEX merkle_store_module_database_id_idx ON metaschema_modules_public.merkle_store_module (database_id); + +CREATE INDEX merkle_store_module_private_schema_id_idx ON metaschema_modules_public.merkle_store_module (private_schema_id); + +CREATE TABLE metaschema_modules_public.graph_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + public_schema_id uuid NOT NULL DEFAULT uuid_nil(), + private_schema_id uuid NOT NULL DEFAULT uuid_nil(), + public_schema_name text, + private_schema_name text, + scope text NOT NULL DEFAULT 'app', + prefix text NOT NULL DEFAULT '', + merkle_store_module_id uuid NOT NULL, + graphs_table_id uuid NOT NULL DEFAULT uuid_nil(), + executions_table_id uuid NOT NULL DEFAULT uuid_nil(), + outputs_table_id uuid NOT NULL DEFAULT uuid_nil(), + api_name text, + private_api_name text, + entity_table_id uuid NULL, + policies jsonb NULL, + provisions jsonb NULL, + default_permissions text[] DEFAULT NULL, + created_at timestamptz NOT NULL DEFAULT now(), + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT public_schema_fkey + FOREIGN KEY(public_schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT private_schema_fkey + FOREIGN KEY(private_schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT merkle_store_fkey + FOREIGN KEY(merkle_store_module_id) + REFERENCES metaschema_modules_public.merkle_store_module (id) + ON DELETE CASCADE, + CONSTRAINT graphs_table_fkey + FOREIGN KEY(graphs_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT executions_table_fkey + FOREIGN KEY(executions_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT outputs_table_fkey + FOREIGN KEY(outputs_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT graph_module_entity_table_fkey + FOREIGN KEY(entity_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT graph_module_database_merkle_unique + UNIQUE (database_id, merkle_store_module_id) +); + +CREATE INDEX graph_module_database_id_idx ON metaschema_modules_public.graph_module (database_id); + +CREATE TABLE metaschema_modules_public.namespace_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + schema_id uuid NOT NULL DEFAULT uuid_nil(), + private_schema_id uuid NOT NULL DEFAULT uuid_nil(), + public_schema_name text, + private_schema_name text, + namespaces_table_id uuid NOT NULL DEFAULT uuid_nil(), + namespace_events_table_id uuid NOT NULL DEFAULT uuid_nil(), + namespaces_table_name text NOT NULL DEFAULT 'namespaces', + namespace_events_table_name text NOT NULL DEFAULT 'namespace_events', + api_name text, + private_api_name text, + scope text NOT NULL DEFAULT 'app', + prefix text NOT NULL DEFAULT '', + entity_table_id uuid NULL, + policies jsonb NULL, + provisions jsonb NULL, + default_permissions text[] DEFAULT NULL, + CONSTRAINT namespace_module_db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT namespace_module_schema_fkey + FOREIGN KEY(schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT namespace_module_private_schema_fkey + FOREIGN KEY(private_schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT namespace_module_namespaces_table_fkey + FOREIGN KEY(namespaces_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT namespace_module_events_table_fkey + FOREIGN KEY(namespace_events_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT namespace_module_entity_table_fkey + FOREIGN KEY(entity_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE +); + +CREATE INDEX namespace_module_database_id_idx ON metaschema_modules_public.namespace_module (database_id); + +CREATE UNIQUE INDEX namespace_module_unique_scope ON metaschema_modules_public.namespace_module (database_id, scope, prefix); + +CREATE TABLE metaschema_modules_public.function_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + schema_id uuid NOT NULL DEFAULT uuid_nil(), + private_schema_id uuid NOT NULL DEFAULT uuid_nil(), + public_schema_name text, + private_schema_name text, + definitions_table_id uuid NOT NULL DEFAULT uuid_nil(), + invocations_table_id uuid NOT NULL DEFAULT uuid_nil(), + execution_logs_table_id uuid NOT NULL DEFAULT uuid_nil(), + secret_definitions_table_id uuid NOT NULL DEFAULT uuid_nil(), + definitions_table_name text NOT NULL DEFAULT 'function_definitions', + invocations_table_name text NOT NULL DEFAULT 'function_invocations', + execution_logs_table_name text NOT NULL DEFAULT 'function_execution_logs', + secret_definitions_table_name text NOT NULL DEFAULT 'secret_definitions', + api_name text, + private_api_name text, + scope text NOT NULL DEFAULT 'app', + prefix text NOT NULL DEFAULT '', + entity_table_id uuid NULL, + policies jsonb NULL, + provisions jsonb NULL, + default_permissions text[] DEFAULT NULL, + CONSTRAINT function_module_db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT function_module_schema_fkey + FOREIGN KEY(schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT function_module_private_schema_fkey + FOREIGN KEY(private_schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT function_module_definitions_table_fkey + FOREIGN KEY(definitions_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT function_module_invocations_table_fkey + FOREIGN KEY(invocations_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT function_module_execution_logs_table_fkey + FOREIGN KEY(execution_logs_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT function_module_secret_defs_table_fkey + FOREIGN KEY(secret_definitions_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT function_module_entity_table_fkey + FOREIGN KEY(entity_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE +); + +CREATE INDEX function_module_database_id_idx ON metaschema_modules_public.function_module (database_id); + +CREATE UNIQUE INDEX function_module_unique_scope ON metaschema_modules_public.function_module (database_id, scope, prefix); + +CREATE TABLE metaschema_modules_public.config_secrets_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + schema_id uuid NOT NULL DEFAULT uuid_nil(), + private_schema_id uuid NOT NULL DEFAULT uuid_nil(), + table_id uuid NOT NULL DEFAULT uuid_nil(), + config_definitions_table_id uuid NULL DEFAULT NULL, + table_name text NOT NULL DEFAULT 'secrets', + api_name text DEFAULT 'config', + private_api_name text DEFAULT NULL, + scope text NOT NULL DEFAULT 'app', + prefix text NOT NULL DEFAULT '', + entity_table_id uuid NULL, + policies jsonb NULL, + provisions jsonb NULL, + has_config boolean NOT NULL DEFAULT false, + CONSTRAINT config_secrets_module_db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT config_secrets_module_schema_fkey + FOREIGN KEY(schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT config_secrets_module_private_schema_fkey + FOREIGN KEY(private_schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT config_secrets_module_table_fkey + FOREIGN KEY(table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT config_secrets_module_config_defs_table_fkey + FOREIGN KEY(config_definitions_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT config_secrets_module_entity_table_fkey + FOREIGN KEY(entity_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE +); + +CREATE INDEX config_secrets_module_database_id_idx ON metaschema_modules_public.config_secrets_module (database_id); + +CREATE INDEX config_secrets_module_schema_id_idx ON metaschema_modules_public.config_secrets_module (schema_id); + +CREATE INDEX config_secrets_module_table_id_idx ON metaschema_modules_public.config_secrets_module (table_id); + +CREATE UNIQUE INDEX config_secrets_module_unique_scope ON metaschema_modules_public.config_secrets_module (database_id, scope, prefix); + +COMMENT ON TABLE metaschema_modules_public.config_secrets_module IS 'Entity-aware PGP-encrypted key-value config/secrets module. Supports app-level (admin-only) + and org-scoped (per-org secrets with manage_secrets permission) via the scope column. + User-scoped bcrypt credentials are handled by user_credentials_module.'; + +CREATE TABLE metaschema_modules_public.user_credentials_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + schema_id uuid NOT NULL DEFAULT uuid_nil(), + table_id uuid NOT NULL DEFAULT uuid_nil(), + table_name text NOT NULL DEFAULT 'user_secrets', + api_name text DEFAULT 'config', + private_api_name text DEFAULT NULL, + CONSTRAINT user_credentials_module_db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT user_credentials_module_schema_fkey + FOREIGN KEY(schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT user_credentials_module_table_fkey + FOREIGN KEY(table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE +); + +CREATE INDEX user_credentials_module_database_id_idx ON metaschema_modules_public.user_credentials_module (database_id); + +CREATE INDEX user_credentials_module_schema_id_idx ON metaschema_modules_public.user_credentials_module (schema_id); + +CREATE INDEX user_credentials_module_table_id_idx ON metaschema_modules_public.user_credentials_module (table_id); + +CREATE UNIQUE INDEX user_credentials_module_unique ON metaschema_modules_public.user_credentials_module (database_id); + +COMMENT ON TABLE metaschema_modules_public.user_credentials_module IS 'Per-user bcrypt credential store (password hashes, API key hashes). + Always user-scoped with AuthzDirectOwner RLS. Consumed by user_auth_module, + identity_providers_module, and bootstrap procedures.'; + +CREATE TABLE metaschema_modules_public.user_settings_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + schema_id uuid NOT NULL DEFAULT uuid_nil(), + table_id uuid NOT NULL DEFAULT uuid_nil(), + owner_table_id uuid NOT NULL DEFAULT uuid_nil(), + table_name text NOT NULL DEFAULT 'user_settings', + api_name text DEFAULT NULL, + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT schema_fkey + FOREIGN KEY(schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT table_fkey + FOREIGN KEY(table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT owner_table_fkey + FOREIGN KEY(owner_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE +); + +CREATE INDEX user_settings_module_database_id_idx ON metaschema_modules_public.user_settings_module (database_id); + +CREATE UNIQUE INDEX user_settings_module_unique_per_db ON metaschema_modules_public.user_settings_module (database_id); + +CREATE TABLE metaschema_modules_public.i18n_module ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + schema_id uuid NOT NULL DEFAULT uuid_nil(), + private_schema_id uuid NOT NULL DEFAULT uuid_nil(), + settings_table_id uuid NOT NULL DEFAULT uuid_nil(), + api_name text DEFAULT NULL, + private_api_name text DEFAULT NULL, + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT schema_fkey + FOREIGN KEY(schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT private_schema_fkey + FOREIGN KEY(private_schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT settings_table_fkey + FOREIGN KEY(settings_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE +); + +CREATE INDEX i18n_module_database_id_idx ON metaschema_modules_public.i18n_module (database_id); + +CREATE UNIQUE INDEX i18n_module_unique_per_db ON metaschema_modules_public.i18n_module (database_id); \ No newline at end of file diff --git a/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/schema.sql b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/schema.sql new file mode 100644 index 00000000..4e919dcb --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/schema.sql @@ -0,0 +1,7 @@ +-- Verify schemas/metaschema_modules_public/schema on pg + +BEGIN; + +SELECT pg_catalog.has_schema_privilege('metaschema_modules_public', 'usage'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/agent_module/table.sql b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/agent_module/table.sql new file mode 100644 index 00000000..aa3519ff --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/agent_module/table.sql @@ -0,0 +1,7 @@ +-- Verify schemas/metaschema_modules_public/tables/agent_module/table on pg + +BEGIN; + +SELECT verify_table ('metaschema_modules_public.agent_module'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/billing_module/table.sql b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/billing_module/table.sql new file mode 100644 index 00000000..aa1c1c91 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/billing_module/table.sql @@ -0,0 +1,25 @@ +-- Verify schemas/metaschema_modules_public/tables/billing_module/table on pg + +BEGIN; + +SELECT + id, + database_id, + schema_id, + private_schema_id, + meters_table_id, + meters_table_name, + plan_subscriptions_table_id, + plan_subscriptions_table_name, + ledger_table_id, + ledger_table_name, + balances_table_id, + balances_table_name, + meter_sources_table_id, + meter_sources_table_name, + record_usage_function, + prefix +FROM metaschema_modules_public.billing_module +WHERE FALSE; + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/billing_provider_module/table.sql b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/billing_provider_module/table.sql new file mode 100644 index 00000000..1e87f0bb --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/billing_provider_module/table.sql @@ -0,0 +1,29 @@ +-- Verify schemas/metaschema_modules_public/tables/billing_provider_module/table on pg + +BEGIN; + +SELECT + id, + database_id, + schema_id, + private_schema_id, + provider, + products_table_id, + prices_table_id, + subscriptions_table_id, + billing_customers_table_id, + billing_customers_table_name, + billing_products_table_id, + billing_products_table_name, + billing_prices_table_id, + billing_prices_table_name, + billing_subscriptions_table_id, + billing_subscriptions_table_name, + billing_webhook_events_table_id, + billing_webhook_events_table_name, + process_billing_event_function, + prefix +FROM metaschema_modules_public.billing_provider_module +WHERE FALSE; + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/blueprint/table.sql b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/blueprint/table.sql new file mode 100644 index 00000000..d5683b39 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/blueprint/table.sql @@ -0,0 +1,21 @@ +-- Verify schemas/metaschema_modules_public/tables/blueprint/table on pg + +BEGIN; + +SELECT + id, + owner_id, + database_id, + name, + display_name, + description, + definition, + template_id, + definition_hash, + table_hashes, + created_at, + updated_at +FROM metaschema_modules_public.blueprint +WHERE FALSE; + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/blueprint_construction/table.sql b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/blueprint_construction/table.sql new file mode 100644 index 00000000..aceac402 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/blueprint_construction/table.sql @@ -0,0 +1,10 @@ +-- Verify schemas/metaschema_modules_public/tables/blueprint_construction/table + +BEGIN; + +SELECT id, blueprint_id, database_id, schema_id, status, error_details, + table_map, constructed_definition, constructed_at, created_at, updated_at +FROM metaschema_modules_public.blueprint_construction +WHERE FALSE; + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/blueprint_template/table.sql b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/blueprint_template/table.sql new file mode 100644 index 00000000..e26f09cb --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/blueprint_template/table.sql @@ -0,0 +1,29 @@ +-- Verify schemas/metaschema_modules_public/tables/blueprint_template/table on pg + +BEGIN; + +SELECT + id, + name, + version, + display_name, + description, + owner_id, + visibility, + categories, + tags, + definition, + definition_schema_version, + source, + complexity, + copy_count, + fork_count, + forked_from_id, + definition_hash, + table_hashes, + created_at, + updated_at +FROM metaschema_modules_public.blueprint_template +WHERE FALSE; + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/compute_log_module/table.sql b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/compute_log_module/table.sql new file mode 100644 index 00000000..de44722a --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/compute_log_module/table.sql @@ -0,0 +1,9 @@ +-- Verify schemas/metaschema_modules_public/tables/compute_log_module/table on pg + +SELECT id, database_id, schema_id, private_schema_id, + compute_log_table_id, compute_log_table_name, + usage_daily_table_id, usage_daily_table_name, + retention, scope, actor_fk_table_id, entity_fk_table_id, + prefix +FROM metaschema_modules_public.compute_log_module +WHERE FALSE; diff --git a/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/config_secrets_module/table.sql b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/config_secrets_module/table.sql new file mode 100644 index 00000000..8ecf487d --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/config_secrets_module/table.sql @@ -0,0 +1,7 @@ +-- Verify schemas/metaschema_modules_public/tables/config_secrets_module/table on pg + +BEGIN; + +SELECT verify_table('metaschema_modules_public.config_secrets_module'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/config_secrets_org_module/table.sql b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/config_secrets_org_module/table.sql new file mode 100644 index 00000000..b8551286 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/config_secrets_org_module/table.sql @@ -0,0 +1,7 @@ +-- Verify schemas/metaschema_modules_public/tables/config_secrets_org_module/table on pg + +BEGIN; + +SELECT verify_table ('metaschema_modules_public.config_secrets_org_module'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/config_secrets_user_module/table.sql b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/config_secrets_user_module/table.sql new file mode 100644 index 00000000..6ca9dcfd --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/config_secrets_user_module/table.sql @@ -0,0 +1,7 @@ +-- Verify schemas/metaschema_modules_public/tables/config_secrets_user_module/table on pg + +BEGIN; + +SELECT verify_table ('metaschema_modules_public.config_secrets_user_module'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/connected_accounts_module/table.sql b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/connected_accounts_module/table.sql new file mode 100644 index 00000000..c986b454 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/connected_accounts_module/table.sql @@ -0,0 +1,7 @@ +-- Verify schemas/metaschema_modules_public/tables/connected_accounts_module/table on pg + +BEGIN; + +SELECT verify_table ('metaschema_modules_public.connected_accounts_module'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/crypto_addresses_module/table.sql b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/crypto_addresses_module/table.sql new file mode 100644 index 00000000..7d0462db --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/crypto_addresses_module/table.sql @@ -0,0 +1,7 @@ +-- Verify schemas/metaschema_modules_public/tables/crypto_addresses_module/table on pg + +BEGIN; + +SELECT verify_table ('metaschema_modules_public.crypto_addresses_module'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/crypto_auth_module/table.sql b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/crypto_auth_module/table.sql new file mode 100644 index 00000000..46e584b7 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/crypto_auth_module/table.sql @@ -0,0 +1,7 @@ +-- Verify schemas/metaschema_modules_public/tables/crypto_auth_module/table on pg + +BEGIN; + +SELECT verify_table ('metaschema_modules_public.crypto_auth_module'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/db_usage_module/table.sql b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/db_usage_module/table.sql new file mode 100644 index 00000000..57f884fe --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/db_usage_module/table.sql @@ -0,0 +1,10 @@ +-- Verify schemas/metaschema_modules_public/tables/db_usage_module/table on pg + +SELECT id, database_id, schema_id, private_schema_id, + table_stats_log_table_id, table_stats_log_table_name, + table_stats_daily_table_id, table_stats_daily_table_name, + query_stats_log_table_id, query_stats_log_table_name, + query_stats_daily_table_id, query_stats_daily_table_name, + retention, scope, prefix +FROM metaschema_modules_public.db_usage_module +WHERE FALSE; diff --git a/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/default_ids_module/table.sql b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/default_ids_module/table.sql new file mode 100644 index 00000000..1333b7d3 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/default_ids_module/table.sql @@ -0,0 +1,7 @@ +-- Verify schemas/metaschema_modules_public/tables/default_ids_module/table on pg + +BEGIN; + +SELECT verify_table ('metaschema_modules_public.default_ids_module'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/denormalized_table_field/table.sql b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/denormalized_table_field/table.sql new file mode 100644 index 00000000..2868c4e1 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/denormalized_table_field/table.sql @@ -0,0 +1,7 @@ +-- Verify schemas/metaschema_modules_public/tables/denormalized_table_field/table on pg + +BEGIN; + +SELECT verify_table ('metaschema_modules_public.denormalized_table_field'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/devices_module/table.sql b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/devices_module/table.sql new file mode 100644 index 00000000..c0c198e9 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/devices_module/table.sql @@ -0,0 +1,7 @@ +-- Verify schemas/metaschema_modules_public/tables/devices_module/table on pg + +BEGIN; + +SELECT verify_table ('metaschema_modules_public.devices_module'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/emails_module/table.sql b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/emails_module/table.sql new file mode 100644 index 00000000..5ea33e94 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/emails_module/table.sql @@ -0,0 +1,7 @@ +-- Verify schemas/metaschema_modules_public/tables/emails_module/table on pg + +BEGIN; + +SELECT verify_table ('metaschema_modules_public.emails_module'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/entity_type_provision/table.sql b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/entity_type_provision/table.sql new file mode 100644 index 00000000..f5d77396 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/entity_type_provision/table.sql @@ -0,0 +1,7 @@ +-- Verify schemas/metaschema_modules_public/tables/entity_type_provision/table on pg + +BEGIN; + +SELECT verify_table ('metaschema_modules_public.entity_type_provision'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/events_module/table.sql b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/events_module/table.sql new file mode 100644 index 00000000..fcc1bd22 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/events_module/table.sql @@ -0,0 +1,7 @@ +-- Verify schemas/metaschema_modules_public/tables/events_module/table on pg + +BEGIN; + +SELECT verify_table ('metaschema_modules_public.events_module'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/function_module/table.sql b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/function_module/table.sql new file mode 100644 index 00000000..4af5faec --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/function_module/table.sql @@ -0,0 +1,7 @@ +-- Verify schemas/metaschema_modules_public/tables/function_module/table on pg + +BEGIN; + +SELECT verify_table ('metaschema_modules_public.function_module'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/graph_module/table.sql b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/graph_module/table.sql new file mode 100644 index 00000000..0c4e161a --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/graph_module/table.sql @@ -0,0 +1,7 @@ +-- Verify schemas/metaschema_modules_public/tables/graph_module/table on pg + +BEGIN; + +SELECT verify_table ('metaschema_modules_public.graph_module'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/hierarchy_module/table.sql b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/hierarchy_module/table.sql new file mode 100644 index 00000000..15df17f8 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/hierarchy_module/table.sql @@ -0,0 +1,29 @@ +-- Verify schemas/metaschema_modules_public/tables/hierarchy_module/table on pg + +BEGIN; + +SELECT + id, + database_id, + schema_id, + private_schema_id, + chart_edges_table_id, + chart_edges_table_name, + hierarchy_sprt_table_id, + hierarchy_sprt_table_name, + chart_edge_grants_table_id, + chart_edge_grants_table_name, + entity_table_id, + users_table_id, + prefix, + private_schema_name, + sprt_table_name, + rebuild_hierarchy_function, + get_subordinates_function, + get_managers_function, + is_manager_of_function, + created_at +FROM metaschema_modules_public.hierarchy_module +WHERE FALSE; + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/i18n_module/table.sql b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/i18n_module/table.sql new file mode 100644 index 00000000..2f17fba3 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/i18n_module/table.sql @@ -0,0 +1,9 @@ +-- Verify schemas/metaschema_modules_public/tables/i18n_module/table on pg + +BEGIN; + +SELECT id, database_id, schema_id, private_schema_id, settings_table_id, api_name, private_api_name +FROM metaschema_modules_public.i18n_module +WHERE FALSE; + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/identity_providers_module/table.sql b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/identity_providers_module/table.sql new file mode 100644 index 00000000..35ba6326 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/identity_providers_module/table.sql @@ -0,0 +1,7 @@ +-- Verify schemas/metaschema_modules_public/tables/identity_providers_module/table on pg + +BEGIN; + +SELECT verify_table ('metaschema_modules_public.identity_providers_module'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/inference_log_module/table.sql b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/inference_log_module/table.sql new file mode 100644 index 00000000..eaf4c39c --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/inference_log_module/table.sql @@ -0,0 +1,22 @@ +-- Verify schemas/metaschema_modules_public/tables/inference_log_module/table on pg + +BEGIN; + +SELECT + id, + database_id, + schema_id, + private_schema_id, + inference_log_table_id, + inference_log_table_name, + usage_daily_table_id, + usage_daily_table_name, + retention, + scope, + actor_fk_table_id, + entity_fk_table_id, + prefix +FROM metaschema_modules_public.inference_log_module +WHERE FALSE; + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/invites_module/table.sql b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/invites_module/table.sql new file mode 100644 index 00000000..6012c443 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/invites_module/table.sql @@ -0,0 +1,7 @@ +-- Verify schemas/metaschema_modules_public/tables/invites_module/table on pg + +BEGIN; + +SELECT verify_table ('metaschema_modules_public.invites_module'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/limits_module/table.sql b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/limits_module/table.sql new file mode 100644 index 00000000..fd92486f --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/limits_module/table.sql @@ -0,0 +1,7 @@ +-- Verify schemas/metaschema_modules_public/tables/limits_module/table on pg + +BEGIN; + +SELECT verify_table ('metaschema_modules_public.limits_module'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/membership_types_module/table.sql b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/membership_types_module/table.sql new file mode 100644 index 00000000..168025dd --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/membership_types_module/table.sql @@ -0,0 +1,7 @@ +-- Verify schemas/metaschema_modules_public/tables/membership_types_module/table on pg + +BEGIN; + +SELECT verify_table ('metaschema_modules_public.membership_types_module'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/memberships_module/table.sql b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/memberships_module/table.sql new file mode 100644 index 00000000..5518679b --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/memberships_module/table.sql @@ -0,0 +1,7 @@ +-- Verify schemas/metaschema_modules_public/tables/memberships_module/table on pg + +BEGIN; + +SELECT verify_table ('metaschema_modules_public.memberships_module'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/merkle_store_module/table.sql b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/merkle_store_module/table.sql new file mode 100644 index 00000000..8b8a33f7 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/merkle_store_module/table.sql @@ -0,0 +1,7 @@ +-- Verify schemas/metaschema_modules_public/tables/merkle_store_module/table on pg + +BEGIN; + +SELECT verify_table ('metaschema_modules_public.merkle_store_module'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/namespace_module/table.sql b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/namespace_module/table.sql new file mode 100644 index 00000000..8cfe5404 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/namespace_module/table.sql @@ -0,0 +1,14 @@ +-- Verify schemas/metaschema_modules_public/tables/namespace_module/table on pg + +BEGIN; + +SELECT id, database_id, schema_id, private_schema_id, + public_schema_name, private_schema_name, + namespaces_table_id, namespace_events_table_id, + namespaces_table_name, namespace_events_table_name, + api_name, private_api_name, scope, prefix, + entity_table_id, policies, provisions, default_permissions +FROM metaschema_modules_public.namespace_module +WHERE false; + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/notifications_module/table.sql b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/notifications_module/table.sql new file mode 100644 index 00000000..fe683e55 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/notifications_module/table.sql @@ -0,0 +1,7 @@ +-- Verify schemas/metaschema_modules_public/tables/notifications_module/table on pg + +BEGIN; + +SELECT verify_table ('metaschema_modules_public.notifications_module'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/permissions_module/table.sql b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/permissions_module/table.sql new file mode 100644 index 00000000..45e2fa6d --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/permissions_module/table.sql @@ -0,0 +1,7 @@ +-- Verify schemas/metaschema_modules_public/tables/permissions_module/table on pg + +BEGIN; + +SELECT verify_table ('metaschema_modules_public.permissions_module'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/phone_numbers_module/table.sql b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/phone_numbers_module/table.sql new file mode 100644 index 00000000..f1e40951 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/phone_numbers_module/table.sql @@ -0,0 +1,7 @@ +-- Verify schemas/metaschema_modules_public/tables/phone_numbers_module/table on pg + +BEGIN; + +SELECT verify_table ('metaschema_modules_public.phone_numbers_module'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/plans_module/table.sql b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/plans_module/table.sql new file mode 100644 index 00000000..bf90a186 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/plans_module/table.sql @@ -0,0 +1,13 @@ +-- Verify schemas/metaschema_modules_public/tables/plans_module/table on pg + +BEGIN; + +SELECT id, database_id, schema_id, private_schema_id, + plans_table_id, plans_table_name, + plan_limits_table_id, plan_limits_table_name, + apply_plan_function, apply_plan_aggregate_function, + prefix +FROM metaschema_modules_public.plans_module +WHERE FALSE; + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/profiles_module/table.sql b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/profiles_module/table.sql new file mode 100644 index 00000000..9c52869f --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/profiles_module/table.sql @@ -0,0 +1,15 @@ +-- Verify schemas/metaschema_modules_public/tables/profiles_module/table on pg + +BEGIN; + +SELECT id, database_id, schema_id, private_schema_id, table_id, table_name, + profile_permissions_table_id, profile_permissions_table_name, + profile_grants_table_id, profile_grants_table_name, + profile_definition_grants_table_id, profile_definition_grants_table_name, + profile_templates_table_id, profile_templates_table_name, + entity_table_id, actor_table_id, + permissions_table_id, memberships_table_id, prefix +FROM metaschema_modules_public.profiles_module +WHERE FALSE; + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/rate_limit_meters_module/table.sql b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/rate_limit_meters_module/table.sql new file mode 100644 index 00000000..1053f4f6 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/rate_limit_meters_module/table.sql @@ -0,0 +1,7 @@ +-- Verify schemas/metaschema_modules_public/tables/rate_limit_meters_module/table on pg + +BEGIN; + +SELECT verify_table ('metaschema_modules_public.rate_limit_meters_module'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/rate_limits_module/table.sql b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/rate_limits_module/table.sql new file mode 100644 index 00000000..86e7fe89 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/rate_limits_module/table.sql @@ -0,0 +1,7 @@ +-- Verify schemas/metaschema_modules_public/tables/rate_limits_module/table on pg + +BEGIN; + +SELECT verify_table ('metaschema_modules_public.rate_limits_module'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/realtime_module/table.sql b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/realtime_module/table.sql new file mode 100644 index 00000000..aca571c9 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/realtime_module/table.sql @@ -0,0 +1,7 @@ +-- Verify schemas/metaschema_modules_public/tables/realtime_module/table on pg + +BEGIN; + +SELECT verify_table ('metaschema_modules_public.realtime_module'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/relation_provision/table.sql b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/relation_provision/table.sql new file mode 100644 index 00000000..0caae856 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/relation_provision/table.sql @@ -0,0 +1,33 @@ +-- Verify schemas/metaschema_modules_public/tables/relation_provision/table on pg + +BEGIN; + +SELECT + id, + database_id, + relation_type, + source_table_id, + target_table_id, + field_name, + delete_action, + is_required, + api_required, + junction_table_id, + junction_table_name, + junction_schema_id, + source_field_name, + target_field_name, + use_composite_key, + create_index, + expose_in_api, + nodes, + grants, + policies, + out_field_id, + out_junction_table_id, + out_source_field_id, + out_target_field_id +FROM metaschema_modules_public.relation_provision +WHERE FALSE; + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/rls_module/table.sql b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/rls_module/table.sql new file mode 100644 index 00000000..12226184 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/rls_module/table.sql @@ -0,0 +1,7 @@ +-- Verify schemas/metaschema_modules_public/tables/rls_module/table on pg + +BEGIN; + +SELECT verify_table ('metaschema_modules_public.rls_module'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/secure_table_provision/table.sql b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/secure_table_provision/table.sql new file mode 100644 index 00000000..f953e507 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/secure_table_provision/table.sql @@ -0,0 +1,20 @@ +-- Verify schemas/metaschema_modules_public/tables/secure_table_provision/table on pg + +BEGIN; + +SELECT + id, + database_id, + schema_id, + table_id, + table_name, + nodes, + use_rls, + fields, + grants, + policies, + out_fields +FROM metaschema_modules_public.secure_table_provision +WHERE FALSE; + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/session_secrets_module/table.sql b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/session_secrets_module/table.sql new file mode 100644 index 00000000..5cf6fc68 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/session_secrets_module/table.sql @@ -0,0 +1,7 @@ +-- Verify schemas/metaschema_modules_public/tables/session_secrets_module/table on pg + +BEGIN; + +SELECT verify_table ('metaschema_modules_public.session_secrets_module'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/sessions_module/table.sql b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/sessions_module/table.sql new file mode 100644 index 00000000..199463ca --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/sessions_module/table.sql @@ -0,0 +1,7 @@ +-- Verify schemas/metaschema_modules_public/tables/sessions_module/table on pg + +BEGIN; + +SELECT verify_table ('metaschema_modules_public.sessions_module'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/storage_log_module/table.sql b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/storage_log_module/table.sql new file mode 100644 index 00000000..adbf9ac7 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/storage_log_module/table.sql @@ -0,0 +1,10 @@ +-- Verify schemas/metaschema_modules_public/tables/storage_log_module/table on pg + +SELECT id, database_id, schema_id, private_schema_id, + storage_log_table_id, storage_log_table_name, + usage_daily_table_id, usage_daily_table_name, + retention, scope, + actor_fk_table_id, entity_fk_table_id, + prefix +FROM metaschema_modules_public.storage_log_module +WHERE FALSE; diff --git a/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/storage_module/table.sql b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/storage_module/table.sql new file mode 100644 index 00000000..47099c40 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/storage_module/table.sql @@ -0,0 +1,7 @@ +-- Verify schemas/metaschema_modules_public/tables/storage_module/table on pg + +BEGIN; + +SELECT verify_table ('metaschema_modules_public.storage_module'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/transfer_log_module/table.sql b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/transfer_log_module/table.sql new file mode 100644 index 00000000..6a17ba16 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/transfer_log_module/table.sql @@ -0,0 +1,10 @@ +-- Verify schemas/metaschema_modules_public/tables/transfer_log_module/table on pg + +SELECT id, database_id, schema_id, private_schema_id, + transfer_log_table_id, transfer_log_table_name, + usage_daily_table_id, usage_daily_table_name, + retention, scope, + actor_fk_table_id, entity_fk_table_id, + prefix +FROM metaschema_modules_public.transfer_log_module +WHERE FALSE; diff --git a/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/user_auth_module/table.sql b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/user_auth_module/table.sql new file mode 100644 index 00000000..7ac2d45b --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/user_auth_module/table.sql @@ -0,0 +1,7 @@ +-- Verify schemas/metaschema_modules_public/tables/user_auth_module/table on pg + +BEGIN; + +SELECT verify_table ('metaschema_modules_public.user_auth_module'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/user_credentials_module/table.sql b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/user_credentials_module/table.sql new file mode 100644 index 00000000..940681c3 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/user_credentials_module/table.sql @@ -0,0 +1,7 @@ +-- Verify schemas/metaschema_modules_public/tables/user_credentials_module/table on pg + +BEGIN; + +SELECT verify_table('metaschema_modules_public.user_credentials_module'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/user_settings_module/table.sql b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/user_settings_module/table.sql new file mode 100644 index 00000000..7a56d8ee --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/user_settings_module/table.sql @@ -0,0 +1,7 @@ +-- Verify schemas/metaschema_modules_public/tables/user_settings_module/table on pg + +BEGIN; + +SELECT verify_table('metaschema_modules_public.user_settings_module'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/user_state_module/table.sql b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/user_state_module/table.sql new file mode 100644 index 00000000..36655782 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/user_state_module/table.sql @@ -0,0 +1,7 @@ +-- Verify schemas/metaschema_modules_public/tables/user_state_module/table on pg + +BEGIN; + +SELECT verify_table ('metaschema_modules_public.user_state_module'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/users_module/table.sql b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/users_module/table.sql new file mode 100644 index 00000000..2b0557cc --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/users_module/table.sql @@ -0,0 +1,7 @@ +-- Verify schemas/metaschema_modules_public/tables/users_module/table on pg + +BEGIN; + +SELECT verify_table ('metaschema_modules_public.users_module'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/webauthn_auth_module/table.sql b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/webauthn_auth_module/table.sql new file mode 100644 index 00000000..8fc84c14 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/webauthn_auth_module/table.sql @@ -0,0 +1,7 @@ +-- Verify schemas/metaschema_modules_public/tables/webauthn_auth_module/table on pg + +BEGIN; + +SELECT verify_table ('metaschema_modules_public.webauthn_auth_module'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/webauthn_credentials_module/table.sql b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/webauthn_credentials_module/table.sql new file mode 100644 index 00000000..a8859bf5 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/verify/schemas/metaschema_modules_public/tables/webauthn_credentials_module/table.sql @@ -0,0 +1,7 @@ +-- Verify schemas/metaschema_modules_public/tables/webauthn_credentials_module/table on pg + +BEGIN; + +SELECT verify_table ('metaschema_modules_public.webauthn_credentials_module'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-modules/verify/schemas/services_private/schema.sql b/extensions/@pgpm/metaschema-modules/verify/schemas/services_private/schema.sql new file mode 100644 index 00000000..e59c3d07 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/verify/schemas/services_private/schema.sql @@ -0,0 +1 @@ +-- Verify schemas/services_private/schema on pg diff --git a/extensions/@pgpm/metaschema-modules/verify/schemas/services_public/schema.sql b/extensions/@pgpm/metaschema-modules/verify/schemas/services_public/schema.sql new file mode 100644 index 00000000..d51679b1 --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/verify/schemas/services_public/schema.sql @@ -0,0 +1 @@ +-- Verify schemas/services_public/schema on pg diff --git a/extensions/@pgpm/metaschema-modules/verify/schemas/services_public/tables/apis/table.sql b/extensions/@pgpm/metaschema-modules/verify/schemas/services_public/tables/apis/table.sql new file mode 100644 index 00000000..c0bee4ce --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/verify/schemas/services_public/tables/apis/table.sql @@ -0,0 +1 @@ +-- Verify schemas/services_public/tables/apis/table on pg diff --git a/extensions/@pgpm/metaschema-modules/verify/schemas/services_public/tables/sites/table.sql b/extensions/@pgpm/metaschema-modules/verify/schemas/services_public/tables/sites/table.sql new file mode 100644 index 00000000..e334fb0f --- /dev/null +++ b/extensions/@pgpm/metaschema-modules/verify/schemas/services_public/tables/sites/table.sql @@ -0,0 +1 @@ +-- Verify schemas/services_public/tables/sites/table on pg diff --git a/extensions/@pgpm/metaschema-schema/LICENSE b/extensions/@pgpm/metaschema-schema/LICENSE new file mode 100644 index 00000000..7b18c918 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2025 Dan Lynch +Copyright (c) 2025 Constructive + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/extensions/@pgpm/metaschema-schema/Makefile b/extensions/@pgpm/metaschema-schema/Makefile new file mode 100644 index 00000000..9c6e3a8a --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/Makefile @@ -0,0 +1,6 @@ +EXTENSION = metaschema-schema +DATA = sql/metaschema-schema--0.26.3.sql + +PG_CONFIG = pg_config +PGXS := $(shell $(PG_CONFIG) --pgxs) +include $(PGXS) diff --git a/extensions/@pgpm/metaschema-schema/README.md b/extensions/@pgpm/metaschema-schema/README.md new file mode 100644 index 00000000..7053a219 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/README.md @@ -0,0 +1,323 @@ +# @pgpm/db-meta-schema + +

+ +

+ +

+ + + + + +

+ +Database metadata utilities and introspection functions. + +## Overview + +`@pgpm/db-meta-schema` provides a comprehensive metadata management system for PostgreSQL databases. This package creates tables and schemas for storing and querying database structure information including databases, schemas, tables, fields, constraints, indexes, and more. It enables runtime schema introspection, metadata-driven code generation, and database structure management. + +## Features + +- **Database Metadata Storage**: Store information about databases, schemas, tables, and fields +- **Constraint Tracking**: Track primary keys, foreign keys, unique constraints, and check constraints +- **Index Management**: Store and query index definitions +- **Trigger and Procedure Metadata**: Track database functions and triggers +- **RLS and Policy Information**: Store row-level security policies +- **Extension Tracking**: Manage database extensions and their relationships +- **API and Site Metadata**: Store API configurations and site information +- **GraphQL Integration**: Smart tags and annotations for GraphQL schema generation + +## Installation + +If you have `pgpm` installed: + +```bash +pgpm install @pgpm/db-meta-schema +pgpm deploy +``` + +This is a quick way to get started. The sections below provide more detailed installation options. + +### Prerequisites + +```bash +# Install pgpm CLI +npm install -g pgpm + +# Start local Postgres (via Docker) and export env vars +pgpm docker start +eval "$(pgpm env)" +``` + +> **Tip:** Already running Postgres? Skip the Docker step and just export your `PG*` environment variables. + +### **Add to an Existing Package** + +```bash +# 1. Install the package +pgpm install @pgpm/db-meta-schema + +# 2. Deploy locally +pgpm deploy +``` + +### **Add to a New Project** + +```bash +# 1. Create a workspace +pgpm init workspace + +# 2. Create your first module +cd my-workspace +pgpm init + +# 3. Install a package +cd packages/my-module +pgpm install @pgpm/db-meta-schema + +# 4. Deploy everything +pgpm deploy --createdb --database mydb1 +``` + +## Core Schemas + +### metaschema_public Schema + +Stores database structure metadata: + +- **database**: Database definitions with schema names and hashes +- **schema**: Schema definitions within databases +- **table**: Table definitions with RLS, timestamps, and naming conventions +- **field**: Column definitions with types, constraints, and validation rules +- **primary_key_constraint**: Primary key definitions +- **foreign_key_constraint**: Foreign key relationships +- **unique_constraint**: Unique constraints +- **check_constraint**: Check constraint definitions +- **index**: Index definitions +- **trigger**: Trigger definitions +- **procedure**: Stored procedure definitions +- **policy**: Row-level security policies +- **extension**: PostgreSQL extensions + +### metaschema_private Schema + +Private schema for internal metadata operations. + +### services_public Schema + +Application-level metadata: + +- **apis**: API configurations +- **api_extensions**: API extension relationships +- **api_modules**: API module definitions +- **api_schemas**: API schema configurations +- **sites**: Site definitions +- **apps**: Application definitions +- **domains**: Domain configurations +- **site_metadata**: Site metadata +- **site_modules**: Site module configurations +- **site_themes**: Site theme definitions + +## Usage + +### Storing Database Metadata + +```sql +-- Create a database entry +INSERT INTO metaschema_public.database (name, label, schema_name, private_schema_name) +VALUES ('my_app', 'My Application', 'my_app_public', 'my_app_private') +RETURNING id; + +-- Create a schema entry +INSERT INTO metaschema_public.schema (database_id, name) +VALUES ('database-uuid', 'public') +RETURNING id; + +-- Create a table entry +INSERT INTO metaschema_public.table ( + database_id, + schema_id, + name, + label, + use_rls, + timestamps, + peoplestamps +) VALUES ( + 'database-uuid', + 'schema-uuid', + 'users', + 'Users', + true, + true, + true +); + +-- Create field entries +INSERT INTO metaschema_public.field ( + database_id, + table_id, + name, + label, + type, + is_required, + field_order +) VALUES + ('database-uuid', 'table-uuid', 'id', 'ID', 'uuid', true, 1), + ('database-uuid', 'table-uuid', 'email', 'Email', 'email', true, 2), + ('database-uuid', 'table-uuid', 'name', 'Name', 'text', false, 3); +``` + +### Querying Metadata + +```sql +-- Get all tables in a database +SELECT t.name, t.label, s.name as schema_name +FROM metaschema_public.table t +JOIN metaschema_public.schema s ON t.schema_id = s.id +WHERE t.database_id = 'database-uuid'; + +-- Get all fields for a table +SELECT f.name, f.label, f.type, f.is_required, f.default_value +FROM metaschema_public.field f +WHERE f.table_id = 'table-uuid' +ORDER BY f.field_order; + +-- Get foreign key relationships +SELECT + fk.name as constraint_name, + t1.name as from_table, + t2.name as to_table +FROM metaschema_public.foreign_key_constraint fk +JOIN metaschema_public.table t1 ON fk.table_id = t1.id +JOIN metaschema_public.table t2 ON fk.foreign_table_id = t2.id +WHERE fk.database_id = 'database-uuid'; +``` + +### Smart Tags for GraphQL + +The package supports smart tags for GraphQL schema generation: + +```sql +-- Add smart tags to a table +UPDATE metaschema_public.table +SET smart_tags = '{ + "@omit": "create,update,delete", + "@name": "CustomTableName" +}'::jsonb +WHERE id = 'table-uuid'; + +-- Add smart tags to a field +UPDATE metaschema_public.field +SET smart_tags = '{ + "@omit": true, + "@deprecated": "Use new_field instead" +}'::jsonb +WHERE id = 'field-uuid'; +``` + +## Table Structures + +### database Table + +Stores database definitions: +- `id`: UUID primary key +- `owner_id`: Owner UUID +- `schema_hash`: Unique schema hash +- `schema_name`: Public schema name +- `private_schema_name`: Private schema name +- `name`: Database name +- `label`: Display label +- `hash`: Database hash + +### table Table + +Stores table definitions: +- `id`: UUID primary key +- `database_id`: Foreign key to database +- `schema_id`: Foreign key to schema +- `name`: Table name +- `label`: Display label +- `description`: Table description +- `smart_tags`: JSONB smart tags for GraphQL +- `use_rls`: Enable row-level security +- `timestamps`: Enable created_at/updated_at +- `peoplestamps`: Enable created_by/updated_by +- `plural_name`: Plural form for API +- `singular_name`: Singular form for API +- `inherits_id`: Table inheritance + +### field Table + +Stores column definitions: +- `id`: UUID primary key +- `database_id`: Foreign key to database +- `table_id`: Foreign key to table +- `name`: Column name +- `label`: Display label +- `description`: Column description +- `smart_tags`: JSONB smart tags +- `is_required`: NOT NULL constraint +- `default_value`: Default value +- `smart_tags`: Use smart tags with `@omit` to hide from API +- `type`: PostgreSQL type +- `field_order`: Display order +- `regexp`: Validation regex +- `chk`: Check constraint JSON +- `min`/`max`: Numeric constraints + +## Use Cases + +### Schema-Driven Code Generation + +Use metadata to generate: +- GraphQL schemas +- TypeScript types +- API documentation +- Database migration scripts +- Admin interfaces + +### Runtime Schema Introspection + +Query metadata at runtime to: +- Build dynamic forms +- Generate validation rules +- Create custom queries +- Implement multi-tenancy + +### Database Documentation + +Generate documentation from metadata: +- Entity-relationship diagrams +- Data dictionaries +- API specifications + +## Dependencies + +- `@pgpm/database-jobs`: Background job processing +- `@pgpm/inflection`: String inflection utilities +- `@pgpm/types`: Core PostgreSQL types +- `@pgpm/verify`: Verification utilities + +## Testing + +```bash +pnpm test +``` + +## Related Tooling + +* [pgpm](https://github.com/constructive-io/constructive/tree/main/packages/pgpm): **🖥️ PostgreSQL Package Manager** for modular Postgres development. Works with database workspaces, scaffolding, migrations, seeding, and installing database packages. +* [pgsql-test](https://github.com/constructive-io/constructive/tree/main/packages/pgsql-test): **📊 Isolated testing environments** with per-test transaction rollbacks—ideal for integration tests, complex migrations, and RLS simulation. +* [supabase-test](https://github.com/constructive-io/constructive/tree/main/packages/supabase-test): **🧪 Supabase-native test harness** preconfigured for the local Supabase stack—per-test rollbacks, JWT/role context helpers, and CI/GitHub Actions ready. +* [graphile-test](https://github.com/constructive-io/constructive/tree/main/packages/graphile-test): **🔐 Authentication mocking** for Graphile-focused test helpers and emulating row-level security contexts. +* [pgsql-parser](https://github.com/constructive-io/pgsql-parser): **🔄 SQL conversion engine** that interprets and converts PostgreSQL syntax. +* [libpg-query-node](https://github.com/constructive-io/libpg-query-node): **🌉 Node.js bindings** for `libpg_query`, converting SQL into parse trees. +* [pg-proto-parser](https://github.com/constructive-io/pg-proto-parser): **📦 Protobuf parser** for parsing PostgreSQL Protocol Buffers definitions to generate TypeScript interfaces, utility functions, and JSON mappings for enums. + +## Disclaimer + +AS DESCRIBED IN THE LICENSES, THE SOFTWARE IS PROVIDED "AS IS", AT YOUR OWN RISK, AND WITHOUT WARRANTIES OF ANY KIND. + +No developer or entity involved in creating this software will be liable for any claims or damages whatsoever associated with your use, inability to use, or your interaction with other users of the code, including any direct, indirect, incidental, special, exemplary, punitive or consequential damages, or loss of profits, cryptocurrencies, tokens, or anything else of value. diff --git a/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_private/schema.sql b/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_private/schema.sql new file mode 100644 index 00000000..73dbc806 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_private/schema.sql @@ -0,0 +1,12 @@ +-- Deploy schemas/metaschema_private/schema to pg + +BEGIN; + +CREATE SCHEMA metaschema_private; + +GRANT USAGE ON SCHEMA metaschema_private TO authenticated; +ALTER DEFAULT PRIVILEGES IN SCHEMA metaschema_private GRANT ALL ON TABLES TO authenticated; +ALTER DEFAULT PRIVILEGES IN SCHEMA metaschema_private GRANT ALL ON SEQUENCES TO authenticated; +ALTER DEFAULT PRIVILEGES IN SCHEMA metaschema_private GRANT ALL ON FUNCTIONS TO authenticated; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/schema.sql b/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/schema.sql new file mode 100644 index 00000000..46b7b864 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/schema.sql @@ -0,0 +1,12 @@ +-- Deploy schemas/metaschema_public/schema to pg + +BEGIN; + +CREATE SCHEMA metaschema_public; + +GRANT USAGE ON SCHEMA metaschema_public TO authenticated; +ALTER DEFAULT PRIVILEGES IN SCHEMA metaschema_public GRANT ALL ON TABLES TO authenticated; +ALTER DEFAULT PRIVILEGES IN SCHEMA metaschema_public GRANT ALL ON SEQUENCES TO authenticated; +ALTER DEFAULT PRIVILEGES IN SCHEMA metaschema_public GRANT ALL ON FUNCTIONS TO authenticated; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/check_constraint/table.sql b/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/check_constraint/table.sql new file mode 100644 index 00000000..071ec662 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/check_constraint/table.sql @@ -0,0 +1,42 @@ +-- Deploy schemas/metaschema_public/tables/check_constraint/table to pg + +-- requires: schemas/metaschema_public/schema +-- requires: schemas/metaschema_public/tables/database/table +-- requires: schemas/metaschema_public/tables/table/table +-- requires: schemas/metaschema_public/types/object_category + +BEGIN; + +CREATE TABLE metaschema_public.check_constraint ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL DEFAULT uuid_nil(), + + table_id uuid NOT NULL, + name text, + type text, + field_ids uuid[] NOT NULL, + expr jsonb, + + smart_tags jsonb, + + category metaschema_public.object_category NOT NULL DEFAULT 'app', + module text NULL, + scope int NULL, + + tags citext[] NOT NULL DEFAULT '{}', + + created_at timestamptz DEFAULT now(), + updated_at timestamptz DEFAULT now(), + + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT table_fkey FOREIGN KEY (table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + + UNIQUE (table_id, name), + CHECK (field_ids <> '{}') +); + + +CREATE INDEX check_constraint_table_id_idx ON metaschema_public.check_constraint ( table_id ); +CREATE INDEX check_constraint_database_id_idx ON metaschema_public.check_constraint ( database_id ); + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/composite_type/table.sql b/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/composite_type/table.sql new file mode 100644 index 00000000..806328fc --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/composite_type/table.sql @@ -0,0 +1,38 @@ +-- Deploy schemas/metaschema_public/tables/composite_type/table to pg + +-- requires: schemas/metaschema_public/schema +-- requires: schemas/metaschema_public/tables/database/table +-- requires: schemas/metaschema_public/tables/schema/table +-- requires: schemas/metaschema_public/types/object_category + +BEGIN; + +CREATE TABLE metaschema_public.composite_type ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + schema_id uuid NOT NULL, + name text NOT NULL, + + label text, + description text, + + attributes jsonb NOT NULL DEFAULT '[]', + + smart_tags jsonb, + + category metaschema_public.object_category NOT NULL DEFAULT 'app', + module text NULL, + scope int NULL, + + tags citext[] NOT NULL DEFAULT '{}', + + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT schema_fkey FOREIGN KEY (schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + + UNIQUE (schema_id, name) +); + +CREATE INDEX composite_type_schema_id_idx ON metaschema_public.composite_type ( schema_id ); +CREATE INDEX composite_type_database_id_idx ON metaschema_public.composite_type ( database_id ); + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/database/indexes/databases_database_unique_name_idx.sql b/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/database/indexes/databases_database_unique_name_idx.sql new file mode 100644 index 00000000..e0a83f4a --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/database/indexes/databases_database_unique_name_idx.sql @@ -0,0 +1,20 @@ +-- Deploy schemas/metaschema_public/tables/database/indexes/databases_database_unique_name_idx to pg +-- requires: schemas/metaschema_private/schema +-- requires: schemas/metaschema_public/schema +-- requires: schemas/metaschema_public/tables/database/table + +BEGIN; + +CREATE FUNCTION metaschema_private.database_name_hash (name text) + RETURNS bytea + AS $BODY$ + SELECT + DECODE(MD5(LOWER(inflection.plural (name))), 'hex'); +$BODY$ +LANGUAGE sql +IMMUTABLE; + +CREATE UNIQUE INDEX databases_database_unique_name_idx ON metaschema_public.database (owner_id, metaschema_private.database_name_hash (name)); + +COMMIT; + diff --git a/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/database/table.sql b/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/database/table.sql new file mode 100644 index 00000000..fbfd17e7 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/database/table.sql @@ -0,0 +1,28 @@ +-- Deploy schemas/metaschema_public/tables/database/table to pg + +-- requires: schemas/metaschema_public/schema + +BEGIN; + +CREATE TABLE metaschema_public.database ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + owner_id uuid, + schema_hash text, + + name text, + label text, + + hash uuid, + + created_at timestamptz DEFAULT now(), + updated_at timestamptz DEFAULT now(), + + unique(schema_hash) +); + +ALTER TABLE metaschema_public.database + ADD CONSTRAINT db_namechk CHECK (char_length(name) > 2); + +COMMENT ON COLUMN metaschema_public.database.schema_hash IS '@omit'; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/default_privilege/table.sql b/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/default_privilege/table.sql new file mode 100644 index 00000000..c6f94f1b --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/default_privilege/table.sql @@ -0,0 +1,37 @@ +-- Deploy schemas/metaschema_public/tables/default_privilege/table to pg + +-- requires: schemas/metaschema_public/schema +-- requires: schemas/metaschema_public/tables/schema/table +-- requires: schemas/metaschema_public/tables/database/table + +BEGIN; + +CREATE TABLE metaschema_public.default_privilege ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL DEFAULT uuid_nil(), + + schema_id uuid NOT NULL, + + -- 'tables', 'functions', 'sequences' + object_type text NOT NULL, + + -- 'ALL', 'SELECT', 'INSERT', 'UPDATE', 'DELETE', 'USAGE', 'EXECUTE', etc. + privilege text NOT NULL, + + -- role receiving the privilege (e.g. 'authenticated', 'administrator', 'anonymous') + grantee_name text NOT NULL, + + -- true = GRANT, false = REVOKE + is_grant boolean NOT NULL DEFAULT true, + + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT schema_fkey FOREIGN KEY (schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + + UNIQUE (schema_id, object_type, privilege, grantee_name, is_grant) +); + + +CREATE INDEX default_privilege_schema_id_idx ON metaschema_public.default_privilege ( schema_id ); +CREATE INDEX default_privilege_database_id_idx ON metaschema_public.default_privilege ( database_id ); + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/embedding_chunks/table.sql b/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/embedding_chunks/table.sql new file mode 100644 index 00000000..76337cb0 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/embedding_chunks/table.sql @@ -0,0 +1,70 @@ +-- Deploy schemas/metaschema_public/tables/embedding_chunks/table to pg + +-- requires: schemas/metaschema_public/schema +-- requires: schemas/metaschema_public/tables/database/table +-- requires: schemas/metaschema_public/tables/table/table +-- requires: schemas/metaschema_public/tables/field/table + +BEGIN; + +CREATE TABLE metaschema_public.embedding_chunks ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL DEFAULT uuid_nil(), + + table_id uuid NOT NULL, + embedding_field_id uuid, + chunks_table_id uuid, + chunks_table_name text, + + -- content field configuration + content_field_name text NOT NULL DEFAULT 'content', + + -- embedding configuration + dimensions int NOT NULL DEFAULT 768, + metric text NOT NULL DEFAULT 'cosine', + + -- chunking configuration + chunk_size int NOT NULL DEFAULT 1000, + chunk_overlap int NOT NULL DEFAULT 200, + chunk_strategy text NOT NULL DEFAULT 'fixed', + + -- metadata fields from parent to copy into chunks + metadata_fields jsonb, + + -- search indexes to create on the chunks content column + -- NULL means "mirror parent table's text search indexes" + search_indexes jsonb, + + -- job configuration + enqueue_chunking_job boolean NOT NULL DEFAULT true, + chunking_task_name text NOT NULL DEFAULT 'generate_chunks', + + -- model config (optional — worker falls back to runtime config when null) + embedding_model text, + embedding_provider text, + + -- FK field on chunks table pointing to parent + parent_fk_field_id uuid, + + created_at timestamptz DEFAULT now(), + updated_at timestamptz DEFAULT now(), + + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT table_fkey FOREIGN KEY (table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT chunks_table_fkey FOREIGN KEY (chunks_table_id) REFERENCES metaschema_public.table (id) ON DELETE SET NULL, + CONSTRAINT embedding_field_fkey FOREIGN KEY (embedding_field_id) REFERENCES metaschema_public.field (id) ON DELETE SET NULL, + CONSTRAINT parent_fk_field_fkey FOREIGN KEY (parent_fk_field_id) REFERENCES metaschema_public.field (id) ON DELETE SET NULL, + + CONSTRAINT valid_metric CHECK (metric IN ('cosine', 'l2', 'ip')), + CONSTRAINT valid_chunk_strategy CHECK (chunk_strategy IN ('fixed', 'sentence', 'paragraph', 'semantic')), + CONSTRAINT valid_dimensions CHECK (dimensions > 0), + CONSTRAINT valid_chunk_size CHECK (chunk_size > 0), + CONSTRAINT valid_chunk_overlap CHECK (chunk_overlap >= 0 AND chunk_overlap < chunk_size) +); + + +CREATE INDEX embedding_chunks_table_id_idx ON metaschema_public.embedding_chunks ( table_id ); +CREATE INDEX embedding_chunks_database_id_idx ON metaschema_public.embedding_chunks ( database_id ); +CREATE INDEX embedding_chunks_chunks_table_id_idx ON metaschema_public.embedding_chunks ( chunks_table_id ); + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/enum/table.sql b/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/enum/table.sql new file mode 100644 index 00000000..ae9ba3a6 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/enum/table.sql @@ -0,0 +1,39 @@ +-- Deploy schemas/metaschema_public/tables/enum/table to pg + +-- requires: schemas/metaschema_public/schema +-- requires: schemas/metaschema_public/tables/database/table +-- requires: schemas/metaschema_public/tables/schema/table +-- requires: schemas/metaschema_public/types/object_category + +BEGIN; + +CREATE TABLE metaschema_public.enum ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + schema_id uuid NOT NULL, + name text NOT NULL, + + label text, + description text, + + values text[] NOT NULL DEFAULT '{}', + + smart_tags jsonb, + + category metaschema_public.object_category NOT NULL DEFAULT 'app', + module text NULL, + scope int NULL, + + tags citext[] NOT NULL DEFAULT '{}', + + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT schema_fkey FOREIGN KEY (schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + + UNIQUE (schema_id, name) +); + + +CREATE INDEX enum_schema_id_idx ON metaschema_public.enum ( schema_id ); +CREATE INDEX enum_database_id_idx ON metaschema_public.enum ( database_id ); + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/field/indexes/databases_field_uniq_names_idx.sql b/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/field/indexes/databases_field_uniq_names_idx.sql new file mode 100644 index 00000000..6182d432 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/field/indexes/databases_field_uniq_names_idx.sql @@ -0,0 +1,19 @@ +-- Deploy schemas/metaschema_public/tables/field/indexes/databases_field_uniq_names_idx to pg + +-- requires: schemas/metaschema_public/schema +-- requires: schemas/metaschema_public/tables/field/table + +BEGIN; + +CREATE UNIQUE INDEX databases_field_uniq_names_idx ON metaschema_public.field ( + -- strip out any _id, etc., so that if you do create one and make foreign key relation, there is no conflict + -- only apply normalization to uuid fields (FK candidates) to avoid false collisions on text fields like current_role/current_role_id + table_id, DECODE(MD5(LOWER( + CASE + WHEN type->>'name' = 'uuid' THEN regexp_replace(name, '^(.+?)(_row_id|_id|_uuid|_fk|_pk)$', '\1', 'i') + ELSE name + END + )), 'hex') +); + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/field/table.sql b/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/field/table.sql new file mode 100644 index 00000000..27959dd0 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/field/table.sql @@ -0,0 +1,74 @@ +-- Deploy schemas/metaschema_public/tables/field/table to pg + + +-- requires: schemas/metaschema_public/schema +-- requires: schemas/metaschema_public/tables/table/table + +BEGIN; + +-- TODO should we just query this table and make a view? +-- https://www.postgresql.org/docs/9.2/catalog-pg-attribute.html + +-- IF YOU WANT TO REMOVE THIS TABLE, answer the qustion, how would you add RLS to this: +-- SELECT +-- attrelid::text AS tbl +-- , attname::text AS col +-- , p.attnum::int as id, +-- t.typname as typename + +-- FROM pg_catalog.pg_attribute p +-- INNER JOIN pg_catalog.pg_type t ON (t.oid = p.atttypid) +-- WHERE attrelid = 'dude_schema.products'::regclass +-- AND p.attnum > 0 +-- AND NOT attisdropped; + +CREATE TABLE metaschema_public.field ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL DEFAULT uuid_nil(), + + table_id uuid NOT NULL, + + name text NOT NULL, + label text, + + description text, + smart_tags jsonb, + + is_required boolean NOT NULL DEFAULT FALSE, + api_required boolean NOT NULL DEFAULT FALSE, + default_value jsonb NULL DEFAULT NULL, + + type jsonb NOT NULL, + + field_order int not null default 0, + + regexp text default null, + chk jsonb default null, + chk_expr jsonb default null, + min float default null, + max float default null, + + tags citext[] NOT NULL DEFAULT '{}', + + -- Field categorization for system/module/app fields (mirrors table categorization) + -- category: 'core' for system fields (id, entity_id, actor_id), 'module' for module-generated fields, 'app' for user-defined fields + -- module: the module name that created this field (e.g., 'users', 'permissions', 'memberships') + -- scope: membership_type int (1=app, 2=org, 3=group, NULL=not scoped) + category metaschema_public.object_category NOT NULL DEFAULT 'app', + module text NULL, + scope int NULL, + + created_at timestamptz DEFAULT now(), + updated_at timestamptz DEFAULT now(), + + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT table_fkey FOREIGN KEY (table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + + UNIQUE (table_id, name) +); + + +CREATE INDEX field_table_id_idx ON metaschema_public.field ( table_id ); +CREATE INDEX field_database_id_idx ON metaschema_public.field ( database_id ); + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/foreign_key_constraint/table.sql b/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/foreign_key_constraint/table.sql new file mode 100644 index 00000000..6a5f47c7 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/foreign_key_constraint/table.sql @@ -0,0 +1,46 @@ +-- Deploy schemas/metaschema_public/tables/foreign_key_constraint/table to pg + +-- requires: schemas/metaschema_public/tables/field/table +-- requires: schemas/metaschema_public/tables/table/table +-- requires: schemas/metaschema_public/schema +-- requires: schemas/metaschema_public/types/object_category + +BEGIN; + +CREATE TABLE metaschema_public.foreign_key_constraint ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL DEFAULT uuid_nil(), + + table_id uuid NOT NULL, + name text, + description text, + smart_tags jsonb, + type text, + field_ids uuid[] NOT NULL, + ref_table_id uuid NOT NULL REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + ref_field_ids uuid[] NOT NULL, + delete_action char(1) DEFAULT 'c', -- postgres default is 'a' + update_action char(1) DEFAULT 'a', + + category metaschema_public.object_category NOT NULL DEFAULT 'app', + module text NULL, + scope int NULL, + + tags citext[] NOT NULL DEFAULT '{}', + + created_at timestamptz DEFAULT now(), + updated_at timestamptz DEFAULT now(), + + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT table_fkey FOREIGN KEY (table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + + UNIQUE(table_id, name), + CHECK (field_ids <> '{}'), + CHECK (ref_field_ids <> '{}') +); + + +CREATE INDEX foreign_key_constraint_table_id_idx ON metaschema_public.foreign_key_constraint ( table_id ); +CREATE INDEX foreign_key_constraint_database_id_idx ON metaschema_public.foreign_key_constraint ( database_id ); + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/full_text_search/table.sql b/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/full_text_search/table.sql new file mode 100644 index 00000000..fb695602 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/full_text_search/table.sql @@ -0,0 +1,34 @@ +-- Deploy schemas/metaschema_public/tables/full_text_search/table to pg + +-- requires: schemas/metaschema_public/schema + +BEGIN; + +CREATE TABLE metaschema_public.full_text_search ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL DEFAULT uuid_nil(), + + table_id uuid NOT NULL, + field_id uuid NOT NULL, + field_ids uuid[] NOT NULL, + weights text[] NOT NULL, + langs text[] NOT NULL, + lang_column text, + + created_at timestamptz DEFAULT now(), + updated_at timestamptz DEFAULT now(), + + -- + + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT table_fkey FOREIGN KEY (table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + + CHECK (cardinality(field_ids) = cardinality(weights) AND cardinality(weights) = cardinality(langs)) +); + + +CREATE INDEX full_text_search_table_id_idx ON metaschema_public.full_text_search ( table_id ); +CREATE INDEX full_text_search_database_id_idx ON metaschema_public.full_text_search ( database_id ); + + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/function/table.sql b/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/function/table.sql new file mode 100644 index 00000000..0f0b33e3 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/function/table.sql @@ -0,0 +1,26 @@ +-- Deploy schemas/metaschema_public/tables/function/table to pg + +-- requires: schemas/metaschema_public/schema +-- requires: schemas/metaschema_public/tables/database/table +-- requires: schemas/metaschema_public/tables/schema/table + +BEGIN; + +CREATE TABLE metaschema_public.function ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + schema_id uuid NOT NULL, + + name text NOT NULL, + + -- + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT schema_fkey FOREIGN KEY (schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + + UNIQUE (schema_id, name) +); + +CREATE INDEX function_database_id_idx ON metaschema_public.function ( database_id ); +CREATE INDEX function_schema_id_idx ON metaschema_public.function ( schema_id ); + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/index/table.sql b/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/index/table.sql new file mode 100644 index 00000000..3034fd3d --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/index/table.sql @@ -0,0 +1,50 @@ +-- Deploy schemas/metaschema_public/tables/index/table to pg + +-- requires: schemas/metaschema_public/schema +-- requires: schemas/metaschema_public/tables/table/table +-- requires: schemas/metaschema_public/tables/database/table +-- requires: schemas/metaschema_public/types/object_category + +BEGIN; + +CREATE TABLE metaschema_public.index ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + table_id uuid NOT NULL, + name text NOT NULL DEFAULT '', + + field_ids uuid[], + include_field_ids uuid[], + + access_method text NOT NULL DEFAULT 'BTREE', + + index_params jsonb, + where_clause jsonb, + is_unique boolean NOT NULL default false, + + options jsonb, + op_classes text[], + + smart_tags jsonb, + + category metaschema_public.object_category NOT NULL DEFAULT 'app', + module text NULL, + scope int NULL, + + tags citext[] NOT NULL DEFAULT '{}', + + created_at timestamptz DEFAULT now(), + updated_at timestamptz DEFAULT now(), + + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT table_fkey FOREIGN KEY (table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + + -- index names are UNIQUE across schemas, so for portability we will check against database_id + UNIQUE (database_id, name) +); + + +CREATE INDEX index_table_id_idx ON metaschema_public.index ( table_id ); +CREATE INDEX index_database_id_idx ON metaschema_public.index ( database_id ); + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/node_type_registry/fixtures/node_type_registry_seed.sql b/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/node_type_registry/fixtures/node_type_registry_seed.sql new file mode 100644 index 00000000..05361345 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/node_type_registry/fixtures/node_type_registry_seed.sql @@ -0,0 +1,1883 @@ +-- Deploy schemas/metaschema_public/tables/node_type_registry/fixtures/node_type_registry_seed to pg +-- +-- GENERATED FILE — DO NOT EDIT +-- Regenerate with: cd packages/node-type-registry && pnpm generate +-- +-- Node types: 78 + +-- requires: schemas/metaschema_public/schema +-- requires: schemas/metaschema_public/tables/node_type_registry/table + +BEGIN; +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'AuthzAllowAll', + 'authz_allow_all', + 'authz', + 'Public Access', + 'Allows all access. Generates TRUE expression.', + '{"type":"object","properties":{}}'::jsonb, + '{"authz"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'AuthzAppMembership', + 'authz_app_membership_check', + 'authz', + 'App Membership Check', + 'App-level membership check (hardcoded membership_type=1). Verifies the user has app membership (optionally with specific permission) without binding to any entity from the row. Uses EXISTS subquery against SPRT table. For entity-scoped checks (org, channel, etc.), use AuthzEntityMembership instead.', + '{"type":"object","properties":{"permission":{"type":"string","description":"Single permission name to check (resolved to bitstring mask)"},"permissions":{"type":"array","items":{"type":"string"},"description":"Multiple permission names to check (ORed together into mask)"},"is_admin":{"type":"boolean","description":"If true, require is_admin flag"},"is_owner":{"type":"boolean","description":"If true, require is_owner flag"}},"required":[]}'::jsonb, + '{"membership","authz"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'AuthzComposite', + 'authz_composite', + 'authz', + 'Composite Policy', + 'Composite authorization policy that combines multiple authorization nodes using boolean logic (AND/OR). The data field contains a JSONB AST with nested authorization nodes.', + '{"type":"object","description":"A composite policy containing nested authorization nodes combined with boolean logic","properties":{"BoolExpr":{"type":"object","description":"Boolean expression combining multiple authorization nodes","properties":{"boolop":{"type":"string","enum":["AND_EXPR","OR_EXPR","NOT_EXPR"],"description":"Boolean operator: AND_EXPR, OR_EXPR, or NOT_EXPR"},"args":{"type":"array","description":"Array of authorization nodes to combine","items":{"type":"object"}}}}}}'::jsonb, + '{"composite","authz"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'AuthzDenyAll', + 'authz_deny_all', + 'authz', + 'No Access', + 'Denies all access. Generates FALSE expression.', + '{"type":"object","properties":{}}'::jsonb, + '{"authz"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'AuthzDirectOwner', + 'authz_direct_owner', + 'authz', + 'Direct Ownership', + 'Direct equality comparison between a table column and the current user ID. Simplest authorization pattern with no subqueries.', + '{"type":"object","properties":{"entity_field":{"type":"string","format":"column-ref","description":"Column name containing the owner user ID (e.g., owner_id)"}},"required":["entity_field"]}'::jsonb, + '{"ownership","authz"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'AuthzDirectOwnerAny', + 'authz_direct_owner_any', + 'authz', + 'Multi-Owner Access', + 'OR logic for multiple ownership fields. Checks if current user matches any of the specified fields.', + '{"type":"object","properties":{"entity_fields":{"type":"array","items":{"type":"string","format":"column-ref"},"description":"Array of column names to check for ownership"}},"required":["entity_fields"]}'::jsonb, + '{"ownership","authz"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'AuthzEntityMembership', + 'authz_entity_membership', + 'authz', + 'Entity Membership', + 'Membership check scoped by a field on the row through the SPRT table. Verifies user has membership in the entity referenced by the row.', + '{"type":"object","properties":{"entity_field":{"type":"string","format":"column-ref","description":"Column name referencing the entity (e.g., entity_id, org_id)"},"sel_field":{"type":"string","description":"SPRT column to select for the entity match","default":"entity_id"},"membership_type":{"type":["integer","string"],"description":"Scope: 1=app, 2=org, 3+=dynamic entity types (or string name resolved via membership_types_module)"},"entity_type":{"type":"string","description":"Entity type prefix (e.g. ''channel'', ''department''). Resolved to membership_type integer via memberships_module lookup. Use instead of membership_type for readability."},"permission":{"type":"string","description":"Single permission name to check (resolved to bitstring mask)"},"permissions":{"type":"array","items":{"type":"string"},"description":"Multiple permission names to check (ORed together into mask)"},"is_admin":{"type":"boolean","description":"If true, require is_admin flag"},"is_owner":{"type":"boolean","description":"If true, require is_owner flag"}},"required":["entity_field"]}'::jsonb, + '{"membership","authz"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'AuthzFilePath', + 'authz_file_path', + 'authz', + 'File Path Share', + 'Path-scoped file sharing via ltree containment. Grants access when a path_shares row matches the current user, bucket, and an ancestor path with the required permission.', + '{"type":"object","properties":{"shares_schema":{"type":"string","description":"Schema of the path_shares table"},"shares_table":{"type":"string","description":"Name of the path_shares table"},"files_schema":{"type":"string","description":"Schema of the files table (used to qualify column references inside the EXISTS subquery)"},"files_table":{"type":"string","description":"Name of the files table (used to qualify column references inside the EXISTS subquery)"},"permission_field":{"type":"string","format":"column-ref","description":"Boolean column on the path_shares table that grants the required permission (e.g. can_read, can_write)"},"bucket_field":{"type":"string","format":"column-ref","description":"Column on the files table referencing the bucket","default":"bucket_id"},"path_field":{"type":"string","format":"column-ref","description":"Ltree column on the files table representing the file path","default":"path"}},"required":["shares_schema","shares_table","files_table","permission_field"]}'::jsonb, + '{"storage","authz"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'AuthzMemberList', + 'authz_member_list', + 'authz', + 'Member List', + 'Check if current user is in an array column on the same row.', + '{"type":"object","properties":{"array_field":{"type":"string","format":"column-ref","description":"Column name containing the array of user IDs"}},"required":["array_field"]}'::jsonb, + '{"ownership","authz"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'AuthzMemberOwner', + 'authz_member_owner', + 'authz', + 'Member Owner', + 'Compound policy: the row must be owned by the current user (owner_field = current_user_id) AND the current user must be a member of the entity referenced by entity_field. Combines direct ownership with entity membership — the actor can only access rows they own within entities they belong to.', + '{"type":"object","properties":{"owner_field":{"type":"string","format":"column-ref","description":"Column name containing the owner user ID (e.g., owner_id)","default":"owner_id"},"entity_field":{"type":"string","format":"column-ref","description":"Column name referencing the entity (e.g., entity_id)","default":"entity_id"},"sel_field":{"type":"string","description":"SPRT column to select for the entity match","default":"entity_id"},"membership_type":{"type":["integer","string"],"description":"Scope: 1=app, 2=org, 3+=dynamic entity types (or string name resolved via membership_types_module)"},"entity_type":{"type":"string","description":"Entity type prefix (e.g. ''channel'', ''department''). Resolved to membership_type integer via memberships_module lookup."},"permission":{"type":"string","description":"Single permission name to check (resolved to bitstring mask)"},"permissions":{"type":"array","items":{"type":"string"},"description":"Multiple permission names to check (ORed together into mask)"}},"required":["owner_field","entity_field"]}'::jsonb, + '{"ownership","membership","authz"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'AuthzNotReadOnly', + 'authz_not_read_only', + 'authz', + 'Not Read-Only', + 'Restrictive policy that blocks read-only members from mutations. Checks actor_id + is_read_only IS NOT TRUE on the SPRT. Designed to run as a restrictive counterpart after a permissive AuthzEntityMembership policy has already verified membership.', + '{"type":"object","properties":{"entity_field":{"type":"string","format":"column-ref","description":"Column name referencing the entity (e.g., entity_id, org_id)"},"membership_type":{"type":["integer","string"],"description":"Scope: 2=org, 3+=dynamic entity types. Must be >= 2 (entity-scoped)."}},"required":["entity_field"]}'::jsonb, + '{"membership","authz","restrictive"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'AuthzOrgHierarchy', + 'authz_org_hierarchy', + 'authz', + 'Org Hierarchy', + 'Organizational hierarchy visibility using closure table. Managers can see subordinate data or subordinates can see manager data.', + '{"type":"object","properties":{"direction":{"type":"string","enum":["up","down"],"description":"down=manager sees subordinates, up=subordinate sees managers"},"entity_field":{"type":"string","format":"column-ref","description":"Field referencing the org entity","default":"entity_id"},"anchor_field":{"type":"string","format":"column-ref","description":"Field referencing the user (e.g., owner_id)"},"max_depth":{"type":"integer","description":"Optional max depth to limit visibility"}},"required":["direction","anchor_field"]}'::jsonb, + '{"membership","hierarchy","authz"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'AuthzPeerOwnership', + 'authz_peer_ownership', + 'authz', + 'Peer Ownership', + 'Peer visibility through shared entity membership. Authorizes access to user-owned rows when the owner and current user are both members of the same entity. Self-joins the SPRT table to find peers.', + '{"type":"object","properties":{"owner_field":{"type":"string","format":"column-ref","description":"Column name on protected table referencing the owning user (e.g., owner_id)"},"membership_type":{"type":["integer","string"],"description":"Scope: 1=app, 2=org, 3+=dynamic entity types (or string name resolved via membership_types_module)"},"entity_type":{"type":"string","description":"Entity type prefix (e.g. ''channel'', ''department''). Resolved to membership_type integer via memberships_module lookup. Use instead of membership_type for readability."},"permission":{"type":"string","description":"Single permission name to check on the current user membership (resolved to bitstring mask)"},"permissions":{"type":"array","items":{"type":"string"},"description":"Multiple permission names to check on the current user membership (ORed together into mask)"},"is_admin":{"type":"boolean","description":"If true, require is_admin flag on current user membership"},"is_owner":{"type":"boolean","description":"If true, require is_owner flag on current user membership"}},"required":["owner_field"]}'::jsonb, + '{"membership","peer","authz"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'AuthzPublishable', + 'authz_publishable', + 'authz', + 'Published Content', + 'Published state access control. Restricts access to records that are published.', + '{"type":"object","properties":{"is_published_field":{"type":"string","format":"column-ref","description":"Boolean field indicating published state","default":"is_published"},"published_at_field":{"type":"string","format":"column-ref","description":"Timestamp field for publish time","default":"published_at"},"require_published_at":{"type":"boolean","description":"Require published_at to be non-null and <= now()","default":true}}}'::jsonb, + '{"temporal","publishing","authz"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'AuthzRelatedEntityMembership', + 'authz_related_entity_membership', + 'authz', + 'Related Entity Membership', + 'JOIN-based membership verification through related tables. Joins SPRT table with another table to verify membership.', + '{"type":"object","properties":{"entity_field":{"type":"string","format":"column-ref","description":"Column name on protected table referencing the join table"},"sel_field":{"type":"string","description":"SPRT column to select for the entity match","default":"entity_id"},"sprt_join_field":{"type":"string","description":"SPRT column to join on with the related table","default":"entity_id"},"membership_type":{"type":["integer","string"],"description":"Scope: 1=app, 2=org, 3+=dynamic entity types (or string name resolved via membership_types_module)"},"entity_type":{"type":"string","description":"Entity type prefix (e.g. ''channel'', ''department''). Resolved to membership_type integer via memberships_module lookup. Use instead of membership_type for readability."},"obj_table_id":{"type":"string","format":"uuid","description":"UUID of the join table (alternative to obj_schema/obj_table)"},"obj_schema":{"type":"string","description":"Schema of the join table (or use obj_table_id)"},"obj_table":{"type":"string","description":"Name of the join table (or use obj_table_id)"},"obj_field_id":{"type":"string","format":"uuid","description":"UUID of field on join table (alternative to obj_field)"},"obj_field":{"type":"string","format":"column-ref","description":"Field name on join table to match against SPRT entity_id"},"permission":{"type":"string","description":"Single permission name to check (resolved to bitstring mask)"},"permissions":{"type":"array","items":{"type":"string"},"description":"Multiple permission names to check (ORed together into mask)"},"is_admin":{"type":"boolean","description":"If true, require is_admin flag"},"is_owner":{"type":"boolean","description":"If true, require is_owner flag"}},"required":["entity_field"]}'::jsonb, + '{"membership","authz"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'AuthzRelatedMemberList', + 'authz_related_member_list', + 'authz', + 'Related Member List', + 'Array membership check in a related table.', + '{"type":"object","properties":{"owned_schema":{"type":"string","description":"Schema of the related table"},"owned_table":{"type":"string","description":"Name of the related table"},"owned_table_key":{"type":"string","format":"column-ref","description":"Array column in related table"},"owned_table_ref_key":{"type":"string","format":"column-ref","description":"FK column in related table"},"this_object_key":{"type":"string","format":"column-ref","description":"PK column in protected table"}},"required":["owned_schema","owned_table","owned_table_key","owned_table_ref_key","this_object_key"]}'::jsonb, + '{"ownership","authz"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'AuthzRelatedPeerOwnership', + 'authz_related_peer_ownership', + 'authz', + 'Related Peer Ownership', + 'Peer visibility through shared entity membership via a related table. Like AuthzPeerOwnership but the owning user is resolved through a FK JOIN to a related table. Combines SPRT self-join with object table JOIN.', + '{"type":"object","properties":{"entity_field":{"type":"string","format":"column-ref","description":"Column name on protected table referencing the related table (e.g., message_id)"},"membership_type":{"type":["integer","string"],"description":"Scope: 1=app, 2=org, 3+=dynamic entity types (or string name resolved via membership_types_module)"},"entity_type":{"type":"string","description":"Entity type prefix (e.g. ''channel'', ''department''). Resolved to membership_type integer via memberships_module lookup. Use instead of membership_type for readability."},"obj_table_id":{"type":"string","format":"uuid","description":"UUID of the related table (alternative to obj_schema/obj_table)"},"obj_schema":{"type":"string","description":"Schema of the related table (or use obj_table_id)"},"obj_table":{"type":"string","description":"Name of the related table (or use obj_table_id)"},"obj_field_id":{"type":"string","format":"uuid","description":"UUID of field on related table containing the owner user ID (alternative to obj_field)"},"obj_field":{"type":"string","format":"column-ref","description":"Field name on related table containing the owner user ID (e.g., sender_id)"},"obj_ref_field":{"type":"string","format":"column-ref","description":"Field on related table to select for matching entity_field","default":"id"},"permission":{"type":"string","description":"Single permission name to check on the current user membership (resolved to bitstring mask)"},"permissions":{"type":"array","items":{"type":"string"},"description":"Multiple permission names to check on the current user membership (ORed together into mask)"},"is_admin":{"type":"boolean","description":"If true, require is_admin flag on current user membership"},"is_owner":{"type":"boolean","description":"If true, require is_owner flag on current user membership"}},"required":["entity_field"]}'::jsonb, + '{"membership","peer","authz"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'AuthzTemporal', + 'authz_temporal', + 'authz', + 'Temporal Access', + 'Time-window based access control. Restricts access based on valid_from and/or valid_until timestamps. At least one of valid_from_field or valid_until_field must be provided.', + '{"type":"object","properties":{"valid_from_field":{"type":"string","format":"column-ref","description":"Column for start time (at least one of valid_from_field or valid_until_field required)"},"valid_until_field":{"type":"string","format":"column-ref","description":"Column for end time (at least one of valid_from_field or valid_until_field required)"},"valid_from_inclusive":{"type":"boolean","description":"Include start boundary","default":true},"valid_until_inclusive":{"type":"boolean","description":"Include end boundary","default":false}},"anyOf":[{"required":["valid_from_field"]},{"required":["valid_until_field"]}]}'::jsonb, + '{"temporal","authz"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'CheckGreaterThan', + 'check_greater_than', + 'check', + 'Check Greater Than', + 'Adds a CHECK constraint that validates a column value is greater than a threshold (single-column: column > value) or that one column is greater than another (cross-column: columns[0] > columns[1]). Compiled via AST helpers.', + '{"type":"object","properties":{"column":{"type":"string","format":"column-ref","description":"Single column to compare against value (mutually exclusive with columns)"},"value":{"type":"number","description":"Threshold value for single-column comparison (column > value)","default":0},"columns":{"type":"array","items":{"type":"string","format":"column-ref"},"description":"Two columns for cross-column comparison (columns[0] > columns[1])","minItems":2,"maxItems":2}}}'::jsonb, + '{"check","constraint","validation","comparison"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'CheckLessThan', + 'check_less_than', + 'check', + 'Check Less Than', + 'Adds a CHECK constraint that validates a column value is less than a threshold (single-column: column < value) or that one column is less than another (cross-column: columns[0] < columns[1]). Compiled via AST helpers.', + '{"type":"object","properties":{"column":{"type":"string","format":"column-ref","description":"Single column to compare against value (mutually exclusive with columns)"},"value":{"type":"number","description":"Threshold value for single-column comparison (column < value)"},"columns":{"type":"array","items":{"type":"string","format":"column-ref"},"description":"Two columns for cross-column comparison (columns[0] < columns[1])","minItems":2,"maxItems":2}}}'::jsonb, + '{"check","constraint","validation","comparison"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'CheckNotEqual', + 'check_not_equal', + 'check', + 'Check Not Equal', + 'Adds a CHECK constraint that validates two columns are not equal (columns[0] != columns[1]). Useful for preventing self-referencing rows. Compiled via AST helpers.', + '{"type":"object","properties":{"columns":{"type":"array","items":{"type":"string","format":"column-ref"},"description":"Two columns that must not be equal","minItems":2,"maxItems":2}},"required":["columns"]}'::jsonb, + '{"check","constraint","validation","inequality"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'CheckOneOf', + 'check_one_of', + 'check', + 'Check One Of', + 'Adds a CHECK constraint that validates a column value is one of an allowed set (e.g. tier IN (''free'', ''paid'', ''custom'')). Compiled to column = ANY(ARRAY[...]) via AST helpers.', + '{"type":"object","properties":{"column":{"type":"string","format":"column-ref","description":"Column to validate against the allowed values"},"values":{"type":"array","items":{"type":"string"},"description":"Array of allowed values for the column"}},"required":["column","values"]}'::jsonb, + '{"check","constraint","validation","enum"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'DataArchivable', + 'data_archivable', + 'data', + 'Archivable', + 'Adds user-reversible archive support with is_archived boolean and archived_at timestamp, plus a partial index for efficient active-row queries.', + '{"type":"object","properties":{"is_archived_field":{"type":"string","format":"column-ref","description":"Column name for the archive boolean flag","default":"is_archived"},"archived_at_field":{"type":"string","format":"column-ref","description":"Column name for the archive timestamp","default":"archived_at"},"include_id":{"type":"boolean","description":"If true, also adds a UUID primary key column with auto-generation","default":true}}}'::jsonb, + '{"schema"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'DataBulk', + 'data_bulk', + 'data', + 'Bulk Operations', + 'Enables bulk mutation smart tags on a table. When provisioned, adds @behavior tags for the selected bulk operations (insert, upsert, update, delete). Requires the graphile-bulk-mutations plugin.', + '{"type":"object","properties":{"insert":{"type":"boolean","description":"Enable bulk insert (+bulkInsert)","default":true},"upsert":{"type":"boolean","description":"Enable bulk upsert (+bulkUpsert)","default":false},"update":{"type":"boolean","description":"Enable bulk update (+bulkUpdate)","default":false},"delete":{"type":"boolean","description":"Enable bulk delete (+bulkDelete)","default":false}}}'::jsonb, + '{"bulk","mutations","graphile"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'DataCompositeField', + 'data_composite_field', + 'data', + 'Composite Field', + 'Creates a derived text field that automatically concatenates multiple source fields via BEFORE INSERT/UPDATE triggers. Used to produce a unified text representation (e.g., embedding_text) from multiple columns on a table. The trigger fires with ''_000'' prefix to run before Search* triggers alphabetically.', + '{"type":"object","properties":{"target":{"type":"string","format":"column-ref","description":"Name of the derived text field to create","default":"embedding_text"},"source_fields":{"type":"array","items":{"type":"string","format":"column-ref"},"description":"Array of source field names to concatenate into the target field"},"format":{"type":"string","enum":["labeled","plain"],"description":"Output format: ''labeled'' (field_name: value) or ''plain'' (values only)","default":"labeled"}},"required":["source_fields"]}'::jsonb, + '{"transform","behavior"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'DataDirectOwner', + 'data_direct_owner', + 'data', + 'Ownership', + 'Adds ownership column for direct user ownership. Enables AuthzDirectOwner authorization.', + '{"type":"object","properties":{"owner_field_name":{"type":"string","format":"column-ref","description":"Column name for owner ID","default":"owner_id"},"include_id":{"type":"boolean","description":"If true, also adds a UUID primary key column with auto-generation","default":true},"include_user_fk":{"type":"boolean","description":"If true, adds a foreign key constraint from owner_id to the users table","default":true},"create_index":{"type":"boolean","description":"If true, creates a B-tree index on the owner column","default":true}}}'::jsonb, + '{"ownership","schema"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'DataEntityMembership', + 'data_entity_membership', + 'data', + 'Entity Membership', + 'Adds entity reference for organization/group scoping. Enables AuthzEntityMembership, AuthzMembership, AuthzOrgHierarchy authorization.', + '{"type":"object","properties":{"entity_field_name":{"type":"string","format":"column-ref","description":"Column name for entity ID","default":"entity_id"},"include_id":{"type":"boolean","description":"If true, also adds a UUID primary key column with auto-generation","default":true},"include_user_fk":{"type":"boolean","description":"If true, adds a foreign key constraint from entity_id to the users table","default":true},"create_index":{"type":"boolean","description":"If true, creates a B-tree index on the entity column","default":true}}}'::jsonb, + '{"membership","schema"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'DataForceCurrentUser', + 'data_force_current_user', + 'data', + 'Force Current User', + 'BEFORE INSERT trigger that forces a field to the value of jwt_public.current_user_id(). Prevents clients from spoofing the actor/uploader identity. The field value is always overwritten regardless of what the client provides.', + '{"type":"object","properties":{"field_name":{"type":"string","format":"column-ref","description":"Name of the field to force to current_user_id()","default":"actor_id"}}}'::jsonb, + '{"trigger","security","schema"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'DataI18n', + 'data_i18n', + 'data', + 'Internationalization', + 'Creates a companion _translations table with lang_code + translatable fields. Copies SELECT policies and column-ref fields from the base table. Adds @i18n smart comment so the Graphile i18n plugin discovers it. Requires i18n_module to be provisioned for the database.', + '{"type":"object","properties":{"fields":{"type":"array","items":{"type":"string","format":"column-ref"},"description":"Field names on the base table to make translatable. Each field is duplicated on the translation table with the same type."},"table_suffix":{"type":"string","description":"Suffix for the translation table name","default":"_translations"},"lang_code_type":{"type":"string","enum":["citext","text"],"description":"Type for the lang_code column","default":"citext"},"copy_mutation_policies":{"type":"boolean","description":"Whether to also copy INSERT/UPDATE/DELETE policies (not just SELECT). Default true — translations should be editable by the same users who can edit the base row.","default":true},"search":{"type":"object","description":"SearchFullText configuration for the translations table. When provided, creates a tsvector column on the translations table with lang_column=lang_code for dynamic per-row language stemming.","properties":{"field_name":{"type":"string","format":"column-ref","description":"Name of the tsvector column on the translations table","default":"search"},"source_fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","format":"column-ref","description":"Name of the translatable source column"},"weight":{"type":"string","enum":["A","B","C","D"],"description":"tsvector weight class (A=highest, D=lowest)","default":"D"}},"required":["field"]},"description":"Translatable columns that feed the tsvector. Language is determined dynamically from the lang_code column of each row."},"search_score_weight":{"type":"number","description":"Weight for this algorithm in composite searchScore","default":1}},"required":["source_fields"]}},"required":["fields"]}'::jsonb, + '{"i18n","translation","schema"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'DataId', + 'data_id', + 'data', + 'Primary Key ID', + 'Adds a UUID primary key column with auto-generation default (uuidv7). This is the standard primary key pattern for all tables.', + '{"type":"object","properties":{"field_name":{"type":"string","format":"column-ref","description":"Column name for the primary key","default":"id"}}}'::jsonb, + '{"primary_key","schema"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'DataImmutableFields', + 'data_immutable_fields', + 'data', + 'Immutable Fields', + 'BEFORE UPDATE trigger that prevents changes to a list of specified fields after INSERT. Raises an exception if any of the listed fields have changed. Unlike FieldImmutable (single-field), this handles multiple fields in a single trigger for efficiency.', + '{"type":"object","properties":{"fields":{"type":"array","items":{"type":"string","format":"column-ref"},"description":"Field names that cannot be modified after INSERT (e.g. [\"key\", \"bucket_id\", \"owner_id\"])"}},"required":["fields"]}'::jsonb, + '{"trigger","constraint","schema"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'DataInflection', + 'data_inflection', + 'data', + 'Inflection', + 'Transforms field values using inflection operations (snake_case, camelCase, slugify, plural, singular, etc). Attaches BEFORE INSERT and BEFORE UPDATE triggers. References fields by name in data jsonb.', + '{"type":"object","properties":{"field_name":{"type":"string","format":"column-ref","description":"Name of the field to transform"},"ops":{"type":"array","items":{"type":"string","enum":["plural","singular","camel","pascal","dashed","slugify","underscore","lower","upper"]},"description":"Inflection operations to apply in order"}},"required":["field_name","ops"]}'::jsonb, + '{"transform","behavior"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'DataInheritFromParent', + 'data_inherit_from_parent', + 'data', + 'Inherit From Parent', + 'BEFORE INSERT trigger that copies specified fields from a parent table via a foreign key. The parent row is looked up through RLS (SECURITY INVOKER), so the insert fails if the caller cannot see the parent. Used by the storage module to inherit owner_id and is_public from buckets to files.', + '{"type":"object","properties":{"parent_fk_field":{"type":"string","format":"column-ref","description":"Name of the FK field on this table that references the parent (e.g. bucket_id)"},"fields":{"type":"array","items":{"type":"string","format":"column-ref"},"description":"Field names to copy from the parent row (e.g. [\"owner_id\", \"is_public\"])"},"parent_table":{"type":"string","description":"Parent table name (optional fallback if FK not yet registered in metaschema)"},"parent_schema":{"type":"string","description":"Parent table schema (optional, defaults to same schema as child table)"}},"required":["parent_fk_field","fields"]}'::jsonb, + '{"trigger","inheritance","schema"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'DataJsonb', + 'data_jsonb', + 'data', + 'JSONB Field', + 'Adds a JSONB column with optional GIN index for containment queries (@>, ?, ?|, ?&). Standard pattern for semi-structured metadata.', + '{"type":"object","properties":{"field_name":{"type":"string","format":"column-ref","description":"Column name for the JSONB field","default":"metadata"},"default_value":{"type":"object","description":"Default value as a FieldDefault object","default":{"value":{},"cast":{"name":"jsonb"}}},"is_required":{"type":"boolean","description":"Whether the column has a NOT NULL constraint","default":false},"create_index":{"type":"boolean","description":"Whether to create a GIN index","default":true}}}'::jsonb, + '{"jsonb","schema"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'DataMemberOwner', + 'data_member_owner', + 'data', + 'Member Owner', + 'Adds owner_id and entity_id columns with a compound AuthzMemberOwner policy. The actor must own the row (owner_id = current_user_id()) AND be a member of the entity (entity_id in SPRT). Use for private data within an entity scope — e.g., personal chat threads that belong to the company but only the author can see.', + '{"type":"object","properties":{"owner_field_name":{"type":"string","format":"column-ref","description":"Column name for the owner reference","default":"owner_id"},"entity_field_name":{"type":"string","format":"column-ref","description":"Column name for the entity reference","default":"entity_id"},"include_id":{"type":"boolean","description":"If true, also adds a UUID primary key column with auto-generation","default":true},"include_user_fk":{"type":"boolean","description":"If true, adds foreign key constraints from owner_id and entity_id to the users table","default":true},"create_index":{"type":"boolean","description":"If true, creates B-tree indexes on the owner and entity columns","default":true},"membership_type":{"type":"integer","description":"Membership type for SPRT resolution. Required for entity-scoped provisioning.","default":null}}}'::jsonb, + '{"ownership","membership","security","schema"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'DataOwnedFields', + 'data_owned_fields', + 'data', + 'Owned Fields', + 'Restricts which user can modify specific columns in shared objects. Creates an AFTER UPDATE trigger that throws OWNED_PROPS when a non-owner tries to change protected fields. References fields by name in data jsonb.', + '{"type":"object","properties":{"role_key_field_name":{"type":"string","format":"column-ref","description":"Name of the field identifying the owner (e.g. sender_id)"},"protected_field_names":{"type":"array","items":{"type":"string","format":"column-ref"},"description":"Names of fields only this owner can modify"}},"required":["role_key_field_name","protected_field_names"]}'::jsonb, + '{"ownership","constraint","behavior"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'DataOwnershipInEntity', + 'data_ownership_in_entity', + 'data', + 'Ownership In Entity', + 'Combines direct ownership with entity scoping. Adds both owner_id and entity_id columns. Enables AuthzDirectOwner, AuthzEntityMembership, and AuthzOrgHierarchy authorization. Particularly useful for OrgHierarchy where a user owns a row (owner_id) within an entity (entity_id), and managers above can see subordinate-owned records via the hierarchy closure table.', + '{"type":"object","properties":{"owner_field_name":{"type":"string","format":"column-ref","description":"Column name for the owner reference","default":"owner_id"},"entity_field_name":{"type":"string","format":"column-ref","description":"Column name for the entity reference","default":"entity_id"},"include_id":{"type":"boolean","description":"If true, also adds a UUID primary key column with auto-generation","default":true},"include_user_fk":{"type":"boolean","description":"If true, adds foreign key constraints from owner_id and entity_id to the users table","default":true},"create_index":{"type":"boolean","description":"If true, creates B-tree indexes on the owner and entity columns","default":true}}}'::jsonb, + '{"ownership","membership","hierarchy","schema"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'DataPeoplestamps', + 'data_peoplestamps', + 'data', + 'Peoplestamps', + 'Adds user tracking for creates/updates with created_by and updated_by columns.', + '{"type":"object","properties":{"created_by_field":{"type":"string","format":"column-ref","description":"Column name for the creating user reference","default":"created_by"},"updated_by_field":{"type":"string","format":"column-ref","description":"Column name for the last-updating user reference","default":"updated_by"},"include_id":{"type":"boolean","description":"If true, also adds a UUID primary key column with auto-generation","default":true},"include_user_fk":{"type":"boolean","description":"If true, adds foreign key constraints from created_by and updated_by to the users table","default":false},"create_index":{"type":"boolean","description":"If true, creates B-tree indexes on the peoplestamp columns","default":true}}}'::jsonb, + '{"timestamps","schema"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'DataPublishable', + 'data_publishable', + 'data', + 'Publishable', + 'Adds publish state columns (is_published, published_at) for content visibility. Enables AuthzPublishable and AuthzTemporal authorization.', + '{"type":"object","properties":{"is_published_field_name":{"type":"string","format":"column-ref","description":"Column name for the published boolean flag","default":"is_published"},"published_at_field_name":{"type":"string","format":"column-ref","description":"Column name for the publish timestamp","default":"published_at"},"include_id":{"type":"boolean","description":"If true, also adds a UUID primary key column with auto-generation","default":true}}}'::jsonb, + '{"publishing","temporal","schema"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'DataRealtime', + 'data_realtime', + 'data', + 'Realtime Subscriptions', + 'Creates per-table subscriber tables in subscriptions_public with RLS policies derived from source table SELECT policies. Attaches statement-level triggers to emit changes to subscribers.', + '{"type":"object","properties":{"operations":{"type":"array","items":{"type":"string","enum":["INSERT","UPDATE","DELETE"]},"description":"Which DML operations to track with emit_change triggers","default":["INSERT","UPDATE","DELETE"]},"subscriber_table_name":{"type":"string","description":"Custom name for the subscriber table (defaults to {source_table}_subscriber)"}}}'::jsonb, + '{"realtime","subscriptions","triggers"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'DataSlug', + 'data_slug', + 'data', + 'Slug', + 'Auto-generates URL-friendly slugs from field values on insert/update. Attaches BEFORE INSERT and BEFORE UPDATE triggers that call inflection.slugify() on the target field. References fields by name in data jsonb.', + '{"type":"object","properties":{"field_name":{"type":"string","format":"column-ref","description":"Name of the field to slugify","default":"slug"},"source_field_name":{"type":"string","format":"column-ref","description":"Optional source field name (defaults to field_name)"}},"required":[]}'::jsonb, + '{"transform","behavior"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'DataSoftDelete', + 'data_soft_delete', + 'data', + 'Soft Delete', + 'Adds soft delete support with deleted_at and is_deleted columns.', + '{"type":"object","properties":{"deleted_at_field":{"type":"string","format":"column-ref","description":"Column name for the soft-delete timestamp","default":"deleted_at"},"is_deleted_field":{"type":"string","format":"column-ref","description":"Column name for the soft-delete boolean flag","default":"is_deleted"},"include_id":{"type":"boolean","description":"If true, also adds a UUID primary key column with auto-generation","default":true}}}'::jsonb, + '{"schema"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'DataStatusField', + 'data_status_field', + 'data', + 'Status Field', + 'Adds a status column with B-tree index for efficient equality filtering and sorting. Optionally constrains values via CHECK constraint when allowed_values is provided.', + '{"type":"object","properties":{"field_name":{"type":"string","format":"column-ref","description":"Column name for the status field","default":"status"},"type":{"type":"object","description":"Column type as a FieldType object","default":{"name":"text"}},"default_value":{"type":"string","description":"Default value expression (e.g., active)"},"is_required":{"type":"boolean","description":"Whether the column has a NOT NULL constraint","default":true},"allowed_values":{"type":"array","items":{"type":"string"},"description":"If provided, creates a CHECK constraint restricting the column to these values"}}}'::jsonb, + '{"status","schema"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'DataTags', + 'data_tags', + 'data', + 'Tags', + 'Adds a citext[] tags column with GIN index for efficient array containment queries (@>, &&). Standard tagging pattern for categorization and filtering.', + '{"type":"object","properties":{"field_name":{"type":"string","format":"column-ref","description":"Column name for the tags array","default":"tags"},"default_value":{"type":"object","description":"Default value as a FieldDefault object","default":{"value":[],"cast":{"name":"citext","array_dimensions":1}}},"is_required":{"type":"boolean","description":"Whether the column has a NOT NULL constraint","default":false}}}'::jsonb, + '{"tags","schema"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'DataTimestamps', + 'data_timestamps', + 'data', + 'Timestamps', + 'Adds automatic timestamp tracking with created_at and updated_at columns.', + '{"type":"object","properties":{"created_at_field":{"type":"string","format":"column-ref","description":"Column name for the creation timestamp","default":"created_at"},"updated_at_field":{"type":"string","format":"column-ref","description":"Column name for the last-updated timestamp","default":"updated_at"},"include_id":{"type":"boolean","description":"If true, also adds a UUID primary key column with auto-generation","default":true}}}'::jsonb, + '{"timestamps","schema"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'EventReferral', + 'event_referral', + 'event', + 'Event Referral', + 'Creates triggers that record events for the referrer (inviter) when their invitees perform actions on a watched table. Resolves the referrer automatically via the invites module''s claimed_invites table using the membership_type context. Supports the same compound condition system as EventTracker. Use with achievements to unlock levels and grant credits based on invitee activity.', + '{"type":"object","$defs":{"triggerCondition":{"type":"object","description":"A leaf condition ({field, op, value?, row?, ref?}) or a combinator ({AND, OR, NOT}).","properties":{"field":{"type":"string","format":"column-ref","description":"Column name (validated against the table)."},"op":{"type":"string","enum":["=","!=",">","<",">=","<=","LIKE","NOT LIKE","IS NULL","IS NOT NULL","IS DISTINCT FROM"],"description":"Comparison operator."},"value":{"description":"Comparison value. Type is resolved from the column definition. Omit for IS NULL, IS NOT NULL, IS DISTINCT FROM."},"row":{"type":"string","enum":["NEW","OLD"],"default":"NEW","description":"Row reference (default: NEW)."},"ref":{"type":"object","description":"Column reference for field-to-field comparison (alternative to value).","properties":{"field":{"type":"string","format":"column-ref"},"row":{"type":"string","enum":["NEW","OLD"],"default":"NEW"}}},"AND":{"type":"array","description":"Array of conditions combined with AND.","items":{"$ref":"#/$defs/triggerCondition"}},"OR":{"type":"array","description":"Array of conditions combined with OR.","items":{"$ref":"#/$defs/triggerCondition"}},"NOT":{"$ref":"#/$defs/triggerCondition","description":"Negated condition."}}}},"properties":{"event_name":{"type":"string","description":"Event type name to record for the referrer (e.g., \"invitee_uploaded_avatar\", \"invitee_completed_onboarding\")"},"events":{"type":"array","items":{"type":"string","enum":["INSERT","UPDATE","DELETE"]},"description":"DML events that trigger recording","default":["INSERT"]},"actor_field":{"type":"string","format":"column-ref","description":"Column containing the invitee (actor) ID on the source table — used to look up the referrer via claimed_invites.receiver_id","default":"owner_id"},"entity_field":{"type":"string","format":"column-ref","description":"Column containing the entity ID (org/group) for entity-scoped referral events. For FK lookups (e.g., channel_id → channels.entity_id), combine with entity_lookup. Omit for user-only events."},"entity_lookup":{"type":"object","description":"FK lookup configuration for resolving entity_id through a related table. Used when entity_field is a FK (e.g., channel_id) rather than a direct entity_id. The generator validates all fields against metaschema within the same database_id.","properties":{"obj_table":{"type":"string","description":"Name of the related table to look up entity_id from (e.g., \"channels\"). Required."},"obj_schema":{"type":"string","description":"Schema of the related table (user-facing name, e.g., \"public\"). Optional — if omitted, resolved by table name within the same database_id (raises error if ambiguous)."},"obj_field":{"type":"string","description":"Column on the related table that holds the entity_id (e.g., \"entity_id\"). Required."}},"required":["obj_table","obj_field"]},"max_depth":{"type":"integer","description":"Maximum depth to walk up the invite chain. Default 1 (direct inviter only). Set 2–10 to enable multi-level referral rewards. App-level only — must not be combined with entity_field.","default":1,"minimum":1,"maximum":10},"auto_register_type":{"type":"boolean","description":"Automatically register the event_name in event_types during provisioning","default":true},"condition_field":{"type":"string","format":"column-ref","description":"Column name for conditional WHEN clause (fires only when field equals condition_value)"},"condition_value":{"type":"string","description":"Value to compare against condition_field in WHEN clause"},"conditions":{"description":"Compound conditions for the trigger WHEN clause. Accepts a single leaf condition, an array of conditions (implicitly AND), or a nested combinator tree ({AND: [...], OR: [...], NOT: {...}}). Each leaf is {field, op, value?, row?, ref?}. Column types are resolved automatically from the table schema. Cannot be combined with condition_field or watch_fields.","x-codegen-type":"TriggerCondition | TriggerCondition[]","oneOf":[{"$ref":"#/$defs/triggerCondition"},{"type":"array","items":{"$ref":"#/$defs/triggerCondition"}}]},"watch_fields":{"type":"array","items":{"type":"string","format":"column-ref"},"description":"For UPDATE triggers, only fire when these fields change (uses DISTINCT FROM)"}},"required":["event_name"]}'::jsonb, + '{"events","referral","invites","analytics","tracking"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'EventTracker', + 'event_tracker', + 'event', + 'Event Tracker', + 'Creates triggers that record events via the events module when table rows change. Supports the same compound condition system as JobTrigger (condition_field, watch_fields, or full AND/OR/NOT conditions). Events are recorded to app_events and aggregated automatically. Use with achievements (blueprint-level) to unlock levels and grant credits based on event accumulation.', + '{"type":"object","$defs":{"triggerCondition":{"type":"object","description":"A leaf condition ({field, op, value?, row?, ref?}) or a combinator ({AND, OR, NOT}).","properties":{"field":{"type":"string","format":"column-ref","description":"Column name (validated against the table)."},"op":{"type":"string","enum":["=","!=",">","<",">=","<=","LIKE","NOT LIKE","IS NULL","IS NOT NULL","IS DISTINCT FROM"],"description":"Comparison operator."},"value":{"description":"Comparison value. Type is resolved from the column definition. Omit for IS NULL, IS NOT NULL, IS DISTINCT FROM."},"row":{"type":"string","enum":["NEW","OLD"],"default":"NEW","description":"Row reference (default: NEW)."},"ref":{"type":"object","description":"Column reference for field-to-field comparison (alternative to value).","properties":{"field":{"type":"string","format":"column-ref"},"row":{"type":"string","enum":["NEW","OLD"],"default":"NEW"}}},"AND":{"type":"array","description":"Array of conditions combined with AND.","items":{"$ref":"#/$defs/triggerCondition"}},"OR":{"type":"array","description":"Array of conditions combined with OR.","items":{"$ref":"#/$defs/triggerCondition"}},"NOT":{"$ref":"#/$defs/triggerCondition","description":"Negated condition."}}}},"properties":{"event_name":{"type":"string","description":"Event type name to record (e.g., \"avatar_uploaded\", \"order_completed\")"},"events":{"type":"array","items":{"type":"string","enum":["INSERT","UPDATE","DELETE"]},"description":"DML events that trigger recording","default":["INSERT"]},"count":{"type":"integer","description":"Number of events to record per trigger fire","default":1},"toggle":{"type":"boolean","description":"Toggle mode: records event when condition is met, removes when condition is unmet","default":false},"actor_field":{"type":"string","format":"column-ref","description":"Column containing the actor (user) ID to attribute the event to","default":"owner_id"},"entity_field":{"type":"string","format":"column-ref","description":"Column containing the entity ID (org/group) for entity-scoped events. For FK lookups (e.g., channel_id → channels.entity_id), combine with entity_lookup. Omit for user-only events."},"entity_lookup":{"type":"object","description":"FK lookup configuration for resolving entity_id through a related table. Used when entity_field is a FK (e.g., channel_id) rather than a direct entity_id. The generator validates all fields against metaschema within the same database_id.","properties":{"obj_table":{"type":"string","description":"Name of the related table to look up entity_id from (e.g., \"channels\"). Required."},"obj_schema":{"type":"string","description":"Schema of the related table (user-facing name, e.g., \"public\"). Optional — if omitted, resolved by table name within the same database_id (raises error if ambiguous)."},"obj_field":{"type":"string","description":"Column on the related table that holds the entity_id (e.g., \"entity_id\"). Required."}},"required":["obj_table","obj_field"]},"auto_register_type":{"type":"boolean","description":"Automatically register the event_name in event_types during provisioning","default":true},"condition_field":{"type":"string","format":"column-ref","description":"Column name for conditional WHEN clause (fires only when field equals condition_value)"},"condition_value":{"type":"string","description":"Value to compare against condition_field in WHEN clause"},"conditions":{"description":"Compound conditions for the trigger WHEN clause. Accepts a single leaf condition, an array of conditions (implicitly AND), or a nested combinator tree ({AND: [...], OR: [...], NOT: {...}}). Each leaf is {field, op, value?, row?, ref?}. Column types are resolved automatically from the table schema. Cannot be combined with condition_field or watch_fields.","x-codegen-type":"TriggerCondition | TriggerCondition[]","oneOf":[{"$ref":"#/$defs/triggerCondition"},{"type":"array","items":{"$ref":"#/$defs/triggerCondition"}}]},"watch_fields":{"type":"array","items":{"type":"string","format":"column-ref"},"description":"For UPDATE triggers, only fire when these fields change (uses DISTINCT FROM)"}},"required":["event_name"]}'::jsonb, + '{"events","triggers","analytics","tracking"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'JobTrigger', + 'data_job_trigger', + 'job', + 'Job Trigger', + 'Dynamically creates PostgreSQL triggers that enqueue jobs via app_jobs.add_job() when table rows are inserted, updated, or deleted. Supports configurable payload strategies (full row, row ID, selected fields, or custom mapping), conditional firing via WHEN clauses, watched field changes, and extended job options (queue, priority, delay, max attempts).', + '{"type":"object","$defs":{"triggerCondition":{"type":"object","description":"A leaf condition ({field, op, value?, row?, ref?}) or a combinator ({AND, OR, NOT}).","properties":{"field":{"type":"string","format":"column-ref","description":"Column name (validated against the table)."},"op":{"type":"string","enum":["=","!=",">","<",">=","<=","LIKE","NOT LIKE","IS NULL","IS NOT NULL","IS DISTINCT FROM"],"description":"Comparison operator."},"value":{"description":"Comparison value. Type is resolved from the column definition. Omit for IS NULL, IS NOT NULL, IS DISTINCT FROM."},"row":{"type":"string","enum":["NEW","OLD"],"default":"NEW","description":"Row reference (default: NEW)."},"ref":{"type":"object","description":"Column reference for field-to-field comparison (alternative to value).","properties":{"field":{"type":"string","format":"column-ref"},"row":{"type":"string","enum":["NEW","OLD"],"default":"NEW"}}},"AND":{"type":"array","description":"Array of conditions combined with AND.","items":{"$ref":"#/$defs/triggerCondition"}},"OR":{"type":"array","description":"Array of conditions combined with OR.","items":{"$ref":"#/$defs/triggerCondition"}},"NOT":{"$ref":"#/$defs/triggerCondition","description":"Negated condition."}}}},"properties":{"task_identifier":{"type":"string","format":"function-ref","description":"Job task identifier passed to add_job (e.g., process_invoice, sync_to_stripe). Must match a registered function definition when function_module is installed."},"payload_strategy":{"type":"string","enum":["row","row_id","fields","custom"],"description":"How to build the job payload: row (full NEW/OLD), row_id (just id), fields (selected columns), custom (mapped columns)","default":"row_id"},"payload_fields":{"type":"array","items":{"type":"string","format":"column-ref"},"description":"Column names to include in payload (only for fields strategy)"},"payload_custom":{"type":"object","additionalProperties":{"type":"string","format":"column-ref"},"description":"Key-to-column mapping for custom payload (e.g., {\"invoice_id\": \"id\", \"total\": \"amount\"})"},"events":{"type":"array","items":{"type":"string","enum":["INSERT","UPDATE","DELETE"]},"description":"Trigger events to create","default":["INSERT","UPDATE"]},"include_old":{"type":"boolean","description":"Include OLD row in payload (for UPDATE triggers)","default":false},"include_meta":{"type":"boolean","description":"Include table/schema metadata in payload","default":false},"condition_field":{"type":"string","format":"column-ref","description":"Column name for conditional WHEN clause (fires only when field equals condition_value)"},"condition_value":{"type":"string","description":"Value to compare against condition_field in WHEN clause"},"conditions":{"description":"Compound conditions for the trigger WHEN clause. Accepts a single leaf condition, an array of conditions (implicitly AND), or a nested combinator tree ({AND: [...], OR: [...], NOT: {...}}). Each leaf is {field, op, value?, row?, ref?}. Column types are resolved automatically from the table schema. Cannot be combined with condition_field or watch_fields.","x-codegen-type":"TriggerCondition | TriggerCondition[]","oneOf":[{"$ref":"#/$defs/triggerCondition"},{"type":"array","items":{"$ref":"#/$defs/triggerCondition"}}]},"watch_fields":{"type":"array","items":{"type":"string","format":"column-ref"},"description":"For UPDATE triggers, only fire when these fields change (uses DISTINCT FROM)"},"entity_field":{"type":"string","format":"column-ref","description":"Column on the trigger table that holds (or references) the entity_id for billing scope. For direct entity_id columns, just set this field. For FK lookups (e.g., channel_id → channels.entity_id), combine with entity_lookup."},"entity_lookup":{"type":"object","description":"FK lookup configuration for resolving entity_id through a related table. Used when entity_field is a FK (e.g., channel_id) rather than a direct entity_id. The generator validates all fields against metaschema within the same database_id.","properties":{"obj_table":{"type":"string","description":"Name of the related table to look up entity_id from (e.g., \"channels\"). Required."},"obj_schema":{"type":"string","description":"Schema of the related table (user-facing name, e.g., \"public\"). Optional — if omitted, resolved by table name within the same database_id (raises error if ambiguous)."},"obj_field":{"type":"string","format":"column-ref","description":"Column on the related table that holds the entity_id (e.g., \"entity_id\"). Required."}},"required":["obj_table","obj_field"]},"job_key":{"type":"string","description":"Static job key for upsert semantics (prevents duplicate jobs)"},"queue_name":{"type":"string","description":"Job queue name for routing to specific workers"},"priority":{"type":"integer","description":"Job priority (lower = higher priority)","default":0},"run_at_delay":{"type":"string","description":"Delay before job runs as PostgreSQL interval (e.g., 30 seconds, 5 minutes)"},"max_attempts":{"type":"integer","description":"Maximum retry attempts for the job","default":25}},"required":["task_identifier"]}'::jsonb, + '{"jobs","triggers","async"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'LimitEnforceAggregate', + 'limit_enforce_aggregate', + 'limit_enforce', + 'Enforce Aggregate Counter', + 'Declaratively attaches aggregate limit-tracking triggers to a table. On INSERT the named limit is incremented per entity; on DELETE it is decremented. Uses org_limit_aggregates_inc/dec for per-entity (org-level) aggregate limits rather than per-user limits. Requires a provisioned limits_module for the target database.', + '{"type":"object","properties":{"limit_name":{"type":"string","description":"Name of the aggregate limit to track (must match a default_limits entry, e.g. \"databases\", \"members\")"},"scope":{"type":"string","description":"Membership type prefix that determines which limits_module row to use. Resolved dynamically via memberships_module — supports any provisioned type (e.g. \"org\", \"data_room\", \"channel\", \"team\").","default":"org"},"entity_field":{"type":"string","format":"column-ref","description":"Column on the target table that holds (or references) the entity id for aggregate limit lookup. For direct entity_id columns, just set this field. For FK lookups (e.g., channel_id → channels.entity_id), combine with entity_lookup.","default":"entity_id"},"entity_lookup":{"type":"object","description":"FK lookup configuration for resolving entity_id through a related table. Used when entity_field is a FK (e.g., channel_id) rather than a direct entity_id. The generator validates all fields against metaschema within the same database_id.","properties":{"obj_table":{"type":"string","description":"Name of the related table to look up entity_id from (e.g., \"channels\"). Required."},"obj_schema":{"type":"string","description":"Schema of the related table (user-facing name, e.g., \"public\"). Optional — if omitted, resolved by table name within the same database_id (raises error if ambiguous)."},"obj_field":{"type":"string","description":"Column on the related table that holds the entity_id (e.g., \"entity_id\"). Required."}},"required":["obj_table","obj_field"]},"events":{"type":"array","items":{"type":"string","enum":["INSERT","DELETE","UPDATE"]},"description":"Which DML events to attach triggers for","default":["INSERT","DELETE"]}},"required":["limit_name"]}'::jsonb, + '{"limits","triggers","aggregates","enforce"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'LimitEnforceCounter', + 'limit_enforce_counter', + 'limit_enforce', + 'Enforce Counter', + 'Declaratively attaches limit-tracking triggers to a table. On INSERT the named limit is incremented; on DELETE it is decremented. Requires a provisioned limits_module for the target scope.', + '{"type":"object","properties":{"limit_name":{"type":"string","description":"Name of the limit to track (must match a default_limits entry, e.g. \"projects\", \"members\")"},"scope":{"type":"string","description":"Membership type prefix that determines which limits_module row to use. Resolved dynamically via memberships_module — supports any provisioned type (e.g. \"app\", \"org\", \"data_room\", \"channel\", \"team\").","default":"app"},"actor_field":{"type":"string","format":"column-ref","description":"Column on the target table that holds the actor or entity id used for limit lookup","default":"owner_id"},"entity_field":{"type":"string","format":"column-ref","description":"Column on the target table that holds (or references) the entity id for entity context resolution. For direct entity_id columns, just set this field. For FK lookups (e.g., channel_id → channels.entity_id), combine with entity_lookup."},"entity_lookup":{"type":"object","description":"FK lookup configuration for resolving entity_id through a related table. Used when entity_field is a FK (e.g., channel_id) rather than a direct entity_id. The generator validates all fields against metaschema within the same database_id.","properties":{"obj_table":{"type":"string","description":"Name of the related table to look up entity_id from (e.g., \"channels\"). Required."},"obj_schema":{"type":"string","description":"Schema of the related table (user-facing name, e.g., \"public\"). Optional — if omitted, resolved by table name within the same database_id (raises error if ambiguous)."},"obj_field":{"type":"string","description":"Column on the related table that holds the entity_id (e.g., \"entity_id\"). Required."}},"required":["obj_table","obj_field"]},"events":{"type":"array","items":{"type":"string","enum":["INSERT","DELETE","UPDATE"]},"description":"Which DML events to attach triggers for","default":["INSERT","DELETE"]}},"required":["limit_name"]}'::jsonb, + '{"limits","triggers","enforce"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'LimitEnforceFeature', + 'limit_enforce_feature', + 'limit_enforce', + 'Enforce Feature Flag', + 'Gates a table behind a feature flag backed by the cap tables. Attaches a BEFORE INSERT trigger that checks whether the named feature cap value is > 0. Features are modeled as caps with max=0 (disabled) or max=1 (enabled) in limit_caps / limit_caps_defaults tables. Resolution: COALESCE(per-entity cap, scope default, 0).', + '{"type":"object","properties":{"feature_name":{"type":"string","description":"Cap name representing this feature (must match a limit_caps_defaults entry with max=0 or max=1)"},"scope":{"type":"string","description":"Membership type prefix that determines which limits_module row to use. Resolved dynamically via memberships_module — supports any provisioned type (e.g. \"app\", \"org\", \"data_room\", \"channel\", \"team\").","default":"app"},"entity_field":{"type":"string","format":"column-ref","description":"Column on the target table that holds (or references) the entity id for per-entity cap lookups (only used for org scope). For FK lookups (e.g., channel_id → channels.entity_id), combine with entity_lookup.","default":"entity_id"},"entity_lookup":{"type":"object","description":"FK lookup configuration for resolving entity_id through a related table. Used when entity_field is a FK (e.g., channel_id) rather than a direct entity_id. The generator validates all fields against metaschema within the same database_id.","properties":{"obj_table":{"type":"string","description":"Name of the related table to look up entity_id from (e.g., \"channels\"). Required."},"obj_schema":{"type":"string","description":"Schema of the related table (user-facing name, e.g., \"public\"). Optional — if omitted, resolved by table name within the same database_id (raises error if ambiguous)."},"obj_field":{"type":"string","description":"Column on the related table that holds the entity_id (e.g., \"entity_id\"). Required."}},"required":["obj_table","obj_field"]}},"required":["feature_name"]}'::jsonb, + '{"limits","triggers","feature-flags","enforce","caps"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'LimitEnforceRate', + 'limit_enforce_rate', + 'limit_enforce', + 'Enforce Rate Limit', + 'Attaches a BEFORE trigger that calls check_rate_limit() to enforce sliding-window rate limits before allowing mutations. The function checks all three scopes (entity, actor-in-entity, actor) in a single call; which scopes are actually enforced is controlled by what rows exist in rate_window_limits (plan-based config). Requires a provisioned meter_rate_limits_module and billing_module for the target database.', + '{"type":"object","properties":{"meter_slug":{"type":"string","description":"Slug of the billing meter to check rate limits against (must match a meters table entry, e.g. \"messaging\", \"inference\")"},"entity_field":{"type":"string","format":"column-ref","description":"Column on the target table that holds (or references) the entity id for rate limiting. For direct entity_id columns, just set this field. For FK lookups (e.g., channel_id → channels.entity_id), combine with entity_lookup.","default":"entity_id"},"entity_lookup":{"type":"object","description":"FK lookup configuration for resolving entity_id through a related table. Used when entity_field is a FK (e.g., channel_id) rather than a direct entity_id. The generator validates all fields against metaschema within the same database_id.","properties":{"obj_table":{"type":"string","description":"Name of the related table to look up entity_id from (e.g., \"channels\"). Required."},"obj_schema":{"type":"string","description":"Schema of the related table (user-facing name, e.g., \"public\"). Optional — if omitted, resolved by table name within the same database_id (raises error if ambiguous)."},"obj_field":{"type":"string","description":"Column on the related table that holds the entity_id (e.g., \"entity_id\"). Required."}},"required":["obj_table","obj_field"]},"actor_field":{"type":"string","format":"column-ref","description":"Column on the target table that holds the actor id (user) for rate limiting","default":"owner_id"},"events":{"type":"array","items":{"type":"string","enum":["INSERT","UPDATE"]},"description":"Which DML events to enforce rate limits on (DELETE is excluded since it reduces load)","default":["INSERT"]}},"required":["meter_slug"]}'::jsonb, + '{"rate-limits","triggers","enforce","metering","abuse-protection"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'LimitTrackUsage', + 'limit_track_usage', + 'limit_track', + 'Track Usage', + 'Declaratively attaches billing usage-recording triggers to a table. On INSERT the named meter is incremented via record_usage; on DELETE it is decremented (reversal). On UPDATE, if the entity_field changes, the old entity is decremented and the new entity is incremented. Requires a provisioned billing_module for the target database.', + '{"type":"object","properties":{"meter_slug":{"type":"string","description":"Slug of the billing meter to record usage against (must match a meters table entry, e.g. \"databases\", \"seats\")"},"entity_field":{"type":"string","format":"column-ref","description":"Column on the target table that holds (or references) the entity id for billing. For direct entity_id columns, just set this field. For FK lookups (e.g., channel_id → channels.entity_id), combine with entity_lookup.","default":"entity_id"},"entity_lookup":{"type":"object","description":"FK lookup configuration for resolving entity_id through a related table. Used when entity_field is a FK (e.g., channel_id) rather than a direct entity_id. The generator validates all fields against metaschema within the same database_id.","properties":{"obj_table":{"type":"string","description":"Name of the related table to look up entity_id from (e.g., \"channels\"). Required."},"obj_schema":{"type":"string","description":"Schema of the related table (user-facing name, e.g., \"public\"). Optional — if omitted, resolved by table name within the same database_id (raises error if ambiguous)."},"obj_field":{"type":"string","description":"Column on the related table that holds the entity_id (e.g., \"entity_id\"). Required."}},"required":["obj_table","obj_field"]},"quantity":{"type":"integer","description":"Units to record per event (default 1)","default":1},"events":{"type":"array","items":{"type":"string","enum":["INSERT","DELETE","UPDATE"]},"description":"Which DML events to attach triggers for","default":["INSERT","DELETE"]}},"required":["meter_slug"]}'::jsonb, + '{"billing","triggers","metering","usage","track"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'LimitWarningAggregate', + 'limit_warning_aggregate', + 'limit_warning', + 'Warning Aggregate', + 'Attaches an AFTER INSERT trigger that checks if the entity''s aggregate usage has crossed any warning threshold configured in the limit_warnings table. If a threshold is reached for the first time, enqueues a background job (e.g. email notification). Uses limit_warning_state for one-time dedup per warning/actor/entity triple. Requires a provisioned limits_module with limit_warnings and aggregate limits enabled.', + '{"type":"object","properties":{"limit_name":{"type":"string","description":"Name of the aggregate limit to watch (must match a limit_warnings.name entry, e.g. \"databases\", \"members\")"},"scope":{"type":"string","description":"Membership type prefix that determines which limits_module row to use. Resolved dynamically via memberships_module — supports any provisioned type (e.g. \"org\", \"data_room\", \"channel\", \"team\").","default":"org"},"entity_field":{"type":"string","format":"column-ref","description":"Column on the target table that holds (or references) the entity id for aggregate limit lookup. For direct entity_id columns, just set this field. For FK lookups (e.g., channel_id → channels.entity_id), combine with entity_lookup.","default":"entity_id"},"entity_lookup":{"type":"object","description":"FK lookup configuration for resolving entity_id through a related table. Used when entity_field is a FK (e.g., channel_id) rather than a direct entity_id. The generator validates all fields against metaschema within the same database_id.","properties":{"obj_table":{"type":"string","description":"Name of the related table to look up entity_id from (e.g., \"channels\"). Required."},"obj_schema":{"type":"string","description":"Schema of the related table (user-facing name, e.g., \"public\"). Optional — if omitted, resolved by table name within the same database_id (raises error if ambiguous)."},"obj_field":{"type":"string","description":"Column on the related table that holds the entity_id (e.g., \"entity_id\"). Required."}},"required":["obj_table","obj_field"]}},"required":["limit_name"]}'::jsonb, + '{"limits","triggers","aggregates","warning","notifications"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'LimitWarningCounter', + 'limit_warning_counter', + 'limit_warning', + 'Warning Counter', + 'Attaches an AFTER INSERT trigger that checks if the actor''s current usage has crossed any warning threshold configured in the limit_warnings table. If a threshold is reached for the first time, enqueues a background job (e.g. email notification). Uses limit_warning_state for one-time dedup per warning/actor pair. Requires a provisioned limits_module with limit_warnings enabled.', + '{"type":"object","properties":{"limit_name":{"type":"string","description":"Name of the limit to watch (must match a limit_warnings.name entry, e.g. \"projects\", \"members\")"},"scope":{"type":"string","description":"Membership type prefix that determines which limits_module row to use. Resolved dynamically via memberships_module — supports any provisioned type (e.g. \"app\", \"org\", \"data_room\", \"channel\", \"team\").","default":"app"},"actor_field":{"type":"string","format":"column-ref","description":"Column on the target table that holds the actor id for limit lookup","default":"owner_id"},"entity_field":{"type":"string","format":"column-ref","description":"Column on the target table that holds (or references) the entity id. When provided, entity_id is included in the job payload and dedup state. For FK lookups (e.g., channel_id → channels.entity_id), combine with entity_lookup."},"entity_lookup":{"type":"object","description":"FK lookup configuration for resolving entity_id through a related table. Used when entity_field is a FK (e.g., channel_id) rather than a direct entity_id. The generator validates all fields against metaschema within the same database_id.","properties":{"obj_table":{"type":"string","description":"Name of the related table to look up entity_id from (e.g., \"channels\"). Required."},"obj_schema":{"type":"string","description":"Schema of the related table (user-facing name, e.g., \"public\"). Optional — if omitted, resolved by table name within the same database_id (raises error if ambiguous)."},"obj_field":{"type":"string","description":"Column on the related table that holds the entity_id (e.g., \"entity_id\"). Required."}},"required":["obj_table","obj_field"]}},"required":["limit_name"]}'::jsonb, + '{"limits","triggers","warning","notifications"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'LimitWarningRate', + 'limit_warning_rate', + 'limit_warning', + 'Warning Rate Limit', + 'Attaches an AFTER INSERT trigger that checks if the actor''s current request count in the active sliding window has crossed any warning threshold configured in the limit_warnings table. If a threshold is reached for the first time, enqueues a background job (e.g. email notification). Uses limit_warning_state for one-time dedup per warning/actor pair. Requires both a limits_module with limit_warnings enabled and a rate_limit_meters_module.', + '{"type":"object","properties":{"meter_slug":{"type":"string","description":"Slug of the billing meter to check rate limits against (must match a meters table entry)"},"scope":{"type":"string","description":"Membership type prefix that determines which limits_module row to use for warnings and warning_state tables. Resolved dynamically via memberships_module — supports any provisioned type (e.g. \"app\", \"org\", \"data_room\", \"channel\", \"team\").","default":"app"},"entity_field":{"type":"string","format":"column-ref","description":"Column on the target table that holds (or references) the entity id for rate limit lookup. For direct entity_id columns, just set this field. For FK lookups (e.g., channel_id → channels.entity_id), combine with entity_lookup.","default":"entity_id"},"entity_lookup":{"type":"object","description":"FK lookup configuration for resolving entity_id through a related table. Used when entity_field is a FK (e.g., channel_id) rather than a direct entity_id. The generator validates all fields against metaschema within the same database_id.","properties":{"obj_table":{"type":"string","description":"Name of the related table to look up entity_id from (e.g., \"channels\"). Required."},"obj_schema":{"type":"string","description":"Schema of the related table (user-facing name, e.g., \"public\"). Optional — if omitted, resolved by table name within the same database_id (raises error if ambiguous)."},"obj_field":{"type":"string","description":"Column on the related table that holds the entity_id (e.g., \"entity_id\"). Required."}},"required":["obj_table","obj_field"]},"actor_field":{"type":"string","format":"column-ref","description":"Column on the target table that holds the actor id for rate limit lookup","default":"owner_id"}},"required":["meter_slug"]}'::jsonb, + '{"rate-limits","triggers","warning","notifications","metering"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'ProcessChunks', + 'data_chunks', + 'process', + 'Chunks', + 'Creates a chunked-embedding child table for any parent table. Provisions the chunks table with content, chunk_index, embedding vector, metadata, HNSW index, inherited RLS, and optional job trigger for automatic text splitting. Composed internally by ProcessFileEmbedding (enabled by default in extract mode) but can also be used standalone.', + '{"type":"object","properties":{"content_field_name":{"type":"string","format":"column-ref","description":"Name of the text content column in the chunks table","default":"content"},"chunk_size":{"type":"integer","description":"Maximum number of characters per chunk","default":1000},"chunk_overlap":{"type":"integer","description":"Number of overlapping characters between consecutive chunks","default":200},"chunk_strategy":{"type":"string","enum":["fixed","sentence","paragraph","semantic"],"description":"Strategy for splitting text into chunks","default":"paragraph"},"dimensions":{"type":"integer","description":"Vector dimensions for per-chunk embeddings","default":768},"metric":{"type":"string","enum":["cosine","l2","ip"],"description":"Distance metric for the HNSW index on chunk embeddings","default":"cosine"},"embedding_model":{"type":"string","description":"Embedding model identifier for per-chunk embeddings. When null, the worker falls back to runtime config (llm_module / env vars)."},"embedding_provider":{"type":"string","description":"Embedding provider name (e.g. \"ollama\", \"openai\"). When null, the worker falls back to runtime config."},"chunks_table_name":{"type":"string","description":"Override the chunks table name. Defaults to {parent_table}_chunks."},"metadata_fields":{"type":"array","items":{"type":"string"},"description":"Field names from the parent table to copy into chunk metadata"},"search_indexes":{"type":"array","items":{"type":"string","enum":["fulltext","bm25","trigram"]},"description":"Text search indexes to create on the chunks content column. Omit to mirror the parent table''s text search indexes. Set explicitly to override (e.g. [\"fulltext\", \"bm25\"])."},"entity_field":{"type":"string","format":"column-ref","description":"Column on the parent table that holds (or references) the entity_id for billing scope. Forwarded to the chunking job trigger."},"entity_lookup":{"type":"object","description":"FK lookup configuration for resolving entity_id through a related table. Forwarded to the chunking job trigger.","properties":{"obj_table":{"type":"string","description":"Name of the related table to look up entity_id from"},"obj_schema":{"type":"string","description":"Schema of the related table (user-facing name, optional)"},"obj_field":{"type":"string","format":"column-ref","description":"Column on the related table that holds the entity_id"}},"required":["obj_table","obj_field"]},"enqueue_chunking_job":{"type":"boolean","description":"Whether to create a job trigger that auto-enqueues chunking on parent INSERT/UPDATE","default":true},"chunking_task_name":{"type":"string","description":"Task identifier for the chunking job queue","default":"generate_chunks"}}}'::jsonb, + '{"embedding","chunks","vector","ai","rag"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'ProcessExtraction', + 'process_extraction', + 'process', + 'File Extraction', + 'Creates extraction output fields and a job trigger for file text extraction. Fires when a file is uploaded (status = ''uploaded'') or on INSERT. The external worker extracts text/metadata from the file (PDF, DOCX, HTML, etc.) and writes the result back to the configured output fields. Typically used upstream of ProcessFileEmbedding or ProcessChunks.', + '{"type":"object","$defs":{"triggerCondition":{"type":"object","description":"A leaf condition ({field, op, value?, row?, ref?}) or a combinator ({AND, OR, NOT}).","properties":{"field":{"type":"string","format":"column-ref","description":"Column name (validated against the table)."},"op":{"type":"string","enum":["=","!=",">","<",">=","<=","LIKE","NOT LIKE","IS NULL","IS NOT NULL","IS DISTINCT FROM"],"description":"Comparison operator."},"value":{"description":"Comparison value. Type is resolved from the column definition. Omit for IS NULL, IS NOT NULL, IS DISTINCT FROM."},"row":{"type":"string","enum":["NEW","OLD"],"default":"NEW","description":"Row reference (default: NEW)."},"ref":{"type":"object","description":"Column reference for field-to-field comparison (alternative to value).","properties":{"field":{"type":"string","format":"column-ref"},"row":{"type":"string","enum":["NEW","OLD"],"default":"NEW"}}},"AND":{"type":"array","description":"Array of conditions combined with AND.","items":{"$ref":"#/$defs/triggerCondition"}},"OR":{"type":"array","description":"Array of conditions combined with OR.","items":{"$ref":"#/$defs/triggerCondition"}},"NOT":{"$ref":"#/$defs/triggerCondition","description":"Negated condition."}}}},"properties":{"text_field":{"type":"string","format":"column-ref","description":"Field to store extracted text/markdown","default":"extracted_text"},"metadata_field":{"type":"string","format":"column-ref","description":"JSONB field for extraction metadata (page count, language, etc.)","default":"extracted_metadata"},"extraction_model":{"type":"string","description":"Extraction model identifier (e.g. a vision model for OCR, an LLM for structured extraction). Included in the job payload so the worker knows which model to use. When null, the worker falls back to runtime config."},"extraction_provider":{"type":"string","description":"Extraction provider name (e.g. \"ollama\", \"openai\"). When null, the worker falls back to runtime config."},"mime_patterns":{"type":"array","items":{"type":"string"},"description":"MIME type LIKE patterns to match. Multiple patterns are OR''d together. Examples: [''application/pdf'', ''text/%''], [''application/vnd.openxmlformats%''].","default":["application/pdf","text/%"]},"task_identifier":{"type":"string","description":"Job task identifier for the extraction worker","default":"extract_file_text"},"events":{"type":"array","items":{"type":"string","enum":["INSERT","UPDATE"]},"description":"Trigger events that fire the job","default":["INSERT"]},"payload_custom":{"type":"object","additionalProperties":{"type":"string","format":"column-ref"},"description":"Custom payload key-to-column mapping for the job trigger","default":{"file_id":"id","key":"key","mime_type":"mime_type","bucket_id":"bucket_id"}},"trigger_conditions":{"description":"Additional compound conditions beyond auto-generated filtering. Merged with the auto-generated conditions via AND.","x-codegen-type":"TriggerCondition | TriggerCondition[]","oneOf":[{"$ref":"#/$defs/triggerCondition"},{"type":"array","items":{"$ref":"#/$defs/triggerCondition"}}]},"entity_field":{"type":"string","format":"column-ref","description":"Column on the trigger table that holds (or references) the entity_id for billing scope. Forwarded to the composed JobTrigger."},"entity_lookup":{"type":"object","description":"FK lookup configuration for resolving entity_id through a related table. Forwarded to the composed JobTrigger.","properties":{"obj_table":{"type":"string","description":"Name of the related table to look up entity_id from"},"obj_schema":{"type":"string","description":"Schema of the related table (user-facing name, optional)"},"obj_field":{"type":"string","format":"column-ref","description":"Column on the related table that holds the entity_id"}},"required":["obj_table","obj_field"]},"queue_name":{"type":"string","description":"Job queue name for extraction tasks","default":"extraction"},"max_attempts":{"type":"integer","description":"Maximum number of retry attempts","default":5},"priority":{"type":"integer","description":"Job priority (lower = higher priority)","default":0}}}'::jsonb, + '{"extraction","files","processing","jobs","text"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'ProcessFileEmbedding', + 'data_file_embedding', + 'process', + 'File Embedding', + 'Generic, MIME-scoped embedding node for file tables. Supports two modes: direct (whole-file to single vector, e.g. CLIP for images) when extraction is omitted, or extract (file to text to chunks to per-chunk vectors) when extraction config is provided. Composes SearchVector + JobTrigger + ProcessChunks (enabled by default in extract mode) internally. Multiple instances can coexist on the same table with different MIME scopes, field names, and embedding strategies.', + '{"type":"object","$defs":{"triggerCondition":{"type":"object","description":"A leaf condition ({field, op, value?, row?, ref?}) or a combinator ({AND, OR, NOT}).","properties":{"field":{"type":"string","format":"column-ref","description":"Column name (validated against the table)."},"op":{"type":"string","enum":["=","!=",">","<",">=","<=","LIKE","NOT LIKE","IS NULL","IS NOT NULL","IS DISTINCT FROM"],"description":"Comparison operator."},"value":{"description":"Comparison value. Type is resolved from the column definition. Omit for IS NULL, IS NOT NULL, IS DISTINCT FROM."},"row":{"type":"string","enum":["NEW","OLD"],"default":"NEW","description":"Row reference (default: NEW)."},"ref":{"type":"object","description":"Column reference for field-to-field comparison (alternative to value).","properties":{"field":{"type":"string","format":"column-ref"},"row":{"type":"string","enum":["NEW","OLD"],"default":"NEW"}}},"AND":{"type":"array","description":"Array of conditions combined with AND.","items":{"$ref":"#/$defs/triggerCondition"}},"OR":{"type":"array","description":"Array of conditions combined with OR.","items":{"$ref":"#/$defs/triggerCondition"}},"NOT":{"$ref":"#/$defs/triggerCondition","description":"Negated condition."}}}},"properties":{"field_name":{"type":"string","format":"column-ref","description":"Name of the vector embedding column","default":"embedding"},"dimensions":{"type":"integer","description":"Vector dimensions (e.g. 512 for CLIP, 768 for nomic, 1536 for ada-002)","default":768},"index_method":{"type":"string","enum":["hnsw","ivfflat"],"description":"Index type for similarity search","default":"hnsw"},"metric":{"type":"string","enum":["cosine","l2","ip"],"description":"Distance metric","default":"cosine"},"index_options":{"type":"object","description":"Index-specific options. HNSW: {m, ef_construction}. IVFFlat: {lists}.","default":{}},"embedding_model":{"type":"string","description":"Embedding model identifier (e.g. \"nomic-embed-text\", \"text-embedding-3-small\", \"clip-vit-base-patch32\"). Included in the job payload so the worker knows which model to use. When null, the worker falls back to runtime config (llm_module / env vars)."},"embedding_provider":{"type":"string","description":"Embedding provider name (e.g. \"ollama\", \"openai\"). When null, the worker falls back to runtime config."},"mime_patterns":{"type":"array","items":{"type":"string"},"description":"MIME type LIKE patterns to match. Multiple patterns are OR''d together. Examples: [''image/%''], [''application/pdf'', ''text/%''], [''audio/%''].","default":["image/%"]},"task_identifier":{"type":"string","description":"Job task identifier for the worker. In direct mode this is the embedding worker; in extract mode this is the extraction worker.","default":"process_file_embedding"},"events":{"type":"array","items":{"type":"string","enum":["INSERT","UPDATE"]},"description":"Trigger events that fire the job","default":["INSERT"]},"payload_custom":{"type":"object","additionalProperties":{"type":"string","format":"column-ref"},"description":"Custom payload key-to-column mapping for the job trigger","default":{"file_id":"id","key":"key","mime_type":"mime_type","bucket_id":"bucket_id"}},"trigger_conditions":{"description":"Additional compound conditions beyond auto-generated filtering. Merged with the auto-generated conditions via AND.","x-codegen-type":"TriggerCondition | TriggerCondition[]","oneOf":[{"$ref":"#/$defs/triggerCondition"},{"type":"array","items":{"$ref":"#/$defs/triggerCondition"}}]},"entity_field":{"type":"string","format":"column-ref","description":"Column on the trigger table that holds (or references) the entity_id for billing scope. Forwarded to the composed JobTrigger."},"entity_lookup":{"type":"object","description":"FK lookup configuration for resolving entity_id through a related table. Forwarded to the composed JobTrigger.","properties":{"obj_table":{"type":"string","description":"Name of the related table to look up entity_id from"},"obj_schema":{"type":"string","description":"Schema of the related table (user-facing name, optional)"},"obj_field":{"type":"string","format":"column-ref","description":"Column on the related table that holds the entity_id"}},"required":["obj_table","obj_field"]},"extraction":{"type":"object","description":"Text extraction configuration. When present, the generator creates extraction output fields on the table and configures SearchVector with source_fields + stale tracking. When absent, the node operates in direct mode (single vector per file, no text extraction).","properties":{"text_field":{"type":"string","format":"column-ref","description":"Field to store extracted text/markdown","default":"extracted_text"},"metadata_field":{"type":"string","format":"column-ref","description":"JSONB field for extraction metadata (page count, language, etc.)","default":"extracted_metadata"}}},"include_chunks":{"type":"boolean","description":"Whether to create a chunks table via ProcessChunks. Defaults to true when extraction is provided, false in direct mode. Set explicitly to override."},"chunks":{"type":"object","description":"Chunking configuration passed through to ProcessChunks. When include_chunks is true (or defaults to true in extract mode), these params configure the chunks table, embedding dimensions, strategy, etc.","default":{},"properties":{"content_field_name":{"type":"string","format":"column-ref","description":"Name of the text content column in the chunks table","default":"content"},"chunk_size":{"type":"integer","description":"Maximum number of characters per chunk","default":1000},"chunk_overlap":{"type":"integer","description":"Number of overlapping characters between consecutive chunks","default":200},"chunk_strategy":{"type":"string","enum":["fixed","sentence","paragraph","semantic"],"description":"Strategy for splitting text into chunks","default":"paragraph"},"metadata_fields":{"type":"array","items":{"type":"string"},"description":"Field names from parent to copy into chunk metadata"},"search_indexes":{"type":"array","items":{"type":"string","enum":["fulltext","bm25","trigram"]},"description":"Text search indexes to create on the chunks content column. Omit to mirror the parent table''s text search indexes. Set explicitly to override."},"enqueue_chunking_job":{"type":"boolean","description":"Whether to auto-enqueue a chunking job on insert/update","default":true},"chunking_task_name":{"type":"string","description":"Task identifier for the chunking job queue","default":"generate_chunks"}}}}}'::jsonb, + '{"embedding","vector","ai","composition","jobs","multimodal","files"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'ProcessImageEmbedding', + 'data_image_embedding', + 'process', + 'Image Embedding', + 'Image-specific preset of ProcessFileEmbedding. Delegates to ProcessFileEmbedding with image-oriented defaults: dimensions=512 (CLIP), mime_patterns=[''image/%''], task_identifier=''process_image_embedding'', direct mode (no extraction). Accepts all ProcessFileEmbedding parameters — any overrides are forwarded through.', + '{"type":"object","$defs":{"triggerCondition":{"type":"object","description":"A leaf condition ({field, op, value?, row?, ref?}) or a combinator ({AND, OR, NOT}).","properties":{"field":{"type":"string","format":"column-ref","description":"Column name (validated against the table)."},"op":{"type":"string","enum":["=","!=",">","<",">=","<=","LIKE","NOT LIKE","IS NULL","IS NOT NULL","IS DISTINCT FROM"],"description":"Comparison operator."},"value":{"description":"Comparison value. Type is resolved from the column definition. Omit for IS NULL, IS NOT NULL, IS DISTINCT FROM."},"row":{"type":"string","enum":["NEW","OLD"],"default":"NEW","description":"Row reference (default: NEW)."},"ref":{"type":"object","description":"Column reference for field-to-field comparison (alternative to value).","properties":{"field":{"type":"string","format":"column-ref"},"row":{"type":"string","enum":["NEW","OLD"],"default":"NEW"}}},"AND":{"type":"array","description":"Array of conditions combined with AND.","items":{"$ref":"#/$defs/triggerCondition"}},"OR":{"type":"array","description":"Array of conditions combined with OR.","items":{"$ref":"#/$defs/triggerCondition"}},"NOT":{"$ref":"#/$defs/triggerCondition","description":"Negated condition."}}}},"properties":{"field_name":{"type":"string","format":"column-ref","description":"Name of the vector embedding column","default":"embedding"},"dimensions":{"type":"integer","description":"Vector dimensions (default 512 for CLIP-style image embeddings)","default":512},"index_method":{"type":"string","enum":["hnsw","ivfflat"],"description":"Index type for similarity search","default":"hnsw"},"metric":{"type":"string","enum":["cosine","l2","ip"],"description":"Distance metric","default":"cosine"},"index_options":{"type":"object","description":"Index-specific options. HNSW: {m, ef_construction}. IVFFlat: {lists}.","default":{}},"embedding_model":{"type":"string","description":"Embedding model identifier (e.g. \"clip-vit-base-patch32\"). Included in the job payload so the worker knows which model to use. When null, the worker falls back to runtime config (llm_module / env vars)."},"embedding_provider":{"type":"string","description":"Embedding provider name (e.g. \"ollama\", \"openai\"). When null, the worker falls back to runtime config."},"mime_patterns":{"type":"array","items":{"type":"string"},"description":"MIME type LIKE patterns to match. Multiple patterns are OR''d together.","default":["image/%"]},"task_identifier":{"type":"string","description":"Job task identifier for the image embedding worker","default":"process_image_embedding"},"events":{"type":"array","items":{"type":"string","enum":["INSERT","UPDATE"]},"description":"Trigger events that fire the job","default":["INSERT"]},"payload_custom":{"type":"object","additionalProperties":{"type":"string","format":"column-ref"},"description":"Custom payload key-to-column mapping for the job trigger","default":{"file_id":"id","key":"key","mime_type":"mime_type","bucket_id":"bucket_id"}},"trigger_conditions":{"description":"Additional compound conditions beyond auto-generated filtering. Merged with the auto-generated conditions via AND.","x-codegen-type":"TriggerCondition | TriggerCondition[]","oneOf":[{"$ref":"#/$defs/triggerCondition"},{"type":"array","items":{"$ref":"#/$defs/triggerCondition"}}]},"entity_field":{"type":"string","format":"column-ref","description":"Column on the trigger table that holds (or references) the entity_id for billing scope. Forwarded to the composed JobTrigger."},"entity_lookup":{"type":"object","description":"FK lookup configuration for resolving entity_id through a related table. Forwarded to the composed JobTrigger.","properties":{"obj_table":{"type":"string","description":"Name of the related table to look up entity_id from"},"obj_schema":{"type":"string","description":"Schema of the related table (user-facing name, optional)"},"obj_field":{"type":"string","format":"column-ref","description":"Column on the related table that holds the entity_id"}},"required":["obj_table","obj_field"]},"extraction":{"type":"object","description":"Text extraction configuration. Forwarded to ProcessFileEmbedding. When present, enables extract mode (e.g., OCR for images).","properties":{"text_field":{"type":"string","format":"column-ref","description":"Field to store extracted text","default":"extracted_text"},"metadata_field":{"type":"string","format":"column-ref","description":"JSONB field for extraction metadata","default":"extracted_metadata"}}},"chunks":{"type":"object","description":"Chunking configuration. Forwarded to ProcessFileEmbedding. Only meaningful when extraction is also provided.","properties":{"content_field_name":{"type":"string","format":"column-ref","default":"content"},"chunk_size":{"type":"integer","default":1000},"chunk_overlap":{"type":"integer","default":200},"chunk_strategy":{"type":"string","enum":["fixed","sentence","paragraph","semantic"],"default":"paragraph"},"metadata_fields":{"type":"object"},"enqueue_chunking_job":{"type":"boolean","default":true},"chunking_task_name":{"type":"string","default":"generate_chunks"}}}}}'::jsonb, + '{"embedding","image","vector","ai","composition","jobs"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'ProcessImageVersions', + 'process_image_versions', + 'process', + 'Image Versions', + 'Creates a job trigger for image variant generation. Fires when an image file is uploaded (status = ''uploaded'') or on INSERT. The external worker generates resized, cropped, or reformatted versions (thumbnails, previews, WebP conversions, etc.) and stores them as new file records linked to the source image.', + '{"type":"object","$defs":{"triggerCondition":{"type":"object","description":"A leaf condition ({field, op, value?, row?, ref?}) or a combinator ({AND, OR, NOT}).","properties":{"field":{"type":"string","format":"column-ref","description":"Column name (validated against the table)."},"op":{"type":"string","enum":["=","!=",">","<",">=","<=","LIKE","NOT LIKE","IS NULL","IS NOT NULL","IS DISTINCT FROM"],"description":"Comparison operator."},"value":{"description":"Comparison value. Type is resolved from the column definition. Omit for IS NULL, IS NOT NULL, IS DISTINCT FROM."},"row":{"type":"string","enum":["NEW","OLD"],"default":"NEW","description":"Row reference (default: NEW)."},"ref":{"type":"object","description":"Column reference for field-to-field comparison (alternative to value).","properties":{"field":{"type":"string","format":"column-ref"},"row":{"type":"string","enum":["NEW","OLD"],"default":"NEW"}}},"AND":{"type":"array","description":"Array of conditions combined with AND.","items":{"$ref":"#/$defs/triggerCondition"}},"OR":{"type":"array","description":"Array of conditions combined with OR.","items":{"$ref":"#/$defs/triggerCondition"}},"NOT":{"$ref":"#/$defs/triggerCondition","description":"Negated condition."}}}},"required":["versions"],"properties":{"versions":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Version identifier (e.g., \"thumb\", \"preview\", \"hero\")"},"width":{"type":"integer","description":"Target width in pixels"},"height":{"type":"integer","description":"Target height in pixels"},"fit":{"type":"string","enum":["cover","contain","fill","inside","outside"],"description":"Resize fitting strategy","default":"cover"},"format":{"type":"string","enum":["jpeg","png","webp","avif"],"description":"Output image format","default":"webp"},"quality":{"type":"integer","description":"Output quality (1-100)","default":80}},"required":["name"]},"description":"Array of version definitions. Each version specifies dimensions, format, and quality for a generated image variant. Required — the blueprint must explicitly define what variants to generate.","minItems":1},"mime_patterns":{"type":"array","items":{"type":"string"},"description":"MIME type LIKE patterns to match. Defaults to all image types.","default":["image/%"]},"task_identifier":{"type":"string","description":"Job task identifier for the image processing worker","default":"process_image_versions"},"events":{"type":"array","items":{"type":"string","enum":["INSERT","UPDATE"]},"description":"Trigger events that fire the job","default":["INSERT"]},"payload_custom":{"type":"object","additionalProperties":{"type":"string","format":"column-ref"},"description":"Custom payload key-to-column mapping for the job trigger","default":{"file_id":"id","key":"key","mime_type":"mime_type","bucket_id":"bucket_id"}},"trigger_conditions":{"description":"Additional compound conditions beyond auto-generated filtering. Merged with the auto-generated conditions via AND.","x-codegen-type":"TriggerCondition | TriggerCondition[]","oneOf":[{"$ref":"#/$defs/triggerCondition"},{"type":"array","items":{"$ref":"#/$defs/triggerCondition"}}]},"entity_field":{"type":"string","format":"column-ref","description":"Column on the trigger table that holds (or references) the entity_id for billing scope. Forwarded to the composed JobTrigger."},"entity_lookup":{"type":"object","description":"FK lookup configuration for resolving entity_id through a related table. Forwarded to the composed JobTrigger.","properties":{"obj_table":{"type":"string","description":"Name of the related table to look up entity_id from"},"obj_schema":{"type":"string","description":"Schema of the related table (user-facing name, optional)"},"obj_field":{"type":"string","format":"column-ref","description":"Column on the related table that holds the entity_id"}},"required":["obj_table","obj_field"]},"queue_name":{"type":"string","description":"Job queue name for image processing tasks","default":"image_processing"},"max_attempts":{"type":"integer","description":"Maximum number of retry attempts","default":5},"priority":{"type":"integer","description":"Job priority (lower = higher priority)","default":0}}}'::jsonb, + '{"images","processing","jobs","resize","thumbnails","files"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'RelationBelongsTo', + 'relation_belongs_to', + 'relation', + 'Belongs To', + 'Creates a foreign key field on the source table referencing the target table. Auto-derives the FK field name from the target table name using inflection (e.g., projects derives project_id). delete_action is required and must be explicitly provided by the caller.', + '{"type":"object","properties":{"source_table_id":{"type":"string","format":"uuid","description":"Table that will have the FK field added"},"target_table_id":{"type":"string","format":"uuid","description":"Table being referenced by the FK"},"field_name":{"type":"string","format":"column-ref","description":"FK field name on the source table. Auto-derived from target table name if omitted (e.g., projects → project_id)"},"delete_action":{"type":"string","enum":["c","r","n","d","a"],"description":"FK delete action: c=CASCADE, r=RESTRICT, n=SET NULL, d=SET DEFAULT, a=NO ACTION. Required."},"is_required":{"type":"boolean","description":"Whether the FK field is NOT NULL","default":true}},"required":["source_table_id","target_table_id","delete_action"]}'::jsonb, + '{"relation","foreign_key","schema"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'RelationHasMany', + 'relation_has_many', + 'relation', + 'Has Many', + 'Creates a foreign key field on the target table referencing the source table. Inverse of RelationBelongsTo — same FK, different perspective. "projects has many tasks" creates tasks.project_id. Auto-derives the FK field name from the source table name using inflection. delete_action is required and must be explicitly provided by the caller.', + '{"type":"object","properties":{"source_table_id":{"type":"string","format":"uuid","description":"Parent table being referenced by the FK (e.g., projects in projects has many tasks)"},"target_table_id":{"type":"string","format":"uuid","description":"Child table that receives the FK field (e.g., tasks in projects has many tasks)"},"field_name":{"type":"string","format":"column-ref","description":"FK field name on the target table. Auto-derived from source table name if omitted (e.g., projects derives project_id)"},"delete_action":{"type":"string","enum":["c","r","n","d","a"],"description":"FK delete action: c=CASCADE, r=RESTRICT, n=SET NULL, d=SET DEFAULT, a=NO ACTION. Required."},"is_required":{"type":"boolean","description":"Whether the FK field is NOT NULL","default":true}},"required":["source_table_id","target_table_id","delete_action"]}'::jsonb, + '{"relation","foreign_key","has_many","schema"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'RelationHasOne', + 'relation_has_one', + 'relation', + 'Has One', + 'Creates a foreign key field with a unique constraint on the source table referencing the target table. Enforces 1:1 cardinality. Auto-derives the FK field name from the target table name using inflection. delete_action is required and must be explicitly provided by the caller.', + '{"type":"object","properties":{"source_table_id":{"type":"string","format":"uuid","description":"Table that will have the FK field and unique constraint"},"target_table_id":{"type":"string","format":"uuid","description":"Table being referenced by the FK"},"field_name":{"type":"string","format":"column-ref","description":"FK field name on the source table. Auto-derived from target table name if omitted (e.g., users → user_id)"},"delete_action":{"type":"string","enum":["c","r","n","d","a"],"description":"FK delete action: c=CASCADE, r=RESTRICT, n=SET NULL, d=SET DEFAULT, a=NO ACTION. Required."},"is_required":{"type":"boolean","description":"Whether the FK field is NOT NULL","default":true}},"required":["source_table_id","target_table_id","delete_action"]}'::jsonb, + '{"relation","foreign_key","unique","schema"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'RelationManyToMany', + 'relation_many_to_many', + 'relation', + 'Many to Many', + 'Creates a junction table between source and target tables with auto-derived naming and FK fields. The trigger creates a bare table (no implicit DataId), adds FK fields to both tables, optionally creates a composite PK (use_composite_key), then forwards all security config to secure_table_provision as-is. The trigger never injects values the caller did not provide. Junction table FKs always CASCADE on delete.', + '{"type":"object","properties":{"source_table_id":{"type":"string","format":"uuid","description":"First table in the M:N relationship"},"target_table_id":{"type":"string","format":"uuid","description":"Second table in the M:N relationship"},"junction_table_id":{"type":"string","format":"uuid","description":"Existing junction table to use. If uuid_nil(), a new bare table is created"},"junction_table_name":{"type":"string","description":"Junction table name. Auto-derived from both table names if omitted (e.g., projects + tags derives project_tags)"},"source_field_name":{"type":"string","format":"column-ref","description":"FK field name on junction for source table. Auto-derived if omitted (e.g., projects derives project_id)"},"target_field_name":{"type":"string","format":"column-ref","description":"FK field name on junction for target table. Auto-derived if omitted (e.g., tags derives tag_id)"},"use_composite_key":{"type":"boolean","description":"When true, creates a composite PK from the two FK fields. When false, no PK is created by the trigger (use nodes with DataId for UUID PK). Mutually exclusive with nodes containing DataId.","default":false},"nodes":{"type":"array","items":{"type":"object"},"description":"Array of node objects for field creation on junction table. Each object has a $type key (e.g. DataId, DataEntityMembership) and optional data keys. Forwarded to secure_table_provision as-is. Empty array means no additional fields."},"grants":{"type":"array","items":{"type":"object","properties":{"roles":{"type":"array","items":{"type":"string"}},"privileges":{"type":"array","items":{"type":"array","items":{"type":"string"}}}},"required":["roles","privileges"]},"description":"Unified grant objects for the junction table. Each entry is { roles: string[], privileges: string[][] }. Forwarded to secure_table_provision as-is. Default: []"},"policies":{"type":"array","items":{"type":"object","properties":{"$type":{"type":"string"},"data":{"type":"object"},"privileges":{"type":"array","items":{"type":"string"}},"policy_role":{"type":"string"},"permissive":{"type":"boolean"},"policy_name":{"type":"string"}},"required":["$type"]},"description":"RLS policy objects for the junction table. Each entry has $type (Authz* generator), optional data, privileges, policy_role, permissive, policy_name. Forwarded to secure_table_provision as-is. Default: []"}},"required":["source_table_id","target_table_id"]}'::jsonb, + '{"relation","junction","many_to_many","schema"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'RelationSpatial', + 'relation_spatial', + 'relation', + 'Spatial Relation', + 'Declares a spatial predicate between two existing geometry/geography columns. Inserts a metaschema_public.spatial_relation row; the sync_spatial_relation_tags trigger then projects a @spatialRelation smart tag onto the owner column so graphile-postgis'' PostgisSpatialRelationsPlugin can expose it as a cross-table filter in GraphQL. Metadata-only: both source_field and target_field must already exist on their tables. Idempotent on (source_table_id, name). One direction per tag — author two RelationSpatial entries if symmetry is desired.', + '{"type":"object","properties":{"source_table_id":{"type":"string","format":"uuid","description":"Table that owns the relation (the @spatialRelation tag is emitted on the owner column of this table)"},"source_field_id":{"type":"string","format":"uuid","description":"Geometry/geography column on source_table that carries the @spatialRelation smart tag"},"target_table_id":{"type":"string","format":"uuid","description":"Table being referenced by the spatial predicate"},"target_field_id":{"type":"string","format":"uuid","description":"Geometry/geography column on target_table that the predicate is evaluated against"},"name":{"type":"string","description":"Relation name (stable, snake_case). Becomes the generated filter field name in GraphQL (e.g. nearby_clinic). Unique per (source_table_id, name) — idempotency key."},"operator":{"type":"string","enum":["st_contains","st_within","st_intersects","st_covers","st_coveredby","st_overlaps","st_touches","st_dwithin"],"description":"PostGIS spatial predicate. One of the 8 whitelisted operators. st_dwithin requires param_name."},"param_name":{"type":"string","description":"Parameter name for parametric operators (currently only st_dwithin, which needs a distance argument). Must be NULL for all other operators. Enforced by table CHECK."}},"required":["source_table_id","source_field_id","target_table_id","target_field_id","name","operator"]}'::jsonb, + '{"relation","spatial","postgis","schema"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'SearchBm25', + 'search_bm25', + 'search', + 'BM25 Search', + 'Creates a BM25 index on an existing text column using pg_textsearch. Enables statistical relevance ranking with configurable k1 and b parameters. The BM25 index is auto-detected by graphile-search.', + '{"type":"object","properties":{"field_name":{"type":"string","format":"column-ref","description":"Name of existing text column to index with BM25"},"text_config":{"type":"string","description":"PostgreSQL text search configuration for BM25","default":"english"},"k1":{"type":"number","description":"BM25 k1 parameter: term frequency saturation (typical: 1.2-2.0)","default":null},"b":{"type":"number","description":"BM25 b parameter: document length normalization (0=none, 1=full, typical: 0.75)","default":null},"search_score_weight":{"type":"number","description":"Weight for this algorithm in composite searchScore","default":1}},"required":["field_name"]}'::jsonb, + '{"search","bm25","schema"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'SearchFullText', + 'search_full_text', + 'search', + 'Full-Text Search', + 'Adds a tsvector column with GIN index and automatic trigger population from source fields. Enables PostgreSQL full-text search with configurable weights and language support. Leverages the existing metaschema full_text_search infrastructure.', + '{"type":"object","properties":{"field_name":{"type":"string","format":"column-ref","description":"Name of the tsvector column","default":"search"},"source_fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","format":"column-ref","description":"Name of the source column"},"weight":{"type":"string","enum":["A","B","C","D"],"description":"tsvector weight class (A=highest, D=lowest)","default":"D"},"lang":{"type":"string","description":"PostgreSQL text search configuration","default":"english"}},"required":["field"]},"description":"Source columns that feed the tsvector. Each has a field name, weight (A-D), and language config."},"lang_column":{"type":"string","format":"column-ref","description":"Column name whose value determines the text search configuration per row. When set, the tsvector trigger uses NEW.::regconfig instead of a static language, enabling dynamic per-row language stemming. The per-field lang values in source_fields are used as fallback defaults for the langs array but the trigger reads from this column at runtime."},"search_score_weight":{"type":"number","description":"Weight for this algorithm in composite searchScore","default":1}},"required":["source_fields"]}'::jsonb, + '{"search","fts","tsvector","schema"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'SearchSpatial', + 'search_spatial', + 'search', + 'Spatial Search', + 'Adds a PostGIS geometry or geography column with a spatial index (GiST or SP-GiST). Supports configurable geometry types (Point, Polygon, etc.), SRID, and dimensionality. The graphile-postgis plugin auto-detects geometry/geography columns by codec type for spatial filtering (ST_Contains, ST_DWithin, bbox operators).', + '{"type":"object","properties":{"field_name":{"type":"string","format":"column-ref","description":"Name of the geometry/geography column","default":"geom"},"geometry_type":{"type":"string","enum":["Point","LineString","Polygon","MultiPoint","MultiLineString","MultiPolygon","GeometryCollection","Geometry"],"description":"PostGIS geometry type constraint","default":"Point"},"srid":{"type":"integer","description":"Spatial Reference System Identifier (e.g. 4326 for WGS84)","default":4326},"dimension":{"type":"integer","enum":[2,3,4],"description":"Coordinate dimension (2=XY, 3=XYZ, 4=XYZM)","default":2},"use_geography":{"type":"boolean","description":"Use geography type instead of geometry (for geodetic calculations on the sphere)","default":false},"index_method":{"type":"string","enum":["gist","spgist"],"description":"Spatial index method","default":"gist"}}}'::jsonb, + '{"spatial","postgis","geometry","schema"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'SearchSpatialAggregate', + 'search_spatial_aggregate', + 'search', + 'Spatial Aggregate Search', + 'Creates a derived/materialized geometry field on the parent table that automatically aggregates geometries from a source (child) table via triggers. When child rows are inserted/updated/deleted, the parent aggregate field is recalculated using the specified PostGIS aggregation function (ST_Union, ST_Collect, ST_ConvexHull, ST_ConcaveHull). Useful for materializing spatial boundaries from collections of points or polygons.', + '{"type":"object","properties":{"field_name":{"type":"string","format":"column-ref","description":"Name of the aggregate geometry column on the parent table","default":"geom_aggregate"},"source_table_id":{"type":"string","format":"uuid","description":"UUID of the source (child) table containing individual geometries"},"source_geom_field":{"type":"string","format":"column-ref","description":"Name of the geometry column on the source table","default":"geom"},"source_fk_field":{"type":"string","format":"column-ref","description":"Name of the foreign key column on the source table pointing to the parent"},"aggregate_function":{"type":"string","enum":["union","collect","convex_hull","concave_hull"],"description":"PostGIS aggregation function: union (ST_Union, merges overlapping), collect (ST_Collect, groups without merging), convex_hull (smallest convex polygon), concave_hull (tighter boundary)","default":"union"},"geometry_type":{"type":"string","enum":["Point","LineString","Polygon","MultiPoint","MultiLineString","MultiPolygon","GeometryCollection","Geometry"],"description":"Output geometry type constraint for the aggregate field","default":"MultiPolygon"},"srid":{"type":"integer","description":"Spatial Reference System Identifier (e.g. 4326 for WGS84)","default":4326},"dimension":{"type":"integer","enum":[2,3,4],"description":"Coordinate dimension (2=XY, 3=XYZ, 4=XYZM)","default":2},"use_geography":{"type":"boolean","description":"Use geography type instead of geometry","default":false},"index_method":{"type":"string","enum":["gist","spgist"],"description":"Spatial index method for the aggregate field","default":"gist"}},"required":["source_table_id","source_fk_field"]}'::jsonb, + '{"spatial","postgis","geometry","aggregate","schema"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'SearchTrgm', + 'search_trgm', + 'search', + 'Trigram Search', + 'Creates GIN trigram indexes (gin_trgm_ops) on specified text/citext fields for fuzzy LIKE/ILIKE/similarity search. Adds @trgmSearch smart tag for PostGraphile integration. Fields must already exist on the table.', + '{"type":"object","properties":{"fields":{"type":"array","items":{"type":"string","format":"column-ref"},"description":"Field names to create trigram indexes on (fields must already exist on the table)"}},"required":["fields"]}'::jsonb, + '{"search","trigram","schema"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'SearchUnified', + 'search_unified', + 'search', + 'Unified Search', + 'Composite node type that orchestrates multiple search modalities (full-text search, BM25, embeddings, trigram) on a single table. Configures per-table search score weights, normalization strategy, and recency boost via the @searchConfig smart tag.', + '{"type":"object","properties":{"full_text_search":{"type":"object","description":"SearchFullText parameters. Omit to skip FTS setup.","properties":{"field_name":{"type":"string","format":"column-ref","default":"search"},"source_fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","format":"column-ref"},"weight":{"type":"string","enum":["A","B","C","D"]},"lang":{"type":"string"}},"required":["field"]}},"search_score_weight":{"type":"number","default":1}}},"bm25":{"type":"object","description":"SearchBm25 parameters. Omit to skip BM25 setup.","properties":{"field_name":{"type":"string","format":"column-ref"},"text_config":{"type":"string","default":"english"},"k1":{"type":"number"},"b":{"type":"number"},"search_score_weight":{"type":"number","default":1}}},"embedding":{"type":"object","description":"SearchVector parameters. Omit to skip embedding setup.","properties":{"field_name":{"type":"string","format":"column-ref","default":"embedding"},"dimensions":{"type":"integer","default":768},"index_method":{"type":"string","enum":["hnsw","ivfflat"]},"metric":{"type":"string","enum":["cosine","l2","ip"]},"source_fields":{"type":"array","items":{"type":"string","format":"column-ref"}},"embedding_model":{"type":"string","description":"Embedding model identifier. When null, the worker falls back to runtime config."},"embedding_provider":{"type":"string","description":"Embedding provider name. When null, the worker falls back to runtime config."},"search_score_weight":{"type":"number","default":1},"chunks":{"type":"object","description":"Chunking configuration for long-text embedding. Creates an embedding_chunks record that drives automatic text splitting and per-chunk embedding. Omit to skip chunking.","properties":{"content_field_name":{"type":"string","format":"column-ref","description":"Name of the text content column in the chunks table","default":"content"},"chunk_size":{"type":"integer","description":"Maximum number of characters per chunk","default":1000},"chunk_overlap":{"type":"integer","description":"Number of overlapping characters between consecutive chunks","default":200},"chunk_strategy":{"type":"string","enum":["fixed","sentence","paragraph","semantic"],"description":"Strategy for splitting text into chunks","default":"fixed"},"metadata_fields":{"type":"object","description":"Metadata fields from parent to copy into chunks"},"enqueue_chunking_job":{"type":"boolean","description":"Whether to auto-enqueue a chunking job on insert/update","default":true},"chunking_task_name":{"type":"string","description":"Task identifier for the chunking job queue","default":"generate_chunks"}}}}},"embedding_text_field":{"type":"string","format":"column-ref","description":"Name of the composite text field created for embedding input","default":"embedding_text"},"composite_format":{"type":"string","enum":["labeled","plain"],"description":"Output format for the composite text field","default":"labeled"},"trgm_fields":{"type":"array","items":{"type":"string","format":"column-ref"},"description":"Field names to tag with @trgmSearch for fuzzy/typo-tolerant matching"},"search_config":{"type":"object","description":"Unified search score configuration written to @searchConfig smart tag","properties":{"weights":{"type":"object","description":"Per-algorithm weights: {tsv: 1.5, bm25: 1.0, pgvector: 0.8, trgm: 0.3}"},"normalization":{"type":"string","enum":["linear","sigmoid"],"description":"Score normalization strategy","default":"linear"},"boost_recent":{"type":"boolean","description":"Enable recency boost for search results","default":false},"boost_recency_field":{"type":"string","format":"column-ref","description":"Timestamp field for recency boost (e.g. created_at, updated_at)"},"boost_recency_decay":{"type":"number","description":"Decay rate for recency boost (0-1, lower = faster decay)","default":0.5}}}}}'::jsonb, + '{"search","composite","schema"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'SearchVector', + 'search_vector', + 'search', + 'Vector Search', + 'Adds a vector embedding column with HNSW or IVFFlat index for similarity search. Supports configurable dimensions, distance metrics (cosine, l2, ip), per-field {field_name}_updated_at timestamp tracking (read-only in GraphQL), and automatic job enqueue triggers for embedding generation.', + '{"type":"object","properties":{"field_name":{"type":"string","format":"column-ref","description":"Name of the vector column","default":"embedding"},"dimensions":{"type":"integer","description":"Vector dimensions (e.g. 384, 768, 1536, 3072)","default":768},"index_method":{"type":"string","enum":["hnsw","ivfflat"],"description":"Index type for similarity search","default":"hnsw"},"metric":{"type":"string","enum":["cosine","l2","ip"],"description":"Distance metric (cosine, l2, ip)","default":"cosine"},"index_options":{"type":"object","description":"Index-specific options. HNSW: {m, ef_construction}. IVFFlat: {lists}.","default":{}},"source_fields":{"type":"array","items":{"type":"string","format":"column-ref"},"description":"Column names that feed the embedding. Used by stale trigger to detect content changes."},"embedding_model":{"type":"string","description":"Embedding model identifier (e.g. \"nomic-embed-text\", \"text-embedding-3-small\"). Included in the job payload so the worker knows which model to use. When null, the worker falls back to runtime config (llm_module / env vars)."},"embedding_provider":{"type":"string","description":"Embedding provider name (e.g. \"ollama\", \"openai\"). When null, the worker falls back to runtime config."},"enqueue_job":{"type":"boolean","description":"Auto-create trigger that enqueues embedding generation jobs","default":true},"job_task_name":{"type":"string","format":"function-ref","description":"Task identifier for the job queue. Must match a registered function definition when function_module is installed.","default":"generate_embedding"},"chunks":{"type":"object","description":"Chunking configuration for long-text embedding. Creates an embedding_chunks record that drives automatic text splitting and per-chunk embedding. Omit to skip chunking.","properties":{"content_field_name":{"type":"string","format":"column-ref","description":"Name of the text content column in the chunks table","default":"content"},"chunk_size":{"type":"integer","description":"Maximum number of characters per chunk","default":1000},"chunk_overlap":{"type":"integer","description":"Number of overlapping characters between consecutive chunks","default":200},"chunk_strategy":{"type":"string","enum":["fixed","sentence","paragraph","semantic"],"description":"Strategy for splitting text into chunks","default":"fixed"},"metadata_fields":{"type":"object","description":"Metadata fields from parent to copy into chunks"},"enqueue_chunking_job":{"type":"boolean","description":"Whether to auto-enqueue a chunking job on insert/update","default":true},"chunking_task_name":{"type":"string","format":"function-ref","description":"Task identifier for the chunking job queue. Must match a registered function definition when function_module is installed.","default":"generate_chunks"}}}}}'::jsonb, + '{"embedding","vector","ai","schema"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'ViewAggregated', + 'view_aggregated', + 'view', + 'Aggregated View', + 'View with GROUP BY and aggregate functions. Useful for summary/reporting views.', + '{"type":"object","properties":{"source_table_id":{"type":"string","format":"uuid","description":"UUID of the source table"},"group_by_fields":{"type":"array","items":{"type":"string","format":"column-ref"},"description":"Field names to group by"},"aggregates":{"type":"array","items":{"type":"object","properties":{"function":{"type":"string","enum":["COUNT","SUM","AVG","MIN","MAX"]},"field":{"type":"string","format":"column-ref","description":"Field to aggregate (or * for COUNT)"},"alias":{"type":"string","format":"column-ref","description":"Output column name"}},"required":["function","alias"]},"description":"Array of aggregate specifications"}},"required":["source_table_id","group_by_fields","aggregates"]}'::jsonb, + '{"view","aggregate","reporting"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'ViewComposite', + 'view_composite', + 'view', + 'Composite View', + 'Advanced view using composite AST for the query. Use when other node types are insufficient (CTEs, UNIONs, complex subqueries, etc.).', + '{"type":"object","properties":{"query_ast":{"type":"object","description":"Composite SELECT query AST (JSONB)"}},"required":["query_ast"]}'::jsonb, + '{"view","advanced","composite","ast"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'ViewFilteredTable', + 'view_filtered_table', + 'view', + 'Filtered Table', + 'Table projection with an Authz* filter baked into the view definition. The view only returns records matching the filter.', + '{"type":"object","properties":{"source_table_id":{"type":"string","format":"uuid","description":"UUID of the source table"},"filter_type":{"type":"string","description":"Authz* node type name (e.g., AuthzDirectOwner, AuthzPublishable)"},"filter_data":{"type":"object","description":"Parameters for the Authz* filter type"},"field_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Optional array of field UUIDs to include (alternative to field_names)"},"field_names":{"type":"array","items":{"type":"string","format":"column-ref"},"description":"Optional array of field names to include (alternative to field_ids)"}},"required":["source_table_id","filter_type"]}'::jsonb, + '{"view","filter","authz"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'ViewJoinedTables', + 'view_joined_tables', + 'view', + 'Joined Tables', + 'View that joins multiple tables together. Supports INNER, LEFT, RIGHT, and FULL joins.', + '{"type":"object","properties":{"primary_table_id":{"type":"string","format":"uuid","description":"UUID of the primary (left-most) table"},"primary_columns":{"type":"array","items":{"type":"string","format":"column-ref"},"description":"Optional array of column names to include from the primary table"},"joins":{"type":"array","items":{"type":"object","properties":{"table_id":{"type":"string","format":"uuid","description":"UUID of the joined table"},"join_type":{"type":"string","enum":["INNER","LEFT","RIGHT","FULL"]},"primary_field":{"type":"string","format":"column-ref","description":"Field on primary table"},"join_field":{"type":"string","format":"column-ref","description":"Field on joined table"},"columns":{"type":"array","items":{"type":"string","format":"column-ref"},"description":"Optional column names to include from this joined table"}},"required":["table_id","primary_field","join_field"]},"description":"Array of join specifications"},"field_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Optional array of field UUIDs to include (alternative to per-table columns)"}},"required":["primary_table_id","joins"]}'::jsonb, + '{"view","join"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES ( + 'ViewTableProjection', + 'view_table_projection', + 'view', + 'Table Projection', + 'Simple column selection from a single source table. Projects all or specific fields.', + '{"type":"object","properties":{"source_table_id":{"type":"string","format":"uuid","description":"UUID of the source table to project from"},"field_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Optional array of field UUIDs to include (all fields if omitted)"},"field_names":{"type":"array","items":{"type":"string","format":"column-ref"},"description":"Optional array of field names to include (alternative to field_ids)"}},"required":["source_table_id"]}'::jsonb, + '{"view","projection"}'::text[] +) ON CONFLICT (name) DO UPDATE SET + slug = EXCLUDED.slug, + category = EXCLUDED.category, + display_name = EXCLUDED.display_name, + description = EXCLUDED.description, + parameter_schema = EXCLUDED.parameter_schema, + tags = EXCLUDED.tags; +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/node_type_registry/table.sql b/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/node_type_registry/table.sql new file mode 100644 index 00000000..e2cd74e5 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/node_type_registry/table.sql @@ -0,0 +1,20 @@ +-- Deploy schemas/metaschema_public/tables/node_type_registry/table to pg + +-- requires: schemas/metaschema_public/schema + +BEGIN; + +CREATE TABLE metaschema_public.node_type_registry ( + name text PRIMARY KEY, + slug text NOT NULL UNIQUE, + category text NOT NULL, + display_name text, + description text, + parameter_schema jsonb NOT NULL DEFAULT '{}'::jsonb, + tags text[] NOT NULL DEFAULT '{}'::text[] +); + +CREATE INDEX node_type_registry_category_idx + ON metaschema_public.node_type_registry (category); + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/partition/table.sql b/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/partition/table.sql new file mode 100644 index 00000000..6385452e --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/partition/table.sql @@ -0,0 +1,47 @@ +-- Deploy schemas/metaschema_public/tables/partition/table to pg + +-- requires: schemas/metaschema_public/schema +-- requires: schemas/metaschema_public/tables/database/table +-- requires: schemas/metaschema_public/tables/table/table +-- requires: schemas/metaschema_public/tables/field/table + +BEGIN; + +CREATE TABLE metaschema_public.partition ( + id uuid PRIMARY KEY DEFAULT uuid_generate_v4(), + database_id uuid NOT NULL, + table_id uuid NOT NULL, + strategy text NOT NULL CHECK (strategy IN ('range', 'list', 'hash')), + partition_key_id uuid NOT NULL, + "interval" text, + retention text, + retention_keep_table boolean NOT NULL DEFAULT true, + premake int NOT NULL DEFAULT 2, + naming_pattern text NOT NULL DEFAULT '{parent}_{bounds}', + is_parented boolean NOT NULL DEFAULT false, + + created_at timestamptz DEFAULT now(), + updated_at timestamptz DEFAULT now(), + + CONSTRAINT partition_database_fkey + FOREIGN KEY (database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + + CONSTRAINT partition_table_fkey + FOREIGN KEY (table_id) + REFERENCES metaschema_public.table (id) + ON DELETE CASCADE, + + CONSTRAINT partition_key_field_fkey + FOREIGN KEY (partition_key_id) + REFERENCES metaschema_public.field (id), + + CONSTRAINT partition_table_unique + UNIQUE (table_id) +); + +CREATE INDEX partition_database_id_idx + ON metaschema_public.partition (database_id); + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/policy/table.sql b/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/policy/table.sql new file mode 100644 index 00000000..4feb8e22 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/policy/table.sql @@ -0,0 +1,49 @@ +-- Deploy schemas/metaschema_public/tables/policy/table to pg + +-- requires: schemas/metaschema_public/schema +-- requires: schemas/metaschema_public/tables/table/table +-- requires: schemas/metaschema_public/types/object_category + +BEGIN; + +CREATE TABLE metaschema_public.policy ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL DEFAULT uuid_nil(), + + table_id uuid NOT NULL, + name text, + grantee_name text, + privilege text, + + -- using_expression text, + -- check_expression text, + -- policy_text text, + + permissive boolean default true, + disabled boolean default false, + + policy_type text, + data jsonb, + + smart_tags jsonb, + + category metaschema_public.object_category NOT NULL DEFAULT 'app', + module text NULL, + scope int NULL, + + tags citext[] NOT NULL DEFAULT '{}', + + created_at timestamptz DEFAULT now(), + updated_at timestamptz DEFAULT now(), + + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT table_fkey FOREIGN KEY (table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + + UNIQUE (table_id, name) +); + + +CREATE INDEX policy_table_id_idx ON metaschema_public.policy ( table_id ); +CREATE INDEX policy_database_id_idx ON metaschema_public.policy ( database_id ); + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/primary_key_constraint/table.sql b/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/primary_key_constraint/table.sql new file mode 100644 index 00000000..07d88be5 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/primary_key_constraint/table.sql @@ -0,0 +1,39 @@ +-- Deploy schemas/metaschema_public/tables/primary_key_constraint/table to pg + +-- requires: schemas/metaschema_public/schema +-- requires: schemas/metaschema_public/types/object_category + +BEGIN; + +CREATE TABLE metaschema_public.primary_key_constraint ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL DEFAULT uuid_nil(), + + table_id uuid NOT NULL, + name text, + type text, + field_ids uuid[] NOT NULL, + + smart_tags jsonb, + + category metaschema_public.object_category NOT NULL DEFAULT 'app', + module text NULL, + scope int NULL, + + tags citext[] NOT NULL DEFAULT '{}', + + created_at timestamptz DEFAULT now(), + updated_at timestamptz DEFAULT now(), + + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT table_fkey FOREIGN KEY (table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + + UNIQUE(table_id, name), + CHECK (field_ids <> '{}') +); + + +CREATE INDEX primary_key_constraint_table_id_idx ON metaschema_public.primary_key_constraint ( table_id ); +CREATE INDEX primary_key_constraint_database_id_idx ON metaschema_public.primary_key_constraint ( database_id ); + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/schema/table.sql b/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/schema/table.sql new file mode 100644 index 00000000..24ded8cc --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/schema/table.sql @@ -0,0 +1,45 @@ +-- Deploy schemas/metaschema_public/tables/schema/table to pg + +-- requires: schemas/metaschema_public/schema +-- requires: schemas/metaschema_public/tables/database/table +-- requires: schemas/metaschema_public/types/object_category + +BEGIN; + +CREATE TABLE metaschema_public.schema ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + + database_id uuid NOT NULL, + name text NOT NULL, + schema_name text NOT NULL, + label text, + description text, + + smart_tags jsonb, + + category metaschema_public.object_category NOT NULL DEFAULT 'app', + module text NULL, + scope int NULL, + + tags citext[] NOT NULL DEFAULT '{}', + + is_public boolean NOT NULL DEFAULT TRUE, + + created_at timestamptz DEFAULT now(), + updated_at timestamptz DEFAULT now(), + + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + + UNIQUE (database_id, name), + UNIQUE (schema_name) +); + +-- TODO: build out services +-- COMMENT ON COLUMN metaschema_public.schema.schema_name IS '@omit'; + +ALTER TABLE metaschema_public.schema + ADD CONSTRAINT schema_namechk CHECK (char_length(name) > 2); + +CREATE INDEX schema_database_id_idx ON metaschema_public.schema ( database_id ); + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/schema_grant/table.sql b/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/schema_grant/table.sql new file mode 100644 index 00000000..1bc79edf --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/schema_grant/table.sql @@ -0,0 +1,28 @@ +-- Deploy schemas/metaschema_public/tables/schema_grant/table to pg + +-- requires: schemas/metaschema_public/schema +-- requires: schemas/metaschema_public/tables/schema/table + +BEGIN; + +CREATE TABLE metaschema_public.schema_grant ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL DEFAULT uuid_nil(), + + schema_id uuid NOT NULL, + grantee_name text NOT NULL, + + created_at timestamptz DEFAULT now(), + updated_at timestamptz DEFAULT now(), + + -- + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT schema_fkey FOREIGN KEY (schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE + +); + + +CREATE INDEX schema_grant_schema_id_idx ON metaschema_public.schema_grant ( schema_id ); +CREATE INDEX schema_grant_database_id_idx ON metaschema_public.schema_grant ( database_id ); + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/spatial_relation/table.sql b/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/spatial_relation/table.sql new file mode 100644 index 00000000..0a559cbc --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/spatial_relation/table.sql @@ -0,0 +1,68 @@ +-- Deploy schemas/metaschema_public/tables/spatial_relation/table to pg + +-- requires: schemas/metaschema_public/tables/field/table +-- requires: schemas/metaschema_public/tables/table/table +-- requires: schemas/metaschema_public/schema +-- requires: schemas/metaschema_public/types/object_category + +BEGIN; + +CREATE TABLE metaschema_public.spatial_relation ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL DEFAULT uuid_nil(), + + -- owner side + table_id uuid NOT NULL, + field_id uuid NOT NULL, + + -- target side + ref_table_id uuid NOT NULL, + ref_field_id uuid NOT NULL, + + -- relation shape + name text NOT NULL, + operator text NOT NULL, + param_name text NULL, + + category metaschema_public.object_category NOT NULL DEFAULT 'app', + module text NULL, + scope int NULL, + + tags citext[] NOT NULL DEFAULT '{}', + + created_at timestamptz DEFAULT now(), + updated_at timestamptz DEFAULT now(), + + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT table_fkey FOREIGN KEY (table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT field_fkey FOREIGN KEY (field_id) REFERENCES metaschema_public.field (id) ON DELETE CASCADE, + CONSTRAINT ref_table_fkey FOREIGN KEY (ref_table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + CONSTRAINT ref_field_fkey FOREIGN KEY (ref_field_id) REFERENCES metaschema_public.field (id) ON DELETE CASCADE, + + UNIQUE (table_id, name), + + CHECK (operator IN ( + 'st_contains', + 'st_within', + 'st_covers', + 'st_coveredby', + 'st_intersects', + 'st_equals', + 'st_bbox_intersects', + 'st_dwithin' + )), + + CHECK ( + (operator = 'st_dwithin' AND param_name IS NOT NULL) + OR + (operator <> 'st_dwithin' AND param_name IS NULL) + ) +); + +CREATE INDEX spatial_relation_table_id_idx ON metaschema_public.spatial_relation ( table_id ); +CREATE INDEX spatial_relation_field_id_idx ON metaschema_public.spatial_relation ( field_id ); +CREATE INDEX spatial_relation_database_id_idx ON metaschema_public.spatial_relation ( database_id ); +CREATE INDEX spatial_relation_ref_table_id_idx ON metaschema_public.spatial_relation ( ref_table_id ); +CREATE INDEX spatial_relation_ref_field_id_idx ON metaschema_public.spatial_relation ( ref_field_id ); + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/table/indexes/databases_table_unique_name_idx.sql b/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/table/indexes/databases_table_unique_name_idx.sql new file mode 100644 index 00000000..c981dec4 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/table/indexes/databases_table_unique_name_idx.sql @@ -0,0 +1,20 @@ +-- Deploy schemas/metaschema_public/tables/table/indexes/databases_table_unique_name_idx to pg +-- requires: schemas/metaschema_public/schema +-- requires: schemas/metaschema_private/schema +-- requires: schemas/metaschema_public/tables/table/table + +BEGIN; + +CREATE FUNCTION metaschema_private.table_name_hash (name text) + RETURNS bytea + AS $BODY$ + SELECT + DECODE(MD5(LOWER(inflection.plural (name))), 'hex'); +$BODY$ +LANGUAGE sql +IMMUTABLE; + +CREATE UNIQUE INDEX databases_table_unique_name_idx ON metaschema_public.table (database_id, schema_id, metaschema_private.table_name_hash (name)); + +COMMIT; + diff --git a/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/table/table.sql b/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/table/table.sql new file mode 100644 index 00000000..d9db4e9c --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/table/table.sql @@ -0,0 +1,58 @@ +-- Deploy schemas/metaschema_public/tables/table/table to pg +-- requires: schemas/metaschema_public/schema +-- requires: schemas/metaschema_public/tables/database/table +-- requires: schemas/metaschema_public/tables/schema/table +-- requires: schemas/metaschema_public/types/object_category + +BEGIN; + +CREATE TABLE metaschema_public.table ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL DEFAULT uuid_nil(), + + schema_id uuid NOT NULL, + + name text NOT NULL, + + label text, + description text, + + smart_tags jsonb, + + category metaschema_public.object_category NOT NULL DEFAULT 'app', + module text NULL, + scope int NULL, + + use_rls boolean NOT NULL DEFAULT FALSE, + + timestamps boolean NOT NULL DEFAULT FALSE, + peoplestamps boolean NOT NULL DEFAULT FALSE, + + plural_name text, + singular_name text, + + tags citext[] NOT NULL DEFAULT '{}', + + partitioned boolean NOT NULL DEFAULT false, + partition_strategy text DEFAULT NULL, + partition_key_names text[] DEFAULT NULL, + partition_key_types text[] DEFAULT NULL, + + created_at timestamptz DEFAULT now(), + updated_at timestamptz DEFAULT now(), + + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT schema_fkey FOREIGN KEY (schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + + UNIQUE (database_id, schema_id, name) +); + +ALTER TABLE metaschema_public.table ADD COLUMN + inherits_id uuid NULL REFERENCES metaschema_public.table(id); + + +CREATE INDEX table_schema_id_idx ON metaschema_public.table ( schema_id ); +CREATE INDEX table_database_id_idx ON metaschema_public.table ( database_id ); + +COMMIT; + diff --git a/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/table_grant/table.sql b/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/table_grant/table.sql new file mode 100644 index 00000000..04858394 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/table_grant/table.sql @@ -0,0 +1,39 @@ +-- Deploy schemas/metaschema_public/tables/table_grant/table to pg + +-- requires: schemas/metaschema_public/schema +-- requires: schemas/metaschema_public/tables/table/table + +BEGIN; + +CREATE TABLE metaschema_public.table_grant ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL DEFAULT uuid_nil(), + + table_id uuid NOT NULL, + privilege text NOT NULL, + grantee_name text NOT NULL, + field_ids uuid[], + + -- true = GRANT, false = REVOKE + is_grant boolean NOT NULL DEFAULT true, + + created_at timestamptz DEFAULT now(), + updated_at timestamptz DEFAULT now(), + + -- + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT table_fkey FOREIGN KEY (table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE +); + + +CREATE INDEX table_grant_table_id_idx ON metaschema_public.table_grant ( table_id ); +CREATE INDEX table_grant_database_id_idx ON metaschema_public.table_grant ( database_id ); + +CREATE UNIQUE INDEX table_grant_unique_idx ON metaschema_public.table_grant ( + table_id, + privilege, + grantee_name, + COALESCE(field_ids, '{}'::uuid[]) +); + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/trigger/table.sql b/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/trigger/table.sql new file mode 100644 index 00000000..c4ffc522 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/trigger/table.sql @@ -0,0 +1,41 @@ +-- Deploy schemas/metaschema_public/tables/trigger/table to pg + +-- requires: schemas/metaschema_public/schema +-- requires: schemas/metaschema_public/tables/table/table +-- requires: schemas/metaschema_public/types/object_category + +BEGIN; + +-- https://www.postgresql.org/docs/12/sql-createtrigger.html + +CREATE TABLE metaschema_public.trigger ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL DEFAULT uuid_nil(), + + table_id uuid NOT NULL, + name text NOT NULL, + event text, -- INSERT, UPDATE, DELETE, or TRUNCATE + function_name text, + + smart_tags jsonb, + + category metaschema_public.object_category NOT NULL DEFAULT 'app', + module text NULL, + scope int NULL, + + tags citext[] NOT NULL DEFAULT '{}', + + created_at timestamptz DEFAULT now(), + updated_at timestamptz DEFAULT now(), + + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT table_fkey FOREIGN KEY (table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + + UNIQUE(table_id, name) +); + + +CREATE INDEX trigger_table_id_idx ON metaschema_public.trigger ( table_id ); +CREATE INDEX trigger_database_id_idx ON metaschema_public.trigger ( database_id ); + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/trigger_function/table.sql b/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/trigger_function/table.sql new file mode 100644 index 00000000..161e09fd --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/trigger_function/table.sql @@ -0,0 +1,25 @@ +-- Deploy schemas/metaschema_public/tables/trigger_function/table to pg + +-- requires: schemas/metaschema_public/schema +-- requires: schemas/metaschema_public/tables/database/table + +BEGIN; + +CREATE TABLE metaschema_public.trigger_function ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + + name text NOT NULL, + code text, + + created_at timestamptz DEFAULT now(), + updated_at timestamptz DEFAULT now(), + + -- + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + UNIQUE (database_id, name) +); + +CREATE INDEX trigger_function_database_id_idx ON metaschema_public.trigger_function ( database_id ); + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/unique_constraint/table.sql b/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/unique_constraint/table.sql new file mode 100644 index 00000000..01be08e4 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/unique_constraint/table.sql @@ -0,0 +1,44 @@ +-- Deploy schemas/metaschema_public/tables/unique_constraint/table to pg + +-- requires: schemas/metaschema_public/schema +-- requires: schemas/metaschema_public/tables/database/table +-- requires: schemas/metaschema_public/tables/table/table +-- requires: schemas/metaschema_public/types/object_category + +BEGIN; + +CREATE TABLE metaschema_public.unique_constraint ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL DEFAULT uuid_nil(), + + table_id uuid NOT NULL, + name text, + description text, + smart_tags jsonb, + type text, + field_ids uuid[] NOT NULL, + + category metaschema_public.object_category NOT NULL DEFAULT 'app', + module text NULL, + scope int NULL, + + tags citext[] NOT NULL DEFAULT '{}', + + created_at timestamptz DEFAULT now(), + updated_at timestamptz DEFAULT now(), + + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT table_fkey FOREIGN KEY (table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + + -- TODO these are unique across schema, NOT table. We'll need to update this to have database_id + -- for portability + + UNIQUE (table_id, name), + CHECK (field_ids <> '{}') +); + + +CREATE INDEX unique_constraint_table_id_idx ON metaschema_public.unique_constraint ( table_id ); +CREATE INDEX unique_constraint_database_id_idx ON metaschema_public.unique_constraint ( database_id ); + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/view/table.sql b/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/view/table.sql new file mode 100644 index 00000000..4fc9b6be --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/view/table.sql @@ -0,0 +1,56 @@ +-- Deploy schemas/metaschema_public/tables/view/table to pg + +-- requires: schemas/metaschema_public/schema +-- requires: schemas/metaschema_public/tables/schema/table +-- requires: schemas/metaschema_public/tables/table/table +-- requires: schemas/metaschema_public/tables/database/table +-- requires: schemas/metaschema_public/types/object_category + +BEGIN; + +CREATE TABLE metaschema_public.view ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL DEFAULT uuid_nil(), + + schema_id uuid NOT NULL, + name text NOT NULL, + + -- Primary/source table for the view (nullable for ViewComposite) + -- For ViewTableProjection, ViewFilteredTable, ViewAggregated: the source table + -- For ViewJoinedTables: the primary (left-most) table + -- For ViewComposite: NULL (no table reference) + table_id uuid, + + -- View query definition using View* node types + view_type text NOT NULL, + data jsonb DEFAULT '{}', + + -- Optional filter using Authz* node types (baked into view WHERE clause) + filter_type text, + filter_data jsonb DEFAULT '{}', + + -- View options + security_invoker boolean DEFAULT true, + is_read_only boolean DEFAULT true, + + smart_tags jsonb, + + category metaschema_public.object_category NOT NULL DEFAULT 'app', + module text NULL, + scope int NULL, + + tags citext[] NOT NULL DEFAULT '{}', + + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT schema_fkey FOREIGN KEY (schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + CONSTRAINT table_fkey FOREIGN KEY (table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + + UNIQUE (schema_id, name) +); + + +CREATE INDEX view_schema_id_idx ON metaschema_public.view ( schema_id ); +CREATE INDEX view_database_id_idx ON metaschema_public.view ( database_id ); +CREATE INDEX view_table_id_idx ON metaschema_public.view ( table_id ); + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/view_grant/table.sql b/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/view_grant/table.sql new file mode 100644 index 00000000..a87f7e25 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/view_grant/table.sql @@ -0,0 +1,32 @@ +-- Deploy schemas/metaschema_public/tables/view_grant/table to pg + +-- requires: schemas/metaschema_public/schema +-- requires: schemas/metaschema_public/tables/view/table +-- requires: schemas/metaschema_public/tables/database/table + +BEGIN; + +CREATE TABLE metaschema_public.view_grant ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL DEFAULT uuid_nil(), + + view_id uuid NOT NULL, + grantee_name text NOT NULL, + privilege text NOT NULL, + + with_grant_option boolean DEFAULT false, + + -- true = GRANT, false = REVOKE + is_grant boolean NOT NULL DEFAULT true, + + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT view_fkey FOREIGN KEY (view_id) REFERENCES metaschema_public.view (id) ON DELETE CASCADE, + + UNIQUE (view_id, grantee_name, privilege, is_grant) +); + + +CREATE INDEX view_grant_view_id_idx ON metaschema_public.view_grant ( view_id ); +CREATE INDEX view_grant_database_id_idx ON metaschema_public.view_grant ( database_id ); + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/view_rule/table.sql b/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/view_rule/table.sql new file mode 100644 index 00000000..116203ea --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/view_rule/table.sql @@ -0,0 +1,32 @@ +-- Deploy schemas/metaschema_public/tables/view_rule/table to pg + +-- requires: schemas/metaschema_public/schema +-- requires: schemas/metaschema_public/tables/view/table +-- requires: schemas/metaschema_public/tables/database/table + +BEGIN; + +CREATE TABLE metaschema_public.view_rule ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL DEFAULT uuid_nil(), + + view_id uuid NOT NULL, + name text NOT NULL, + event text NOT NULL, + action text NOT NULL DEFAULT 'NOTHING', + + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT view_fkey FOREIGN KEY (view_id) REFERENCES metaschema_public.view (id) ON DELETE CASCADE, + + UNIQUE (view_id, name) +); + +COMMENT ON TABLE metaschema_public.view_rule IS 'DO INSTEAD rules for views (e.g., read-only enforcement)'; +COMMENT ON COLUMN metaschema_public.view_rule.event IS 'INSERT, UPDATE, or DELETE'; +COMMENT ON COLUMN metaschema_public.view_rule.action IS 'NOTHING (for read-only) or custom action'; + + +CREATE INDEX view_rule_view_id_idx ON metaschema_public.view_rule ( view_id ); +CREATE INDEX view_rule_database_id_idx ON metaschema_public.view_rule ( database_id ); + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/view_table/table.sql b/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/view_table/table.sql new file mode 100644 index 00000000..6992e061 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/tables/view_table/table.sql @@ -0,0 +1,31 @@ +-- Deploy schemas/metaschema_public/tables/view_table/table to pg + +-- requires: schemas/metaschema_public/schema +-- requires: schemas/metaschema_public/tables/view/table +-- requires: schemas/metaschema_public/tables/table/table + +BEGIN; + +-- Junction table linking views to their joined tables (for ViewJoinedTables) +-- This provides referential integrity for views that reference multiple tables. +-- The primary table is stored in view.table_id; this table stores additional joined tables. +CREATE TABLE metaschema_public.view_table ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + view_id uuid NOT NULL, + table_id uuid NOT NULL, + + -- Order of joins (0 = first join, 1 = second join, etc.) + join_order int NOT NULL DEFAULT 0, + + CONSTRAINT view_fkey FOREIGN KEY (view_id) REFERENCES metaschema_public.view (id) ON DELETE CASCADE, + CONSTRAINT table_fkey FOREIGN KEY (table_id) REFERENCES metaschema_public.table (id) ON DELETE CASCADE, + + UNIQUE (view_id, table_id) +); + +COMMENT ON TABLE metaschema_public.view_table IS 'Junction table linking views to their joined tables for referential integrity'; + +CREATE INDEX view_table_view_id_idx ON metaschema_public.view_table ( view_id ); +CREATE INDEX view_table_table_id_idx ON metaschema_public.view_table ( table_id ); + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/types/object_category.sql b/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/types/object_category.sql new file mode 100644 index 00000000..9480d9f5 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/deploy/schemas/metaschema_public/types/object_category.sql @@ -0,0 +1,13 @@ +-- Deploy schemas/metaschema_public/types/object_category to pg + +-- requires: schemas/metaschema_public/schema + +BEGIN; + +-- Unified category type for all metaschema objects (tables, fields, procedures, triggers, indexes, policies, constraints, etc.) +-- 'core' - system-level objects (id fields, entity_id, actor_id, etc.) +-- 'module' - objects created by modules (users, permissions, memberships, etc.) +-- 'app' - user-defined application objects +CREATE TYPE metaschema_public.object_category AS ENUM ('core', 'module', 'app'); + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/metaschema-schema.control b/extensions/@pgpm/metaschema-schema/metaschema-schema.control new file mode 100644 index 00000000..54954e70 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/metaschema-schema.control @@ -0,0 +1,7 @@ +# metaschema-schema extension +comment = 'metaschema-schema extension' +default_version = '0.26.3' +module_pathname = '$libdir/metaschema-schema' +requires = 'citext,hstore,pgpm-inflection,pgpm-database-jobs,pgpm-types,pgcrypto,plpgsql,postgis,uuid-ossp,pgpm-verify' +relocatable = false +superuser = false diff --git a/extensions/@pgpm/metaschema-schema/package.json b/extensions/@pgpm/metaschema-schema/package.json new file mode 100644 index 00000000..1148c3ce --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/package.json @@ -0,0 +1,41 @@ +{ + "name": "@pgpm/metaschema-schema", + "version": "0.26.5", + "description": "Database metadata utilities and introspection functions", + "author": "Dan Lynch ", + "contributors": [ + "Constructive " + ], + "keywords": [ + "postgresql", + "pgpm", + "metadata", + "introspection" + ], + "publishConfig": { + "access": "public" + }, + "scripts": { + "bundle": "pgpm package", + "test": "jest", + "test:watch": "jest --watch" + }, + "dependencies": { + "@pgpm/database-jobs": "0.26.5", + "@pgpm/inflection": "0.26.0", + "@pgpm/types": "0.26.0", + "@pgpm/verify": "0.26.0" + }, + "devDependencies": { + "pgpm": "^4.23.2" + }, + "repository": { + "type": "git", + "url": "https://github.com/constructive-io/pgpm-modules" + }, + "homepage": "https://github.com/constructive-io/pgpm-modules", + "bugs": { + "url": "https://github.com/constructive-io/pgpm-modules/issues" + }, + "gitHead": "a496a00d89c37d874f4a7207265b9972b6f05c7d" +} diff --git a/extensions/@pgpm/metaschema-schema/pgpm.plan b/extensions/@pgpm/metaschema-schema/pgpm.plan new file mode 100644 index 00000000..3f6c02ea --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/pgpm.plan @@ -0,0 +1,39 @@ +%syntax-version=1.0.0 +%project=metaschema-schema +%uri=metaschema-schema + +schemas/metaschema_private/schema [pgpm-inflection:schemas/inflection/tables/inflection_rules/indexes/inflection_rules_type_idx pgpm-database-jobs:schemas/app_jobs/triggers/tg_add_job_with_row pgpm-types:schemas/public/domains/url] 2017-08-11T08:11:51Z skitch # add schemas/metaschema_private/schema +schemas/metaschema_public/schema 2017-08-11T08:11:51Z skitch # add schemas/metaschema_public/schema +schemas/metaschema_public/types/object_category [schemas/metaschema_public/schema] 2017-08-11T08:11:51Z skitch # add schemas/metaschema_public/types/object_category +schemas/metaschema_public/tables/database/table [schemas/metaschema_public/schema] 2017-08-11T08:11:51Z skitch # add schemas/metaschema_public/tables/database/table +schemas/metaschema_public/tables/schema/table [schemas/metaschema_public/schema schemas/metaschema_public/tables/database/table schemas/metaschema_public/types/object_category] 2017-08-11T08:11:51Z skitch # add schemas/metaschema_public/tables/schema/table +schemas/metaschema_public/tables/table/table [schemas/metaschema_public/schema schemas/metaschema_public/tables/database/table schemas/metaschema_public/tables/schema/table schemas/metaschema_public/types/object_category] 2017-08-11T08:11:51Z skitch # add schemas/metaschema_public/tables/table/table +schemas/metaschema_public/tables/check_constraint/table [schemas/metaschema_public/schema schemas/metaschema_public/tables/database/table schemas/metaschema_public/tables/table/table] 2017-08-11T08:11:51Z skitch # add schemas/metaschema_public/tables/check_constraint/table +schemas/metaschema_public/tables/database/indexes/databases_database_unique_name_idx [schemas/metaschema_private/schema schemas/metaschema_public/schema schemas/metaschema_public/tables/database/table] 2017-08-11T08:11:51Z skitch # add schemas/metaschema_public/tables/database/indexes/databases_database_unique_name_idx +schemas/metaschema_public/tables/field/table [schemas/metaschema_public/schema schemas/metaschema_public/tables/table/table] 2017-08-11T08:11:51Z skitch # add schemas/metaschema_public/tables/field/table +schemas/metaschema_public/tables/field/indexes/databases_field_uniq_names_idx [schemas/metaschema_public/schema schemas/metaschema_public/tables/field/table] 2017-08-11T08:11:51Z skitch # add schemas/metaschema_public/tables/field/indexes/databases_field_uniq_names_idx +schemas/metaschema_public/tables/foreign_key_constraint/table [schemas/metaschema_public/tables/field/table schemas/metaschema_public/tables/table/table schemas/metaschema_public/schema] 2017-08-11T08:11:51Z skitch # add schemas/metaschema_public/tables/foreign_key_constraint/table +schemas/metaschema_public/tables/full_text_search/table [schemas/metaschema_public/schema] 2017-08-11T08:11:51Z skitch # add schemas/metaschema_public/tables/full_text_search/table +schemas/metaschema_public/tables/index/table [schemas/metaschema_public/schema schemas/metaschema_public/tables/table/table schemas/metaschema_public/tables/database/table] 2017-08-11T08:11:51Z skitch # add schemas/metaschema_public/tables/index/table +schemas/metaschema_public/tables/policy/table [schemas/metaschema_public/schema schemas/metaschema_public/tables/table/table] 2017-08-11T08:11:51Z skitch # add schemas/metaschema_public/tables/policy/table +schemas/metaschema_public/tables/primary_key_constraint/table [schemas/metaschema_public/schema] 2017-08-11T08:11:51Z skitch # add schemas/metaschema_public/tables/primary_key_constraint/table +schemas/metaschema_public/tables/schema_grant/table [schemas/metaschema_public/schema schemas/metaschema_public/tables/schema/table] 2017-08-11T08:11:51Z skitch # add schemas/metaschema_public/tables/schema_grant/table +schemas/metaschema_public/tables/table_grant/table [schemas/metaschema_public/schema schemas/metaschema_public/tables/table/table] 2017-08-11T08:11:51Z skitch # add schemas/metaschema_public/tables/table_grant/table +schemas/metaschema_public/tables/table/indexes/databases_table_unique_name_idx [schemas/metaschema_public/schema schemas/metaschema_private/schema schemas/metaschema_public/tables/table/table] 2017-08-11T08:11:51Z skitch # add schemas/metaschema_public/tables/table/indexes/databases_table_unique_name_idx +schemas/metaschema_public/tables/trigger_function/table [schemas/metaschema_public/schema schemas/metaschema_public/tables/database/table] 2017-08-11T08:11:51Z skitch # add schemas/metaschema_public/tables/trigger_function/table +schemas/metaschema_public/tables/trigger/table [schemas/metaschema_public/schema schemas/metaschema_public/tables/table/table] 2017-08-11T08:11:51Z skitch # add schemas/metaschema_public/tables/trigger/table +schemas/metaschema_public/tables/unique_constraint/table [schemas/metaschema_public/schema schemas/metaschema_public/tables/database/table schemas/metaschema_public/tables/table/table] 2017-08-11T08:11:51Z skitch # add schemas/metaschema_public/tables/unique_constraint/table +schemas/metaschema_public/tables/view/table [schemas/metaschema_public/schema schemas/metaschema_public/tables/schema/table schemas/metaschema_public/tables/table/table schemas/metaschema_public/tables/database/table schemas/metaschema_public/types/object_category] 2026-01-23T00:00:00Z devin # add schemas/metaschema_public/tables/view/table +schemas/metaschema_public/tables/view_table/table [schemas/metaschema_public/schema schemas/metaschema_public/tables/view/table schemas/metaschema_public/tables/table/table] 2026-01-23T00:00:00Z devin # add schemas/metaschema_public/tables/view_table/table +schemas/metaschema_public/tables/view_grant/table [schemas/metaschema_public/schema schemas/metaschema_public/tables/view/table schemas/metaschema_public/tables/database/table] 2026-01-23T00:00:00Z devin # add schemas/metaschema_public/tables/view_grant/table +schemas/metaschema_public/tables/view_rule/table [schemas/metaschema_public/schema schemas/metaschema_public/tables/view/table schemas/metaschema_public/tables/database/table] 2026-01-23T00:00:00Z devin # add schemas/metaschema_public/tables/view_rule/table +schemas/metaschema_public/tables/default_privilege/table [schemas/metaschema_public/schema schemas/metaschema_public/tables/schema/table schemas/metaschema_public/tables/database/table] 2026-02-27T00:00:00Z Constructive # add schemas/metaschema_public/tables/default_privilege/table +schemas/metaschema_public/tables/enum/table [schemas/metaschema_public/schema schemas/metaschema_public/tables/database/table schemas/metaschema_public/tables/schema/table schemas/metaschema_public/types/object_category] 2026-03-15T00:00:00Z devin # add schemas/metaschema_public/tables/enum/table +schemas/metaschema_public/tables/embedding_chunks/table [schemas/metaschema_public/schema schemas/metaschema_public/tables/database/table schemas/metaschema_public/tables/table/table schemas/metaschema_public/tables/field/table] 2026-03-19T00:00:00Z devin # add schemas/metaschema_public/tables/embedding_chunks/table + +schemas/metaschema_public/tables/spatial_relation/table [schemas/metaschema_public/schema schemas/metaschema_public/tables/database/table schemas/metaschema_public/tables/table/table schemas/metaschema_public/tables/field/table schemas/metaschema_public/types/object_category] 2026-04-17T00:00:00Z devin # add schemas/metaschema_public/tables/spatial_relation/table +schemas/metaschema_public/tables/node_type_registry/table [schemas/metaschema_public/schema] 2026-04-30T00:00:00Z Constructive # add schemas/metaschema_public/tables/node_type_registry/table +schemas/metaschema_public/tables/node_type_registry/fixtures/node_type_registry_seed [schemas/metaschema_public/schema schemas/metaschema_public/tables/node_type_registry/table] 2026-04-30T00:00:01Z Constructive # seed node_type_registry data from upstream TS registry +schemas/metaschema_public/tables/function/table [schemas/metaschema_public/schema schemas/metaschema_public/tables/database/table schemas/metaschema_public/tables/schema/table] 2026-05-09T00:00:00Z devin # add metaschema_public.function table for tracking generated SQL functions +schemas/metaschema_public/tables/partition/table [schemas/metaschema_public/schema schemas/metaschema_public/tables/database/table schemas/metaschema_public/tables/table/table schemas/metaschema_public/tables/field/table] 2026-05-26T00:00:00Z Constructive # add metaschema_public.partition table for pg_partman lifecycle config +schemas/metaschema_public/tables/composite_type/table [schemas/metaschema_public/schema schemas/metaschema_public/tables/database/table schemas/metaschema_public/tables/schema/table schemas/metaschema_public/types/object_category] 2026-05-29T00:00:00Z devin # add metaschema_public.composite_type table for generated composite types diff --git a/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_private/schema.sql b/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_private/schema.sql new file mode 100644 index 00000000..ac975528 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_private/schema.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_private/schema from pg + +BEGIN; + +DROP SCHEMA metaschema_private CASCADE; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/schema.sql b/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/schema.sql new file mode 100644 index 00000000..de7b232c --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/schema.sql @@ -0,0 +1,6 @@ + +BEGIN; + +DROP SCHEMA metaschema_public CASCADE; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/check_constraint/table.sql b/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/check_constraint/table.sql new file mode 100644 index 00000000..afa34f68 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/check_constraint/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_public/tables/check_constraint/table from pg + +BEGIN; + +DROP TABLE metaschema_public.check_constraint; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/composite_type/table.sql b/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/composite_type/table.sql new file mode 100644 index 00000000..bc31bc06 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/composite_type/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_public/tables/composite_type/table from pg + +BEGIN; + +DROP TABLE metaschema_public.composite_type; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/database/indexes/databases_database_unique_name_idx.sql b/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/database/indexes/databases_database_unique_name_idx.sql new file mode 100644 index 00000000..3410c5a8 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/database/indexes/databases_database_unique_name_idx.sql @@ -0,0 +1,6 @@ + +BEGIN; + +DROP INDEX metaschema_public.databases_database_unique_name_idx; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/database/table.sql b/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/database/table.sql new file mode 100644 index 00000000..b76c8ade --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/database/table.sql @@ -0,0 +1,6 @@ + +BEGIN; + +DROP TABLE metaschema_public.database; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/default_privilege/table.sql b/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/default_privilege/table.sql new file mode 100644 index 00000000..186ea256 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/default_privilege/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_public/tables/default_privilege/table from pg + +BEGIN; + +DROP TABLE IF EXISTS metaschema_public.default_privilege; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/embedding_chunks/table.sql b/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/embedding_chunks/table.sql new file mode 100644 index 00000000..2c1919e8 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/embedding_chunks/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_public/tables/embedding_chunks/table from pg + +BEGIN; + +DROP TABLE IF EXISTS metaschema_public.embedding_chunks; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/enum/table.sql b/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/enum/table.sql new file mode 100644 index 00000000..2ece6210 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/enum/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_public/tables/enum/table from pg + +BEGIN; + +DROP TABLE metaschema_public.enum; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/field/indexes/databases_field_uniq_names_idx.sql b/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/field/indexes/databases_field_uniq_names_idx.sql new file mode 100644 index 00000000..959162b0 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/field/indexes/databases_field_uniq_names_idx.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_public/tables/field/indexes/databases_field_uniq_names_idx from pg + +BEGIN; + +DROP INDEX metaschema_public.databases_field_uniq_names_idx; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/field/table.sql b/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/field/table.sql new file mode 100644 index 00000000..ee7d49d0 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/field/table.sql @@ -0,0 +1,8 @@ + +BEGIN; + +DROP INDEX metaschema_public.field_database_id_idx; +DROP INDEX metaschema_public.field_table_id_idx; +DROP TABLE metaschema_public.field; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/foreign_key_constraint/table.sql b/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/foreign_key_constraint/table.sql new file mode 100644 index 00000000..46f68219 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/foreign_key_constraint/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_public/tables/foreign_key_constraint/table from pg + +BEGIN; + +DROP TABLE metaschema_public.foreign_key_constraint; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/full_text_search/table.sql b/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/full_text_search/table.sql new file mode 100644 index 00000000..178a8f7e --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/full_text_search/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_public/tables/full_text_search/table from pg + +BEGIN; + +DROP TABLE metaschema_public.full_text_search; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/function/table.sql b/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/function/table.sql new file mode 100644 index 00000000..b7a13ef0 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/function/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_public/tables/function/table from pg + +BEGIN; + +DROP TABLE metaschema_public.function; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/index/table.sql b/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/index/table.sql new file mode 100644 index 00000000..f041cb38 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/index/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_public/tables/index/table from pg + +BEGIN; + +DROP TABLE metaschema_public.index; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/node_type_registry/fixtures/node_type_registry_seed.sql b/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/node_type_registry/fixtures/node_type_registry_seed.sql new file mode 100644 index 00000000..1fd02531 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/node_type_registry/fixtures/node_type_registry_seed.sql @@ -0,0 +1,10 @@ +-- Revert schemas/metaschema_public/tables/node_type_registry/fixtures/node_type_registry_seed from pg +-- +-- GENERATED FILE — DO NOT EDIT +-- Regenerate with: cd packages/node-type-registry && pnpm generate + +BEGIN; + +DELETE FROM metaschema_public.node_type_registry; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/node_type_registry/table.sql b/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/node_type_registry/table.sql new file mode 100644 index 00000000..7e0f75fe --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/node_type_registry/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_public/tables/node_type_registry/table from pg + +BEGIN; + +DROP TABLE IF EXISTS metaschema_public.node_type_registry; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/partition/table.sql b/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/partition/table.sql new file mode 100644 index 00000000..976337d0 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/partition/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_public/tables/partition/table from pg + +BEGIN; + +DROP TABLE metaschema_public.partition; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/policy/table.sql b/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/policy/table.sql new file mode 100644 index 00000000..654cb590 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/policy/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_public/tables/policy/table from pg + +BEGIN; + +DROP TABLE metaschema_public.policy; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/primary_key_constraint/table.sql b/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/primary_key_constraint/table.sql new file mode 100644 index 00000000..6ece54e8 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/primary_key_constraint/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_public/tables/primary_key_constraint/table from pg + +BEGIN; + +DROP TABLE metaschema_public.primary_key_constraint; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/schema/table.sql b/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/schema/table.sql new file mode 100644 index 00000000..d10b1c9d --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/schema/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_public/tables/schema/table from pg + +BEGIN; + +DROP TABLE metaschema_public.schema; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/schema_grant/table.sql b/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/schema_grant/table.sql new file mode 100644 index 00000000..85a7e2f0 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/schema_grant/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_public/tables/schema_grant/table from pg + +BEGIN; + +DROP TABLE metaschema_public.schema_grant; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/spatial_relation/table.sql b/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/spatial_relation/table.sql new file mode 100644 index 00000000..b0a74110 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/spatial_relation/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_public/tables/spatial_relation/table from pg + +BEGIN; + +DROP TABLE metaschema_public.spatial_relation; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/table/indexes/databases_table_unique_name_idx.sql b/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/table/indexes/databases_table_unique_name_idx.sql new file mode 100644 index 00000000..fad5449f --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/table/indexes/databases_table_unique_name_idx.sql @@ -0,0 +1,6 @@ + +BEGIN; + +DROP INDEX metaschema_public.databases_table_unique_name_idx; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/table/table.sql b/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/table/table.sql new file mode 100644 index 00000000..b911a39d --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/table/table.sql @@ -0,0 +1,6 @@ + +BEGIN; + +DROP TABLE metaschema_public.table; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/table_grant/table.sql b/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/table_grant/table.sql new file mode 100644 index 00000000..80fcd59f --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/table_grant/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_public/tables/table_grant/table from pg + +BEGIN; + +DROP TABLE metaschema_public.table_grant; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/trigger/table.sql b/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/trigger/table.sql new file mode 100644 index 00000000..70e15e22 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/trigger/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_public/tables/trigger/table from pg + +BEGIN; + +DROP TABLE metaschema_public.trigger; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/trigger_function/table.sql b/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/trigger_function/table.sql new file mode 100644 index 00000000..9ccb04e6 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/trigger_function/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_public/tables/trigger_function/table from pg + +BEGIN; + +DROP TABLE metaschema_public.trigger_function; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/unique_constraint/table.sql b/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/unique_constraint/table.sql new file mode 100644 index 00000000..5edc1688 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/unique_constraint/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_public/tables/unique_constraint/table from pg + +BEGIN; + +DROP TABLE metaschema_public.unique_constraint; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/view/table.sql b/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/view/table.sql new file mode 100644 index 00000000..422f467b --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/view/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_public/tables/view/table from pg + +BEGIN; + +DROP TABLE IF EXISTS metaschema_public.view; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/view_grant/table.sql b/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/view_grant/table.sql new file mode 100644 index 00000000..52fdd9fb --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/view_grant/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_public/tables/view_grant/table from pg + +BEGIN; + +DROP TABLE IF EXISTS metaschema_public.view_grant; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/view_rule/table.sql b/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/view_rule/table.sql new file mode 100644 index 00000000..76c3265d --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/view_rule/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_public/tables/view_rule/table from pg + +BEGIN; + +DROP TABLE IF EXISTS metaschema_public.view_rule; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/view_table/table.sql b/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/view_table/table.sql new file mode 100644 index 00000000..08df9345 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/tables/view_table/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_public/tables/view_table/table from pg + +BEGIN; + +DROP TABLE IF EXISTS metaschema_public.view_table; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/types/object_category.sql b/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/types/object_category.sql new file mode 100644 index 00000000..68174dd4 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/revert/schemas/metaschema_public/types/object_category.sql @@ -0,0 +1,7 @@ +-- Revert schemas/metaschema_public/types/object_category from pg + +BEGIN; + +DROP TYPE metaschema_public.object_category; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/revert/schemas/services_private/schema.sql b/extensions/@pgpm/metaschema-schema/revert/schemas/services_private/schema.sql new file mode 100644 index 00000000..710f99c9 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/revert/schemas/services_private/schema.sql @@ -0,0 +1,7 @@ +-- Revert schemas/services_private/schema from pg + +BEGIN; + +DROP SCHEMA services_private; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/revert/schemas/services_public/schema.sql b/extensions/@pgpm/metaschema-schema/revert/schemas/services_public/schema.sql new file mode 100644 index 00000000..3fd696ac --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/revert/schemas/services_public/schema.sql @@ -0,0 +1,7 @@ +-- Revert schemas/services_public/schema from pg + +BEGIN; + +DROP SCHEMA services_public; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/revert/schemas/services_public/tables/api_modules/table.sql b/extensions/@pgpm/metaschema-schema/revert/schemas/services_public/tables/api_modules/table.sql new file mode 100644 index 00000000..65543be1 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/revert/schemas/services_public/tables/api_modules/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/services_public/tables/api_modules/table from pg + +BEGIN; + +DROP TABLE services_public.api_modules; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/revert/schemas/services_public/tables/api_schemas/table.sql b/extensions/@pgpm/metaschema-schema/revert/schemas/services_public/tables/api_schemas/table.sql new file mode 100644 index 00000000..8a310db7 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/revert/schemas/services_public/tables/api_schemas/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/services_public/tables/api_schemas/table from pg + +BEGIN; + +DROP TABLE services_public.api_schemas; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/revert/schemas/services_public/tables/apis/table.sql b/extensions/@pgpm/metaschema-schema/revert/schemas/services_public/tables/apis/table.sql new file mode 100644 index 00000000..2feff0a6 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/revert/schemas/services_public/tables/apis/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/services_public/tables/apis/table from pg + +BEGIN; + +DROP TABLE services_public.apis; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/revert/schemas/services_public/tables/apps/table.sql b/extensions/@pgpm/metaschema-schema/revert/schemas/services_public/tables/apps/table.sql new file mode 100644 index 00000000..816bf6d3 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/revert/schemas/services_public/tables/apps/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/services_public/tables/apps/table from pg + +BEGIN; + +DROP TABLE services_public.apps; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/revert/schemas/services_public/tables/domains/table.sql b/extensions/@pgpm/metaschema-schema/revert/schemas/services_public/tables/domains/table.sql new file mode 100644 index 00000000..44b47a3e --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/revert/schemas/services_public/tables/domains/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/services_public/tables/domains/table from pg + +BEGIN; + +DROP TABLE services_public.domains; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/revert/schemas/services_public/tables/site_metadata/table.sql b/extensions/@pgpm/metaschema-schema/revert/schemas/services_public/tables/site_metadata/table.sql new file mode 100644 index 00000000..cef080d5 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/revert/schemas/services_public/tables/site_metadata/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/services_public/tables/site_metadata/table from pg + +BEGIN; + +DROP TABLE services_public.site_metadata; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/revert/schemas/services_public/tables/site_modules/table.sql b/extensions/@pgpm/metaschema-schema/revert/schemas/services_public/tables/site_modules/table.sql new file mode 100644 index 00000000..a63f2042 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/revert/schemas/services_public/tables/site_modules/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/services_public/tables/site_modules/table from pg + +BEGIN; + +DROP TABLE services_public.site_modules; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/revert/schemas/services_public/tables/site_themes/table.sql b/extensions/@pgpm/metaschema-schema/revert/schemas/services_public/tables/site_themes/table.sql new file mode 100644 index 00000000..21f2965c --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/revert/schemas/services_public/tables/site_themes/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/services_public/tables/site_themes/table from pg + +BEGIN; + +DROP TABLE services_public.site_themes; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/revert/schemas/services_public/tables/sites/table.sql b/extensions/@pgpm/metaschema-schema/revert/schemas/services_public/tables/sites/table.sql new file mode 100644 index 00000000..913178bb --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/revert/schemas/services_public/tables/sites/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/services_public/tables/sites/table from pg + +BEGIN; + +DROP TABLE services_public.sites; + +COMMIT; diff --git a/extensions/@pgpm/metaschema-schema/sql/metaschema-schema--0.26.3.sql b/extensions/@pgpm/metaschema-schema/sql/metaschema-schema--0.26.3.sql new file mode 100644 index 00000000..e20b0a3e --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/sql/metaschema-schema--0.26.3.sql @@ -0,0 +1,1724 @@ +\echo Use "CREATE EXTENSION metaschema-schema" to load this file. \quit +CREATE SCHEMA metaschema_private; + +GRANT USAGE ON SCHEMA metaschema_private TO authenticated; + +ALTER DEFAULT PRIVILEGES IN SCHEMA metaschema_private + GRANT ALL ON TABLES TO authenticated; + +ALTER DEFAULT PRIVILEGES IN SCHEMA metaschema_private + GRANT ALL ON SEQUENCES TO authenticated; + +ALTER DEFAULT PRIVILEGES IN SCHEMA metaschema_private + GRANT ALL ON FUNCTIONS TO authenticated; + +CREATE SCHEMA metaschema_public; + +GRANT USAGE ON SCHEMA metaschema_public TO authenticated; + +ALTER DEFAULT PRIVILEGES IN SCHEMA metaschema_public + GRANT ALL ON TABLES TO authenticated; + +ALTER DEFAULT PRIVILEGES IN SCHEMA metaschema_public + GRANT ALL ON SEQUENCES TO authenticated; + +ALTER DEFAULT PRIVILEGES IN SCHEMA metaschema_public + GRANT ALL ON FUNCTIONS TO authenticated; + +CREATE TYPE metaschema_public.object_category AS ENUM ('core', 'module', 'app'); + +CREATE TABLE metaschema_public.database ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + owner_id uuid, + schema_hash text, + name text, + label text, + hash uuid, + created_at timestamptz DEFAULT now(), + updated_at timestamptz DEFAULT now(), + UNIQUE (schema_hash) +); + +ALTER TABLE metaschema_public.database + ADD CONSTRAINT db_namechk + CHECK (char_length(name) > 2); + +COMMENT ON COLUMN metaschema_public.database.schema_hash IS '@omit'; + +CREATE TABLE metaschema_public.schema ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + name text NOT NULL, + schema_name text NOT NULL, + label text, + description text, + smart_tags jsonb, + category metaschema_public.object_category NOT NULL DEFAULT 'app', + module text NULL, + scope int NULL, + tags citext[] NOT NULL DEFAULT '{}', + is_public boolean NOT NULL DEFAULT true, + created_at timestamptz DEFAULT now(), + updated_at timestamptz DEFAULT now(), + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + UNIQUE (database_id, name), + UNIQUE (schema_name) +); + +ALTER TABLE metaschema_public.schema + ADD CONSTRAINT schema_namechk + CHECK (char_length(name) > 2); + +CREATE INDEX schema_database_id_idx ON metaschema_public.schema (database_id); + +CREATE TABLE metaschema_public."table" ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL DEFAULT uuid_nil(), + schema_id uuid NOT NULL, + name text NOT NULL, + label text, + description text, + smart_tags jsonb, + category metaschema_public.object_category NOT NULL DEFAULT 'app', + module text NULL, + scope int NULL, + use_rls boolean NOT NULL DEFAULT false, + timestamps boolean NOT NULL DEFAULT false, + peoplestamps boolean NOT NULL DEFAULT false, + plural_name text, + singular_name text, + tags citext[] NOT NULL DEFAULT '{}', + partitioned boolean NOT NULL DEFAULT false, + partition_strategy text DEFAULT NULL, + partition_key_names text[] DEFAULT NULL, + partition_key_types text[] DEFAULT NULL, + created_at timestamptz DEFAULT now(), + updated_at timestamptz DEFAULT now(), + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT schema_fkey + FOREIGN KEY(schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + UNIQUE (database_id, schema_id, name) +); + +ALTER TABLE metaschema_public."table" + ADD COLUMN inherits_id uuid + NULL + REFERENCES metaschema_public."table" (id); + +CREATE INDEX table_schema_id_idx ON metaschema_public."table" (schema_id); + +CREATE INDEX table_database_id_idx ON metaschema_public."table" (database_id); + +CREATE TABLE metaschema_public.check_constraint ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL DEFAULT uuid_nil(), + table_id uuid NOT NULL, + name text, + type text, + field_ids uuid[] NOT NULL, + expr jsonb, + smart_tags jsonb, + category metaschema_public.object_category NOT NULL DEFAULT 'app', + module text NULL, + scope int NULL, + tags citext[] NOT NULL DEFAULT '{}', + created_at timestamptz DEFAULT now(), + updated_at timestamptz DEFAULT now(), + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT table_fkey + FOREIGN KEY(table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + UNIQUE (table_id, name), + CHECK (field_ids <> '{}') +); + +CREATE INDEX check_constraint_table_id_idx ON metaschema_public.check_constraint (table_id); + +CREATE INDEX check_constraint_database_id_idx ON metaschema_public.check_constraint (database_id); + +CREATE FUNCTION metaschema_private.database_name_hash(name text) RETURNS bytea AS $EOFCODE$ + SELECT + DECODE(MD5(LOWER(inflection.plural (name))), 'hex'); +$EOFCODE$ LANGUAGE sql IMMUTABLE; + +CREATE UNIQUE INDEX databases_database_unique_name_idx ON metaschema_public.database (owner_id, (metaschema_private.database_name_hash(name))); + +CREATE TABLE metaschema_public.field ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL DEFAULT uuid_nil(), + table_id uuid NOT NULL, + name text NOT NULL, + label text, + description text, + smart_tags jsonb, + is_required boolean NOT NULL DEFAULT false, + api_required boolean NOT NULL DEFAULT false, + default_value jsonb NULL DEFAULT NULL, + type jsonb NOT NULL, + field_order int NOT NULL DEFAULT 0, + regexp text DEFAULT NULL, + chk jsonb DEFAULT NULL, + chk_expr jsonb DEFAULT NULL, + min double precision DEFAULT NULL, + max double precision DEFAULT NULL, + tags citext[] NOT NULL DEFAULT '{}', + category metaschema_public.object_category NOT NULL DEFAULT 'app', + module text NULL, + scope int NULL, + created_at timestamptz DEFAULT now(), + updated_at timestamptz DEFAULT now(), + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT table_fkey + FOREIGN KEY(table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + UNIQUE (table_id, name) +); + +CREATE INDEX field_table_id_idx ON metaschema_public.field (table_id); + +CREATE INDEX field_database_id_idx ON metaschema_public.field (database_id); + +CREATE UNIQUE INDEX databases_field_uniq_names_idx ON metaschema_public.field (table_id, (decode(md5(lower(CASE + WHEN (type ->> 'name') = 'uuid' THEN regexp_replace(name, '^(.+?)(_row_id|_id|_uuid|_fk|_pk)$', E'\\1', 'i') + ELSE name +END)), 'hex'))); + +CREATE TABLE metaschema_public.foreign_key_constraint ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL DEFAULT uuid_nil(), + table_id uuid NOT NULL, + name text, + description text, + smart_tags jsonb, + type text, + field_ids uuid[] NOT NULL, + ref_table_id uuid NOT NULL REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + ref_field_ids uuid[] NOT NULL, + delete_action char(1) DEFAULT 'c', + update_action char(1) DEFAULT 'a', + category metaschema_public.object_category NOT NULL DEFAULT 'app', + module text NULL, + scope int NULL, + tags citext[] NOT NULL DEFAULT '{}', + created_at timestamptz DEFAULT now(), + updated_at timestamptz DEFAULT now(), + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT table_fkey + FOREIGN KEY(table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + UNIQUE (table_id, name), + CHECK (field_ids <> '{}'), + CHECK (ref_field_ids <> '{}') +); + +CREATE INDEX foreign_key_constraint_table_id_idx ON metaschema_public.foreign_key_constraint (table_id); + +CREATE INDEX foreign_key_constraint_database_id_idx ON metaschema_public.foreign_key_constraint (database_id); + +CREATE TABLE metaschema_public.full_text_search ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL DEFAULT uuid_nil(), + table_id uuid NOT NULL, + field_id uuid NOT NULL, + field_ids uuid[] NOT NULL, + weights text[] NOT NULL, + langs text[] NOT NULL, + lang_column text, + created_at timestamptz DEFAULT now(), + updated_at timestamptz DEFAULT now(), + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT table_fkey + FOREIGN KEY(table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CHECK ( + cardinality(field_ids) = cardinality(weights) + AND cardinality(weights) = cardinality(langs) + ) +); + +CREATE INDEX full_text_search_table_id_idx ON metaschema_public.full_text_search (table_id); + +CREATE INDEX full_text_search_database_id_idx ON metaschema_public.full_text_search (database_id); + +CREATE TABLE metaschema_public.index ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + table_id uuid NOT NULL, + name text NOT NULL DEFAULT '', + field_ids uuid[], + include_field_ids uuid[], + access_method text NOT NULL DEFAULT 'BTREE', + index_params jsonb, + where_clause jsonb, + is_unique boolean NOT NULL DEFAULT false, + options jsonb, + op_classes text[], + smart_tags jsonb, + category metaschema_public.object_category NOT NULL DEFAULT 'app', + module text NULL, + scope int NULL, + tags citext[] NOT NULL DEFAULT '{}', + created_at timestamptz DEFAULT now(), + updated_at timestamptz DEFAULT now(), + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT table_fkey + FOREIGN KEY(table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + UNIQUE (database_id, name) +); + +CREATE INDEX index_table_id_idx ON metaschema_public.index (table_id); + +CREATE INDEX index_database_id_idx ON metaschema_public.index (database_id); + +CREATE TABLE metaschema_public.policy ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL DEFAULT uuid_nil(), + table_id uuid NOT NULL, + name text, + grantee_name text, + privilege text, + permissive boolean DEFAULT true, + disabled boolean DEFAULT false, + policy_type text, + data jsonb, + smart_tags jsonb, + category metaschema_public.object_category NOT NULL DEFAULT 'app', + module text NULL, + scope int NULL, + tags citext[] NOT NULL DEFAULT '{}', + created_at timestamptz DEFAULT now(), + updated_at timestamptz DEFAULT now(), + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT table_fkey + FOREIGN KEY(table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + UNIQUE (table_id, name) +); + +CREATE INDEX policy_table_id_idx ON metaschema_public.policy (table_id); + +CREATE INDEX policy_database_id_idx ON metaschema_public.policy (database_id); + +CREATE TABLE metaschema_public.primary_key_constraint ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL DEFAULT uuid_nil(), + table_id uuid NOT NULL, + name text, + type text, + field_ids uuid[] NOT NULL, + smart_tags jsonb, + category metaschema_public.object_category NOT NULL DEFAULT 'app', + module text NULL, + scope int NULL, + tags citext[] NOT NULL DEFAULT '{}', + created_at timestamptz DEFAULT now(), + updated_at timestamptz DEFAULT now(), + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT table_fkey + FOREIGN KEY(table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + UNIQUE (table_id, name), + CHECK (field_ids <> '{}') +); + +CREATE INDEX primary_key_constraint_table_id_idx ON metaschema_public.primary_key_constraint (table_id); + +CREATE INDEX primary_key_constraint_database_id_idx ON metaschema_public.primary_key_constraint (database_id); + +CREATE TABLE metaschema_public.schema_grant ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL DEFAULT uuid_nil(), + schema_id uuid NOT NULL, + grantee_name text NOT NULL, + created_at timestamptz DEFAULT now(), + updated_at timestamptz DEFAULT now(), + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT schema_fkey + FOREIGN KEY(schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE +); + +CREATE INDEX schema_grant_schema_id_idx ON metaschema_public.schema_grant (schema_id); + +CREATE INDEX schema_grant_database_id_idx ON metaschema_public.schema_grant (database_id); + +CREATE TABLE metaschema_public.table_grant ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL DEFAULT uuid_nil(), + table_id uuid NOT NULL, + privilege text NOT NULL, + grantee_name text NOT NULL, + field_ids uuid[], + is_grant boolean NOT NULL DEFAULT true, + created_at timestamptz DEFAULT now(), + updated_at timestamptz DEFAULT now(), + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT table_fkey + FOREIGN KEY(table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE +); + +CREATE INDEX table_grant_table_id_idx ON metaschema_public.table_grant (table_id); + +CREATE INDEX table_grant_database_id_idx ON metaschema_public.table_grant (database_id); + +CREATE UNIQUE INDEX table_grant_unique_idx ON metaschema_public.table_grant (table_id, privilege, grantee_name, (COALESCE(field_ids, CAST('{}' AS uuid[])))); + +CREATE FUNCTION metaschema_private.table_name_hash(name text) RETURNS bytea AS $EOFCODE$ + SELECT + DECODE(MD5(LOWER(inflection.plural (name))), 'hex'); +$EOFCODE$ LANGUAGE sql IMMUTABLE; + +CREATE UNIQUE INDEX databases_table_unique_name_idx ON metaschema_public."table" (database_id, schema_id, (metaschema_private.table_name_hash(name))); + +CREATE TABLE metaschema_public.trigger_function ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + name text NOT NULL, + code text, + created_at timestamptz DEFAULT now(), + updated_at timestamptz DEFAULT now(), + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + UNIQUE (database_id, name) +); + +CREATE INDEX trigger_function_database_id_idx ON metaschema_public.trigger_function (database_id); + +CREATE TABLE metaschema_public.trigger ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL DEFAULT uuid_nil(), + table_id uuid NOT NULL, + name text NOT NULL, + event text, + function_name text, + smart_tags jsonb, + category metaschema_public.object_category NOT NULL DEFAULT 'app', + module text NULL, + scope int NULL, + tags citext[] NOT NULL DEFAULT '{}', + created_at timestamptz DEFAULT now(), + updated_at timestamptz DEFAULT now(), + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT table_fkey + FOREIGN KEY(table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + UNIQUE (table_id, name) +); + +CREATE INDEX trigger_table_id_idx ON metaschema_public.trigger (table_id); + +CREATE INDEX trigger_database_id_idx ON metaschema_public.trigger (database_id); + +CREATE TABLE metaschema_public.unique_constraint ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL DEFAULT uuid_nil(), + table_id uuid NOT NULL, + name text, + description text, + smart_tags jsonb, + type text, + field_ids uuid[] NOT NULL, + category metaschema_public.object_category NOT NULL DEFAULT 'app', + module text NULL, + scope int NULL, + tags citext[] NOT NULL DEFAULT '{}', + created_at timestamptz DEFAULT now(), + updated_at timestamptz DEFAULT now(), + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT table_fkey + FOREIGN KEY(table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + UNIQUE (table_id, name), + CHECK (field_ids <> '{}') +); + +CREATE INDEX unique_constraint_table_id_idx ON metaschema_public.unique_constraint (table_id); + +CREATE INDEX unique_constraint_database_id_idx ON metaschema_public.unique_constraint (database_id); + +CREATE TABLE metaschema_public.view ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL DEFAULT uuid_nil(), + schema_id uuid NOT NULL, + name text NOT NULL, + table_id uuid, + view_type text NOT NULL, + data jsonb DEFAULT '{}', + filter_type text, + filter_data jsonb DEFAULT '{}', + security_invoker boolean DEFAULT true, + is_read_only boolean DEFAULT true, + smart_tags jsonb, + category metaschema_public.object_category NOT NULL DEFAULT 'app', + module text NULL, + scope int NULL, + tags citext[] NOT NULL DEFAULT '{}', + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT schema_fkey + FOREIGN KEY(schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT table_fkey + FOREIGN KEY(table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + UNIQUE (schema_id, name) +); + +CREATE INDEX view_schema_id_idx ON metaschema_public.view (schema_id); + +CREATE INDEX view_database_id_idx ON metaschema_public.view (database_id); + +CREATE INDEX view_table_id_idx ON metaschema_public.view (table_id); + +CREATE TABLE metaschema_public.view_table ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + view_id uuid NOT NULL, + table_id uuid NOT NULL, + join_order int NOT NULL DEFAULT 0, + CONSTRAINT view_fkey + FOREIGN KEY(view_id) + REFERENCES metaschema_public.view (id) + ON DELETE CASCADE, + CONSTRAINT table_fkey + FOREIGN KEY(table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + UNIQUE (view_id, table_id) +); + +COMMENT ON TABLE metaschema_public.view_table IS 'Junction table linking views to their joined tables for referential integrity'; + +CREATE INDEX view_table_view_id_idx ON metaschema_public.view_table (view_id); + +CREATE INDEX view_table_table_id_idx ON metaschema_public.view_table (table_id); + +CREATE TABLE metaschema_public.view_grant ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL DEFAULT uuid_nil(), + view_id uuid NOT NULL, + grantee_name text NOT NULL, + privilege text NOT NULL, + with_grant_option boolean DEFAULT false, + is_grant boolean NOT NULL DEFAULT true, + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT view_fkey + FOREIGN KEY(view_id) + REFERENCES metaschema_public.view (id) + ON DELETE CASCADE, + UNIQUE (view_id, grantee_name, privilege, is_grant) +); + +CREATE INDEX view_grant_view_id_idx ON metaschema_public.view_grant (view_id); + +CREATE INDEX view_grant_database_id_idx ON metaschema_public.view_grant (database_id); + +CREATE TABLE metaschema_public.view_rule ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL DEFAULT uuid_nil(), + view_id uuid NOT NULL, + name text NOT NULL, + event text NOT NULL, + action text NOT NULL DEFAULT 'NOTHING', + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT view_fkey + FOREIGN KEY(view_id) + REFERENCES metaschema_public.view (id) + ON DELETE CASCADE, + UNIQUE (view_id, name) +); + +COMMENT ON TABLE metaschema_public.view_rule IS 'DO INSTEAD rules for views (e.g., read-only enforcement)'; + +COMMENT ON COLUMN metaschema_public.view_rule.event IS 'INSERT, UPDATE, or DELETE'; + +COMMENT ON COLUMN metaschema_public.view_rule.action IS 'NOTHING (for read-only) or custom action'; + +CREATE INDEX view_rule_view_id_idx ON metaschema_public.view_rule (view_id); + +CREATE INDEX view_rule_database_id_idx ON metaschema_public.view_rule (database_id); + +CREATE TABLE metaschema_public.default_privilege ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL DEFAULT uuid_nil(), + schema_id uuid NOT NULL, + object_type text NOT NULL, + privilege text NOT NULL, + grantee_name text NOT NULL, + is_grant boolean NOT NULL DEFAULT true, + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT schema_fkey + FOREIGN KEY(schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + UNIQUE (schema_id, object_type, privilege, grantee_name, is_grant) +); + +CREATE INDEX default_privilege_schema_id_idx ON metaschema_public.default_privilege (schema_id); + +CREATE INDEX default_privilege_database_id_idx ON metaschema_public.default_privilege (database_id); + +CREATE TABLE metaschema_public.enum ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + schema_id uuid NOT NULL, + name text NOT NULL, + label text, + description text, + values text[] NOT NULL DEFAULT '{}', + smart_tags jsonb, + category metaschema_public.object_category NOT NULL DEFAULT 'app', + module text NULL, + scope int NULL, + tags citext[] NOT NULL DEFAULT '{}', + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT schema_fkey + FOREIGN KEY(schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + UNIQUE (schema_id, name) +); + +CREATE INDEX enum_schema_id_idx ON metaschema_public.enum (schema_id); + +CREATE INDEX enum_database_id_idx ON metaschema_public.enum (database_id); + +CREATE TABLE metaschema_public.embedding_chunks ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL DEFAULT uuid_nil(), + table_id uuid NOT NULL, + embedding_field_id uuid, + chunks_table_id uuid, + chunks_table_name text, + content_field_name text NOT NULL DEFAULT 'content', + dimensions int NOT NULL DEFAULT 768, + metric text NOT NULL DEFAULT 'cosine', + chunk_size int NOT NULL DEFAULT 1000, + chunk_overlap int NOT NULL DEFAULT 200, + chunk_strategy text NOT NULL DEFAULT 'fixed', + metadata_fields jsonb, + search_indexes jsonb, + enqueue_chunking_job boolean NOT NULL DEFAULT true, + chunking_task_name text NOT NULL DEFAULT 'generate_chunks', + embedding_model text, + embedding_provider text, + parent_fk_field_id uuid, + created_at timestamptz DEFAULT now(), + updated_at timestamptz DEFAULT now(), + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT table_fkey + FOREIGN KEY(table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT chunks_table_fkey + FOREIGN KEY(chunks_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE SET NULL, + CONSTRAINT embedding_field_fkey + FOREIGN KEY(embedding_field_id) + REFERENCES metaschema_public.field (id) + ON DELETE SET NULL, + CONSTRAINT parent_fk_field_fkey + FOREIGN KEY(parent_fk_field_id) + REFERENCES metaschema_public.field (id) + ON DELETE SET NULL, + CONSTRAINT valid_metric + CHECK (metric IN ('cosine', 'l2', 'ip')), + CONSTRAINT valid_chunk_strategy + CHECK (chunk_strategy IN ('fixed', 'sentence', 'paragraph', 'semantic')), + CONSTRAINT valid_dimensions + CHECK (dimensions > 0), + CONSTRAINT valid_chunk_size + CHECK (chunk_size > 0), + CONSTRAINT valid_chunk_overlap + CHECK ( + chunk_overlap >= 0 + AND chunk_overlap < chunk_size + ) +); + +CREATE INDEX embedding_chunks_table_id_idx ON metaschema_public.embedding_chunks (table_id); + +CREATE INDEX embedding_chunks_database_id_idx ON metaschema_public.embedding_chunks (database_id); + +CREATE INDEX embedding_chunks_chunks_table_id_idx ON metaschema_public.embedding_chunks (chunks_table_id); + +CREATE TABLE metaschema_public.spatial_relation ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL DEFAULT uuid_nil(), + table_id uuid NOT NULL, + field_id uuid NOT NULL, + ref_table_id uuid NOT NULL, + ref_field_id uuid NOT NULL, + name text NOT NULL, + operator text NOT NULL, + param_name text NULL, + category metaschema_public.object_category NOT NULL DEFAULT 'app', + module text NULL, + scope int NULL, + tags citext[] NOT NULL DEFAULT '{}', + created_at timestamptz DEFAULT now(), + updated_at timestamptz DEFAULT now(), + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT table_fkey + FOREIGN KEY(table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT field_fkey + FOREIGN KEY(field_id) + REFERENCES metaschema_public.field (id) + ON DELETE CASCADE, + CONSTRAINT ref_table_fkey + FOREIGN KEY(ref_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT ref_field_fkey + FOREIGN KEY(ref_field_id) + REFERENCES metaschema_public.field (id) + ON DELETE CASCADE, + UNIQUE (table_id, name), + CHECK (operator IN ('st_contains', 'st_within', 'st_covers', 'st_coveredby', 'st_intersects', 'st_equals', 'st_bbox_intersects', 'st_dwithin')), + CHECK ( + (operator = 'st_dwithin' + AND param_name IS NOT NULL) + OR (operator <> 'st_dwithin' + AND param_name IS NULL) + ) +); + +CREATE INDEX spatial_relation_table_id_idx ON metaschema_public.spatial_relation (table_id); + +CREATE INDEX spatial_relation_field_id_idx ON metaschema_public.spatial_relation (field_id); + +CREATE INDEX spatial_relation_database_id_idx ON metaschema_public.spatial_relation (database_id); + +CREATE INDEX spatial_relation_ref_table_id_idx ON metaschema_public.spatial_relation (ref_table_id); + +CREATE INDEX spatial_relation_ref_field_id_idx ON metaschema_public.spatial_relation (ref_field_id); + +CREATE TABLE metaschema_public.node_type_registry ( + name text PRIMARY KEY, + slug text NOT NULL UNIQUE, + category text NOT NULL, + display_name text, + description text, + parameter_schema jsonb NOT NULL DEFAULT '{}'::jsonb, + tags text[] NOT NULL DEFAULT CAST('{}' AS text[]) +); + +CREATE INDEX node_type_registry_category_idx ON metaschema_public.node_type_registry (category); + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('AuthzAllowAll', 'authz_allow_all', 'authz', 'Public Access', 'Allows all access. Generates TRUE expression.', '{"type":"object","properties":{}}'::jsonb, CAST('{"authz"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('AuthzAppMembership', 'authz_app_membership_check', 'authz', 'App Membership Check', 'App-level membership check (hardcoded membership_type=1). Verifies the user has app membership (optionally with specific permission) without binding to any entity from the row. Uses EXISTS subquery against SPRT table. For entity-scoped checks (org, channel, etc.), use AuthzEntityMembership instead.', CAST('{"type":"object","properties":{"permission":{"type":"string","description":"Single permission name to check (resolved to bitstring mask)"},"permissions":{"type":"array","items":{"type":"string"},"description":"Multiple permission names to check (ORed together into mask)"},"is_admin":{"type":"boolean","description":"If true, require is_admin flag"},"is_owner":{"type":"boolean","description":"If true, require is_owner flag"}},"required":[]}' AS jsonb), CAST('{"membership","authz"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('AuthzComposite', 'authz_composite', 'authz', 'Composite Policy', 'Composite authorization policy that combines multiple authorization nodes using boolean logic (AND/OR). The data field contains a JSONB AST with nested authorization nodes.', '{"type":"object","description":"A composite policy containing nested authorization nodes combined with boolean logic","properties":{"BoolExpr":{"type":"object","description":"Boolean expression combining multiple authorization nodes","properties":{"boolop":{"type":"string","enum":["AND_EXPR","OR_EXPR","NOT_EXPR"],"description":"Boolean operator: AND_EXPR, OR_EXPR, or NOT_EXPR"},"args":{"type":"array","description":"Array of authorization nodes to combine","items":{"type":"object"}}}}}}'::jsonb, CAST('{"composite","authz"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('AuthzDenyAll', 'authz_deny_all', 'authz', 'No Access', 'Denies all access. Generates FALSE expression.', '{"type":"object","properties":{}}'::jsonb, CAST('{"authz"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('AuthzDirectOwner', 'authz_direct_owner', 'authz', 'Direct Ownership', 'Direct equality comparison between a table column and the current user ID. Simplest authorization pattern with no subqueries.', CAST('{"type":"object","properties":{"entity_field":{"type":"string","format":"column-ref","description":"Column name containing the owner user ID (e.g., owner_id)"}},"required":["entity_field"]}' AS jsonb), CAST('{"ownership","authz"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('AuthzDirectOwnerAny', 'authz_direct_owner_any', 'authz', 'Multi-Owner Access', 'OR logic for multiple ownership fields. Checks if current user matches any of the specified fields.', '{"type":"object","properties":{"entity_fields":{"type":"array","items":{"type":"string","format":"column-ref"},"description":"Array of column names to check for ownership"}},"required":["entity_fields"]}'::jsonb, CAST('{"ownership","authz"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('AuthzEntityMembership', 'authz_entity_membership', 'authz', 'Entity Membership', 'Membership check scoped by a field on the row through the SPRT table. Verifies user has membership in the entity referenced by the row.', CAST('{"type":"object","properties":{"entity_field":{"type":"string","format":"column-ref","description":"Column name referencing the entity (e.g., entity_id, org_id)"},"sel_field":{"type":"string","description":"SPRT column to select for the entity match","default":"entity_id"},"membership_type":{"type":["integer","string"],"description":"Scope: 1=app, 2=org, 3+=dynamic entity types (or string name resolved via membership_types_module)"},"entity_type":{"type":"string","description":"Entity type prefix (e.g. ''channel'', ''department''). Resolved to membership_type integer via memberships_module lookup. Use instead of membership_type for readability."},"permission":{"type":"string","description":"Single permission name to check (resolved to bitstring mask)"},"permissions":{"type":"array","items":{"type":"string"},"description":"Multiple permission names to check (ORed together into mask)"},"is_admin":{"type":"boolean","description":"If true, require is_admin flag"},"is_owner":{"type":"boolean","description":"If true, require is_owner flag"}},"required":["entity_field"]}' AS jsonb), CAST('{"membership","authz"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('AuthzFilePath', 'authz_file_path', 'authz', 'File Path Share', 'Path-scoped file sharing via ltree containment. Grants access when a path_shares row matches the current user, bucket, and an ancestor path with the required permission.', CAST('{"type":"object","properties":{"shares_schema":{"type":"string","description":"Schema of the path_shares table"},"shares_table":{"type":"string","description":"Name of the path_shares table"},"files_schema":{"type":"string","description":"Schema of the files table (used to qualify column references inside the EXISTS subquery)"},"files_table":{"type":"string","description":"Name of the files table (used to qualify column references inside the EXISTS subquery)"},"permission_field":{"type":"string","format":"column-ref","description":"Boolean column on the path_shares table that grants the required permission (e.g. can_read, can_write)"},"bucket_field":{"type":"string","format":"column-ref","description":"Column on the files table referencing the bucket","default":"bucket_id"},"path_field":{"type":"string","format":"column-ref","description":"Ltree column on the files table representing the file path","default":"path"}},"required":["shares_schema","shares_table","files_table","permission_field"]}' AS jsonb), CAST('{"storage","authz"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('AuthzMemberList', 'authz_member_list', 'authz', 'Member List', 'Check if current user is in an array column on the same row.', '{"type":"object","properties":{"array_field":{"type":"string","format":"column-ref","description":"Column name containing the array of user IDs"}},"required":["array_field"]}'::jsonb, CAST('{"ownership","authz"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('AuthzMemberOwner', 'authz_member_owner', 'authz', 'Member Owner', 'Compound policy: the row must be owned by the current user (owner_field = current_user_id) AND the current user must be a member of the entity referenced by entity_field. Combines direct ownership with entity membership — the actor can only access rows they own within entities they belong to.', CAST('{"type":"object","properties":{"owner_field":{"type":"string","format":"column-ref","description":"Column name containing the owner user ID (e.g., owner_id)","default":"owner_id"},"entity_field":{"type":"string","format":"column-ref","description":"Column name referencing the entity (e.g., entity_id)","default":"entity_id"},"sel_field":{"type":"string","description":"SPRT column to select for the entity match","default":"entity_id"},"membership_type":{"type":["integer","string"],"description":"Scope: 1=app, 2=org, 3+=dynamic entity types (or string name resolved via membership_types_module)"},"entity_type":{"type":"string","description":"Entity type prefix (e.g. ''channel'', ''department''). Resolved to membership_type integer via memberships_module lookup."},"permission":{"type":"string","description":"Single permission name to check (resolved to bitstring mask)"},"permissions":{"type":"array","items":{"type":"string"},"description":"Multiple permission names to check (ORed together into mask)"}},"required":["owner_field","entity_field"]}' AS jsonb), CAST('{"ownership","membership","authz"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('AuthzNotReadOnly', 'authz_not_read_only', 'authz', 'Not Read-Only', 'Restrictive policy that blocks read-only members from mutations. Checks actor_id + is_read_only IS NOT TRUE on the SPRT. Designed to run as a restrictive counterpart after a permissive AuthzEntityMembership policy has already verified membership.', CAST('{"type":"object","properties":{"entity_field":{"type":"string","format":"column-ref","description":"Column name referencing the entity (e.g., entity_id, org_id)"},"membership_type":{"type":["integer","string"],"description":"Scope: 2=org, 3+=dynamic entity types. Must be >= 2 (entity-scoped)."}},"required":["entity_field"]}' AS jsonb), CAST('{"membership","authz","restrictive"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('AuthzOrgHierarchy', 'authz_org_hierarchy', 'authz', 'Org Hierarchy', 'Organizational hierarchy visibility using closure table. Managers can see subordinate data or subordinates can see manager data.', CAST('{"type":"object","properties":{"direction":{"type":"string","enum":["up","down"],"description":"down=manager sees subordinates, up=subordinate sees managers"},"entity_field":{"type":"string","format":"column-ref","description":"Field referencing the org entity","default":"entity_id"},"anchor_field":{"type":"string","format":"column-ref","description":"Field referencing the user (e.g., owner_id)"},"max_depth":{"type":"integer","description":"Optional max depth to limit visibility"}},"required":["direction","anchor_field"]}' AS jsonb), CAST('{"membership","hierarchy","authz"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('AuthzPeerOwnership', 'authz_peer_ownership', 'authz', 'Peer Ownership', 'Peer visibility through shared entity membership. Authorizes access to user-owned rows when the owner and current user are both members of the same entity. Self-joins the SPRT table to find peers.', CAST('{"type":"object","properties":{"owner_field":{"type":"string","format":"column-ref","description":"Column name on protected table referencing the owning user (e.g., owner_id)"},"membership_type":{"type":["integer","string"],"description":"Scope: 1=app, 2=org, 3+=dynamic entity types (or string name resolved via membership_types_module)"},"entity_type":{"type":"string","description":"Entity type prefix (e.g. ''channel'', ''department''). Resolved to membership_type integer via memberships_module lookup. Use instead of membership_type for readability."},"permission":{"type":"string","description":"Single permission name to check on the current user membership (resolved to bitstring mask)"},"permissions":{"type":"array","items":{"type":"string"},"description":"Multiple permission names to check on the current user membership (ORed together into mask)"},"is_admin":{"type":"boolean","description":"If true, require is_admin flag on current user membership"},"is_owner":{"type":"boolean","description":"If true, require is_owner flag on current user membership"}},"required":["owner_field"]}' AS jsonb), CAST('{"membership","peer","authz"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('AuthzPublishable', 'authz_publishable', 'authz', 'Published Content', 'Published state access control. Restricts access to records that are published.', CAST('{"type":"object","properties":{"is_published_field":{"type":"string","format":"column-ref","description":"Boolean field indicating published state","default":"is_published"},"published_at_field":{"type":"string","format":"column-ref","description":"Timestamp field for publish time","default":"published_at"},"require_published_at":{"type":"boolean","description":"Require published_at to be non-null and <= now()","default":true}}}' AS jsonb), CAST('{"temporal","publishing","authz"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('AuthzRelatedEntityMembership', 'authz_related_entity_membership', 'authz', 'Related Entity Membership', 'JOIN-based membership verification through related tables. Joins SPRT table with another table to verify membership.', CAST('{"type":"object","properties":{"entity_field":{"type":"string","format":"column-ref","description":"Column name on protected table referencing the join table"},"sel_field":{"type":"string","description":"SPRT column to select for the entity match","default":"entity_id"},"sprt_join_field":{"type":"string","description":"SPRT column to join on with the related table","default":"entity_id"},"membership_type":{"type":["integer","string"],"description":"Scope: 1=app, 2=org, 3+=dynamic entity types (or string name resolved via membership_types_module)"},"entity_type":{"type":"string","description":"Entity type prefix (e.g. ''channel'', ''department''). Resolved to membership_type integer via memberships_module lookup. Use instead of membership_type for readability."},"obj_table_id":{"type":"string","format":"uuid","description":"UUID of the join table (alternative to obj_schema/obj_table)"},"obj_schema":{"type":"string","description":"Schema of the join table (or use obj_table_id)"},"obj_table":{"type":"string","description":"Name of the join table (or use obj_table_id)"},"obj_field_id":{"type":"string","format":"uuid","description":"UUID of field on join table (alternative to obj_field)"},"obj_field":{"type":"string","format":"column-ref","description":"Field name on join table to match against SPRT entity_id"},"permission":{"type":"string","description":"Single permission name to check (resolved to bitstring mask)"},"permissions":{"type":"array","items":{"type":"string"},"description":"Multiple permission names to check (ORed together into mask)"},"is_admin":{"type":"boolean","description":"If true, require is_admin flag"},"is_owner":{"type":"boolean","description":"If true, require is_owner flag"}},"required":["entity_field"]}' AS jsonb), CAST('{"membership","authz"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('AuthzRelatedMemberList', 'authz_related_member_list', 'authz', 'Related Member List', 'Array membership check in a related table.', '{"type":"object","properties":{"owned_schema":{"type":"string","description":"Schema of the related table"},"owned_table":{"type":"string","description":"Name of the related table"},"owned_table_key":{"type":"string","format":"column-ref","description":"Array column in related table"},"owned_table_ref_key":{"type":"string","format":"column-ref","description":"FK column in related table"},"this_object_key":{"type":"string","format":"column-ref","description":"PK column in protected table"}},"required":["owned_schema","owned_table","owned_table_key","owned_table_ref_key","this_object_key"]}'::jsonb, CAST('{"ownership","authz"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('AuthzRelatedPeerOwnership', 'authz_related_peer_ownership', 'authz', 'Related Peer Ownership', 'Peer visibility through shared entity membership via a related table. Like AuthzPeerOwnership but the owning user is resolved through a FK JOIN to a related table. Combines SPRT self-join with object table JOIN.', CAST('{"type":"object","properties":{"entity_field":{"type":"string","format":"column-ref","description":"Column name on protected table referencing the related table (e.g., message_id)"},"membership_type":{"type":["integer","string"],"description":"Scope: 1=app, 2=org, 3+=dynamic entity types (or string name resolved via membership_types_module)"},"entity_type":{"type":"string","description":"Entity type prefix (e.g. ''channel'', ''department''). Resolved to membership_type integer via memberships_module lookup. Use instead of membership_type for readability."},"obj_table_id":{"type":"string","format":"uuid","description":"UUID of the related table (alternative to obj_schema/obj_table)"},"obj_schema":{"type":"string","description":"Schema of the related table (or use obj_table_id)"},"obj_table":{"type":"string","description":"Name of the related table (or use obj_table_id)"},"obj_field_id":{"type":"string","format":"uuid","description":"UUID of field on related table containing the owner user ID (alternative to obj_field)"},"obj_field":{"type":"string","format":"column-ref","description":"Field name on related table containing the owner user ID (e.g., sender_id)"},"obj_ref_field":{"type":"string","format":"column-ref","description":"Field on related table to select for matching entity_field","default":"id"},"permission":{"type":"string","description":"Single permission name to check on the current user membership (resolved to bitstring mask)"},"permissions":{"type":"array","items":{"type":"string"},"description":"Multiple permission names to check on the current user membership (ORed together into mask)"},"is_admin":{"type":"boolean","description":"If true, require is_admin flag on current user membership"},"is_owner":{"type":"boolean","description":"If true, require is_owner flag on current user membership"}},"required":["entity_field"]}' AS jsonb), CAST('{"membership","peer","authz"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('AuthzTemporal', 'authz_temporal', 'authz', 'Temporal Access', 'Time-window based access control. Restricts access based on valid_from and/or valid_until timestamps. At least one of valid_from_field or valid_until_field must be provided.', CAST('{"type":"object","properties":{"valid_from_field":{"type":"string","format":"column-ref","description":"Column for start time (at least one of valid_from_field or valid_until_field required)"},"valid_until_field":{"type":"string","format":"column-ref","description":"Column for end time (at least one of valid_from_field or valid_until_field required)"},"valid_from_inclusive":{"type":"boolean","description":"Include start boundary","default":true},"valid_until_inclusive":{"type":"boolean","description":"Include end boundary","default":false}},"anyOf":[{"required":["valid_from_field"]},{"required":["valid_until_field"]}]}' AS jsonb), CAST('{"temporal","authz"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('CheckGreaterThan', 'check_greater_than', 'check', 'Check Greater Than', 'Adds a CHECK constraint that validates a column value is greater than a threshold (single-column: column > value) or that one column is greater than another (cross-column: columns[0] > columns[1]). Compiled via AST helpers.', CAST('{"type":"object","properties":{"column":{"type":"string","format":"column-ref","description":"Single column to compare against value (mutually exclusive with columns)"},"value":{"type":"number","description":"Threshold value for single-column comparison (column > value)","default":0},"columns":{"type":"array","items":{"type":"string","format":"column-ref"},"description":"Two columns for cross-column comparison (columns[0] > columns[1])","minItems":2,"maxItems":2}}}' AS jsonb), CAST('{"check","constraint","validation","comparison"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('CheckLessThan', 'check_less_than', 'check', 'Check Less Than', 'Adds a CHECK constraint that validates a column value is less than a threshold (single-column: column < value) or that one column is less than another (cross-column: columns[0] < columns[1]). Compiled via AST helpers.', CAST('{"type":"object","properties":{"column":{"type":"string","format":"column-ref","description":"Single column to compare against value (mutually exclusive with columns)"},"value":{"type":"number","description":"Threshold value for single-column comparison (column < value)"},"columns":{"type":"array","items":{"type":"string","format":"column-ref"},"description":"Two columns for cross-column comparison (columns[0] < columns[1])","minItems":2,"maxItems":2}}}' AS jsonb), CAST('{"check","constraint","validation","comparison"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('CheckNotEqual', 'check_not_equal', 'check', 'Check Not Equal', 'Adds a CHECK constraint that validates two columns are not equal (columns[0] != columns[1]). Useful for preventing self-referencing rows. Compiled via AST helpers.', '{"type":"object","properties":{"columns":{"type":"array","items":{"type":"string","format":"column-ref"},"description":"Two columns that must not be equal","minItems":2,"maxItems":2}},"required":["columns"]}'::jsonb, CAST('{"check","constraint","validation","inequality"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('CheckOneOf', 'check_one_of', 'check', 'Check One Of', 'Adds a CHECK constraint that validates a column value is one of an allowed set (e.g. tier IN (''free'', ''paid'', ''custom'')). Compiled to column = ANY(ARRAY[...]) via AST helpers.', '{"type":"object","properties":{"column":{"type":"string","format":"column-ref","description":"Column to validate against the allowed values"},"values":{"type":"array","items":{"type":"string"},"description":"Array of allowed values for the column"}},"required":["column","values"]}'::jsonb, CAST('{"check","constraint","validation","enum"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('DataArchivable', 'data_archivable', 'data', 'Archivable', 'Adds user-reversible archive support with is_archived boolean and archived_at timestamp, plus a partial index for efficient active-row queries.', '{"type":"object","properties":{"is_archived_field":{"type":"string","format":"column-ref","description":"Column name for the archive boolean flag","default":"is_archived"},"archived_at_field":{"type":"string","format":"column-ref","description":"Column name for the archive timestamp","default":"archived_at"},"include_id":{"type":"boolean","description":"If true, also adds a UUID primary key column with auto-generation","default":true}}}'::jsonb, CAST('{"schema"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('DataBulk', 'data_bulk', 'data', 'Bulk Operations', 'Enables bulk mutation smart tags on a table. When provisioned, adds @behavior tags for the selected bulk operations (insert, upsert, update, delete). Requires the graphile-bulk-mutations plugin.', CAST('{"type":"object","properties":{"insert":{"type":"boolean","description":"Enable bulk insert (+bulkInsert)","default":true},"upsert":{"type":"boolean","description":"Enable bulk upsert (+bulkUpsert)","default":false},"update":{"type":"boolean","description":"Enable bulk update (+bulkUpdate)","default":false},"delete":{"type":"boolean","description":"Enable bulk delete (+bulkDelete)","default":false}}}' AS jsonb), CAST('{"bulk","mutations","graphile"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('DataCompositeField', 'data_composite_field', 'data', 'Composite Field', 'Creates a derived text field that automatically concatenates multiple source fields via BEFORE INSERT/UPDATE triggers. Used to produce a unified text representation (e.g., embedding_text) from multiple columns on a table. The trigger fires with ''_000'' prefix to run before Search* triggers alphabetically.', CAST('{"type":"object","properties":{"target":{"type":"string","format":"column-ref","description":"Name of the derived text field to create","default":"embedding_text"},"source_fields":{"type":"array","items":{"type":"string","format":"column-ref"},"description":"Array of source field names to concatenate into the target field"},"format":{"type":"string","enum":["labeled","plain"],"description":"Output format: ''labeled'' (field_name: value) or ''plain'' (values only)","default":"labeled"}},"required":["source_fields"]}' AS jsonb), CAST('{"transform","behavior"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('DataDirectOwner', 'data_direct_owner', 'data', 'Ownership', 'Adds ownership column for direct user ownership. Enables AuthzDirectOwner authorization.', '{"type":"object","properties":{"owner_field_name":{"type":"string","format":"column-ref","description":"Column name for owner ID","default":"owner_id"},"include_id":{"type":"boolean","description":"If true, also adds a UUID primary key column with auto-generation","default":true},"include_user_fk":{"type":"boolean","description":"If true, adds a foreign key constraint from owner_id to the users table","default":true},"create_index":{"type":"boolean","description":"If true, creates a B-tree index on the owner column","default":true}}}'::jsonb, CAST('{"ownership","schema"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('DataEntityMembership', 'data_entity_membership', 'data', 'Entity Membership', 'Adds entity reference for organization/group scoping. Enables AuthzEntityMembership, AuthzMembership, AuthzOrgHierarchy authorization.', '{"type":"object","properties":{"entity_field_name":{"type":"string","format":"column-ref","description":"Column name for entity ID","default":"entity_id"},"include_id":{"type":"boolean","description":"If true, also adds a UUID primary key column with auto-generation","default":true},"include_user_fk":{"type":"boolean","description":"If true, adds a foreign key constraint from entity_id to the users table","default":true},"create_index":{"type":"boolean","description":"If true, creates a B-tree index on the entity column","default":true}}}'::jsonb, CAST('{"membership","schema"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('DataForceCurrentUser', 'data_force_current_user', 'data', 'Force Current User', 'BEFORE INSERT trigger that forces a field to the value of jwt_public.current_user_id(). Prevents clients from spoofing the actor/uploader identity. The field value is always overwritten regardless of what the client provides.', CAST('{"type":"object","properties":{"field_name":{"type":"string","format":"column-ref","description":"Name of the field to force to current_user_id()","default":"actor_id"}}}' AS jsonb), CAST('{"trigger","security","schema"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('DataI18n', 'data_i18n', 'data', 'Internationalization', 'Creates a companion _translations table with lang_code + translatable fields. Copies SELECT policies and column-ref fields from the base table. Adds @i18n smart comment so the Graphile i18n plugin discovers it. Requires i18n_module to be provisioned for the database.', CAST('{"type":"object","properties":{"fields":{"type":"array","items":{"type":"string","format":"column-ref"},"description":"Field names on the base table to make translatable. Each field is duplicated on the translation table with the same type."},"table_suffix":{"type":"string","description":"Suffix for the translation table name","default":"_translations"},"lang_code_type":{"type":"string","enum":["citext","text"],"description":"Type for the lang_code column","default":"citext"},"copy_mutation_policies":{"type":"boolean","description":"Whether to also copy INSERT/UPDATE/DELETE policies (not just SELECT). Default true — translations should be editable by the same users who can edit the base row.","default":true},"search":{"type":"object","description":"SearchFullText configuration for the translations table. When provided, creates a tsvector column on the translations table with lang_column=lang_code for dynamic per-row language stemming.","properties":{"field_name":{"type":"string","format":"column-ref","description":"Name of the tsvector column on the translations table","default":"search"},"source_fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","format":"column-ref","description":"Name of the translatable source column"},"weight":{"type":"string","enum":["A","B","C","D"],"description":"tsvector weight class (A=highest, D=lowest)","default":"D"}},"required":["field"]},"description":"Translatable columns that feed the tsvector. Language is determined dynamically from the lang_code column of each row."},"search_score_weight":{"type":"number","description":"Weight for this algorithm in composite searchScore","default":1}},"required":["source_fields"]}},"required":["fields"]}' AS jsonb), CAST('{"i18n","translation","schema"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('DataId', 'data_id', 'data', 'Primary Key ID', 'Adds a UUID primary key column with auto-generation default (uuidv7). This is the standard primary key pattern for all tables.', '{"type":"object","properties":{"field_name":{"type":"string","format":"column-ref","description":"Column name for the primary key","default":"id"}}}'::jsonb, CAST('{"primary_key","schema"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('DataImmutableFields', 'data_immutable_fields', 'data', 'Immutable Fields', 'BEFORE UPDATE trigger that prevents changes to a list of specified fields after INSERT. Raises an exception if any of the listed fields have changed. Unlike FieldImmutable (single-field), this handles multiple fields in a single trigger for efficiency.', CAST(E'{"type":"object","properties":{"fields":{"type":"array","items":{"type":"string","format":"column-ref"},"description":"Field names that cannot be modified after INSERT (e.g. [\\"key\\", \\"bucket_id\\", \\"owner_id\\"])"}},"required":["fields"]}' AS jsonb), CAST('{"trigger","constraint","schema"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('DataInflection', 'data_inflection', 'data', 'Inflection', 'Transforms field values using inflection operations (snake_case, camelCase, slugify, plural, singular, etc). Attaches BEFORE INSERT and BEFORE UPDATE triggers. References fields by name in data jsonb.', '{"type":"object","properties":{"field_name":{"type":"string","format":"column-ref","description":"Name of the field to transform"},"ops":{"type":"array","items":{"type":"string","enum":["plural","singular","camel","pascal","dashed","slugify","underscore","lower","upper"]},"description":"Inflection operations to apply in order"}},"required":["field_name","ops"]}'::jsonb, CAST('{"transform","behavior"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('DataInheritFromParent', 'data_inherit_from_parent', 'data', 'Inherit From Parent', 'BEFORE INSERT trigger that copies specified fields from a parent table via a foreign key. The parent row is looked up through RLS (SECURITY INVOKER), so the insert fails if the caller cannot see the parent. Used by the storage module to inherit owner_id and is_public from buckets to files.', CAST(E'{"type":"object","properties":{"parent_fk_field":{"type":"string","format":"column-ref","description":"Name of the FK field on this table that references the parent (e.g. bucket_id)"},"fields":{"type":"array","items":{"type":"string","format":"column-ref"},"description":"Field names to copy from the parent row (e.g. [\\"owner_id\\", \\"is_public\\"])"},"parent_table":{"type":"string","description":"Parent table name (optional fallback if FK not yet registered in metaschema)"},"parent_schema":{"type":"string","description":"Parent table schema (optional, defaults to same schema as child table)"}},"required":["parent_fk_field","fields"]}' AS jsonb), CAST('{"trigger","inheritance","schema"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('DataJsonb', 'data_jsonb', 'data', 'JSONB Field', 'Adds a JSONB column with optional GIN index for containment queries (@>, ?, ?|, ?&). Standard pattern for semi-structured metadata.', '{"type":"object","properties":{"field_name":{"type":"string","format":"column-ref","description":"Column name for the JSONB field","default":"metadata"},"default_value":{"type":"object","description":"Default value as a FieldDefault object","default":{"value":{},"cast":{"name":"jsonb"}}},"is_required":{"type":"boolean","description":"Whether the column has a NOT NULL constraint","default":false},"create_index":{"type":"boolean","description":"Whether to create a GIN index","default":true}}}'::jsonb, CAST('{"jsonb","schema"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('DataMemberOwner', 'data_member_owner', 'data', 'Member Owner', 'Adds owner_id and entity_id columns with a compound AuthzMemberOwner policy. The actor must own the row (owner_id = current_user_id()) AND be a member of the entity (entity_id in SPRT). Use for private data within an entity scope — e.g., personal chat threads that belong to the company but only the author can see.', '{"type":"object","properties":{"owner_field_name":{"type":"string","format":"column-ref","description":"Column name for the owner reference","default":"owner_id"},"entity_field_name":{"type":"string","format":"column-ref","description":"Column name for the entity reference","default":"entity_id"},"include_id":{"type":"boolean","description":"If true, also adds a UUID primary key column with auto-generation","default":true},"include_user_fk":{"type":"boolean","description":"If true, adds foreign key constraints from owner_id and entity_id to the users table","default":true},"create_index":{"type":"boolean","description":"If true, creates B-tree indexes on the owner and entity columns","default":true},"membership_type":{"type":"integer","description":"Membership type for SPRT resolution. Required for entity-scoped provisioning.","default":null}}}'::jsonb, CAST('{"ownership","membership","security","schema"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('DataOwnedFields', 'data_owned_fields', 'data', 'Owned Fields', 'Restricts which user can modify specific columns in shared objects. Creates an AFTER UPDATE trigger that throws OWNED_PROPS when a non-owner tries to change protected fields. References fields by name in data jsonb.', CAST('{"type":"object","properties":{"role_key_field_name":{"type":"string","format":"column-ref","description":"Name of the field identifying the owner (e.g. sender_id)"},"protected_field_names":{"type":"array","items":{"type":"string","format":"column-ref"},"description":"Names of fields only this owner can modify"}},"required":["role_key_field_name","protected_field_names"]}' AS jsonb), CAST('{"ownership","constraint","behavior"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('DataOwnershipInEntity', 'data_ownership_in_entity', 'data', 'Ownership In Entity', 'Combines direct ownership with entity scoping. Adds both owner_id and entity_id columns. Enables AuthzDirectOwner, AuthzEntityMembership, and AuthzOrgHierarchy authorization. Particularly useful for OrgHierarchy where a user owns a row (owner_id) within an entity (entity_id), and managers above can see subordinate-owned records via the hierarchy closure table.', '{"type":"object","properties":{"owner_field_name":{"type":"string","format":"column-ref","description":"Column name for the owner reference","default":"owner_id"},"entity_field_name":{"type":"string","format":"column-ref","description":"Column name for the entity reference","default":"entity_id"},"include_id":{"type":"boolean","description":"If true, also adds a UUID primary key column with auto-generation","default":true},"include_user_fk":{"type":"boolean","description":"If true, adds foreign key constraints from owner_id and entity_id to the users table","default":true},"create_index":{"type":"boolean","description":"If true, creates B-tree indexes on the owner and entity columns","default":true}}}'::jsonb, CAST('{"ownership","membership","hierarchy","schema"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('DataPeoplestamps', 'data_peoplestamps', 'data', 'Peoplestamps', 'Adds user tracking for creates/updates with created_by and updated_by columns.', '{"type":"object","properties":{"created_by_field":{"type":"string","format":"column-ref","description":"Column name for the creating user reference","default":"created_by"},"updated_by_field":{"type":"string","format":"column-ref","description":"Column name for the last-updating user reference","default":"updated_by"},"include_id":{"type":"boolean","description":"If true, also adds a UUID primary key column with auto-generation","default":true},"include_user_fk":{"type":"boolean","description":"If true, adds foreign key constraints from created_by and updated_by to the users table","default":false},"create_index":{"type":"boolean","description":"If true, creates B-tree indexes on the peoplestamp columns","default":true}}}'::jsonb, CAST('{"timestamps","schema"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('DataPublishable', 'data_publishable', 'data', 'Publishable', 'Adds publish state columns (is_published, published_at) for content visibility. Enables AuthzPublishable and AuthzTemporal authorization.', '{"type":"object","properties":{"is_published_field_name":{"type":"string","format":"column-ref","description":"Column name for the published boolean flag","default":"is_published"},"published_at_field_name":{"type":"string","format":"column-ref","description":"Column name for the publish timestamp","default":"published_at"},"include_id":{"type":"boolean","description":"If true, also adds a UUID primary key column with auto-generation","default":true}}}'::jsonb, CAST('{"publishing","temporal","schema"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('DataRealtime', 'data_realtime', 'data', 'Realtime Subscriptions', 'Creates per-table subscriber tables in subscriptions_public with RLS policies derived from source table SELECT policies. Attaches statement-level triggers to emit changes to subscribers.', CAST('{"type":"object","properties":{"operations":{"type":"array","items":{"type":"string","enum":["INSERT","UPDATE","DELETE"]},"description":"Which DML operations to track with emit_change triggers","default":["INSERT","UPDATE","DELETE"]},"subscriber_table_name":{"type":"string","description":"Custom name for the subscriber table (defaults to {source_table}_subscriber)"}}}' AS jsonb), CAST('{"realtime","subscriptions","triggers"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('DataSlug', 'data_slug', 'data', 'Slug', 'Auto-generates URL-friendly slugs from field values on insert/update. Attaches BEFORE INSERT and BEFORE UPDATE triggers that call inflection.slugify() on the target field. References fields by name in data jsonb.', CAST('{"type":"object","properties":{"field_name":{"type":"string","format":"column-ref","description":"Name of the field to slugify","default":"slug"},"source_field_name":{"type":"string","format":"column-ref","description":"Optional source field name (defaults to field_name)"}},"required":[]}' AS jsonb), CAST('{"transform","behavior"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('DataSoftDelete', 'data_soft_delete', 'data', 'Soft Delete', 'Adds soft delete support with deleted_at and is_deleted columns.', '{"type":"object","properties":{"deleted_at_field":{"type":"string","format":"column-ref","description":"Column name for the soft-delete timestamp","default":"deleted_at"},"is_deleted_field":{"type":"string","format":"column-ref","description":"Column name for the soft-delete boolean flag","default":"is_deleted"},"include_id":{"type":"boolean","description":"If true, also adds a UUID primary key column with auto-generation","default":true}}}'::jsonb, CAST('{"schema"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('DataStatusField', 'data_status_field', 'data', 'Status Field', 'Adds a status column with B-tree index for efficient equality filtering and sorting. Optionally constrains values via CHECK constraint when allowed_values is provided.', CAST('{"type":"object","properties":{"field_name":{"type":"string","format":"column-ref","description":"Column name for the status field","default":"status"},"type":{"type":"object","description":"Column type as a FieldType object","default":{"name":"text"}},"default_value":{"type":"string","description":"Default value expression (e.g., active)"},"is_required":{"type":"boolean","description":"Whether the column has a NOT NULL constraint","default":true},"allowed_values":{"type":"array","items":{"type":"string"},"description":"If provided, creates a CHECK constraint restricting the column to these values"}}}' AS jsonb), CAST('{"status","schema"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('DataTags', 'data_tags', 'data', 'Tags', 'Adds a citext[] tags column with GIN index for efficient array containment queries (@>, &&). Standard tagging pattern for categorization and filtering.', '{"type":"object","properties":{"field_name":{"type":"string","format":"column-ref","description":"Column name for the tags array","default":"tags"},"default_value":{"type":"object","description":"Default value as a FieldDefault object","default":{"value":[],"cast":{"name":"citext","array_dimensions":1}}},"is_required":{"type":"boolean","description":"Whether the column has a NOT NULL constraint","default":false}}}'::jsonb, CAST('{"tags","schema"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('DataTimestamps', 'data_timestamps', 'data', 'Timestamps', 'Adds automatic timestamp tracking with created_at and updated_at columns.', '{"type":"object","properties":{"created_at_field":{"type":"string","format":"column-ref","description":"Column name for the creation timestamp","default":"created_at"},"updated_at_field":{"type":"string","format":"column-ref","description":"Column name for the last-updated timestamp","default":"updated_at"},"include_id":{"type":"boolean","description":"If true, also adds a UUID primary key column with auto-generation","default":true}}}'::jsonb, CAST('{"timestamps","schema"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('EventReferral', 'event_referral', 'event', 'Event Referral', 'Creates triggers that record events for the referrer (inviter) when their invitees perform actions on a watched table. Resolves the referrer automatically via the invites module''s claimed_invites table using the membership_type context. Supports the same compound condition system as EventTracker. Use with achievements to unlock levels and grant credits based on invitee activity.', CAST(E'{"type":"object","$defs":{"triggerCondition":{"type":"object","description":"A leaf condition ({field, op, value?, row?, ref?}) or a combinator ({AND, OR, NOT}).","properties":{"field":{"type":"string","format":"column-ref","description":"Column name (validated against the table)."},"op":{"type":"string","enum":["=","!=",">","<",">=","<=","LIKE","NOT LIKE","IS NULL","IS NOT NULL","IS DISTINCT FROM"],"description":"Comparison operator."},"value":{"description":"Comparison value. Type is resolved from the column definition. Omit for IS NULL, IS NOT NULL, IS DISTINCT FROM."},"row":{"type":"string","enum":["NEW","OLD"],"default":"NEW","description":"Row reference (default: NEW)."},"ref":{"type":"object","description":"Column reference for field-to-field comparison (alternative to value).","properties":{"field":{"type":"string","format":"column-ref"},"row":{"type":"string","enum":["NEW","OLD"],"default":"NEW"}}},"AND":{"type":"array","description":"Array of conditions combined with AND.","items":{"$ref":"#/$defs/triggerCondition"}},"OR":{"type":"array","description":"Array of conditions combined with OR.","items":{"$ref":"#/$defs/triggerCondition"}},"NOT":{"$ref":"#/$defs/triggerCondition","description":"Negated condition."}}}},"properties":{"event_name":{"type":"string","description":"Event type name to record for the referrer (e.g., \\"invitee_uploaded_avatar\\", \\"invitee_completed_onboarding\\")"},"events":{"type":"array","items":{"type":"string","enum":["INSERT","UPDATE","DELETE"]},"description":"DML events that trigger recording","default":["INSERT"]},"actor_field":{"type":"string","format":"column-ref","description":"Column containing the invitee (actor) ID on the source table — used to look up the referrer via claimed_invites.receiver_id","default":"owner_id"},"entity_field":{"type":"string","format":"column-ref","description":"Column containing the entity ID (org/group) for entity-scoped referral events. For FK lookups (e.g., channel_id → channels.entity_id), combine with entity_lookup. Omit for user-only events."},"entity_lookup":{"type":"object","description":"FK lookup configuration for resolving entity_id through a related table. Used when entity_field is a FK (e.g., channel_id) rather than a direct entity_id. The generator validates all fields against metaschema within the same database_id.","properties":{"obj_table":{"type":"string","description":"Name of the related table to look up entity_id from (e.g., \\"channels\\"). Required."},"obj_schema":{"type":"string","description":"Schema of the related table (user-facing name, e.g., \\"public\\"). Optional — if omitted, resolved by table name within the same database_id (raises error if ambiguous)."},"obj_field":{"type":"string","description":"Column on the related table that holds the entity_id (e.g., \\"entity_id\\"). Required."}},"required":["obj_table","obj_field"]},"max_depth":{"type":"integer","description":"Maximum depth to walk up the invite chain. Default 1 (direct inviter only). Set 2–10 to enable multi-level referral rewards. App-level only — must not be combined with entity_field.","default":1,"minimum":1,"maximum":10},"auto_register_type":{"type":"boolean","description":"Automatically register the event_name in event_types during provisioning","default":true},"condition_field":{"type":"string","format":"column-ref","description":"Column name for conditional WHEN clause (fires only when field equals condition_value)"},"condition_value":{"type":"string","description":"Value to compare against condition_field in WHEN clause"},"conditions":{"description":"Compound conditions for the trigger WHEN clause. Accepts a single leaf condition, an array of conditions (implicitly AND), or a nested combinator tree ({AND: [...], OR: [...], NOT: {...}}). Each leaf is {field, op, value?, row?, ref?}. Column types are resolved automatically from the table schema. Cannot be combined with condition_field or watch_fields.","x-codegen-type":"TriggerCondition | TriggerCondition[]","oneOf":[{"$ref":"#/$defs/triggerCondition"},{"type":"array","items":{"$ref":"#/$defs/triggerCondition"}}]},"watch_fields":{"type":"array","items":{"type":"string","format":"column-ref"},"description":"For UPDATE triggers, only fire when these fields change (uses DISTINCT FROM)"}},"required":["event_name"]}' AS jsonb), CAST('{"events","referral","invites","analytics","tracking"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('EventTracker', 'event_tracker', 'event', 'Event Tracker', 'Creates triggers that record events via the events module when table rows change. Supports the same compound condition system as JobTrigger (condition_field, watch_fields, or full AND/OR/NOT conditions). Events are recorded to app_events and aggregated automatically. Use with achievements (blueprint-level) to unlock levels and grant credits based on event accumulation.', CAST(E'{"type":"object","$defs":{"triggerCondition":{"type":"object","description":"A leaf condition ({field, op, value?, row?, ref?}) or a combinator ({AND, OR, NOT}).","properties":{"field":{"type":"string","format":"column-ref","description":"Column name (validated against the table)."},"op":{"type":"string","enum":["=","!=",">","<",">=","<=","LIKE","NOT LIKE","IS NULL","IS NOT NULL","IS DISTINCT FROM"],"description":"Comparison operator."},"value":{"description":"Comparison value. Type is resolved from the column definition. Omit for IS NULL, IS NOT NULL, IS DISTINCT FROM."},"row":{"type":"string","enum":["NEW","OLD"],"default":"NEW","description":"Row reference (default: NEW)."},"ref":{"type":"object","description":"Column reference for field-to-field comparison (alternative to value).","properties":{"field":{"type":"string","format":"column-ref"},"row":{"type":"string","enum":["NEW","OLD"],"default":"NEW"}}},"AND":{"type":"array","description":"Array of conditions combined with AND.","items":{"$ref":"#/$defs/triggerCondition"}},"OR":{"type":"array","description":"Array of conditions combined with OR.","items":{"$ref":"#/$defs/triggerCondition"}},"NOT":{"$ref":"#/$defs/triggerCondition","description":"Negated condition."}}}},"properties":{"event_name":{"type":"string","description":"Event type name to record (e.g., \\"avatar_uploaded\\", \\"order_completed\\")"},"events":{"type":"array","items":{"type":"string","enum":["INSERT","UPDATE","DELETE"]},"description":"DML events that trigger recording","default":["INSERT"]},"count":{"type":"integer","description":"Number of events to record per trigger fire","default":1},"toggle":{"type":"boolean","description":"Toggle mode: records event when condition is met, removes when condition is unmet","default":false},"actor_field":{"type":"string","format":"column-ref","description":"Column containing the actor (user) ID to attribute the event to","default":"owner_id"},"entity_field":{"type":"string","format":"column-ref","description":"Column containing the entity ID (org/group) for entity-scoped events. For FK lookups (e.g., channel_id → channels.entity_id), combine with entity_lookup. Omit for user-only events."},"entity_lookup":{"type":"object","description":"FK lookup configuration for resolving entity_id through a related table. Used when entity_field is a FK (e.g., channel_id) rather than a direct entity_id. The generator validates all fields against metaschema within the same database_id.","properties":{"obj_table":{"type":"string","description":"Name of the related table to look up entity_id from (e.g., \\"channels\\"). Required."},"obj_schema":{"type":"string","description":"Schema of the related table (user-facing name, e.g., \\"public\\"). Optional — if omitted, resolved by table name within the same database_id (raises error if ambiguous)."},"obj_field":{"type":"string","description":"Column on the related table that holds the entity_id (e.g., \\"entity_id\\"). Required."}},"required":["obj_table","obj_field"]},"auto_register_type":{"type":"boolean","description":"Automatically register the event_name in event_types during provisioning","default":true},"condition_field":{"type":"string","format":"column-ref","description":"Column name for conditional WHEN clause (fires only when field equals condition_value)"},"condition_value":{"type":"string","description":"Value to compare against condition_field in WHEN clause"},"conditions":{"description":"Compound conditions for the trigger WHEN clause. Accepts a single leaf condition, an array of conditions (implicitly AND), or a nested combinator tree ({AND: [...], OR: [...], NOT: {...}}). Each leaf is {field, op, value?, row?, ref?}. Column types are resolved automatically from the table schema. Cannot be combined with condition_field or watch_fields.","x-codegen-type":"TriggerCondition | TriggerCondition[]","oneOf":[{"$ref":"#/$defs/triggerCondition"},{"type":"array","items":{"$ref":"#/$defs/triggerCondition"}}]},"watch_fields":{"type":"array","items":{"type":"string","format":"column-ref"},"description":"For UPDATE triggers, only fire when these fields change (uses DISTINCT FROM)"}},"required":["event_name"]}' AS jsonb), CAST('{"events","triggers","analytics","tracking"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('JobTrigger', 'data_job_trigger', 'job', 'Job Trigger', 'Dynamically creates PostgreSQL triggers that enqueue jobs via app_jobs.add_job() when table rows are inserted, updated, or deleted. Supports configurable payload strategies (full row, row ID, selected fields, or custom mapping), conditional firing via WHEN clauses, watched field changes, and extended job options (queue, priority, delay, max attempts).', CAST(E'{"type":"object","$defs":{"triggerCondition":{"type":"object","description":"A leaf condition ({field, op, value?, row?, ref?}) or a combinator ({AND, OR, NOT}).","properties":{"field":{"type":"string","format":"column-ref","description":"Column name (validated against the table)."},"op":{"type":"string","enum":["=","!=",">","<",">=","<=","LIKE","NOT LIKE","IS NULL","IS NOT NULL","IS DISTINCT FROM"],"description":"Comparison operator."},"value":{"description":"Comparison value. Type is resolved from the column definition. Omit for IS NULL, IS NOT NULL, IS DISTINCT FROM."},"row":{"type":"string","enum":["NEW","OLD"],"default":"NEW","description":"Row reference (default: NEW)."},"ref":{"type":"object","description":"Column reference for field-to-field comparison (alternative to value).","properties":{"field":{"type":"string","format":"column-ref"},"row":{"type":"string","enum":["NEW","OLD"],"default":"NEW"}}},"AND":{"type":"array","description":"Array of conditions combined with AND.","items":{"$ref":"#/$defs/triggerCondition"}},"OR":{"type":"array","description":"Array of conditions combined with OR.","items":{"$ref":"#/$defs/triggerCondition"}},"NOT":{"$ref":"#/$defs/triggerCondition","description":"Negated condition."}}}},"properties":{"task_identifier":{"type":"string","format":"function-ref","description":"Job task identifier passed to add_job (e.g., process_invoice, sync_to_stripe). Must match a registered function definition when function_module is installed."},"payload_strategy":{"type":"string","enum":["row","row_id","fields","custom"],"description":"How to build the job payload: row (full NEW/OLD), row_id (just id), fields (selected columns), custom (mapped columns)","default":"row_id"},"payload_fields":{"type":"array","items":{"type":"string","format":"column-ref"},"description":"Column names to include in payload (only for fields strategy)"},"payload_custom":{"type":"object","additionalProperties":{"type":"string","format":"column-ref"},"description":"Key-to-column mapping for custom payload (e.g., {\\"invoice_id\\": \\"id\\", \\"total\\": \\"amount\\"})"},"events":{"type":"array","items":{"type":"string","enum":["INSERT","UPDATE","DELETE"]},"description":"Trigger events to create","default":["INSERT","UPDATE"]},"include_old":{"type":"boolean","description":"Include OLD row in payload (for UPDATE triggers)","default":false},"include_meta":{"type":"boolean","description":"Include table/schema metadata in payload","default":false},"condition_field":{"type":"string","format":"column-ref","description":"Column name for conditional WHEN clause (fires only when field equals condition_value)"},"condition_value":{"type":"string","description":"Value to compare against condition_field in WHEN clause"},"conditions":{"description":"Compound conditions for the trigger WHEN clause. Accepts a single leaf condition, an array of conditions (implicitly AND), or a nested combinator tree ({AND: [...], OR: [...], NOT: {...}}). Each leaf is {field, op, value?, row?, ref?}. Column types are resolved automatically from the table schema. Cannot be combined with condition_field or watch_fields.","x-codegen-type":"TriggerCondition | TriggerCondition[]","oneOf":[{"$ref":"#/$defs/triggerCondition"},{"type":"array","items":{"$ref":"#/$defs/triggerCondition"}}]},"watch_fields":{"type":"array","items":{"type":"string","format":"column-ref"},"description":"For UPDATE triggers, only fire when these fields change (uses DISTINCT FROM)"},"entity_field":{"type":"string","format":"column-ref","description":"Column on the trigger table that holds (or references) the entity_id for billing scope. For direct entity_id columns, just set this field. For FK lookups (e.g., channel_id → channels.entity_id), combine with entity_lookup."},"entity_lookup":{"type":"object","description":"FK lookup configuration for resolving entity_id through a related table. Used when entity_field is a FK (e.g., channel_id) rather than a direct entity_id. The generator validates all fields against metaschema within the same database_id.","properties":{"obj_table":{"type":"string","description":"Name of the related table to look up entity_id from (e.g., \\"channels\\"). Required."},"obj_schema":{"type":"string","description":"Schema of the related table (user-facing name, e.g., \\"public\\"). Optional — if omitted, resolved by table name within the same database_id (raises error if ambiguous)."},"obj_field":{"type":"string","format":"column-ref","description":"Column on the related table that holds the entity_id (e.g., \\"entity_id\\"). Required."}},"required":["obj_table","obj_field"]},"job_key":{"type":"string","description":"Static job key for upsert semantics (prevents duplicate jobs)"},"queue_name":{"type":"string","description":"Job queue name for routing to specific workers"},"priority":{"type":"integer","description":"Job priority (lower = higher priority)","default":0},"run_at_delay":{"type":"string","description":"Delay before job runs as PostgreSQL interval (e.g., 30 seconds, 5 minutes)"},"max_attempts":{"type":"integer","description":"Maximum retry attempts for the job","default":25}},"required":["task_identifier"]}' AS jsonb), CAST('{"jobs","triggers","async"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('LimitEnforceAggregate', 'limit_enforce_aggregate', 'limit_enforce', 'Enforce Aggregate Counter', 'Declaratively attaches aggregate limit-tracking triggers to a table. On INSERT the named limit is incremented per entity; on DELETE it is decremented. Uses org_limit_aggregates_inc/dec for per-entity (org-level) aggregate limits rather than per-user limits. Requires a provisioned limits_module for the target database.', CAST(E'{"type":"object","properties":{"limit_name":{"type":"string","description":"Name of the aggregate limit to track (must match a default_limits entry, e.g. \\"databases\\", \\"members\\")"},"scope":{"type":"string","description":"Membership type prefix that determines which limits_module row to use. Resolved dynamically via memberships_module — supports any provisioned type (e.g. \\"org\\", \\"data_room\\", \\"channel\\", \\"team\\").","default":"org"},"entity_field":{"type":"string","format":"column-ref","description":"Column on the target table that holds (or references) the entity id for aggregate limit lookup. For direct entity_id columns, just set this field. For FK lookups (e.g., channel_id → channels.entity_id), combine with entity_lookup.","default":"entity_id"},"entity_lookup":{"type":"object","description":"FK lookup configuration for resolving entity_id through a related table. Used when entity_field is a FK (e.g., channel_id) rather than a direct entity_id. The generator validates all fields against metaschema within the same database_id.","properties":{"obj_table":{"type":"string","description":"Name of the related table to look up entity_id from (e.g., \\"channels\\"). Required."},"obj_schema":{"type":"string","description":"Schema of the related table (user-facing name, e.g., \\"public\\"). Optional — if omitted, resolved by table name within the same database_id (raises error if ambiguous)."},"obj_field":{"type":"string","description":"Column on the related table that holds the entity_id (e.g., \\"entity_id\\"). Required."}},"required":["obj_table","obj_field"]},"events":{"type":"array","items":{"type":"string","enum":["INSERT","DELETE","UPDATE"]},"description":"Which DML events to attach triggers for","default":["INSERT","DELETE"]}},"required":["limit_name"]}' AS jsonb), CAST('{"limits","triggers","aggregates","enforce"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('LimitEnforceCounter', 'limit_enforce_counter', 'limit_enforce', 'Enforce Counter', 'Declaratively attaches limit-tracking triggers to a table. On INSERT the named limit is incremented; on DELETE it is decremented. Requires a provisioned limits_module for the target scope.', CAST(E'{"type":"object","properties":{"limit_name":{"type":"string","description":"Name of the limit to track (must match a default_limits entry, e.g. \\"projects\\", \\"members\\")"},"scope":{"type":"string","description":"Membership type prefix that determines which limits_module row to use. Resolved dynamically via memberships_module — supports any provisioned type (e.g. \\"app\\", \\"org\\", \\"data_room\\", \\"channel\\", \\"team\\").","default":"app"},"actor_field":{"type":"string","format":"column-ref","description":"Column on the target table that holds the actor or entity id used for limit lookup","default":"owner_id"},"entity_field":{"type":"string","format":"column-ref","description":"Column on the target table that holds (or references) the entity id for entity context resolution. For direct entity_id columns, just set this field. For FK lookups (e.g., channel_id → channels.entity_id), combine with entity_lookup."},"entity_lookup":{"type":"object","description":"FK lookup configuration for resolving entity_id through a related table. Used when entity_field is a FK (e.g., channel_id) rather than a direct entity_id. The generator validates all fields against metaschema within the same database_id.","properties":{"obj_table":{"type":"string","description":"Name of the related table to look up entity_id from (e.g., \\"channels\\"). Required."},"obj_schema":{"type":"string","description":"Schema of the related table (user-facing name, e.g., \\"public\\"). Optional — if omitted, resolved by table name within the same database_id (raises error if ambiguous)."},"obj_field":{"type":"string","description":"Column on the related table that holds the entity_id (e.g., \\"entity_id\\"). Required."}},"required":["obj_table","obj_field"]},"events":{"type":"array","items":{"type":"string","enum":["INSERT","DELETE","UPDATE"]},"description":"Which DML events to attach triggers for","default":["INSERT","DELETE"]}},"required":["limit_name"]}' AS jsonb), CAST('{"limits","triggers","enforce"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('LimitEnforceFeature', 'limit_enforce_feature', 'limit_enforce', 'Enforce Feature Flag', 'Gates a table behind a feature flag backed by the cap tables. Attaches a BEFORE INSERT trigger that checks whether the named feature cap value is > 0. Features are modeled as caps with max=0 (disabled) or max=1 (enabled) in limit_caps / limit_caps_defaults tables. Resolution: COALESCE(per-entity cap, scope default, 0).', CAST(E'{"type":"object","properties":{"feature_name":{"type":"string","description":"Cap name representing this feature (must match a limit_caps_defaults entry with max=0 or max=1)"},"scope":{"type":"string","description":"Membership type prefix that determines which limits_module row to use. Resolved dynamically via memberships_module — supports any provisioned type (e.g. \\"app\\", \\"org\\", \\"data_room\\", \\"channel\\", \\"team\\").","default":"app"},"entity_field":{"type":"string","format":"column-ref","description":"Column on the target table that holds (or references) the entity id for per-entity cap lookups (only used for org scope). For FK lookups (e.g., channel_id → channels.entity_id), combine with entity_lookup.","default":"entity_id"},"entity_lookup":{"type":"object","description":"FK lookup configuration for resolving entity_id through a related table. Used when entity_field is a FK (e.g., channel_id) rather than a direct entity_id. The generator validates all fields against metaschema within the same database_id.","properties":{"obj_table":{"type":"string","description":"Name of the related table to look up entity_id from (e.g., \\"channels\\"). Required."},"obj_schema":{"type":"string","description":"Schema of the related table (user-facing name, e.g., \\"public\\"). Optional — if omitted, resolved by table name within the same database_id (raises error if ambiguous)."},"obj_field":{"type":"string","description":"Column on the related table that holds the entity_id (e.g., \\"entity_id\\"). Required."}},"required":["obj_table","obj_field"]}},"required":["feature_name"]}' AS jsonb), CAST('{"limits","triggers","feature-flags","enforce","caps"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('LimitEnforceRate', 'limit_enforce_rate', 'limit_enforce', 'Enforce Rate Limit', 'Attaches a BEFORE trigger that calls check_rate_limit() to enforce sliding-window rate limits before allowing mutations. The function checks all three scopes (entity, actor-in-entity, actor) in a single call; which scopes are actually enforced is controlled by what rows exist in rate_window_limits (plan-based config). Requires a provisioned meter_rate_limits_module and billing_module for the target database.', CAST(E'{"type":"object","properties":{"meter_slug":{"type":"string","description":"Slug of the billing meter to check rate limits against (must match a meters table entry, e.g. \\"messaging\\", \\"inference\\")"},"entity_field":{"type":"string","format":"column-ref","description":"Column on the target table that holds (or references) the entity id for rate limiting. For direct entity_id columns, just set this field. For FK lookups (e.g., channel_id → channels.entity_id), combine with entity_lookup.","default":"entity_id"},"entity_lookup":{"type":"object","description":"FK lookup configuration for resolving entity_id through a related table. Used when entity_field is a FK (e.g., channel_id) rather than a direct entity_id. The generator validates all fields against metaschema within the same database_id.","properties":{"obj_table":{"type":"string","description":"Name of the related table to look up entity_id from (e.g., \\"channels\\"). Required."},"obj_schema":{"type":"string","description":"Schema of the related table (user-facing name, e.g., \\"public\\"). Optional — if omitted, resolved by table name within the same database_id (raises error if ambiguous)."},"obj_field":{"type":"string","description":"Column on the related table that holds the entity_id (e.g., \\"entity_id\\"). Required."}},"required":["obj_table","obj_field"]},"actor_field":{"type":"string","format":"column-ref","description":"Column on the target table that holds the actor id (user) for rate limiting","default":"owner_id"},"events":{"type":"array","items":{"type":"string","enum":["INSERT","UPDATE"]},"description":"Which DML events to enforce rate limits on (DELETE is excluded since it reduces load)","default":["INSERT"]}},"required":["meter_slug"]}' AS jsonb), CAST('{"rate-limits","triggers","enforce","metering","abuse-protection"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('LimitTrackUsage', 'limit_track_usage', 'limit_track', 'Track Usage', 'Declaratively attaches billing usage-recording triggers to a table. On INSERT the named meter is incremented via record_usage; on DELETE it is decremented (reversal). On UPDATE, if the entity_field changes, the old entity is decremented and the new entity is incremented. Requires a provisioned billing_module for the target database.', CAST(E'{"type":"object","properties":{"meter_slug":{"type":"string","description":"Slug of the billing meter to record usage against (must match a meters table entry, e.g. \\"databases\\", \\"seats\\")"},"entity_field":{"type":"string","format":"column-ref","description":"Column on the target table that holds (or references) the entity id for billing. For direct entity_id columns, just set this field. For FK lookups (e.g., channel_id → channels.entity_id), combine with entity_lookup.","default":"entity_id"},"entity_lookup":{"type":"object","description":"FK lookup configuration for resolving entity_id through a related table. Used when entity_field is a FK (e.g., channel_id) rather than a direct entity_id. The generator validates all fields against metaschema within the same database_id.","properties":{"obj_table":{"type":"string","description":"Name of the related table to look up entity_id from (e.g., \\"channels\\"). Required."},"obj_schema":{"type":"string","description":"Schema of the related table (user-facing name, e.g., \\"public\\"). Optional — if omitted, resolved by table name within the same database_id (raises error if ambiguous)."},"obj_field":{"type":"string","description":"Column on the related table that holds the entity_id (e.g., \\"entity_id\\"). Required."}},"required":["obj_table","obj_field"]},"quantity":{"type":"integer","description":"Units to record per event (default 1)","default":1},"events":{"type":"array","items":{"type":"string","enum":["INSERT","DELETE","UPDATE"]},"description":"Which DML events to attach triggers for","default":["INSERT","DELETE"]}},"required":["meter_slug"]}' AS jsonb), CAST('{"billing","triggers","metering","usage","track"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('LimitWarningAggregate', 'limit_warning_aggregate', 'limit_warning', 'Warning Aggregate', 'Attaches an AFTER INSERT trigger that checks if the entity''s aggregate usage has crossed any warning threshold configured in the limit_warnings table. If a threshold is reached for the first time, enqueues a background job (e.g. email notification). Uses limit_warning_state for one-time dedup per warning/actor/entity triple. Requires a provisioned limits_module with limit_warnings and aggregate limits enabled.', CAST(E'{"type":"object","properties":{"limit_name":{"type":"string","description":"Name of the aggregate limit to watch (must match a limit_warnings.name entry, e.g. \\"databases\\", \\"members\\")"},"scope":{"type":"string","description":"Membership type prefix that determines which limits_module row to use. Resolved dynamically via memberships_module — supports any provisioned type (e.g. \\"org\\", \\"data_room\\", \\"channel\\", \\"team\\").","default":"org"},"entity_field":{"type":"string","format":"column-ref","description":"Column on the target table that holds (or references) the entity id for aggregate limit lookup. For direct entity_id columns, just set this field. For FK lookups (e.g., channel_id → channels.entity_id), combine with entity_lookup.","default":"entity_id"},"entity_lookup":{"type":"object","description":"FK lookup configuration for resolving entity_id through a related table. Used when entity_field is a FK (e.g., channel_id) rather than a direct entity_id. The generator validates all fields against metaschema within the same database_id.","properties":{"obj_table":{"type":"string","description":"Name of the related table to look up entity_id from (e.g., \\"channels\\"). Required."},"obj_schema":{"type":"string","description":"Schema of the related table (user-facing name, e.g., \\"public\\"). Optional — if omitted, resolved by table name within the same database_id (raises error if ambiguous)."},"obj_field":{"type":"string","description":"Column on the related table that holds the entity_id (e.g., \\"entity_id\\"). Required."}},"required":["obj_table","obj_field"]}},"required":["limit_name"]}' AS jsonb), CAST('{"limits","triggers","aggregates","warning","notifications"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('LimitWarningCounter', 'limit_warning_counter', 'limit_warning', 'Warning Counter', 'Attaches an AFTER INSERT trigger that checks if the actor''s current usage has crossed any warning threshold configured in the limit_warnings table. If a threshold is reached for the first time, enqueues a background job (e.g. email notification). Uses limit_warning_state for one-time dedup per warning/actor pair. Requires a provisioned limits_module with limit_warnings enabled.', CAST(E'{"type":"object","properties":{"limit_name":{"type":"string","description":"Name of the limit to watch (must match a limit_warnings.name entry, e.g. \\"projects\\", \\"members\\")"},"scope":{"type":"string","description":"Membership type prefix that determines which limits_module row to use. Resolved dynamically via memberships_module — supports any provisioned type (e.g. \\"app\\", \\"org\\", \\"data_room\\", \\"channel\\", \\"team\\").","default":"app"},"actor_field":{"type":"string","format":"column-ref","description":"Column on the target table that holds the actor id for limit lookup","default":"owner_id"},"entity_field":{"type":"string","format":"column-ref","description":"Column on the target table that holds (or references) the entity id. When provided, entity_id is included in the job payload and dedup state. For FK lookups (e.g., channel_id → channels.entity_id), combine with entity_lookup."},"entity_lookup":{"type":"object","description":"FK lookup configuration for resolving entity_id through a related table. Used when entity_field is a FK (e.g., channel_id) rather than a direct entity_id. The generator validates all fields against metaschema within the same database_id.","properties":{"obj_table":{"type":"string","description":"Name of the related table to look up entity_id from (e.g., \\"channels\\"). Required."},"obj_schema":{"type":"string","description":"Schema of the related table (user-facing name, e.g., \\"public\\"). Optional — if omitted, resolved by table name within the same database_id (raises error if ambiguous)."},"obj_field":{"type":"string","description":"Column on the related table that holds the entity_id (e.g., \\"entity_id\\"). Required."}},"required":["obj_table","obj_field"]}},"required":["limit_name"]}' AS jsonb), CAST('{"limits","triggers","warning","notifications"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('LimitWarningRate', 'limit_warning_rate', 'limit_warning', 'Warning Rate Limit', 'Attaches an AFTER INSERT trigger that checks if the actor''s current request count in the active sliding window has crossed any warning threshold configured in the limit_warnings table. If a threshold is reached for the first time, enqueues a background job (e.g. email notification). Uses limit_warning_state for one-time dedup per warning/actor pair. Requires both a limits_module with limit_warnings enabled and a rate_limit_meters_module.', CAST(E'{"type":"object","properties":{"meter_slug":{"type":"string","description":"Slug of the billing meter to check rate limits against (must match a meters table entry)"},"scope":{"type":"string","description":"Membership type prefix that determines which limits_module row to use for warnings and warning_state tables. Resolved dynamically via memberships_module — supports any provisioned type (e.g. \\"app\\", \\"org\\", \\"data_room\\", \\"channel\\", \\"team\\").","default":"app"},"entity_field":{"type":"string","format":"column-ref","description":"Column on the target table that holds (or references) the entity id for rate limit lookup. For direct entity_id columns, just set this field. For FK lookups (e.g., channel_id → channels.entity_id), combine with entity_lookup.","default":"entity_id"},"entity_lookup":{"type":"object","description":"FK lookup configuration for resolving entity_id through a related table. Used when entity_field is a FK (e.g., channel_id) rather than a direct entity_id. The generator validates all fields against metaschema within the same database_id.","properties":{"obj_table":{"type":"string","description":"Name of the related table to look up entity_id from (e.g., \\"channels\\"). Required."},"obj_schema":{"type":"string","description":"Schema of the related table (user-facing name, e.g., \\"public\\"). Optional — if omitted, resolved by table name within the same database_id (raises error if ambiguous)."},"obj_field":{"type":"string","description":"Column on the related table that holds the entity_id (e.g., \\"entity_id\\"). Required."}},"required":["obj_table","obj_field"]},"actor_field":{"type":"string","format":"column-ref","description":"Column on the target table that holds the actor id for rate limit lookup","default":"owner_id"}},"required":["meter_slug"]}' AS jsonb), CAST('{"rate-limits","triggers","warning","notifications","metering"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('ProcessChunks', 'data_chunks', 'process', 'Chunks', 'Creates a chunked-embedding child table for any parent table. Provisions the chunks table with content, chunk_index, embedding vector, metadata, HNSW index, inherited RLS, and optional job trigger for automatic text splitting. Composed internally by ProcessFileEmbedding (enabled by default in extract mode) but can also be used standalone.', CAST(E'{"type":"object","properties":{"content_field_name":{"type":"string","format":"column-ref","description":"Name of the text content column in the chunks table","default":"content"},"chunk_size":{"type":"integer","description":"Maximum number of characters per chunk","default":1000},"chunk_overlap":{"type":"integer","description":"Number of overlapping characters between consecutive chunks","default":200},"chunk_strategy":{"type":"string","enum":["fixed","sentence","paragraph","semantic"],"description":"Strategy for splitting text into chunks","default":"paragraph"},"dimensions":{"type":"integer","description":"Vector dimensions for per-chunk embeddings","default":768},"metric":{"type":"string","enum":["cosine","l2","ip"],"description":"Distance metric for the HNSW index on chunk embeddings","default":"cosine"},"embedding_model":{"type":"string","description":"Embedding model identifier for per-chunk embeddings. When null, the worker falls back to runtime config (llm_module / env vars)."},"embedding_provider":{"type":"string","description":"Embedding provider name (e.g. \\"ollama\\", \\"openai\\"). When null, the worker falls back to runtime config."},"chunks_table_name":{"type":"string","description":"Override the chunks table name. Defaults to {parent_table}_chunks."},"metadata_fields":{"type":"array","items":{"type":"string"},"description":"Field names from the parent table to copy into chunk metadata"},"search_indexes":{"type":"array","items":{"type":"string","enum":["fulltext","bm25","trigram"]},"description":"Text search indexes to create on the chunks content column. Omit to mirror the parent table''s text search indexes. Set explicitly to override (e.g. [\\"fulltext\\", \\"bm25\\"])."},"entity_field":{"type":"string","format":"column-ref","description":"Column on the parent table that holds (or references) the entity_id for billing scope. Forwarded to the chunking job trigger."},"entity_lookup":{"type":"object","description":"FK lookup configuration for resolving entity_id through a related table. Forwarded to the chunking job trigger.","properties":{"obj_table":{"type":"string","description":"Name of the related table to look up entity_id from"},"obj_schema":{"type":"string","description":"Schema of the related table (user-facing name, optional)"},"obj_field":{"type":"string","format":"column-ref","description":"Column on the related table that holds the entity_id"}},"required":["obj_table","obj_field"]},"enqueue_chunking_job":{"type":"boolean","description":"Whether to create a job trigger that auto-enqueues chunking on parent INSERT/UPDATE","default":true},"chunking_task_name":{"type":"string","description":"Task identifier for the chunking job queue","default":"generate_chunks"}}}' AS jsonb), CAST('{"embedding","chunks","vector","ai","rag"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('ProcessExtraction', 'process_extraction', 'process', 'File Extraction', 'Creates extraction output fields and a job trigger for file text extraction. Fires when a file is uploaded (status = ''uploaded'') or on INSERT. The external worker extracts text/metadata from the file (PDF, DOCX, HTML, etc.) and writes the result back to the configured output fields. Typically used upstream of ProcessFileEmbedding or ProcessChunks.', CAST(E'{"type":"object","$defs":{"triggerCondition":{"type":"object","description":"A leaf condition ({field, op, value?, row?, ref?}) or a combinator ({AND, OR, NOT}).","properties":{"field":{"type":"string","format":"column-ref","description":"Column name (validated against the table)."},"op":{"type":"string","enum":["=","!=",">","<",">=","<=","LIKE","NOT LIKE","IS NULL","IS NOT NULL","IS DISTINCT FROM"],"description":"Comparison operator."},"value":{"description":"Comparison value. Type is resolved from the column definition. Omit for IS NULL, IS NOT NULL, IS DISTINCT FROM."},"row":{"type":"string","enum":["NEW","OLD"],"default":"NEW","description":"Row reference (default: NEW)."},"ref":{"type":"object","description":"Column reference for field-to-field comparison (alternative to value).","properties":{"field":{"type":"string","format":"column-ref"},"row":{"type":"string","enum":["NEW","OLD"],"default":"NEW"}}},"AND":{"type":"array","description":"Array of conditions combined with AND.","items":{"$ref":"#/$defs/triggerCondition"}},"OR":{"type":"array","description":"Array of conditions combined with OR.","items":{"$ref":"#/$defs/triggerCondition"}},"NOT":{"$ref":"#/$defs/triggerCondition","description":"Negated condition."}}}},"properties":{"text_field":{"type":"string","format":"column-ref","description":"Field to store extracted text/markdown","default":"extracted_text"},"metadata_field":{"type":"string","format":"column-ref","description":"JSONB field for extraction metadata (page count, language, etc.)","default":"extracted_metadata"},"extraction_model":{"type":"string","description":"Extraction model identifier (e.g. a vision model for OCR, an LLM for structured extraction). Included in the job payload so the worker knows which model to use. When null, the worker falls back to runtime config."},"extraction_provider":{"type":"string","description":"Extraction provider name (e.g. \\"ollama\\", \\"openai\\"). When null, the worker falls back to runtime config."},"mime_patterns":{"type":"array","items":{"type":"string"},"description":"MIME type LIKE patterns to match. Multiple patterns are OR''d together. Examples: [''application/pdf'', ''text/%''], [''application/vnd.openxmlformats%''].","default":["application/pdf","text/%"]},"task_identifier":{"type":"string","description":"Job task identifier for the extraction worker","default":"extract_file_text"},"events":{"type":"array","items":{"type":"string","enum":["INSERT","UPDATE"]},"description":"Trigger events that fire the job","default":["INSERT"]},"payload_custom":{"type":"object","additionalProperties":{"type":"string","format":"column-ref"},"description":"Custom payload key-to-column mapping for the job trigger","default":{"file_id":"id","key":"key","mime_type":"mime_type","bucket_id":"bucket_id"}},"trigger_conditions":{"description":"Additional compound conditions beyond auto-generated filtering. Merged with the auto-generated conditions via AND.","x-codegen-type":"TriggerCondition | TriggerCondition[]","oneOf":[{"$ref":"#/$defs/triggerCondition"},{"type":"array","items":{"$ref":"#/$defs/triggerCondition"}}]},"entity_field":{"type":"string","format":"column-ref","description":"Column on the trigger table that holds (or references) the entity_id for billing scope. Forwarded to the composed JobTrigger."},"entity_lookup":{"type":"object","description":"FK lookup configuration for resolving entity_id through a related table. Forwarded to the composed JobTrigger.","properties":{"obj_table":{"type":"string","description":"Name of the related table to look up entity_id from"},"obj_schema":{"type":"string","description":"Schema of the related table (user-facing name, optional)"},"obj_field":{"type":"string","format":"column-ref","description":"Column on the related table that holds the entity_id"}},"required":["obj_table","obj_field"]},"queue_name":{"type":"string","description":"Job queue name for extraction tasks","default":"extraction"},"max_attempts":{"type":"integer","description":"Maximum number of retry attempts","default":5},"priority":{"type":"integer","description":"Job priority (lower = higher priority)","default":0}}}' AS jsonb), CAST('{"extraction","files","processing","jobs","text"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('ProcessFileEmbedding', 'data_file_embedding', 'process', 'File Embedding', 'Generic, MIME-scoped embedding node for file tables. Supports two modes: direct (whole-file to single vector, e.g. CLIP for images) when extraction is omitted, or extract (file to text to chunks to per-chunk vectors) when extraction config is provided. Composes SearchVector + JobTrigger + ProcessChunks (enabled by default in extract mode) internally. Multiple instances can coexist on the same table with different MIME scopes, field names, and embedding strategies.', CAST(E'{"type":"object","$defs":{"triggerCondition":{"type":"object","description":"A leaf condition ({field, op, value?, row?, ref?}) or a combinator ({AND, OR, NOT}).","properties":{"field":{"type":"string","format":"column-ref","description":"Column name (validated against the table)."},"op":{"type":"string","enum":["=","!=",">","<",">=","<=","LIKE","NOT LIKE","IS NULL","IS NOT NULL","IS DISTINCT FROM"],"description":"Comparison operator."},"value":{"description":"Comparison value. Type is resolved from the column definition. Omit for IS NULL, IS NOT NULL, IS DISTINCT FROM."},"row":{"type":"string","enum":["NEW","OLD"],"default":"NEW","description":"Row reference (default: NEW)."},"ref":{"type":"object","description":"Column reference for field-to-field comparison (alternative to value).","properties":{"field":{"type":"string","format":"column-ref"},"row":{"type":"string","enum":["NEW","OLD"],"default":"NEW"}}},"AND":{"type":"array","description":"Array of conditions combined with AND.","items":{"$ref":"#/$defs/triggerCondition"}},"OR":{"type":"array","description":"Array of conditions combined with OR.","items":{"$ref":"#/$defs/triggerCondition"}},"NOT":{"$ref":"#/$defs/triggerCondition","description":"Negated condition."}}}},"properties":{"field_name":{"type":"string","format":"column-ref","description":"Name of the vector embedding column","default":"embedding"},"dimensions":{"type":"integer","description":"Vector dimensions (e.g. 512 for CLIP, 768 for nomic, 1536 for ada-002)","default":768},"index_method":{"type":"string","enum":["hnsw","ivfflat"],"description":"Index type for similarity search","default":"hnsw"},"metric":{"type":"string","enum":["cosine","l2","ip"],"description":"Distance metric","default":"cosine"},"index_options":{"type":"object","description":"Index-specific options. HNSW: {m, ef_construction}. IVFFlat: {lists}.","default":{}},"embedding_model":{"type":"string","description":"Embedding model identifier (e.g. \\"nomic-embed-text\\", \\"text-embedding-3-small\\", \\"clip-vit-base-patch32\\"). Included in the job payload so the worker knows which model to use. When null, the worker falls back to runtime config (llm_module / env vars)."},"embedding_provider":{"type":"string","description":"Embedding provider name (e.g. \\"ollama\\", \\"openai\\"). When null, the worker falls back to runtime config."},"mime_patterns":{"type":"array","items":{"type":"string"},"description":"MIME type LIKE patterns to match. Multiple patterns are OR''d together. Examples: [''image/%''], [''application/pdf'', ''text/%''], [''audio/%''].","default":["image/%"]},"task_identifier":{"type":"string","description":"Job task identifier for the worker. In direct mode this is the embedding worker; in extract mode this is the extraction worker.","default":"process_file_embedding"},"events":{"type":"array","items":{"type":"string","enum":["INSERT","UPDATE"]},"description":"Trigger events that fire the job","default":["INSERT"]},"payload_custom":{"type":"object","additionalProperties":{"type":"string","format":"column-ref"},"description":"Custom payload key-to-column mapping for the job trigger","default":{"file_id":"id","key":"key","mime_type":"mime_type","bucket_id":"bucket_id"}},"trigger_conditions":{"description":"Additional compound conditions beyond auto-generated filtering. Merged with the auto-generated conditions via AND.","x-codegen-type":"TriggerCondition | TriggerCondition[]","oneOf":[{"$ref":"#/$defs/triggerCondition"},{"type":"array","items":{"$ref":"#/$defs/triggerCondition"}}]},"entity_field":{"type":"string","format":"column-ref","description":"Column on the trigger table that holds (or references) the entity_id for billing scope. Forwarded to the composed JobTrigger."},"entity_lookup":{"type":"object","description":"FK lookup configuration for resolving entity_id through a related table. Forwarded to the composed JobTrigger.","properties":{"obj_table":{"type":"string","description":"Name of the related table to look up entity_id from"},"obj_schema":{"type":"string","description":"Schema of the related table (user-facing name, optional)"},"obj_field":{"type":"string","format":"column-ref","description":"Column on the related table that holds the entity_id"}},"required":["obj_table","obj_field"]},"extraction":{"type":"object","description":"Text extraction configuration. When present, the generator creates extraction output fields on the table and configures SearchVector with source_fields + stale tracking. When absent, the node operates in direct mode (single vector per file, no text extraction).","properties":{"text_field":{"type":"string","format":"column-ref","description":"Field to store extracted text/markdown","default":"extracted_text"},"metadata_field":{"type":"string","format":"column-ref","description":"JSONB field for extraction metadata (page count, language, etc.)","default":"extracted_metadata"}}},"include_chunks":{"type":"boolean","description":"Whether to create a chunks table via ProcessChunks. Defaults to true when extraction is provided, false in direct mode. Set explicitly to override."},"chunks":{"type":"object","description":"Chunking configuration passed through to ProcessChunks. When include_chunks is true (or defaults to true in extract mode), these params configure the chunks table, embedding dimensions, strategy, etc.","default":{},"properties":{"content_field_name":{"type":"string","format":"column-ref","description":"Name of the text content column in the chunks table","default":"content"},"chunk_size":{"type":"integer","description":"Maximum number of characters per chunk","default":1000},"chunk_overlap":{"type":"integer","description":"Number of overlapping characters between consecutive chunks","default":200},"chunk_strategy":{"type":"string","enum":["fixed","sentence","paragraph","semantic"],"description":"Strategy for splitting text into chunks","default":"paragraph"},"metadata_fields":{"type":"array","items":{"type":"string"},"description":"Field names from parent to copy into chunk metadata"},"search_indexes":{"type":"array","items":{"type":"string","enum":["fulltext","bm25","trigram"]},"description":"Text search indexes to create on the chunks content column. Omit to mirror the parent table''s text search indexes. Set explicitly to override."},"enqueue_chunking_job":{"type":"boolean","description":"Whether to auto-enqueue a chunking job on insert/update","default":true},"chunking_task_name":{"type":"string","description":"Task identifier for the chunking job queue","default":"generate_chunks"}}}}}' AS jsonb), CAST('{"embedding","vector","ai","composition","jobs","multimodal","files"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('ProcessImageEmbedding', 'data_image_embedding', 'process', 'Image Embedding', 'Image-specific preset of ProcessFileEmbedding. Delegates to ProcessFileEmbedding with image-oriented defaults: dimensions=512 (CLIP), mime_patterns=[''image/%''], task_identifier=''process_image_embedding'', direct mode (no extraction). Accepts all ProcessFileEmbedding parameters — any overrides are forwarded through.', CAST(E'{"type":"object","$defs":{"triggerCondition":{"type":"object","description":"A leaf condition ({field, op, value?, row?, ref?}) or a combinator ({AND, OR, NOT}).","properties":{"field":{"type":"string","format":"column-ref","description":"Column name (validated against the table)."},"op":{"type":"string","enum":["=","!=",">","<",">=","<=","LIKE","NOT LIKE","IS NULL","IS NOT NULL","IS DISTINCT FROM"],"description":"Comparison operator."},"value":{"description":"Comparison value. Type is resolved from the column definition. Omit for IS NULL, IS NOT NULL, IS DISTINCT FROM."},"row":{"type":"string","enum":["NEW","OLD"],"default":"NEW","description":"Row reference (default: NEW)."},"ref":{"type":"object","description":"Column reference for field-to-field comparison (alternative to value).","properties":{"field":{"type":"string","format":"column-ref"},"row":{"type":"string","enum":["NEW","OLD"],"default":"NEW"}}},"AND":{"type":"array","description":"Array of conditions combined with AND.","items":{"$ref":"#/$defs/triggerCondition"}},"OR":{"type":"array","description":"Array of conditions combined with OR.","items":{"$ref":"#/$defs/triggerCondition"}},"NOT":{"$ref":"#/$defs/triggerCondition","description":"Negated condition."}}}},"properties":{"field_name":{"type":"string","format":"column-ref","description":"Name of the vector embedding column","default":"embedding"},"dimensions":{"type":"integer","description":"Vector dimensions (default 512 for CLIP-style image embeddings)","default":512},"index_method":{"type":"string","enum":["hnsw","ivfflat"],"description":"Index type for similarity search","default":"hnsw"},"metric":{"type":"string","enum":["cosine","l2","ip"],"description":"Distance metric","default":"cosine"},"index_options":{"type":"object","description":"Index-specific options. HNSW: {m, ef_construction}. IVFFlat: {lists}.","default":{}},"embedding_model":{"type":"string","description":"Embedding model identifier (e.g. \\"clip-vit-base-patch32\\"). Included in the job payload so the worker knows which model to use. When null, the worker falls back to runtime config (llm_module / env vars)."},"embedding_provider":{"type":"string","description":"Embedding provider name (e.g. \\"ollama\\", \\"openai\\"). When null, the worker falls back to runtime config."},"mime_patterns":{"type":"array","items":{"type":"string"},"description":"MIME type LIKE patterns to match. Multiple patterns are OR''d together.","default":["image/%"]},"task_identifier":{"type":"string","description":"Job task identifier for the image embedding worker","default":"process_image_embedding"},"events":{"type":"array","items":{"type":"string","enum":["INSERT","UPDATE"]},"description":"Trigger events that fire the job","default":["INSERT"]},"payload_custom":{"type":"object","additionalProperties":{"type":"string","format":"column-ref"},"description":"Custom payload key-to-column mapping for the job trigger","default":{"file_id":"id","key":"key","mime_type":"mime_type","bucket_id":"bucket_id"}},"trigger_conditions":{"description":"Additional compound conditions beyond auto-generated filtering. Merged with the auto-generated conditions via AND.","x-codegen-type":"TriggerCondition | TriggerCondition[]","oneOf":[{"$ref":"#/$defs/triggerCondition"},{"type":"array","items":{"$ref":"#/$defs/triggerCondition"}}]},"entity_field":{"type":"string","format":"column-ref","description":"Column on the trigger table that holds (or references) the entity_id for billing scope. Forwarded to the composed JobTrigger."},"entity_lookup":{"type":"object","description":"FK lookup configuration for resolving entity_id through a related table. Forwarded to the composed JobTrigger.","properties":{"obj_table":{"type":"string","description":"Name of the related table to look up entity_id from"},"obj_schema":{"type":"string","description":"Schema of the related table (user-facing name, optional)"},"obj_field":{"type":"string","format":"column-ref","description":"Column on the related table that holds the entity_id"}},"required":["obj_table","obj_field"]},"extraction":{"type":"object","description":"Text extraction configuration. Forwarded to ProcessFileEmbedding. When present, enables extract mode (e.g., OCR for images).","properties":{"text_field":{"type":"string","format":"column-ref","description":"Field to store extracted text","default":"extracted_text"},"metadata_field":{"type":"string","format":"column-ref","description":"JSONB field for extraction metadata","default":"extracted_metadata"}}},"chunks":{"type":"object","description":"Chunking configuration. Forwarded to ProcessFileEmbedding. Only meaningful when extraction is also provided.","properties":{"content_field_name":{"type":"string","format":"column-ref","default":"content"},"chunk_size":{"type":"integer","default":1000},"chunk_overlap":{"type":"integer","default":200},"chunk_strategy":{"type":"string","enum":["fixed","sentence","paragraph","semantic"],"default":"paragraph"},"metadata_fields":{"type":"object"},"enqueue_chunking_job":{"type":"boolean","default":true},"chunking_task_name":{"type":"string","default":"generate_chunks"}}}}}' AS jsonb), CAST('{"embedding","image","vector","ai","composition","jobs"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('ProcessImageVersions', 'process_image_versions', 'process', 'Image Versions', 'Creates a job trigger for image variant generation. Fires when an image file is uploaded (status = ''uploaded'') or on INSERT. The external worker generates resized, cropped, or reformatted versions (thumbnails, previews, WebP conversions, etc.) and stores them as new file records linked to the source image.', CAST(E'{"type":"object","$defs":{"triggerCondition":{"type":"object","description":"A leaf condition ({field, op, value?, row?, ref?}) or a combinator ({AND, OR, NOT}).","properties":{"field":{"type":"string","format":"column-ref","description":"Column name (validated against the table)."},"op":{"type":"string","enum":["=","!=",">","<",">=","<=","LIKE","NOT LIKE","IS NULL","IS NOT NULL","IS DISTINCT FROM"],"description":"Comparison operator."},"value":{"description":"Comparison value. Type is resolved from the column definition. Omit for IS NULL, IS NOT NULL, IS DISTINCT FROM."},"row":{"type":"string","enum":["NEW","OLD"],"default":"NEW","description":"Row reference (default: NEW)."},"ref":{"type":"object","description":"Column reference for field-to-field comparison (alternative to value).","properties":{"field":{"type":"string","format":"column-ref"},"row":{"type":"string","enum":["NEW","OLD"],"default":"NEW"}}},"AND":{"type":"array","description":"Array of conditions combined with AND.","items":{"$ref":"#/$defs/triggerCondition"}},"OR":{"type":"array","description":"Array of conditions combined with OR.","items":{"$ref":"#/$defs/triggerCondition"}},"NOT":{"$ref":"#/$defs/triggerCondition","description":"Negated condition."}}}},"required":["versions"],"properties":{"versions":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Version identifier (e.g., \\"thumb\\", \\"preview\\", \\"hero\\")"},"width":{"type":"integer","description":"Target width in pixels"},"height":{"type":"integer","description":"Target height in pixels"},"fit":{"type":"string","enum":["cover","contain","fill","inside","outside"],"description":"Resize fitting strategy","default":"cover"},"format":{"type":"string","enum":["jpeg","png","webp","avif"],"description":"Output image format","default":"webp"},"quality":{"type":"integer","description":"Output quality (1-100)","default":80}},"required":["name"]},"description":"Array of version definitions. Each version specifies dimensions, format, and quality for a generated image variant. Required — the blueprint must explicitly define what variants to generate.","minItems":1},"mime_patterns":{"type":"array","items":{"type":"string"},"description":"MIME type LIKE patterns to match. Defaults to all image types.","default":["image/%"]},"task_identifier":{"type":"string","description":"Job task identifier for the image processing worker","default":"process_image_versions"},"events":{"type":"array","items":{"type":"string","enum":["INSERT","UPDATE"]},"description":"Trigger events that fire the job","default":["INSERT"]},"payload_custom":{"type":"object","additionalProperties":{"type":"string","format":"column-ref"},"description":"Custom payload key-to-column mapping for the job trigger","default":{"file_id":"id","key":"key","mime_type":"mime_type","bucket_id":"bucket_id"}},"trigger_conditions":{"description":"Additional compound conditions beyond auto-generated filtering. Merged with the auto-generated conditions via AND.","x-codegen-type":"TriggerCondition | TriggerCondition[]","oneOf":[{"$ref":"#/$defs/triggerCondition"},{"type":"array","items":{"$ref":"#/$defs/triggerCondition"}}]},"entity_field":{"type":"string","format":"column-ref","description":"Column on the trigger table that holds (or references) the entity_id for billing scope. Forwarded to the composed JobTrigger."},"entity_lookup":{"type":"object","description":"FK lookup configuration for resolving entity_id through a related table. Forwarded to the composed JobTrigger.","properties":{"obj_table":{"type":"string","description":"Name of the related table to look up entity_id from"},"obj_schema":{"type":"string","description":"Schema of the related table (user-facing name, optional)"},"obj_field":{"type":"string","format":"column-ref","description":"Column on the related table that holds the entity_id"}},"required":["obj_table","obj_field"]},"queue_name":{"type":"string","description":"Job queue name for image processing tasks","default":"image_processing"},"max_attempts":{"type":"integer","description":"Maximum number of retry attempts","default":5},"priority":{"type":"integer","description":"Job priority (lower = higher priority)","default":0}}}' AS jsonb), CAST('{"images","processing","jobs","resize","thumbnails","files"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('RelationBelongsTo', 'relation_belongs_to', 'relation', 'Belongs To', 'Creates a foreign key field on the source table referencing the target table. Auto-derives the FK field name from the target table name using inflection (e.g., projects derives project_id). delete_action is required and must be explicitly provided by the caller.', CAST('{"type":"object","properties":{"source_table_id":{"type":"string","format":"uuid","description":"Table that will have the FK field added"},"target_table_id":{"type":"string","format":"uuid","description":"Table being referenced by the FK"},"field_name":{"type":"string","format":"column-ref","description":"FK field name on the source table. Auto-derived from target table name if omitted (e.g., projects → project_id)"},"delete_action":{"type":"string","enum":["c","r","n","d","a"],"description":"FK delete action: c=CASCADE, r=RESTRICT, n=SET NULL, d=SET DEFAULT, a=NO ACTION. Required."},"is_required":{"type":"boolean","description":"Whether the FK field is NOT NULL","default":true}},"required":["source_table_id","target_table_id","delete_action"]}' AS jsonb), CAST('{"relation","foreign_key","schema"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('RelationHasMany', 'relation_has_many', 'relation', 'Has Many', 'Creates a foreign key field on the target table referencing the source table. Inverse of RelationBelongsTo — same FK, different perspective. "projects has many tasks" creates tasks.project_id. Auto-derives the FK field name from the source table name using inflection. delete_action is required and must be explicitly provided by the caller.', CAST('{"type":"object","properties":{"source_table_id":{"type":"string","format":"uuid","description":"Parent table being referenced by the FK (e.g., projects in projects has many tasks)"},"target_table_id":{"type":"string","format":"uuid","description":"Child table that receives the FK field (e.g., tasks in projects has many tasks)"},"field_name":{"type":"string","format":"column-ref","description":"FK field name on the target table. Auto-derived from source table name if omitted (e.g., projects derives project_id)"},"delete_action":{"type":"string","enum":["c","r","n","d","a"],"description":"FK delete action: c=CASCADE, r=RESTRICT, n=SET NULL, d=SET DEFAULT, a=NO ACTION. Required."},"is_required":{"type":"boolean","description":"Whether the FK field is NOT NULL","default":true}},"required":["source_table_id","target_table_id","delete_action"]}' AS jsonb), CAST('{"relation","foreign_key","has_many","schema"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('RelationHasOne', 'relation_has_one', 'relation', 'Has One', 'Creates a foreign key field with a unique constraint on the source table referencing the target table. Enforces 1:1 cardinality. Auto-derives the FK field name from the target table name using inflection. delete_action is required and must be explicitly provided by the caller.', CAST('{"type":"object","properties":{"source_table_id":{"type":"string","format":"uuid","description":"Table that will have the FK field and unique constraint"},"target_table_id":{"type":"string","format":"uuid","description":"Table being referenced by the FK"},"field_name":{"type":"string","format":"column-ref","description":"FK field name on the source table. Auto-derived from target table name if omitted (e.g., users → user_id)"},"delete_action":{"type":"string","enum":["c","r","n","d","a"],"description":"FK delete action: c=CASCADE, r=RESTRICT, n=SET NULL, d=SET DEFAULT, a=NO ACTION. Required."},"is_required":{"type":"boolean","description":"Whether the FK field is NOT NULL","default":true}},"required":["source_table_id","target_table_id","delete_action"]}' AS jsonb), CAST('{"relation","foreign_key","unique","schema"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('RelationManyToMany', 'relation_many_to_many', 'relation', 'Many to Many', 'Creates a junction table between source and target tables with auto-derived naming and FK fields. The trigger creates a bare table (no implicit DataId), adds FK fields to both tables, optionally creates a composite PK (use_composite_key), then forwards all security config to secure_table_provision as-is. The trigger never injects values the caller did not provide. Junction table FKs always CASCADE on delete.', CAST('{"type":"object","properties":{"source_table_id":{"type":"string","format":"uuid","description":"First table in the M:N relationship"},"target_table_id":{"type":"string","format":"uuid","description":"Second table in the M:N relationship"},"junction_table_id":{"type":"string","format":"uuid","description":"Existing junction table to use. If uuid_nil(), a new bare table is created"},"junction_table_name":{"type":"string","description":"Junction table name. Auto-derived from both table names if omitted (e.g., projects + tags derives project_tags)"},"source_field_name":{"type":"string","format":"column-ref","description":"FK field name on junction for source table. Auto-derived if omitted (e.g., projects derives project_id)"},"target_field_name":{"type":"string","format":"column-ref","description":"FK field name on junction for target table. Auto-derived if omitted (e.g., tags derives tag_id)"},"use_composite_key":{"type":"boolean","description":"When true, creates a composite PK from the two FK fields. When false, no PK is created by the trigger (use nodes with DataId for UUID PK). Mutually exclusive with nodes containing DataId.","default":false},"nodes":{"type":"array","items":{"type":"object"},"description":"Array of node objects for field creation on junction table. Each object has a $type key (e.g. DataId, DataEntityMembership) and optional data keys. Forwarded to secure_table_provision as-is. Empty array means no additional fields."},"grants":{"type":"array","items":{"type":"object","properties":{"roles":{"type":"array","items":{"type":"string"}},"privileges":{"type":"array","items":{"type":"array","items":{"type":"string"}}}},"required":["roles","privileges"]},"description":"Unified grant objects for the junction table. Each entry is { roles: string[], privileges: string[][] }. Forwarded to secure_table_provision as-is. Default: []"},"policies":{"type":"array","items":{"type":"object","properties":{"$type":{"type":"string"},"data":{"type":"object"},"privileges":{"type":"array","items":{"type":"string"}},"policy_role":{"type":"string"},"permissive":{"type":"boolean"},"policy_name":{"type":"string"}},"required":["$type"]},"description":"RLS policy objects for the junction table. Each entry has $type (Authz* generator), optional data, privileges, policy_role, permissive, policy_name. Forwarded to secure_table_provision as-is. Default: []"}},"required":["source_table_id","target_table_id"]}' AS jsonb), CAST('{"relation","junction","many_to_many","schema"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('RelationSpatial', 'relation_spatial', 'relation', 'Spatial Relation', 'Declares a spatial predicate between two existing geometry/geography columns. Inserts a metaschema_public.spatial_relation row; the sync_spatial_relation_tags trigger then projects a @spatialRelation smart tag onto the owner column so graphile-postgis'' PostgisSpatialRelationsPlugin can expose it as a cross-table filter in GraphQL. Metadata-only: both source_field and target_field must already exist on their tables. Idempotent on (source_table_id, name). One direction per tag — author two RelationSpatial entries if symmetry is desired.', CAST('{"type":"object","properties":{"source_table_id":{"type":"string","format":"uuid","description":"Table that owns the relation (the @spatialRelation tag is emitted on the owner column of this table)"},"source_field_id":{"type":"string","format":"uuid","description":"Geometry/geography column on source_table that carries the @spatialRelation smart tag"},"target_table_id":{"type":"string","format":"uuid","description":"Table being referenced by the spatial predicate"},"target_field_id":{"type":"string","format":"uuid","description":"Geometry/geography column on target_table that the predicate is evaluated against"},"name":{"type":"string","description":"Relation name (stable, snake_case). Becomes the generated filter field name in GraphQL (e.g. nearby_clinic). Unique per (source_table_id, name) — idempotency key."},"operator":{"type":"string","enum":["st_contains","st_within","st_intersects","st_covers","st_coveredby","st_overlaps","st_touches","st_dwithin"],"description":"PostGIS spatial predicate. One of the 8 whitelisted operators. st_dwithin requires param_name."},"param_name":{"type":"string","description":"Parameter name for parametric operators (currently only st_dwithin, which needs a distance argument). Must be NULL for all other operators. Enforced by table CHECK."}},"required":["source_table_id","source_field_id","target_table_id","target_field_id","name","operator"]}' AS jsonb), CAST('{"relation","spatial","postgis","schema"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('SearchBm25', 'search_bm25', 'search', 'BM25 Search', 'Creates a BM25 index on an existing text column using pg_textsearch. Enables statistical relevance ranking with configurable k1 and b parameters. The BM25 index is auto-detected by graphile-search.', CAST('{"type":"object","properties":{"field_name":{"type":"string","format":"column-ref","description":"Name of existing text column to index with BM25"},"text_config":{"type":"string","description":"PostgreSQL text search configuration for BM25","default":"english"},"k1":{"type":"number","description":"BM25 k1 parameter: term frequency saturation (typical: 1.2-2.0)","default":null},"b":{"type":"number","description":"BM25 b parameter: document length normalization (0=none, 1=full, typical: 0.75)","default":null},"search_score_weight":{"type":"number","description":"Weight for this algorithm in composite searchScore","default":1}},"required":["field_name"]}' AS jsonb), CAST('{"search","bm25","schema"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('SearchFullText', 'search_full_text', 'search', 'Full-Text Search', 'Adds a tsvector column with GIN index and automatic trigger population from source fields. Enables PostgreSQL full-text search with configurable weights and language support. Leverages the existing metaschema full_text_search infrastructure.', CAST('{"type":"object","properties":{"field_name":{"type":"string","format":"column-ref","description":"Name of the tsvector column","default":"search"},"source_fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","format":"column-ref","description":"Name of the source column"},"weight":{"type":"string","enum":["A","B","C","D"],"description":"tsvector weight class (A=highest, D=lowest)","default":"D"},"lang":{"type":"string","description":"PostgreSQL text search configuration","default":"english"}},"required":["field"]},"description":"Source columns that feed the tsvector. Each has a field name, weight (A-D), and language config."},"lang_column":{"type":"string","format":"column-ref","description":"Column name whose value determines the text search configuration per row. When set, the tsvector trigger uses NEW.::regconfig instead of a static language, enabling dynamic per-row language stemming. The per-field lang values in source_fields are used as fallback defaults for the langs array but the trigger reads from this column at runtime."},"search_score_weight":{"type":"number","description":"Weight for this algorithm in composite searchScore","default":1}},"required":["source_fields"]}' AS jsonb), CAST('{"search","fts","tsvector","schema"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('SearchSpatial', 'search_spatial', 'search', 'Spatial Search', 'Adds a PostGIS geometry or geography column with a spatial index (GiST or SP-GiST). Supports configurable geometry types (Point, Polygon, etc.), SRID, and dimensionality. The graphile-postgis plugin auto-detects geometry/geography columns by codec type for spatial filtering (ST_Contains, ST_DWithin, bbox operators).', CAST('{"type":"object","properties":{"field_name":{"type":"string","format":"column-ref","description":"Name of the geometry/geography column","default":"geom"},"geometry_type":{"type":"string","enum":["Point","LineString","Polygon","MultiPoint","MultiLineString","MultiPolygon","GeometryCollection","Geometry"],"description":"PostGIS geometry type constraint","default":"Point"},"srid":{"type":"integer","description":"Spatial Reference System Identifier (e.g. 4326 for WGS84)","default":4326},"dimension":{"type":"integer","enum":[2,3,4],"description":"Coordinate dimension (2=XY, 3=XYZ, 4=XYZM)","default":2},"use_geography":{"type":"boolean","description":"Use geography type instead of geometry (for geodetic calculations on the sphere)","default":false},"index_method":{"type":"string","enum":["gist","spgist"],"description":"Spatial index method","default":"gist"}}}' AS jsonb), CAST('{"spatial","postgis","geometry","schema"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('SearchSpatialAggregate', 'search_spatial_aggregate', 'search', 'Spatial Aggregate Search', 'Creates a derived/materialized geometry field on the parent table that automatically aggregates geometries from a source (child) table via triggers. When child rows are inserted/updated/deleted, the parent aggregate field is recalculated using the specified PostGIS aggregation function (ST_Union, ST_Collect, ST_ConvexHull, ST_ConcaveHull). Useful for materializing spatial boundaries from collections of points or polygons.', CAST('{"type":"object","properties":{"field_name":{"type":"string","format":"column-ref","description":"Name of the aggregate geometry column on the parent table","default":"geom_aggregate"},"source_table_id":{"type":"string","format":"uuid","description":"UUID of the source (child) table containing individual geometries"},"source_geom_field":{"type":"string","format":"column-ref","description":"Name of the geometry column on the source table","default":"geom"},"source_fk_field":{"type":"string","format":"column-ref","description":"Name of the foreign key column on the source table pointing to the parent"},"aggregate_function":{"type":"string","enum":["union","collect","convex_hull","concave_hull"],"description":"PostGIS aggregation function: union (ST_Union, merges overlapping), collect (ST_Collect, groups without merging), convex_hull (smallest convex polygon), concave_hull (tighter boundary)","default":"union"},"geometry_type":{"type":"string","enum":["Point","LineString","Polygon","MultiPoint","MultiLineString","MultiPolygon","GeometryCollection","Geometry"],"description":"Output geometry type constraint for the aggregate field","default":"MultiPolygon"},"srid":{"type":"integer","description":"Spatial Reference System Identifier (e.g. 4326 for WGS84)","default":4326},"dimension":{"type":"integer","enum":[2,3,4],"description":"Coordinate dimension (2=XY, 3=XYZ, 4=XYZM)","default":2},"use_geography":{"type":"boolean","description":"Use geography type instead of geometry","default":false},"index_method":{"type":"string","enum":["gist","spgist"],"description":"Spatial index method for the aggregate field","default":"gist"}},"required":["source_table_id","source_fk_field"]}' AS jsonb), CAST('{"spatial","postgis","geometry","aggregate","schema"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('SearchTrgm', 'search_trgm', 'search', 'Trigram Search', 'Creates GIN trigram indexes (gin_trgm_ops) on specified text/citext fields for fuzzy LIKE/ILIKE/similarity search. Adds @trgmSearch smart tag for PostGraphile integration. Fields must already exist on the table.', CAST('{"type":"object","properties":{"fields":{"type":"array","items":{"type":"string","format":"column-ref"},"description":"Field names to create trigram indexes on (fields must already exist on the table)"}},"required":["fields"]}' AS jsonb), CAST('{"search","trigram","schema"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('SearchUnified', 'search_unified', 'search', 'Unified Search', 'Composite node type that orchestrates multiple search modalities (full-text search, BM25, embeddings, trigram) on a single table. Configures per-table search score weights, normalization strategy, and recency boost via the @searchConfig smart tag.', CAST('{"type":"object","properties":{"full_text_search":{"type":"object","description":"SearchFullText parameters. Omit to skip FTS setup.","properties":{"field_name":{"type":"string","format":"column-ref","default":"search"},"source_fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","format":"column-ref"},"weight":{"type":"string","enum":["A","B","C","D"]},"lang":{"type":"string"}},"required":["field"]}},"search_score_weight":{"type":"number","default":1}}},"bm25":{"type":"object","description":"SearchBm25 parameters. Omit to skip BM25 setup.","properties":{"field_name":{"type":"string","format":"column-ref"},"text_config":{"type":"string","default":"english"},"k1":{"type":"number"},"b":{"type":"number"},"search_score_weight":{"type":"number","default":1}}},"embedding":{"type":"object","description":"SearchVector parameters. Omit to skip embedding setup.","properties":{"field_name":{"type":"string","format":"column-ref","default":"embedding"},"dimensions":{"type":"integer","default":768},"index_method":{"type":"string","enum":["hnsw","ivfflat"]},"metric":{"type":"string","enum":["cosine","l2","ip"]},"source_fields":{"type":"array","items":{"type":"string","format":"column-ref"}},"embedding_model":{"type":"string","description":"Embedding model identifier. When null, the worker falls back to runtime config."},"embedding_provider":{"type":"string","description":"Embedding provider name. When null, the worker falls back to runtime config."},"search_score_weight":{"type":"number","default":1},"chunks":{"type":"object","description":"Chunking configuration for long-text embedding. Creates an embedding_chunks record that drives automatic text splitting and per-chunk embedding. Omit to skip chunking.","properties":{"content_field_name":{"type":"string","format":"column-ref","description":"Name of the text content column in the chunks table","default":"content"},"chunk_size":{"type":"integer","description":"Maximum number of characters per chunk","default":1000},"chunk_overlap":{"type":"integer","description":"Number of overlapping characters between consecutive chunks","default":200},"chunk_strategy":{"type":"string","enum":["fixed","sentence","paragraph","semantic"],"description":"Strategy for splitting text into chunks","default":"fixed"},"metadata_fields":{"type":"object","description":"Metadata fields from parent to copy into chunks"},"enqueue_chunking_job":{"type":"boolean","description":"Whether to auto-enqueue a chunking job on insert/update","default":true},"chunking_task_name":{"type":"string","description":"Task identifier for the chunking job queue","default":"generate_chunks"}}}}},"embedding_text_field":{"type":"string","format":"column-ref","description":"Name of the composite text field created for embedding input","default":"embedding_text"},"composite_format":{"type":"string","enum":["labeled","plain"],"description":"Output format for the composite text field","default":"labeled"},"trgm_fields":{"type":"array","items":{"type":"string","format":"column-ref"},"description":"Field names to tag with @trgmSearch for fuzzy/typo-tolerant matching"},"search_config":{"type":"object","description":"Unified search score configuration written to @searchConfig smart tag","properties":{"weights":{"type":"object","description":"Per-algorithm weights: {tsv: 1.5, bm25: 1.0, pgvector: 0.8, trgm: 0.3}"},"normalization":{"type":"string","enum":["linear","sigmoid"],"description":"Score normalization strategy","default":"linear"},"boost_recent":{"type":"boolean","description":"Enable recency boost for search results","default":false},"boost_recency_field":{"type":"string","format":"column-ref","description":"Timestamp field for recency boost (e.g. created_at, updated_at)"},"boost_recency_decay":{"type":"number","description":"Decay rate for recency boost (0-1, lower = faster decay)","default":0.5}}}}}' AS jsonb), CAST('{"search","composite","schema"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('SearchVector', 'search_vector', 'search', 'Vector Search', 'Adds a vector embedding column with HNSW or IVFFlat index for similarity search. Supports configurable dimensions, distance metrics (cosine, l2, ip), per-field {field_name}_updated_at timestamp tracking (read-only in GraphQL), and automatic job enqueue triggers for embedding generation.', CAST(E'{"type":"object","properties":{"field_name":{"type":"string","format":"column-ref","description":"Name of the vector column","default":"embedding"},"dimensions":{"type":"integer","description":"Vector dimensions (e.g. 384, 768, 1536, 3072)","default":768},"index_method":{"type":"string","enum":["hnsw","ivfflat"],"description":"Index type for similarity search","default":"hnsw"},"metric":{"type":"string","enum":["cosine","l2","ip"],"description":"Distance metric (cosine, l2, ip)","default":"cosine"},"index_options":{"type":"object","description":"Index-specific options. HNSW: {m, ef_construction}. IVFFlat: {lists}.","default":{}},"source_fields":{"type":"array","items":{"type":"string","format":"column-ref"},"description":"Column names that feed the embedding. Used by stale trigger to detect content changes."},"embedding_model":{"type":"string","description":"Embedding model identifier (e.g. \\"nomic-embed-text\\", \\"text-embedding-3-small\\"). Included in the job payload so the worker knows which model to use. When null, the worker falls back to runtime config (llm_module / env vars)."},"embedding_provider":{"type":"string","description":"Embedding provider name (e.g. \\"ollama\\", \\"openai\\"). When null, the worker falls back to runtime config."},"enqueue_job":{"type":"boolean","description":"Auto-create trigger that enqueues embedding generation jobs","default":true},"job_task_name":{"type":"string","format":"function-ref","description":"Task identifier for the job queue. Must match a registered function definition when function_module is installed.","default":"generate_embedding"},"chunks":{"type":"object","description":"Chunking configuration for long-text embedding. Creates an embedding_chunks record that drives automatic text splitting and per-chunk embedding. Omit to skip chunking.","properties":{"content_field_name":{"type":"string","format":"column-ref","description":"Name of the text content column in the chunks table","default":"content"},"chunk_size":{"type":"integer","description":"Maximum number of characters per chunk","default":1000},"chunk_overlap":{"type":"integer","description":"Number of overlapping characters between consecutive chunks","default":200},"chunk_strategy":{"type":"string","enum":["fixed","sentence","paragraph","semantic"],"description":"Strategy for splitting text into chunks","default":"fixed"},"metadata_fields":{"type":"object","description":"Metadata fields from parent to copy into chunks"},"enqueue_chunking_job":{"type":"boolean","description":"Whether to auto-enqueue a chunking job on insert/update","default":true},"chunking_task_name":{"type":"string","format":"function-ref","description":"Task identifier for the chunking job queue. Must match a registered function definition when function_module is installed.","default":"generate_chunks"}}}}}' AS jsonb), CAST('{"embedding","vector","ai","schema"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('ViewAggregated', 'view_aggregated', 'view', 'Aggregated View', 'View with GROUP BY and aggregate functions. Useful for summary/reporting views.', CAST('{"type":"object","properties":{"source_table_id":{"type":"string","format":"uuid","description":"UUID of the source table"},"group_by_fields":{"type":"array","items":{"type":"string","format":"column-ref"},"description":"Field names to group by"},"aggregates":{"type":"array","items":{"type":"object","properties":{"function":{"type":"string","enum":["COUNT","SUM","AVG","MIN","MAX"]},"field":{"type":"string","format":"column-ref","description":"Field to aggregate (or * for COUNT)"},"alias":{"type":"string","format":"column-ref","description":"Output column name"}},"required":["function","alias"]},"description":"Array of aggregate specifications"}},"required":["source_table_id","group_by_fields","aggregates"]}' AS jsonb), CAST('{"view","aggregate","reporting"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('ViewComposite', 'view_composite', 'view', 'Composite View', 'Advanced view using composite AST for the query. Use when other node types are insufficient (CTEs, UNIONs, complex subqueries, etc.).', CAST('{"type":"object","properties":{"query_ast":{"type":"object","description":"Composite SELECT query AST (JSONB)"}},"required":["query_ast"]}' AS jsonb), CAST('{"view","advanced","composite","ast"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('ViewFilteredTable', 'view_filtered_table', 'view', 'Filtered Table', 'Table projection with an Authz* filter baked into the view definition. The view only returns records matching the filter.', CAST('{"type":"object","properties":{"source_table_id":{"type":"string","format":"uuid","description":"UUID of the source table"},"filter_type":{"type":"string","description":"Authz* node type name (e.g., AuthzDirectOwner, AuthzPublishable)"},"filter_data":{"type":"object","description":"Parameters for the Authz* filter type"},"field_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Optional array of field UUIDs to include (alternative to field_names)"},"field_names":{"type":"array","items":{"type":"string","format":"column-ref"},"description":"Optional array of field names to include (alternative to field_ids)"}},"required":["source_table_id","filter_type"]}' AS jsonb), CAST('{"view","filter","authz"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('ViewJoinedTables', 'view_joined_tables', 'view', 'Joined Tables', 'View that joins multiple tables together. Supports INNER, LEFT, RIGHT, and FULL joins.', CAST('{"type":"object","properties":{"primary_table_id":{"type":"string","format":"uuid","description":"UUID of the primary (left-most) table"},"primary_columns":{"type":"array","items":{"type":"string","format":"column-ref"},"description":"Optional array of column names to include from the primary table"},"joins":{"type":"array","items":{"type":"object","properties":{"table_id":{"type":"string","format":"uuid","description":"UUID of the joined table"},"join_type":{"type":"string","enum":["INNER","LEFT","RIGHT","FULL"]},"primary_field":{"type":"string","format":"column-ref","description":"Field on primary table"},"join_field":{"type":"string","format":"column-ref","description":"Field on joined table"},"columns":{"type":"array","items":{"type":"string","format":"column-ref"},"description":"Optional column names to include from this joined table"}},"required":["table_id","primary_field","join_field"]},"description":"Array of join specifications"},"field_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Optional array of field UUIDs to include (alternative to per-table columns)"}},"required":["primary_table_id","joins"]}' AS jsonb), CAST('{"view","join"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +INSERT INTO metaschema_public.node_type_registry ( + name, + slug, + category, + display_name, + description, + parameter_schema, + tags +) VALUES + ('ViewTableProjection', 'view_table_projection', 'view', 'Table Projection', 'Simple column selection from a single source table. Projects all or specific fields.', CAST('{"type":"object","properties":{"source_table_id":{"type":"string","format":"uuid","description":"UUID of the source table to project from"},"field_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Optional array of field UUIDs to include (all fields if omitted)"},"field_names":{"type":"array","items":{"type":"string","format":"column-ref"},"description":"Optional array of field names to include (alternative to field_ids)"}},"required":["source_table_id"]}' AS jsonb), CAST('{"view","projection"}' AS text[])) ON CONFLICT (name) DO UPDATE SET slug = excluded.slug, category = excluded.category, display_name = excluded.display_name, description = excluded.description, parameter_schema = excluded.parameter_schema, tags = excluded.tags; + +CREATE TABLE metaschema_public.function ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + schema_id uuid NOT NULL, + name text NOT NULL, + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT schema_fkey + FOREIGN KEY(schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + UNIQUE (schema_id, name) +); + +CREATE INDEX function_database_id_idx ON metaschema_public.function (database_id); + +CREATE INDEX function_schema_id_idx ON metaschema_public.function (schema_id); + +CREATE TABLE metaschema_public.partition ( + id uuid PRIMARY KEY DEFAULT uuid_generate_v4(), + database_id uuid NOT NULL, + table_id uuid NOT NULL, + strategy text NOT NULL CHECK (strategy IN ('range', 'list', 'hash')), + partition_key_id uuid NOT NULL, + interval text, + retention text, + retention_keep_table boolean NOT NULL DEFAULT true, + premake int NOT NULL DEFAULT 2, + naming_pattern text NOT NULL DEFAULT '{parent}_{bounds}', + is_parented boolean NOT NULL DEFAULT false, + created_at timestamptz DEFAULT now(), + updated_at timestamptz DEFAULT now(), + CONSTRAINT partition_database_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT partition_table_fkey + FOREIGN KEY(table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE CASCADE, + CONSTRAINT partition_key_field_fkey + FOREIGN KEY(partition_key_id) + REFERENCES metaschema_public.field (id), + CONSTRAINT partition_table_unique + UNIQUE (table_id) +); + +CREATE INDEX partition_database_id_idx ON metaschema_public.partition (database_id); + +CREATE TABLE metaschema_public.composite_type ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + schema_id uuid NOT NULL, + name text NOT NULL, + label text, + description text, + attributes jsonb NOT NULL DEFAULT '[]', + smart_tags jsonb, + category metaschema_public.object_category NOT NULL DEFAULT 'app', + module text NULL, + scope int NULL, + tags citext[] NOT NULL DEFAULT '{}', + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT schema_fkey + FOREIGN KEY(schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + UNIQUE (schema_id, name) +); + +CREATE INDEX composite_type_schema_id_idx ON metaschema_public.composite_type (schema_id); + +CREATE INDEX composite_type_database_id_idx ON metaschema_public.composite_type (database_id); \ No newline at end of file diff --git a/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_private/schema.sql b/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_private/schema.sql new file mode 100644 index 00000000..41c18562 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_private/schema.sql @@ -0,0 +1,7 @@ +-- Verify schemas/metaschema_private/schema on pg + +BEGIN; + +SELECT verify_schema ('metaschema_private'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/schema.sql b/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/schema.sql new file mode 100644 index 00000000..7600f8c6 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/schema.sql @@ -0,0 +1,6 @@ + +BEGIN; + +SELECT verify_schema ('metaschema_public'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/check_constraint/table.sql b/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/check_constraint/table.sql new file mode 100644 index 00000000..4bab07c3 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/check_constraint/table.sql @@ -0,0 +1,7 @@ +-- Verify schemas/metaschema_public/tables/check_constraint/table on pg + +BEGIN; + +SELECT verify_table ('metaschema_public.check_constraint'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/composite_type/table.sql b/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/composite_type/table.sql new file mode 100644 index 00000000..de512a0c --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/composite_type/table.sql @@ -0,0 +1,7 @@ +-- Verify schemas/metaschema_public/tables/composite_type/table on pg + +BEGIN; + +SELECT verify_table ('metaschema_public.composite_type'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/database/indexes/databases_database_unique_name_idx.sql b/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/database/indexes/databases_database_unique_name_idx.sql new file mode 100644 index 00000000..d5e64f0b --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/database/indexes/databases_database_unique_name_idx.sql @@ -0,0 +1,6 @@ + +BEGIN; + +SELECT verify_index ('metaschema_public.database', 'databases_database_unique_name_idx'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/database/table.sql b/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/database/table.sql new file mode 100644 index 00000000..2644ae25 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/database/table.sql @@ -0,0 +1,6 @@ + +BEGIN; + +SELECT verify_table ('metaschema_public.database'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/default_privilege/table.sql b/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/default_privilege/table.sql new file mode 100644 index 00000000..ffc657a3 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/default_privilege/table.sql @@ -0,0 +1,9 @@ +-- Verify schemas/metaschema_public/tables/default_privilege/table on pg + +BEGIN; + +SELECT id, database_id, schema_id, object_type, privilege, grantee_name, is_grant +FROM metaschema_public.default_privilege +WHERE FALSE; + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/embedding_chunks/table.sql b/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/embedding_chunks/table.sql new file mode 100644 index 00000000..d054f598 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/embedding_chunks/table.sql @@ -0,0 +1,25 @@ +-- Verify schemas/metaschema_public/tables/embedding_chunks/table on pg + +BEGIN; + +SELECT + id, + database_id, + table_id, + embedding_field_id, + chunks_table_id, + chunks_table_name, + content_field_name, + dimensions, + metric, + chunk_size, + chunk_overlap, + chunk_strategy, + metadata_fields, + enqueue_chunking_job, + chunking_task_name, + parent_fk_field_id +FROM metaschema_public.embedding_chunks +WHERE FALSE; + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/enum/table.sql b/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/enum/table.sql new file mode 100644 index 00000000..34ad6c30 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/enum/table.sql @@ -0,0 +1,7 @@ +-- Verify schemas/metaschema_public/tables/enum/table on pg + +BEGIN; + +SELECT verify_table ('metaschema_public.enum'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/field/indexes/databases_field_uniq_names_idx.sql b/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/field/indexes/databases_field_uniq_names_idx.sql new file mode 100644 index 00000000..6541e522 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/field/indexes/databases_field_uniq_names_idx.sql @@ -0,0 +1,7 @@ +-- Verify schemas/metaschema_public/tables/field/indexes/databases_field_uniq_names_idx on pg + +BEGIN; + +SELECT verify_index ('metaschema_public.field', 'databases_field_uniq_names_idx'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/field/table.sql b/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/field/table.sql new file mode 100644 index 00000000..20da5a3a --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/field/table.sql @@ -0,0 +1,6 @@ + +BEGIN; + +SELECT verify_table ('metaschema_public.field'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/foreign_key_constraint/table.sql b/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/foreign_key_constraint/table.sql new file mode 100644 index 00000000..52ebe68b --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/foreign_key_constraint/table.sql @@ -0,0 +1,7 @@ +-- Verify schemas/metaschema_public/tables/foreign_key_constraint/table on pg + +BEGIN; + +SELECT verify_table ('metaschema_public.foreign_key_constraint'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/full_text_search/table.sql b/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/full_text_search/table.sql new file mode 100644 index 00000000..23d4a04f --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/full_text_search/table.sql @@ -0,0 +1,7 @@ +-- Verify schemas/metaschema_public/tables/full_text_search/table on pg + +BEGIN; + +SELECT verify_table ('metaschema_public.full_text_search'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/function/table.sql b/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/function/table.sql new file mode 100644 index 00000000..fc8976f2 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/function/table.sql @@ -0,0 +1,7 @@ +-- Verify schemas/metaschema_public/tables/function/table on pg + +BEGIN; + +SELECT verify_table ('metaschema_public.function'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/index/table.sql b/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/index/table.sql new file mode 100644 index 00000000..6529f612 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/index/table.sql @@ -0,0 +1,7 @@ +-- Verify schemas/metaschema_public/tables/index/table on pg + +BEGIN; + +SELECT verify_table ('metaschema_public.index'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/node_type_registry/fixtures/node_type_registry_seed.sql b/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/node_type_registry/fixtures/node_type_registry_seed.sql new file mode 100644 index 00000000..9eabe731 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/node_type_registry/fixtures/node_type_registry_seed.sql @@ -0,0 +1,7 @@ +-- Verify schemas/metaschema_public/tables/node_type_registry/fixtures/node_type_registry_seed on pg + +BEGIN; + +SELECT 1 FROM metaschema_public.node_type_registry WHERE name = 'AuthzDirectOwner'; + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/node_type_registry/table.sql b/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/node_type_registry/table.sql new file mode 100644 index 00000000..bd2cacab --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/node_type_registry/table.sql @@ -0,0 +1,9 @@ +-- Verify schemas/metaschema_public/tables/node_type_registry/table on pg + +BEGIN; + +SELECT name, slug, category, display_name, description, parameter_schema, tags +FROM metaschema_public.node_type_registry +WHERE FALSE; + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/partition/table.sql b/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/partition/table.sql new file mode 100644 index 00000000..a37df684 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/partition/table.sql @@ -0,0 +1,7 @@ +-- Verify schemas/metaschema_public/tables/partition/table on pg + +BEGIN; + +SELECT verify_table ('metaschema_public.partition'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/policy/table.sql b/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/policy/table.sql new file mode 100644 index 00000000..72ae6169 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/policy/table.sql @@ -0,0 +1,7 @@ +-- Verify schemas/metaschema_public/tables/policy/table on pg + +BEGIN; + +SELECT verify_table ('metaschema_public.policy'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/primary_key_constraint/table.sql b/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/primary_key_constraint/table.sql new file mode 100644 index 00000000..22a74fc5 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/primary_key_constraint/table.sql @@ -0,0 +1,7 @@ +-- Verify schemas/metaschema_public/tables/primary_key_constraint/table on pg + +BEGIN; + +SELECT verify_table ('metaschema_public.primary_key_constraint'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/schema/table.sql b/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/schema/table.sql new file mode 100644 index 00000000..7d37ed9c --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/schema/table.sql @@ -0,0 +1,7 @@ +-- Verify schemas/metaschema_public/tables/schema/table on pg + +BEGIN; + +SELECT verify_table ('metaschema_public.schema'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/schema_grant/table.sql b/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/schema_grant/table.sql new file mode 100644 index 00000000..a630e80b --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/schema_grant/table.sql @@ -0,0 +1,7 @@ +-- Verify schemas/metaschema_public/tables/schema_grant/table on pg + +BEGIN; + +SELECT verify_table ('metaschema_public.schema_grant'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/spatial_relation/table.sql b/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/spatial_relation/table.sql new file mode 100644 index 00000000..68c821b3 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/spatial_relation/table.sql @@ -0,0 +1,7 @@ +-- Verify schemas/metaschema_public/tables/spatial_relation/table on pg + +BEGIN; + +SELECT verify_table ('metaschema_public.spatial_relation'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/table/indexes/databases_table_unique_name_idx.sql b/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/table/indexes/databases_table_unique_name_idx.sql new file mode 100644 index 00000000..9e71e850 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/table/indexes/databases_table_unique_name_idx.sql @@ -0,0 +1,6 @@ + +BEGIN; + +SELECT verify_index ('metaschema_public.table', 'databases_table_unique_name_idx'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/table/table.sql b/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/table/table.sql new file mode 100644 index 00000000..cbfc4432 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/table/table.sql @@ -0,0 +1,6 @@ + +BEGIN; + +SELECT verify_table ('metaschema_public.table'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/table_grant/table.sql b/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/table_grant/table.sql new file mode 100644 index 00000000..77ebaac8 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/table_grant/table.sql @@ -0,0 +1,7 @@ +-- Verify schemas/metaschema_public/tables/table_grant/table on pg + +BEGIN; + +SELECT verify_table ('metaschema_public.table_grant'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/trigger/table.sql b/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/trigger/table.sql new file mode 100644 index 00000000..5ab33b98 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/trigger/table.sql @@ -0,0 +1,7 @@ +-- Verify schemas/metaschema_public/tables/trigger/table on pg + +BEGIN; + +SELECT verify_table ('metaschema_public.trigger'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/trigger_function/table.sql b/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/trigger_function/table.sql new file mode 100644 index 00000000..bb29f907 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/trigger_function/table.sql @@ -0,0 +1,7 @@ +-- Verify schemas/metaschema_public/tables/trigger_function/table on pg + +BEGIN; + +SELECT verify_table ('metaschema_public.trigger_function'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/unique_constraint/table.sql b/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/unique_constraint/table.sql new file mode 100644 index 00000000..f4e6b519 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/unique_constraint/table.sql @@ -0,0 +1,7 @@ +-- Verify schemas/metaschema_public/tables/unique_constraint/table on pg + +BEGIN; + +SELECT verify_table ('metaschema_public.unique_constraint'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/view/table.sql b/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/view/table.sql new file mode 100644 index 00000000..b35e8ab2 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/view/table.sql @@ -0,0 +1,10 @@ +-- Verify schemas/metaschema_public/tables/view/table on pg + +BEGIN; + +SELECT id, database_id, schema_id, name, view_type, data, filter_type, filter_data, + security_invoker, is_read_only, smart_tags, category, module, scope, tags +FROM metaschema_public.view +WHERE FALSE; + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/view_grant/table.sql b/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/view_grant/table.sql new file mode 100644 index 00000000..169863fa --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/view_grant/table.sql @@ -0,0 +1,9 @@ +-- Verify schemas/metaschema_public/tables/view_grant/table on pg + +BEGIN; + +SELECT id, database_id, view_id, grantee_name, privilege, with_grant_option +FROM metaschema_public.view_grant +WHERE FALSE; + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/view_rule/table.sql b/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/view_rule/table.sql new file mode 100644 index 00000000..f280ea01 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/view_rule/table.sql @@ -0,0 +1,9 @@ +-- Verify schemas/metaschema_public/tables/view_rule/table on pg + +BEGIN; + +SELECT id, database_id, view_id, name, event, action +FROM metaschema_public.view_rule +WHERE FALSE; + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/view_table/table.sql b/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/view_table/table.sql new file mode 100644 index 00000000..7270a4bf --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/tables/view_table/table.sql @@ -0,0 +1,9 @@ +-- Verify schemas/metaschema_public/tables/view_table/table on pg + +BEGIN; + +SELECT id, view_id, table_id, join_order +FROM metaschema_public.view_table +WHERE FALSE; + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/types/object_category.sql b/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/types/object_category.sql new file mode 100644 index 00000000..cb6b1b13 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/verify/schemas/metaschema_public/types/object_category.sql @@ -0,0 +1,9 @@ +-- Verify schemas/metaschema_public/types/object_category on pg + +BEGIN; + +SELECT 'core'::metaschema_public.object_category; +SELECT 'module'::metaschema_public.object_category; +SELECT 'app'::metaschema_public.object_category; + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-schema/verify/schemas/services_private/schema.sql b/extensions/@pgpm/metaschema-schema/verify/schemas/services_private/schema.sql new file mode 100644 index 00000000..3017b36b --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/verify/schemas/services_private/schema.sql @@ -0,0 +1,7 @@ +-- Verify schemas/services_private/schema on pg + +BEGIN; + +SELECT verify_schema ('services_private'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-schema/verify/schemas/services_public/schema.sql b/extensions/@pgpm/metaschema-schema/verify/schemas/services_public/schema.sql new file mode 100644 index 00000000..77c13499 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/verify/schemas/services_public/schema.sql @@ -0,0 +1,7 @@ +-- Verify schemas/services_public/schema on pg + +BEGIN; + +SELECT verify_schema ('services_public'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-schema/verify/schemas/services_public/tables/api_modules/table.sql b/extensions/@pgpm/metaschema-schema/verify/schemas/services_public/tables/api_modules/table.sql new file mode 100644 index 00000000..455ba0d2 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/verify/schemas/services_public/tables/api_modules/table.sql @@ -0,0 +1,7 @@ +-- Verify schemas/services_public/tables/api_modules/table on pg + +BEGIN; + +SELECT verify_table ('services_public.api_modules'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-schema/verify/schemas/services_public/tables/api_schemas/table.sql b/extensions/@pgpm/metaschema-schema/verify/schemas/services_public/tables/api_schemas/table.sql new file mode 100644 index 00000000..49739218 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/verify/schemas/services_public/tables/api_schemas/table.sql @@ -0,0 +1,7 @@ +-- Verify schemas/services_public/tables/api_schemas/table on pg + +BEGIN; + +SELECT verify_table ('services_public.api_schemas'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-schema/verify/schemas/services_public/tables/apis/table.sql b/extensions/@pgpm/metaschema-schema/verify/schemas/services_public/tables/apis/table.sql new file mode 100644 index 00000000..c3906e4f --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/verify/schemas/services_public/tables/apis/table.sql @@ -0,0 +1,7 @@ +-- Verify schemas/services_public/tables/apis/table on pg + +BEGIN; + +SELECT verify_table ('services_public.apis'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-schema/verify/schemas/services_public/tables/apps/table.sql b/extensions/@pgpm/metaschema-schema/verify/schemas/services_public/tables/apps/table.sql new file mode 100644 index 00000000..e1b4c7b7 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/verify/schemas/services_public/tables/apps/table.sql @@ -0,0 +1,7 @@ +-- Verify schemas/services_public/tables/apps/table on pg + +BEGIN; + +SELECT verify_table ('services_public.apps'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-schema/verify/schemas/services_public/tables/domains/table.sql b/extensions/@pgpm/metaschema-schema/verify/schemas/services_public/tables/domains/table.sql new file mode 100644 index 00000000..7d8cdfe6 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/verify/schemas/services_public/tables/domains/table.sql @@ -0,0 +1,7 @@ +-- Verify schemas/services_public/tables/domains/table on pg + +BEGIN; + +SELECT verify_table ('services_public.domains'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-schema/verify/schemas/services_public/tables/site_metadata/table.sql b/extensions/@pgpm/metaschema-schema/verify/schemas/services_public/tables/site_metadata/table.sql new file mode 100644 index 00000000..7e4a9cce --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/verify/schemas/services_public/tables/site_metadata/table.sql @@ -0,0 +1,7 @@ +-- Verify schemas/services_public/tables/site_metadata/table on pg + +BEGIN; + +SELECT verify_table ('services_public.site_metadata'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-schema/verify/schemas/services_public/tables/site_modules/table.sql b/extensions/@pgpm/metaschema-schema/verify/schemas/services_public/tables/site_modules/table.sql new file mode 100644 index 00000000..34343e49 --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/verify/schemas/services_public/tables/site_modules/table.sql @@ -0,0 +1,7 @@ +-- Verify schemas/services_public/tables/site_modules/table on pg + +BEGIN; + +SELECT verify_table ('services_public.site_modules'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-schema/verify/schemas/services_public/tables/site_themes/table.sql b/extensions/@pgpm/metaschema-schema/verify/schemas/services_public/tables/site_themes/table.sql new file mode 100644 index 00000000..834547ce --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/verify/schemas/services_public/tables/site_themes/table.sql @@ -0,0 +1,7 @@ +-- Verify schemas/services_public/tables/site_themes/table on pg + +BEGIN; + +SELECT verify_table ('services_public.site_themes'); + +ROLLBACK; diff --git a/extensions/@pgpm/metaschema-schema/verify/schemas/services_public/tables/sites/table.sql b/extensions/@pgpm/metaschema-schema/verify/schemas/services_public/tables/sites/table.sql new file mode 100644 index 00000000..00ed882e --- /dev/null +++ b/extensions/@pgpm/metaschema-schema/verify/schemas/services_public/tables/sites/table.sql @@ -0,0 +1,7 @@ +-- Verify schemas/services_public/tables/sites/table on pg + +BEGIN; + +SELECT verify_table ('services_public.sites'); + +ROLLBACK; diff --git a/extensions/@pgpm/services/LICENSE b/extensions/@pgpm/services/LICENSE new file mode 100644 index 00000000..7b18c918 --- /dev/null +++ b/extensions/@pgpm/services/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2025 Dan Lynch +Copyright (c) 2025 Constructive + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/extensions/@pgpm/services/Makefile b/extensions/@pgpm/services/Makefile new file mode 100644 index 00000000..d5cd6eeb --- /dev/null +++ b/extensions/@pgpm/services/Makefile @@ -0,0 +1,6 @@ +EXTENSION = services +DATA = sql/services--0.26.3.sql + +PG_CONFIG = pg_config +PGXS := $(shell $(PG_CONFIG) --pgxs) +include $(PGXS) diff --git a/extensions/@pgpm/services/__tests__/__snapshots__/services.test.ts.snap b/extensions/@pgpm/services/__tests__/__snapshots__/services.test.ts.snap new file mode 100644 index 00000000..892a7a90 --- /dev/null +++ b/extensions/@pgpm/services/__tests__/__snapshots__/services.test.ts.snap @@ -0,0 +1,147 @@ +// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing + +exports[`services functionality should handle complete meta workflow with services 1`] = ` +{ + "created_at": "[DATE]", + "hash": null, + "id": "[ID]", + "label": null, + "name": "my-meta-db", + "owner_id": "[ID]", + "schema_hash": null, + "updated_at": "[DATE]", +} +`; + +exports[`services functionality should handle complete meta workflow with services 2`] = ` +{ + "anon_role": "anonymous", + "database_id": "[ID]", + "dbname": "test-database", + "id": "[ID]", + "is_public": true, + "name": "public", + "role_name": "authenticated", +} +`; + +exports[`services functionality should handle complete meta workflow with services 3`] = ` +{ + "anon_role": "administrator", + "database_id": "[ID]", + "dbname": "test-database", + "id": "[ID]", + "is_public": true, + "name": "admin", + "role_name": "administrator", +} +`; + +exports[`services functionality should handle complete meta workflow with services 4`] = ` +{ + "apple_touch_icon": null, + "database_id": "[ID]", + "dbname": "test-database", + "description": "Website Description", + "favicon": null, + "id": "[ID]", + "logo": null, + "og_image": null, + "title": "Website Title", +} +`; + +exports[`services functionality should handle complete meta workflow with services 5`] = ` +{ + "api_id": "[ID]", + "database_id": "[ID]", + "domain": "pgpm.io", + "id": "[ID]", + "site_id": null, + "subdomain": "api", +} +`; + +exports[`services functionality should handle complete meta workflow with services 6`] = ` +{ + "api_id": null, + "database_id": "[ID]", + "domain": "pgpm.io", + "id": "[ID]", + "site_id": "[ID]", + "subdomain": "app", +} +`; + +exports[`services functionality should handle complete meta workflow with services 7`] = ` +{ + "api_id": "[ID]", + "database_id": "[ID]", + "domain": "pgpm.io", + "id": "[ID]", + "site_id": null, + "subdomain": "admin", +} +`; + +exports[`services functionality should handle complete meta workflow with services 8`] = ` +{ + "data": { + "supportEmail": "support@interweb.co", + }, + "database_id": "[ID]", + "id": "[ID]", + "name": "legal-emails", + "site_id": "[ID]", +} +`; + +exports[`services functionality should handle complete meta workflow with services 9`] = ` +{ + "api_id": "[ID]", + "data": { + "authenticate": "authenticate", + "authenticate_schema": "services_private", + }, + "database_id": "[ID]", + "id": "[ID]", + "name": "rls_module", +} +`; + +exports[`services functionality should handle complete meta workflow with services 10`] = ` +{ + "data": { + "auth_schema": "services_public", + "forgot_password": "forgot_password", + "reset_password": "reset_password", + "send_verification_email": "send_verification_email", + "set_password": "set_password", + "sign_in": "login", + "sign_up": "register", + "verify_email": "verify_email", + }, + "database_id": "[ID]", + "id": "[ID]", + "name": "user_auth_module", + "site_id": "[ID]", +} +`; + +exports[`services functionality should handle complete meta workflow with services 11`] = ` +{ + "api_id": "[ID]", + "database_id": "[ID]", + "id": "[ID]", + "schema_id": "[ID]", +} +`; + +exports[`services functionality should handle complete meta workflow with services 12`] = ` +{ + "api_id": "[ID]", + "database_id": "[ID]", + "id": "[ID]", + "schema_id": "[ID]", +} +`; diff --git a/extensions/@pgpm/services/__tests__/services.test.ts b/extensions/@pgpm/services/__tests__/services.test.ts new file mode 100644 index 00000000..f722a512 --- /dev/null +++ b/extensions/@pgpm/services/__tests__/services.test.ts @@ -0,0 +1,210 @@ +import { getConnections, PgTestClient, snapshot } from 'pgsql-test'; + +let pg: PgTestClient; +let teardown: () => Promise; + +describe('services functionality', () => { + beforeAll(async () => { + ({ pg, teardown } = await getConnections()); + }); + + afterAll(async () => { + await teardown(); + }); + + beforeEach(async () => { + await pg.beforeEach(); + await pg.any(`GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA public TO public`); + }); + + afterEach(async () => { + await pg.afterEach(); + }); + + it('should handle complete meta workflow with services', async () => { + const objs: Record = { + tables: {}, + domains: {}, + apis: {}, + sites: {} + }; + + const owner_id = '07281002-1699-4762-57e3-ab1b92243120'; + + const snap = (obj: any) => { + expect(snapshot(obj)).toMatchSnapshot(); + }; + + const snapWithNormalizedDbname = (obj: any) => { + const normalized = { + ...obj, + dbname: 'test-database' + }; + expect(snapshot(normalized)).toMatchSnapshot(); + }; + + // Step 1: Create database + const [database] = await pg.any( + `INSERT INTO metaschema_public.database (owner_id, name) + VALUES ($1, $2) + RETURNING *`, + [owner_id, 'my-meta-db'] + ); + objs.db = database; + const database_id = database.id; + expect(snapshot(database)).toMatchSnapshot(); + + // Step 2: Create APIs first (since domains reference them) + const [publicApi] = await pg.any( + `INSERT INTO services_public.apis (database_id, name, role_name, anon_role) + VALUES ($1, $2, $3, $4) + RETURNING *`, + [database_id, 'public', 'authenticated', 'anonymous'] + ); + objs.apis.public = publicApi; + snapWithNormalizedDbname(publicApi); + + const [adminApi] = await pg.any( + `INSERT INTO services_public.apis (database_id, name, role_name, anon_role) + VALUES ($1, $2, $3, $4) + RETURNING *`, + [database_id, 'admin', 'administrator', 'administrator'] + ); + objs.apis.admin = adminApi; + snapWithNormalizedDbname(adminApi); + + // Step 3: Create sites + const [appSite] = await pg.any( + `INSERT INTO services_public.sites (database_id, title, description) + VALUES ($1, $2, $3) + RETURNING *`, + [database_id, 'Website Title', 'Website Description'] + ); + objs.sites.app = appSite; + snapWithNormalizedDbname(appSite); + + // Step 4: Register domains (linking to APIs and sites) + const [apiDomain] = await pg.any( + `INSERT INTO services_public.domains (database_id, api_id, domain, subdomain) + VALUES ($1, $2, $3, $4) + RETURNING *`, + [database_id, objs.apis.public.id, 'pgpm.io', 'api'] + ); + objs.domains.api = apiDomain; + expect(snapshot(apiDomain)).toMatchSnapshot(); + + const [appDomain] = await pg.any( + `INSERT INTO services_public.domains (database_id, site_id, domain, subdomain) + VALUES ($1, $2, $3, $4) + RETURNING *`, + [database_id, objs.sites.app.id, 'pgpm.io', 'app'] + ); + objs.domains.app = appDomain; + expect(snapshot(appDomain)).toMatchSnapshot(); + + const [adminDomain] = await pg.any( + `INSERT INTO services_public.domains (database_id, api_id, domain, subdomain) + VALUES ($1, $2, $3, $4) + RETURNING *`, + [database_id, objs.apis.admin.id, 'pgpm.io', 'admin'] + ); + objs.domains.admin = adminDomain; + expect(snapshot(adminDomain)).toMatchSnapshot(); + + const [baseDomain] = await pg.any( + `INSERT INTO services_public.domains (database_id, domain) + VALUES ($1, $2) + RETURNING *`, + [database_id, 'pgpm.io'] + ); + objs.domains.base = baseDomain; + + // Step 5: Register modules + const [siteModule1] = await pg.any( + `INSERT INTO services_public.site_modules (database_id, site_id, name, data) + VALUES ($1, $2, $3, $4::jsonb) + RETURNING *`, + [database_id, objs.sites.app.id, 'legal-emails', JSON.stringify({ + supportEmail: 'support@interweb.co' + })] + ); + expect(snapshot(siteModule1)).toMatchSnapshot(); + + const [apiModule] = await pg.any( + `INSERT INTO services_public.api_modules (database_id, api_id, name, data) + VALUES ($1, $2, $3, $4::jsonb) + RETURNING *`, + [database_id, objs.apis.public.id, 'rls_module', JSON.stringify({ + authenticate_schema: 'services_private', + authenticate: 'authenticate' + })] + ); + expect(snapshot(apiModule)).toMatchSnapshot(); + + const [siteModule2] = await pg.any( + `INSERT INTO services_public.site_modules (database_id, site_id, name, data) + VALUES ($1, $2, $3, $4::jsonb) + RETURNING *`, + [database_id, objs.sites.app.id, 'user_auth_module', JSON.stringify({ + auth_schema: 'services_public', + sign_in: 'login', + sign_up: 'register', + set_password: 'set_password', + reset_password: 'reset_password', + forgot_password: 'forgot_password', + send_verification_email: 'send_verification_email', + verify_email: 'verify_email' + })] + ); + expect(snapshot(siteModule2)).toMatchSnapshot(); + + // Step 6: Schema associations + const [schema] = await pg.any( + `INSERT INTO metaschema_public.schema (database_id, schema_name, name) + VALUES ($1, $2, $3) + RETURNING *`, + [database_id, 'brand-public', 'public'] + ); + + const [publicAssoc] = await pg.any( + `INSERT INTO services_public.api_schemas (database_id, schema_id, api_id) + VALUES ($1, $2, $3) + RETURNING *`, + [database_id, schema.id, objs.apis.public.id] + ); + + const [adminAssoc] = await pg.any( + `INSERT INTO services_public.api_schemas (database_id, schema_id, api_id) + VALUES ($1, $2, $3) + RETURNING *`, + [database_id, schema.id, objs.apis.admin.id] + ); + + snap(publicAssoc); + snap(adminAssoc); + }); + + it('should register domain independently', async () => { + const owner_id = '07281002-1699-4762-57e3-ab1b92243120'; + + // Create database first + const [database] = await pg.any( + `INSERT INTO metaschema_public.database (owner_id, name) + VALUES ($1, $2) + RETURNING *`, + [owner_id, 'test-db-for-domain'] + ); + + // Then create domain + const [domain] = await pg.any( + `INSERT INTO services_public.domains (database_id, domain, subdomain) + VALUES ($1, $2, $3) + RETURNING *`, + [database.id, 'example.com', 'api'] + ); + + expect(domain.database_id).toBe(database.id); + expect(domain.domain).toBe('example.com'); + expect(domain.subdomain).toBe('api'); + }); +}); diff --git a/extensions/@pgpm/services/deploy/schemas/services_private/schema.sql b/extensions/@pgpm/services/deploy/schemas/services_private/schema.sql new file mode 100644 index 00000000..60ab34e5 --- /dev/null +++ b/extensions/@pgpm/services/deploy/schemas/services_private/schema.sql @@ -0,0 +1,14 @@ +-- Deploy schemas/services_private/schema to pg + + +BEGIN; + +CREATE SCHEMA services_private; + +GRANT USAGE ON SCHEMA services_private TO authenticated; +GRANT USAGE ON SCHEMA services_private TO administrator; +ALTER DEFAULT PRIVILEGES IN SCHEMA services_private GRANT ALL ON TABLES TO administrator; +ALTER DEFAULT PRIVILEGES IN SCHEMA services_private GRANT ALL ON SEQUENCES TO administrator; +ALTER DEFAULT PRIVILEGES IN SCHEMA services_private GRANT ALL ON FUNCTIONS TO administrator; + +COMMIT; diff --git a/extensions/@pgpm/services/deploy/schemas/services_private/triggers/enforce_api_schema_table_name_uniqueness.sql b/extensions/@pgpm/services/deploy/schemas/services_private/triggers/enforce_api_schema_table_name_uniqueness.sql new file mode 100644 index 00000000..37d06b8b --- /dev/null +++ b/extensions/@pgpm/services/deploy/schemas/services_private/triggers/enforce_api_schema_table_name_uniqueness.sql @@ -0,0 +1,47 @@ +-- Deploy schemas/services_private/triggers/enforce_api_schema_table_name_uniqueness to pg + +-- requires: schemas/services_private/schema +-- requires: schemas/services_public/tables/api_schemas/table +-- requires: metaschema-schema:schemas/metaschema_public/tables/table/table +-- requires: metaschema-schema:schemas/metaschema_public/tables/table/indexes/databases_table_unique_name_idx + +BEGIN; + +-- When linking a schema to an API, check that none of its tables conflict +-- (by plural-hash) with tables already exposed through that API's other schemas. +CREATE FUNCTION services_private.tg_enforce_api_schema_table_name_uniqueness() +RETURNS TRIGGER AS $$ +DECLARE + conflicting_new_table text; + conflicting_existing_table text; +BEGIN + -- Find any table name collision between the newly linked schema + -- and any schema already linked to the same API + SELECT new_t.name, existing_t.name + INTO conflicting_new_table, conflicting_existing_table + FROM metaschema_public.table AS new_t + JOIN services_public.api_schemas AS existing_link + ON existing_link.api_id = NEW.api_id + AND existing_link.schema_id IS DISTINCT FROM NEW.schema_id + JOIN metaschema_public.table AS existing_t + ON existing_t.schema_id = existing_link.schema_id + AND metaschema_private.table_name_hash(existing_t.name) = metaschema_private.table_name_hash(new_t.name) + WHERE new_t.schema_id = NEW.schema_id + LIMIT 1; + + IF conflicting_new_table IS NOT NULL THEN + RAISE EXCEPTION 'Cannot link schema to API: table "%" conflicts with existing table "%" already exposed in this API. Table names must be unique (by plural form) across all schemas within the same API.', + conflicting_new_table, conflicting_existing_table; + END IF; + + RETURN NEW; +END; +$$ +LANGUAGE plpgsql VOLATILE; + +CREATE TRIGGER _000001_enforce_api_schema_table_name_uniqueness +BEFORE INSERT ON services_public.api_schemas +FOR EACH ROW +EXECUTE FUNCTION services_private.tg_enforce_api_schema_table_name_uniqueness(); + +COMMIT; diff --git a/extensions/@pgpm/services/deploy/schemas/services_private/triggers/enforce_api_table_name_uniqueness.sql b/extensions/@pgpm/services/deploy/schemas/services_private/triggers/enforce_api_table_name_uniqueness.sql new file mode 100644 index 00000000..e2df11de --- /dev/null +++ b/extensions/@pgpm/services/deploy/schemas/services_private/triggers/enforce_api_table_name_uniqueness.sql @@ -0,0 +1,60 @@ +-- Deploy schemas/services_private/triggers/enforce_api_table_name_uniqueness to pg + +-- requires: schemas/services_private/schema +-- requires: schemas/services_public/tables/api_schemas/table +-- requires: metaschema-schema:schemas/metaschema_public/tables/table/table +-- requires: metaschema-schema:schemas/metaschema_public/tables/table/indexes/databases_table_unique_name_idx + +BEGIN; + +-- Enforce that table names are unique (by plural-hash) across all schemas within each API. +-- This allows different APIs to have tables with the same name, but prevents +-- collisions within a single API where multiple schemas are exposed together. +CREATE FUNCTION services_private.tg_enforce_api_table_name_uniqueness() +RETURNS TRIGGER AS $$ +DECLARE + new_name_hash bytea; + conflicting_api_name text; + conflicting_table_name text; +BEGIN + -- Compute the plural-hash of the new table name + new_name_hash := metaschema_private.table_name_hash(NEW.name); + + -- Check if any API that includes this table's schema also includes + -- another schema containing a table with the same name hash + SELECT a.name, t.name + INTO conflicting_api_name, conflicting_table_name + FROM services_public.api_schemas AS my_api + JOIN services_public.api_schemas AS other_api + ON other_api.api_id = my_api.api_id + AND other_api.schema_id IS DISTINCT FROM NEW.schema_id + JOIN metaschema_public.table AS t + ON t.schema_id = other_api.schema_id + AND metaschema_private.table_name_hash(t.name) = new_name_hash + JOIN services_public.apis AS a + ON a.id = my_api.api_id + WHERE my_api.schema_id = NEW.schema_id + LIMIT 1; + + IF conflicting_api_name IS NOT NULL THEN + RAISE EXCEPTION 'Table name "%" conflicts with existing table "%" in API "%". Table names must be unique (by plural form) across all schemas within the same API.', + NEW.name, conflicting_table_name, conflicting_api_name; + END IF; + + RETURN NEW; +END; +$$ +LANGUAGE plpgsql VOLATILE; + +CREATE TRIGGER _000003_enforce_api_table_name_uniqueness +BEFORE INSERT ON metaschema_public.table +FOR EACH ROW +EXECUTE FUNCTION services_private.tg_enforce_api_table_name_uniqueness(); + +CREATE TRIGGER _000003_enforce_api_table_name_uniqueness_update +BEFORE UPDATE ON metaschema_public.table +FOR EACH ROW +WHEN (NEW.name IS DISTINCT FROM OLD.name OR NEW.schema_id IS DISTINCT FROM OLD.schema_id) +EXECUTE FUNCTION services_private.tg_enforce_api_table_name_uniqueness(); + +COMMIT; diff --git a/extensions/@pgpm/services/deploy/schemas/services_public/schema.sql b/extensions/@pgpm/services/deploy/schemas/services_public/schema.sql new file mode 100644 index 00000000..1fbb4d3e --- /dev/null +++ b/extensions/@pgpm/services/deploy/schemas/services_public/schema.sql @@ -0,0 +1,15 @@ +-- Deploy schemas/services_public/schema to pg + + +BEGIN; + +CREATE SCHEMA services_public; + +GRANT USAGE ON SCHEMA services_public TO authenticated; +GRANT USAGE ON SCHEMA services_public TO administrator; +ALTER DEFAULT PRIVILEGES IN SCHEMA services_public GRANT ALL ON TABLES TO administrator; +ALTER DEFAULT PRIVILEGES IN SCHEMA services_public GRANT ALL ON SEQUENCES TO administrator; +ALTER DEFAULT PRIVILEGES IN SCHEMA services_public GRANT ALL ON FUNCTIONS TO administrator; + + +COMMIT; diff --git a/extensions/@pgpm/services/deploy/schemas/services_public/tables/api_modules/table.sql b/extensions/@pgpm/services/deploy/schemas/services_public/tables/api_modules/table.sql new file mode 100644 index 00000000..befbdb7f --- /dev/null +++ b/extensions/@pgpm/services/deploy/schemas/services_public/tables/api_modules/table.sql @@ -0,0 +1,35 @@ +-- Deploy schemas/services_public/tables/api_modules/table to pg + +-- requires: schemas/services_public/schema +-- requires: schemas/services_public/tables/apis/table +-- requires: schemas/metaschema_public/tables/database/table + +BEGIN; + +CREATE TABLE services_public.api_modules ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + api_id uuid NOT NULL, + name text NOT NULL, + data json NOT NULL, + + -- + + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE + +); + +COMMENT ON TABLE services_public.api_modules IS 'Server-side module configuration for an API endpoint; stores module name and JSON settings used by the application server'; +COMMENT ON COLUMN services_public.api_modules.id IS 'Unique identifier for this API module record'; +COMMENT ON COLUMN services_public.api_modules.database_id IS 'Reference to the metaschema database'; +COMMENT ON COLUMN services_public.api_modules.api_id IS 'API this module configuration belongs to'; +COMMENT ON COLUMN services_public.api_modules.name IS 'Module name (e.g. auth, uploads, webhooks)'; +COMMENT ON COLUMN services_public.api_modules.data IS 'JSON configuration data for this module'; + +ALTER TABLE services_public.api_modules ADD CONSTRAINT api_modules_api_id_fkey FOREIGN KEY ( api_id ) REFERENCES services_public.apis ( id ); +CREATE INDEX api_modules_api_id_idx ON services_public.api_modules ( api_id ); + +CREATE INDEX api_modules_database_id_idx ON services_public.api_modules ( database_id ); + + +COMMIT; diff --git a/extensions/@pgpm/services/deploy/schemas/services_public/tables/api_schemas/table.sql b/extensions/@pgpm/services/deploy/schemas/services_public/tables/api_schemas/table.sql new file mode 100644 index 00000000..60d12de5 --- /dev/null +++ b/extensions/@pgpm/services/deploy/schemas/services_public/tables/api_schemas/table.sql @@ -0,0 +1,33 @@ +-- Deploy schemas/services_public/tables/api_schemas/table to pg + +-- requires: schemas/services_public/schema + +BEGIN; + +CREATE TABLE services_public.api_schemas ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + schema_id uuid NOT NULL, + api_id uuid NOT NULL, + + -- + + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT schema_fkey FOREIGN KEY (schema_id) REFERENCES metaschema_public.schema (id) ON DELETE CASCADE, + CONSTRAINT api_fkey FOREIGN KEY (api_id) REFERENCES services_public.apis (id) ON DELETE CASCADE, + unique(api_id, schema_id) +); + +COMMENT ON TABLE services_public.api_schemas IS 'Join table linking APIs to the database schemas they expose; controls which schemas are accessible through each API'; +COMMENT ON COLUMN services_public.api_schemas.id IS 'Unique identifier for this API-schema mapping'; +COMMENT ON COLUMN services_public.api_schemas.database_id IS 'Reference to the metaschema database'; +COMMENT ON COLUMN services_public.api_schemas.schema_id IS 'Metaschema schema being exposed through the API'; +COMMENT ON COLUMN services_public.api_schemas.api_id IS 'API that exposes this schema'; + + + +CREATE INDEX api_schemas_database_id_idx ON services_public.api_schemas ( database_id ); +CREATE INDEX api_schemas_schema_id_idx ON services_public.api_schemas ( schema_id ); +CREATE INDEX api_schemas_api_id_idx ON services_public.api_schemas ( api_id ); + +COMMIT; diff --git a/extensions/@pgpm/services/deploy/schemas/services_public/tables/api_settings/table.sql b/extensions/@pgpm/services/deploy/schemas/services_public/tables/api_settings/table.sql new file mode 100644 index 00000000..71d7e12f --- /dev/null +++ b/extensions/@pgpm/services/deploy/schemas/services_public/tables/api_settings/table.sql @@ -0,0 +1,59 @@ +-- Deploy schemas/services_public/tables/api_settings/table to pg + +-- requires: schemas/services_public/schema +-- requires: schemas/services_public/tables/apis/table +-- requires: schemas/services_public/tables/database_settings/table +-- requires: schemas/metaschema_public/tables/database/table + +BEGIN; + +CREATE TABLE services_public.api_settings ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + api_id uuid NOT NULL UNIQUE, + + -- Per-API overrides (NULL = inherit from database_settings) + enable_aggregates boolean, + enable_postgis boolean, + enable_search boolean, + enable_direct_uploads boolean, + enable_presigned_uploads boolean, + enable_many_to_many boolean, + enable_connection_filter boolean, + enable_ltree boolean, + enable_llm boolean, + enable_realtime boolean, + enable_bulk boolean, + enable_i18n boolean, + + -- Extensible JSON for future settings that don't warrant their own column + options jsonb NOT NULL DEFAULT '{}'::jsonb, + + -- + + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT api_fkey FOREIGN KEY (api_id) REFERENCES services_public.apis (id) ON DELETE CASCADE +); + +COMMENT ON TABLE services_public.api_settings IS 'Per-API feature flag overrides; NULL columns inherit from database_settings, explicit true/false overrides the database default'; +COMMENT ON COLUMN services_public.api_settings.id IS 'Unique identifier for this API settings record'; +COMMENT ON COLUMN services_public.api_settings.database_id IS 'Reference to the metaschema database'; +COMMENT ON COLUMN services_public.api_settings.api_id IS 'API these settings override for'; +COMMENT ON COLUMN services_public.api_settings.enable_aggregates IS 'Override: enable aggregate queries (NULL = inherit from database_settings)'; +COMMENT ON COLUMN services_public.api_settings.enable_postgis IS 'Override: enable PostGIS spatial types (NULL = inherit from database_settings)'; +COMMENT ON COLUMN services_public.api_settings.enable_search IS 'Override: enable unified search (NULL = inherit from database_settings)'; +COMMENT ON COLUMN services_public.api_settings.enable_direct_uploads IS 'Override: enable direct (multipart) file uploads (NULL = inherit from database_settings)'; +COMMENT ON COLUMN services_public.api_settings.enable_presigned_uploads IS 'Override: enable presigned URL upload flow (NULL = inherit from database_settings)'; +COMMENT ON COLUMN services_public.api_settings.enable_many_to_many IS 'Override: enable many-to-many relationships (NULL = inherit from database_settings)'; +COMMENT ON COLUMN services_public.api_settings.enable_connection_filter IS 'Override: enable connection filter (NULL = inherit from database_settings)'; +COMMENT ON COLUMN services_public.api_settings.enable_ltree IS 'Override: enable ltree hierarchical data type (NULL = inherit from database_settings)'; +COMMENT ON COLUMN services_public.api_settings.enable_llm IS 'Override: enable LLM/AI integration features (NULL = inherit from database_settings)'; +COMMENT ON COLUMN services_public.api_settings.enable_realtime IS 'Override: enable realtime subscriptions (NULL = inherit from database_settings)'; +COMMENT ON COLUMN services_public.api_settings.enable_bulk IS 'Override: enable bulk mutations (NULL = inherit from database_settings)'; +COMMENT ON COLUMN services_public.api_settings.enable_i18n IS 'Override: enable internationalization plugin (NULL = inherit from database_settings)'; +COMMENT ON COLUMN services_public.api_settings.options IS 'Extensible JSON for additional per-API settings that do not have dedicated columns'; + +CREATE INDEX api_settings_database_id_idx ON services_public.api_settings (database_id); +CREATE INDEX api_settings_api_id_idx ON services_public.api_settings (api_id); + +COMMIT; diff --git a/extensions/@pgpm/services/deploy/schemas/services_public/tables/apis/table.sql b/extensions/@pgpm/services/deploy/schemas/services_public/tables/apis/table.sql new file mode 100644 index 00000000..1b068295 --- /dev/null +++ b/extensions/@pgpm/services/deploy/schemas/services_public/tables/apis/table.sql @@ -0,0 +1,34 @@ +-- Deploy schemas/services_public/tables/apis/table to pg + +-- requires: schemas/services_public/schema +-- requires: schemas/metaschema_public/tables/database/table + +BEGIN; + +CREATE TABLE services_public.apis ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + name text NOT NULL, + dbname text NOT NULL DEFAULT current_database(), + role_name text NOT NULL DEFAULT 'authenticated', + anon_role text NOT NULL DEFAULT 'anonymous', + is_public boolean NOT NULL DEFAULT true, + + -- + + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + UNIQUE(database_id, name) +); + +COMMENT ON TABLE services_public.apis IS 'API endpoint configurations: each record defines a PostGraphile/PostgREST API with its database role and public access settings'; +COMMENT ON COLUMN services_public.apis.id IS 'Unique identifier for this API'; +COMMENT ON COLUMN services_public.apis.database_id IS 'Reference to the metaschema database this API serves'; +COMMENT ON COLUMN services_public.apis.name IS 'Unique name for this API within its database'; +COMMENT ON COLUMN services_public.apis.dbname IS 'PostgreSQL database name to connect to'; +COMMENT ON COLUMN services_public.apis.role_name IS 'PostgreSQL role used for authenticated requests'; +COMMENT ON COLUMN services_public.apis.anon_role IS 'PostgreSQL role used for anonymous/unauthenticated requests'; +COMMENT ON COLUMN services_public.apis.is_public IS 'Whether this API is publicly accessible without authentication'; + +CREATE INDEX apis_database_id_idx ON services_public.apis ( database_id ); + +COMMIT; diff --git a/extensions/@pgpm/services/deploy/schemas/services_public/tables/apps/table.sql b/extensions/@pgpm/services/deploy/schemas/services_public/tables/apps/table.sql new file mode 100644 index 00000000..b9856e92 --- /dev/null +++ b/extensions/@pgpm/services/deploy/schemas/services_public/tables/apps/table.sql @@ -0,0 +1,43 @@ +-- Deploy schemas/services_public/tables/apps/table to pg + +-- requires: schemas/services_public/schema +-- requires: schemas/services_public/tables/sites/table +-- requires: schemas/metaschema_public/tables/database/table + +BEGIN; + +CREATE TABLE services_public.apps ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + site_id uuid NOT NULL, + name text, + app_image image, + app_store_link url, + app_store_id text, + app_id_prefix text, + play_store_link url, + + -- + + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + UNIQUE ( site_id ) +); + +COMMENT ON TABLE services_public.apps IS 'Mobile and native app configuration linked to a site, including store links and identifiers'; +COMMENT ON COLUMN services_public.apps.id IS 'Unique identifier for this app'; +COMMENT ON COLUMN services_public.apps.database_id IS 'Reference to the metaschema database this app belongs to'; +COMMENT ON COLUMN services_public.apps.site_id IS 'Site this app is associated with (one app per site)'; +COMMENT ON COLUMN services_public.apps.name IS 'Display name of the app'; +COMMENT ON COLUMN services_public.apps.app_image IS 'App icon or promotional image'; +COMMENT ON COLUMN services_public.apps.app_store_link IS 'URL to the Apple App Store listing'; +COMMENT ON COLUMN services_public.apps.app_store_id IS 'Apple App Store application identifier'; +COMMENT ON COLUMN services_public.apps.app_id_prefix IS 'Apple App ID prefix (Team ID) for universal links and associated domains'; +COMMENT ON COLUMN services_public.apps.play_store_link IS 'URL to the Google Play Store listing'; + +ALTER TABLE services_public.apps ADD CONSTRAINT apps_site_id_fkey FOREIGN KEY ( site_id ) REFERENCES services_public.sites ( id ); +CREATE INDEX apps_site_id_idx ON services_public.apps ( site_id ); + +CREATE INDEX apps_database_id_idx ON services_public.apps ( database_id ); + + +COMMIT; diff --git a/extensions/@pgpm/services/deploy/schemas/services_public/tables/cors_settings/table.sql b/extensions/@pgpm/services/deploy/schemas/services_public/tables/cors_settings/table.sql new file mode 100644 index 00000000..f5471890 --- /dev/null +++ b/extensions/@pgpm/services/deploy/schemas/services_public/tables/cors_settings/table.sql @@ -0,0 +1,36 @@ +-- Deploy schemas/services_public/tables/cors_settings/table to pg + +-- requires: schemas/services_public/schema +-- requires: schemas/services_public/tables/apis/table +-- requires: schemas/metaschema_public/tables/database/table + +BEGIN; + +-- Per-database (and optionally per-API) CORS origin configuration. +-- Typed replacement for api_modules rows with name = 'cors'. +-- Row with api_id NULL = database-wide default; row with api_id = per-API override. +CREATE TABLE services_public.cors_settings ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + api_id uuid, + + -- Allowed origins for CORS preflight and response headers + allowed_origins text[] NOT NULL DEFAULT '{}', + + -- + + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT api_fkey FOREIGN KEY (api_id) REFERENCES services_public.apis (id) ON DELETE CASCADE, + CONSTRAINT cors_settings_unique UNIQUE (database_id, api_id) +); + +COMMENT ON TABLE services_public.cors_settings IS 'Per-database and per-API CORS origin configuration; typed replacement for api_modules cors JSONB entries'; +COMMENT ON COLUMN services_public.cors_settings.id IS 'Unique identifier for this CORS settings record'; +COMMENT ON COLUMN services_public.cors_settings.database_id IS 'Reference to the metaschema database'; +COMMENT ON COLUMN services_public.cors_settings.api_id IS 'Optional API for per-API override; NULL means database-wide default'; +COMMENT ON COLUMN services_public.cors_settings.allowed_origins IS 'Array of allowed CORS origins (e.g. https://example.com)'; + +CREATE INDEX cors_settings_database_id_idx ON services_public.cors_settings (database_id); +CREATE INDEX cors_settings_api_id_idx ON services_public.cors_settings (api_id); + +COMMIT; diff --git a/extensions/@pgpm/services/deploy/schemas/services_public/tables/database_settings/table.sql b/extensions/@pgpm/services/deploy/schemas/services_public/tables/database_settings/table.sql new file mode 100644 index 00000000..ec660def --- /dev/null +++ b/extensions/@pgpm/services/deploy/schemas/services_public/tables/database_settings/table.sql @@ -0,0 +1,53 @@ +-- Deploy schemas/services_public/tables/database_settings/table to pg + +-- requires: schemas/services_public/schema +-- requires: schemas/metaschema_public/tables/database/table + +BEGIN; + +CREATE TABLE services_public.database_settings ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL UNIQUE, + + -- GraphQL API features + enable_aggregates boolean NOT NULL DEFAULT false, + enable_postgis boolean NOT NULL DEFAULT true, + enable_search boolean NOT NULL DEFAULT true, + enable_direct_uploads boolean NOT NULL DEFAULT true, + enable_presigned_uploads boolean NOT NULL DEFAULT true, + enable_many_to_many boolean NOT NULL DEFAULT true, + enable_connection_filter boolean NOT NULL DEFAULT true, + enable_ltree boolean NOT NULL DEFAULT true, + enable_llm boolean NOT NULL DEFAULT false, + enable_realtime boolean NOT NULL DEFAULT false, + enable_bulk boolean NOT NULL DEFAULT false, + enable_i18n boolean NOT NULL DEFAULT false, + + -- Extensible JSON for future settings that don't warrant their own column + options jsonb NOT NULL DEFAULT '{}'::jsonb, + + -- + + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE +); + +COMMENT ON TABLE services_public.database_settings IS 'Database-wide feature flags and settings; controls which platform features are available to all APIs in this database'; +COMMENT ON COLUMN services_public.database_settings.id IS 'Unique identifier for this settings record'; +COMMENT ON COLUMN services_public.database_settings.database_id IS 'Reference to the metaschema database these settings apply to'; +COMMENT ON COLUMN services_public.database_settings.enable_aggregates IS 'Enable aggregate queries (sum, avg, min, max, etc.) in the GraphQL API'; +COMMENT ON COLUMN services_public.database_settings.enable_postgis IS 'Enable PostGIS spatial types and operators in the GraphQL API'; +COMMENT ON COLUMN services_public.database_settings.enable_search IS 'Enable unified search (tsvector, BM25, pg_trgm, pgvector) in the GraphQL API'; +COMMENT ON COLUMN services_public.database_settings.enable_direct_uploads IS 'Enable direct (multipart) file upload mutations in the GraphQL API'; +COMMENT ON COLUMN services_public.database_settings.enable_presigned_uploads IS 'Enable presigned URL upload flow for S3/MinIO storage'; +COMMENT ON COLUMN services_public.database_settings.enable_many_to_many IS 'Enable many-to-many relationship queries in the GraphQL API'; +COMMENT ON COLUMN services_public.database_settings.enable_connection_filter IS 'Enable connection filter (where argument) in the GraphQL API'; +COMMENT ON COLUMN services_public.database_settings.enable_ltree IS 'Enable ltree hierarchical data type support in the GraphQL API'; +COMMENT ON COLUMN services_public.database_settings.enable_llm IS 'Enable LLM/AI integration features in the GraphQL API'; +COMMENT ON COLUMN services_public.database_settings.enable_realtime IS 'Enable realtime subscriptions (cursor-tracked change delivery) in the GraphQL API'; +COMMENT ON COLUMN services_public.database_settings.enable_bulk IS 'Enable bulk mutation operations (insert, upsert, update, delete) in the GraphQL API'; +COMMENT ON COLUMN services_public.database_settings.enable_i18n IS 'Enable internationalization plugin (localeStrings field, translation table discovery) in the GraphQL API'; +COMMENT ON COLUMN services_public.database_settings.options IS 'Extensible JSON for additional settings that do not have dedicated columns'; + +CREATE INDEX database_settings_database_id_idx ON services_public.database_settings (database_id); + +COMMIT; diff --git a/extensions/@pgpm/services/deploy/schemas/services_public/tables/domains/table.sql b/extensions/@pgpm/services/deploy/schemas/services_public/tables/domains/table.sql new file mode 100644 index 00000000..bf1c12e8 --- /dev/null +++ b/extensions/@pgpm/services/deploy/schemas/services_public/tables/domains/table.sql @@ -0,0 +1,46 @@ +-- Deploy schemas/services_public/tables/domains/table to pg + +-- requires: schemas/services_public/schema +-- requires: schemas/services_public/tables/apis/table +-- requires: schemas/services_public/tables/sites/table +-- requires: schemas/metaschema_public/tables/database/table + +BEGIN; + +CREATE TABLE services_public.domains ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + + api_id uuid, + site_id uuid, + + subdomain hostname, + domain hostname, + + -- + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT api_fkey FOREIGN KEY (api_id) REFERENCES services_public.apis (id) ON DELETE CASCADE, + CONSTRAINT site_fkey FOREIGN KEY (site_id) REFERENCES services_public.sites (id) ON DELETE CASCADE, + CONSTRAINT one_route_chk CHECK ( + (api_id IS NULL AND site_id IS NULL) OR + (api_id IS NULL AND site_id IS NOT NULL) OR + (api_id IS NOT NULL AND site_id IS NULL) + ), + UNIQUE ( subdomain, domain ) +); + +COMMENT ON TABLE services_public.domains IS 'DNS domain and subdomain routing: maps hostnames to either an API endpoint or a site'; +COMMENT ON COLUMN services_public.domains.id IS 'Unique identifier for this domain record'; +COMMENT ON COLUMN services_public.domains.database_id IS 'Reference to the metaschema database this domain belongs to'; +COMMENT ON COLUMN services_public.domains.api_id IS 'API endpoint this domain routes to (mutually exclusive with site_id)'; +COMMENT ON COLUMN services_public.domains.site_id IS 'Site this domain routes to (mutually exclusive with api_id)'; +COMMENT ON COLUMN services_public.domains.subdomain IS 'Subdomain portion of the hostname'; +COMMENT ON COLUMN services_public.domains.domain IS 'Root domain of the hostname'; + +CREATE INDEX domains_database_id_idx ON services_public.domains ( database_id ); + +CREATE INDEX domains_api_id_idx ON services_public.domains ( api_id ); + +CREATE INDEX domains_site_id_idx ON services_public.domains ( site_id ); + +COMMIT; diff --git a/extensions/@pgpm/services/deploy/schemas/services_public/tables/pubkey_settings/table.sql b/extensions/@pgpm/services/deploy/schemas/services_public/tables/pubkey_settings/table.sql new file mode 100644 index 00000000..983da42f --- /dev/null +++ b/extensions/@pgpm/services/deploy/schemas/services_public/tables/pubkey_settings/table.sql @@ -0,0 +1,53 @@ +-- Deploy schemas/services_public/tables/pubkey_settings/table to pg + +-- requires: schemas/services_public/schema +-- requires: schemas/metaschema_public/tables/database/table +-- requires: schemas/metaschema_public/tables/schema/table +-- requires: schemas/metaschema_public/tables/function/table + +BEGIN; + +-- Per-database public-key / crypto auth runtime configuration. +-- Typed replacement for api_modules rows with name = 'pubkey_challenge'. +-- One row per database; the server reads this instead of the JSONB blob. +CREATE TABLE services_public.pubkey_settings ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL UNIQUE, + + -- Schema reference (FK to metaschema_public.schema) + schema_id uuid, + + -- Crypto auth configuration + crypto_network text NOT NULL DEFAULT 'cosmos', + user_field text NOT NULL DEFAULT 'user_id', + + -- Function references (FK to metaschema_public.function) + sign_up_with_key_function_id uuid, + sign_in_request_challenge_function_id uuid, + sign_in_record_failure_function_id uuid, + sign_in_with_challenge_function_id uuid, + + -- + + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT schema_fkey FOREIGN KEY (schema_id) REFERENCES metaschema_public.schema (id) ON DELETE SET NULL, + CONSTRAINT sign_up_with_key_function_fkey FOREIGN KEY (sign_up_with_key_function_id) REFERENCES metaschema_public.function (id) ON DELETE SET NULL, + CONSTRAINT sign_in_request_challenge_function_fkey FOREIGN KEY (sign_in_request_challenge_function_id) REFERENCES metaschema_public.function (id) ON DELETE SET NULL, + CONSTRAINT sign_in_record_failure_function_fkey FOREIGN KEY (sign_in_record_failure_function_id) REFERENCES metaschema_public.function (id) ON DELETE SET NULL, + CONSTRAINT sign_in_with_challenge_function_fkey FOREIGN KEY (sign_in_with_challenge_function_id) REFERENCES metaschema_public.function (id) ON DELETE SET NULL +); + +COMMENT ON TABLE services_public.pubkey_settings IS 'Per-database public-key crypto auth runtime configuration; typed replacement for api_modules pubkey_challenge JSONB entries'; +COMMENT ON COLUMN services_public.pubkey_settings.id IS 'Unique identifier for this pubkey settings record'; +COMMENT ON COLUMN services_public.pubkey_settings.database_id IS 'Reference to the metaschema database'; +COMMENT ON COLUMN services_public.pubkey_settings.schema_id IS 'Schema containing the crypto auth functions (FK to metaschema_public.schema)'; +COMMENT ON COLUMN services_public.pubkey_settings.crypto_network IS 'Crypto network for key derivation (e.g. cosmos, ethereum)'; +COMMENT ON COLUMN services_public.pubkey_settings.user_field IS 'Field name used to identify the user in crypto auth functions'; +COMMENT ON COLUMN services_public.pubkey_settings.sign_up_with_key_function_id IS 'Reference to the sign-up-with-key function (FK to metaschema_public.function)'; +COMMENT ON COLUMN services_public.pubkey_settings.sign_in_request_challenge_function_id IS 'Reference to the sign-in challenge request function (FK to metaschema_public.function)'; +COMMENT ON COLUMN services_public.pubkey_settings.sign_in_record_failure_function_id IS 'Reference to the sign-in failure recording function (FK to metaschema_public.function)'; +COMMENT ON COLUMN services_public.pubkey_settings.sign_in_with_challenge_function_id IS 'Reference to the sign-in-with-challenge function (FK to metaschema_public.function)'; + +CREATE INDEX pubkey_settings_database_id_idx ON services_public.pubkey_settings (database_id); + +COMMIT; diff --git a/extensions/@pgpm/services/deploy/schemas/services_public/tables/rls_settings/table.sql b/extensions/@pgpm/services/deploy/schemas/services_public/tables/rls_settings/table.sql new file mode 100644 index 00000000..b46cef17 --- /dev/null +++ b/extensions/@pgpm/services/deploy/schemas/services_public/tables/rls_settings/table.sql @@ -0,0 +1,56 @@ +-- Deploy schemas/services_public/tables/rls_settings/table to pg + +-- requires: schemas/services_public/schema +-- requires: schemas/metaschema_public/tables/database/table +-- requires: schemas/metaschema_public/tables/schema/table +-- requires: schemas/metaschema_public/tables/function/table + +BEGIN; + +-- Per-database RLS module runtime configuration. +-- Typed replacement for api_modules rows with name = 'rls_module'. +-- One row per database; the server reads this instead of the JSONB blob. +CREATE TABLE services_public.rls_settings ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL UNIQUE, + + -- Schema references (FK to metaschema_public.schema) + authenticate_schema_id uuid, + role_schema_id uuid, + + -- Function references (FK to metaschema_public.function) + authenticate_function_id uuid, + authenticate_strict_function_id uuid, + current_role_function_id uuid, + current_role_id_function_id uuid, + current_user_agent_function_id uuid, + current_ip_address_function_id uuid, + + -- + + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT authenticate_schema_fkey FOREIGN KEY (authenticate_schema_id) REFERENCES metaschema_public.schema (id) ON DELETE SET NULL, + CONSTRAINT role_schema_fkey FOREIGN KEY (role_schema_id) REFERENCES metaschema_public.schema (id) ON DELETE SET NULL, + CONSTRAINT authenticate_function_fkey FOREIGN KEY (authenticate_function_id) REFERENCES metaschema_public.function (id) ON DELETE SET NULL, + CONSTRAINT authenticate_strict_function_fkey FOREIGN KEY (authenticate_strict_function_id) REFERENCES metaschema_public.function (id) ON DELETE SET NULL, + CONSTRAINT current_role_function_fkey FOREIGN KEY (current_role_function_id) REFERENCES metaschema_public.function (id) ON DELETE SET NULL, + CONSTRAINT current_role_id_function_fkey FOREIGN KEY (current_role_id_function_id) REFERENCES metaschema_public.function (id) ON DELETE SET NULL, + CONSTRAINT current_user_agent_function_fkey FOREIGN KEY (current_user_agent_function_id) REFERENCES metaschema_public.function (id) ON DELETE SET NULL, + CONSTRAINT current_ip_address_function_fkey FOREIGN KEY (current_ip_address_function_id) REFERENCES metaschema_public.function (id) ON DELETE SET NULL +); + +COMMENT ON TABLE services_public.rls_settings IS 'Per-database RLS module runtime configuration; typed replacement for api_modules rls_module JSONB entries'; +COMMENT ON COLUMN services_public.rls_settings.id IS 'Unique identifier for this RLS settings record'; +COMMENT ON COLUMN services_public.rls_settings.database_id IS 'Reference to the metaschema database'; +COMMENT ON COLUMN services_public.rls_settings.authenticate_schema_id IS 'Schema containing authenticate/authenticate_strict functions (FK to metaschema_public.schema)'; +COMMENT ON COLUMN services_public.rls_settings.role_schema_id IS 'Schema containing current_role and related functions (FK to metaschema_public.schema)'; +COMMENT ON COLUMN services_public.rls_settings.authenticate_function_id IS 'Reference to the authenticate function (FK to metaschema_public.function)'; +COMMENT ON COLUMN services_public.rls_settings.authenticate_strict_function_id IS 'Reference to the strict authenticate function (FK to metaschema_public.function)'; +COMMENT ON COLUMN services_public.rls_settings.current_role_function_id IS 'Reference to the current_role function (FK to metaschema_public.function)'; +COMMENT ON COLUMN services_public.rls_settings.current_role_id_function_id IS 'Reference to the current_role_id function (FK to metaschema_public.function)'; +COMMENT ON COLUMN services_public.rls_settings.current_user_agent_function_id IS 'Reference to the current_user_agent function (FK to metaschema_public.function)'; +COMMENT ON COLUMN services_public.rls_settings.current_ip_address_function_id IS 'Reference to the current_ip_address function (FK to metaschema_public.function)'; + +CREATE INDEX rls_settings_database_id_idx ON services_public.rls_settings (database_id); + +COMMIT; diff --git a/extensions/@pgpm/services/deploy/schemas/services_public/tables/site_metadata/table.sql b/extensions/@pgpm/services/deploy/schemas/services_public/tables/site_metadata/table.sql new file mode 100644 index 00000000..0cc0462b --- /dev/null +++ b/extensions/@pgpm/services/deploy/schemas/services_public/tables/site_metadata/table.sql @@ -0,0 +1,39 @@ +-- Deploy schemas/services_public/tables/site_metadata/table to pg + +-- requires: schemas/services_public/schema +-- requires: schemas/services_public/tables/sites/table +-- requires: schemas/metaschema_public/tables/database/table + +BEGIN; + +CREATE TABLE services_public.site_metadata ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + site_id uuid NOT NULL, + title text, + description text, + og_image image, + + -- + + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + + CHECK ( character_length(title) <= 120 ), + CHECK ( character_length(description) <= 120 ) +); + + +COMMENT ON TABLE services_public.site_metadata IS 'SEO and social sharing metadata for a site: page title, description, and Open Graph image'; +COMMENT ON COLUMN services_public.site_metadata.id IS 'Unique identifier for this metadata record'; +COMMENT ON COLUMN services_public.site_metadata.database_id IS 'Reference to the metaschema database'; +COMMENT ON COLUMN services_public.site_metadata.site_id IS 'Site this metadata belongs to'; +COMMENT ON COLUMN services_public.site_metadata.title IS 'Page title for SEO (max 120 characters)'; +COMMENT ON COLUMN services_public.site_metadata.description IS 'Meta description for SEO and social sharing (max 120 characters)'; +COMMENT ON COLUMN services_public.site_metadata.og_image IS 'Open Graph image for social media previews'; + +ALTER TABLE services_public.site_metadata ADD CONSTRAINT site_metadata_site_id_fkey FOREIGN KEY ( site_id ) REFERENCES services_public.sites ( id ); +CREATE INDEX site_metadata_site_id_idx ON services_public.site_metadata ( site_id ); + +CREATE INDEX site_metadata_database_id_idx ON services_public.site_metadata ( database_id ); + +COMMIT; diff --git a/extensions/@pgpm/services/deploy/schemas/services_public/tables/site_modules/table.sql b/extensions/@pgpm/services/deploy/schemas/services_public/tables/site_modules/table.sql new file mode 100644 index 00000000..20bdf25f --- /dev/null +++ b/extensions/@pgpm/services/deploy/schemas/services_public/tables/site_modules/table.sql @@ -0,0 +1,33 @@ +-- Deploy schemas/services_public/tables/site_modules/table to pg + +-- requires: schemas/services_public/schema +-- requires: schemas/services_public/tables/sites/table +-- requires: schemas/metaschema_public/tables/database/table + +BEGIN; + +CREATE TABLE services_public.site_modules ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + site_id uuid NOT NULL, + name text NOT NULL, + data json NOT NULL, + + -- + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE +); + +COMMENT ON TABLE services_public.site_modules IS 'Site-level module configuration; stores module name and JSON settings used by the frontend or server for each site'; +COMMENT ON COLUMN services_public.site_modules.id IS 'Unique identifier for this site module record'; +COMMENT ON COLUMN services_public.site_modules.database_id IS 'Reference to the metaschema database'; +COMMENT ON COLUMN services_public.site_modules.site_id IS 'Site this module configuration belongs to'; +COMMENT ON COLUMN services_public.site_modules.name IS 'Module name (e.g. user_auth_module, analytics)'; +COMMENT ON COLUMN services_public.site_modules.data IS 'JSON configuration data for this module'; + +ALTER TABLE services_public.site_modules ADD CONSTRAINT site_modules_site_id_fkey FOREIGN KEY ( site_id ) REFERENCES services_public.sites ( id ); +CREATE INDEX site_modules_site_id_idx ON services_public.site_modules ( site_id ); + +CREATE INDEX site_modules_database_id_idx ON services_public.site_modules ( database_id ); + + +COMMIT; diff --git a/extensions/@pgpm/services/deploy/schemas/services_public/tables/site_themes/table.sql b/extensions/@pgpm/services/deploy/schemas/services_public/tables/site_themes/table.sql new file mode 100644 index 00000000..bd88291b --- /dev/null +++ b/extensions/@pgpm/services/deploy/schemas/services_public/tables/site_themes/table.sql @@ -0,0 +1,31 @@ +-- Deploy schemas/services_public/tables/site_themes/table to pg + +-- requires: schemas/services_public/schema +-- requires: schemas/services_public/tables/sites/table +-- requires: schemas/metaschema_public/tables/database/table + +BEGIN; + +CREATE TABLE services_public.site_themes ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + site_id uuid NOT NULL, + theme jsonb NOT NULL, + + -- + + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE +); + +COMMENT ON TABLE services_public.site_themes IS 'Theme configuration for a site; stores design tokens, colors, and typography as JSONB'; +COMMENT ON COLUMN services_public.site_themes.id IS 'Unique identifier for this theme record'; +COMMENT ON COLUMN services_public.site_themes.database_id IS 'Reference to the metaschema database'; +COMMENT ON COLUMN services_public.site_themes.site_id IS 'Site this theme belongs to'; +COMMENT ON COLUMN services_public.site_themes.theme IS 'JSONB object containing theme tokens (colors, typography, spacing, etc.)'; + +ALTER TABLE services_public.site_themes ADD CONSTRAINT site_themes_site_id_fkey FOREIGN KEY ( site_id ) REFERENCES services_public.sites ( id ); +CREATE INDEX site_themes_site_id_idx ON services_public.site_themes ( site_id ); + +CREATE INDEX site_themes_database_id_idx ON services_public.site_themes ( database_id ); + +COMMIT; diff --git a/extensions/@pgpm/services/deploy/schemas/services_public/tables/sites/table.sql b/extensions/@pgpm/services/deploy/schemas/services_public/tables/sites/table.sql new file mode 100644 index 00000000..149a7178 --- /dev/null +++ b/extensions/@pgpm/services/deploy/schemas/services_public/tables/sites/table.sql @@ -0,0 +1,40 @@ +-- Deploy schemas/services_public/tables/sites/table to pg + +-- requires: schemas/services_public/schema +-- requires: schemas/metaschema_public/tables/database/table + +BEGIN; + +CREATE TABLE services_public.sites ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + title text, + description text, + og_image image, + favicon attachment, + apple_touch_icon image, + logo image, + + -- do we need this? + dbname text NOT NULL DEFAULT current_database(), + + -- + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT max_title CHECK ( character_length(title) <= 120 ), + CONSTRAINT max_descr CHECK ( character_length(description) <= 120 ) +); + +COMMENT ON TABLE services_public.sites IS 'Top-level site configuration: branding assets, title, and description for a deployed application'; +COMMENT ON COLUMN services_public.sites.id IS 'Unique identifier for this site'; +COMMENT ON COLUMN services_public.sites.database_id IS 'Reference to the metaschema database this site belongs to'; +COMMENT ON COLUMN services_public.sites.title IS 'Display title for the site (max 120 characters)'; +COMMENT ON COLUMN services_public.sites.description IS 'Short description of the site (max 120 characters)'; +COMMENT ON COLUMN services_public.sites.og_image IS 'Open Graph image used for social media link previews'; +COMMENT ON COLUMN services_public.sites.favicon IS 'Browser favicon attachment'; +COMMENT ON COLUMN services_public.sites.apple_touch_icon IS 'Apple touch icon for iOS home screen bookmarks'; +COMMENT ON COLUMN services_public.sites.logo IS 'Primary logo image for the site'; +COMMENT ON COLUMN services_public.sites.dbname IS 'PostgreSQL database name this site connects to'; + +CREATE INDEX sites_database_id_idx ON services_public.sites ( database_id ); + +COMMIT; diff --git a/extensions/@pgpm/services/deploy/schemas/services_public/tables/webauthn_settings/table.sql b/extensions/@pgpm/services/deploy/schemas/services_public/tables/webauthn_settings/table.sql new file mode 100644 index 00000000..326b42b3 --- /dev/null +++ b/extensions/@pgpm/services/deploy/schemas/services_public/tables/webauthn_settings/table.sql @@ -0,0 +1,84 @@ +-- Deploy schemas/services_public/tables/webauthn_settings/table to pg + +-- requires: schemas/services_public/schema +-- requires: schemas/metaschema_public/tables/database/table +-- requires: schemas/metaschema_public/tables/schema/table +-- requires: schemas/metaschema_public/tables/table/table +-- requires: schemas/metaschema_public/tables/field/table + +BEGIN; + +-- Per-database WebAuthn / passkey runtime configuration. +-- Typed replacement for api_modules rows with name = 'webauthn_challenge'. +-- One row per database; the server reads this instead of the JSONB blob. +CREATE TABLE services_public.webauthn_settings ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL UNIQUE, + + -- Schema references (FK to metaschema_public.schema) + schema_id uuid, + credentials_schema_id uuid, + sessions_schema_id uuid, + session_secrets_schema_id uuid, + + -- Table references (FK to metaschema_public.table) + credentials_table_id uuid, + sessions_table_id uuid, + session_credentials_table_id uuid, + session_secrets_table_id uuid, + + -- Field reference (FK to metaschema_public.field) + user_field_id uuid, + + -- Relying Party configuration + rp_id text NOT NULL DEFAULT '', + rp_name text NOT NULL DEFAULT '', + origin_allowlist text[] NOT NULL DEFAULT '{}', + + -- WebAuthn registration/authentication options + attestation_type text NOT NULL DEFAULT 'none' + CHECK (attestation_type IN ('none', 'indirect', 'direct', 'enterprise')), + require_user_verification boolean NOT NULL DEFAULT false, + resident_key text NOT NULL DEFAULT 'required' + CHECK (resident_key IN ('discouraged', 'preferred', 'required')), + + -- Challenge TTL in seconds (5 minutes = 300s) + challenge_expiry_seconds bigint NOT NULL DEFAULT 300, + + -- + + CONSTRAINT db_fkey FOREIGN KEY (database_id) REFERENCES metaschema_public.database (id) ON DELETE CASCADE, + CONSTRAINT schema_fkey FOREIGN KEY (schema_id) REFERENCES metaschema_public.schema (id) ON DELETE SET NULL, + CONSTRAINT credentials_schema_fkey FOREIGN KEY (credentials_schema_id) REFERENCES metaschema_public.schema (id) ON DELETE SET NULL, + CONSTRAINT sessions_schema_fkey FOREIGN KEY (sessions_schema_id) REFERENCES metaschema_public.schema (id) ON DELETE SET NULL, + CONSTRAINT session_secrets_schema_fkey FOREIGN KEY (session_secrets_schema_id) REFERENCES metaschema_public.schema (id) ON DELETE SET NULL, + CONSTRAINT credentials_table_fkey FOREIGN KEY (credentials_table_id) REFERENCES metaschema_public.table (id) ON DELETE SET NULL, + CONSTRAINT sessions_table_fkey FOREIGN KEY (sessions_table_id) REFERENCES metaschema_public.table (id) ON DELETE SET NULL, + CONSTRAINT session_credentials_table_fkey FOREIGN KEY (session_credentials_table_id) REFERENCES metaschema_public.table (id) ON DELETE SET NULL, + CONSTRAINT session_secrets_table_fkey FOREIGN KEY (session_secrets_table_id) REFERENCES metaschema_public.table (id) ON DELETE SET NULL, + CONSTRAINT user_field_fkey FOREIGN KEY (user_field_id) REFERENCES metaschema_public.field (id) ON DELETE SET NULL +); + +COMMENT ON TABLE services_public.webauthn_settings IS 'Per-database WebAuthn/passkey runtime configuration; typed replacement for api_modules webauthn_challenge JSONB entries'; +COMMENT ON COLUMN services_public.webauthn_settings.id IS 'Unique identifier for this WebAuthn settings record'; +COMMENT ON COLUMN services_public.webauthn_settings.database_id IS 'Reference to the metaschema database'; +COMMENT ON COLUMN services_public.webauthn_settings.schema_id IS 'Schema containing WebAuthn auth procedures (FK to metaschema_public.schema)'; +COMMENT ON COLUMN services_public.webauthn_settings.credentials_schema_id IS 'Schema of the webauthn_credentials table (FK to metaschema_public.schema)'; +COMMENT ON COLUMN services_public.webauthn_settings.sessions_schema_id IS 'Schema of the sessions table (FK to metaschema_public.schema)'; +COMMENT ON COLUMN services_public.webauthn_settings.session_secrets_schema_id IS 'Schema of the session_secrets table (FK to metaschema_public.schema)'; +COMMENT ON COLUMN services_public.webauthn_settings.credentials_table_id IS 'Reference to the webauthn_credentials table (FK to metaschema_public.table)'; +COMMENT ON COLUMN services_public.webauthn_settings.sessions_table_id IS 'Reference to the sessions table (FK to metaschema_public.table)'; +COMMENT ON COLUMN services_public.webauthn_settings.session_credentials_table_id IS 'Reference to the session_credentials table (FK to metaschema_public.table)'; +COMMENT ON COLUMN services_public.webauthn_settings.session_secrets_table_id IS 'Reference to the session_secrets table (FK to metaschema_public.table)'; +COMMENT ON COLUMN services_public.webauthn_settings.user_field_id IS 'Reference to the user field on webauthn_credentials (FK to metaschema_public.field)'; +COMMENT ON COLUMN services_public.webauthn_settings.rp_id IS 'WebAuthn Relying Party ID (typically the domain name)'; +COMMENT ON COLUMN services_public.webauthn_settings.rp_name IS 'WebAuthn Relying Party display name'; +COMMENT ON COLUMN services_public.webauthn_settings.origin_allowlist IS 'Allowed origins for WebAuthn registration and authentication'; +COMMENT ON COLUMN services_public.webauthn_settings.attestation_type IS 'Attestation conveyance preference (none, indirect, direct, enterprise)'; +COMMENT ON COLUMN services_public.webauthn_settings.require_user_verification IS 'Whether to require user verification (biometric/PIN) during auth'; +COMMENT ON COLUMN services_public.webauthn_settings.resident_key IS 'Resident key requirement (discouraged, preferred, required)'; +COMMENT ON COLUMN services_public.webauthn_settings.challenge_expiry_seconds IS 'Challenge TTL in seconds (default 300 = 5 minutes)'; + +CREATE INDEX webauthn_settings_database_id_idx ON services_public.webauthn_settings (database_id); + +COMMIT; diff --git a/extensions/@pgpm/services/jest.config.js b/extensions/@pgpm/services/jest.config.js new file mode 100644 index 00000000..e20e7efb --- /dev/null +++ b/extensions/@pgpm/services/jest.config.js @@ -0,0 +1,15 @@ +/** @type {import('ts-jest').JestConfigWithTsJest} */ +module.exports = { + preset: 'ts-jest', + testEnvironment: 'node', + + // Match both __tests__ and colocated test files + testMatch: ['**/?(*.)+(test|spec).{ts,tsx,js,jsx}'], + + // Ignore build artifacts and type declarations + testPathIgnorePatterns: ['/dist/', '\\.d\\.ts$'], + modulePathIgnorePatterns: ['/dist/'], + watchPathIgnorePatterns: ['/dist/'], + + moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'], +}; diff --git a/extensions/@pgpm/services/package.json b/extensions/@pgpm/services/package.json new file mode 100644 index 00000000..80a7dee4 --- /dev/null +++ b/extensions/@pgpm/services/package.json @@ -0,0 +1,39 @@ +{ + "name": "@pgpm/services", + "version": "0.26.5", + "description": "Services schemas for module registration and service configuration", + "author": "Dan Lynch ", + "contributors": [ + "Constructive " + ], + "keywords": [ + "postgresql", + "pgpm", + "services", + "modules" + ], + "publishConfig": { + "access": "public" + }, + "scripts": { + "bundle": "pgpm package", + "test": "jest", + "test:watch": "jest --watch" + }, + "dependencies": { + "@pgpm/metaschema-schema": "0.26.5", + "@pgpm/verify": "0.26.0" + }, + "devDependencies": { + "pgpm": "^4.23.2" + }, + "repository": { + "type": "git", + "url": "https://github.com/constructive-io/constructive-db" + }, + "homepage": "https://github.com/constructive-io/constructive-db", + "bugs": { + "url": "https://github.com/constructive-io/constructive-db/issues" + }, + "gitHead": "a496a00d89c37d874f4a7207265b9972b6f05c7d" +} diff --git a/extensions/@pgpm/services/pgpm.plan b/extensions/@pgpm/services/pgpm.plan new file mode 100644 index 00000000..8b75429b --- /dev/null +++ b/extensions/@pgpm/services/pgpm.plan @@ -0,0 +1,23 @@ +%syntax-version=1.0.0 +%project=services +%uri=services + +schemas/services_private/schema 2017-08-11T08:11:51Z skitch # add schemas/services_private/schema +schemas/services_public/schema 2017-08-11T08:11:51Z skitch # add schemas/services_public/schema +schemas/services_public/tables/apis/table [schemas/services_public/schema metaschema-schema:schemas/metaschema_public/tables/database/table] 2017-08-11T08:11:51Z skitch # add schemas/services_public/tables/apis/table +schemas/services_public/tables/api_modules/table [schemas/services_public/schema schemas/services_public/tables/apis/table metaschema-schema:schemas/metaschema_public/tables/database/table] 2017-08-11T08:11:51Z skitch # add schemas/services_public/tables/api_modules/table +schemas/services_public/tables/api_schemas/table [schemas/services_public/schema] 2017-08-11T08:11:51Z skitch # add schemas/services_public/tables/api_schemas/table +schemas/services_public/tables/sites/table [schemas/services_public/schema metaschema-schema:schemas/metaschema_public/tables/database/table] 2017-08-11T08:11:51Z skitch # add schemas/services_public/tables/sites/table +schemas/services_public/tables/apps/table [schemas/services_public/schema schemas/services_public/tables/sites/table metaschema-schema:schemas/metaschema_public/tables/database/table] 2017-08-11T08:11:51Z skitch # add schemas/services_public/tables/apps/table +schemas/services_public/tables/domains/table [schemas/services_public/schema schemas/services_public/tables/apis/table schemas/services_public/tables/sites/table metaschema-schema:schemas/metaschema_public/tables/database/table] 2017-08-11T08:11:51Z skitch # add schemas/services_public/tables/domains/table +schemas/services_public/tables/site_metadata/table [schemas/services_public/schema schemas/services_public/tables/sites/table metaschema-schema:schemas/metaschema_public/tables/database/table] 2017-08-11T08:11:51Z skitch # add schemas/services_public/tables/site_metadata/table +schemas/services_public/tables/site_modules/table [schemas/services_public/schema schemas/services_public/tables/sites/table metaschema-schema:schemas/metaschema_public/tables/database/table] 2017-08-11T08:11:51Z skitch # add schemas/services_public/tables/site_modules/table +schemas/services_public/tables/site_themes/table [schemas/services_public/schema schemas/services_public/tables/sites/table metaschema-schema:schemas/metaschema_public/tables/database/table] 2017-08-11T08:11:51Z skitch # add schemas/services_public/tables/site_themes/table +schemas/services_private/triggers/enforce_api_table_name_uniqueness [schemas/services_private/schema schemas/services_public/tables/api_schemas/table metaschema-schema:schemas/metaschema_public/tables/table/table metaschema-schema:schemas/metaschema_public/tables/table/indexes/databases_table_unique_name_idx] 2026-02-27T00:00:00Z devin # add API-level table name uniqueness trigger +schemas/services_private/triggers/enforce_api_schema_table_name_uniqueness [schemas/services_private/schema schemas/services_public/tables/api_schemas/table metaschema-schema:schemas/metaschema_public/tables/table/table metaschema-schema:schemas/metaschema_public/tables/table/indexes/databases_table_unique_name_idx] 2026-02-27T00:00:00Z devin # add API-schema link table name uniqueness trigger +schemas/services_public/tables/database_settings/table [schemas/services_public/schema metaschema-schema:schemas/metaschema_public/tables/database/table] 2026-05-08T00:00:00Z devin # add database-wide feature flags and settings +schemas/services_public/tables/api_settings/table [schemas/services_public/schema schemas/services_public/tables/apis/table schemas/services_public/tables/database_settings/table metaschema-schema:schemas/metaschema_public/tables/database/table] 2026-05-08T00:00:00Z devin # add per-API feature flag overrides +schemas/services_public/tables/rls_settings/table [schemas/services_public/schema metaschema-schema:schemas/metaschema_public/tables/database/table metaschema-schema:schemas/metaschema_public/tables/schema/table metaschema-schema:schemas/metaschema_public/tables/function/table] 2026-05-09T00:00:00Z devin # add typed RLS module runtime settings with UUID FKs +schemas/services_public/tables/cors_settings/table [schemas/services_public/schema schemas/services_public/tables/apis/table metaschema-schema:schemas/metaschema_public/tables/database/table] 2026-05-09T00:00:00Z devin # add typed CORS origin settings +schemas/services_public/tables/pubkey_settings/table [schemas/services_public/schema metaschema-schema:schemas/metaschema_public/tables/database/table metaschema-schema:schemas/metaschema_public/tables/schema/table metaschema-schema:schemas/metaschema_public/tables/function/table] 2026-05-09T00:00:00Z devin # add typed pubkey crypto auth settings with UUID FKs +schemas/services_public/tables/webauthn_settings/table [schemas/services_public/schema metaschema-schema:schemas/metaschema_public/tables/database/table metaschema-schema:schemas/metaschema_public/tables/schema/table metaschema-schema:schemas/metaschema_public/tables/table/table metaschema-schema:schemas/metaschema_public/tables/field/table] 2026-05-09T00:00:00Z devin # add typed WebAuthn/passkey settings with UUID FKs diff --git a/extensions/@pgpm/services/revert/schemas/services_private/schema.sql b/extensions/@pgpm/services/revert/schemas/services_private/schema.sql new file mode 100644 index 00000000..710f99c9 --- /dev/null +++ b/extensions/@pgpm/services/revert/schemas/services_private/schema.sql @@ -0,0 +1,7 @@ +-- Revert schemas/services_private/schema from pg + +BEGIN; + +DROP SCHEMA services_private; + +COMMIT; diff --git a/extensions/@pgpm/services/revert/schemas/services_private/triggers/enforce_api_schema_table_name_uniqueness.sql b/extensions/@pgpm/services/revert/schemas/services_private/triggers/enforce_api_schema_table_name_uniqueness.sql new file mode 100644 index 00000000..c7e253f5 --- /dev/null +++ b/extensions/@pgpm/services/revert/schemas/services_private/triggers/enforce_api_schema_table_name_uniqueness.sql @@ -0,0 +1,8 @@ +-- Revert schemas/services_private/triggers/enforce_api_schema_table_name_uniqueness + +BEGIN; + +DROP TRIGGER IF EXISTS _000001_enforce_api_schema_table_name_uniqueness ON services_public.api_schemas; +DROP FUNCTION IF EXISTS services_private.tg_enforce_api_schema_table_name_uniqueness(); + +COMMIT; diff --git a/extensions/@pgpm/services/revert/schemas/services_private/triggers/enforce_api_table_name_uniqueness.sql b/extensions/@pgpm/services/revert/schemas/services_private/triggers/enforce_api_table_name_uniqueness.sql new file mode 100644 index 00000000..9d9cc8ea --- /dev/null +++ b/extensions/@pgpm/services/revert/schemas/services_private/triggers/enforce_api_table_name_uniqueness.sql @@ -0,0 +1,9 @@ +-- Revert schemas/services_private/triggers/enforce_api_table_name_uniqueness + +BEGIN; + +DROP TRIGGER IF EXISTS _000003_enforce_api_table_name_uniqueness_update ON metaschema_public.table; +DROP TRIGGER IF EXISTS _000003_enforce_api_table_name_uniqueness ON metaschema_public.table; +DROP FUNCTION IF EXISTS services_private.tg_enforce_api_table_name_uniqueness(); + +COMMIT; diff --git a/extensions/@pgpm/services/revert/schemas/services_public/schema.sql b/extensions/@pgpm/services/revert/schemas/services_public/schema.sql new file mode 100644 index 00000000..3fd696ac --- /dev/null +++ b/extensions/@pgpm/services/revert/schemas/services_public/schema.sql @@ -0,0 +1,7 @@ +-- Revert schemas/services_public/schema from pg + +BEGIN; + +DROP SCHEMA services_public; + +COMMIT; diff --git a/extensions/@pgpm/services/revert/schemas/services_public/tables/api_modules/table.sql b/extensions/@pgpm/services/revert/schemas/services_public/tables/api_modules/table.sql new file mode 100644 index 00000000..65543be1 --- /dev/null +++ b/extensions/@pgpm/services/revert/schemas/services_public/tables/api_modules/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/services_public/tables/api_modules/table from pg + +BEGIN; + +DROP TABLE services_public.api_modules; + +COMMIT; diff --git a/extensions/@pgpm/services/revert/schemas/services_public/tables/api_schemas/table.sql b/extensions/@pgpm/services/revert/schemas/services_public/tables/api_schemas/table.sql new file mode 100644 index 00000000..8a310db7 --- /dev/null +++ b/extensions/@pgpm/services/revert/schemas/services_public/tables/api_schemas/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/services_public/tables/api_schemas/table from pg + +BEGIN; + +DROP TABLE services_public.api_schemas; + +COMMIT; diff --git a/extensions/@pgpm/services/revert/schemas/services_public/tables/api_settings/table.sql b/extensions/@pgpm/services/revert/schemas/services_public/tables/api_settings/table.sql new file mode 100644 index 00000000..8e507fe9 --- /dev/null +++ b/extensions/@pgpm/services/revert/schemas/services_public/tables/api_settings/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/services_public/tables/api_settings/table + +BEGIN; + +DROP TABLE IF EXISTS services_public.api_settings; + +COMMIT; diff --git a/extensions/@pgpm/services/revert/schemas/services_public/tables/apis/table.sql b/extensions/@pgpm/services/revert/schemas/services_public/tables/apis/table.sql new file mode 100644 index 00000000..2feff0a6 --- /dev/null +++ b/extensions/@pgpm/services/revert/schemas/services_public/tables/apis/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/services_public/tables/apis/table from pg + +BEGIN; + +DROP TABLE services_public.apis; + +COMMIT; diff --git a/extensions/@pgpm/services/revert/schemas/services_public/tables/apps/table.sql b/extensions/@pgpm/services/revert/schemas/services_public/tables/apps/table.sql new file mode 100644 index 00000000..816bf6d3 --- /dev/null +++ b/extensions/@pgpm/services/revert/schemas/services_public/tables/apps/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/services_public/tables/apps/table from pg + +BEGIN; + +DROP TABLE services_public.apps; + +COMMIT; diff --git a/extensions/@pgpm/services/revert/schemas/services_public/tables/cors_settings/table.sql b/extensions/@pgpm/services/revert/schemas/services_public/tables/cors_settings/table.sql new file mode 100644 index 00000000..0ff2d58d --- /dev/null +++ b/extensions/@pgpm/services/revert/schemas/services_public/tables/cors_settings/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/services_public/tables/cors_settings/table + +BEGIN; + +DROP TABLE IF EXISTS services_public.cors_settings; + +COMMIT; diff --git a/extensions/@pgpm/services/revert/schemas/services_public/tables/database_settings/table.sql b/extensions/@pgpm/services/revert/schemas/services_public/tables/database_settings/table.sql new file mode 100644 index 00000000..dbc13091 --- /dev/null +++ b/extensions/@pgpm/services/revert/schemas/services_public/tables/database_settings/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/services_public/tables/database_settings/table + +BEGIN; + +DROP TABLE IF EXISTS services_public.database_settings; + +COMMIT; diff --git a/extensions/@pgpm/services/revert/schemas/services_public/tables/domains/table.sql b/extensions/@pgpm/services/revert/schemas/services_public/tables/domains/table.sql new file mode 100644 index 00000000..44b47a3e --- /dev/null +++ b/extensions/@pgpm/services/revert/schemas/services_public/tables/domains/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/services_public/tables/domains/table from pg + +BEGIN; + +DROP TABLE services_public.domains; + +COMMIT; diff --git a/extensions/@pgpm/services/revert/schemas/services_public/tables/pubkey_settings/table.sql b/extensions/@pgpm/services/revert/schemas/services_public/tables/pubkey_settings/table.sql new file mode 100644 index 00000000..c1a12a23 --- /dev/null +++ b/extensions/@pgpm/services/revert/schemas/services_public/tables/pubkey_settings/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/services_public/tables/pubkey_settings/table + +BEGIN; + +DROP TABLE IF EXISTS services_public.pubkey_settings; + +COMMIT; diff --git a/extensions/@pgpm/services/revert/schemas/services_public/tables/rls_settings/table.sql b/extensions/@pgpm/services/revert/schemas/services_public/tables/rls_settings/table.sql new file mode 100644 index 00000000..ca78acb0 --- /dev/null +++ b/extensions/@pgpm/services/revert/schemas/services_public/tables/rls_settings/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/services_public/tables/rls_settings/table + +BEGIN; + +DROP TABLE IF EXISTS services_public.rls_settings; + +COMMIT; diff --git a/extensions/@pgpm/services/revert/schemas/services_public/tables/site_metadata/table.sql b/extensions/@pgpm/services/revert/schemas/services_public/tables/site_metadata/table.sql new file mode 100644 index 00000000..cef080d5 --- /dev/null +++ b/extensions/@pgpm/services/revert/schemas/services_public/tables/site_metadata/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/services_public/tables/site_metadata/table from pg + +BEGIN; + +DROP TABLE services_public.site_metadata; + +COMMIT; diff --git a/extensions/@pgpm/services/revert/schemas/services_public/tables/site_modules/table.sql b/extensions/@pgpm/services/revert/schemas/services_public/tables/site_modules/table.sql new file mode 100644 index 00000000..a63f2042 --- /dev/null +++ b/extensions/@pgpm/services/revert/schemas/services_public/tables/site_modules/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/services_public/tables/site_modules/table from pg + +BEGIN; + +DROP TABLE services_public.site_modules; + +COMMIT; diff --git a/extensions/@pgpm/services/revert/schemas/services_public/tables/site_themes/table.sql b/extensions/@pgpm/services/revert/schemas/services_public/tables/site_themes/table.sql new file mode 100644 index 00000000..21f2965c --- /dev/null +++ b/extensions/@pgpm/services/revert/schemas/services_public/tables/site_themes/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/services_public/tables/site_themes/table from pg + +BEGIN; + +DROP TABLE services_public.site_themes; + +COMMIT; diff --git a/extensions/@pgpm/services/revert/schemas/services_public/tables/sites/table.sql b/extensions/@pgpm/services/revert/schemas/services_public/tables/sites/table.sql new file mode 100644 index 00000000..913178bb --- /dev/null +++ b/extensions/@pgpm/services/revert/schemas/services_public/tables/sites/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/services_public/tables/sites/table from pg + +BEGIN; + +DROP TABLE services_public.sites; + +COMMIT; diff --git a/extensions/@pgpm/services/revert/schemas/services_public/tables/webauthn_settings/table.sql b/extensions/@pgpm/services/revert/schemas/services_public/tables/webauthn_settings/table.sql new file mode 100644 index 00000000..16e6667b --- /dev/null +++ b/extensions/@pgpm/services/revert/schemas/services_public/tables/webauthn_settings/table.sql @@ -0,0 +1,7 @@ +-- Revert schemas/services_public/tables/webauthn_settings/table + +BEGIN; + +DROP TABLE IF EXISTS services_public.webauthn_settings; + +COMMIT; diff --git a/extensions/@pgpm/services/services.control b/extensions/@pgpm/services/services.control new file mode 100644 index 00000000..8f6e433d --- /dev/null +++ b/extensions/@pgpm/services/services.control @@ -0,0 +1,7 @@ +# services extension +comment = 'services extension - schemas for module registration and service configuration' +default_version = '0.26.3' +module_pathname = '$libdir/services' +requires = 'plpgsql,metaschema-schema,pgpm-verify' +relocatable = false +superuser = false diff --git a/extensions/@pgpm/services/sql/services--0.26.3.sql b/extensions/@pgpm/services/sql/services--0.26.3.sql new file mode 100644 index 00000000..b1d54b02 --- /dev/null +++ b/extensions/@pgpm/services/sql/services--0.26.3.sql @@ -0,0 +1,838 @@ +\echo Use "CREATE EXTENSION services" to load this file. \quit +CREATE SCHEMA services_private; + +GRANT USAGE ON SCHEMA services_private TO authenticated; + +GRANT USAGE ON SCHEMA services_private TO administrator; + +ALTER DEFAULT PRIVILEGES IN SCHEMA services_private + GRANT ALL ON TABLES TO administrator; + +ALTER DEFAULT PRIVILEGES IN SCHEMA services_private + GRANT ALL ON SEQUENCES TO administrator; + +ALTER DEFAULT PRIVILEGES IN SCHEMA services_private + GRANT ALL ON FUNCTIONS TO administrator; + +CREATE SCHEMA services_public; + +GRANT USAGE ON SCHEMA services_public TO authenticated; + +GRANT USAGE ON SCHEMA services_public TO administrator; + +ALTER DEFAULT PRIVILEGES IN SCHEMA services_public + GRANT ALL ON TABLES TO administrator; + +ALTER DEFAULT PRIVILEGES IN SCHEMA services_public + GRANT ALL ON SEQUENCES TO administrator; + +ALTER DEFAULT PRIVILEGES IN SCHEMA services_public + GRANT ALL ON FUNCTIONS TO administrator; + +CREATE TABLE services_public.apis ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + name text NOT NULL, + dbname text NOT NULL DEFAULT current_database(), + role_name text NOT NULL DEFAULT 'authenticated', + anon_role text NOT NULL DEFAULT 'anonymous', + is_public boolean NOT NULL DEFAULT true, + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + UNIQUE (database_id, name) +); + +COMMENT ON TABLE services_public.apis IS 'API endpoint configurations: each record defines a PostGraphile/PostgREST API with its database role and public access settings'; + +COMMENT ON COLUMN services_public.apis.id IS 'Unique identifier for this API'; + +COMMENT ON COLUMN services_public.apis.database_id IS 'Reference to the metaschema database this API serves'; + +COMMENT ON COLUMN services_public.apis.name IS 'Unique name for this API within its database'; + +COMMENT ON COLUMN services_public.apis.dbname IS 'PostgreSQL database name to connect to'; + +COMMENT ON COLUMN services_public.apis.role_name IS 'PostgreSQL role used for authenticated requests'; + +COMMENT ON COLUMN services_public.apis.anon_role IS 'PostgreSQL role used for anonymous/unauthenticated requests'; + +COMMENT ON COLUMN services_public.apis.is_public IS 'Whether this API is publicly accessible without authentication'; + +CREATE INDEX apis_database_id_idx ON services_public.apis (database_id); + +CREATE TABLE services_public.api_modules ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + api_id uuid NOT NULL, + name text NOT NULL, + data pg_catalog.json NOT NULL, + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE +); + +COMMENT ON TABLE services_public.api_modules IS 'Server-side module configuration for an API endpoint; stores module name and JSON settings used by the application server'; + +COMMENT ON COLUMN services_public.api_modules.id IS 'Unique identifier for this API module record'; + +COMMENT ON COLUMN services_public.api_modules.database_id IS 'Reference to the metaschema database'; + +COMMENT ON COLUMN services_public.api_modules.api_id IS 'API this module configuration belongs to'; + +COMMENT ON COLUMN services_public.api_modules.name IS 'Module name (e.g. auth, uploads, webhooks)'; + +COMMENT ON COLUMN services_public.api_modules.data IS 'JSON configuration data for this module'; + +ALTER TABLE services_public.api_modules + ADD CONSTRAINT api_modules_api_id_fkey + FOREIGN KEY(api_id) + REFERENCES services_public.apis (id); + +CREATE INDEX api_modules_api_id_idx ON services_public.api_modules (api_id); + +CREATE INDEX api_modules_database_id_idx ON services_public.api_modules (database_id); + +CREATE TABLE services_public.api_schemas ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + schema_id uuid NOT NULL, + api_id uuid NOT NULL, + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT schema_fkey + FOREIGN KEY(schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE CASCADE, + CONSTRAINT api_fkey + FOREIGN KEY(api_id) + REFERENCES services_public.apis (id) + ON DELETE CASCADE, + UNIQUE (api_id, schema_id) +); + +COMMENT ON TABLE services_public.api_schemas IS 'Join table linking APIs to the database schemas they expose; controls which schemas are accessible through each API'; + +COMMENT ON COLUMN services_public.api_schemas.id IS 'Unique identifier for this API-schema mapping'; + +COMMENT ON COLUMN services_public.api_schemas.database_id IS 'Reference to the metaschema database'; + +COMMENT ON COLUMN services_public.api_schemas.schema_id IS 'Metaschema schema being exposed through the API'; + +COMMENT ON COLUMN services_public.api_schemas.api_id IS 'API that exposes this schema'; + +CREATE INDEX api_schemas_database_id_idx ON services_public.api_schemas (database_id); + +CREATE INDEX api_schemas_schema_id_idx ON services_public.api_schemas (schema_id); + +CREATE INDEX api_schemas_api_id_idx ON services_public.api_schemas (api_id); + +CREATE TABLE services_public.sites ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + title text, + description text, + og_image image, + favicon attachment, + apple_touch_icon image, + logo image, + dbname text NOT NULL DEFAULT current_database(), + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT max_title + CHECK (character_length(title) <= 120), + CONSTRAINT max_descr + CHECK (character_length(description) <= 120) +); + +COMMENT ON TABLE services_public.sites IS 'Top-level site configuration: branding assets, title, and description for a deployed application'; + +COMMENT ON COLUMN services_public.sites.id IS 'Unique identifier for this site'; + +COMMENT ON COLUMN services_public.sites.database_id IS 'Reference to the metaschema database this site belongs to'; + +COMMENT ON COLUMN services_public.sites.title IS 'Display title for the site (max 120 characters)'; + +COMMENT ON COLUMN services_public.sites.description IS 'Short description of the site (max 120 characters)'; + +COMMENT ON COLUMN services_public.sites.og_image IS 'Open Graph image used for social media link previews'; + +COMMENT ON COLUMN services_public.sites.favicon IS 'Browser favicon attachment'; + +COMMENT ON COLUMN services_public.sites.apple_touch_icon IS 'Apple touch icon for iOS home screen bookmarks'; + +COMMENT ON COLUMN services_public.sites.logo IS 'Primary logo image for the site'; + +COMMENT ON COLUMN services_public.sites.dbname IS 'PostgreSQL database name this site connects to'; + +CREATE INDEX sites_database_id_idx ON services_public.sites (database_id); + +CREATE TABLE services_public.apps ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + site_id uuid NOT NULL, + name text, + app_image image, + app_store_link url, + app_store_id text, + app_id_prefix text, + play_store_link url, + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + UNIQUE (site_id) +); + +COMMENT ON TABLE services_public.apps IS 'Mobile and native app configuration linked to a site, including store links and identifiers'; + +COMMENT ON COLUMN services_public.apps.id IS 'Unique identifier for this app'; + +COMMENT ON COLUMN services_public.apps.database_id IS 'Reference to the metaschema database this app belongs to'; + +COMMENT ON COLUMN services_public.apps.site_id IS 'Site this app is associated with (one app per site)'; + +COMMENT ON COLUMN services_public.apps.name IS 'Display name of the app'; + +COMMENT ON COLUMN services_public.apps.app_image IS 'App icon or promotional image'; + +COMMENT ON COLUMN services_public.apps.app_store_link IS 'URL to the Apple App Store listing'; + +COMMENT ON COLUMN services_public.apps.app_store_id IS 'Apple App Store application identifier'; + +COMMENT ON COLUMN services_public.apps.app_id_prefix IS 'Apple App ID prefix (Team ID) for universal links and associated domains'; + +COMMENT ON COLUMN services_public.apps.play_store_link IS 'URL to the Google Play Store listing'; + +ALTER TABLE services_public.apps + ADD CONSTRAINT apps_site_id_fkey + FOREIGN KEY(site_id) + REFERENCES services_public.sites (id); + +CREATE INDEX apps_site_id_idx ON services_public.apps (site_id); + +CREATE INDEX apps_database_id_idx ON services_public.apps (database_id); + +CREATE TABLE services_public.domains ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + api_id uuid, + site_id uuid, + subdomain hostname, + domain hostname, + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT api_fkey + FOREIGN KEY(api_id) + REFERENCES services_public.apis (id) + ON DELETE CASCADE, + CONSTRAINT site_fkey + FOREIGN KEY(site_id) + REFERENCES services_public.sites (id) + ON DELETE CASCADE, + CONSTRAINT one_route_chk + CHECK ( + (api_id IS NULL + AND site_id IS NULL) + OR (api_id IS NULL + AND site_id IS NOT NULL) + OR (api_id IS NOT NULL + AND site_id IS NULL) + ), + UNIQUE (subdomain, domain) +); + +COMMENT ON TABLE services_public.domains IS 'DNS domain and subdomain routing: maps hostnames to either an API endpoint or a site'; + +COMMENT ON COLUMN services_public.domains.id IS 'Unique identifier for this domain record'; + +COMMENT ON COLUMN services_public.domains.database_id IS 'Reference to the metaschema database this domain belongs to'; + +COMMENT ON COLUMN services_public.domains.api_id IS 'API endpoint this domain routes to (mutually exclusive with site_id)'; + +COMMENT ON COLUMN services_public.domains.site_id IS 'Site this domain routes to (mutually exclusive with api_id)'; + +COMMENT ON COLUMN services_public.domains.subdomain IS 'Subdomain portion of the hostname'; + +COMMENT ON COLUMN services_public.domains.domain IS 'Root domain of the hostname'; + +CREATE INDEX domains_database_id_idx ON services_public.domains (database_id); + +CREATE INDEX domains_api_id_idx ON services_public.domains (api_id); + +CREATE INDEX domains_site_id_idx ON services_public.domains (site_id); + +CREATE TABLE services_public.site_metadata ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + site_id uuid NOT NULL, + title text, + description text, + og_image image, + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CHECK (character_length(title) <= 120), + CHECK (character_length(description) <= 120) +); + +COMMENT ON TABLE services_public.site_metadata IS 'SEO and social sharing metadata for a site: page title, description, and Open Graph image'; + +COMMENT ON COLUMN services_public.site_metadata.id IS 'Unique identifier for this metadata record'; + +COMMENT ON COLUMN services_public.site_metadata.database_id IS 'Reference to the metaschema database'; + +COMMENT ON COLUMN services_public.site_metadata.site_id IS 'Site this metadata belongs to'; + +COMMENT ON COLUMN services_public.site_metadata.title IS 'Page title for SEO (max 120 characters)'; + +COMMENT ON COLUMN services_public.site_metadata.description IS 'Meta description for SEO and social sharing (max 120 characters)'; + +COMMENT ON COLUMN services_public.site_metadata.og_image IS 'Open Graph image for social media previews'; + +ALTER TABLE services_public.site_metadata + ADD CONSTRAINT site_metadata_site_id_fkey + FOREIGN KEY(site_id) + REFERENCES services_public.sites (id); + +CREATE INDEX site_metadata_site_id_idx ON services_public.site_metadata (site_id); + +CREATE INDEX site_metadata_database_id_idx ON services_public.site_metadata (database_id); + +CREATE TABLE services_public.site_modules ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + site_id uuid NOT NULL, + name text NOT NULL, + data pg_catalog.json NOT NULL, + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE +); + +COMMENT ON TABLE services_public.site_modules IS 'Site-level module configuration; stores module name and JSON settings used by the frontend or server for each site'; + +COMMENT ON COLUMN services_public.site_modules.id IS 'Unique identifier for this site module record'; + +COMMENT ON COLUMN services_public.site_modules.database_id IS 'Reference to the metaschema database'; + +COMMENT ON COLUMN services_public.site_modules.site_id IS 'Site this module configuration belongs to'; + +COMMENT ON COLUMN services_public.site_modules.name IS 'Module name (e.g. user_auth_module, analytics)'; + +COMMENT ON COLUMN services_public.site_modules.data IS 'JSON configuration data for this module'; + +ALTER TABLE services_public.site_modules + ADD CONSTRAINT site_modules_site_id_fkey + FOREIGN KEY(site_id) + REFERENCES services_public.sites (id); + +CREATE INDEX site_modules_site_id_idx ON services_public.site_modules (site_id); + +CREATE INDEX site_modules_database_id_idx ON services_public.site_modules (database_id); + +CREATE TABLE services_public.site_themes ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + site_id uuid NOT NULL, + theme jsonb NOT NULL, + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE +); + +COMMENT ON TABLE services_public.site_themes IS 'Theme configuration for a site; stores design tokens, colors, and typography as JSONB'; + +COMMENT ON COLUMN services_public.site_themes.id IS 'Unique identifier for this theme record'; + +COMMENT ON COLUMN services_public.site_themes.database_id IS 'Reference to the metaschema database'; + +COMMENT ON COLUMN services_public.site_themes.site_id IS 'Site this theme belongs to'; + +COMMENT ON COLUMN services_public.site_themes.theme IS 'JSONB object containing theme tokens (colors, typography, spacing, etc.)'; + +ALTER TABLE services_public.site_themes + ADD CONSTRAINT site_themes_site_id_fkey + FOREIGN KEY(site_id) + REFERENCES services_public.sites (id); + +CREATE INDEX site_themes_site_id_idx ON services_public.site_themes (site_id); + +CREATE INDEX site_themes_database_id_idx ON services_public.site_themes (database_id); + +CREATE FUNCTION services_private.tg_enforce_api_table_name_uniqueness() RETURNS trigger AS $EOFCODE$ +DECLARE + new_name_hash bytea; + conflicting_api_name text; + conflicting_table_name text; +BEGIN + -- Compute the plural-hash of the new table name + new_name_hash := metaschema_private.table_name_hash(NEW.name); + + -- Check if any API that includes this table's schema also includes + -- another schema containing a table with the same name hash + SELECT a.name, t.name + INTO conflicting_api_name, conflicting_table_name + FROM services_public.api_schemas AS my_api + JOIN services_public.api_schemas AS other_api + ON other_api.api_id = my_api.api_id + AND other_api.schema_id IS DISTINCT FROM NEW.schema_id + JOIN metaschema_public.table AS t + ON t.schema_id = other_api.schema_id + AND metaschema_private.table_name_hash(t.name) = new_name_hash + JOIN services_public.apis AS a + ON a.id = my_api.api_id + WHERE my_api.schema_id = NEW.schema_id + LIMIT 1; + + IF conflicting_api_name IS NOT NULL THEN + RAISE EXCEPTION 'Table name "%" conflicts with existing table "%" in API "%". Table names must be unique (by plural form) across all schemas within the same API.', + NEW.name, conflicting_table_name, conflicting_api_name; + END IF; + + RETURN NEW; +END; +$EOFCODE$ LANGUAGE plpgsql VOLATILE; + +CREATE TRIGGER _000003_enforce_api_table_name_uniqueness + BEFORE INSERT + ON metaschema_public."table" + FOR EACH ROW + EXECUTE PROCEDURE services_private.tg_enforce_api_table_name_uniqueness(); + +CREATE TRIGGER _000003_enforce_api_table_name_uniqueness_update + BEFORE UPDATE + ON metaschema_public."table" + FOR EACH ROW + WHEN (new.name IS DISTINCT FROM old.name + OR new.schema_id IS DISTINCT FROM old.schema_id) + EXECUTE PROCEDURE services_private.tg_enforce_api_table_name_uniqueness(); + +CREATE FUNCTION services_private.tg_enforce_api_schema_table_name_uniqueness() RETURNS trigger AS $EOFCODE$ +DECLARE + conflicting_new_table text; + conflicting_existing_table text; +BEGIN + -- Find any table name collision between the newly linked schema + -- and any schema already linked to the same API + SELECT new_t.name, existing_t.name + INTO conflicting_new_table, conflicting_existing_table + FROM metaschema_public.table AS new_t + JOIN services_public.api_schemas AS existing_link + ON existing_link.api_id = NEW.api_id + AND existing_link.schema_id IS DISTINCT FROM NEW.schema_id + JOIN metaschema_public.table AS existing_t + ON existing_t.schema_id = existing_link.schema_id + AND metaschema_private.table_name_hash(existing_t.name) = metaschema_private.table_name_hash(new_t.name) + WHERE new_t.schema_id = NEW.schema_id + LIMIT 1; + + IF conflicting_new_table IS NOT NULL THEN + RAISE EXCEPTION 'Cannot link schema to API: table "%" conflicts with existing table "%" already exposed in this API. Table names must be unique (by plural form) across all schemas within the same API.', + conflicting_new_table, conflicting_existing_table; + END IF; + + RETURN NEW; +END; +$EOFCODE$ LANGUAGE plpgsql VOLATILE; + +CREATE TRIGGER _000001_enforce_api_schema_table_name_uniqueness + BEFORE INSERT + ON services_public.api_schemas + FOR EACH ROW + EXECUTE PROCEDURE services_private.tg_enforce_api_schema_table_name_uniqueness(); + +CREATE TABLE services_public.database_settings ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL UNIQUE, + enable_aggregates boolean NOT NULL DEFAULT false, + enable_postgis boolean NOT NULL DEFAULT true, + enable_search boolean NOT NULL DEFAULT true, + enable_direct_uploads boolean NOT NULL DEFAULT true, + enable_presigned_uploads boolean NOT NULL DEFAULT true, + enable_many_to_many boolean NOT NULL DEFAULT true, + enable_connection_filter boolean NOT NULL DEFAULT true, + enable_ltree boolean NOT NULL DEFAULT true, + enable_llm boolean NOT NULL DEFAULT false, + enable_realtime boolean NOT NULL DEFAULT false, + enable_bulk boolean NOT NULL DEFAULT false, + enable_i18n boolean NOT NULL DEFAULT false, + options jsonb NOT NULL DEFAULT '{}'::jsonb, + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE +); + +COMMENT ON TABLE services_public.database_settings IS 'Database-wide feature flags and settings; controls which platform features are available to all APIs in this database'; + +COMMENT ON COLUMN services_public.database_settings.id IS 'Unique identifier for this settings record'; + +COMMENT ON COLUMN services_public.database_settings.database_id IS 'Reference to the metaschema database these settings apply to'; + +COMMENT ON COLUMN services_public.database_settings.enable_aggregates IS 'Enable aggregate queries (sum, avg, min, max, etc.) in the GraphQL API'; + +COMMENT ON COLUMN services_public.database_settings.enable_postgis IS 'Enable PostGIS spatial types and operators in the GraphQL API'; + +COMMENT ON COLUMN services_public.database_settings.enable_search IS 'Enable unified search (tsvector, BM25, pg_trgm, pgvector) in the GraphQL API'; + +COMMENT ON COLUMN services_public.database_settings.enable_direct_uploads IS 'Enable direct (multipart) file upload mutations in the GraphQL API'; + +COMMENT ON COLUMN services_public.database_settings.enable_presigned_uploads IS 'Enable presigned URL upload flow for S3/MinIO storage'; + +COMMENT ON COLUMN services_public.database_settings.enable_many_to_many IS 'Enable many-to-many relationship queries in the GraphQL API'; + +COMMENT ON COLUMN services_public.database_settings.enable_connection_filter IS 'Enable connection filter (where argument) in the GraphQL API'; + +COMMENT ON COLUMN services_public.database_settings.enable_ltree IS 'Enable ltree hierarchical data type support in the GraphQL API'; + +COMMENT ON COLUMN services_public.database_settings.enable_llm IS 'Enable LLM/AI integration features in the GraphQL API'; + +COMMENT ON COLUMN services_public.database_settings.enable_realtime IS 'Enable realtime subscriptions (cursor-tracked change delivery) in the GraphQL API'; + +COMMENT ON COLUMN services_public.database_settings.enable_bulk IS 'Enable bulk mutation operations (insert, upsert, update, delete) in the GraphQL API'; + +COMMENT ON COLUMN services_public.database_settings.enable_i18n IS 'Enable internationalization plugin (localeStrings field, translation table discovery) in the GraphQL API'; + +COMMENT ON COLUMN services_public.database_settings.options IS 'Extensible JSON for additional settings that do not have dedicated columns'; + +CREATE INDEX database_settings_database_id_idx ON services_public.database_settings (database_id); + +CREATE TABLE services_public.api_settings ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + api_id uuid NOT NULL UNIQUE, + enable_aggregates boolean, + enable_postgis boolean, + enable_search boolean, + enable_direct_uploads boolean, + enable_presigned_uploads boolean, + enable_many_to_many boolean, + enable_connection_filter boolean, + enable_ltree boolean, + enable_llm boolean, + enable_realtime boolean, + enable_bulk boolean, + enable_i18n boolean, + options jsonb NOT NULL DEFAULT '{}'::jsonb, + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT api_fkey + FOREIGN KEY(api_id) + REFERENCES services_public.apis (id) + ON DELETE CASCADE +); + +COMMENT ON TABLE services_public.api_settings IS 'Per-API feature flag overrides; NULL columns inherit from database_settings, explicit true/false overrides the database default'; + +COMMENT ON COLUMN services_public.api_settings.id IS 'Unique identifier for this API settings record'; + +COMMENT ON COLUMN services_public.api_settings.database_id IS 'Reference to the metaschema database'; + +COMMENT ON COLUMN services_public.api_settings.api_id IS 'API these settings override for'; + +COMMENT ON COLUMN services_public.api_settings.enable_aggregates IS 'Override: enable aggregate queries (NULL = inherit from database_settings)'; + +COMMENT ON COLUMN services_public.api_settings.enable_postgis IS 'Override: enable PostGIS spatial types (NULL = inherit from database_settings)'; + +COMMENT ON COLUMN services_public.api_settings.enable_search IS 'Override: enable unified search (NULL = inherit from database_settings)'; + +COMMENT ON COLUMN services_public.api_settings.enable_direct_uploads IS 'Override: enable direct (multipart) file uploads (NULL = inherit from database_settings)'; + +COMMENT ON COLUMN services_public.api_settings.enable_presigned_uploads IS 'Override: enable presigned URL upload flow (NULL = inherit from database_settings)'; + +COMMENT ON COLUMN services_public.api_settings.enable_many_to_many IS 'Override: enable many-to-many relationships (NULL = inherit from database_settings)'; + +COMMENT ON COLUMN services_public.api_settings.enable_connection_filter IS 'Override: enable connection filter (NULL = inherit from database_settings)'; + +COMMENT ON COLUMN services_public.api_settings.enable_ltree IS 'Override: enable ltree hierarchical data type (NULL = inherit from database_settings)'; + +COMMENT ON COLUMN services_public.api_settings.enable_llm IS 'Override: enable LLM/AI integration features (NULL = inherit from database_settings)'; + +COMMENT ON COLUMN services_public.api_settings.enable_realtime IS 'Override: enable realtime subscriptions (NULL = inherit from database_settings)'; + +COMMENT ON COLUMN services_public.api_settings.enable_bulk IS 'Override: enable bulk mutations (NULL = inherit from database_settings)'; + +COMMENT ON COLUMN services_public.api_settings.enable_i18n IS 'Override: enable internationalization plugin (NULL = inherit from database_settings)'; + +COMMENT ON COLUMN services_public.api_settings.options IS 'Extensible JSON for additional per-API settings that do not have dedicated columns'; + +CREATE INDEX api_settings_database_id_idx ON services_public.api_settings (database_id); + +CREATE INDEX api_settings_api_id_idx ON services_public.api_settings (api_id); + +CREATE TABLE services_public.rls_settings ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL UNIQUE, + authenticate_schema_id uuid, + role_schema_id uuid, + authenticate_function_id uuid, + authenticate_strict_function_id uuid, + current_role_function_id uuid, + current_role_id_function_id uuid, + current_user_agent_function_id uuid, + current_ip_address_function_id uuid, + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT authenticate_schema_fkey + FOREIGN KEY(authenticate_schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE SET NULL, + CONSTRAINT role_schema_fkey + FOREIGN KEY(role_schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE SET NULL, + CONSTRAINT authenticate_function_fkey + FOREIGN KEY(authenticate_function_id) + REFERENCES metaschema_public.function (id) + ON DELETE SET NULL, + CONSTRAINT authenticate_strict_function_fkey + FOREIGN KEY(authenticate_strict_function_id) + REFERENCES metaschema_public.function (id) + ON DELETE SET NULL, + CONSTRAINT current_role_function_fkey + FOREIGN KEY(current_role_function_id) + REFERENCES metaschema_public.function (id) + ON DELETE SET NULL, + CONSTRAINT current_role_id_function_fkey + FOREIGN KEY(current_role_id_function_id) + REFERENCES metaschema_public.function (id) + ON DELETE SET NULL, + CONSTRAINT current_user_agent_function_fkey + FOREIGN KEY(current_user_agent_function_id) + REFERENCES metaschema_public.function (id) + ON DELETE SET NULL, + CONSTRAINT current_ip_address_function_fkey + FOREIGN KEY(current_ip_address_function_id) + REFERENCES metaschema_public.function (id) + ON DELETE SET NULL +); + +COMMENT ON TABLE services_public.rls_settings IS 'Per-database RLS module runtime configuration; typed replacement for api_modules rls_module JSONB entries'; + +COMMENT ON COLUMN services_public.rls_settings.id IS 'Unique identifier for this RLS settings record'; + +COMMENT ON COLUMN services_public.rls_settings.database_id IS 'Reference to the metaschema database'; + +COMMENT ON COLUMN services_public.rls_settings.authenticate_schema_id IS 'Schema containing authenticate/authenticate_strict functions (FK to metaschema_public.schema)'; + +COMMENT ON COLUMN services_public.rls_settings.role_schema_id IS 'Schema containing current_role and related functions (FK to metaschema_public.schema)'; + +COMMENT ON COLUMN services_public.rls_settings.authenticate_function_id IS 'Reference to the authenticate function (FK to metaschema_public.function)'; + +COMMENT ON COLUMN services_public.rls_settings.authenticate_strict_function_id IS 'Reference to the strict authenticate function (FK to metaschema_public.function)'; + +COMMENT ON COLUMN services_public.rls_settings.current_role_function_id IS 'Reference to the current_role function (FK to metaschema_public.function)'; + +COMMENT ON COLUMN services_public.rls_settings.current_role_id_function_id IS 'Reference to the current_role_id function (FK to metaschema_public.function)'; + +COMMENT ON COLUMN services_public.rls_settings.current_user_agent_function_id IS 'Reference to the current_user_agent function (FK to metaschema_public.function)'; + +COMMENT ON COLUMN services_public.rls_settings.current_ip_address_function_id IS 'Reference to the current_ip_address function (FK to metaschema_public.function)'; + +CREATE INDEX rls_settings_database_id_idx ON services_public.rls_settings (database_id); + +CREATE TABLE services_public.cors_settings ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL, + api_id uuid, + allowed_origins text[] NOT NULL DEFAULT '{}', + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT api_fkey + FOREIGN KEY(api_id) + REFERENCES services_public.apis (id) + ON DELETE CASCADE, + CONSTRAINT cors_settings_unique + UNIQUE (database_id, api_id) +); + +COMMENT ON TABLE services_public.cors_settings IS 'Per-database and per-API CORS origin configuration; typed replacement for api_modules cors JSONB entries'; + +COMMENT ON COLUMN services_public.cors_settings.id IS 'Unique identifier for this CORS settings record'; + +COMMENT ON COLUMN services_public.cors_settings.database_id IS 'Reference to the metaschema database'; + +COMMENT ON COLUMN services_public.cors_settings.api_id IS 'Optional API for per-API override; NULL means database-wide default'; + +COMMENT ON COLUMN services_public.cors_settings.allowed_origins IS 'Array of allowed CORS origins (e.g. https://example.com)'; + +CREATE INDEX cors_settings_database_id_idx ON services_public.cors_settings (database_id); + +CREATE INDEX cors_settings_api_id_idx ON services_public.cors_settings (api_id); + +CREATE TABLE services_public.pubkey_settings ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL UNIQUE, + schema_id uuid, + crypto_network text NOT NULL DEFAULT 'cosmos', + user_field text NOT NULL DEFAULT 'user_id', + sign_up_with_key_function_id uuid, + sign_in_request_challenge_function_id uuid, + sign_in_record_failure_function_id uuid, + sign_in_with_challenge_function_id uuid, + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT schema_fkey + FOREIGN KEY(schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE SET NULL, + CONSTRAINT sign_up_with_key_function_fkey + FOREIGN KEY(sign_up_with_key_function_id) + REFERENCES metaschema_public.function (id) + ON DELETE SET NULL, + CONSTRAINT sign_in_request_challenge_function_fkey + FOREIGN KEY(sign_in_request_challenge_function_id) + REFERENCES metaschema_public.function (id) + ON DELETE SET NULL, + CONSTRAINT sign_in_record_failure_function_fkey + FOREIGN KEY(sign_in_record_failure_function_id) + REFERENCES metaschema_public.function (id) + ON DELETE SET NULL, + CONSTRAINT sign_in_with_challenge_function_fkey + FOREIGN KEY(sign_in_with_challenge_function_id) + REFERENCES metaschema_public.function (id) + ON DELETE SET NULL +); + +COMMENT ON TABLE services_public.pubkey_settings IS 'Per-database public-key crypto auth runtime configuration; typed replacement for api_modules pubkey_challenge JSONB entries'; + +COMMENT ON COLUMN services_public.pubkey_settings.id IS 'Unique identifier for this pubkey settings record'; + +COMMENT ON COLUMN services_public.pubkey_settings.database_id IS 'Reference to the metaschema database'; + +COMMENT ON COLUMN services_public.pubkey_settings.schema_id IS 'Schema containing the crypto auth functions (FK to metaschema_public.schema)'; + +COMMENT ON COLUMN services_public.pubkey_settings.crypto_network IS 'Crypto network for key derivation (e.g. cosmos, ethereum)'; + +COMMENT ON COLUMN services_public.pubkey_settings.user_field IS 'Field name used to identify the user in crypto auth functions'; + +COMMENT ON COLUMN services_public.pubkey_settings.sign_up_with_key_function_id IS 'Reference to the sign-up-with-key function (FK to metaschema_public.function)'; + +COMMENT ON COLUMN services_public.pubkey_settings.sign_in_request_challenge_function_id IS 'Reference to the sign-in challenge request function (FK to metaschema_public.function)'; + +COMMENT ON COLUMN services_public.pubkey_settings.sign_in_record_failure_function_id IS 'Reference to the sign-in failure recording function (FK to metaschema_public.function)'; + +COMMENT ON COLUMN services_public.pubkey_settings.sign_in_with_challenge_function_id IS 'Reference to the sign-in-with-challenge function (FK to metaschema_public.function)'; + +CREATE INDEX pubkey_settings_database_id_idx ON services_public.pubkey_settings (database_id); + +CREATE TABLE services_public.webauthn_settings ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + database_id uuid NOT NULL UNIQUE, + schema_id uuid, + credentials_schema_id uuid, + sessions_schema_id uuid, + session_secrets_schema_id uuid, + credentials_table_id uuid, + sessions_table_id uuid, + session_credentials_table_id uuid, + session_secrets_table_id uuid, + user_field_id uuid, + rp_id text NOT NULL DEFAULT '', + rp_name text NOT NULL DEFAULT '', + origin_allowlist text[] NOT NULL DEFAULT '{}', + attestation_type text NOT NULL DEFAULT 'none' CHECK (attestation_type IN ('none', 'indirect', 'direct', 'enterprise')), + require_user_verification boolean NOT NULL DEFAULT false, + resident_key text NOT NULL DEFAULT 'required' CHECK (resident_key IN ('discouraged', 'preferred', 'required')), + challenge_expiry_seconds bigint NOT NULL DEFAULT 300, + CONSTRAINT db_fkey + FOREIGN KEY(database_id) + REFERENCES metaschema_public.database (id) + ON DELETE CASCADE, + CONSTRAINT schema_fkey + FOREIGN KEY(schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE SET NULL, + CONSTRAINT credentials_schema_fkey + FOREIGN KEY(credentials_schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE SET NULL, + CONSTRAINT sessions_schema_fkey + FOREIGN KEY(sessions_schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE SET NULL, + CONSTRAINT session_secrets_schema_fkey + FOREIGN KEY(session_secrets_schema_id) + REFERENCES metaschema_public.schema (id) + ON DELETE SET NULL, + CONSTRAINT credentials_table_fkey + FOREIGN KEY(credentials_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE SET NULL, + CONSTRAINT sessions_table_fkey + FOREIGN KEY(sessions_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE SET NULL, + CONSTRAINT session_credentials_table_fkey + FOREIGN KEY(session_credentials_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE SET NULL, + CONSTRAINT session_secrets_table_fkey + FOREIGN KEY(session_secrets_table_id) + REFERENCES metaschema_public."table" (id) + ON DELETE SET NULL, + CONSTRAINT user_field_fkey + FOREIGN KEY(user_field_id) + REFERENCES metaschema_public.field (id) + ON DELETE SET NULL +); + +COMMENT ON TABLE services_public.webauthn_settings IS 'Per-database WebAuthn/passkey runtime configuration; typed replacement for api_modules webauthn_challenge JSONB entries'; + +COMMENT ON COLUMN services_public.webauthn_settings.id IS 'Unique identifier for this WebAuthn settings record'; + +COMMENT ON COLUMN services_public.webauthn_settings.database_id IS 'Reference to the metaschema database'; + +COMMENT ON COLUMN services_public.webauthn_settings.schema_id IS 'Schema containing WebAuthn auth procedures (FK to metaschema_public.schema)'; + +COMMENT ON COLUMN services_public.webauthn_settings.credentials_schema_id IS 'Schema of the webauthn_credentials table (FK to metaschema_public.schema)'; + +COMMENT ON COLUMN services_public.webauthn_settings.sessions_schema_id IS 'Schema of the sessions table (FK to metaschema_public.schema)'; + +COMMENT ON COLUMN services_public.webauthn_settings.session_secrets_schema_id IS 'Schema of the session_secrets table (FK to metaschema_public.schema)'; + +COMMENT ON COLUMN services_public.webauthn_settings.credentials_table_id IS 'Reference to the webauthn_credentials table (FK to metaschema_public.table)'; + +COMMENT ON COLUMN services_public.webauthn_settings.sessions_table_id IS 'Reference to the sessions table (FK to metaschema_public.table)'; + +COMMENT ON COLUMN services_public.webauthn_settings.session_credentials_table_id IS 'Reference to the session_credentials table (FK to metaschema_public.table)'; + +COMMENT ON COLUMN services_public.webauthn_settings.session_secrets_table_id IS 'Reference to the session_secrets table (FK to metaschema_public.table)'; + +COMMENT ON COLUMN services_public.webauthn_settings.user_field_id IS 'Reference to the user field on webauthn_credentials (FK to metaschema_public.field)'; + +COMMENT ON COLUMN services_public.webauthn_settings.rp_id IS 'WebAuthn Relying Party ID (typically the domain name)'; + +COMMENT ON COLUMN services_public.webauthn_settings.rp_name IS 'WebAuthn Relying Party display name'; + +COMMENT ON COLUMN services_public.webauthn_settings.origin_allowlist IS 'Allowed origins for WebAuthn registration and authentication'; + +COMMENT ON COLUMN services_public.webauthn_settings.attestation_type IS 'Attestation conveyance preference (none, indirect, direct, enterprise)'; + +COMMENT ON COLUMN services_public.webauthn_settings.require_user_verification IS 'Whether to require user verification (biometric/PIN) during auth'; + +COMMENT ON COLUMN services_public.webauthn_settings.resident_key IS 'Resident key requirement (discouraged, preferred, required)'; + +COMMENT ON COLUMN services_public.webauthn_settings.challenge_expiry_seconds IS 'Challenge TTL in seconds (default 300 = 5 minutes)'; + +CREATE INDEX webauthn_settings_database_id_idx ON services_public.webauthn_settings (database_id); \ No newline at end of file diff --git a/extensions/@pgpm/services/verify/schemas/services_private/triggers/enforce_api_schema_table_name_uniqueness.sql b/extensions/@pgpm/services/verify/schemas/services_private/triggers/enforce_api_schema_table_name_uniqueness.sql new file mode 100644 index 00000000..20fd8aee --- /dev/null +++ b/extensions/@pgpm/services/verify/schemas/services_private/triggers/enforce_api_schema_table_name_uniqueness.sql @@ -0,0 +1,10 @@ +-- Verify schemas/services_private/triggers/enforce_api_schema_table_name_uniqueness + +BEGIN; + +SELECT has_function_privilege( + 'services_private.tg_enforce_api_schema_table_name_uniqueness()', + 'execute' +); + +ROLLBACK; diff --git a/extensions/@pgpm/services/verify/schemas/services_private/triggers/enforce_api_table_name_uniqueness.sql b/extensions/@pgpm/services/verify/schemas/services_private/triggers/enforce_api_table_name_uniqueness.sql new file mode 100644 index 00000000..c9b35545 --- /dev/null +++ b/extensions/@pgpm/services/verify/schemas/services_private/triggers/enforce_api_table_name_uniqueness.sql @@ -0,0 +1,10 @@ +-- Verify schemas/services_private/triggers/enforce_api_table_name_uniqueness + +BEGIN; + +SELECT has_function_privilege( + 'services_private.tg_enforce_api_table_name_uniqueness()', + 'execute' +); + +ROLLBACK; diff --git a/extensions/@pgpm/services/verify/schemas/services_public/tables/api_settings/table.sql b/extensions/@pgpm/services/verify/schemas/services_public/tables/api_settings/table.sql new file mode 100644 index 00000000..1c026102 --- /dev/null +++ b/extensions/@pgpm/services/verify/schemas/services_public/tables/api_settings/table.sql @@ -0,0 +1,25 @@ +-- Verify schemas/services_public/tables/api_settings/table + +BEGIN; + +SELECT + id, + database_id, + api_id, + enable_aggregates, + enable_postgis, + enable_search, + enable_direct_uploads, + enable_presigned_uploads, + enable_many_to_many, + enable_connection_filter, + enable_ltree, + enable_llm, + enable_realtime, + enable_bulk, + enable_i18n, + options +FROM services_public.api_settings +WHERE false; + +ROLLBACK; diff --git a/extensions/@pgpm/services/verify/schemas/services_public/tables/cors_settings/table.sql b/extensions/@pgpm/services/verify/schemas/services_public/tables/cors_settings/table.sql new file mode 100644 index 00000000..8f86a332 --- /dev/null +++ b/extensions/@pgpm/services/verify/schemas/services_public/tables/cors_settings/table.sql @@ -0,0 +1,13 @@ +-- Verify schemas/services_public/tables/cors_settings/table + +BEGIN; + +SELECT + id, + database_id, + api_id, + allowed_origins +FROM services_public.cors_settings +WHERE false; + +ROLLBACK; diff --git a/extensions/@pgpm/services/verify/schemas/services_public/tables/database_settings/table.sql b/extensions/@pgpm/services/verify/schemas/services_public/tables/database_settings/table.sql new file mode 100644 index 00000000..50ff73c2 --- /dev/null +++ b/extensions/@pgpm/services/verify/schemas/services_public/tables/database_settings/table.sql @@ -0,0 +1,24 @@ +-- Verify schemas/services_public/tables/database_settings/table + +BEGIN; + +SELECT + id, + database_id, + enable_aggregates, + enable_postgis, + enable_search, + enable_direct_uploads, + enable_presigned_uploads, + enable_many_to_many, + enable_connection_filter, + enable_ltree, + enable_llm, + enable_realtime, + enable_bulk, + enable_i18n, + options +FROM services_public.database_settings +WHERE false; + +ROLLBACK; diff --git a/extensions/@pgpm/services/verify/schemas/services_public/tables/pubkey_settings/table.sql b/extensions/@pgpm/services/verify/schemas/services_public/tables/pubkey_settings/table.sql new file mode 100644 index 00000000..ce244d38 --- /dev/null +++ b/extensions/@pgpm/services/verify/schemas/services_public/tables/pubkey_settings/table.sql @@ -0,0 +1,18 @@ +-- Verify schemas/services_public/tables/pubkey_settings/table + +BEGIN; + +SELECT + id, + database_id, + schema_id, + crypto_network, + user_field, + sign_up_with_key_function_id, + sign_in_request_challenge_function_id, + sign_in_record_failure_function_id, + sign_in_with_challenge_function_id +FROM services_public.pubkey_settings +WHERE false; + +ROLLBACK; diff --git a/extensions/@pgpm/services/verify/schemas/services_public/tables/rls_settings/table.sql b/extensions/@pgpm/services/verify/schemas/services_public/tables/rls_settings/table.sql new file mode 100644 index 00000000..2bd25d79 --- /dev/null +++ b/extensions/@pgpm/services/verify/schemas/services_public/tables/rls_settings/table.sql @@ -0,0 +1,19 @@ +-- Verify schemas/services_public/tables/rls_settings/table + +BEGIN; + +SELECT + id, + database_id, + authenticate_schema_id, + role_schema_id, + authenticate_function_id, + authenticate_strict_function_id, + current_role_function_id, + current_role_id_function_id, + current_user_agent_function_id, + current_ip_address_function_id +FROM services_public.rls_settings +WHERE false; + +ROLLBACK; diff --git a/extensions/@pgpm/services/verify/schemas/services_public/tables/webauthn_settings/table.sql b/extensions/@pgpm/services/verify/schemas/services_public/tables/webauthn_settings/table.sql new file mode 100644 index 00000000..21580e86 --- /dev/null +++ b/extensions/@pgpm/services/verify/schemas/services_public/tables/webauthn_settings/table.sql @@ -0,0 +1,27 @@ +-- Verify schemas/services_public/tables/webauthn_settings/table + +BEGIN; + +SELECT + id, + database_id, + schema_id, + credentials_schema_id, + sessions_schema_id, + session_secrets_schema_id, + credentials_table_id, + sessions_table_id, + session_credentials_table_id, + session_secrets_table_id, + user_field_id, + rp_id, + rp_name, + origin_allowlist, + attestation_type, + require_user_verification, + resident_key, + challenge_expiry_seconds +FROM services_public.webauthn_settings +WHERE false; + +ROLLBACK; diff --git a/functions/example/handler.json b/functions/example/handler.json index 68ba3675..c9c570eb 100644 --- a/functions/example/handler.json +++ b/functions/example/handler.json @@ -1,7 +1,22 @@ { - "name": "knative-job-example", - "version": "1.1.0", + "name": "node-example", + "version": "1.0.0", "type": "node-graphql", "port": 8083, - "description": "Example Knative job function" + "taskIdentifier": "node-example", + "scope": "platform", + "description": "Example Node.js function — copy this to create a new function", + "requiredSecrets": [], + "requiredConfigs": [], + "payloadSchema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "A message to process" + } + }, + "additionalProperties": true + }, + "dependencies": {} } diff --git a/functions/example/handler.ts b/functions/example/handler.ts index dc83dc2d..61a412f2 100644 --- a/functions/example/handler.ts +++ b/functions/example/handler.ts @@ -1,14 +1,31 @@ import type { FunctionHandler } from '@constructive-io/fn-runtime'; -const handler: FunctionHandler = async (params: any) => { - if (params.throw) { - throw new Error('THROWN_ERROR'); - } +/** + * Example Node.js function handler. + * + * Copy this directory to create a new function: + * 1. cp -r functions/example functions/my-function + * 2. Edit handler.json (name, description, secrets, configs) + * 3. Implement your logic here + * 4. Run: make register && pgpm kill && make up + * + * The handler receives: + * - params: the job payload (JSON from the caller) + * - context: { client, meta, log, env, job } + * - client/meta: GraphQL clients (tenant-scoped) + * - log: structured logger + * - env: process.env + * - job: { jobId, workerId, databaseId, actorId } + */ +const handler: FunctionHandler = async (params, context) => { + const { log } = context; + + log.info('node-example received payload', { params }); return { - fn: 'example-fn', - message: 'hi I did a lot of work', - body: params + status: 'ok', + received: params, + timestamp: new Date().toISOString() }; }; diff --git a/functions/python-example/handler.json b/functions/python-example/handler.json index 66b98410..6412d1ab 100644 --- a/functions/python-example/handler.json +++ b/functions/python-example/handler.json @@ -1,6 +1,21 @@ { "name": "python-example", - "version": "0.1.0", - "description": "Example Python function", - "type": "python" + "version": "1.0.0", + "type": "python", + "port": 8084, + "taskIdentifier": "python-example", + "scope": "platform", + "description": "Example Python function — copy this to create a new Python function", + "requiredSecrets": [], + "requiredConfigs": [], + "payloadSchema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "A message to process" + } + }, + "additionalProperties": true + } } diff --git a/functions/python-example/handler.py b/functions/python-example/handler.py index fb15c03b..7eb05f91 100644 --- a/functions/python-example/handler.py +++ b/functions/python-example/handler.py @@ -1,9 +1,23 @@ +""" +Example Python function handler. + +Copy this directory to create a new Python function: + 1. cp -r functions/python-example functions/my-function + 2. Edit handler.json (name, description, secrets, configs) + 3. Implement your logic here + 4. Run: make register && pgpm kill && make up + +The handler receives a dict payload from the job queue +and returns a dict result. +""" + +from datetime import datetime, timezone + + async def handler(payload: dict) -> dict: - """ - Simple echo handler - returns the received payload. - """ + """Process a job payload and return a result.""" return { - "received": payload, "status": "ok", - "message": "Hello from Python!" + "received": payload, + "timestamp": datetime.now(timezone.utc).isoformat(), } diff --git a/functions/send-email/handler.json b/functions/send-email/handler.json index 61d4576e..f9320771 100644 --- a/functions/send-email/handler.json +++ b/functions/send-email/handler.json @@ -3,8 +3,55 @@ "version": "1.6.4", "type": "node-graphql", "port": 8081, - "taskIdentifier": "email:send_email", - "description": "Knative email function that sends emails directly from job payload", + "taskIdentifier": "send-email", + "scope": "platform", + "description": "Sends transactional emails via Mailgun or SMTP", + "requiredSecrets": [ + { "name": "MAILGUN_API_KEY", "required": false }, + { "name": "MAILGUN_DOMAIN", "required": false }, + { "name": "MAILGUN_FROM", "required": false } + ], + "requiredConfigs": [ + { "name": "EMAIL_SEND_USE_SMTP", "required": false }, + { "name": "SMTP_HOST", "required": false }, + { "name": "SMTP_PORT", "required": false }, + { "name": "SMTP_FROM", "required": false }, + { "name": "SEND_EMAIL_DRY_RUN", "required": false } + ], + "payloadSchema": { + "type": "object", + "required": ["to", "subject"], + "properties": { + "to": { + "type": "string", + "format": "email", + "description": "Recipient email address" + }, + "subject": { + "type": "string", + "description": "Email subject line" + }, + "html": { + "type": "string", + "description": "HTML body content" + }, + "text": { + "type": "string", + "description": "Plain text body content" + }, + "from": { + "type": "string", + "format": "email", + "description": "Sender email address (overrides env default)" + }, + "replyTo": { + "type": "string", + "format": "email", + "description": "Reply-to email address" + } + }, + "additionalProperties": false + }, "dependencies": { "@constructive-io/postmaster": "^1.5.2", "@pgpmjs/env": "^2.15.3", diff --git a/functions/send-verification-link/handler.json b/functions/send-verification-link/handler.json index 91b65616..a87868ab 100644 --- a/functions/send-verification-link/handler.json +++ b/functions/send-verification-link/handler.json @@ -3,8 +3,71 @@ "version": "2.6.4", "type": "node-graphql", "port": 8082, - "taskIdentifier": "email:send_verification_link", + "taskIdentifier": "send-verification-link", + "scope": "platform", "description": "Sends invite, password reset, and verification emails", + "requiredSecrets": [ + { "name": "MAILGUN_API_KEY", "required": false }, + { "name": "MAILGUN_DOMAIN", "required": false }, + { "name": "MAILGUN_FROM", "required": false }, + { "name": "MAILGUN_REPLY", "required": false } + ], + "requiredConfigs": [ + { "name": "EMAIL_SEND_USE_SMTP", "required": false }, + { "name": "SMTP_HOST", "required": false }, + { "name": "SMTP_PORT", "required": false }, + { "name": "SMTP_FROM", "required": false }, + { "name": "LOCAL_APP_PORT", "required": false }, + { "name": "SEND_VERIFICATION_LINK_DRY_RUN", "required": false } + ], + "payloadSchema": { + "type": "object", + "required": ["email_type", "email"], + "properties": { + "email_type": { + "type": "string", + "enum": ["invite_email", "forgot_password", "email_verification"], + "description": "Type of verification email to send" + }, + "email": { + "type": "string", + "format": "email", + "description": "Recipient email address" + }, + "invite_type": { + "type": ["number", "string"], + "description": "Invite type identifier (for invite_email)" + }, + "invite_token": { + "type": "string", + "description": "Invitation token (required for invite_email)" + }, + "sender_id": { + "type": "string", + "format": "uuid", + "description": "User ID of the sender (required for invite_email)" + }, + "user_id": { + "type": "string", + "format": "uuid", + "description": "User ID (required for forgot_password)" + }, + "reset_token": { + "type": "string", + "description": "Password reset token (required for forgot_password)" + }, + "email_id": { + "type": "string", + "format": "uuid", + "description": "Email record ID (required for email_verification)" + }, + "verification_token": { + "type": "string", + "description": "Email verification token (required for email_verification)" + } + }, + "additionalProperties": false + }, "dependencies": { "@constructive-io/postmaster": "^1.5.2", "@launchql/mjml": "0.1.1", diff --git a/job/compute-service/README.md b/job/compute-service/README.md new file mode 100644 index 00000000..8a6ec91e --- /dev/null +++ b/job/compute-service/README.md @@ -0,0 +1,30 @@ +# @constructive-io/compute-service + +Platform-aware job service orchestrator. Mirrors `knative-job-service` but uses `ComputeWorker` for database-driven function discovery and invocation tracking. + +## What it starts + +1. HTTP callback server for job completion notifications +2. `ComputeWorker` — polls jobs and dispatches to functions discovered from the database +3. `Scheduler` — handles cron-like scheduled jobs +4. (Optional) In-process function servers from the manifest + +## Usage + +```bash +# As a standalone process +node job/compute-service/dist/run.js + +# Via the dev script (starts compute-service + all functions) +make dev-compute +``` + +## Environment variables + +| Variable | Default | Description | +|----------|---------|-------------| +| `COMPUTE_JOBS_ENABLED` | `true` | Enable/disable the compute worker | +| `JOBS_SCHEMA` | `app_jobs` | PostgreSQL schema for the jobs table | +| `INTERNAL_JOBS_CALLBACK_PORT` | `8080` | Port for the callback HTTP server | +| `COMPUTE_CALLBACK_URL` | — | URL functions POST to on completion | +| `COMPUTE_GATEWAY_URL` | — | Fallback gateway URL for functions without `service_url` | diff --git a/job/compute-service/package.json b/job/compute-service/package.json new file mode 100644 index 00000000..598b935e --- /dev/null +++ b/job/compute-service/package.json @@ -0,0 +1,37 @@ +{ + "name": "@constructive-io/compute-service", + "version": "0.1.0", + "description": "Platform-aware compute service — discovers functions from the database and tracks invocations", + "author": "Constructive ", + "private": true, + "main": "dist/index.js", + "bin": { + "compute-service": "dist/run.js" + }, + "scripts": { + "build": "makage build", + "build:dev": "makage build --dev", + "clean": "makage clean", + "lint": "eslint . --fix", + "start": "node dist/run.js" + }, + "dependencies": { + "@constructive-io/compute-worker": "workspace:^", + "@constructive-io/job-pg": "^2.5.4", + "@constructive-io/job-scheduler": "^2.5.4", + "@constructive-io/job-utils": "^2.5.4", + "@constructive-io/knative-job-fn": "workspace:^", + "@constructive-io/knative-job-server": "workspace:^", + "@pgpmjs/env": "^2.15.3", + "@pgpmjs/logger": "^2.4.3", + "async-retry": "1.3.3", + "pg": "8.20.0" + }, + "devDependencies": { + "@types/async-retry": "^1.4.9", + "@types/node": "^22.10.4", + "@types/pg": "^8.11.0", + "makage": "^0.1.12", + "typescript": "^5.1.6" + } +} diff --git a/job/compute-service/src/index.ts b/job/compute-service/src/index.ts new file mode 100644 index 00000000..fc8b172f --- /dev/null +++ b/job/compute-service/src/index.ts @@ -0,0 +1,442 @@ +/** + * ComputeService — platform-aware job service orchestrator. + * + * Mirrors the KnativeJobsSvc pattern from job/service but swaps the + * static Worker for the platform-aware ComputeWorker which discovers + * functions from the database and tracks invocations. + * + * It starts: + * 1. (optional) In-process function servers from the manifest + * 2. An HTTP callback server for job completion + * 3. A ComputeWorker that polls jobs and dispatches to functions + * 4. A Scheduler for cron-like scheduled jobs + */ + +import ComputeWorker from '@constructive-io/compute-worker'; +import poolManager from '@constructive-io/job-pg'; +import Scheduler from '@constructive-io/job-scheduler'; +import { + getJobPgConfig, + getJobsCallbackPort, + getJobSchema, + getSchedulerHostname, + getWorkerHostname, +} from '@constructive-io/job-utils'; +import jobServerFactory from '@constructive-io/knative-job-server'; +import { parseEnvBoolean } from '@pgpmjs/env'; +import { Logger } from '@pgpmjs/logger'; +import retry from 'async-retry'; +import type { Server as HttpServer } from 'http'; +import { createRequire } from 'module'; +import { Client } from 'pg'; + +import { + loadFunctionRegistry, +} from './registry'; +import type { + ComputeServiceOptions, + ComputeServiceResult, + FunctionName, + FunctionServiceConfig, + FunctionsOptions, + StartedFunction, +} from './types'; + +const functionRegistry = loadFunctionRegistry(); + +const log = new Logger('compute-service'); +const requireFn = createRequire(__filename); + +// ─── Function loading (same pattern as job/service) ────────────────────────── + +interface FunctionRegistryEntry { + moduleName: string; + defaultPort: number; +} + +const resolveFunctionEntry = (name: FunctionName): FunctionRegistryEntry => { + const entry = functionRegistry[name]; + if (!entry) { + throw new Error(`Unknown function "${name}".`); + } + return entry; +}; + +const loadFunctionApp = (moduleName: string) => { + const knativeModuleId = requireFn.resolve('@constructive-io/knative-job-fn'); + delete requireFn.cache[knativeModuleId]; + + const moduleId = requireFn.resolve(moduleName); + delete requireFn.cache[moduleId]; + + const mod = requireFn(moduleName) as { default?: { listen: (port: number, cb?: () => void) => unknown } }; + const app = mod.default ?? mod; + + if (!app || typeof (app as { listen?: unknown }).listen !== 'function') { + throw new Error(`Function module "${moduleName}" does not export a listenable app.`); + } + + return app as { listen: (port: number, cb?: () => void) => unknown }; +}; + +const shouldEnableFunctions = (options?: FunctionsOptions): boolean => { + if (!options) return false; + if (typeof options.enabled === 'boolean') return options.enabled; + return Boolean(options.services?.length); +}; + +const normalizeFunctionServices = ( + options?: FunctionsOptions +): FunctionServiceConfig[] => { + if (!shouldEnableFunctions(options)) return []; + + if (!options?.services?.length) { + return Object.keys(functionRegistry).map((name) => ({ + name: name as FunctionName + })); + } + + return options.services; +}; + +const resolveFunctionPort = (service: FunctionServiceConfig): number => { + const entry = resolveFunctionEntry(service.name); + return service.port ?? entry.defaultPort; +}; + +const ensureUniquePorts = (services: FunctionServiceConfig[]) => { + const usedPorts = new Set(); + for (const service of services) { + const port = resolveFunctionPort(service); + if (usedPorts.has(port)) { + throw new Error(`Function port ${port} is assigned more than once.`); + } + usedPorts.add(port); + } +}; + +const startFunction = async ( + service: FunctionServiceConfig, + functionServers: Map +): Promise => { + const entry = resolveFunctionEntry(service.name); + const port = resolveFunctionPort(service); + const app = loadFunctionApp(entry.moduleName); + + await new Promise((resolve, reject) => { + const server = app.listen(port, () => { + log.info(`function:${service.name} listening on ${port}`); + resolve(); + }) as HttpServer & { on?: (event: string, cb: (err: Error) => void) => void }; + + if (server?.on) { + server.on('error', (err) => { + log.error(`function:${service.name} failed to start`, err); + reject(err); + }); + } + + functionServers.set(service.name, server); + }); + + return { name: service.name, port }; +}; + +const startFunctions = async ( + options: FunctionsOptions | undefined, + functionServers: Map +): Promise => { + const services = normalizeFunctionServices(options); + if (!services.length) return []; + + ensureUniquePorts(services); + + const started: StartedFunction[] = []; + for (const service of services) { + started.push(await startFunction(service, functionServers)); + } + + return started; +}; + +// ─── Helpers ───────────────────────────────────────────────────────────────── + +type JobRunner = { + listen: () => void; + stop?: () => Promise | void; +}; + +const listenApp = async ( + app: { listen: (port: number, host?: string) => HttpServer }, + port: number, + host?: string +): Promise => + new Promise((resolveListen, rejectListen) => { + const server = host ? app.listen(port, host) : app.listen(port); + + const cleanup = () => { + server.off('listening', handleListen); + server.off('error', handleError); + }; + + const handleListen = () => { + cleanup(); + resolveListen(server); + }; + + const handleError = (err: Error) => { + cleanup(); + rejectListen(err); + }; + + server.once('listening', handleListen); + server.once('error', handleError); + }); + +const closeServer = async (server?: HttpServer | null): Promise => { + if (!server || !server.listening) return; + await new Promise((resolveClose, rejectClose) => { + server.close((err) => { + if (err) { + rejectClose(err); + return; + } + resolveClose(); + }); + }); +}; + +// ─── ComputeService ────────────────────────────────────────────────────────── + +export class ComputeService { + private options: ComputeServiceOptions; + private started = false; + private result: ComputeServiceResult = { + functions: [], + jobs: false + }; + private functionServers = new Map(); + private jobsHttpServer?: HttpServer; + private worker?: JobRunner; + private scheduler?: JobRunner; + private jobsPoolManager?: { close: () => Promise }; + + constructor(options: ComputeServiceOptions = {}) { + this.options = options; + } + + async start(): Promise { + if (this.started) return this.result; + this.started = true; + this.result = { + functions: [], + jobs: false + }; + + if (shouldEnableFunctions(this.options.functions)) { + log.info('starting functions'); + this.result.functions = await startFunctions( + this.options.functions, + this.functionServers + ); + } + + if (this.options.jobs?.enabled !== false) { + log.info('starting compute jobs service'); + await this.startJobs(); + this.result.jobs = true; + } + + return this.result; + } + + async stop(): Promise { + if (!this.started) return; + this.started = false; + + if (this.worker?.stop) { + await this.worker.stop(); + } + if (this.scheduler?.stop) { + await this.scheduler.stop(); + } + this.worker = undefined; + this.scheduler = undefined; + + await closeServer(this.jobsHttpServer); + this.jobsHttpServer = undefined; + + if (this.jobsPoolManager) { + await this.jobsPoolManager.close(); + this.jobsPoolManager = undefined; + } + + for (const server of this.functionServers.values()) { + await closeServer(server); + } + this.functionServers.clear(); + } + + private async startJobs(): Promise { + const pgPool = poolManager.getPool(); + const jobsApp = jobServerFactory(pgPool); + const callbackPort = getJobsCallbackPort(); + this.jobsHttpServer = await listenApp(jobsApp, callbackPort); + + // Platform-aware worker: discovers functions from the database + this.worker = new ComputeWorker({ + pgPool, + workerId: getWorkerHostname(), + }); + + this.scheduler = new Scheduler({ + pgPool, + tasks: [], // ComputeWorker accepts any task from the DB + workerId: getSchedulerHostname(), + }); + + this.jobsPoolManager = poolManager; + + this.worker.listen(); + this.scheduler.listen(); + } +} + +// ─── Env-based configuration ───────────────────────────────────────────────── + +const parseList = (value?: string): string[] => { + if (!value) return []; + return value.split(',').map((item) => item.trim()).filter(Boolean); +}; + +const parsePortMap = (value?: string): Record => { + if (!value) return {}; + const trimmed = value.trim(); + if (!trimmed) return {}; + if (trimmed.startsWith('{')) { + try { + const parsed = JSON.parse(trimmed) as Record; + return Object.entries(parsed).reduce>((acc, [key, port]) => { + const portNumber = Number(port); + if (Number.isFinite(portNumber)) { + acc[key] = portNumber; + } + return acc; + }, {}); + } catch { + return {}; + } + } + return trimmed.split(',').reduce>((acc, pair) => { + const [rawName, rawPort] = pair.split(/[:=]/).map((item) => item.trim()); + const port = Number(rawPort); + if (rawName && Number.isFinite(port)) { + acc[rawName] = port; + } + return acc; + }, {}); +}; + +const buildFunctionsOptionsFromEnv = (): ComputeServiceOptions['functions'] => { + const rawFunctions = (process.env.CONSTRUCTIVE_FUNCTIONS || '').trim(); + if (!rawFunctions) return undefined; + + const portMap = parsePortMap(process.env.CONSTRUCTIVE_FUNCTION_PORTS); + const normalized = rawFunctions.toLowerCase(); + + if (normalized === 'all' || normalized === '*') { + return { enabled: true }; + } + + const names = parseList(rawFunctions) as FunctionName[]; + if (!names.length) return undefined; + + const services: FunctionServiceConfig[] = names.map((name) => ({ + name, + port: portMap[name] + })); + + return { enabled: true, services }; +}; + +export const buildComputeServiceOptionsFromEnv = (): ComputeServiceOptions => ({ + jobs: { + enabled: parseEnvBoolean(process.env.COMPUTE_JOBS_ENABLED) ?? true + }, + functions: buildFunctionsOptionsFromEnv() +}); + +// ─── Prereqs ───────────────────────────────────────────────────────────────── + +export const waitForComputePrereqs = async (): Promise => { + log.info('waiting for compute prereqs'); + let client: Client | null = null; + try { + const cfg = getJobPgConfig(); + client = new Client({ + host: cfg.host, + port: cfg.port, + user: cfg.user, + password: cfg.password, + database: cfg.database + }); + await client.connect(); + + const schema = getJobSchema(); + await client.query(`SELECT * FROM "${schema}".jobs LIMIT 1;`); + + // Also verify the infra schema is deployed + await client.query( + 'SELECT count(*) FROM constructive_infra_public.platform_function_definitions LIMIT 1' + ); + log.info('compute prereqs satisfied (jobs table + infra schema present)'); + } catch (error) { + log.error(error); + throw new Error('compute-service boot failed — jobs table or infra schema not ready'); + } finally { + if (client) { + void client.end(); + } + } +}; + +// ─── Boot ──────────────────────────────────────────────────────────────────── + +export const bootCompute = async (): Promise => { + log.info('attempting to boot compute-service'); + await retry( + async () => { + await waitForComputePrereqs(); + }, + { + retries: 10, + factor: 2 + } + ); + + const options = buildComputeServiceOptionsFromEnv(); + + const pgConfig = getJobPgConfig(); + log.info('[compute-service] Starting with config:', { + database: pgConfig.database, + host: pgConfig.host, + port: pgConfig.port, + schema: getJobSchema(), + callbackPort: getJobsCallbackPort(), + workerHostname: getWorkerHostname(), + schedulerHostname: getSchedulerHostname(), + jobsEnabled: options.jobs?.enabled ?? true, + functionsEnabled: shouldEnableFunctions(options.functions), + functions: normalizeFunctionServices(options.functions).map(s => s.name) + }); + + if (options.jobs?.enabled === false) { + log.info('compute jobs disabled; skipping startup'); + return; + } + + const server = new ComputeService(options); + await server.start(); +}; + +export * from './types'; diff --git a/job/compute-service/src/registry.ts b/job/compute-service/src/registry.ts new file mode 100644 index 00000000..249e3734 --- /dev/null +++ b/job/compute-service/src/registry.ts @@ -0,0 +1,84 @@ +/** + * Function registry loader for the in-process function server. + * + * Sources, in priority order: + * 1. FUNCTIONS_REGISTRY env var + * Format: "name:moduleName:port,..." (port optional) + * Example: "send-email:@org/send-email-fn:8081,foo:@org/foo-fn" + * 2. FUNCTIONS_MANIFEST_PATH env var pointing to a JSON file with shape + * { functions: [{ name, dir, port, type, moduleName? }] } + * 3. Default file: /generated/functions-manifest.json + * + * If no source resolves, the registry is empty; callers throw on lookup of + * an unknown function (preserves the legacy "Unknown function X" behaviour). + */ +import * as fs from 'fs'; +import * as path from 'path'; + +export interface FunctionRegistryEntry { + moduleName: string; + defaultPort: number; +} + +export type FunctionRegistry = Record; + +const DEFAULT_MODULE_PREFIX = '@constructive-io/'; +const DEFAULT_MODULE_SUFFIX = '-fn'; + +const conventionalModuleName = (name: string): string => + `${DEFAULT_MODULE_PREFIX}${name}${DEFAULT_MODULE_SUFFIX}`; + +const parseEnvRegistry = (raw: string): FunctionRegistry => { + const out: FunctionRegistry = {}; + for (const pair of raw.split(',')) { + const trimmed = pair.trim(); + if (!trimmed) continue; + const [name, moduleName, portStr] = trimmed.split(':').map((s) => s.trim()); + if (!name) continue; + const portNumber = portStr ? Number(portStr) : NaN; + out[name] = { + moduleName: moduleName || conventionalModuleName(name), + defaultPort: Number.isFinite(portNumber) ? portNumber : 0, + }; + } + return out; +}; + +interface ManifestEntry { + name: string; + dir?: string; + port?: number; + type?: string; + moduleName?: string; +} + +const fromManifestEntry = (entry: ManifestEntry): FunctionRegistryEntry => ({ + moduleName: entry.moduleName ?? conventionalModuleName(entry.name), + defaultPort: typeof entry.port === 'number' ? entry.port : 0, +}); + +const loadManifestFile = (manifestPath: string): FunctionRegistry => { + const raw = fs.readFileSync(manifestPath, 'utf-8'); + const parsed = JSON.parse(raw) as { functions?: ManifestEntry[] }; + const out: FunctionRegistry = {}; + for (const entry of parsed.functions ?? []) { + if (!entry.name) continue; + out[entry.name] = fromManifestEntry(entry); + } + return out; +}; + +export const loadFunctionRegistry = ( + env: NodeJS.ProcessEnv = process.env, + cwd: string = process.cwd() +): FunctionRegistry => { + if (env.FUNCTIONS_REGISTRY) { + return parseEnvRegistry(env.FUNCTIONS_REGISTRY); + } + const manifestPath = + env.FUNCTIONS_MANIFEST_PATH ?? path.join(cwd, 'generated', 'functions-manifest.json'); + if (fs.existsSync(manifestPath)) { + return loadManifestFile(manifestPath); + } + return {}; +}; diff --git a/job/compute-service/src/run.ts b/job/compute-service/src/run.ts new file mode 100644 index 00000000..745aa4ba --- /dev/null +++ b/job/compute-service/src/run.ts @@ -0,0 +1,9 @@ +#!/usr/bin/env node + +export { bootCompute, waitForComputePrereqs } from './index'; + +import { bootCompute } from './index'; + +if (require.main === module) { + void bootCompute(); +} diff --git a/job/compute-service/src/types.ts b/job/compute-service/src/types.ts new file mode 100644 index 00000000..25d4dcaa --- /dev/null +++ b/job/compute-service/src/types.ts @@ -0,0 +1,30 @@ +export type FunctionName = string; + +export type FunctionServiceConfig = { + name: FunctionName; + port?: number; +}; + +export type FunctionsOptions = { + enabled?: boolean; + services?: FunctionServiceConfig[]; +}; + +export type JobsOptions = { + enabled?: boolean; +}; + +export type ComputeServiceOptions = { + functions?: FunctionsOptions; + jobs?: JobsOptions; +}; + +export type StartedFunction = { + name: FunctionName; + port: number; +}; + +export type ComputeServiceResult = { + functions: StartedFunction[]; + jobs: boolean; +}; diff --git a/job/compute-service/tsconfig.esm.json b/job/compute-service/tsconfig.esm.json new file mode 100644 index 00000000..800d7506 --- /dev/null +++ b/job/compute-service/tsconfig.esm.json @@ -0,0 +1,9 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "dist/esm", + "module": "es2022", + "rootDir": "src/", + "declaration": false + } +} diff --git a/job/compute-service/tsconfig.json b/job/compute-service/tsconfig.json new file mode 100644 index 00000000..1a9d5696 --- /dev/null +++ b/job/compute-service/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "outDir": "dist", + "rootDir": "src/" + }, + "include": ["src/**/*.ts"], + "exclude": ["dist", "node_modules", "**/*.spec.*", "**/*.test.*"] +} diff --git a/job/compute-worker/README.md b/job/compute-worker/README.md new file mode 100644 index 00000000..bb1b9e62 --- /dev/null +++ b/job/compute-worker/README.md @@ -0,0 +1,20 @@ +# @constructive-io/compute-worker + +Platform-aware job worker that discovers functions from the database (`constructive_infra_public.platform_function_definitions`) and tracks invocations in `platform_function_invocations`. + +## How it works + +1. Poll `app_jobs.jobs` for the next pending job +2. Lazy-resolve the function definition from DB (TTL-cached) +3. Create an invocation record (`status=running`) +4. HTTP POST to the function's `service_url` +5. Update invocation to `completed` or `failed` with duration + +## Key differences from knative-job-worker + +| Feature | knative-job-worker | compute-worker | +|---------|-------------------|----------------| +| Function discovery | Static manifest / env vars | Database query (cached) | +| Invocation tracking | None | `platform_function_invocations` table | +| Task filtering | `JOBS_SUPPORTED` env var | Accepts any registered task | +| URL resolution | Gateway URL + dev map | `service_url` from DB definition | diff --git a/job/compute-worker/package.json b/job/compute-worker/package.json new file mode 100644 index 00000000..1741545e --- /dev/null +++ b/job/compute-worker/package.json @@ -0,0 +1,26 @@ +{ + "name": "@constructive-io/compute-worker", + "version": "0.1.0", + "description": "Platform-aware job worker — discovers functions from constructive_infra_public and tracks invocations", + "author": "Constructive ", + "private": true, + "main": "dist/index.js", + "scripts": { + "build": "makage build", + "build:dev": "makage build --dev", + "clean": "makage clean", + "lint": "eslint . --fix" + }, + "dependencies": { + "@constructive-io/job-pg": "^2.5.4", + "@constructive-io/job-utils": "^2.5.4", + "@pgpmjs/logger": "^2.4.3", + "pg": "8.20.0" + }, + "devDependencies": { + "@types/node": "^22.10.4", + "@types/pg": "^8.11.0", + "makage": "^0.1.12", + "typescript": "^5.1.6" + } +} diff --git a/job/compute-worker/src/cache.ts b/job/compute-worker/src/cache.ts new file mode 100644 index 00000000..831ee457 --- /dev/null +++ b/job/compute-worker/src/cache.ts @@ -0,0 +1,44 @@ +/** + * Simple TTL cache — same pattern as agentic-server. + * Entries expire after the configured TTL. + */ + +interface CacheEntry { + value: T; + expires_at: number; +} + +export class TtlCache { + private store = new Map>(); + private ttl_ms: number; + + constructor(ttl_ms: number) { + this.ttl_ms = ttl_ms; + } + + get(key: string): T | undefined { + const entry = this.store.get(key); + if (!entry) return undefined; + if (Date.now() > entry.expires_at) { + this.store.delete(key); + return undefined; + } + return entry.value; + } + + set(key: string, value: T): void { + this.store.set(key, { value, expires_at: Date.now() + this.ttl_ms }); + } + + delete(key: string): void { + this.store.delete(key); + } + + clear(): void { + this.store.clear(); + } + + get size(): number { + return this.store.size; + } +} diff --git a/job/compute-worker/src/discovery.ts b/job/compute-worker/src/discovery.ts new file mode 100644 index 00000000..01d6e598 --- /dev/null +++ b/job/compute-worker/src/discovery.ts @@ -0,0 +1,101 @@ +/** + * FunctionDiscovery — lazy, cached lookups against + * constructive_infra_public.platform_function_definitions. + * + * When a job arrives the worker calls `resolve(taskIdentifier)`. + * On cache miss, a single SQL query fetches the function definition + * and caches it for `ttlMs` (default 60 s). Subsequent calls for the + * same task_identifier are served from memory. + */ + +import { Logger } from '@pgpmjs/logger'; +import type { Pool } from 'pg'; + +import { TtlCache } from './cache'; +import type { PlatformFunctionDefinition } from './types'; + +const log = new Logger('compute:discovery'); + +const RESOLVE_SQL = ` + SELECT + id, name, task_identifier, service_url, + is_invocable, is_built_in, max_attempts, + priority, queue_name, scope, namespace_id, + required_configs, required_secrets, description + FROM constructive_infra_public.platform_function_definitions + WHERE task_identifier = $1 + LIMIT 1 +`; + +const LIST_INVOCABLE_SQL = ` + SELECT + id, name, task_identifier, service_url, + is_invocable, is_built_in, max_attempts, + priority, queue_name, scope, namespace_id, + required_configs, required_secrets, description + FROM constructive_infra_public.platform_function_definitions + WHERE is_invocable = true + ORDER BY name +`; + +export class FunctionDiscovery { + private cache: TtlCache; + private pool: Pool; + + constructor(pool: Pool, ttlMs = 60_000) { + this.pool = pool; + this.cache = new TtlCache(ttlMs); + } + + /** + * Lazily resolve a function definition by task_identifier. + * Returns null if not registered. Results are TTL-cached. + */ + async resolve(taskIdentifier: string): Promise { + const cached = this.cache.get(taskIdentifier); + if (cached !== undefined) { + log.debug(`cache hit: ${taskIdentifier}`); + return cached; + } + + log.debug(`cache miss: ${taskIdentifier}, querying DB`); + try { + const { rows } = await this.pool.query(RESOLVE_SQL, [taskIdentifier]); + const def = (rows[0] as PlatformFunctionDefinition) ?? null; + this.cache.set(taskIdentifier, def); + if (def) { + log.info(`resolved function: ${def.name} (${taskIdentifier}) → ${def.service_url ?? 'no url'}`); + } else { + log.warn(`no function registered for task_identifier="${taskIdentifier}"`); + } + return def; + } catch (err: any) { + log.error(`failed to resolve "${taskIdentifier}": ${err.message}`); + return null; + } + } + + /** + * List all invocable function definitions. + * Not cached — intended for startup diagnostics / admin endpoints. + */ + async listInvocable(): Promise { + try { + const { rows } = await this.pool.query(LIST_INVOCABLE_SQL); + return rows as PlatformFunctionDefinition[]; + } catch (err: any) { + log.error(`failed to list invocable functions: ${err.message}`); + return []; + } + } + + /** Invalidate cached entry for a specific task. */ + invalidate(taskIdentifier: string): void { + this.cache.delete(taskIdentifier); + } + + /** Clear the entire cache. */ + invalidateAll(): void { + this.cache.clear(); + } +} diff --git a/job/compute-worker/src/index.ts b/job/compute-worker/src/index.ts new file mode 100644 index 00000000..b28b662a --- /dev/null +++ b/job/compute-worker/src/index.ts @@ -0,0 +1,352 @@ +/** + * ComputeWorker — Platform-aware job worker. + * + * Unlike the original knative-job-worker which looks up functions from a + * static manifest, ComputeWorker queries constructive_infra_public + * .platform_function_definitions to discover registered functions and + * tracks every invocation in platform_function_invocations. + * + * Flow: + * 1. Poll app_jobs.jobs for the next job + * 2. Lazy-resolve the function definition from DB (cached) + * 3. Create an invocation record (status=running) + * 4. HTTP POST to the function's service_url + * 5. Update invocation to completed/failed with duration + */ + +import poolManager from '@constructive-io/job-pg'; +import type { PgClientLike } from '@constructive-io/job-utils'; +import * as jobs from '@constructive-io/job-utils'; +import { Logger } from '@pgpmjs/logger'; +import type { Pool, PoolClient } from 'pg'; + +import { FunctionDiscovery } from './discovery'; +import { InvocationTracker } from './invocation'; +import { compute_request } from './req'; +import type { ComputeJobRow, ComputeWorkerOptions } from './types'; + +const DEFAULT_DATABASE_ID = '00000000-0000-0000-0000-000000000000'; + +export { TtlCache } from './cache'; +export { FunctionDiscovery } from './discovery'; +export { InvocationTracker } from './invocation'; +export type { ComputeRequestOptions } from './req'; +export { compute_request } from './req'; +export type { + ComputeJobRow, + ComputeWorkerOptions, + CreateInvocationInput, + FunctionRequirement, + InvocationStatus, + PlatformFunctionDefinition, +} from './types'; + +const log = new Logger('compute:worker'); + +export default class ComputeWorker { + idleDelay: number; + workerId: string; + pgPool: Pool; + doNextTimer?: NodeJS.Timeout; + _initialized?: boolean; + listenClient?: PoolClient; + listenRelease?: () => void; + stopped?: boolean; + + readonly discovery: FunctionDiscovery; + readonly tracker: InvocationTracker; + + private callbackUrl?: string; + private gatewayUrl?: string; + + constructor(opts: ComputeWorkerOptions) { + this.idleDelay = opts.idleDelay ?? 15_000; + this.workerId = opts.workerId ?? 'compute-worker-0'; + this.pgPool = opts.pgPool; + this.discovery = new FunctionDiscovery(this.pgPool, opts.cacheTtlMs); + this.tracker = new InvocationTracker(this.pgPool); + + this.callbackUrl = process.env.COMPUTE_CALLBACK_URL + || process.env.INTERNAL_JOBS_CALLBACK_URL; + + this.gatewayUrl = process.env.COMPUTE_GATEWAY_URL + || process.env.INTERNAL_GATEWAY_URL; + + poolManager.onClose(async () => { + await jobs.releaseJobs(this.pgPool, { workerId: this.workerId }); + }); + } + + // ─── Lifecycle ─────────────────────────────────────────────────────── + + async initialize(client: PgClientLike): Promise { + if (this._initialized) return; + + await jobs.releaseJobs(client, { workerId: this.workerId }); + this._initialized = true; + + const fns = await this.discovery.listInvocable(); + log.info(`discovered ${fns.length} invocable function(s): ${fns.map(f => f.name).join(', ') || '(none)'}`); + + await this.doNext(client); + } + + async listen(): Promise { + if (this.stopped) return; + let client: PoolClient; + let release: () => void; + try { + client = await this.pgPool.connect(); + release = () => client.release(); + } catch (err) { + log.error('Error connecting with notify listener', err); + if (err instanceof Error && err.stack) { + log.debug(err.stack); + } + if (!this.stopped) { + setTimeout(() => this.listen(), 5000); + } + return; + } + if (this.stopped) { + release(); + return; + } + this.listenClient = client; + this.listenRelease = release; + client.on('notification', () => { + if (this.doNextTimer) { + this.doNext(client); + } + }); + + const schema = process.env.JOBS_SCHEMA || 'app_jobs'; + client.query(`LISTEN "${schema}:jobs:insert"`); + client.on('error', (e: unknown) => { + if (this.stopped) { + release(); + return; + } + log.error('Error with database notify listener', e); + if (e instanceof Error && e.stack) { + log.debug(e.stack); + } + release(); + if (!this.stopped) { + this.listen(); + } + }); + log.info(`${this.workerId} connected and looking for jobs...`); + this.doNext(client); + } + + async stop(): Promise { + this.stopped = true; + if (this.doNextTimer) { + clearTimeout(this.doNextTimer); + this.doNextTimer = undefined; + } + const client = this.listenClient; + const release = this.listenRelease; + this.listenClient = undefined; + this.listenRelease = undefined; + + if (client && release) { + client.removeAllListeners('notification'); + client.removeAllListeners('error'); + try { + const schema = process.env.JOBS_SCHEMA || 'app_jobs'; + await client.query(`UNLISTEN "${schema}:jobs:insert"`); + } catch { + // Ignore listener cleanup errors during shutdown. + } + release(); + } + } + + // ─── Main loop ─────────────────────────────────────────────────────── + + async doNext(client: PgClientLike): Promise { + if (this.stopped) return; + if (!this._initialized) { + return await this.initialize(client); + } + + log.debug('checking for jobs...'); + if (this.doNextTimer) { + clearTimeout(this.doNextTimer); + this.doNextTimer = undefined; + } + + try { + const job = (await jobs.getJob(client, { + workerId: this.workerId, + supportedTaskNames: null, + })) as ComputeJobRow | undefined; + + if (!job || !job.id) { + if (!this.stopped) { + this.doNextTimer = setTimeout( + () => this.doNext(client), + this.idleDelay + ); + } + return; + } + + const start = process.hrtime(); + let err: Error | null = null; + try { + await this.doWork(job); + } catch (error) { + err = error as Error; + } + const durationRaw = process.hrtime(start); + const duration = ((durationRaw[0] * 1e9 + durationRaw[1]) / 1e6).toFixed(2); + const jobId = job.id; + + try { + if (err) { + await this.handleError(client, { err, job, duration }); + } else { + await this.handleSuccess(client, { job, duration }); + } + } catch (fatalError: unknown) { + await this.handleFatalError(client, { err, fatalError, jobId }); + } + if (!this.stopped) { + return this.doNext(client); + } + return; + } catch (err: unknown) { + if (!this.stopped) { + this.doNextTimer = setTimeout( + () => this.doNext(client), + this.idleDelay + ); + } + } + } + + // ─── Work dispatch ─────────────────────────────────────────────────── + + async doWork(job: ComputeJobRow): Promise { + const { task_identifier, payload } = job; + log.debug('starting work on job', { + id: job.id, + task: task_identifier, + databaseId: job.database_id, + }); + + const fn = await this.discovery.resolve(task_identifier); + if (!fn) { + throw new Error(`Function "${task_identifier}" is not registered in platform_function_definitions`); + } + if (!fn.is_invocable) { + throw new Error(`Function "${fn.name}" (${task_identifier}) is not invocable`); + } + + const url = this.resolveUrl(fn.service_url, task_identifier); + if (!url) { + throw new Error( + `No service URL for "${task_identifier}". Set service_url in platform_function_definitions or COMPUTE_GATEWAY_URL env var.` + ); + } + + const databaseId = job.database_id || DEFAULT_DATABASE_ID; + + const { id: invocationId } = await this.tracker.create({ + function_id: fn.id, + task_identifier, + payload, + job_id: job.id, + database_id: databaseId, + actor_id: job.actor_id, + }); + + const reqStart = process.hrtime(); + try { + await compute_request(url, { + body: payload, + database_id: databaseId, + actor_id: job.actor_id, + entity_id: job.entity_id, + worker_id: this.workerId, + job_id: job.id, + invocation_id: invocationId, + callback_url: this.callbackUrl, + }); + + const elapsed = process.hrtime(reqStart); + const ms = Math.round((elapsed[0] * 1e9 + elapsed[1]) / 1e6); + await this.tracker.complete(invocationId, ms); + } catch (err: any) { + const elapsed = process.hrtime(reqStart); + const ms = Math.round((elapsed[0] * 1e9 + elapsed[1]) / 1e6); + await this.tracker.fail(invocationId, ms, err.message); + throw err; + } + } + + /** + * Resolve the HTTP URL for a function. + * Priority: service_url from DB → gateway development map → gateway_url pattern + */ + private resolveUrl( + serviceUrl: string | null, + taskIdentifier: string + ): string | null { + if (serviceUrl) return serviceUrl; + + const devMap = jobs.getJobGatewayDevMap(); + if (devMap && devMap[taskIdentifier]) { + return devMap[taskIdentifier]; + } + + if (this.gatewayUrl) { + return `${this.gatewayUrl.replace(/\/$/, '')}/${taskIdentifier}`; + } + return null; + } + + // ─── Result handlers ───────────────────────────────────────────────── + + async handleFatalError( + _client: PgClientLike, + { err, fatalError, jobId }: { err: Error | null; fatalError: unknown; jobId: ComputeJobRow['id'] } + ): Promise { + const when = err ? `after failure '${err.message}'` : 'after success'; + log.error(`Failed to release job '${jobId}' ${when}; committing seppuku`); + await poolManager.close(); + log.error(String(fatalError)); + process.exit(1); + } + + async handleError( + client: PgClientLike, + { err, job, duration }: { err: Error; job: ComputeJobRow; duration: string } + ): Promise { + log.error( + `Failed task ${job.id} (${job.task_identifier}) with error ${err.message} (${duration}ms)` + ); + if (err.stack) { + log.debug(err.stack); + } + await jobs.failJob(client, { + workerId: this.workerId, + jobId: job.id, + message: err.message, + }); + } + + async handleSuccess( + _client: PgClientLike, + { job, duration }: { job: ComputeJobRow; duration: string } + ): Promise { + log.info( + `Completed task ${job.id} (${job.task_identifier}) in ${duration}ms` + ); + } +} + +export { ComputeWorker }; diff --git a/job/compute-worker/src/invocation.ts b/job/compute-worker/src/invocation.ts new file mode 100644 index 00000000..6650f7c6 --- /dev/null +++ b/job/compute-worker/src/invocation.ts @@ -0,0 +1,101 @@ +/** + * InvocationTracker — records function invocations in + * constructive_infra_public.platform_function_invocations. + * + * Lifecycle: + * 1. `create()` — inserts a row with status='running' before dispatch + * 2. `complete()` — updates to status='completed' with result + duration + * 3. `fail()` — updates to status='failed' with error + duration + */ + +import { Logger } from '@pgpmjs/logger'; +import type { Pool } from 'pg'; + +import type { CreateInvocationInput } from './types'; + +const log = new Logger('compute:invocation'); + +const CREATE_SQL = ` + INSERT INTO constructive_infra_public.platform_function_invocations + (id, function_id, task_identifier, payload, job_id, database_id, actor_id, status, started_at) + VALUES + (gen_random_uuid(), $1, $2, $3::jsonb, $4, $5, $6, 'running', now()) + RETURNING id, started_at +`; + +const COMPLETE_SQL = ` + UPDATE constructive_infra_public.platform_function_invocations + SET + status = 'completed', + completed_at = now(), + duration_ms = $2, + result = $3::jsonb + WHERE id = $1 +`; + +const FAIL_SQL = ` + UPDATE constructive_infra_public.platform_function_invocations + SET + status = 'failed', + completed_at = now(), + duration_ms = $2, + error = $3 + WHERE id = $1 +`; + +export class InvocationTracker { + private pool: Pool; + + constructor(pool: Pool) { + this.pool = pool; + } + + /** + * Create an invocation record before dispatching the function. + * Returns the invocation ID and start timestamp. + */ + async create(input: CreateInvocationInput): Promise<{ id: string; started_at: Date }> { + const payload_json = input.payload != null ? JSON.stringify(input.payload) : null; + try { + const { rows } = await this.pool.query(CREATE_SQL, [ + input.function_id, + input.task_identifier, + payload_json, + String(input.job_id), + input.database_id ?? null, + input.actor_id ?? null, + ]); + const row = rows[0]; + log.debug(`created invocation ${row.id} for ${input.task_identifier}`); + return { id: row.id, started_at: row.started_at }; + } catch (err: any) { + log.error(`failed to create invocation for ${input.task_identifier}: ${err.message}`); + throw err; + } + } + + /** + * Mark an invocation as completed with result and duration. + */ + async complete(invocation_id: string, duration_ms: number, result?: unknown): Promise { + const result_json = result != null ? JSON.stringify(result) : null; + try { + await this.pool.query(COMPLETE_SQL, [invocation_id, duration_ms, result_json]); + log.debug(`completed invocation ${invocation_id} (${duration_ms}ms)`); + } catch (err: any) { + log.error(`failed to complete invocation ${invocation_id}: ${err.message}`); + } + } + + /** + * Mark an invocation as failed with error and duration. + */ + async fail(invocation_id: string, duration_ms: number, error: string): Promise { + try { + await this.pool.query(FAIL_SQL, [invocation_id, duration_ms, error]); + log.debug(`failed invocation ${invocation_id}: ${error}`); + } catch (err: any) { + log.error(`failed to record failure for invocation ${invocation_id}: ${err.message}`); + } + } +} diff --git a/job/compute-worker/src/req.ts b/job/compute-worker/src/req.ts new file mode 100644 index 00000000..70c3ac98 --- /dev/null +++ b/job/compute-worker/src/req.ts @@ -0,0 +1,96 @@ +/** + * Platform-aware HTTP dispatch. + * + * Instead of resolving URLs from a static manifest or gateway env var, + * the compute worker reads `service_url` from the function definition + * stored in constructive_infra_public.platform_function_definitions. + * + * Falls back to a gateway URL pattern when service_url is not set. + */ + +import http from 'node:http'; +import https from 'node:https'; +import { URL } from 'node:url'; + +import { Logger } from '@pgpmjs/logger'; + +const log = new Logger('compute:req'); + +export interface ComputeRequestOptions { + body: unknown; + database_id?: string; + actor_id?: string; + entity_id?: string; + worker_id: string; + job_id: string | number; + invocation_id: string; + callback_url?: string; +} + +/** + * Dispatch a job to a function's HTTP endpoint. + * + * @param url - The function's service URL (from platform_function_definitions.service_url + * or derived from a gateway pattern) + * @param opts - Request metadata including payload, headers, and tracking IDs + */ +export function compute_request( + url: string, + opts: ComputeRequestOptions +): Promise { + log.info('dispatching job', { + url, + worker_id: opts.worker_id, + job_id: opts.job_id, + invocation_id: opts.invocation_id, + database_id: opts.database_id, + }); + + return new Promise((resolve, reject) => { + let parsed: URL; + try { + parsed = new URL(url); + } catch (e) { + return reject(e); + } + + const is_https = parsed.protocol === 'https:'; + const client = is_https ? https : http; + const payload = JSON.stringify(opts.body); + + const req = client.request( + { + hostname: parsed.hostname, + port: parsed.port || (is_https ? 443 : 80), + path: parsed.pathname + parsed.search, + method: 'POST', + headers: { + 'Content-Type': 'application/json', + 'Content-Length': Buffer.byteLength(payload), + 'X-Worker-Id': opts.worker_id, + 'X-Job-Id': String(opts.job_id), + 'X-Invocation-Id': opts.invocation_id, + ...(opts.database_id ? { 'X-Database-Id': opts.database_id } : {}), + ...(opts.actor_id ? { 'X-Actor-Id': opts.actor_id } : {}), + ...(opts.entity_id ? { 'X-Entity-Id': opts.entity_id } : {}), + ...(opts.callback_url ? { 'X-Callback-Url': opts.callback_url } : {}), + }, + }, + (res) => { + res.on('data', () => {}); + res.on('end', () => { + log.debug(`request completed for job[${opts.job_id}]`); + resolve(true); + }); + } + ); + + req.on('error', (error) => { + log.error(`request error for job[${opts.job_id}]`, error); + reject(error); + }); + + req.write(payload); + req.end(); + }); +} diff --git a/job/compute-worker/src/types.ts b/job/compute-worker/src/types.ts new file mode 100644 index 00000000..0a6a9918 --- /dev/null +++ b/job/compute-worker/src/types.ts @@ -0,0 +1,71 @@ +import type { Pool } from 'pg'; + +// ─── Platform Function Definition ──────────────────────────────────────────── + +export interface FunctionRequirement { + name: string; + required: boolean; +} + +export interface PlatformFunctionDefinition { + id: string; + name: string; + task_identifier: string; + service_url: string | null; + is_invocable: boolean; + is_built_in: boolean; + max_attempts: number | null; + priority: number | null; + queue_name: string | null; + scope: string | null; + namespace_id: string | null; + required_configs: FunctionRequirement[] | null; + required_secrets: FunctionRequirement[] | null; + description: string | null; +} + +// ─── Invocation Record ─────────────────────────────────────────────────────── + +export type InvocationStatus = 'running' | 'completed' | 'failed'; + +export interface CreateInvocationInput { + function_id: string; + task_identifier: string; + payload: unknown; + job_id: string | number; + database_id?: string; + actor_id?: string; +} + +export interface InvocationRecord { + id: string; + function_id: string; + task_identifier: string; + status: InvocationStatus; + started_at: string; + completed_at: string | null; + duration_ms: number | null; + payload: unknown; + result: unknown; + error: string | null; +} + +// ─── Job Row ───────────────────────────────────────────────────────────────── + +export interface ComputeJobRow { + id: number | string; + task_identifier: string; + payload?: unknown; + database_id?: string; + actor_id?: string; + entity_id?: string; +} + +// ─── Worker Options ────────────────────────────────────────────────────────── + +export interface ComputeWorkerOptions { + pgPool: Pool; + idleDelay?: number; + workerId?: string; + cacheTtlMs?: number; +} diff --git a/job/compute-worker/tsconfig.esm.json b/job/compute-worker/tsconfig.esm.json new file mode 100644 index 00000000..800d7506 --- /dev/null +++ b/job/compute-worker/tsconfig.esm.json @@ -0,0 +1,9 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "dist/esm", + "module": "es2022", + "rootDir": "src/", + "declaration": false + } +} diff --git a/job/compute-worker/tsconfig.json b/job/compute-worker/tsconfig.json new file mode 100644 index 00000000..1a9d5696 --- /dev/null +++ b/job/compute-worker/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "outDir": "dist", + "rootDir": "src/" + }, + "include": ["src/**/*.ts"], + "exclude": ["dist", "node_modules", "**/*.spec.*", "**/*.test.*"] +} diff --git a/k8s/overlays/local-simple/compute-service.yaml b/k8s/overlays/local-simple/compute-service.yaml new file mode 100644 index 00000000..81f1bf1e --- /dev/null +++ b/k8s/overlays/local-simple/compute-service.yaml @@ -0,0 +1,74 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: compute-service + labels: + app: compute-service +spec: + replicas: 1 + selector: + matchLabels: + app: compute-service + template: + metadata: + labels: + app: compute-service + spec: + containers: + - name: compute-service + image: constructive-functions:local + command: ["node"] + args: ["job/compute-service/dist/run.js"] + envFrom: + - configMapRef: + name: constructive + - configMapRef: + name: functions-registry + - secretRef: + name: pg-credentials + env: + - name: NODE_ENV + value: "development" + - name: JOBS_SCHEMA + value: "app_jobs" + - name: COMPUTE_JOBS_ENABLED + value: "true" + - name: JOBS_SUPPORT_ANY + value: "true" + - name: INTERNAL_JOBS_CALLBACK_PORT + value: "8080" + - name: INTERNAL_JOBS_CALLBACK_URL + value: "http://compute-service.constructive-functions.svc.cluster.local:8080/callback" + - name: COMPUTE_CALLBACK_URL + value: "http://compute-service.constructive-functions.svc.cluster.local:8080/callback" + - name: JOBS_CALLBACK_HOST + value: "compute-service.constructive-functions.svc.cluster.local" + - name: HOSTNAME + valueFrom: + fieldRef: + fieldPath: metadata.name + ports: + - containerPort: 8080 + name: jobs-http + resources: + requests: + memory: "128Mi" + cpu: "100m" + limits: + memory: "512Mi" + cpu: "500m" +--- +apiVersion: v1 +kind: Service +metadata: + name: compute-service + labels: + app: compute-service +spec: + type: ClusterIP + selector: + app: compute-service + ports: + - name: jobs-http + port: 8080 + targetPort: jobs-http diff --git a/pgpm/constructive-fbp/.npmignore b/pgpm/constructive-fbp/.npmignore new file mode 100644 index 00000000..cf8a4554 --- /dev/null +++ b/pgpm/constructive-fbp/.npmignore @@ -0,0 +1,2 @@ +__tests__ +jest.config.js diff --git a/pgpm/constructive-fbp/Makefile b/pgpm/constructive-fbp/Makefile new file mode 100644 index 00000000..c2e1decc --- /dev/null +++ b/pgpm/constructive-fbp/Makefile @@ -0,0 +1,6 @@ +EXTENSION = constructive-fbp +DATA = sql/constructive-fbp--0.0.1.sql + +PG_CONFIG = pg_config +PGXS := $(shell $(PG_CONFIG) --pgxs) +include $(PGXS) diff --git a/pgpm/constructive-fbp/constructive-fbp.control b/pgpm/constructive-fbp/constructive-fbp.control new file mode 100644 index 00000000..3188c2a5 --- /dev/null +++ b/pgpm/constructive-fbp/constructive-fbp.control @@ -0,0 +1,5 @@ +# constructive-fbp extension +comment = 'constructive-fbp module' +default_version = '0.0.1' +relocatable = false +requires = 'plpgsql,uuid-ossp,pgcrypto,pgpm-inflection,pgpm-stamps' diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/procedures/complete_node/procedure.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/procedures/complete_node/procedure.sql new file mode 100644 index 00000000..629438be --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/procedures/complete_node/procedure.sql @@ -0,0 +1,50 @@ +-- Deploy: schemas/constructive_fbp_private/procedures/complete_node/procedure +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema + + +CREATE FUNCTION "constructive_fbp_private".complete_node( + IN execution_id uuid, + IN node_name text, + IN output_data jsonb +) RETURNS void AS $_PGFN_$ +DECLARE + v_exec "constructive_fbp_private".function_graph_executions; + v_output_hash bytea; + v_obj_id uuid; +BEGIN + SELECT * + FROM "constructive_fbp_private".function_graph_executions + WHERE + id = complete_node.execution_id INTO v_exec; + IF NOT (FOUND) THEN + RAISE EXCEPTION 'execution not found'; + END IF; + IF v_exec.status != 'running' THEN + RAISE EXCEPTION 'execution is not running'; + END IF; + v_output_hash := digest(complete_node.output_data::text, 'sha256'); + INSERT INTO "constructive_fbp_private".function_graph_execution_outputs ( + database_id, + hash, + data + ) + VALUES + (v_exec.database_id, v_output_hash, complete_node.output_data) + ON CONFLICT (database_id, hash, created_at) DO NOTHING + RETURNING id INTO v_obj_id; + IF v_obj_id IS NULL THEN + SELECT id + FROM "constructive_fbp_private".function_graph_execution_outputs + WHERE + database_id = v_exec.database_id AND hash = v_output_hash INTO v_obj_id; + END IF; + UPDATE "constructive_fbp_private".function_graph_executions SET + node_outputs = node_outputs || jsonb_build_object(complete_node.node_name, v_obj_id) + WHERE + id = complete_node.execution_id; + PERFORM "constructive_fbp_private".tick_execution(complete_node.execution_id); +END; +$_PGFN_$ LANGUAGE plpgsql VOLATILE SECURITY DEFINER; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/procedures/copy_subtree/procedure.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/procedures/copy_subtree/procedure.sql new file mode 100644 index 00000000..7072e341 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/procedures/copy_subtree/procedure.sql @@ -0,0 +1,45 @@ +-- Deploy: schemas/constructive_fbp_private/procedures/copy_subtree/procedure +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema + + +CREATE FUNCTION "constructive_fbp_private".copy_subtree( + IN source_scope_id uuid, + IN source_commit_id uuid, + IN source_path text[], + IN target_scope_id uuid, + IN target_root_hash uuid, + IN target_path text[] +) RETURNS uuid AS $_PGFN_$ +DECLARE + v_source_tree_id uuid; + v_root_hash uuid; + v_row record; + v_rel_path text[]; + v_new_path text[]; + v_src_len int; +BEGIN + SELECT tree_id + FROM "constructive_fbp_public".graph_commit + WHERE + id = copy_subtree.source_commit_id AND database_id = copy_subtree.source_scope_id INTO v_source_tree_id; + IF v_source_tree_id IS NULL THEN + RAISE EXCEPTION 'source commit not found'; + END IF; + v_src_len := cardinality(copy_subtree.source_path); + v_root_hash := copy_subtree.target_root_hash; + FOR v_row IN SELECT + path, + data + FROM "constructive_fbp_public".graph_get_all(copy_subtree.source_scope_id, v_source_tree_id) + WHERE + (path)[1:v_src_len] = copy_subtree.source_path AND cardinality(path) > v_src_len LOOP + v_rel_path := (v_row.path)[v_src_len + 1:]; + v_new_path := copy_subtree.target_path || v_rel_path; + v_root_hash := "constructive_fbp_public".graph_insert_node_at_path(copy_subtree.target_scope_id, v_root_hash, v_new_path, v_row.data, '{}'::uuid[], '{}'::text[]); + END LOOP; + RETURN v_root_hash; +END; +$_PGFN_$ LANGUAGE plpgsql VOLATILE SECURITY DEFINER; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/procedures/deserialize_graph/procedure.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/procedures/deserialize_graph/procedure.sql new file mode 100644 index 00000000..e2cd28a7 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/procedures/deserialize_graph/procedure.sql @@ -0,0 +1,57 @@ +-- Deploy: schemas/constructive_fbp_private/procedures/deserialize_graph/procedure +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema + + +CREATE FUNCTION "constructive_fbp_private".deserialize_graph( + IN database_id uuid, + IN name text, + IN snapshot jsonb +) RETURNS uuid AS $_PGFN_$ +DECLARE + v_store_id uuid; + v_root_hash uuid; + v_graph_id uuid; + v_row record; + v_key text; + v_entry jsonb; +BEGIN + INSERT INTO "constructive_fbp_public".graph_store ( + database_id, + name + ) + VALUES + (deserialize_graph.database_id, deserialize_graph.name) + RETURNING id INTO v_store_id; + PERFORM "constructive_fbp_public".graph_init_empty_repo(deserialize_graph.database_id, v_store_id); + FOR v_row IN SELECT * + FROM jsonb_each(deserialize_graph.tree_data->'tree') LOOP + v_entry := v_row.value; + v_root_hash := "constructive_fbp_public".graph_insert_node_at_path(deserialize_graph.database_id, v_root_hash, (v_entry->'path')::text[], v_entry->'data', '{}'::uuid[], '{}'::text[]); + END LOOP; + INSERT INTO "constructive_fbp_public".function_graphs ( + database_id, + store_id, + name, + description, + context + ) + VALUES + (deserialize_graph.database_id, v_store_id, deserialize_graph.name, deserialize_graph.tree_data->>'description', deserialize_graph.tree_data->>'context') + RETURNING id INTO v_graph_id; + UPDATE "constructive_fbp_public".graph_ref AS r SET + commit_id = (SELECT id + FROM "constructive_fbp_public".graph_commit + WHERE + database_id = deserialize_graph.database_id AND store_id = v_store_id + ORDER BY + created_at DESC + LIMIT + 1) + WHERE + r.database_id = deserialize_graph.database_id AND (r.store_id = v_store_id AND r.name = 'main'); + RETURN v_graph_id; +END; +$_PGFN_$ LANGUAGE plpgsql VOLATILE SECURITY DEFINER; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/procedures/graph_object_hash_uuid/procedure.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/procedures/graph_object_hash_uuid/procedure.sql new file mode 100644 index 00000000..244ebb42 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/procedures/graph_object_hash_uuid/procedure.sql @@ -0,0 +1,25 @@ +-- Deploy: schemas/constructive_fbp_private/procedures/graph_object_hash_uuid/procedure +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema + + +CREATE FUNCTION "constructive_fbp_private".graph_object_hash_uuid( + IN obj "constructive_fbp_public".graph_object +) RETURNS uuid AS $_PGFN_$ +DECLARE + v_cash jsonb := '{}'::jsonb; + v_hash1 uuid; + v_hash2 uuid; +BEGIN + IF obj.data IS NOT NULL THEN + v_hash1 := uuid_generate_v5(uuid_ns_url(), obj.data::text); + END IF; + IF obj.kids IS NOT NULL AND obj.ktree IS NOT NULL THEN + v_cash := json_object(obj.ktree::text[], obj.kids::text[]); + v_hash2 := uuid_generate_v5(uuid_ns_url(), v_cash::text); + END IF; + RETURN uuid_generate_v5(uuid_ns_url(), (concat(v_hash1, v_hash2))::text); +END; +$_PGFN_$ LANGUAGE plpgsql IMMUTABLE SECURITY INVOKER; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/procedures/insert_subnet_nodes/procedure.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/procedures/insert_subnet_nodes/procedure.sql new file mode 100644 index 00000000..12b73bcc --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/procedures/insert_subnet_nodes/procedure.sql @@ -0,0 +1,50 @@ +-- Deploy: schemas/constructive_fbp_private/procedures/insert_subnet_nodes/procedure +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema + + +CREATE FUNCTION "constructive_fbp_private".insert_subnet_nodes( + IN database_id uuid, + IN root_hash uuid, + IN base_path text[], + IN nodes_json jsonb, + IN edges_json jsonb DEFAULT NULL +) RETURNS uuid AS $_PGFN_$ +DECLARE + v_node jsonb; + v_edge jsonb; + v_node_name text; + v_node_data jsonb; + v_edge_idx int := 0; + v_root uuid; +BEGIN + v_root := insert_subnet_nodes.root_hash; + IF insert_subnet_nodes.nodes_json IS NOT NULL THEN + FOR v_node IN SELECT * + FROM jsonb_array_elements(insert_subnet_nodes.nodes_json) LOOP + v_node_name := v_node->>'name'; + v_node_data := jsonb_build_object('type', v_node->>'type'); + IF v_node ? 'meta' THEN + v_node_data := v_node_data || jsonb_build_object('meta', v_node->'meta'); + END IF; + IF v_node ? 'props' THEN + v_node_data := v_node_data || jsonb_build_object('props', v_node->'props'); + END IF; + v_root := "constructive_fbp_public".graph_insert_node_at_path(insert_subnet_nodes.database_id, v_root, insert_subnet_nodes.base_path || ARRAY['nodes', v_node_name], v_node_data, '{}'::uuid[], '{}'::text[]); + IF v_node ? 'nodes' THEN + v_root := "constructive_fbp_private".insert_subnet_nodes(insert_subnet_nodes.database_id, v_root, insert_subnet_nodes.base_path || ARRAY['nodes', v_node_name], v_node->'nodes', v_node->'edges'); + END IF; + END LOOP; + END IF; + IF insert_subnet_nodes.edges_json IS NOT NULL THEN + FOR v_edge IN SELECT * + FROM jsonb_array_elements(insert_subnet_nodes.edges_json) LOOP + v_root := "constructive_fbp_public".graph_insert_node_at_path(insert_subnet_nodes.database_id, v_root, insert_subnet_nodes.base_path || ARRAY['edges', v_edge_idx::text], jsonb_build_object('src', v_edge->'src', 'dst', v_edge->'dst'), '{}'::uuid[], '{}'::text[]); + v_edge_idx := v_edge_idx + 1; + END LOOP; + END IF; + RETURN v_root; +END; +$_PGFN_$ LANGUAGE plpgsql VOLATILE SECURITY DEFINER; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/procedures/serialize_graph/procedure.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/procedures/serialize_graph/procedure.sql new file mode 100644 index 00000000..2da014c9 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/procedures/serialize_graph/procedure.sql @@ -0,0 +1,42 @@ +-- Deploy: schemas/constructive_fbp_private/procedures/serialize_graph/procedure +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema + + +CREATE FUNCTION "constructive_fbp_private".serialize_graph( + IN graph_id uuid +) RETURNS jsonb AS $_PGFN_$ +DECLARE + v_graph "constructive_fbp_public".function_graphs; + v_tree_id uuid; + v_row record; + v_result jsonb; + v_nodes jsonb := '{}'::jsonb; + v_edges jsonb := '{}'::jsonb; +BEGIN + SELECT * + FROM "constructive_fbp_public".function_graphs + WHERE + id = serialize_graph.graph_id INTO v_graph; + IF NOT (FOUND) THEN + RAISE EXCEPTION 'function_graph not found'; + END IF; + SELECT c.tree_id + FROM "constructive_fbp_public".graph_ref AS r INNER JOIN "constructive_fbp_public".graph_commit AS c ON c.id = r.commit_id AND c.database_id = r.database_id + WHERE + (r.database_id = v_graph.database_id AND r.store_id = v_graph.store_id) AND r.name = 'main' INTO v_tree_id; + IF v_tree_id IS NULL THEN + RAISE EXCEPTION 'no tree found for graph'; + END IF; + FOR v_row IN SELECT + path, + data + FROM "constructive_fbp_public".graph_get_all(v_graph.database_id, v_tree_id) LOOP + v_nodes := v_nodes || jsonb_build_object(array_to_string(v_row.path, '/'), jsonb_build_object('path', v_row.path, 'data', v_row.data)); + END LOOP; + v_result := jsonb_build_object('name', v_graph.name, 'context', v_graph.context, 'description', v_graph.description, 'tree', v_nodes); + RETURN v_result; +END; +$_PGFN_$ LANGUAGE plpgsql STABLE SECURITY DEFINER; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/procedures/tick_execution/procedure.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/procedures/tick_execution/procedure.sql new file mode 100644 index 00000000..2a0cf1e7 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/procedures/tick_execution/procedure.sql @@ -0,0 +1,207 @@ +-- Deploy: schemas/constructive_fbp_private/procedures/tick_execution/procedure +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema + + +CREATE FUNCTION "constructive_fbp_private".tick_execution( + IN execution_id uuid +) RETURNS integer AS $_PGFN_$ +DECLARE + v_exec "constructive_fbp_private".function_graph_executions; + v_graph "constructive_fbp_public".function_graphs; + v_tree_id uuid; + v_jobs_enqueued int := 0; + v_nodes jsonb := '[]'::jsonb; + v_edges jsonb := '[]'::jsonb; + v_node_map jsonb := '{}'::jsonb; + v_node jsonb; + v_node_name text; + v_node_type text; + v_i int; + v_is_ready boolean; + v_edge jsonb; + v_src_node text; + v_src_port text; + v_src_output jsonb; + v_src_obj_id text; + v_inputs jsonb; + v_output_data jsonb; + v_output_hash bytea; + v_obj_id uuid; + v_pending_jobs int; + v_def_data jsonb; + v_sub_graph_id uuid; +BEGIN + SELECT * + FROM "constructive_fbp_private".function_graph_executions + WHERE + id = tick_execution.execution_id INTO v_exec; + IF NOT (FOUND) THEN + RAISE EXCEPTION 'execution not found'; + END IF; + IF v_exec.status != 'running' THEN + RETURN 0; + END IF; + IF v_exec.tick_count >= v_exec.max_ticks THEN + UPDATE "constructive_fbp_private".function_graph_executions SET + status = 'failed', completed_at = now(), error_code = 'TICK_LIMIT_EXCEEDED', error_message = ('execution exceeded ' || v_exec.max_ticks) || ' ticks' + WHERE + id = tick_execution.execution_id; + RETURN 0; + END IF; + IF now() >= v_exec.timeout_at THEN + UPDATE "constructive_fbp_private".function_graph_executions SET + status = 'failed', completed_at = now(), error_code = 'EXECUTION_TIMEOUT', error_message = 'execution timed out' + WHERE + id = tick_execution.execution_id; + RETURN 0; + END IF; + SELECT * + FROM "constructive_fbp_public".function_graphs + WHERE + id = v_exec.graph_id INTO v_graph; + SELECT c.tree_id + FROM "constructive_fbp_public".graph_ref AS r INNER JOIN "constructive_fbp_public".graph_commit AS c ON c.id = r.commit_id AND c.database_id = r.database_id + WHERE + (r.database_id = v_graph.database_id AND r.store_id = v_graph.store_id) AND r.name = 'main' INTO v_tree_id; + IF v_tree_id IS NULL THEN + RAISE EXCEPTION 'no tree found for graph'; + END IF; + FOR v_node IN SELECT jsonb_build_object('name', (path)[5], 'type', data->>'type', 'props', data->'props') + FROM "constructive_fbp_public".graph_get_all(v_graph.database_id, v_tree_id) + WHERE + (cardinality(path) = 5 AND (path)[4] = 'nodes') AND ((path)[1] = v_graph.context AND ((path)[2] = 'graphs' AND (path)[3] = v_graph.name)) LOOP + v_nodes := v_nodes || jsonb_build_array(v_node); + v_node_map := v_node_map || jsonb_build_object(v_node->>'name', v_node); + END LOOP; + FOR v_node IN SELECT data + FROM "constructive_fbp_public".graph_get_all(v_graph.database_id, v_tree_id) + WHERE + (cardinality(path) = 5 AND (path)[4] = 'edges') AND ((path)[1] = v_graph.context AND ((path)[2] = 'graphs' AND (path)[3] = v_graph.name)) + ORDER BY + (path)[5]::integer LOOP + v_edges := v_edges || jsonb_build_array(v_node); + END LOOP; + FOR v_i IN 0..jsonb_array_length(v_nodes) - 1 LOOP + v_node := v_nodes->v_i; + v_node_name := v_node->>'name'; + v_node_type := v_node->>'type'; + IF v_node_type IN ( 'graphInput', 'graphProp' ) THEN + CONTINUE; + END IF; + IF v_exec.node_outputs ? v_node_name THEN + CONTINUE; + END IF; + v_is_ready := true; + v_inputs := '{}'::jsonb; + FOR v_edge IN SELECT value + FROM jsonb_array_elements(v_edges) AS value + WHERE + ((value->'dst')->>'node') = v_node_name LOOP + v_src_node := (v_edge->'src')->>'node'; + v_src_port := (v_edge->'src')->>'port'; + IF NOT (v_exec.node_outputs ? v_src_node) THEN + v_is_ready := false; + EXIT; + END IF; + v_src_obj_id := v_exec.node_outputs->>v_src_node; + SELECT data + FROM "constructive_fbp_private".function_graph_execution_outputs + WHERE + id = v_src_obj_id::uuid INTO v_src_output; + IF v_src_output IS NULL THEN + v_is_ready := false; + EXIT; + END IF; + IF v_src_output ? v_src_port THEN + v_inputs := v_inputs || jsonb_build_object((v_edge->'dst')->>'port', v_src_output->v_src_port); + ELSIF v_src_output ? 'value' THEN + v_inputs := v_inputs || jsonb_build_object((v_edge->'dst')->>'port', v_src_output->'value'); + ELSE + v_inputs := v_inputs || jsonb_build_object((v_edge->'dst')->>'port', v_src_output); + END IF; + END LOOP; + IF NOT (v_is_ready) THEN + CONTINUE; + END IF; + IF v_node_type = 'graphOutput' THEN + v_output_hash := digest(v_inputs::text, 'sha256'); + INSERT INTO "constructive_fbp_private".function_graph_execution_outputs ( + database_id, + hash, + data + ) + VALUES + (v_exec.database_id, v_output_hash, v_inputs) + ON CONFLICT (database_id, hash, created_at) DO NOTHING + RETURNING id INTO v_obj_id; + IF v_obj_id IS NULL THEN + SELECT id + FROM "constructive_fbp_private".function_graph_execution_outputs + WHERE + database_id = v_exec.database_id AND hash = v_output_hash INTO v_obj_id; + END IF; + UPDATE "constructive_fbp_private".function_graph_executions SET + node_outputs = node_outputs || jsonb_build_object(v_node_name, v_obj_id) + WHERE + id = tick_execution.execution_id + RETURNING * INTO v_exec; + CONTINUE; + END IF; + SELECT data + FROM "constructive_fbp_public".graph_get_node_at_path(v_graph.database_id, v_tree_id, ARRAY[v_graph.context, 'definitions', v_node_type]) AS def INTO v_def_data; + IF v_def_data IS NULL THEN + SELECT data + FROM "constructive_fbp_public".graph_get_node_at_path(v_graph.database_id, v_tree_id, ARRAY[v_graph.context, 'definitions', v_node_name]) AS def INTO v_def_data; + END IF; + IF v_def_data IS NOT NULL AND v_def_data ? 'graph' THEN + SELECT "constructive_fbp_public".import_graph_json(v_graph.database_id, ('def_' || tick_execution.execution_id) || ('_' || v_node_name), v_def_data->'graph') INTO v_sub_graph_id; + PERFORM "constructive_fbp_public".start_execution(graph_id:=v_sub_graph_id, input_payload:=v_inputs, parent_execution_id:=tick_execution.execution_id, parent_node_name:=v_node_name); + v_jobs_enqueued := v_jobs_enqueued + 1; + CONTINUE; + END IF; + SELECT (count(*))::integer + FROM app_jobs.jobs + WHERE + task_identifier LIKE ( 'fbp:eval:%' ) AND (payload::jsonb->>'execution_id')::uuid = tick_execution.execution_id INTO v_pending_jobs; + IF (v_pending_jobs + v_jobs_enqueued) >= v_exec.max_pending_jobs THEN + UPDATE "constructive_fbp_private".function_graph_executions SET + status = 'failed', completed_at = now(), error_code = 'JOB_LIMIT_EXCEEDED', error_message = ('execution exceeded ' || v_exec.max_pending_jobs) || ' pending jobs' + WHERE + id = tick_execution.execution_id; + RETURN v_jobs_enqueued; + END IF; + INSERT INTO app_jobs.jobs ( + database_id, + task_identifier, + payload + ) + VALUES + (v_exec.database_id, (('fbp:eval:' || v_graph.context) || ':') || v_node_type, (json_build_object('execution_id', v_exec.id, 'node_name', v_node_name, 'node_type', v_node_type, 'inputs', v_inputs))::json); + v_jobs_enqueued := v_jobs_enqueued + 1; + END LOOP; + UPDATE "constructive_fbp_private".function_graph_executions SET + tick_count = tick_count + 1 + WHERE + id = tick_execution.execution_id; + IF v_jobs_enqueued = 0 AND v_exec.node_outputs ? v_exec.output_node THEN + v_src_obj_id := v_exec.node_outputs->>v_exec.output_node; + SELECT data + FROM "constructive_fbp_private".function_graph_execution_outputs + WHERE + id = v_src_obj_id::uuid INTO v_output_data; + IF v_output_data IS NOT NULL THEN + UPDATE "constructive_fbp_private".function_graph_executions SET + status = 'completed', completed_at = now(), output_payload = v_output_data + WHERE + id = tick_execution.execution_id; + IF v_exec.parent_execution_id IS NOT NULL THEN + PERFORM "constructive_fbp_private".complete_node(v_exec.parent_execution_id, v_exec.parent_node_name, v_output_data); + END IF; + END IF; + END IF; + RETURN v_jobs_enqueued; +END; +$_PGFN_$ LANGUAGE plpgsql VOLATILE SECURITY DEFINER; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/schema.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/schema.sql new file mode 100644 index 00000000..cf872b83 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/schema.sql @@ -0,0 +1,8 @@ +-- Deploy: schemas/constructive_fbp_private/schema +-- made with <3 @ constructive.io + + + + +CREATE SCHEMA "constructive_fbp_private"; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/alterations/alt0000000001.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/alterations/alt0000000001.sql new file mode 100644 index 00000000..09f993d8 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/alterations/alt0000000001.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/alterations/alt0000000001 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/table + + +ALTER TABLE "constructive_fbp_private".function_graph_execution_outputs + DISABLE ROW LEVEL SECURITY; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/alterations/alt0000000002.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/alterations/alt0000000002.sql new file mode 100644 index 00000000..35103610 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/alterations/alt0000000002.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/alterations/alt0000000002 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/table + + +COMMENT ON TABLE "constructive_fbp_private".function_graph_execution_outputs IS E'Content-addressed store for execution outputs — hash-referenced from node_outputs'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/created_at/alterations/alt0000000003.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/created_at/alterations/alt0000000003.sql new file mode 100644 index 00000000..c5cffa31 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/created_at/alterations/alt0000000003.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/created_at/alterations/alt0000000003 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/created_at/column + + +COMMENT ON COLUMN "constructive_fbp_private".function_graph_execution_outputs.created_at IS 'Timestamp of output creation'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/created_at/column.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/created_at/column.sql new file mode 100644 index 00000000..5fc26973 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/created_at/column.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/created_at/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/table + + + + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/data/alterations/alt0000000004.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/data/alterations/alt0000000004.sql new file mode 100644 index 00000000..b857fd0e --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/data/alterations/alt0000000004.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/data/alterations/alt0000000004 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/table +-- requires: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/data/column + + +ALTER TABLE "constructive_fbp_private".function_graph_execution_outputs + ALTER COLUMN data SET NOT NULL; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/data/alterations/alt0000000005.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/data/alterations/alt0000000005.sql new file mode 100644 index 00000000..bc33d134 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/data/alterations/alt0000000005.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/data/alterations/alt0000000005 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/data/column + + +COMMENT ON COLUMN "constructive_fbp_private".function_graph_execution_outputs.data IS 'The actual output payload from a completed node'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/data/column.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/data/column.sql new file mode 100644 index 00000000..e1933354 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/data/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/data/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/table + + +ALTER TABLE "constructive_fbp_private".function_graph_execution_outputs + ADD COLUMN data jsonb; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/database_id/alterations/alt0000000006.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/database_id/alterations/alt0000000006.sql new file mode 100644 index 00000000..ae0504dc --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/database_id/alterations/alt0000000006.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/database_id/alterations/alt0000000006 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/table +-- requires: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/database_id/column + + +ALTER TABLE "constructive_fbp_private".function_graph_execution_outputs + ALTER COLUMN database_id SET NOT NULL; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/database_id/alterations/alt0000000007.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/database_id/alterations/alt0000000007.sql new file mode 100644 index 00000000..3c795a37 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/database_id/alterations/alt0000000007.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/database_id/alterations/alt0000000007 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/database_id/column + + +COMMENT ON COLUMN "constructive_fbp_private".function_graph_execution_outputs.database_id IS E'Database scope for multi-tenant isolation'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/database_id/column.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/database_id/column.sql new file mode 100644 index 00000000..658c1d57 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/database_id/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/database_id/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/table + + +ALTER TABLE "constructive_fbp_private".function_graph_execution_outputs + ADD COLUMN database_id uuid; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/hash/alterations/alt0000000008.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/hash/alterations/alt0000000008.sql new file mode 100644 index 00000000..1df5cc69 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/hash/alterations/alt0000000008.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/hash/alterations/alt0000000008 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/table +-- requires: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/hash/column + + +ALTER TABLE "constructive_fbp_private".function_graph_execution_outputs + ALTER COLUMN hash SET NOT NULL; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/hash/alterations/alt0000000009.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/hash/alterations/alt0000000009.sql new file mode 100644 index 00000000..20da4b14 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/hash/alterations/alt0000000009.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/hash/alterations/alt0000000009 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/hash/column + + +COMMENT ON COLUMN "constructive_fbp_private".function_graph_execution_outputs.hash IS E'SHA-256 hash of the data JSONB — content-addressed deduplication'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/hash/column.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/hash/column.sql new file mode 100644 index 00000000..0f0cdd58 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/hash/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/hash/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/table + + +ALTER TABLE "constructive_fbp_private".function_graph_execution_outputs + ADD COLUMN hash bytea; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/id/alterations/alt0000000010.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/id/alterations/alt0000000010.sql new file mode 100644 index 00000000..4580728d --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/id/alterations/alt0000000010.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/id/alterations/alt0000000010 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/table +-- requires: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/id/column + + +ALTER TABLE "constructive_fbp_private".function_graph_execution_outputs + ALTER COLUMN id SET NOT NULL; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/id/alterations/alt0000000011.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/id/alterations/alt0000000011.sql new file mode 100644 index 00000000..7901ccb9 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/id/alterations/alt0000000011.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/id/alterations/alt0000000011 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/table +-- requires: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/id/column + + +ALTER TABLE "constructive_fbp_private".function_graph_execution_outputs + ALTER COLUMN id SET DEFAULT uuidv7(); + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/id/alterations/alt0000000012.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/id/alterations/alt0000000012.sql new file mode 100644 index 00000000..40e0ebd8 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/id/alterations/alt0000000012.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/id/alterations/alt0000000012 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/id/column + + +COMMENT ON COLUMN "constructive_fbp_private".function_graph_execution_outputs.id IS 'Unique execution output identifier'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/id/column.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/id/column.sql new file mode 100644 index 00000000..961af109 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/id/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/id/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/table + + +ALTER TABLE "constructive_fbp_private".function_graph_execution_outputs + ADD COLUMN id uuid; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/constraints/function_graph_execution_outputs_pkey/constraint.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/constraints/function_graph_execution_outputs_pkey/constraint.sql new file mode 100644 index 00000000..2686b488 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/constraints/function_graph_execution_outputs_pkey/constraint.sql @@ -0,0 +1,12 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/constraints/function_graph_execution_outputs_pkey/constraint +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/table +-- requires: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/created_at/column +-- requires: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/id/column + + +ALTER TABLE "constructive_fbp_private".function_graph_execution_outputs + ADD CONSTRAINT function_graph_execution_outputs_pkey PRIMARY KEY (created_at, id); + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/indexes/idx_function_graph_execution_outputs_unique_hash.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/indexes/idx_function_graph_execution_outputs_unique_hash.sql new file mode 100644 index 00000000..d678c49f --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/indexes/idx_function_graph_execution_outputs_unique_hash.sql @@ -0,0 +1,12 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/indexes/idx_function_graph_execution_outputs_unique_hash +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/table +-- requires: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/database_id/column +-- requires: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/hash/column +-- requires: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/created_at/column + + +CREATE UNIQUE INDEX idx_function_graph_execution_outputs_unique_hash ON "constructive_fbp_private".function_graph_execution_outputs ( database_id, hash, created_at ); + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/table.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/table.sql new file mode 100644 index 00000000..58ff6845 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/table.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/table +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema + + +CREATE TABLE "constructive_fbp_private".function_graph_execution_outputs ( + created_at timestamptz NOT NULL DEFAULT now() +) PARTITION BY RANGE (created_at); + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/alterations/alt0000000013.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/alterations/alt0000000013.sql new file mode 100644 index 00000000..97d8d194 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/alterations/alt0000000013.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/alterations/alt0000000013 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/table + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + DISABLE ROW LEVEL SECURITY; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/alterations/alt0000000014.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/alterations/alt0000000014.sql new file mode 100644 index 00000000..32d21ab1 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/alterations/alt0000000014.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/alterations/alt0000000014 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/table + + +COMMENT ON TABLE "constructive_fbp_private".function_graph_executions IS 'Ephemeral execution state for flow graph evaluation'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/completed_at/alterations/alt0000000015.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/completed_at/alterations/alt0000000015.sql new file mode 100644 index 00000000..98618893 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/completed_at/alterations/alt0000000015.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/columns/completed_at/alterations/alt0000000015 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/columns/completed_at/column + + +COMMENT ON COLUMN "constructive_fbp_private".function_graph_executions.completed_at IS 'Execution completion timestamp'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/completed_at/column.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/completed_at/column.sql new file mode 100644 index 00000000..31077ff0 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/completed_at/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/columns/completed_at/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/table + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + ADD COLUMN completed_at timestamptz; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/current_wave/alterations/alt0000000016.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/current_wave/alterations/alt0000000016.sql new file mode 100644 index 00000000..b4f18285 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/current_wave/alterations/alt0000000016.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/columns/current_wave/alterations/alt0000000016 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/table +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/columns/current_wave/column + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + ALTER COLUMN current_wave SET NOT NULL; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/current_wave/alterations/alt0000000017.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/current_wave/alterations/alt0000000017.sql new file mode 100644 index 00000000..d93c88cb --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/current_wave/alterations/alt0000000017.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/columns/current_wave/alterations/alt0000000017 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/table +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/columns/current_wave/column + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + ALTER COLUMN current_wave SET DEFAULT 0; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/current_wave/alterations/alt0000000018.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/current_wave/alterations/alt0000000018.sql new file mode 100644 index 00000000..46f5130b --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/current_wave/alterations/alt0000000018.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/columns/current_wave/alterations/alt0000000018 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/columns/current_wave/column + + +COMMENT ON COLUMN "constructive_fbp_private".function_graph_executions.current_wave IS E'Index into execution_plan — tick only processes this wave'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/current_wave/column.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/current_wave/column.sql new file mode 100644 index 00000000..835697d0 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/current_wave/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/columns/current_wave/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/table + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + ADD COLUMN current_wave integer; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/database_id/alterations/alt0000000019.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/database_id/alterations/alt0000000019.sql new file mode 100644 index 00000000..d6fca163 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/database_id/alterations/alt0000000019.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/columns/database_id/alterations/alt0000000019 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/table +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/columns/database_id/column + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + ALTER COLUMN database_id SET NOT NULL; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/database_id/alterations/alt0000000020.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/database_id/alterations/alt0000000020.sql new file mode 100644 index 00000000..43c378c7 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/database_id/alterations/alt0000000020.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/columns/database_id/alterations/alt0000000020 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/columns/database_id/column + + +COMMENT ON COLUMN "constructive_fbp_private".function_graph_executions.database_id IS E'Database scope for multi-tenant isolation'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/database_id/column.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/database_id/column.sql new file mode 100644 index 00000000..f9a43a71 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/database_id/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/columns/database_id/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/table + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + ADD COLUMN database_id uuid; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/definitions_commit_id/alterations/alt0000000021.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/definitions_commit_id/alterations/alt0000000021.sql new file mode 100644 index 00000000..1c69986a --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/definitions_commit_id/alterations/alt0000000021.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/columns/definitions_commit_id/alterations/alt0000000021 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/columns/definitions_commit_id/column + + +COMMENT ON COLUMN "constructive_fbp_private".function_graph_executions.definitions_commit_id IS 'Pinned definitions store commit for deterministic evaluation'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/definitions_commit_id/column.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/definitions_commit_id/column.sql new file mode 100644 index 00000000..971c7e49 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/definitions_commit_id/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/columns/definitions_commit_id/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/table + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + ADD COLUMN definitions_commit_id uuid; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/entity_id/alterations/alt0000000022.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/entity_id/alterations/alt0000000022.sql new file mode 100644 index 00000000..1c30c315 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/entity_id/alterations/alt0000000022.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/columns/entity_id/alterations/alt0000000022 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/columns/entity_id/column + + +COMMENT ON COLUMN "constructive_fbp_private".function_graph_executions.entity_id IS E'Entity context (org/team) for scoped billing'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/entity_id/column.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/entity_id/column.sql new file mode 100644 index 00000000..20a1f82d --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/entity_id/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/columns/entity_id/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/table + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + ADD COLUMN entity_id uuid; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/error_code/alterations/alt0000000023.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/error_code/alterations/alt0000000023.sql new file mode 100644 index 00000000..121ce780 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/error_code/alterations/alt0000000023.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/columns/error_code/alterations/alt0000000023 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/columns/error_code/column + + +COMMENT ON COLUMN "constructive_fbp_private".function_graph_executions.error_code IS E'Machine-readable error code when status = failed'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/error_code/column.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/error_code/column.sql new file mode 100644 index 00000000..416381ea --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/error_code/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/columns/error_code/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/table + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + ADD COLUMN error_code text; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/error_message/alterations/alt0000000024.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/error_message/alterations/alt0000000024.sql new file mode 100644 index 00000000..e7b50063 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/error_message/alterations/alt0000000024.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/columns/error_message/alterations/alt0000000024 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/columns/error_message/column + + +COMMENT ON COLUMN "constructive_fbp_private".function_graph_executions.error_message IS E'Human-readable error description when status = failed'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/error_message/column.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/error_message/column.sql new file mode 100644 index 00000000..a957c6c3 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/error_message/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/columns/error_message/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/table + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + ADD COLUMN error_message text; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/execution_plan/alterations/alt0000000025.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/execution_plan/alterations/alt0000000025.sql new file mode 100644 index 00000000..b83617dc --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/execution_plan/alterations/alt0000000025.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/columns/execution_plan/alterations/alt0000000025 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/columns/execution_plan/column + + +COMMENT ON COLUMN "constructive_fbp_private".function_graph_executions.execution_plan IS E'Pre-computed topological sort as array of wave objects'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/execution_plan/column.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/execution_plan/column.sql new file mode 100644 index 00000000..993abc9f --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/execution_plan/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/columns/execution_plan/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/table + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + ADD COLUMN execution_plan jsonb; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/graph_id/alterations/alt0000000026.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/graph_id/alterations/alt0000000026.sql new file mode 100644 index 00000000..a98314ad --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/graph_id/alterations/alt0000000026.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/columns/graph_id/alterations/alt0000000026 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/table +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/columns/graph_id/column + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + ALTER COLUMN graph_id SET NOT NULL; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/graph_id/alterations/alt0000000027.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/graph_id/alterations/alt0000000027.sql new file mode 100644 index 00000000..2c9f55f9 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/graph_id/alterations/alt0000000027.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/columns/graph_id/alterations/alt0000000027 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/columns/graph_id/column + + +COMMENT ON COLUMN "constructive_fbp_private".function_graph_executions.graph_id IS 'FK to the graph definition being executed'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/graph_id/column.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/graph_id/column.sql new file mode 100644 index 00000000..260b0c2e --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/graph_id/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/columns/graph_id/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/table + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + ADD COLUMN graph_id uuid; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/id/alterations/alt0000000028.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/id/alterations/alt0000000028.sql new file mode 100644 index 00000000..eb4aff82 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/id/alterations/alt0000000028.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/columns/id/alterations/alt0000000028 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/table +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/columns/id/column + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + ALTER COLUMN id SET NOT NULL; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/id/alterations/alt0000000029.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/id/alterations/alt0000000029.sql new file mode 100644 index 00000000..88bca330 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/id/alterations/alt0000000029.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/columns/id/alterations/alt0000000029 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/table +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/columns/id/column + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + ALTER COLUMN id SET DEFAULT uuidv7(); + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/id/alterations/alt0000000030.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/id/alterations/alt0000000030.sql new file mode 100644 index 00000000..ad25be41 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/id/alterations/alt0000000030.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/columns/id/alterations/alt0000000030 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/columns/id/column + + +COMMENT ON COLUMN "constructive_fbp_private".function_graph_executions.id IS 'Unique execution identifier'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/id/column.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/id/column.sql new file mode 100644 index 00000000..c81543ac --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/id/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/columns/id/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/table + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + ADD COLUMN id uuid; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/input_payload/alterations/alt0000000031.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/input_payload/alterations/alt0000000031.sql new file mode 100644 index 00000000..8f8dbae8 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/input_payload/alterations/alt0000000031.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/columns/input_payload/alterations/alt0000000031 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/columns/input_payload/column + + +COMMENT ON COLUMN "constructive_fbp_private".function_graph_executions.input_payload IS 'Initial inputs provided at invocation time'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/input_payload/column.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/input_payload/column.sql new file mode 100644 index 00000000..0cfd6acf --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/input_payload/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/columns/input_payload/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/table + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + ADD COLUMN input_payload jsonb; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/invocation_id/alterations/alt0000000032.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/invocation_id/alterations/alt0000000032.sql new file mode 100644 index 00000000..007bdd04 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/invocation_id/alterations/alt0000000032.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/columns/invocation_id/alterations/alt0000000032 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/columns/invocation_id/column + + +COMMENT ON COLUMN "constructive_fbp_private".function_graph_executions.invocation_id IS E'Parent function_invocations row (for metering)'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/invocation_id/column.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/invocation_id/column.sql new file mode 100644 index 00000000..7275fa31 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/invocation_id/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/columns/invocation_id/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/table + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + ADD COLUMN invocation_id uuid; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_pending_jobs/alterations/alt0000000033.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_pending_jobs/alterations/alt0000000033.sql new file mode 100644 index 00000000..d35fbe07 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_pending_jobs/alterations/alt0000000033.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_pending_jobs/alterations/alt0000000033 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/table +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_pending_jobs/column + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + ALTER COLUMN max_pending_jobs SET NOT NULL; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_pending_jobs/alterations/alt0000000034.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_pending_jobs/alterations/alt0000000034.sql new file mode 100644 index 00000000..66d37e5a --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_pending_jobs/alterations/alt0000000034.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_pending_jobs/alterations/alt0000000034 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/table +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_pending_jobs/column + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + ALTER COLUMN max_pending_jobs SET DEFAULT 50; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_pending_jobs/alterations/alt0000000035.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_pending_jobs/alterations/alt0000000035.sql new file mode 100644 index 00000000..ae711a38 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_pending_jobs/alterations/alt0000000035.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_pending_jobs/alterations/alt0000000035 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_pending_jobs/column + + +COMMENT ON COLUMN "constructive_fbp_private".function_graph_executions.max_pending_jobs IS E'Maximum pending jobs before execution is failed (default 50)'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_pending_jobs/column.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_pending_jobs/column.sql new file mode 100644 index 00000000..3d87b41e --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_pending_jobs/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_pending_jobs/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/table + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + ADD COLUMN max_pending_jobs integer; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_ticks/alterations/alt0000000036.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_ticks/alterations/alt0000000036.sql new file mode 100644 index 00000000..6aa07de6 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_ticks/alterations/alt0000000036.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_ticks/alterations/alt0000000036 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/table +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_ticks/column + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + ALTER COLUMN max_ticks SET NOT NULL; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_ticks/alterations/alt0000000037.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_ticks/alterations/alt0000000037.sql new file mode 100644 index 00000000..c23b73cb --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_ticks/alterations/alt0000000037.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_ticks/alterations/alt0000000037 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/table +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_ticks/column + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + ALTER COLUMN max_ticks SET DEFAULT 100; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_ticks/alterations/alt0000000038.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_ticks/alterations/alt0000000038.sql new file mode 100644 index 00000000..eab43e00 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_ticks/alterations/alt0000000038.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_ticks/alterations/alt0000000038 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_ticks/column + + +COMMENT ON COLUMN "constructive_fbp_private".function_graph_executions.max_ticks IS E'Maximum ticks before execution is failed (default 100)'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_ticks/column.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_ticks/column.sql new file mode 100644 index 00000000..494d38e4 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_ticks/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_ticks/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/table + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + ADD COLUMN max_ticks integer; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/node_outputs/alterations/alt0000000039.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/node_outputs/alterations/alt0000000039.sql new file mode 100644 index 00000000..1720e86a --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/node_outputs/alterations/alt0000000039.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/columns/node_outputs/alterations/alt0000000039 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/table +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/columns/node_outputs/column + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + ALTER COLUMN node_outputs SET NOT NULL; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/node_outputs/alterations/alt0000000040.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/node_outputs/alterations/alt0000000040.sql new file mode 100644 index 00000000..a81bd9e3 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/node_outputs/alterations/alt0000000040.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/columns/node_outputs/alterations/alt0000000040 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/table +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/columns/node_outputs/column + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + ALTER COLUMN node_outputs SET DEFAULT '{}'::jsonb; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/node_outputs/alterations/alt0000000041.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/node_outputs/alterations/alt0000000041.sql new file mode 100644 index 00000000..31658090 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/node_outputs/alterations/alt0000000041.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/columns/node_outputs/alterations/alt0000000041 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/columns/node_outputs/column + + +COMMENT ON COLUMN "constructive_fbp_private".function_graph_executions.node_outputs IS E'Map of node_name → execution output id (content-addressed hash reference)'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/node_outputs/column.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/node_outputs/column.sql new file mode 100644 index 00000000..b7403a1e --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/node_outputs/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/columns/node_outputs/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/table + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + ADD COLUMN node_outputs jsonb; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_node/alterations/alt0000000042.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_node/alterations/alt0000000042.sql new file mode 100644 index 00000000..2d686e23 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_node/alterations/alt0000000042.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_node/alterations/alt0000000042 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/table +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_node/column + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + ALTER COLUMN output_node SET NOT NULL; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_node/alterations/alt0000000043.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_node/alterations/alt0000000043.sql new file mode 100644 index 00000000..300549b8 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_node/alterations/alt0000000043.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_node/alterations/alt0000000043 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_node/column + + +COMMENT ON COLUMN "constructive_fbp_private".function_graph_executions.output_node IS 'Target output boundary node name to resolve'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_node/column.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_node/column.sql new file mode 100644 index 00000000..9739d146 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_node/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_node/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/table + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + ADD COLUMN output_node text; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_payload/alterations/alt0000000044.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_payload/alterations/alt0000000044.sql new file mode 100644 index 00000000..bdd33c82 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_payload/alterations/alt0000000044.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_payload/alterations/alt0000000044 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_payload/column + + +COMMENT ON COLUMN "constructive_fbp_private".function_graph_executions.output_payload IS 'Final result extracted from terminal output node'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_payload/column.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_payload/column.sql new file mode 100644 index 00000000..476edc6a --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_payload/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_payload/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/table + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + ADD COLUMN output_payload jsonb; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_port/alterations/alt0000000045.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_port/alterations/alt0000000045.sql new file mode 100644 index 00000000..9bca4bc5 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_port/alterations/alt0000000045.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_port/alterations/alt0000000045 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/table +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_port/column + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + ALTER COLUMN output_port SET NOT NULL; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_port/alterations/alt0000000046.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_port/alterations/alt0000000046.sql new file mode 100644 index 00000000..bd55d3a2 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_port/alterations/alt0000000046.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_port/alterations/alt0000000046 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/table +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_port/column + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + ALTER COLUMN output_port SET DEFAULT 'value'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_port/alterations/alt0000000047.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_port/alterations/alt0000000047.sql new file mode 100644 index 00000000..86fa2835 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_port/alterations/alt0000000047.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_port/alterations/alt0000000047 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_port/column + + +COMMENT ON COLUMN "constructive_fbp_private".function_graph_executions.output_port IS E'Target output port name (default: value)'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_port/column.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_port/column.sql new file mode 100644 index 00000000..df1fa157 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_port/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_port/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/table + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + ADD COLUMN output_port text; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/parent_execution_id/alterations/alt0000000048.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/parent_execution_id/alterations/alt0000000048.sql new file mode 100644 index 00000000..df588634 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/parent_execution_id/alterations/alt0000000048.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/columns/parent_execution_id/alterations/alt0000000048 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/columns/parent_execution_id/column + + +COMMENT ON COLUMN "constructive_fbp_private".function_graph_executions.parent_execution_id IS E'Parent execution when this is a sub-execution'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/parent_execution_id/column.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/parent_execution_id/column.sql new file mode 100644 index 00000000..c1ff02cc --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/parent_execution_id/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/columns/parent_execution_id/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/table + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + ADD COLUMN parent_execution_id uuid; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/parent_node_name/alterations/alt0000000049.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/parent_node_name/alterations/alt0000000049.sql new file mode 100644 index 00000000..3afceee5 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/parent_node_name/alterations/alt0000000049.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/columns/parent_node_name/alterations/alt0000000049 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/columns/parent_node_name/column + + +COMMENT ON COLUMN "constructive_fbp_private".function_graph_executions.parent_node_name IS E'Node name in parent execution that spawned this sub-execution'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/parent_node_name/column.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/parent_node_name/column.sql new file mode 100644 index 00000000..8798586d --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/parent_node_name/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/columns/parent_node_name/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/table + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + ADD COLUMN parent_node_name text; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/started_at/alterations/alt0000000050.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/started_at/alterations/alt0000000050.sql new file mode 100644 index 00000000..41b5ba50 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/started_at/alterations/alt0000000050.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/columns/started_at/alterations/alt0000000050 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/columns/started_at/column + + +COMMENT ON COLUMN "constructive_fbp_private".function_graph_executions.started_at IS 'Execution start timestamp'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/started_at/column.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/started_at/column.sql new file mode 100644 index 00000000..7ad5a6a5 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/started_at/column.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/columns/started_at/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/table + + + + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/alterations/alt0000000051.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/alterations/alt0000000051.sql new file mode 100644 index 00000000..4fe60018 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/alterations/alt0000000051.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/alterations/alt0000000051 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/table +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/column + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + ALTER COLUMN status SET NOT NULL; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/alterations/alt0000000052.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/alterations/alt0000000052.sql new file mode 100644 index 00000000..a5dc3de4 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/alterations/alt0000000052.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/alterations/alt0000000052 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/table +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/column + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + ALTER COLUMN status SET DEFAULT 'pending'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/alterations/alt0000000053.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/alterations/alt0000000053.sql new file mode 100644 index 00000000..9668a644 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/alterations/alt0000000053.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/alterations/alt0000000053 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/column + + +COMMENT ON COLUMN "constructive_fbp_private".function_graph_executions.status IS E'Lifecycle: pending → running → completed/failed/cancelled'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/alterations/alt0000000054.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/alterations/alt0000000054.sql new file mode 100644 index 00000000..fff0b1a6 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/alterations/alt0000000054.sql @@ -0,0 +1,12 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/alterations/alt0000000054 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/table +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/column + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + ADD CONSTRAINT function_graph_executions_status_chk + CHECK (status IN ( 'pending', 'running', 'completed', 'failed', 'cancelled' )); + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/column.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/column.sql new file mode 100644 index 00000000..9b9d740a --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/table + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + ADD COLUMN status text; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/tick_count/alterations/alt0000000055.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/tick_count/alterations/alt0000000055.sql new file mode 100644 index 00000000..77898830 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/tick_count/alterations/alt0000000055.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/columns/tick_count/alterations/alt0000000055 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/table +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/columns/tick_count/column + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + ALTER COLUMN tick_count SET NOT NULL; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/tick_count/alterations/alt0000000056.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/tick_count/alterations/alt0000000056.sql new file mode 100644 index 00000000..240ad686 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/tick_count/alterations/alt0000000056.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/columns/tick_count/alterations/alt0000000056 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/table +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/columns/tick_count/column + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + ALTER COLUMN tick_count SET DEFAULT 0; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/tick_count/alterations/alt0000000057.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/tick_count/alterations/alt0000000057.sql new file mode 100644 index 00000000..20bf0b69 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/tick_count/alterations/alt0000000057.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/columns/tick_count/alterations/alt0000000057 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/columns/tick_count/column + + +COMMENT ON COLUMN "constructive_fbp_private".function_graph_executions.tick_count IS E'Number of evaluate_step ticks executed'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/tick_count/column.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/tick_count/column.sql new file mode 100644 index 00000000..c7b732f0 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/tick_count/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/columns/tick_count/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/table + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + ADD COLUMN tick_count integer; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/timeout_at/alterations/alt0000000058.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/timeout_at/alterations/alt0000000058.sql new file mode 100644 index 00000000..278ed66d --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/timeout_at/alterations/alt0000000058.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/columns/timeout_at/alterations/alt0000000058 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/table +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/columns/timeout_at/column + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + ALTER COLUMN timeout_at SET NOT NULL; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/timeout_at/alterations/alt0000000059.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/timeout_at/alterations/alt0000000059.sql new file mode 100644 index 00000000..fa5c3972 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/timeout_at/alterations/alt0000000059.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/columns/timeout_at/alterations/alt0000000059 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/table +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/columns/timeout_at/column + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + ALTER COLUMN timeout_at SET DEFAULT now() + '5 minutes'::interval; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/timeout_at/alterations/alt0000000060.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/timeout_at/alterations/alt0000000060.sql new file mode 100644 index 00000000..708adb47 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/timeout_at/alterations/alt0000000060.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/columns/timeout_at/alterations/alt0000000060 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/columns/timeout_at/column + + +COMMENT ON COLUMN "constructive_fbp_private".function_graph_executions.timeout_at IS E'Absolute deadline — execution fails if still running after this time'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/timeout_at/column.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/timeout_at/column.sql new file mode 100644 index 00000000..5c30d771 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/columns/timeout_at/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/columns/timeout_at/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/table + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + ADD COLUMN timeout_at timestamptz; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/constraints/function_graph_executions_graph_id_fkey/constraint.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/constraints/function_graph_executions_graph_id_fkey/constraint.sql new file mode 100644 index 00000000..8b4fb04b --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/constraints/function_graph_executions_graph_id_fkey/constraint.sql @@ -0,0 +1,17 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/constraints/function_graph_executions_graph_id_fkey/constraint +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_public/tables/function_graphs/table +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/table +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/columns/graph_id/column +-- requires: schemas/constructive_fbp_public/tables/function_graphs/columns/id/column +-- requires: schemas/constructive_fbp_public/tables/function_graphs/constraints/function_graphs_pkey/constraint + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + ADD CONSTRAINT function_graph_executions_graph_id_fkey + FOREIGN KEY(graph_id) + REFERENCES "constructive_fbp_public".function_graphs (id); + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/constraints/function_graph_executions_pkey/constraint.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/constraints/function_graph_executions_pkey/constraint.sql new file mode 100644 index 00000000..e0d5e94f --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/constraints/function_graph_executions_pkey/constraint.sql @@ -0,0 +1,12 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/constraints/function_graph_executions_pkey/constraint +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/table +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/columns/started_at/column +-- requires: schemas/constructive_fbp_private/tables/function_graph_executions/columns/id/column + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + ADD CONSTRAINT function_graph_executions_pkey PRIMARY KEY (started_at, id); + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/table.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/table.sql new file mode 100644 index 00000000..b032305b --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/tables/function_graph_executions/table.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_private/tables/function_graph_executions/table +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema + + +CREATE TABLE "constructive_fbp_private".function_graph_executions ( + started_at timestamptz NOT NULL DEFAULT now() +) PARTITION BY RANGE (started_at); + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/trigger_fns/tg_graph_object_generate_id_hash.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/trigger_fns/tg_graph_object_generate_id_hash.sql new file mode 100644 index 00000000..62576d69 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_private/trigger_fns/tg_graph_object_generate_id_hash.sql @@ -0,0 +1,13 @@ +-- Deploy: schemas/constructive_fbp_private/trigger_fns/tg_graph_object_generate_id_hash +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_private/schema + + +CREATE FUNCTION "constructive_fbp_private".tg_graph_object_generate_id_hash() RETURNS TRIGGER AS $_PGFN_$ +BEGIN + NEW.id := "constructive_fbp_private".graph_object_hash_uuid(NEW); + RETURN NEW; +END; +$_PGFN_$ LANGUAGE plpgsql VOLATILE SECURITY INVOKER; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/procedures/add_edge/procedure.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/procedures/add_edge/procedure.sql new file mode 100644 index 00000000..939260b4 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/procedures/add_edge/procedure.sql @@ -0,0 +1,36 @@ +-- Deploy: schemas/constructive_fbp_public/procedures/add_edge/procedure +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema + + +CREATE FUNCTION "constructive_fbp_public".add_edge( + IN database_id uuid, + IN root_hash uuid, + IN src_node text, + IN src_port text, + IN dst_node text, + IN dst_port text, + IN context text, + IN graph_name text +) RETURNS uuid AS $_PGFN_$ +DECLARE + v_edge_count integer := 0; + v_scope_path text[]; + v_row record; + v_edge_data jsonb; + v_src_segments text[]; + v_dst_segments text[]; +BEGIN + FOR v_row IN SELECT * + FROM "constructive_fbp_public".graph_get_all(add_edge.database_id, add_edge.root_hash) + WHERE + (cardinality(path) = 5 AND (path)[4] = 'edges') AND ((path)[1] = add_edge.context AND ((path)[2] = 'graphs' AND (path)[3] = add_edge.graph_name)) LOOP + v_edge_count := v_edge_count + 1; + END LOOP; + v_scope_path := ARRAY[add_edge.context, 'graphs', add_edge.graph_name, 'edges', v_edge_count::text]; + v_edge_data := jsonb_build_object('src', jsonb_build_object('node', add_edge.src_node, 'port', add_edge.src_port), 'dst', jsonb_build_object('node', add_edge.dst_node, 'port', add_edge.dst_port)); + RETURN "constructive_fbp_public".graph_insert_node_at_path(add_edge.database_id, add_edge.root_hash, v_scope_path, v_edge_data, '{}'::uuid[], '{}'::text[]); +END; +$_PGFN_$ LANGUAGE plpgsql VOLATILE SECURITY INVOKER; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/procedures/add_edge_and_save/procedure.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/procedures/add_edge_and_save/procedure.sql new file mode 100644 index 00000000..61466a98 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/procedures/add_edge_and_save/procedure.sql @@ -0,0 +1,35 @@ +-- Deploy: schemas/constructive_fbp_public/procedures/add_edge_and_save/procedure +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema + + +CREATE FUNCTION "constructive_fbp_public".add_edge_and_save( + IN graph_id uuid, + IN src_node text, + IN src_port text, + IN dst_node text, + IN dst_port text, + IN message text DEFAULT NULL +) RETURNS uuid AS $_PGFN_$ +DECLARE + v_graph "constructive_fbp_public".function_graphs; + v_root_hash uuid; +BEGIN + SELECT * + FROM "constructive_fbp_public".function_graphs + WHERE + id = add_edge_and_save.graph_id INTO v_graph; + IF NOT (FOUND) THEN + RAISE EXCEPTION 'function_graph not found'; + END IF; + SELECT c.tree_id + FROM "constructive_fbp_public".graph_ref AS r INNER JOIN "constructive_fbp_public".graph_commit AS c ON c.id = r.commit_id AND c.database_id = r.database_id + WHERE + (r.database_id = v_graph.database_id AND r.store_id = v_graph.store_id) AND r.name = 'main' INTO v_root_hash; + v_root_hash := "constructive_fbp_public".add_edge(v_graph.database_id, v_root_hash, add_edge_and_save.src_node, add_edge_and_save.src_port, add_edge_and_save.dst_node, add_edge_and_save.dst_port, v_graph.context, v_graph.name); + PERFORM "constructive_fbp_public".save_graph(add_edge_and_save.graph_id, v_root_hash, coalesce(add_edge_and_save.message, 'add edge' || add_edge_and_save.src_node)); + RETURN add_edge_and_save.graph_id; +END; +$_PGFN_$ LANGUAGE plpgsql VOLATILE SECURITY INVOKER; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/procedures/add_node/procedure.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/procedures/add_node/procedure.sql new file mode 100644 index 00000000..975b4581 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/procedures/add_node/procedure.sql @@ -0,0 +1,38 @@ +-- Deploy: schemas/constructive_fbp_public/procedures/add_node/procedure +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema + + +CREATE FUNCTION "constructive_fbp_public".add_node( + IN database_id uuid, + IN root_hash uuid, + IN node_name text, + IN node_type text, + IN context text, + IN graph_name text, + IN props jsonb DEFAULT NULL, + IN meta jsonb DEFAULT NULL +) RETURNS uuid AS $_PGFN_$ +DECLARE + v_path text[]; + v_segments text[]; + v_node_data jsonb; + v_i integer; +BEGIN + v_segments := string_to_array(add_node.node_name, '/'); + v_path := ARRAY[add_node.context, 'graphs', add_node.graph_name]; + FOR v_i IN 1..array_length(v_segments, 1) LOOP + v_path := v_path || ARRAY['nodes', (v_segments)[v_i]]; + END LOOP; + v_node_data := jsonb_build_object('type', add_node.node_type); + IF add_node.meta IS NOT NULL THEN + v_node_data := v_node_data || jsonb_build_object('meta', add_node.meta); + END IF; + IF add_node.props IS NOT NULL THEN + v_node_data := v_node_data || jsonb_build_object('props', add_node.props); + END IF; + RETURN "constructive_fbp_public".graph_insert_node_at_path(add_node.database_id, add_node.root_hash, v_path, v_node_data, '{}'::uuid[], '{}'::text[]); +END; +$_PGFN_$ LANGUAGE plpgsql VOLATILE SECURITY INVOKER; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/procedures/add_node_and_save/procedure.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/procedures/add_node_and_save/procedure.sql new file mode 100644 index 00000000..78923437 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/procedures/add_node_and_save/procedure.sql @@ -0,0 +1,35 @@ +-- Deploy: schemas/constructive_fbp_public/procedures/add_node_and_save/procedure +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema + + +CREATE FUNCTION "constructive_fbp_public".add_node_and_save( + IN graph_id uuid, + IN node_name text, + IN node_type text, + IN props jsonb DEFAULT NULL, + IN meta jsonb DEFAULT NULL, + IN message text DEFAULT NULL +) RETURNS uuid AS $_PGFN_$ +DECLARE + v_graph "constructive_fbp_public".function_graphs; + v_root_hash uuid; +BEGIN + SELECT * + FROM "constructive_fbp_public".function_graphs + WHERE + id = add_node_and_save.graph_id INTO v_graph; + IF NOT (FOUND) THEN + RAISE EXCEPTION 'function_graph not found'; + END IF; + SELECT c.tree_id + FROM "constructive_fbp_public".graph_ref AS r INNER JOIN "constructive_fbp_public".graph_commit AS c ON c.id = r.commit_id AND c.database_id = r.database_id + WHERE + (r.database_id = v_graph.database_id AND r.store_id = v_graph.store_id) AND r.name = 'main' INTO v_root_hash; + v_root_hash := "constructive_fbp_public".add_node(v_graph.database_id, v_root_hash, add_node_and_save.node_name, add_node_and_save.node_type, v_graph.context, v_graph.name, add_node_and_save.props, add_node_and_save.meta); + PERFORM "constructive_fbp_public".save_graph(add_node_and_save.graph_id, v_root_hash, coalesce(add_node_and_save.message, 'add node: ' || add_node_and_save.node_name)); + RETURN add_node_and_save.graph_id; +END; +$_PGFN_$ LANGUAGE plpgsql VOLATILE SECURITY INVOKER; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/procedures/copy_graph/procedure.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/procedures/copy_graph/procedure.sql new file mode 100644 index 00000000..da720994 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/procedures/copy_graph/procedure.sql @@ -0,0 +1,19 @@ +-- Deploy: schemas/constructive_fbp_public/procedures/copy_graph/procedure +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema + + +CREATE FUNCTION "constructive_fbp_public".copy_graph( + IN database_id uuid, + IN graph_id uuid, + IN name text +) RETURNS uuid AS $_PGFN_$ +DECLARE + v_snapshot jsonb; +BEGIN + v_snapshot := "constructive_fbp_private".serialize_graph(copy_graph.graph_id); + RETURN "constructive_fbp_private".deserialize_graph(copy_graph.database_id, copy_graph.name, v_snapshot); +END; +$_PGFN_$ LANGUAGE plpgsql VOLATILE SECURITY DEFINER; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/procedures/create_function_graph/procedure.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/procedures/create_function_graph/procedure.sql new file mode 100644 index 00000000..d4c068a0 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/procedures/create_function_graph/procedure.sql @@ -0,0 +1,44 @@ +-- Deploy: schemas/constructive_fbp_public/procedures/create_function_graph/procedure +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema + + +CREATE FUNCTION "constructive_fbp_public".create_function_graph( + IN database_id uuid, + IN name text, + IN context text DEFAULT 'function', + IN description text DEFAULT NULL, + IN entity_id uuid DEFAULT NULL, + IN created_by uuid DEFAULT NULL, + IN definitions_commit_id uuid DEFAULT NULL +) RETURNS uuid AS $_PGFN_$ +DECLARE + v_store_id uuid; + v_graph_id uuid; +BEGIN + INSERT INTO "constructive_fbp_public".graph_store ( + database_id, + name + ) + VALUES + (create_function_graph.database_id, create_function_graph.name) + RETURNING id INTO v_store_id; + PERFORM "constructive_fbp_public".graph_init_empty_repo(create_function_graph.database_id, v_store_id); + INSERT INTO "constructive_fbp_public".function_graphs ( + database_id, + store_id, + name, + description, + context, + entity_id, + created_by, + definitions_commit_id + ) + VALUES + (create_function_graph.database_id, v_store_id, create_function_graph.name, create_function_graph.description, create_function_graph.context, create_function_graph.entity_id, create_function_graph.created_by, create_function_graph.definitions_commit_id) + RETURNING id INTO v_graph_id; + RETURN v_graph_id; +END; +$_PGFN_$ LANGUAGE plpgsql VOLATILE SECURITY INVOKER; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/procedures/graph_get_all/procedure.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/procedures/graph_get_all/procedure.sql new file mode 100644 index 00000000..0db88664 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/procedures/graph_get_all/procedure.sql @@ -0,0 +1,39 @@ +-- Deploy: schemas/constructive_fbp_public/procedures/graph_get_all/procedure +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema + + +CREATE FUNCTION "constructive_fbp_public".graph_get_all( + IN s_id uuid, + IN id uuid +) RETURNS TABLE(path text[], data jsonb) AS $_PGFN_$ +DECLARE + root "constructive_fbp_public".graph_object; + i int; + cid uuid; + cname text; + rpath text[]; + rdata jsonb; +BEGIN + SELECT * + FROM "constructive_fbp_public".graph_object AS o + WHERE + o.database_id = s_id AND o.id = graph_get_all.id INTO root; + FOR i IN SELECT * + FROM generate_series(1, cardinality(root.kids)) LOOP + cid := (root.kids)[i]; + cname := (root.ktree)[i]; + FOR rpath, rdata IN SELECT * + FROM "constructive_fbp_public".graph_get_all(s_id, cid) LOOP + path := ARRAY[cname] || rpath; + data := rdata; + RETURN NEXT; + END LOOP; + END LOOP; + path := ARRAY[]::text[]; + data := root.data; + RETURN NEXT; +END; +$_PGFN_$ LANGUAGE plpgsql STABLE SECURITY DEFINER; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/procedures/graph_get_node_at_path/procedure.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/procedures/graph_get_node_at_path/procedure.sql new file mode 100644 index 00000000..7ef4051b --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/procedures/graph_get_node_at_path/procedure.sql @@ -0,0 +1,47 @@ +-- Deploy: schemas/constructive_fbp_public/procedures/graph_get_node_at_path/procedure +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema + + +CREATE FUNCTION "constructive_fbp_public".graph_get_node_at_path( + IN s_id uuid, + IN id uuid, + IN path text[] DEFAULT ARRAY[]::text[] +) RETURNS "constructive_fbp_public".graph_object AS $_PGFN_$ +DECLARE + _path text[] := path; + _obj "constructive_fbp_public".graph_object; + i int; + pos int; + curpath text; + _node_id uuid; +BEGIN + SELECT * + FROM "constructive_fbp_public".graph_object AS o + WHERE + o.id = graph_get_node_at_path.id AND o.database_id = s_id INTO _obj; + IF array_length(_path, 1) > 0 THEN + FOR i IN SELECT * + FROM generate_subscripts(_path, 1) AS g (i) LOOP + curpath := (_path)[1]; + pos := object_store_utils.array_index_of(_obj.ktree, curpath); + IF pos > 0 THEN + _node_id := (_obj.kids)[pos]; + SELECT * + FROM "constructive_fbp_public".graph_object AS o + WHERE + o.id = _node_id AND o.database_id = s_id INTO _obj; + IF array_length(_path, 1) = 1 THEN + RETURN _obj; + END IF; + END IF; + _path := object_store_utils.array_shift(_path); + END LOOP; + ELSE + RETURN _obj; + END IF; + RETURN NULL; +END; +$_PGFN_$ LANGUAGE plpgsql STABLE SECURITY DEFINER; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/procedures/graph_init_empty_repo/procedure.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/procedures/graph_init_empty_repo/procedure.sql new file mode 100644 index 00000000..a59bd64c --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/procedures/graph_init_empty_repo/procedure.sql @@ -0,0 +1,52 @@ +-- Deploy: schemas/constructive_fbp_public/procedures/graph_init_empty_repo/procedure +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema + + +CREATE FUNCTION "constructive_fbp_public".graph_init_empty_repo( + IN s_id uuid, + IN store_id uuid +) RETURNS void AS $_PGFN_$ +DECLARE + v_tree_id uuid; + v_commit_id uuid; + v_ref_id uuid; +BEGIN + IF EXISTS (SELECT 1 + FROM "constructive_fbp_public".graph_commit AS c + WHERE + c.database_id = s_id AND c.store_id = graph_init_empty_repo.store_id) THEN + RAISE EXCEPTION 'REPO_EXISTS'; + END IF; + INSERT INTO "constructive_fbp_public".graph_object ( + database_id + ) + VALUES + (s_id) + ON CONFLICT DO NOTHING + RETURNING id INTO v_tree_id; + INSERT INTO "constructive_fbp_public".graph_ref ( + database_id, + store_id, + name + ) + VALUES + (s_id, graph_init_empty_repo.store_id, 'main') + RETURNING id INTO v_ref_id; + INSERT INTO "constructive_fbp_public".graph_commit ( + database_id, + store_id, + message, + tree_id + ) + VALUES + (s_id, graph_init_empty_repo.store_id, 'first commit', v_tree_id) + RETURNING id INTO v_commit_id; + UPDATE "constructive_fbp_public".graph_ref SET + commit_id = v_commit_id + WHERE + id = v_ref_id AND database_id = s_id; +END; +$_PGFN_$ LANGUAGE plpgsql VOLATILE SECURITY DEFINER; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/procedures/graph_insert_node_at_path/procedure.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/procedures/graph_insert_node_at_path/procedure.sql new file mode 100644 index 00000000..e1b902e5 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/procedures/graph_insert_node_at_path/procedure.sql @@ -0,0 +1,125 @@ +-- Deploy: schemas/constructive_fbp_public/procedures/graph_insert_node_at_path/procedure +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema + + +CREATE FUNCTION "constructive_fbp_public".graph_insert_node_at_path( + IN s_id uuid, + IN root uuid, + IN path text[], + IN data jsonb, + IN kids uuid[], + IN ktree text[] +) RETURNS uuid AS $_PGFN_$ +DECLARE + _newnode_id uuid; + _newparent_id uuid; + _parent "constructive_fbp_public".graph_object; + _orig_name text; + _repl uuid; + _uuid_to_return uuid; + _parent_existed bool; + vkids uuid[]; + vktree text[]; + i int; + _path_len int; + _depth int; + _pos int; + _cur_id uuid; + _cur_obj "constructive_fbp_public".graph_object; + _cached "constructive_fbp_public".graph_object[]; + children_hash jsonb; +BEGIN + _path_len := coalesce(array_length(path, 1), 0); + SELECT * + FROM "constructive_fbp_public".graph_object AS o + WHERE + o.id = graph_insert_node_at_path.root AND o.database_id = s_id INTO _cur_obj; + _cached := array_fill(_cur_obj, ARRAY[1]); + _depth := 0; + IF _cur_obj.id IS NOT NULL AND _path_len > 0 THEN + FOR i IN 1.._path_len LOOP + _pos := object_store_utils.array_index_of(_cur_obj.ktree, (path)[i]); + IF _pos > 0 THEN + _cur_id := (_cur_obj.kids)[_pos]; + SELECT * + FROM "constructive_fbp_public".graph_object AS o + WHERE + o.id = _cur_id AND o.database_id = s_id INTO _cur_obj; + _cached := array_cat(_cached, array_fill(_cur_obj, ARRAY[1])); + _depth := i; + ELSE + EXIT; + END IF; + END LOOP; + END IF; + INSERT INTO "constructive_fbp_public".graph_object ( + database_id, + data, + kids, + ktree + ) + VALUES + (s_id, graph_insert_node_at_path.data, graph_insert_node_at_path.kids, graph_insert_node_at_path.ktree) + ON CONFLICT (id, database_id) DO UPDATE SET + database_id = EXCLUDED.database_id + RETURNING id INTO _newnode_id; + IF _newnode_id IS NULL THEN + RAISE EXCEPTION '_newnode_id failed'; + END IF; + _orig_name := (path)[_path_len]; + _repl := _newnode_id; + _uuid_to_return := _newnode_id; + FOR i IN REVERSE _path_len..1 LOOP + IF (i - 1) = 0 THEN + _parent := (_cached)[1]; + _parent_existed := _parent.id IS NOT NULL; + ELSIF (i - 1) <= _depth THEN + _parent := (_cached)[i]; + _parent_existed := true; + ELSE + _parent_existed := false; + END IF; + IF _parent_existed THEN + children_hash := object_store_utils.zip_arrays(_parent.ktree, _parent.kids); + children_hash := jsonb_set(children_hash, ARRAY[_orig_name]::text[], to_jsonb(_repl)); + SELECT + h.ktree, + h.kids + FROM object_store_utils.unzip_obj_to_ktree_and_kids(children_hash) AS h INTO vktree, vkids; + INSERT INTO "constructive_fbp_public".graph_object ( + database_id, + data, + kids, + ktree + ) + VALUES + (s_id, _parent.data, vkids, vktree) + ON CONFLICT (id, database_id) DO UPDATE SET + database_id = EXCLUDED.database_id + RETURNING id INTO _newparent_id; + IF _newparent_id IS NULL THEN + RAISE EXCEPTION 'parent insert failed'; + END IF; + ELSE + INSERT INTO "constructive_fbp_public".graph_object ( + database_id, + data, + kids, + ktree + ) + VALUES + (s_id, NULL, ARRAY[_repl]::uuid[], ARRAY[_orig_name]::text[]) + ON CONFLICT (id, database_id) DO UPDATE SET + database_id = EXCLUDED.database_id + RETURNING id INTO _newparent_id; + END IF; + _orig_name := (path)[i - 1]; + _repl := _newparent_id; + _uuid_to_return := _newparent_id; + END LOOP; + RETURN _uuid_to_return; +END; +$_PGFN_$ LANGUAGE plpgsql VOLATILE SECURITY DEFINER; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/procedures/graph_set_data_at_path/procedure.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/procedures/graph_set_data_at_path/procedure.sql new file mode 100644 index 00000000..6f2c8d64 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/procedures/graph_set_data_at_path/procedure.sql @@ -0,0 +1,27 @@ +-- Deploy: schemas/constructive_fbp_public/procedures/graph_set_data_at_path/procedure +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema + + +CREATE FUNCTION "constructive_fbp_public".graph_set_data_at_path( + IN s_id uuid, + IN root uuid, + IN path text[], + IN data jsonb +) RETURNS uuid AS $_PGFN_$ +DECLARE + _node "constructive_fbp_public".graph_object; + _kids uuid[] := ARRAY[]::uuid[]; + _ktree text[] := ARRAY[]::text[]; +BEGIN + SELECT * + FROM "constructive_fbp_public".graph_get_node_at_path(s_id, root, path) INTO _node; + IF _node.id IS NOT NULL THEN + _kids := _node.kids; + _ktree := _node.ktree; + END IF; + RETURN "constructive_fbp_public".graph_insert_node_at_path(s_id, root, path, data, _kids, _ktree); +END; +$_PGFN_$ LANGUAGE plpgsql VOLATILE SECURITY DEFINER; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/procedures/import_definitions/procedure.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/procedures/import_definitions/procedure.sql new file mode 100644 index 00000000..9761c317 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/procedures/import_definitions/procedure.sql @@ -0,0 +1,38 @@ +-- Deploy: schemas/constructive_fbp_public/procedures/import_definitions/procedure +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema + + +CREATE FUNCTION "constructive_fbp_public".import_definitions( + IN graph_id uuid, + IN source_scope_id uuid, + IN source_commit_id uuid, + IN contexts text[] +) RETURNS void AS $_PGFN_$ +DECLARE + v_graph "constructive_fbp_public".function_graphs; + v_root_hash uuid; + v_ctx text; + v_i int; +BEGIN + SELECT * + FROM "constructive_fbp_public".function_graphs + WHERE + id = import_definitions.graph_id INTO v_graph; + IF NOT (FOUND) THEN + RAISE EXCEPTION 'function_graph not found'; + END IF; + SELECT c.tree_id + FROM "constructive_fbp_public".graph_ref AS r INNER JOIN "constructive_fbp_public".graph_commit AS c ON c.id = r.commit_id AND c.database_id = r.database_id + WHERE + (r.database_id = v_graph.database_id AND r.store_id = v_graph.store_id) AND r.name = 'main' INTO v_root_hash; + FOR v_i IN 1..cardinality(import_definitions.contexts) LOOP + v_ctx := (import_definitions.contexts)[v_i]; + v_root_hash := "constructive_fbp_private".copy_subtree(import_definitions.source_scope_id, import_definitions.source_commit_id, ARRAY[v_ctx, 'definitions'], v_graph.database_id, v_root_hash, ARRAY[v_ctx, 'definitions']); + END LOOP; + PERFORM "constructive_fbp_public".save_graph(import_definitions.graph_id, v_root_hash, 'import definitions'); + RETURN; +END; +$_PGFN_$ LANGUAGE plpgsql VOLATILE SECURITY DEFINER; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/procedures/import_graph_json/procedure.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/procedures/import_graph_json/procedure.sql new file mode 100644 index 00000000..f1ce69bc --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/procedures/import_graph_json/procedure.sql @@ -0,0 +1,66 @@ +-- Deploy: schemas/constructive_fbp_public/procedures/import_graph_json/procedure +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema + + +CREATE FUNCTION "constructive_fbp_public".import_graph_json( + IN database_id uuid, + IN name text, + IN graph_json jsonb, + IN context text DEFAULT NULL, + IN description text DEFAULT NULL, + IN entity_id uuid DEFAULT NULL, + IN created_by uuid DEFAULT NULL, + IN definitions_commit_id uuid DEFAULT NULL +) RETURNS uuid AS $_PGFN_$ +DECLARE + v_graph_id uuid; + v_graph "constructive_fbp_public".function_graphs; + v_root_hash uuid; + v_context text; + v_node jsonb; + v_edge jsonb; + v_node_name text; + v_edge_idx int := 0; + v_def jsonb; +BEGIN + v_context := coalesce(import_graph_json.context, import_graph_json.graph_json->>'context', 'function'); + v_graph_id := "constructive_fbp_public".create_function_graph(import_graph_json.database_id, import_graph_json.name, v_context, import_graph_json.description, import_graph_json.entity_id, import_graph_json.created_by, import_graph_json.definitions_commit_id); + SELECT * + FROM "constructive_fbp_public".function_graphs + WHERE + id = v_graph_id INTO v_graph; + SELECT c.tree_id + FROM "constructive_fbp_public".graph_ref AS r INNER JOIN "constructive_fbp_public".graph_commit AS c ON c.id = r.commit_id AND c.database_id = r.database_id + WHERE + (r.database_id = v_graph.database_id AND r.store_id = v_graph.store_id) AND r.name = 'main' INTO v_root_hash; + IF import_graph_json.graph_json ? 'nodes' THEN + FOR v_node IN SELECT * + FROM jsonb_array_elements(import_graph_json.graph_json->'nodes') LOOP + v_node_name := v_node->>'name'; + v_root_hash := "constructive_fbp_public".add_node(v_graph.database_id, v_root_hash, v_node_name, v_node->>'type', v_graph.context, v_graph.name, v_node->'props', v_node->'meta'); + IF v_node ? 'nodes' THEN + v_root_hash := "constructive_fbp_private".insert_subnet_nodes(v_graph.database_id, v_root_hash, ARRAY[v_graph.context, 'graphs', v_graph.name, 'nodes', v_node_name], v_node->'nodes', v_node->'edges'); + v_root_hash := "constructive_fbp_public".graph_insert_node_at_path(v_graph.database_id, v_root_hash, ARRAY[v_context, 'definitions', v_node_name], jsonb_build_object('name', v_node_name, 'context', v_graph.context, 'graph', jsonb_build_object('name', v_node_name || '_subnet', 'context', v_graph.context, 'nodes', v_node->'nodes', 'edges', v_node->'edges')), '{}'::uuid[], '{}'::text[]); + END IF; + END LOOP; + END IF; + IF import_graph_json.graph_json ? 'edges' THEN + FOR v_edge IN SELECT * + FROM jsonb_array_elements(import_graph_json.graph_json->'edges') LOOP + v_root_hash := "constructive_fbp_public".graph_insert_node_at_path(v_graph.database_id, v_root_hash, ARRAY[v_graph.context, 'graphs', v_graph.name, 'edges', v_edge_idx::text], jsonb_build_object('src', v_edge->'src', 'dst', v_edge->'dst'), '{}'::uuid[], '{}'::text[]); + v_edge_idx := v_edge_idx + 1; + END LOOP; + END IF; + IF import_graph_json.graph_json ? 'definitions' THEN + FOR v_def IN SELECT * + FROM jsonb_array_elements(import_graph_json.graph_json->'definitions') LOOP + v_root_hash := "constructive_fbp_public".graph_insert_node_at_path(v_graph.database_id, v_root_hash, ARRAY[v_context, 'definitions', v_def->>'name'], v_def, '{}'::uuid[], '{}'::text[]); + END LOOP; + END IF; + PERFORM "constructive_fbp_public".save_graph(v_graph_id, v_root_hash, 'import from JSON'); + RETURN v_graph_id; +END; +$_PGFN_$ LANGUAGE plpgsql VOLATILE SECURITY DEFINER; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/procedures/read_function_graph/procedure.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/procedures/read_function_graph/procedure.sql new file mode 100644 index 00000000..d3507def --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/procedures/read_function_graph/procedure.sql @@ -0,0 +1,74 @@ +-- Deploy: schemas/constructive_fbp_public/procedures/read_function_graph/procedure +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema + + +CREATE FUNCTION "constructive_fbp_public".read_function_graph( + IN graph_id uuid +) RETURNS jsonb AS $_PGFN_$ +DECLARE + v_graph "constructive_fbp_public".function_graphs; + v_tree_id uuid; + v_result jsonb; + v_nodes jsonb := '[]'::jsonb; + v_edges jsonb := '[]'::jsonb; + v_row record; + v_node_data jsonb; + v_node_obj jsonb; + v_edge_data jsonb; + v_definitions jsonb := '[]'::jsonb; +BEGIN + SELECT * + FROM "constructive_fbp_public".function_graphs + WHERE + id = read_function_graph.graph_id INTO v_graph; + IF NOT (FOUND) THEN + RAISE EXCEPTION 'function_graph not found'; + END IF; + SELECT c.tree_id + FROM "constructive_fbp_public".graph_ref AS r INNER JOIN "constructive_fbp_public".graph_commit AS c ON c.id = r.commit_id AND c.database_id = r.database_id + WHERE + (r.database_id = v_graph.database_id AND r.store_id = v_graph.store_id) AND r.name = 'main' INTO v_tree_id; + IF v_tree_id IS NULL THEN + RAISE EXCEPTION 'no tree found for graph'; + END IF; + FOR v_row IN SELECT + path, + data + FROM "constructive_fbp_public".graph_get_all(v_graph.database_id, v_tree_id) + WHERE + (cardinality(path) = 5 AND (path)[4] = 'nodes') AND ((path)[1] = v_graph.context AND ((path)[2] = 'graphs' AND (path)[3] = v_graph.name)) LOOP + v_node_data := v_row.data; + v_node_obj := jsonb_build_object('name', (v_row.path)[5], 'type', v_node_data->>'type'); + IF v_node_data ? 'meta' THEN + v_node_obj := v_node_obj || jsonb_build_object('meta', v_node_data->'meta'); + END IF; + IF v_node_data ? 'props' THEN + v_node_obj := v_node_obj || jsonb_build_object('props', v_node_data->'props'); + END IF; + v_nodes := v_nodes || jsonb_build_array(v_node_obj); + END LOOP; + FOR v_row IN SELECT + path, + data + FROM "constructive_fbp_public".graph_get_all(v_graph.database_id, v_tree_id) + WHERE + (cardinality(path) = 5 AND (path)[4] = 'edges') AND ((path)[1] = v_graph.context AND ((path)[2] = 'graphs' AND (path)[3] = v_graph.name)) + ORDER BY + (path)[5]::integer LOOP + v_edges := v_edges || jsonb_build_array(v_row.data); + END LOOP; + FOR v_row IN SELECT + path, + data + FROM "constructive_fbp_public".graph_get_all(v_graph.database_id, v_tree_id) + WHERE + (cardinality(path) = 3 AND (path)[2] = 'definitions') AND (path)[1] = v_graph.context LOOP + v_definitions := v_definitions || jsonb_build_array(v_row.data); + END LOOP; + v_result := jsonb_build_object('name', v_graph.name, 'context', v_graph.context, 'nodes', v_nodes, 'edges', v_edges, 'definitions', v_definitions); + RETURN v_result; +END; +$_PGFN_$ LANGUAGE plpgsql STABLE SECURITY INVOKER; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/procedures/save_graph/procedure.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/procedures/save_graph/procedure.sql new file mode 100644 index 00000000..c0600fd0 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/procedures/save_graph/procedure.sql @@ -0,0 +1,53 @@ +-- Deploy: schemas/constructive_fbp_public/procedures/save_graph/procedure +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema + + +CREATE FUNCTION "constructive_fbp_public".save_graph( + IN graph_id uuid, + IN root_hash uuid, + IN message text DEFAULT NULL +) RETURNS uuid AS $_PGFN_$ +DECLARE + v_graph "constructive_fbp_public".function_graphs; + v_commit_id uuid; + v_msg text; +BEGIN + SELECT * + FROM "constructive_fbp_public".function_graphs + WHERE + id = save_graph.graph_id INTO v_graph; + IF NOT (FOUND) THEN + RAISE EXCEPTION 'function_graph not found'; + END IF; + v_msg := coalesce(save_graph.message, (now())::text); + INSERT INTO "constructive_fbp_public".graph_commit ( + database_id, + store_id, + message, + parent_ids, + tree_id + ) + SELECT + r.database_id, + r.store_id, + v_msg, + ARRAY[r.commit_id]::uuid[], + save_graph.root_hash + FROM "constructive_fbp_public".graph_ref AS r + WHERE + (r.database_id = v_graph.database_id AND r.store_id = v_graph.store_id) AND r.name = 'main' + RETURNING id INTO v_commit_id; + UPDATE "constructive_fbp_public".graph_ref AS r SET + commit_id = v_commit_id + WHERE + (r.database_id = v_graph.database_id AND r.store_id = v_graph.store_id) AND r.name = 'main'; + UPDATE "constructive_fbp_public".function_graphs SET + is_valid = false, validation_errors = NULL, updated_at = now() + WHERE + id = save_graph.graph_id; + RETURN v_commit_id; +END; +$_PGFN_$ LANGUAGE plpgsql VOLATILE SECURITY INVOKER; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/procedures/start_execution/procedure.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/procedures/start_execution/procedure.sql new file mode 100644 index 00000000..1d10c086 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/procedures/start_execution/procedure.sql @@ -0,0 +1,147 @@ +-- Deploy: schemas/constructive_fbp_public/procedures/start_execution/procedure +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema + + +CREATE FUNCTION "constructive_fbp_public".start_execution( + IN graph_id uuid, + IN input_payload jsonb DEFAULT '{}'::jsonb, + IN output_node text DEFAULT 'output_result', + IN output_port text DEFAULT 'value', + IN max_ticks integer DEFAULT 100, + IN max_pending_jobs integer DEFAULT 50, + IN timeout_interval interval DEFAULT interval '5 minutes', + IN parent_execution_id uuid DEFAULT NULL, + IN parent_node_name text DEFAULT NULL +) RETURNS uuid AS $_PGFN_$ +DECLARE + v_graph "constructive_fbp_public".function_graphs; + v_exec_id uuid; + v_tree_id uuid; + v_node_row record; + v_port_name text; + v_input_value jsonb; + v_node_outputs jsonb := '{}'::jsonb; + v_output_hash bytea; + v_obj_id uuid; + v_output_data jsonb; + v_prop jsonb; + v_prop_name text; + v_prop_value jsonb; +BEGIN + SELECT * + FROM "constructive_fbp_public".function_graphs + WHERE + id = start_execution.graph_id INTO v_graph; + IF NOT (FOUND) THEN + RAISE EXCEPTION 'function_graph not found'; + END IF; + SELECT c.tree_id + FROM "constructive_fbp_public".graph_ref AS r INNER JOIN "constructive_fbp_public".graph_commit AS c ON c.id = r.commit_id AND c.database_id = r.database_id + WHERE + (r.database_id = v_graph.database_id AND r.store_id = v_graph.store_id) AND r.name = 'main' INTO v_tree_id; + IF v_tree_id IS NULL THEN + RAISE EXCEPTION 'no tree found for graph'; + END IF; + FOR v_node_row IN SELECT + path, + data + FROM "constructive_fbp_public".graph_get_all(v_graph.database_id, v_tree_id) + WHERE + ((cardinality(path) = 5 AND (path)[4] = 'nodes') AND ((path)[1] = v_graph.context AND ((path)[2] = 'graphs' AND (path)[3] = v_graph.name))) AND (data->>'type') = 'graphInput' LOOP + v_port_name := NULL; + SELECT + prop.value->>'value' + FROM jsonb_array_elements(v_node_row.data->'props') AS prop (value) + WHERE + (prop.value->>'name') = 'portName' + LIMIT + 1 INTO v_port_name; + IF v_port_name IS NOT NULL AND start_execution.input_payload ? v_port_name THEN + v_input_value := start_execution.input_payload->v_port_name; + v_output_data := jsonb_build_object('value', v_input_value); + v_output_hash := digest(v_output_data::text, 'sha256'); + INSERT INTO "constructive_fbp_private".function_graph_execution_outputs ( + database_id, + hash, + data + ) + VALUES + (v_graph.database_id, v_output_hash, v_output_data) + ON CONFLICT (database_id, hash, created_at) DO NOTHING + RETURNING id INTO v_obj_id; + IF v_obj_id IS NULL THEN + SELECT id + FROM "constructive_fbp_private".function_graph_execution_outputs + WHERE + database_id = v_graph.database_id AND hash = v_output_hash INTO v_obj_id; + END IF; + v_node_outputs := v_node_outputs || jsonb_build_object((v_node_row.path)[5], v_obj_id); + END IF; + END LOOP; + FOR v_node_row IN SELECT + path, + data + FROM "constructive_fbp_public".graph_get_all(v_graph.database_id, v_tree_id) + WHERE + ((cardinality(path) = 5 AND (path)[4] = 'nodes') AND ((path)[1] = v_graph.context AND ((path)[2] = 'graphs' AND (path)[3] = v_graph.name))) AND (data->>'type') = 'graphProp' LOOP + v_prop_name := NULL; + v_prop_value := NULL; + IF v_node_row.data ? 'props' AND v_node_row.data->'props' IS NOT NULL THEN + FOR v_prop IN SELECT * + FROM jsonb_array_elements(v_node_row.data->'props') LOOP + IF (v_prop->>'name') = 'propName' THEN + v_prop_name := v_prop->>'value'; + END IF; + IF (v_prop->>'name') = 'value' THEN + v_prop_value := v_prop->'value'; + END IF; + END LOOP; + END IF; + IF v_prop_name IS NOT NULL AND start_execution.input_payload ? v_prop_name THEN + v_prop_value := start_execution.input_payload->v_prop_name; + END IF; + IF v_prop_value IS NOT NULL THEN + v_output_data := jsonb_build_object('value', v_prop_value); + v_output_hash := digest(v_output_data::text, 'sha256'); + INSERT INTO "constructive_fbp_private".function_graph_execution_outputs ( + database_id, + hash, + data + ) + VALUES + (v_graph.database_id, v_output_hash, v_output_data) + ON CONFLICT (database_id, hash, created_at) DO NOTHING + RETURNING id INTO v_obj_id; + IF v_obj_id IS NULL THEN + SELECT id + FROM "constructive_fbp_private".function_graph_execution_outputs + WHERE + database_id = v_graph.database_id AND hash = v_output_hash INTO v_obj_id; + END IF; + v_node_outputs := v_node_outputs || jsonb_build_object((v_node_row.path)[5], v_obj_id); + END IF; + END LOOP; + INSERT INTO "constructive_fbp_private".function_graph_executions ( + graph_id, + database_id, + output_node, + output_port, + input_payload, + status, + node_outputs, + max_ticks, + max_pending_jobs, + timeout_at, + parent_execution_id, + parent_node_name + ) + VALUES + (start_execution.graph_id, v_graph.database_id, start_execution.output_node, start_execution.output_port, start_execution.input_payload, 'running', v_node_outputs, start_execution.max_ticks, start_execution.max_pending_jobs, now() + start_execution.timeout_interval, start_execution.parent_execution_id, start_execution.parent_node_name) + RETURNING id INTO v_exec_id; + PERFORM "constructive_fbp_private".tick_execution(v_exec_id); + RETURN v_exec_id; +END; +$_PGFN_$ LANGUAGE plpgsql VOLATILE SECURITY DEFINER; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/procedures/validate_function_graph/procedure.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/procedures/validate_function_graph/procedure.sql new file mode 100644 index 00000000..fbfe8ab4 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/procedures/validate_function_graph/procedure.sql @@ -0,0 +1,131 @@ +-- Deploy: schemas/constructive_fbp_public/procedures/validate_function_graph/procedure +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema + + +CREATE FUNCTION "constructive_fbp_public".validate_function_graph( + IN graph_id uuid +) RETURNS boolean AS $_PGFN_$ +DECLARE + v_graph "constructive_fbp_public".function_graphs; + v_tree_id uuid; + v_errors jsonb := '[]'::jsonb; + v_row record; + v_node_names text[] := '{}'::text[]; + v_node_types jsonb := '{}'::jsonb; + v_edges jsonb := '[]'::jsonb; + v_edge jsonb; + v_adj jsonb := '{}'::jsonb; + v_src_node text; + v_dst_node text; + v_visited text[] := '{}'::text[]; + v_current text; + v_i int; + v_has_cycle boolean := false; + v_cycle_path text; + v_has_output boolean := false; + v_is_valid boolean; +BEGIN + SELECT * + FROM "constructive_fbp_public".function_graphs + WHERE + id = validate_function_graph.graph_id INTO v_graph; + IF NOT (FOUND) THEN + RAISE EXCEPTION 'function_graph not found'; + END IF; + SELECT c.tree_id + FROM "constructive_fbp_public".graph_ref AS r INNER JOIN "constructive_fbp_public".graph_commit AS c ON c.id = r.commit_id AND c.database_id = r.database_id + WHERE + (r.database_id = v_graph.database_id AND r.store_id = v_graph.store_id) AND r.name = 'main' INTO v_tree_id; + IF v_tree_id IS NULL THEN + v_errors := v_errors || jsonb_build_array(jsonb_build_object('code', 'NO_TREE', 'message', 'No object tree found for graph')); + UPDATE "constructive_fbp_public".function_graphs SET + is_valid = false, validation_errors = v_errors, updated_at = now() + WHERE + id = validate_function_graph.graph_id; + RETURN false; + END IF; + FOR v_row IN SELECT + path, + data + FROM "constructive_fbp_public".graph_get_all(v_graph.database_id, v_tree_id) + WHERE + (cardinality(path) = 5 AND (path)[4] = 'nodes') AND ((path)[1] = v_graph.context AND ((path)[2] = 'graphs' AND (path)[3] = v_graph.name)) LOOP + v_node_names := v_node_names || (v_row.path)[5]; + v_node_types := v_node_types || jsonb_build_object((v_row.path)[5], v_row.data->>'type'); + IF (v_row.data->>'type') = 'graphOutput' THEN + v_has_output := true; + END IF; + END LOOP; + FOR v_row IN SELECT + path, + data + FROM "constructive_fbp_public".graph_get_all(v_graph.database_id, v_tree_id) + WHERE + (cardinality(path) = 5 AND (path)[4] = 'edges') AND ((path)[1] = v_graph.context AND ((path)[2] = 'graphs' AND (path)[3] = v_graph.name)) LOOP + v_edges := v_edges || jsonb_build_array(v_row.data); + END LOOP; + FOR v_edge IN SELECT * + FROM jsonb_array_elements(v_edges) LOOP + v_src_node := (v_edge->'src')->>'node'; + v_dst_node := (v_edge->'dst')->>'node'; + IF v_src_node IS NOT NULL AND NOT (v_src_node = ANY( v_node_names )) THEN + v_errors := v_errors || jsonb_build_array(jsonb_build_object('code', 'DANGLING_EDGE', 'message', 'Edge references non-existent source node: ' || v_src_node, 'node', v_src_node)); + END IF; + IF v_dst_node IS NOT NULL AND NOT (v_dst_node = ANY( v_node_names )) THEN + v_errors := v_errors || jsonb_build_array(jsonb_build_object('code', 'DANGLING_EDGE', 'message', 'Edge references non-existent destination node: ' || v_dst_node, 'node', v_dst_node)); + END IF; + END LOOP; + FOR v_edge IN SELECT * + FROM jsonb_array_elements(v_edges) LOOP + v_src_node := (v_edge->'src')->>'node'; + v_dst_node := (v_edge->'dst')->>'node'; + IF v_src_node IS NOT NULL AND v_dst_node IS NOT NULL THEN + IF v_adj ? v_src_node THEN + v_adj := jsonb_set(v_adj, ARRAY[v_src_node], (v_adj->v_src_node) || jsonb_build_array(v_dst_node)); + ELSE + v_adj := v_adj || jsonb_build_object(v_src_node, jsonb_build_array(v_dst_node)); + END IF; + END IF; + END LOOP; + FOR v_i IN 1..coalesce(array_length(v_node_names, 1), 0) LOOP + v_current := (v_node_names)[v_i]; + v_visited := '{}'::text[]; + LOOP + EXIT WHEN v_current IS NULL; + EXIT WHEN coalesce(array_length(v_visited, 1), 0) >= coalesce(array_length(v_node_names, 1), 0); + IF v_current = ANY( v_visited ) THEN + v_has_cycle := true; + v_cycle_path := v_current; + EXIT; + END IF; + v_visited := v_visited || v_current; + IF v_adj ? v_current THEN + v_current := (v_adj->v_current)->>0; + ELSE + v_current := NULL; + END IF; + END LOOP; + IF v_has_cycle THEN + EXIT; + END IF; + END LOOP; + IF v_has_cycle THEN + v_errors := v_errors || jsonb_build_array(jsonb_build_object('code', 'CYCLE_DETECTED', 'message', 'Graph contains a cycle')); + END IF; + IF NOT (v_has_output) THEN + v_errors := v_errors || jsonb_build_array(jsonb_build_object('code', 'NO_OUTPUT', 'message', 'Graph has no graphOutput boundary node')); + END IF; + v_is_valid := jsonb_array_length(v_errors) = 0; + UPDATE "constructive_fbp_public".function_graphs SET + is_valid = v_is_valid, validation_errors = CASE + WHEN v_is_valid THEN NULL + ELSE v_errors + END, updated_at = now() + WHERE + id = validate_function_graph.graph_id; + RETURN v_is_valid; +END; +$_PGFN_$ LANGUAGE plpgsql VOLATILE SECURITY INVOKER; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/schema.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/schema.sql new file mode 100644 index 00000000..5ed31f2e --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/schema.sql @@ -0,0 +1,8 @@ +-- Deploy: schemas/constructive_fbp_public/schema +-- made with <3 @ constructive.io + + + + +CREATE SCHEMA "constructive_fbp_public"; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/alterations/alt0000000061.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/alterations/alt0000000061.sql new file mode 100644 index 00000000..72632ce7 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/alterations/alt0000000061.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_public/tables/function_graphs/alterations/alt0000000061 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/function_graphs/table + + +ALTER TABLE "constructive_fbp_public".function_graphs + DISABLE ROW LEVEL SECURITY; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/alterations/alt0000000062.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/alterations/alt0000000062.sql new file mode 100644 index 00000000..0ba520c3 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/alterations/alt0000000062.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_public/tables/function_graphs/alterations/alt0000000062 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/function_graphs/table + + +COMMENT ON TABLE "constructive_fbp_public".function_graphs IS E'Flow graph definitions — FBP graphs stored in the dedicated graph Merkle store'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/context/alterations/alt0000000063.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/context/alterations/alt0000000063.sql new file mode 100644 index 00000000..8561f184 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/context/alterations/alt0000000063.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_fbp_public/tables/function_graphs/columns/context/alterations/alt0000000063 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/function_graphs/table +-- requires: schemas/constructive_fbp_public/tables/function_graphs/columns/context/column + + +ALTER TABLE "constructive_fbp_public".function_graphs + ALTER COLUMN context SET NOT NULL; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/context/alterations/alt0000000064.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/context/alterations/alt0000000064.sql new file mode 100644 index 00000000..6a85db46 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/context/alterations/alt0000000064.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_fbp_public/tables/function_graphs/columns/context/alterations/alt0000000064 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/function_graphs/table +-- requires: schemas/constructive_fbp_public/tables/function_graphs/columns/context/column + + +ALTER TABLE "constructive_fbp_public".function_graphs + ALTER COLUMN context SET DEFAULT 'function'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/context/alterations/alt0000000065.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/context/alterations/alt0000000065.sql new file mode 100644 index 00000000..b73f1498 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/context/alterations/alt0000000065.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_public/tables/function_graphs/columns/context/alterations/alt0000000065 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/function_graphs/columns/context/column + + +COMMENT ON COLUMN "constructive_fbp_public".function_graphs.context IS E'Evaluator/runtime context (function, js, sql, system)'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/context/column.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/context/column.sql new file mode 100644 index 00000000..f0c1f69e --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/context/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_public/tables/function_graphs/columns/context/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/function_graphs/table + + +ALTER TABLE "constructive_fbp_public".function_graphs + ADD COLUMN context text; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/created_at/alterations/alt0000000066.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/created_at/alterations/alt0000000066.sql new file mode 100644 index 00000000..4d764ef8 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/created_at/alterations/alt0000000066.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_fbp_public/tables/function_graphs/columns/created_at/alterations/alt0000000066 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/function_graphs/table +-- requires: schemas/constructive_fbp_public/tables/function_graphs/columns/created_at/column + + +ALTER TABLE "constructive_fbp_public".function_graphs + ALTER COLUMN created_at SET NOT NULL; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/created_at/alterations/alt0000000067.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/created_at/alterations/alt0000000067.sql new file mode 100644 index 00000000..ff7ba388 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/created_at/alterations/alt0000000067.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_fbp_public/tables/function_graphs/columns/created_at/alterations/alt0000000067 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/function_graphs/table +-- requires: schemas/constructive_fbp_public/tables/function_graphs/columns/created_at/column + + +ALTER TABLE "constructive_fbp_public".function_graphs + ALTER COLUMN created_at SET DEFAULT CURRENT_TIMESTAMP; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/created_at/alterations/alt0000000068.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/created_at/alterations/alt0000000068.sql new file mode 100644 index 00000000..d2e8a08d --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/created_at/alterations/alt0000000068.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_public/tables/function_graphs/columns/created_at/alterations/alt0000000068 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/function_graphs/columns/created_at/column + + +COMMENT ON COLUMN "constructive_fbp_public".function_graphs.created_at IS 'Timestamp of graph creation'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/created_at/column.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/created_at/column.sql new file mode 100644 index 00000000..955d0063 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/created_at/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_public/tables/function_graphs/columns/created_at/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/function_graphs/table + + +ALTER TABLE "constructive_fbp_public".function_graphs + ADD COLUMN created_at timestamptz; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/created_by/alterations/alt0000000069.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/created_by/alterations/alt0000000069.sql new file mode 100644 index 00000000..5e1f781c --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/created_by/alterations/alt0000000069.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_public/tables/function_graphs/columns/created_by/alterations/alt0000000069 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/function_graphs/columns/created_by/column + + +COMMENT ON COLUMN "constructive_fbp_public".function_graphs.created_by IS 'Actor who created this graph'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/created_by/column.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/created_by/column.sql new file mode 100644 index 00000000..1f835023 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/created_by/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_public/tables/function_graphs/columns/created_by/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/function_graphs/table + + +ALTER TABLE "constructive_fbp_public".function_graphs + ADD COLUMN created_by uuid; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/database_id/alterations/alt0000000070.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/database_id/alterations/alt0000000070.sql new file mode 100644 index 00000000..17cf25be --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/database_id/alterations/alt0000000070.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_fbp_public/tables/function_graphs/columns/database_id/alterations/alt0000000070 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/function_graphs/table +-- requires: schemas/constructive_fbp_public/tables/function_graphs/columns/database_id/column + + +ALTER TABLE "constructive_fbp_public".function_graphs + ALTER COLUMN database_id SET NOT NULL; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/database_id/alterations/alt0000000071.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/database_id/alterations/alt0000000071.sql new file mode 100644 index 00000000..aca7660b --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/database_id/alterations/alt0000000071.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_public/tables/function_graphs/columns/database_id/alterations/alt0000000071 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/function_graphs/columns/database_id/column + + +COMMENT ON COLUMN "constructive_fbp_public".function_graphs.database_id IS E'Database scope for multi-tenant isolation'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/database_id/column.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/database_id/column.sql new file mode 100644 index 00000000..715b5961 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/database_id/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_public/tables/function_graphs/columns/database_id/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/function_graphs/table + + +ALTER TABLE "constructive_fbp_public".function_graphs + ADD COLUMN database_id uuid; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/definitions_commit_id/alterations/alt0000000072.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/definitions_commit_id/alterations/alt0000000072.sql new file mode 100644 index 00000000..e43ef6ce --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/definitions_commit_id/alterations/alt0000000072.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_public/tables/function_graphs/columns/definitions_commit_id/alterations/alt0000000072 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/function_graphs/columns/definitions_commit_id/column + + +COMMENT ON COLUMN "constructive_fbp_public".function_graphs.definitions_commit_id IS 'Pinned definitions store commit for deterministic evaluation'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/definitions_commit_id/column.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/definitions_commit_id/column.sql new file mode 100644 index 00000000..239c77ea --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/definitions_commit_id/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_public/tables/function_graphs/columns/definitions_commit_id/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/function_graphs/table + + +ALTER TABLE "constructive_fbp_public".function_graphs + ADD COLUMN definitions_commit_id uuid; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/description/alterations/alt0000000073.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/description/alterations/alt0000000073.sql new file mode 100644 index 00000000..3ee862d5 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/description/alterations/alt0000000073.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_public/tables/function_graphs/columns/description/alterations/alt0000000073 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/function_graphs/columns/description/column + + +COMMENT ON COLUMN "constructive_fbp_public".function_graphs.description IS E'Human-readable description of the graph'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/description/column.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/description/column.sql new file mode 100644 index 00000000..2cfb23c1 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/description/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_public/tables/function_graphs/columns/description/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/function_graphs/table + + +ALTER TABLE "constructive_fbp_public".function_graphs + ADD COLUMN description text; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/entity_id/alterations/alt0000000074.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/entity_id/alterations/alt0000000074.sql new file mode 100644 index 00000000..82ebf89c --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/entity_id/alterations/alt0000000074.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_public/tables/function_graphs/columns/entity_id/alterations/alt0000000074 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/function_graphs/columns/entity_id/column + + +COMMENT ON COLUMN "constructive_fbp_public".function_graphs.entity_id IS E'Entity context (org/team) for scoped billing'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/entity_id/column.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/entity_id/column.sql new file mode 100644 index 00000000..d9166b15 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/entity_id/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_public/tables/function_graphs/columns/entity_id/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/function_graphs/table + + +ALTER TABLE "constructive_fbp_public".function_graphs + ADD COLUMN entity_id uuid; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/id/alterations/alt0000000075.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/id/alterations/alt0000000075.sql new file mode 100644 index 00000000..3ad1d14e --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/id/alterations/alt0000000075.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_fbp_public/tables/function_graphs/columns/id/alterations/alt0000000075 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/function_graphs/table +-- requires: schemas/constructive_fbp_public/tables/function_graphs/columns/id/column + + +ALTER TABLE "constructive_fbp_public".function_graphs + ALTER COLUMN id SET NOT NULL; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/id/alterations/alt0000000076.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/id/alterations/alt0000000076.sql new file mode 100644 index 00000000..273e0fda --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/id/alterations/alt0000000076.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_fbp_public/tables/function_graphs/columns/id/alterations/alt0000000076 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/function_graphs/table +-- requires: schemas/constructive_fbp_public/tables/function_graphs/columns/id/column + + +ALTER TABLE "constructive_fbp_public".function_graphs + ALTER COLUMN id SET DEFAULT uuidv7(); + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/id/alterations/alt0000000077.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/id/alterations/alt0000000077.sql new file mode 100644 index 00000000..d2a90877 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/id/alterations/alt0000000077.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_public/tables/function_graphs/columns/id/alterations/alt0000000077 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/function_graphs/columns/id/column + + +COMMENT ON COLUMN "constructive_fbp_public".function_graphs.id IS 'Unique graph identifier'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/id/column.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/id/column.sql new file mode 100644 index 00000000..805db596 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/id/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_public/tables/function_graphs/columns/id/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/function_graphs/table + + +ALTER TABLE "constructive_fbp_public".function_graphs + ADD COLUMN id uuid; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/is_valid/alterations/alt0000000078.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/is_valid/alterations/alt0000000078.sql new file mode 100644 index 00000000..7fb5900d --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/is_valid/alterations/alt0000000078.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_fbp_public/tables/function_graphs/columns/is_valid/alterations/alt0000000078 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/function_graphs/table +-- requires: schemas/constructive_fbp_public/tables/function_graphs/columns/is_valid/column + + +ALTER TABLE "constructive_fbp_public".function_graphs + ALTER COLUMN is_valid SET NOT NULL; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/is_valid/alterations/alt0000000079.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/is_valid/alterations/alt0000000079.sql new file mode 100644 index 00000000..b72696e4 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/is_valid/alterations/alt0000000079.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_fbp_public/tables/function_graphs/columns/is_valid/alterations/alt0000000079 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/function_graphs/table +-- requires: schemas/constructive_fbp_public/tables/function_graphs/columns/is_valid/column + + +ALTER TABLE "constructive_fbp_public".function_graphs + ALTER COLUMN is_valid SET DEFAULT false; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/is_valid/alterations/alt0000000080.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/is_valid/alterations/alt0000000080.sql new file mode 100644 index 00000000..ca36add1 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/is_valid/alterations/alt0000000080.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_public/tables/function_graphs/columns/is_valid/alterations/alt0000000080 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/function_graphs/columns/is_valid/column + + +COMMENT ON COLUMN "constructive_fbp_public".function_graphs.is_valid IS 'Whether graph passes structural validation'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/is_valid/column.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/is_valid/column.sql new file mode 100644 index 00000000..c607ea01 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/is_valid/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_public/tables/function_graphs/columns/is_valid/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/function_graphs/table + + +ALTER TABLE "constructive_fbp_public".function_graphs + ADD COLUMN is_valid boolean; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/name/alterations/alt0000000081.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/name/alterations/alt0000000081.sql new file mode 100644 index 00000000..5ed8c9b3 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/name/alterations/alt0000000081.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_fbp_public/tables/function_graphs/columns/name/alterations/alt0000000081 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/function_graphs/table +-- requires: schemas/constructive_fbp_public/tables/function_graphs/columns/name/column + + +ALTER TABLE "constructive_fbp_public".function_graphs + ALTER COLUMN name SET NOT NULL; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/name/alterations/alt0000000082.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/name/alterations/alt0000000082.sql new file mode 100644 index 00000000..637fd3ee --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/name/alterations/alt0000000082.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_public/tables/function_graphs/columns/name/alterations/alt0000000082 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/function_graphs/columns/name/column + + +COMMENT ON COLUMN "constructive_fbp_public".function_graphs.name IS E'Graph name (unique per database)'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/name/column.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/name/column.sql new file mode 100644 index 00000000..0d7c5742 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/name/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_public/tables/function_graphs/columns/name/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/function_graphs/table + + +ALTER TABLE "constructive_fbp_public".function_graphs + ADD COLUMN name text; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/store_id/alterations/alt0000000083.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/store_id/alterations/alt0000000083.sql new file mode 100644 index 00000000..00f1376f --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/store_id/alterations/alt0000000083.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_fbp_public/tables/function_graphs/columns/store_id/alterations/alt0000000083 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/function_graphs/table +-- requires: schemas/constructive_fbp_public/tables/function_graphs/columns/store_id/column + + +ALTER TABLE "constructive_fbp_public".function_graphs + ALTER COLUMN store_id SET NOT NULL; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/store_id/alterations/alt0000000084.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/store_id/alterations/alt0000000084.sql new file mode 100644 index 00000000..25020744 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/store_id/alterations/alt0000000084.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_public/tables/function_graphs/columns/store_id/alterations/alt0000000084 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/function_graphs/columns/store_id/column + + +COMMENT ON COLUMN "constructive_fbp_public".function_graphs.store_id IS E'Graph store (Merkle store) holding the graph definition'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/store_id/column.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/store_id/column.sql new file mode 100644 index 00000000..69642945 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/store_id/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_public/tables/function_graphs/columns/store_id/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/function_graphs/table + + +ALTER TABLE "constructive_fbp_public".function_graphs + ADD COLUMN store_id uuid; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/updated_at/alterations/alt0000000085.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/updated_at/alterations/alt0000000085.sql new file mode 100644 index 00000000..39d52df2 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/updated_at/alterations/alt0000000085.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_fbp_public/tables/function_graphs/columns/updated_at/alterations/alt0000000085 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/function_graphs/table +-- requires: schemas/constructive_fbp_public/tables/function_graphs/columns/updated_at/column + + +ALTER TABLE "constructive_fbp_public".function_graphs + ALTER COLUMN updated_at SET NOT NULL; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/updated_at/alterations/alt0000000086.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/updated_at/alterations/alt0000000086.sql new file mode 100644 index 00000000..d3d8ac3d --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/updated_at/alterations/alt0000000086.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_fbp_public/tables/function_graphs/columns/updated_at/alterations/alt0000000086 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/function_graphs/table +-- requires: schemas/constructive_fbp_public/tables/function_graphs/columns/updated_at/column + + +ALTER TABLE "constructive_fbp_public".function_graphs + ALTER COLUMN updated_at SET DEFAULT CURRENT_TIMESTAMP; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/updated_at/alterations/alt0000000087.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/updated_at/alterations/alt0000000087.sql new file mode 100644 index 00000000..24b5c423 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/updated_at/alterations/alt0000000087.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_public/tables/function_graphs/columns/updated_at/alterations/alt0000000087 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/function_graphs/columns/updated_at/column + + +COMMENT ON COLUMN "constructive_fbp_public".function_graphs.updated_at IS 'Timestamp of last modification'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/updated_at/column.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/updated_at/column.sql new file mode 100644 index 00000000..88c8b91e --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/updated_at/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_public/tables/function_graphs/columns/updated_at/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/function_graphs/table + + +ALTER TABLE "constructive_fbp_public".function_graphs + ADD COLUMN updated_at timestamptz; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/validation_errors/alterations/alt0000000088.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/validation_errors/alterations/alt0000000088.sql new file mode 100644 index 00000000..4592d301 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/validation_errors/alterations/alt0000000088.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_public/tables/function_graphs/columns/validation_errors/alterations/alt0000000088 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/function_graphs/columns/validation_errors/column + + +COMMENT ON COLUMN "constructive_fbp_public".function_graphs.validation_errors IS E'Array of validation error objects when is_valid = false'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/validation_errors/column.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/validation_errors/column.sql new file mode 100644 index 00000000..a4dfac83 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/columns/validation_errors/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_public/tables/function_graphs/columns/validation_errors/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/function_graphs/table + + +ALTER TABLE "constructive_fbp_public".function_graphs + ADD COLUMN validation_errors jsonb; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/constraints/function_graphs_pkey/constraint.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/constraints/function_graphs_pkey/constraint.sql new file mode 100644 index 00000000..3f56defe --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/constraints/function_graphs_pkey/constraint.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_fbp_public/tables/function_graphs/constraints/function_graphs_pkey/constraint +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/function_graphs/table +-- requires: schemas/constructive_fbp_public/tables/function_graphs/columns/id/column + + +ALTER TABLE "constructive_fbp_public".function_graphs + ADD CONSTRAINT function_graphs_pkey PRIMARY KEY (id); + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/indexes/idx_function_graphs_unique_name.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/indexes/idx_function_graphs_unique_name.sql new file mode 100644 index 00000000..3804e4a1 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/indexes/idx_function_graphs_unique_name.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_fbp_public/tables/function_graphs/indexes/idx_function_graphs_unique_name +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/function_graphs/table +-- requires: schemas/constructive_fbp_public/tables/function_graphs/columns/database_id/column +-- requires: schemas/constructive_fbp_public/tables/function_graphs/columns/name/column + + +CREATE UNIQUE INDEX idx_function_graphs_unique_name ON "constructive_fbp_public".function_graphs ( database_id, name ); + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/table.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/table.sql new file mode 100644 index 00000000..152ab603 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/function_graphs/table.sql @@ -0,0 +1,8 @@ +-- Deploy: schemas/constructive_fbp_public/tables/function_graphs/table +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema + + +CREATE TABLE "constructive_fbp_public".function_graphs (); + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/alterations/alt0000000089.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/alterations/alt0000000089.sql new file mode 100644 index 00000000..f81044ed --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/alterations/alt0000000089.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_commit/alterations/alt0000000089 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_commit/table + + +ALTER TABLE "constructive_fbp_public".graph_commit + DISABLE ROW LEVEL SECURITY; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/alterations/alt0000000090.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/alterations/alt0000000090.sql new file mode 100644 index 00000000..bffb3304 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/alterations/alt0000000090.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_commit/alterations/alt0000000090 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_commit/table + + +COMMENT ON TABLE "constructive_fbp_public".graph_commit IS E'Commit history — each commit snapshots a tree root for a store'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/columns/author_id/alterations/alt0000000091.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/columns/author_id/alterations/alt0000000091.sql new file mode 100644 index 00000000..5cf873e1 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/columns/author_id/alterations/alt0000000091.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_commit/columns/author_id/alterations/alt0000000091 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_commit/columns/author_id/column + + +COMMENT ON COLUMN "constructive_fbp_public".graph_commit.author_id IS 'User who authored the changes'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/columns/author_id/column.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/columns/author_id/column.sql new file mode 100644 index 00000000..d4011dad --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/columns/author_id/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_commit/columns/author_id/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_commit/table + + +ALTER TABLE "constructive_fbp_public".graph_commit + ADD COLUMN author_id uuid; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/columns/committer_id/alterations/alt0000000092.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/columns/committer_id/alterations/alt0000000092.sql new file mode 100644 index 00000000..d2f6a72a --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/columns/committer_id/alterations/alt0000000092.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_commit/columns/committer_id/alterations/alt0000000092 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_commit/columns/committer_id/column + + +COMMENT ON COLUMN "constructive_fbp_public".graph_commit.committer_id IS E'User who committed (may differ from author)'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/columns/committer_id/column.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/columns/committer_id/column.sql new file mode 100644 index 00000000..9b33b57c --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/columns/committer_id/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_commit/columns/committer_id/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_commit/table + + +ALTER TABLE "constructive_fbp_public".graph_commit + ADD COLUMN committer_id uuid; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/columns/database_id/alterations/alt0000000093.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/columns/database_id/alterations/alt0000000093.sql new file mode 100644 index 00000000..bb32f33c --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/columns/database_id/alterations/alt0000000093.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_commit/columns/database_id/alterations/alt0000000093 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_commit/table +-- requires: schemas/constructive_fbp_public/tables/graph_commit/columns/database_id/column + + +ALTER TABLE "constructive_fbp_public".graph_commit + ALTER COLUMN database_id SET NOT NULL; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/columns/database_id/alterations/alt0000000094.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/columns/database_id/alterations/alt0000000094.sql new file mode 100644 index 00000000..924b3d9d --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/columns/database_id/alterations/alt0000000094.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_commit/columns/database_id/alterations/alt0000000094 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_commit/columns/database_id/column + + +COMMENT ON COLUMN "constructive_fbp_public".graph_commit.database_id IS E'Database scope for multi-tenant isolation'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/columns/database_id/column.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/columns/database_id/column.sql new file mode 100644 index 00000000..4456021a --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/columns/database_id/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_commit/columns/database_id/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_commit/table + + +ALTER TABLE "constructive_fbp_public".graph_commit + ADD COLUMN database_id uuid; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/columns/date/alterations/alt0000000095.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/columns/date/alterations/alt0000000095.sql new file mode 100644 index 00000000..973757bd --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/columns/date/alterations/alt0000000095.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_commit/columns/date/alterations/alt0000000095 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_commit/table +-- requires: schemas/constructive_fbp_public/tables/graph_commit/columns/date/column + + +ALTER TABLE "constructive_fbp_public".graph_commit + ALTER COLUMN date SET NOT NULL; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/columns/date/alterations/alt0000000096.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/columns/date/alterations/alt0000000096.sql new file mode 100644 index 00000000..258b613d --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/columns/date/alterations/alt0000000096.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_commit/columns/date/alterations/alt0000000096 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_commit/table +-- requires: schemas/constructive_fbp_public/tables/graph_commit/columns/date/column + + +ALTER TABLE "constructive_fbp_public".graph_commit + ALTER COLUMN date SET DEFAULT CURRENT_TIMESTAMP; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/columns/date/alterations/alt0000000097.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/columns/date/alterations/alt0000000097.sql new file mode 100644 index 00000000..2ff944cf --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/columns/date/alterations/alt0000000097.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_commit/columns/date/alterations/alt0000000097 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_commit/columns/date/column + + +COMMENT ON COLUMN "constructive_fbp_public".graph_commit.date IS 'Commit timestamp'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/columns/date/column.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/columns/date/column.sql new file mode 100644 index 00000000..831599b4 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/columns/date/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_commit/columns/date/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_commit/table + + +ALTER TABLE "constructive_fbp_public".graph_commit + ADD COLUMN date timestamptz; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/columns/id/alterations/alt0000000098.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/columns/id/alterations/alt0000000098.sql new file mode 100644 index 00000000..36c81b40 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/columns/id/alterations/alt0000000098.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_commit/columns/id/alterations/alt0000000098 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_commit/table +-- requires: schemas/constructive_fbp_public/tables/graph_commit/columns/id/column + + +ALTER TABLE "constructive_fbp_public".graph_commit + ALTER COLUMN id SET NOT NULL; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/columns/id/alterations/alt0000000099.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/columns/id/alterations/alt0000000099.sql new file mode 100644 index 00000000..6774e8a9 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/columns/id/alterations/alt0000000099.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_commit/columns/id/alterations/alt0000000099 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_commit/table +-- requires: schemas/constructive_fbp_public/tables/graph_commit/columns/id/column + + +ALTER TABLE "constructive_fbp_public".graph_commit + ALTER COLUMN id SET DEFAULT uuidv7(); + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/columns/id/alterations/alt0000000100.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/columns/id/alterations/alt0000000100.sql new file mode 100644 index 00000000..d5fdb4e7 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/columns/id/alterations/alt0000000100.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_commit/columns/id/alterations/alt0000000100 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_commit/columns/id/column + + +COMMENT ON COLUMN "constructive_fbp_public".graph_commit.id IS 'Unique commit identifier'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/columns/id/column.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/columns/id/column.sql new file mode 100644 index 00000000..c8d7ec00 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/columns/id/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_commit/columns/id/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_commit/table + + +ALTER TABLE "constructive_fbp_public".graph_commit + ADD COLUMN id uuid; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/columns/message/alterations/alt0000000101.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/columns/message/alterations/alt0000000101.sql new file mode 100644 index 00000000..55d039db --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/columns/message/alterations/alt0000000101.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_commit/columns/message/alterations/alt0000000101 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_commit/columns/message/column + + +COMMENT ON COLUMN "constructive_fbp_public".graph_commit.message IS 'Optional commit message'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/columns/message/column.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/columns/message/column.sql new file mode 100644 index 00000000..83ace799 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/columns/message/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_commit/columns/message/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_commit/table + + +ALTER TABLE "constructive_fbp_public".graph_commit + ADD COLUMN message text; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/columns/parent_ids/alterations/alt0000000102.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/columns/parent_ids/alterations/alt0000000102.sql new file mode 100644 index 00000000..6ea4feb5 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/columns/parent_ids/alterations/alt0000000102.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_commit/columns/parent_ids/alterations/alt0000000102 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_commit/columns/parent_ids/column + + +COMMENT ON COLUMN "constructive_fbp_public".graph_commit.parent_ids IS E'Parent commit IDs (supports merge commits)'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/columns/parent_ids/column.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/columns/parent_ids/column.sql new file mode 100644 index 00000000..f93b099e --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/columns/parent_ids/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_commit/columns/parent_ids/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_commit/table + + +ALTER TABLE "constructive_fbp_public".graph_commit + ADD COLUMN parent_ids uuid[]; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/columns/store_id/alterations/alt0000000103.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/columns/store_id/alterations/alt0000000103.sql new file mode 100644 index 00000000..2edb3403 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/columns/store_id/alterations/alt0000000103.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_commit/columns/store_id/alterations/alt0000000103 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_commit/table +-- requires: schemas/constructive_fbp_public/tables/graph_commit/columns/store_id/column + + +ALTER TABLE "constructive_fbp_public".graph_commit + ALTER COLUMN store_id SET NOT NULL; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/columns/store_id/alterations/alt0000000104.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/columns/store_id/alterations/alt0000000104.sql new file mode 100644 index 00000000..743376a6 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/columns/store_id/alterations/alt0000000104.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_commit/columns/store_id/alterations/alt0000000104 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_commit/columns/store_id/column + + +COMMENT ON COLUMN "constructive_fbp_public".graph_commit.store_id IS 'Store this commit belongs to'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/columns/store_id/column.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/columns/store_id/column.sql new file mode 100644 index 00000000..30111e7f --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/columns/store_id/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_commit/columns/store_id/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_commit/table + + +ALTER TABLE "constructive_fbp_public".graph_commit + ADD COLUMN store_id uuid; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/columns/tree_id/alterations/alt0000000105.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/columns/tree_id/alterations/alt0000000105.sql new file mode 100644 index 00000000..344dafc9 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/columns/tree_id/alterations/alt0000000105.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_commit/columns/tree_id/alterations/alt0000000105 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_commit/columns/tree_id/column + + +COMMENT ON COLUMN "constructive_fbp_public".graph_commit.tree_id IS 'Root object ID of the tree snapshot at this commit'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/columns/tree_id/column.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/columns/tree_id/column.sql new file mode 100644 index 00000000..e3ddd35c --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/columns/tree_id/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_commit/columns/tree_id/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_commit/table + + +ALTER TABLE "constructive_fbp_public".graph_commit + ADD COLUMN tree_id uuid; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/constraints/graph_commits_pkey/constraint.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/constraints/graph_commits_pkey/constraint.sql new file mode 100644 index 00000000..26d3fab0 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/constraints/graph_commits_pkey/constraint.sql @@ -0,0 +1,12 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_commit/constraints/graph_commits_pkey/constraint +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_commit/table +-- requires: schemas/constructive_fbp_public/tables/graph_commit/columns/id/column +-- requires: schemas/constructive_fbp_public/tables/graph_commit/columns/database_id/column + + +ALTER TABLE "constructive_fbp_public".graph_commit + ADD CONSTRAINT graph_commits_pkey PRIMARY KEY (id, database_id); + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/table.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/table.sql new file mode 100644 index 00000000..90690dc4 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_commit/table.sql @@ -0,0 +1,8 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_commit/table +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema + + +CREATE TABLE "constructive_fbp_public".graph_commit (); + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_object/alterations/alt0000000106.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_object/alterations/alt0000000106.sql new file mode 100644 index 00000000..dbcfdb30 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_object/alterations/alt0000000106.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_object/alterations/alt0000000106 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_object/table + + +ALTER TABLE "constructive_fbp_public".graph_object + DISABLE ROW LEVEL SECURITY; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_object/alterations/alt0000000107.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_object/alterations/alt0000000107.sql new file mode 100644 index 00000000..298f886c --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_object/alterations/alt0000000107.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_object/alterations/alt0000000107 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_object/table + + +COMMENT ON TABLE "constructive_fbp_public".graph_object IS E'Content-addressed Merkle tree objects keyed by UUID v5 hash of data + children'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_object/columns/created_at/alterations/alt0000000108.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_object/columns/created_at/alterations/alt0000000108.sql new file mode 100644 index 00000000..a97f565a --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_object/columns/created_at/alterations/alt0000000108.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_object/columns/created_at/alterations/alt0000000108 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_object/table +-- requires: schemas/constructive_fbp_public/tables/graph_object/columns/created_at/column + + +ALTER TABLE "constructive_fbp_public".graph_object + ALTER COLUMN created_at SET DEFAULT CURRENT_TIMESTAMP; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_object/columns/created_at/alterations/alt0000000109.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_object/columns/created_at/alterations/alt0000000109.sql new file mode 100644 index 00000000..e7d9d8b0 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_object/columns/created_at/alterations/alt0000000109.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_object/columns/created_at/alterations/alt0000000109 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_object/columns/created_at/column + + +COMMENT ON COLUMN "constructive_fbp_public".graph_object.created_at IS 'Timestamp of object creation'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_object/columns/created_at/column.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_object/columns/created_at/column.sql new file mode 100644 index 00000000..5543cd0b --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_object/columns/created_at/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_object/columns/created_at/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_object/table + + +ALTER TABLE "constructive_fbp_public".graph_object + ADD COLUMN created_at timestamptz; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_object/columns/data/alterations/alt0000000110.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_object/columns/data/alterations/alt0000000110.sql new file mode 100644 index 00000000..8b62178e --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_object/columns/data/alterations/alt0000000110.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_object/columns/data/alterations/alt0000000110 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_object/columns/data/column + + +COMMENT ON COLUMN "constructive_fbp_public".graph_object.data IS 'Payload data for this object node'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_object/columns/data/column.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_object/columns/data/column.sql new file mode 100644 index 00000000..5826b46e --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_object/columns/data/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_object/columns/data/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_object/table + + +ALTER TABLE "constructive_fbp_public".graph_object + ADD COLUMN data jsonb; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_object/columns/database_id/alterations/alt0000000111.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_object/columns/database_id/alterations/alt0000000111.sql new file mode 100644 index 00000000..81be57d9 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_object/columns/database_id/alterations/alt0000000111.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_object/columns/database_id/alterations/alt0000000111 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_object/table +-- requires: schemas/constructive_fbp_public/tables/graph_object/columns/database_id/column + + +ALTER TABLE "constructive_fbp_public".graph_object + ALTER COLUMN database_id SET NOT NULL; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_object/columns/database_id/alterations/alt0000000112.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_object/columns/database_id/alterations/alt0000000112.sql new file mode 100644 index 00000000..43e5b62b --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_object/columns/database_id/alterations/alt0000000112.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_object/columns/database_id/alterations/alt0000000112 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_object/columns/database_id/column + + +COMMENT ON COLUMN "constructive_fbp_public".graph_object.database_id IS E'Database scope for multi-tenant isolation'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_object/columns/database_id/column.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_object/columns/database_id/column.sql new file mode 100644 index 00000000..7df1cd47 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_object/columns/database_id/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_object/columns/database_id/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_object/table + + +ALTER TABLE "constructive_fbp_public".graph_object + ADD COLUMN database_id uuid; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_object/columns/id/alterations/alt0000000113.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_object/columns/id/alterations/alt0000000113.sql new file mode 100644 index 00000000..974ab1c3 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_object/columns/id/alterations/alt0000000113.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_object/columns/id/alterations/alt0000000113 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_object/table +-- requires: schemas/constructive_fbp_public/tables/graph_object/columns/id/column + + +ALTER TABLE "constructive_fbp_public".graph_object + ALTER COLUMN id SET NOT NULL; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_object/columns/id/alterations/alt0000000114.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_object/columns/id/alterations/alt0000000114.sql new file mode 100644 index 00000000..57cf6ef7 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_object/columns/id/alterations/alt0000000114.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_object/columns/id/alterations/alt0000000114 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_object/columns/id/column + + +COMMENT ON COLUMN "constructive_fbp_public".graph_object.id IS E'Content-addressed UUID v5 — deterministic hash of (data, kids, ktree)'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_object/columns/id/column.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_object/columns/id/column.sql new file mode 100644 index 00000000..cf8c489c --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_object/columns/id/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_object/columns/id/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_object/table + + +ALTER TABLE "constructive_fbp_public".graph_object + ADD COLUMN id uuid; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_object/columns/kids/alterations/alt0000000115.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_object/columns/kids/alterations/alt0000000115.sql new file mode 100644 index 00000000..6e331af5 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_object/columns/kids/alterations/alt0000000115.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_object/columns/kids/alterations/alt0000000115 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_object/columns/kids/column + + +COMMENT ON COLUMN "constructive_fbp_public".graph_object.kids IS 'Ordered array of child object IDs'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_object/columns/kids/alterations/alt0000000116.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_object/columns/kids/alterations/alt0000000116.sql new file mode 100644 index 00000000..4996f8c2 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_object/columns/kids/alterations/alt0000000116.sql @@ -0,0 +1,13 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_object/columns/kids/alterations/alt0000000116 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_object/table +-- requires: schemas/constructive_fbp_public/tables/graph_object/columns/kids/column +-- requires: schemas/constructive_fbp_public/tables/graph_object/columns/ktree/column + + +ALTER TABLE "constructive_fbp_public".graph_object + ADD CONSTRAINT graph_objects_kids_ktree_chk + CHECK (cardinality(kids) = cardinality(ktree) OR (kids IS NULL AND ktree IS NULL)); + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_object/columns/kids/column.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_object/columns/kids/column.sql new file mode 100644 index 00000000..5493a718 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_object/columns/kids/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_object/columns/kids/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_object/table + + +ALTER TABLE "constructive_fbp_public".graph_object + ADD COLUMN kids uuid[]; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_object/columns/ktree/alterations/alt0000000117.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_object/columns/ktree/alterations/alt0000000117.sql new file mode 100644 index 00000000..66a24734 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_object/columns/ktree/alterations/alt0000000117.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_object/columns/ktree/alterations/alt0000000117 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_object/columns/ktree/column + + +COMMENT ON COLUMN "constructive_fbp_public".graph_object.ktree IS E'Ordered array of child path names (parallel to kids)'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_object/columns/ktree/column.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_object/columns/ktree/column.sql new file mode 100644 index 00000000..8beda1ec --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_object/columns/ktree/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_object/columns/ktree/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_object/table + + +ALTER TABLE "constructive_fbp_public".graph_object + ADD COLUMN ktree text[]; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_object/constraints/graph_objects_pkey/constraint.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_object/constraints/graph_objects_pkey/constraint.sql new file mode 100644 index 00000000..7562e0d6 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_object/constraints/graph_objects_pkey/constraint.sql @@ -0,0 +1,12 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_object/constraints/graph_objects_pkey/constraint +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_object/table +-- requires: schemas/constructive_fbp_public/tables/graph_object/columns/id/column +-- requires: schemas/constructive_fbp_public/tables/graph_object/columns/database_id/column + + +ALTER TABLE "constructive_fbp_public".graph_object + ADD CONSTRAINT graph_objects_pkey PRIMARY KEY (id, database_id); + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_object/table.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_object/table.sql new file mode 100644 index 00000000..e4d0d4b8 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_object/table.sql @@ -0,0 +1,8 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_object/table +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema + + +CREATE TABLE "constructive_fbp_public".graph_object (); + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_object/triggers/generate_id_hash.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_object/triggers/generate_id_hash.sql new file mode 100644 index 00000000..507b4918 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_object/triggers/generate_id_hash.sql @@ -0,0 +1,14 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_object/triggers/generate_id_hash +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_private/schema +-- requires: schemas/constructive_fbp_public/tables/graph_object/table +-- requires: schemas/constructive_fbp_private/trigger_fns/tg_graph_object_generate_id_hash + + +CREATE TRIGGER generate_id_hash +BEFORE INSERT ON "constructive_fbp_public".graph_object +FOR EACH ROW +EXECUTE PROCEDURE "constructive_fbp_private".tg_graph_object_generate_id_hash ( ); + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_ref/alterations/alt0000000118.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_ref/alterations/alt0000000118.sql new file mode 100644 index 00000000..c82ddd9b --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_ref/alterations/alt0000000118.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_ref/alterations/alt0000000118 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_ref/table + + +ALTER TABLE "constructive_fbp_public".graph_ref + DISABLE ROW LEVEL SECURITY; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_ref/alterations/alt0000000119.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_ref/alterations/alt0000000119.sql new file mode 100644 index 00000000..6ec683eb --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_ref/alterations/alt0000000119.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_ref/alterations/alt0000000119 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_ref/table + + +COMMENT ON TABLE "constructive_fbp_public".graph_ref IS E'Branch heads — mutable pointers into the commit chain'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_ref/columns/commit_id/alterations/alt0000000120.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_ref/columns/commit_id/alterations/alt0000000120.sql new file mode 100644 index 00000000..a41613f7 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_ref/columns/commit_id/alterations/alt0000000120.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_ref/columns/commit_id/alterations/alt0000000120 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_ref/columns/commit_id/column + + +COMMENT ON COLUMN "constructive_fbp_public".graph_ref.commit_id IS 'Commit this ref points to'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_ref/columns/commit_id/column.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_ref/columns/commit_id/column.sql new file mode 100644 index 00000000..08530b79 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_ref/columns/commit_id/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_ref/columns/commit_id/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_ref/table + + +ALTER TABLE "constructive_fbp_public".graph_ref + ADD COLUMN commit_id uuid; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_ref/columns/database_id/alterations/alt0000000121.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_ref/columns/database_id/alterations/alt0000000121.sql new file mode 100644 index 00000000..3ab03365 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_ref/columns/database_id/alterations/alt0000000121.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_ref/columns/database_id/alterations/alt0000000121 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_ref/table +-- requires: schemas/constructive_fbp_public/tables/graph_ref/columns/database_id/column + + +ALTER TABLE "constructive_fbp_public".graph_ref + ALTER COLUMN database_id SET NOT NULL; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_ref/columns/database_id/alterations/alt0000000122.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_ref/columns/database_id/alterations/alt0000000122.sql new file mode 100644 index 00000000..daa1bd4a --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_ref/columns/database_id/alterations/alt0000000122.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_ref/columns/database_id/alterations/alt0000000122 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_ref/columns/database_id/column + + +COMMENT ON COLUMN "constructive_fbp_public".graph_ref.database_id IS E'Database scope for multi-tenant isolation'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_ref/columns/database_id/column.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_ref/columns/database_id/column.sql new file mode 100644 index 00000000..d817568a --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_ref/columns/database_id/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_ref/columns/database_id/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_ref/table + + +ALTER TABLE "constructive_fbp_public".graph_ref + ADD COLUMN database_id uuid; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_ref/columns/id/alterations/alt0000000123.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_ref/columns/id/alterations/alt0000000123.sql new file mode 100644 index 00000000..2b7cfe75 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_ref/columns/id/alterations/alt0000000123.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_ref/columns/id/alterations/alt0000000123 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_ref/table +-- requires: schemas/constructive_fbp_public/tables/graph_ref/columns/id/column + + +ALTER TABLE "constructive_fbp_public".graph_ref + ALTER COLUMN id SET NOT NULL; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_ref/columns/id/alterations/alt0000000124.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_ref/columns/id/alterations/alt0000000124.sql new file mode 100644 index 00000000..e250784d --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_ref/columns/id/alterations/alt0000000124.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_ref/columns/id/alterations/alt0000000124 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_ref/table +-- requires: schemas/constructive_fbp_public/tables/graph_ref/columns/id/column + + +ALTER TABLE "constructive_fbp_public".graph_ref + ALTER COLUMN id SET DEFAULT uuidv7(); + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_ref/columns/id/alterations/alt0000000125.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_ref/columns/id/alterations/alt0000000125.sql new file mode 100644 index 00000000..f86826be --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_ref/columns/id/alterations/alt0000000125.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_ref/columns/id/alterations/alt0000000125 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_ref/columns/id/column + + +COMMENT ON COLUMN "constructive_fbp_public".graph_ref.id IS 'Unique ref identifier'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_ref/columns/id/column.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_ref/columns/id/column.sql new file mode 100644 index 00000000..b2302e6d --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_ref/columns/id/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_ref/columns/id/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_ref/table + + +ALTER TABLE "constructive_fbp_public".graph_ref + ADD COLUMN id uuid; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_ref/columns/name/alterations/alt0000000126.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_ref/columns/name/alterations/alt0000000126.sql new file mode 100644 index 00000000..dfe34fcc --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_ref/columns/name/alterations/alt0000000126.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_ref/columns/name/alterations/alt0000000126 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_ref/table +-- requires: schemas/constructive_fbp_public/tables/graph_ref/columns/name/column + + +ALTER TABLE "constructive_fbp_public".graph_ref + ALTER COLUMN name SET NOT NULL; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_ref/columns/name/alterations/alt0000000127.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_ref/columns/name/alterations/alt0000000127.sql new file mode 100644 index 00000000..32f427db --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_ref/columns/name/alterations/alt0000000127.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_ref/columns/name/alterations/alt0000000127 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_ref/columns/name/column + + +COMMENT ON COLUMN "constructive_fbp_public".graph_ref.name IS E'Ref name (e.g. HEAD, main)'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_ref/columns/name/column.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_ref/columns/name/column.sql new file mode 100644 index 00000000..684769c6 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_ref/columns/name/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_ref/columns/name/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_ref/table + + +ALTER TABLE "constructive_fbp_public".graph_ref + ADD COLUMN name text; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_ref/columns/store_id/alterations/alt0000000128.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_ref/columns/store_id/alterations/alt0000000128.sql new file mode 100644 index 00000000..92d4ea4f --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_ref/columns/store_id/alterations/alt0000000128.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_ref/columns/store_id/alterations/alt0000000128 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_ref/table +-- requires: schemas/constructive_fbp_public/tables/graph_ref/columns/store_id/column + + +ALTER TABLE "constructive_fbp_public".graph_ref + ALTER COLUMN store_id SET NOT NULL; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_ref/columns/store_id/alterations/alt0000000129.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_ref/columns/store_id/alterations/alt0000000129.sql new file mode 100644 index 00000000..cebac5d6 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_ref/columns/store_id/alterations/alt0000000129.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_ref/columns/store_id/alterations/alt0000000129 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_ref/columns/store_id/column + + +COMMENT ON COLUMN "constructive_fbp_public".graph_ref.store_id IS 'Store this ref belongs to'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_ref/columns/store_id/column.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_ref/columns/store_id/column.sql new file mode 100644 index 00000000..b09d82ea --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_ref/columns/store_id/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_ref/columns/store_id/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_ref/table + + +ALTER TABLE "constructive_fbp_public".graph_ref + ADD COLUMN store_id uuid; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_ref/constraints/graph_refs_pkey/constraint.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_ref/constraints/graph_refs_pkey/constraint.sql new file mode 100644 index 00000000..8908ed27 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_ref/constraints/graph_refs_pkey/constraint.sql @@ -0,0 +1,12 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_ref/constraints/graph_refs_pkey/constraint +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_ref/table +-- requires: schemas/constructive_fbp_public/tables/graph_ref/columns/id/column +-- requires: schemas/constructive_fbp_public/tables/graph_ref/columns/database_id/column + + +ALTER TABLE "constructive_fbp_public".graph_ref + ADD CONSTRAINT graph_refs_pkey PRIMARY KEY (id, database_id); + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_ref/table.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_ref/table.sql new file mode 100644 index 00000000..44ece781 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_ref/table.sql @@ -0,0 +1,8 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_ref/table +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema + + +CREATE TABLE "constructive_fbp_public".graph_ref (); + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_store/alterations/alt0000000130.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_store/alterations/alt0000000130.sql new file mode 100644 index 00000000..3046dbe2 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_store/alterations/alt0000000130.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_store/alterations/alt0000000130 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_store/table + + +ALTER TABLE "constructive_fbp_public".graph_store + DISABLE ROW LEVEL SECURITY; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_store/alterations/alt0000000131.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_store/alterations/alt0000000131.sql new file mode 100644 index 00000000..47cdf7af --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_store/alterations/alt0000000131.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_store/alterations/alt0000000131 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_store/table + + +COMMENT ON TABLE "constructive_fbp_public".graph_store IS E'Named stores — one per version-controlled tree (e.g. one graph, one definition set)'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_store/columns/created_at/alterations/alt0000000132.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_store/columns/created_at/alterations/alt0000000132.sql new file mode 100644 index 00000000..cb2696fb --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_store/columns/created_at/alterations/alt0000000132.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_store/columns/created_at/alterations/alt0000000132 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_store/table +-- requires: schemas/constructive_fbp_public/tables/graph_store/columns/created_at/column + + +ALTER TABLE "constructive_fbp_public".graph_store + ALTER COLUMN created_at SET DEFAULT CURRENT_TIMESTAMP; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_store/columns/created_at/alterations/alt0000000133.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_store/columns/created_at/alterations/alt0000000133.sql new file mode 100644 index 00000000..ec7bc4cc --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_store/columns/created_at/alterations/alt0000000133.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_store/columns/created_at/alterations/alt0000000133 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_store/columns/created_at/column + + +COMMENT ON COLUMN "constructive_fbp_public".graph_store.created_at IS 'Timestamp of store creation'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_store/columns/created_at/column.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_store/columns/created_at/column.sql new file mode 100644 index 00000000..bc7bdb1d --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_store/columns/created_at/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_store/columns/created_at/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_store/table + + +ALTER TABLE "constructive_fbp_public".graph_store + ADD COLUMN created_at timestamptz; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_store/columns/database_id/alterations/alt0000000134.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_store/columns/database_id/alterations/alt0000000134.sql new file mode 100644 index 00000000..ad0607d1 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_store/columns/database_id/alterations/alt0000000134.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_store/columns/database_id/alterations/alt0000000134 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_store/table +-- requires: schemas/constructive_fbp_public/tables/graph_store/columns/database_id/column + + +ALTER TABLE "constructive_fbp_public".graph_store + ALTER COLUMN database_id SET NOT NULL; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_store/columns/database_id/alterations/alt0000000135.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_store/columns/database_id/alterations/alt0000000135.sql new file mode 100644 index 00000000..4ef244ba --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_store/columns/database_id/alterations/alt0000000135.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_store/columns/database_id/alterations/alt0000000135 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_store/columns/database_id/column + + +COMMENT ON COLUMN "constructive_fbp_public".graph_store.database_id IS E'Database scope for multi-tenant isolation'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_store/columns/database_id/column.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_store/columns/database_id/column.sql new file mode 100644 index 00000000..9b1c9c13 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_store/columns/database_id/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_store/columns/database_id/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_store/table + + +ALTER TABLE "constructive_fbp_public".graph_store + ADD COLUMN database_id uuid; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_store/columns/hash/alterations/alt0000000136.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_store/columns/hash/alterations/alt0000000136.sql new file mode 100644 index 00000000..434ebb0b --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_store/columns/hash/alterations/alt0000000136.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_store/columns/hash/alterations/alt0000000136 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_store/columns/hash/column + + +COMMENT ON COLUMN "constructive_fbp_public".graph_store.hash IS 'Current root object hash of this store'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_store/columns/hash/column.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_store/columns/hash/column.sql new file mode 100644 index 00000000..6b9b15a0 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_store/columns/hash/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_store/columns/hash/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_store/table + + +ALTER TABLE "constructive_fbp_public".graph_store + ADD COLUMN hash uuid; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_store/columns/id/alterations/alt0000000137.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_store/columns/id/alterations/alt0000000137.sql new file mode 100644 index 00000000..1d8e3525 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_store/columns/id/alterations/alt0000000137.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_store/columns/id/alterations/alt0000000137 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_store/table +-- requires: schemas/constructive_fbp_public/tables/graph_store/columns/id/column + + +ALTER TABLE "constructive_fbp_public".graph_store + ALTER COLUMN id SET NOT NULL; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_store/columns/id/alterations/alt0000000138.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_store/columns/id/alterations/alt0000000138.sql new file mode 100644 index 00000000..bff66829 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_store/columns/id/alterations/alt0000000138.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_store/columns/id/alterations/alt0000000138 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_store/table +-- requires: schemas/constructive_fbp_public/tables/graph_store/columns/id/column + + +ALTER TABLE "constructive_fbp_public".graph_store + ALTER COLUMN id SET DEFAULT uuidv7(); + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_store/columns/id/alterations/alt0000000139.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_store/columns/id/alterations/alt0000000139.sql new file mode 100644 index 00000000..f5428255 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_store/columns/id/alterations/alt0000000139.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_store/columns/id/alterations/alt0000000139 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_store/columns/id/column + + +COMMENT ON COLUMN "constructive_fbp_public".graph_store.id IS 'Unique store identifier'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_store/columns/id/column.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_store/columns/id/column.sql new file mode 100644 index 00000000..06abfd6d --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_store/columns/id/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_store/columns/id/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_store/table + + +ALTER TABLE "constructive_fbp_public".graph_store + ADD COLUMN id uuid; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_store/columns/name/alterations/alt0000000140.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_store/columns/name/alterations/alt0000000140.sql new file mode 100644 index 00000000..f5b97095 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_store/columns/name/alterations/alt0000000140.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_store/columns/name/alterations/alt0000000140 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_store/table +-- requires: schemas/constructive_fbp_public/tables/graph_store/columns/name/column + + +ALTER TABLE "constructive_fbp_public".graph_store + ALTER COLUMN name SET NOT NULL; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_store/columns/name/alterations/alt0000000141.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_store/columns/name/alterations/alt0000000141.sql new file mode 100644 index 00000000..b66bb2b7 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_store/columns/name/alterations/alt0000000141.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_store/columns/name/alterations/alt0000000141 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_store/columns/name/column + + +COMMENT ON COLUMN "constructive_fbp_public".graph_store.name IS E'Human-readable store name'; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_store/columns/name/column.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_store/columns/name/column.sql new file mode 100644 index 00000000..5dbc8fe5 --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_store/columns/name/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_store/columns/name/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_store/table + + +ALTER TABLE "constructive_fbp_public".graph_store + ADD COLUMN name text; + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_store/constraints/graph_stores_pkey/constraint.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_store/constraints/graph_stores_pkey/constraint.sql new file mode 100644 index 00000000..a1212c6d --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_store/constraints/graph_stores_pkey/constraint.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_store/constraints/graph_stores_pkey/constraint +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_store/table +-- requires: schemas/constructive_fbp_public/tables/graph_store/columns/id/column + + +ALTER TABLE "constructive_fbp_public".graph_store + ADD CONSTRAINT graph_stores_pkey PRIMARY KEY (id); + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_store/indexes/idx_graph_store_unique_name.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_store/indexes/idx_graph_store_unique_name.sql new file mode 100644 index 00000000..d848fcdc --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_store/indexes/idx_graph_store_unique_name.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_store/indexes/idx_graph_store_unique_name +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema +-- requires: schemas/constructive_fbp_public/tables/graph_store/table +-- requires: schemas/constructive_fbp_public/tables/graph_store/columns/database_id/column + + +CREATE UNIQUE INDEX idx_graph_store_unique_name ON "constructive_fbp_public".graph_store ( database_id, (decode(md5(lower(name)), 'hex')) ); + diff --git a/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_store/table.sql b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_store/table.sql new file mode 100644 index 00000000..3a029bfd --- /dev/null +++ b/pgpm/constructive-fbp/deploy/schemas/constructive_fbp_public/tables/graph_store/table.sql @@ -0,0 +1,8 @@ +-- Deploy: schemas/constructive_fbp_public/tables/graph_store/table +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_fbp_public/schema + + +CREATE TABLE "constructive_fbp_public".graph_store (); + diff --git a/pgpm/constructive-fbp/package.json b/pgpm/constructive-fbp/package.json new file mode 100644 index 00000000..ed74843b --- /dev/null +++ b/pgpm/constructive-fbp/package.json @@ -0,0 +1,30 @@ +{ + "name": "@constructive-io/constructive-fbp", + "version": "0.0.1", + "description": "FBP module — function graphs, graph-specific merkle store (graph_store/object/commit/ref), execution engine", + "author": "Constructive ", + "keywords": [ + "postgresql", + "pgpm", + "constructive-fbp" + ], + "publishConfig": { + "access": "public" + }, + "scripts": { + "bundle": "pgpm package", + "test": "jest", + "test:watch": "jest --watch" + }, + "dependencies": { + "@pgpm/inflection": "*", + "@pgpm/stamps": "*" + }, + "devDependencies": { + "pgpm": "^4.26.1" + }, + "repository": { + "type": "git", + "url": "https://github.com/constructive-io/constructive-functions" + } +} diff --git a/pgpm/constructive-fbp/pgpm.plan b/pgpm/constructive-fbp/pgpm.plan new file mode 100644 index 00000000..3eec0493 --- /dev/null +++ b/pgpm/constructive-fbp/pgpm.plan @@ -0,0 +1,258 @@ +%syntax-version=1.0.0 +%project=constructive-fbp +%uri=constructive-fbp + +schemas/constructive_fbp_private/schema 2017-08-11T08:11:51Z Constructive # add create_schema +schemas/constructive_fbp_public/schema 2017-08-11T08:11:51Z Constructive # add create_schema +schemas/constructive_fbp_private/tables/function_graph_execution_outputs/table [schemas/constructive_fbp_private/schema] 2017-08-11T08:11:51Z Constructive # add create_partitioned_table +schemas/constructive_fbp_private/tables/function_graph_executions/table [schemas/constructive_fbp_private/schema] 2017-08-11T08:11:51Z Constructive # add create_partitioned_table +schemas/constructive_fbp_public/tables/function_graphs/table [schemas/constructive_fbp_public/schema] 2017-08-11T08:11:51Z Constructive # add create_table +schemas/constructive_fbp_public/tables/graph_commit/table [schemas/constructive_fbp_public/schema] 2017-08-11T08:11:51Z Constructive # add create_table +schemas/constructive_fbp_public/tables/graph_object/table [schemas/constructive_fbp_public/schema] 2017-08-11T08:11:51Z Constructive # add create_table +schemas/constructive_fbp_public/tables/graph_ref/table [schemas/constructive_fbp_public/schema] 2017-08-11T08:11:51Z Constructive # add create_table +schemas/constructive_fbp_public/tables/graph_store/table [schemas/constructive_fbp_public/schema] 2017-08-11T08:11:51Z Constructive # add create_table +schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/created_at/column [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_execution_outputs/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/created_at/alterations/alt0000000003 [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/created_at/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/data/column [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_execution_outputs/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/data/alterations/alt0000000004 [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/data/column schemas/constructive_fbp_private/tables/function_graph_execution_outputs/table] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/data/alterations/alt0000000005 [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/data/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/database_id/column [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_execution_outputs/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/database_id/alterations/alt0000000006 [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/database_id/column schemas/constructive_fbp_private/tables/function_graph_execution_outputs/table] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/database_id/alterations/alt0000000007 [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/database_id/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/hash/column [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_execution_outputs/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/hash/alterations/alt0000000008 [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/hash/column schemas/constructive_fbp_private/tables/function_graph_execution_outputs/table] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/hash/alterations/alt0000000009 [schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/hash/column schemas/constructive_fbp_private/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/id/column [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_execution_outputs/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/id/alterations/alt0000000010 [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/id/column schemas/constructive_fbp_private/tables/function_graph_execution_outputs/table] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/id/alterations/alt0000000011 [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/id/column schemas/constructive_fbp_private/tables/function_graph_execution_outputs/table] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default +schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/id/alterations/alt0000000012 [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/id/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_private/tables/function_graph_executions/columns/completed_at/column [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_executions/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_fbp_private/tables/function_graph_executions/columns/completed_at/alterations/alt0000000015 [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_executions/columns/completed_at/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_private/tables/function_graph_executions/columns/current_wave/column [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_executions/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_fbp_private/tables/function_graph_executions/columns/current_wave/alterations/alt0000000016 [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_executions/table schemas/constructive_fbp_private/tables/function_graph_executions/columns/current_wave/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_fbp_private/tables/function_graph_executions/columns/current_wave/alterations/alt0000000017 [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_executions/table schemas/constructive_fbp_private/tables/function_graph_executions/columns/current_wave/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default +schemas/constructive_fbp_private/tables/function_graph_executions/columns/current_wave/alterations/alt0000000018 [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_executions/columns/current_wave/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_private/tables/function_graph_executions/columns/database_id/column [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_executions/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_fbp_private/tables/function_graph_executions/columns/database_id/alterations/alt0000000019 [schemas/constructive_fbp_private/tables/function_graph_executions/columns/database_id/column schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_executions/table] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_fbp_private/tables/function_graph_executions/columns/database_id/alterations/alt0000000020 [schemas/constructive_fbp_private/tables/function_graph_executions/columns/database_id/column schemas/constructive_fbp_private/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_private/tables/function_graph_executions/columns/definitions_commit_id/column [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_executions/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_fbp_private/tables/function_graph_executions/columns/definitions_commit_id/alterations/alt0000000021 [schemas/constructive_fbp_private/tables/function_graph_executions/columns/definitions_commit_id/column schemas/constructive_fbp_private/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_private/tables/function_graph_executions/columns/entity_id/column [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_executions/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_fbp_private/tables/function_graph_executions/columns/entity_id/alterations/alt0000000022 [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_executions/columns/entity_id/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_private/tables/function_graph_executions/columns/error_code/column [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_executions/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_fbp_private/tables/function_graph_executions/columns/error_code/alterations/alt0000000023 [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_executions/columns/error_code/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_private/tables/function_graph_executions/columns/error_message/column [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_executions/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_fbp_private/tables/function_graph_executions/columns/error_message/alterations/alt0000000024 [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_executions/columns/error_message/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_private/tables/function_graph_executions/columns/execution_plan/column [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_executions/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_fbp_private/tables/function_graph_executions/columns/execution_plan/alterations/alt0000000025 [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_executions/columns/execution_plan/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_private/tables/function_graph_executions/columns/graph_id/column [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_executions/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_fbp_private/tables/function_graph_executions/columns/graph_id/alterations/alt0000000026 [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_executions/table schemas/constructive_fbp_private/tables/function_graph_executions/columns/graph_id/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_fbp_private/tables/function_graph_executions/columns/graph_id/alterations/alt0000000027 [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_executions/columns/graph_id/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_private/tables/function_graph_executions/columns/id/column [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_executions/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_fbp_private/tables/function_graph_executions/columns/id/alterations/alt0000000028 [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_executions/table schemas/constructive_fbp_private/tables/function_graph_executions/columns/id/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_fbp_private/tables/function_graph_executions/columns/id/alterations/alt0000000029 [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_executions/table schemas/constructive_fbp_private/tables/function_graph_executions/columns/id/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default +schemas/constructive_fbp_private/tables/function_graph_executions/columns/id/alterations/alt0000000030 [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_executions/columns/id/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_private/tables/function_graph_executions/columns/input_payload/column [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_executions/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_fbp_private/tables/function_graph_executions/columns/input_payload/alterations/alt0000000031 [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_executions/columns/input_payload/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_private/tables/function_graph_executions/columns/invocation_id/column [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_executions/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_fbp_private/tables/function_graph_executions/columns/invocation_id/alterations/alt0000000032 [schemas/constructive_fbp_private/tables/function_graph_executions/columns/invocation_id/column schemas/constructive_fbp_private/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_pending_jobs/column [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_executions/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_pending_jobs/alterations/alt0000000033 [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_pending_jobs/column schemas/constructive_fbp_private/tables/function_graph_executions/table] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_pending_jobs/alterations/alt0000000034 [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_pending_jobs/column schemas/constructive_fbp_private/tables/function_graph_executions/table] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default +schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_pending_jobs/alterations/alt0000000035 [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_pending_jobs/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_ticks/column [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_executions/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_ticks/alterations/alt0000000036 [schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_ticks/column schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_executions/table] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_ticks/alterations/alt0000000037 [schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_ticks/column schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_executions/table] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default +schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_ticks/alterations/alt0000000038 [schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_ticks/column schemas/constructive_fbp_private/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_private/tables/function_graph_executions/columns/node_outputs/column [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_executions/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_fbp_private/tables/function_graph_executions/columns/node_outputs/alterations/alt0000000039 [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_executions/table schemas/constructive_fbp_private/tables/function_graph_executions/columns/node_outputs/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_fbp_private/tables/function_graph_executions/columns/node_outputs/alterations/alt0000000040 [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_executions/table schemas/constructive_fbp_private/tables/function_graph_executions/columns/node_outputs/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default +schemas/constructive_fbp_private/tables/function_graph_executions/columns/node_outputs/alterations/alt0000000041 [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_executions/columns/node_outputs/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_node/column [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_executions/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_node/alterations/alt0000000042 [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_executions/table schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_node/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_node/alterations/alt0000000043 [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_node/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_payload/column [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_executions/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_payload/alterations/alt0000000044 [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_payload/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_port/column [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_executions/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_port/alterations/alt0000000045 [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_executions/table schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_port/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_port/alterations/alt0000000046 [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_executions/table schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_port/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default +schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_port/alterations/alt0000000047 [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_port/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_private/tables/function_graph_executions/columns/parent_execution_id/column [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_executions/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_fbp_private/tables/function_graph_executions/columns/parent_execution_id/alterations/alt0000000048 [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_executions/columns/parent_execution_id/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_private/tables/function_graph_executions/columns/parent_node_name/column [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_executions/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_fbp_private/tables/function_graph_executions/columns/parent_node_name/alterations/alt0000000049 [schemas/constructive_fbp_private/tables/function_graph_executions/columns/parent_node_name/column schemas/constructive_fbp_private/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_private/tables/function_graph_executions/columns/started_at/column [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_executions/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_fbp_private/tables/function_graph_executions/columns/started_at/alterations/alt0000000050 [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_executions/columns/started_at/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/column [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_executions/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/alterations/alt0000000051 [schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/column schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_executions/table] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/alterations/alt0000000052 [schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/column schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_executions/table] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default +schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/alterations/alt0000000053 [schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/column schemas/constructive_fbp_private/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/alterations/alt0000000054 [schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/column schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_executions/table] 2017-08-11T08:11:51Z Constructive # add create_check_constraint +schemas/constructive_fbp_private/tables/function_graph_executions/columns/tick_count/column [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_executions/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_fbp_private/tables/function_graph_executions/columns/tick_count/alterations/alt0000000055 [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_executions/columns/tick_count/column schemas/constructive_fbp_private/tables/function_graph_executions/table] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_fbp_private/tables/function_graph_executions/columns/tick_count/alterations/alt0000000056 [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_executions/columns/tick_count/column schemas/constructive_fbp_private/tables/function_graph_executions/table] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default +schemas/constructive_fbp_private/tables/function_graph_executions/columns/tick_count/alterations/alt0000000057 [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_executions/columns/tick_count/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_private/tables/function_graph_executions/columns/timeout_at/column [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_executions/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_fbp_private/tables/function_graph_executions/columns/timeout_at/alterations/alt0000000058 [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_executions/columns/timeout_at/column schemas/constructive_fbp_private/tables/function_graph_executions/table] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_fbp_private/tables/function_graph_executions/columns/timeout_at/alterations/alt0000000059 [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_executions/columns/timeout_at/column schemas/constructive_fbp_private/tables/function_graph_executions/table] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default +schemas/constructive_fbp_private/tables/function_graph_executions/columns/timeout_at/alterations/alt0000000060 [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_executions/columns/timeout_at/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_public/tables/function_graphs/columns/context/column [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/function_graphs/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_fbp_public/tables/function_graphs/columns/context/alterations/alt0000000063 [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/function_graphs/columns/context/column schemas/constructive_fbp_public/tables/function_graphs/table] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_fbp_public/tables/function_graphs/columns/context/alterations/alt0000000064 [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/function_graphs/columns/context/column schemas/constructive_fbp_public/tables/function_graphs/table] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default +schemas/constructive_fbp_public/tables/function_graphs/columns/context/alterations/alt0000000065 [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/function_graphs/columns/context/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_public/tables/function_graphs/columns/created_at/column [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/function_graphs/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_fbp_public/tables/function_graphs/columns/created_at/alterations/alt0000000066 [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/function_graphs/table schemas/constructive_fbp_public/tables/function_graphs/columns/created_at/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_fbp_public/tables/function_graphs/columns/created_at/alterations/alt0000000067 [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/function_graphs/table schemas/constructive_fbp_public/tables/function_graphs/columns/created_at/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default +schemas/constructive_fbp_public/tables/function_graphs/columns/created_at/alterations/alt0000000068 [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/function_graphs/columns/created_at/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_public/tables/function_graphs/columns/created_by/column [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/function_graphs/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_fbp_public/tables/function_graphs/columns/created_by/alterations/alt0000000069 [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/function_graphs/columns/created_by/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_public/tables/function_graphs/columns/database_id/column [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/function_graphs/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_fbp_public/tables/function_graphs/columns/database_id/alterations/alt0000000070 [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/function_graphs/table schemas/constructive_fbp_public/tables/function_graphs/columns/database_id/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_fbp_public/tables/function_graphs/columns/database_id/alterations/alt0000000071 [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/function_graphs/columns/database_id/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_public/tables/function_graphs/columns/definitions_commit_id/column [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/function_graphs/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_fbp_public/tables/function_graphs/columns/definitions_commit_id/alterations/alt0000000072 [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/function_graphs/columns/definitions_commit_id/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_public/tables/function_graphs/columns/description/column [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/function_graphs/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_fbp_public/tables/function_graphs/columns/description/alterations/alt0000000073 [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/function_graphs/columns/description/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_public/tables/function_graphs/columns/entity_id/column [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/function_graphs/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_fbp_public/tables/function_graphs/columns/entity_id/alterations/alt0000000074 [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/function_graphs/columns/entity_id/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_public/tables/function_graphs/columns/id/column [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/function_graphs/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_fbp_public/tables/function_graphs/columns/id/alterations/alt0000000075 [schemas/constructive_fbp_public/tables/function_graphs/columns/id/column schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/function_graphs/table] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_fbp_public/tables/function_graphs/columns/id/alterations/alt0000000076 [schemas/constructive_fbp_public/tables/function_graphs/columns/id/column schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/function_graphs/table] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default +schemas/constructive_fbp_public/tables/function_graphs/columns/id/alterations/alt0000000077 [schemas/constructive_fbp_public/tables/function_graphs/columns/id/column schemas/constructive_fbp_public/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_public/tables/function_graphs/columns/is_valid/column [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/function_graphs/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_fbp_public/tables/function_graphs/columns/is_valid/alterations/alt0000000078 [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/function_graphs/columns/is_valid/column schemas/constructive_fbp_public/tables/function_graphs/table] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_fbp_public/tables/function_graphs/columns/is_valid/alterations/alt0000000079 [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/function_graphs/columns/is_valid/column schemas/constructive_fbp_public/tables/function_graphs/table] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default +schemas/constructive_fbp_public/tables/function_graphs/columns/is_valid/alterations/alt0000000080 [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/function_graphs/columns/is_valid/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_public/tables/function_graphs/columns/name/column [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/function_graphs/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_fbp_public/tables/function_graphs/columns/name/alterations/alt0000000081 [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/function_graphs/columns/name/column schemas/constructive_fbp_public/tables/function_graphs/table] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_fbp_public/tables/function_graphs/columns/name/alterations/alt0000000082 [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/function_graphs/columns/name/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_public/tables/function_graphs/columns/store_id/column [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/function_graphs/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_fbp_public/tables/function_graphs/columns/store_id/alterations/alt0000000083 [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/function_graphs/table schemas/constructive_fbp_public/tables/function_graphs/columns/store_id/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_fbp_public/tables/function_graphs/columns/store_id/alterations/alt0000000084 [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/function_graphs/columns/store_id/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_public/tables/function_graphs/columns/updated_at/column [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/function_graphs/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_fbp_public/tables/function_graphs/columns/updated_at/alterations/alt0000000085 [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/function_graphs/columns/updated_at/column schemas/constructive_fbp_public/tables/function_graphs/table] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_fbp_public/tables/function_graphs/columns/updated_at/alterations/alt0000000086 [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/function_graphs/columns/updated_at/column schemas/constructive_fbp_public/tables/function_graphs/table] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default +schemas/constructive_fbp_public/tables/function_graphs/columns/updated_at/alterations/alt0000000087 [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/function_graphs/columns/updated_at/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_public/tables/function_graphs/columns/validation_errors/column [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/function_graphs/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_fbp_public/tables/function_graphs/columns/validation_errors/alterations/alt0000000088 [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/function_graphs/columns/validation_errors/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_public/tables/graph_commit/columns/author_id/column [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_commit/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_fbp_public/tables/graph_commit/columns/author_id/alterations/alt0000000091 [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_commit/columns/author_id/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_public/tables/graph_commit/columns/committer_id/column [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_commit/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_fbp_public/tables/graph_commit/columns/committer_id/alterations/alt0000000092 [schemas/constructive_fbp_public/tables/graph_commit/columns/committer_id/column schemas/constructive_fbp_public/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_public/tables/graph_commit/columns/database_id/column [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_commit/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_fbp_public/tables/graph_commit/columns/database_id/alterations/alt0000000093 [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_commit/columns/database_id/column schemas/constructive_fbp_public/tables/graph_commit/table] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_fbp_public/tables/graph_commit/columns/database_id/alterations/alt0000000094 [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_commit/columns/database_id/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_public/tables/graph_commit/columns/date/column [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_commit/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_fbp_public/tables/graph_commit/columns/date/alterations/alt0000000095 [schemas/constructive_fbp_public/tables/graph_commit/columns/date/column schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_commit/table] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_fbp_public/tables/graph_commit/columns/date/alterations/alt0000000096 [schemas/constructive_fbp_public/tables/graph_commit/columns/date/column schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_commit/table] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default +schemas/constructive_fbp_public/tables/graph_commit/columns/date/alterations/alt0000000097 [schemas/constructive_fbp_public/tables/graph_commit/columns/date/column schemas/constructive_fbp_public/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_public/tables/graph_commit/columns/id/column [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_commit/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_fbp_public/tables/graph_commit/columns/id/alterations/alt0000000098 [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_commit/table schemas/constructive_fbp_public/tables/graph_commit/columns/id/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_fbp_public/tables/graph_commit/columns/id/alterations/alt0000000099 [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_commit/table schemas/constructive_fbp_public/tables/graph_commit/columns/id/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default +schemas/constructive_fbp_public/tables/graph_commit/columns/id/alterations/alt0000000100 [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_commit/columns/id/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_public/tables/graph_commit/columns/message/column [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_commit/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_fbp_public/tables/graph_commit/columns/message/alterations/alt0000000101 [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_commit/columns/message/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_public/tables/graph_commit/columns/parent_ids/column [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_commit/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_fbp_public/tables/graph_commit/columns/parent_ids/alterations/alt0000000102 [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_commit/columns/parent_ids/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_public/tables/graph_commit/columns/store_id/column [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_commit/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_fbp_public/tables/graph_commit/columns/store_id/alterations/alt0000000103 [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_commit/table schemas/constructive_fbp_public/tables/graph_commit/columns/store_id/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_fbp_public/tables/graph_commit/columns/store_id/alterations/alt0000000104 [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_commit/columns/store_id/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_public/tables/graph_commit/columns/tree_id/column [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_commit/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_fbp_public/tables/graph_commit/columns/tree_id/alterations/alt0000000105 [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_commit/columns/tree_id/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_public/tables/graph_object/columns/created_at/column [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_object/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_fbp_public/tables/graph_object/columns/created_at/alterations/alt0000000108 [schemas/constructive_fbp_public/tables/graph_object/columns/created_at/column schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_object/table] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default +schemas/constructive_fbp_public/tables/graph_object/columns/created_at/alterations/alt0000000109 [schemas/constructive_fbp_public/tables/graph_object/columns/created_at/column schemas/constructive_fbp_public/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_public/tables/graph_object/columns/data/column [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_object/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_fbp_public/tables/graph_object/columns/data/alterations/alt0000000110 [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_object/columns/data/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_public/tables/graph_object/columns/database_id/column [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_object/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_fbp_public/tables/graph_object/columns/database_id/alterations/alt0000000111 [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_object/columns/database_id/column schemas/constructive_fbp_public/tables/graph_object/table] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_fbp_public/tables/graph_object/columns/database_id/alterations/alt0000000112 [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_object/columns/database_id/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_public/tables/graph_object/columns/id/column [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_object/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_fbp_public/tables/graph_object/columns/id/alterations/alt0000000113 [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_object/columns/id/column schemas/constructive_fbp_public/tables/graph_object/table] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_fbp_public/tables/graph_object/columns/id/alterations/alt0000000114 [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_object/columns/id/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_public/tables/graph_object/columns/kids/column [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_object/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_fbp_public/tables/graph_object/columns/kids/alterations/alt0000000115 [schemas/constructive_fbp_public/tables/graph_object/columns/kids/column schemas/constructive_fbp_public/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_public/tables/graph_object/columns/ktree/column [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_object/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_fbp_public/tables/graph_object/columns/kids/alterations/alt0000000116 [schemas/constructive_fbp_public/tables/graph_object/columns/kids/column schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_object/table schemas/constructive_fbp_public/tables/graph_object/columns/ktree/column] 2017-08-11T08:11:51Z Constructive # add create_check_constraint +schemas/constructive_fbp_public/tables/graph_object/columns/ktree/alterations/alt0000000117 [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_object/columns/ktree/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_public/tables/graph_ref/columns/commit_id/column [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_ref/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_fbp_public/tables/graph_ref/columns/commit_id/alterations/alt0000000120 [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_ref/columns/commit_id/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_public/tables/graph_ref/columns/database_id/column [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_ref/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_fbp_public/tables/graph_ref/columns/database_id/alterations/alt0000000121 [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_ref/table schemas/constructive_fbp_public/tables/graph_ref/columns/database_id/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_fbp_public/tables/graph_ref/columns/database_id/alterations/alt0000000122 [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_ref/columns/database_id/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_public/tables/graph_ref/columns/id/column [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_ref/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_fbp_public/tables/graph_ref/columns/id/alterations/alt0000000123 [schemas/constructive_fbp_public/tables/graph_ref/columns/id/column schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_ref/table] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_fbp_public/tables/graph_ref/columns/id/alterations/alt0000000124 [schemas/constructive_fbp_public/tables/graph_ref/columns/id/column schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_ref/table] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default +schemas/constructive_fbp_public/tables/graph_ref/columns/id/alterations/alt0000000125 [schemas/constructive_fbp_public/tables/graph_ref/columns/id/column schemas/constructive_fbp_public/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_public/tables/graph_ref/columns/name/column [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_ref/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_fbp_public/tables/graph_ref/columns/name/alterations/alt0000000126 [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_ref/table schemas/constructive_fbp_public/tables/graph_ref/columns/name/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_fbp_public/tables/graph_ref/columns/name/alterations/alt0000000127 [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_ref/columns/name/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_public/tables/graph_ref/columns/store_id/column [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_ref/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_fbp_public/tables/graph_ref/columns/store_id/alterations/alt0000000128 [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_ref/columns/store_id/column schemas/constructive_fbp_public/tables/graph_ref/table] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_fbp_public/tables/graph_ref/columns/store_id/alterations/alt0000000129 [schemas/constructive_fbp_public/tables/graph_ref/columns/store_id/column schemas/constructive_fbp_public/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_public/tables/graph_store/columns/created_at/column [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_store/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_fbp_public/tables/graph_store/columns/created_at/alterations/alt0000000132 [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_store/table schemas/constructive_fbp_public/tables/graph_store/columns/created_at/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default +schemas/constructive_fbp_public/tables/graph_store/columns/created_at/alterations/alt0000000133 [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_store/columns/created_at/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_public/tables/graph_store/columns/database_id/column [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_store/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_fbp_public/tables/graph_store/columns/database_id/alterations/alt0000000134 [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_store/table schemas/constructive_fbp_public/tables/graph_store/columns/database_id/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_fbp_public/tables/graph_store/columns/database_id/alterations/alt0000000135 [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_store/columns/database_id/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_public/tables/graph_store/columns/hash/column [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_store/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_fbp_public/tables/graph_store/columns/hash/alterations/alt0000000136 [schemas/constructive_fbp_public/tables/graph_store/columns/hash/column schemas/constructive_fbp_public/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_public/tables/graph_store/columns/id/column [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_store/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_fbp_public/tables/graph_store/columns/id/alterations/alt0000000137 [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_store/table schemas/constructive_fbp_public/tables/graph_store/columns/id/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_fbp_public/tables/graph_store/columns/id/alterations/alt0000000138 [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_store/table schemas/constructive_fbp_public/tables/graph_store/columns/id/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default +schemas/constructive_fbp_public/tables/graph_store/columns/id/alterations/alt0000000139 [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_store/columns/id/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_public/tables/graph_store/columns/name/column [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_store/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_fbp_public/tables/graph_store/columns/name/alterations/alt0000000140 [schemas/constructive_fbp_public/tables/graph_store/columns/name/column schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_store/table] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_fbp_public/tables/graph_store/columns/name/alterations/alt0000000141 [schemas/constructive_fbp_public/tables/graph_store/columns/name/column schemas/constructive_fbp_public/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_private/tables/function_graph_execution_outputs/alterations/alt0000000001 [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_execution_outputs/table] 2017-08-11T08:11:51Z Constructive # add disable_row_level_security +schemas/constructive_fbp_private/tables/function_graph_execution_outputs/alterations/alt0000000002 [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_execution_outputs/table] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_private/tables/function_graph_executions/alterations/alt0000000013 [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_executions/table] 2017-08-11T08:11:51Z Constructive # add disable_row_level_security +schemas/constructive_fbp_private/tables/function_graph_executions/alterations/alt0000000014 [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_executions/table] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_public/tables/function_graphs/alterations/alt0000000061 [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/function_graphs/table] 2017-08-11T08:11:51Z Constructive # add disable_row_level_security +schemas/constructive_fbp_public/tables/function_graphs/alterations/alt0000000062 [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/function_graphs/table] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_public/tables/graph_commit/alterations/alt0000000089 [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_commit/table] 2017-08-11T08:11:51Z Constructive # add disable_row_level_security +schemas/constructive_fbp_public/tables/graph_commit/alterations/alt0000000090 [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_commit/table] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_public/tables/graph_object/alterations/alt0000000106 [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_object/table] 2017-08-11T08:11:51Z Constructive # add disable_row_level_security +schemas/constructive_fbp_public/tables/graph_object/alterations/alt0000000107 [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_object/table] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_public/tables/graph_ref/alterations/alt0000000118 [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_ref/table] 2017-08-11T08:11:51Z Constructive # add disable_row_level_security +schemas/constructive_fbp_public/tables/graph_ref/alterations/alt0000000119 [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_ref/table] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_public/tables/graph_store/alterations/alt0000000130 [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_store/table] 2017-08-11T08:11:51Z Constructive # add disable_row_level_security +schemas/constructive_fbp_public/tables/graph_store/alterations/alt0000000131 [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_store/table] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_fbp_private/tables/function_graph_execution_outputs/constraints/function_graph_execution_outputs_pkey/constraint [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_execution_outputs/table schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/created_at/column schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/id/column] 2017-08-11T08:11:51Z Constructive # add alter_table_add_primary_key +schemas/constructive_fbp_private/tables/function_graph_executions/constraints/function_graph_executions_pkey/constraint [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_executions/table schemas/constructive_fbp_private/tables/function_graph_executions/columns/started_at/column schemas/constructive_fbp_private/tables/function_graph_executions/columns/id/column] 2017-08-11T08:11:51Z Constructive # add alter_table_add_primary_key +schemas/constructive_fbp_public/tables/function_graphs/constraints/function_graphs_pkey/constraint [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/function_graphs/table schemas/constructive_fbp_public/tables/function_graphs/columns/id/column] 2017-08-11T08:11:51Z Constructive # add alter_table_add_primary_key +schemas/constructive_fbp_private/tables/function_graph_executions/constraints/function_graph_executions_graph_id_fkey/constraint [schemas/constructive_fbp_private/schema schemas/constructive_fbp_public/schema schemas/constructive_fbp_private/tables/function_graph_executions/table schemas/constructive_fbp_public/tables/function_graphs/table schemas/constructive_fbp_private/tables/function_graph_executions/columns/graph_id/column schemas/constructive_fbp_public/tables/function_graphs/columns/id/column schemas/constructive_fbp_public/tables/function_graphs/constraints/function_graphs_pkey/constraint] 2017-08-11T08:11:51Z Constructive # add alter_table_add_foreign_key +schemas/constructive_fbp_public/tables/graph_commit/constraints/graph_commits_pkey/constraint [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_commit/table schemas/constructive_fbp_public/tables/graph_commit/columns/id/column schemas/constructive_fbp_public/tables/graph_commit/columns/database_id/column] 2017-08-11T08:11:51Z Constructive # add alter_table_add_primary_key +schemas/constructive_fbp_public/tables/graph_object/constraints/graph_objects_pkey/constraint [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_object/table schemas/constructive_fbp_public/tables/graph_object/columns/id/column schemas/constructive_fbp_public/tables/graph_object/columns/database_id/column] 2017-08-11T08:11:51Z Constructive # add alter_table_add_primary_key +schemas/constructive_fbp_public/tables/graph_ref/constraints/graph_refs_pkey/constraint [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_ref/table schemas/constructive_fbp_public/tables/graph_ref/columns/id/column schemas/constructive_fbp_public/tables/graph_ref/columns/database_id/column] 2017-08-11T08:11:51Z Constructive # add alter_table_add_primary_key +schemas/constructive_fbp_public/tables/graph_store/constraints/graph_stores_pkey/constraint [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_store/table schemas/constructive_fbp_public/tables/graph_store/columns/id/column] 2017-08-11T08:11:51Z Constructive # add alter_table_add_primary_key +schemas/constructive_fbp_private/tables/function_graph_execution_outputs/indexes/idx_function_graph_execution_outputs_unique_hash [schemas/constructive_fbp_private/schema schemas/constructive_fbp_private/tables/function_graph_execution_outputs/table schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/database_id/column schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/hash/column schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/created_at/column] 2017-08-11T08:11:51Z Constructive # add create_index_expression +schemas/constructive_fbp_public/tables/function_graphs/indexes/idx_function_graphs_unique_name [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/function_graphs/table schemas/constructive_fbp_public/tables/function_graphs/columns/database_id/column schemas/constructive_fbp_public/tables/function_graphs/columns/name/column] 2017-08-11T08:11:51Z Constructive # add create_index_expression +schemas/constructive_fbp_public/tables/graph_store/indexes/idx_graph_store_unique_name [schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_store/table schemas/constructive_fbp_public/tables/graph_store/columns/database_id/column] 2017-08-11T08:11:51Z Constructive # add create_index_expression +schemas/constructive_fbp_private/trigger_fns/tg_graph_object_generate_id_hash [schemas/constructive_fbp_private/schema] 2017-08-11T08:11:51Z Constructive # add create_trigger_function +schemas/constructive_fbp_private/procedures/complete_node/procedure [schemas/constructive_fbp_private/schema] 2017-08-11T08:11:51Z Constructive # add create_function +schemas/constructive_fbp_private/procedures/copy_subtree/procedure [schemas/constructive_fbp_private/schema] 2017-08-11T08:11:51Z Constructive # add create_function +schemas/constructive_fbp_private/procedures/deserialize_graph/procedure [schemas/constructive_fbp_private/schema] 2017-08-11T08:11:51Z Constructive # add create_function +schemas/constructive_fbp_private/procedures/graph_object_hash_uuid/procedure [schemas/constructive_fbp_private/schema] 2017-08-11T08:11:51Z Constructive # add create_function +schemas/constructive_fbp_private/procedures/insert_subnet_nodes/procedure [schemas/constructive_fbp_private/schema] 2017-08-11T08:11:51Z Constructive # add create_function +schemas/constructive_fbp_private/procedures/serialize_graph/procedure [schemas/constructive_fbp_private/schema] 2017-08-11T08:11:51Z Constructive # add create_function +schemas/constructive_fbp_private/procedures/tick_execution/procedure [schemas/constructive_fbp_private/schema] 2017-08-11T08:11:51Z Constructive # add create_function +schemas/constructive_fbp_public/procedures/add_edge/procedure [schemas/constructive_fbp_public/schema] 2017-08-11T08:11:51Z Constructive # add create_function +schemas/constructive_fbp_public/procedures/add_edge_and_save/procedure [schemas/constructive_fbp_public/schema] 2017-08-11T08:11:51Z Constructive # add create_function +schemas/constructive_fbp_public/procedures/add_node/procedure [schemas/constructive_fbp_public/schema] 2017-08-11T08:11:51Z Constructive # add create_function +schemas/constructive_fbp_public/procedures/add_node_and_save/procedure [schemas/constructive_fbp_public/schema] 2017-08-11T08:11:51Z Constructive # add create_function +schemas/constructive_fbp_public/procedures/copy_graph/procedure [schemas/constructive_fbp_public/schema] 2017-08-11T08:11:51Z Constructive # add create_function +schemas/constructive_fbp_public/procedures/create_function_graph/procedure [schemas/constructive_fbp_public/schema] 2017-08-11T08:11:51Z Constructive # add create_function +schemas/constructive_fbp_public/procedures/graph_get_all/procedure [schemas/constructive_fbp_public/schema] 2017-08-11T08:11:51Z Constructive # add create_function +schemas/constructive_fbp_public/procedures/graph_get_node_at_path/procedure [schemas/constructive_fbp_public/schema] 2017-08-11T08:11:51Z Constructive # add create_function +schemas/constructive_fbp_public/procedures/graph_init_empty_repo/procedure [schemas/constructive_fbp_public/schema] 2017-08-11T08:11:51Z Constructive # add create_function +schemas/constructive_fbp_public/procedures/graph_insert_node_at_path/procedure [schemas/constructive_fbp_public/schema] 2017-08-11T08:11:51Z Constructive # add create_function +schemas/constructive_fbp_public/procedures/graph_set_data_at_path/procedure [schemas/constructive_fbp_public/schema] 2017-08-11T08:11:51Z Constructive # add create_function +schemas/constructive_fbp_public/procedures/import_definitions/procedure [schemas/constructive_fbp_public/schema] 2017-08-11T08:11:51Z Constructive # add create_function +schemas/constructive_fbp_public/procedures/import_graph_json/procedure [schemas/constructive_fbp_public/schema] 2017-08-11T08:11:51Z Constructive # add create_function +schemas/constructive_fbp_public/procedures/read_function_graph/procedure [schemas/constructive_fbp_public/schema] 2017-08-11T08:11:51Z Constructive # add create_function +schemas/constructive_fbp_public/procedures/save_graph/procedure [schemas/constructive_fbp_public/schema] 2017-08-11T08:11:51Z Constructive # add create_function +schemas/constructive_fbp_public/procedures/start_execution/procedure [schemas/constructive_fbp_public/schema] 2017-08-11T08:11:51Z Constructive # add create_function +schemas/constructive_fbp_public/procedures/validate_function_graph/procedure [schemas/constructive_fbp_public/schema] 2017-08-11T08:11:51Z Constructive # add create_function +schemas/constructive_fbp_public/tables/graph_object/triggers/generate_id_hash [schemas/constructive_fbp_private/schema schemas/constructive_fbp_public/schema schemas/constructive_fbp_public/tables/graph_object/table schemas/constructive_fbp_private/trigger_fns/tg_graph_object_generate_id_hash] 2017-08-11T08:11:51Z Constructive # add create_trigger diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/procedures/complete_node/procedure.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/procedures/complete_node/procedure.sql new file mode 100644 index 00000000..25fb00f9 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/procedures/complete_node/procedure.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_private/procedures/complete_node/procedure + + +DROP FUNCTION "constructive_fbp_private".complete_node; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/procedures/copy_subtree/procedure.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/procedures/copy_subtree/procedure.sql new file mode 100644 index 00000000..06d812b0 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/procedures/copy_subtree/procedure.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_private/procedures/copy_subtree/procedure + + +DROP FUNCTION "constructive_fbp_private".copy_subtree; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/procedures/deserialize_graph/procedure.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/procedures/deserialize_graph/procedure.sql new file mode 100644 index 00000000..7964dcd2 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/procedures/deserialize_graph/procedure.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_private/procedures/deserialize_graph/procedure + + +DROP FUNCTION "constructive_fbp_private".deserialize_graph; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/procedures/graph_object_hash_uuid/procedure.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/procedures/graph_object_hash_uuid/procedure.sql new file mode 100644 index 00000000..9eb72376 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/procedures/graph_object_hash_uuid/procedure.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_private/procedures/graph_object_hash_uuid/procedure + + +DROP FUNCTION "constructive_fbp_private".graph_object_hash_uuid; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/procedures/insert_subnet_nodes/procedure.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/procedures/insert_subnet_nodes/procedure.sql new file mode 100644 index 00000000..e8b7c15d --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/procedures/insert_subnet_nodes/procedure.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_private/procedures/insert_subnet_nodes/procedure + + +DROP FUNCTION "constructive_fbp_private".insert_subnet_nodes; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/procedures/serialize_graph/procedure.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/procedures/serialize_graph/procedure.sql new file mode 100644 index 00000000..3ad138db --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/procedures/serialize_graph/procedure.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_private/procedures/serialize_graph/procedure + + +DROP FUNCTION "constructive_fbp_private".serialize_graph; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/procedures/tick_execution/procedure.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/procedures/tick_execution/procedure.sql new file mode 100644 index 00000000..621b9b03 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/procedures/tick_execution/procedure.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_private/procedures/tick_execution/procedure + + +DROP FUNCTION "constructive_fbp_private".tick_execution; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/schema.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/schema.sql new file mode 100644 index 00000000..3d80f89c --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/schema.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_private/schema + + +DROP SCHEMA "constructive_fbp_private" CASCADE; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/alterations/alt0000000001.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/alterations/alt0000000001.sql new file mode 100644 index 00000000..b03fda7f --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/alterations/alt0000000001.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/alterations/alt0000000001 + + +ALTER TABLE "constructive_fbp_private".function_graph_execution_outputs + ENABLE ROW LEVEL SECURITY; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/alterations/alt0000000002.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/alterations/alt0000000002.sql new file mode 100644 index 00000000..0fa6677f --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/alterations/alt0000000002.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/alterations/alt0000000002 + + +COMMENT ON TABLE "constructive_fbp_private".function_graph_execution_outputs IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/created_at/alterations/alt0000000003.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/created_at/alterations/alt0000000003.sql new file mode 100644 index 00000000..f38e8a59 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/created_at/alterations/alt0000000003.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/created_at/alterations/alt0000000003 + + +COMMENT ON COLUMN "constructive_fbp_private".function_graph_execution_outputs.created_at IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/created_at/column.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/created_at/column.sql new file mode 100644 index 00000000..908082b3 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/created_at/column.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/created_at/column + + + + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/data/alterations/alt0000000004.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/data/alterations/alt0000000004.sql new file mode 100644 index 00000000..c5898f18 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/data/alterations/alt0000000004.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/data/alterations/alt0000000004 + + +ALTER TABLE "constructive_fbp_private".function_graph_execution_outputs + ALTER COLUMN data DROP NOT NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/data/alterations/alt0000000005.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/data/alterations/alt0000000005.sql new file mode 100644 index 00000000..e14aa6c4 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/data/alterations/alt0000000005.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/data/alterations/alt0000000005 + + +COMMENT ON COLUMN "constructive_fbp_private".function_graph_execution_outputs.data IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/data/column.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/data/column.sql new file mode 100644 index 00000000..bf01949d --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/data/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/data/column + + +ALTER TABLE "constructive_fbp_private".function_graph_execution_outputs + DROP COLUMN data RESTRICT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/database_id/alterations/alt0000000006.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/database_id/alterations/alt0000000006.sql new file mode 100644 index 00000000..54020767 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/database_id/alterations/alt0000000006.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/database_id/alterations/alt0000000006 + + +ALTER TABLE "constructive_fbp_private".function_graph_execution_outputs + ALTER COLUMN database_id DROP NOT NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/database_id/alterations/alt0000000007.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/database_id/alterations/alt0000000007.sql new file mode 100644 index 00000000..5aca57e8 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/database_id/alterations/alt0000000007.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/database_id/alterations/alt0000000007 + + +COMMENT ON COLUMN "constructive_fbp_private".function_graph_execution_outputs.database_id IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/database_id/column.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/database_id/column.sql new file mode 100644 index 00000000..777192fd --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/database_id/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/database_id/column + + +ALTER TABLE "constructive_fbp_private".function_graph_execution_outputs + DROP COLUMN database_id RESTRICT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/hash/alterations/alt0000000008.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/hash/alterations/alt0000000008.sql new file mode 100644 index 00000000..10f6508d --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/hash/alterations/alt0000000008.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/hash/alterations/alt0000000008 + + +ALTER TABLE "constructive_fbp_private".function_graph_execution_outputs + ALTER COLUMN hash DROP NOT NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/hash/alterations/alt0000000009.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/hash/alterations/alt0000000009.sql new file mode 100644 index 00000000..cac393d8 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/hash/alterations/alt0000000009.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/hash/alterations/alt0000000009 + + +COMMENT ON COLUMN "constructive_fbp_private".function_graph_execution_outputs.hash IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/hash/column.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/hash/column.sql new file mode 100644 index 00000000..c4507889 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/hash/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/hash/column + + +ALTER TABLE "constructive_fbp_private".function_graph_execution_outputs + DROP COLUMN hash RESTRICT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/id/alterations/alt0000000010.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/id/alterations/alt0000000010.sql new file mode 100644 index 00000000..dd2facd8 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/id/alterations/alt0000000010.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/id/alterations/alt0000000010 + + +ALTER TABLE "constructive_fbp_private".function_graph_execution_outputs + ALTER COLUMN id DROP NOT NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/id/alterations/alt0000000011.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/id/alterations/alt0000000011.sql new file mode 100644 index 00000000..812003a7 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/id/alterations/alt0000000011.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/id/alterations/alt0000000011 + + +ALTER TABLE "constructive_fbp_private".function_graph_execution_outputs + ALTER COLUMN id DROP DEFAULT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/id/alterations/alt0000000012.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/id/alterations/alt0000000012.sql new file mode 100644 index 00000000..6089620b --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/id/alterations/alt0000000012.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/id/alterations/alt0000000012 + + +COMMENT ON COLUMN "constructive_fbp_private".function_graph_execution_outputs.id IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/id/column.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/id/column.sql new file mode 100644 index 00000000..1f11457b --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/id/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/id/column + + +ALTER TABLE "constructive_fbp_private".function_graph_execution_outputs + DROP COLUMN id RESTRICT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/constraints/function_graph_execution_outputs_pkey/constraint.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/constraints/function_graph_execution_outputs_pkey/constraint.sql new file mode 100644 index 00000000..c18e188e --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/constraints/function_graph_execution_outputs_pkey/constraint.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/constraints/function_graph_execution_outputs_pkey/constraint + + +ALTER TABLE "constructive_fbp_private".function_graph_execution_outputs + DROP CONSTRAINT function_graph_execution_outputs_pkey; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/indexes/idx_function_graph_execution_outputs_unique_hash.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/indexes/idx_function_graph_execution_outputs_unique_hash.sql new file mode 100644 index 00000000..f53fc72d --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/indexes/idx_function_graph_execution_outputs_unique_hash.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/indexes/idx_function_graph_execution_outputs_unique_hash + + +DROP INDEX "constructive_fbp_private".idx_function_graph_execution_outputs_unique_hash; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/table.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/table.sql new file mode 100644 index 00000000..fa2035e9 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/table.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/table + + +DROP TABLE "constructive_fbp_private".function_graph_execution_outputs CASCADE; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/alterations/alt0000000013.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/alterations/alt0000000013.sql new file mode 100644 index 00000000..48c425f0 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/alterations/alt0000000013.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/alterations/alt0000000013 + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + ENABLE ROW LEVEL SECURITY; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/alterations/alt0000000014.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/alterations/alt0000000014.sql new file mode 100644 index 00000000..23742c28 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/alterations/alt0000000014.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/alterations/alt0000000014 + + +COMMENT ON TABLE "constructive_fbp_private".function_graph_executions IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/completed_at/alterations/alt0000000015.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/completed_at/alterations/alt0000000015.sql new file mode 100644 index 00000000..dde27ebb --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/completed_at/alterations/alt0000000015.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/columns/completed_at/alterations/alt0000000015 + + +COMMENT ON COLUMN "constructive_fbp_private".function_graph_executions.completed_at IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/completed_at/column.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/completed_at/column.sql new file mode 100644 index 00000000..53564251 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/completed_at/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/columns/completed_at/column + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + DROP COLUMN completed_at RESTRICT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/current_wave/alterations/alt0000000016.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/current_wave/alterations/alt0000000016.sql new file mode 100644 index 00000000..38fc7bb3 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/current_wave/alterations/alt0000000016.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/columns/current_wave/alterations/alt0000000016 + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + ALTER COLUMN current_wave DROP NOT NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/current_wave/alterations/alt0000000017.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/current_wave/alterations/alt0000000017.sql new file mode 100644 index 00000000..e9a2a570 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/current_wave/alterations/alt0000000017.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/columns/current_wave/alterations/alt0000000017 + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + ALTER COLUMN current_wave DROP DEFAULT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/current_wave/alterations/alt0000000018.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/current_wave/alterations/alt0000000018.sql new file mode 100644 index 00000000..4a7df15c --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/current_wave/alterations/alt0000000018.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/columns/current_wave/alterations/alt0000000018 + + +COMMENT ON COLUMN "constructive_fbp_private".function_graph_executions.current_wave IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/current_wave/column.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/current_wave/column.sql new file mode 100644 index 00000000..a5f20e6c --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/current_wave/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/columns/current_wave/column + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + DROP COLUMN current_wave RESTRICT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/database_id/alterations/alt0000000019.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/database_id/alterations/alt0000000019.sql new file mode 100644 index 00000000..81d22c57 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/database_id/alterations/alt0000000019.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/columns/database_id/alterations/alt0000000019 + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + ALTER COLUMN database_id DROP NOT NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/database_id/alterations/alt0000000020.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/database_id/alterations/alt0000000020.sql new file mode 100644 index 00000000..7748907a --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/database_id/alterations/alt0000000020.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/columns/database_id/alterations/alt0000000020 + + +COMMENT ON COLUMN "constructive_fbp_private".function_graph_executions.database_id IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/database_id/column.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/database_id/column.sql new file mode 100644 index 00000000..089c931b --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/database_id/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/columns/database_id/column + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + DROP COLUMN database_id RESTRICT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/definitions_commit_id/alterations/alt0000000021.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/definitions_commit_id/alterations/alt0000000021.sql new file mode 100644 index 00000000..0fd2e67f --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/definitions_commit_id/alterations/alt0000000021.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/columns/definitions_commit_id/alterations/alt0000000021 + + +COMMENT ON COLUMN "constructive_fbp_private".function_graph_executions.definitions_commit_id IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/definitions_commit_id/column.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/definitions_commit_id/column.sql new file mode 100644 index 00000000..68e421f1 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/definitions_commit_id/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/columns/definitions_commit_id/column + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + DROP COLUMN definitions_commit_id RESTRICT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/entity_id/alterations/alt0000000022.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/entity_id/alterations/alt0000000022.sql new file mode 100644 index 00000000..24b66e12 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/entity_id/alterations/alt0000000022.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/columns/entity_id/alterations/alt0000000022 + + +COMMENT ON COLUMN "constructive_fbp_private".function_graph_executions.entity_id IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/entity_id/column.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/entity_id/column.sql new file mode 100644 index 00000000..dccbcb23 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/entity_id/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/columns/entity_id/column + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + DROP COLUMN entity_id RESTRICT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/error_code/alterations/alt0000000023.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/error_code/alterations/alt0000000023.sql new file mode 100644 index 00000000..83a580a9 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/error_code/alterations/alt0000000023.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/columns/error_code/alterations/alt0000000023 + + +COMMENT ON COLUMN "constructive_fbp_private".function_graph_executions.error_code IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/error_code/column.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/error_code/column.sql new file mode 100644 index 00000000..a5c6c2b9 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/error_code/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/columns/error_code/column + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + DROP COLUMN error_code RESTRICT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/error_message/alterations/alt0000000024.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/error_message/alterations/alt0000000024.sql new file mode 100644 index 00000000..27a54b5d --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/error_message/alterations/alt0000000024.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/columns/error_message/alterations/alt0000000024 + + +COMMENT ON COLUMN "constructive_fbp_private".function_graph_executions.error_message IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/error_message/column.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/error_message/column.sql new file mode 100644 index 00000000..744e4430 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/error_message/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/columns/error_message/column + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + DROP COLUMN error_message RESTRICT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/execution_plan/alterations/alt0000000025.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/execution_plan/alterations/alt0000000025.sql new file mode 100644 index 00000000..fc848ce3 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/execution_plan/alterations/alt0000000025.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/columns/execution_plan/alterations/alt0000000025 + + +COMMENT ON COLUMN "constructive_fbp_private".function_graph_executions.execution_plan IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/execution_plan/column.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/execution_plan/column.sql new file mode 100644 index 00000000..b32c451d --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/execution_plan/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/columns/execution_plan/column + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + DROP COLUMN execution_plan RESTRICT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/graph_id/alterations/alt0000000026.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/graph_id/alterations/alt0000000026.sql new file mode 100644 index 00000000..b5ff4b03 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/graph_id/alterations/alt0000000026.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/columns/graph_id/alterations/alt0000000026 + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + ALTER COLUMN graph_id DROP NOT NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/graph_id/alterations/alt0000000027.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/graph_id/alterations/alt0000000027.sql new file mode 100644 index 00000000..a91a532f --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/graph_id/alterations/alt0000000027.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/columns/graph_id/alterations/alt0000000027 + + +COMMENT ON COLUMN "constructive_fbp_private".function_graph_executions.graph_id IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/graph_id/column.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/graph_id/column.sql new file mode 100644 index 00000000..ba15067b --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/graph_id/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/columns/graph_id/column + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + DROP COLUMN graph_id RESTRICT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/id/alterations/alt0000000028.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/id/alterations/alt0000000028.sql new file mode 100644 index 00000000..f0ef9ca8 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/id/alterations/alt0000000028.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/columns/id/alterations/alt0000000028 + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + ALTER COLUMN id DROP NOT NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/id/alterations/alt0000000029.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/id/alterations/alt0000000029.sql new file mode 100644 index 00000000..e36bb29a --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/id/alterations/alt0000000029.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/columns/id/alterations/alt0000000029 + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + ALTER COLUMN id DROP DEFAULT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/id/alterations/alt0000000030.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/id/alterations/alt0000000030.sql new file mode 100644 index 00000000..e76c448c --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/id/alterations/alt0000000030.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/columns/id/alterations/alt0000000030 + + +COMMENT ON COLUMN "constructive_fbp_private".function_graph_executions.id IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/id/column.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/id/column.sql new file mode 100644 index 00000000..b82315e5 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/id/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/columns/id/column + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + DROP COLUMN id RESTRICT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/input_payload/alterations/alt0000000031.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/input_payload/alterations/alt0000000031.sql new file mode 100644 index 00000000..2619cebd --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/input_payload/alterations/alt0000000031.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/columns/input_payload/alterations/alt0000000031 + + +COMMENT ON COLUMN "constructive_fbp_private".function_graph_executions.input_payload IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/input_payload/column.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/input_payload/column.sql new file mode 100644 index 00000000..7dee7e1b --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/input_payload/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/columns/input_payload/column + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + DROP COLUMN input_payload RESTRICT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/invocation_id/alterations/alt0000000032.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/invocation_id/alterations/alt0000000032.sql new file mode 100644 index 00000000..3fd3716d --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/invocation_id/alterations/alt0000000032.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/columns/invocation_id/alterations/alt0000000032 + + +COMMENT ON COLUMN "constructive_fbp_private".function_graph_executions.invocation_id IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/invocation_id/column.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/invocation_id/column.sql new file mode 100644 index 00000000..c0bdb9cd --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/invocation_id/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/columns/invocation_id/column + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + DROP COLUMN invocation_id RESTRICT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_pending_jobs/alterations/alt0000000033.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_pending_jobs/alterations/alt0000000033.sql new file mode 100644 index 00000000..9768f697 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_pending_jobs/alterations/alt0000000033.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_pending_jobs/alterations/alt0000000033 + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + ALTER COLUMN max_pending_jobs DROP NOT NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_pending_jobs/alterations/alt0000000034.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_pending_jobs/alterations/alt0000000034.sql new file mode 100644 index 00000000..0935ef4e --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_pending_jobs/alterations/alt0000000034.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_pending_jobs/alterations/alt0000000034 + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + ALTER COLUMN max_pending_jobs DROP DEFAULT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_pending_jobs/alterations/alt0000000035.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_pending_jobs/alterations/alt0000000035.sql new file mode 100644 index 00000000..f15de76e --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_pending_jobs/alterations/alt0000000035.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_pending_jobs/alterations/alt0000000035 + + +COMMENT ON COLUMN "constructive_fbp_private".function_graph_executions.max_pending_jobs IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_pending_jobs/column.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_pending_jobs/column.sql new file mode 100644 index 00000000..888488a5 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_pending_jobs/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_pending_jobs/column + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + DROP COLUMN max_pending_jobs RESTRICT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_ticks/alterations/alt0000000036.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_ticks/alterations/alt0000000036.sql new file mode 100644 index 00000000..2dbe11d1 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_ticks/alterations/alt0000000036.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_ticks/alterations/alt0000000036 + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + ALTER COLUMN max_ticks DROP NOT NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_ticks/alterations/alt0000000037.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_ticks/alterations/alt0000000037.sql new file mode 100644 index 00000000..a64dcf55 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_ticks/alterations/alt0000000037.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_ticks/alterations/alt0000000037 + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + ALTER COLUMN max_ticks DROP DEFAULT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_ticks/alterations/alt0000000038.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_ticks/alterations/alt0000000038.sql new file mode 100644 index 00000000..87310ee8 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_ticks/alterations/alt0000000038.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_ticks/alterations/alt0000000038 + + +COMMENT ON COLUMN "constructive_fbp_private".function_graph_executions.max_ticks IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_ticks/column.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_ticks/column.sql new file mode 100644 index 00000000..a78b8ca8 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_ticks/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_ticks/column + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + DROP COLUMN max_ticks RESTRICT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/node_outputs/alterations/alt0000000039.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/node_outputs/alterations/alt0000000039.sql new file mode 100644 index 00000000..368b00a0 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/node_outputs/alterations/alt0000000039.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/columns/node_outputs/alterations/alt0000000039 + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + ALTER COLUMN node_outputs DROP NOT NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/node_outputs/alterations/alt0000000040.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/node_outputs/alterations/alt0000000040.sql new file mode 100644 index 00000000..c1b390aa --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/node_outputs/alterations/alt0000000040.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/columns/node_outputs/alterations/alt0000000040 + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + ALTER COLUMN node_outputs DROP DEFAULT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/node_outputs/alterations/alt0000000041.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/node_outputs/alterations/alt0000000041.sql new file mode 100644 index 00000000..7870eec4 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/node_outputs/alterations/alt0000000041.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/columns/node_outputs/alterations/alt0000000041 + + +COMMENT ON COLUMN "constructive_fbp_private".function_graph_executions.node_outputs IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/node_outputs/column.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/node_outputs/column.sql new file mode 100644 index 00000000..2db6de43 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/node_outputs/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/columns/node_outputs/column + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + DROP COLUMN node_outputs RESTRICT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_node/alterations/alt0000000042.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_node/alterations/alt0000000042.sql new file mode 100644 index 00000000..8922061d --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_node/alterations/alt0000000042.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_node/alterations/alt0000000042 + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + ALTER COLUMN output_node DROP NOT NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_node/alterations/alt0000000043.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_node/alterations/alt0000000043.sql new file mode 100644 index 00000000..117857b7 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_node/alterations/alt0000000043.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_node/alterations/alt0000000043 + + +COMMENT ON COLUMN "constructive_fbp_private".function_graph_executions.output_node IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_node/column.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_node/column.sql new file mode 100644 index 00000000..e44be809 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_node/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_node/column + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + DROP COLUMN output_node RESTRICT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_payload/alterations/alt0000000044.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_payload/alterations/alt0000000044.sql new file mode 100644 index 00000000..0da194c3 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_payload/alterations/alt0000000044.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_payload/alterations/alt0000000044 + + +COMMENT ON COLUMN "constructive_fbp_private".function_graph_executions.output_payload IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_payload/column.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_payload/column.sql new file mode 100644 index 00000000..b9288cb1 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_payload/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_payload/column + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + DROP COLUMN output_payload RESTRICT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_port/alterations/alt0000000045.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_port/alterations/alt0000000045.sql new file mode 100644 index 00000000..0817eef9 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_port/alterations/alt0000000045.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_port/alterations/alt0000000045 + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + ALTER COLUMN output_port DROP NOT NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_port/alterations/alt0000000046.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_port/alterations/alt0000000046.sql new file mode 100644 index 00000000..c27e49ed --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_port/alterations/alt0000000046.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_port/alterations/alt0000000046 + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + ALTER COLUMN output_port DROP DEFAULT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_port/alterations/alt0000000047.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_port/alterations/alt0000000047.sql new file mode 100644 index 00000000..20c9f761 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_port/alterations/alt0000000047.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_port/alterations/alt0000000047 + + +COMMENT ON COLUMN "constructive_fbp_private".function_graph_executions.output_port IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_port/column.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_port/column.sql new file mode 100644 index 00000000..6da39374 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_port/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_port/column + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + DROP COLUMN output_port RESTRICT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/parent_execution_id/alterations/alt0000000048.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/parent_execution_id/alterations/alt0000000048.sql new file mode 100644 index 00000000..213c8dce --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/parent_execution_id/alterations/alt0000000048.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/columns/parent_execution_id/alterations/alt0000000048 + + +COMMENT ON COLUMN "constructive_fbp_private".function_graph_executions.parent_execution_id IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/parent_execution_id/column.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/parent_execution_id/column.sql new file mode 100644 index 00000000..7c135c57 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/parent_execution_id/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/columns/parent_execution_id/column + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + DROP COLUMN parent_execution_id RESTRICT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/parent_node_name/alterations/alt0000000049.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/parent_node_name/alterations/alt0000000049.sql new file mode 100644 index 00000000..be864876 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/parent_node_name/alterations/alt0000000049.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/columns/parent_node_name/alterations/alt0000000049 + + +COMMENT ON COLUMN "constructive_fbp_private".function_graph_executions.parent_node_name IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/parent_node_name/column.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/parent_node_name/column.sql new file mode 100644 index 00000000..6b47ec69 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/parent_node_name/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/columns/parent_node_name/column + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + DROP COLUMN parent_node_name RESTRICT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/started_at/alterations/alt0000000050.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/started_at/alterations/alt0000000050.sql new file mode 100644 index 00000000..f13fc86f --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/started_at/alterations/alt0000000050.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/columns/started_at/alterations/alt0000000050 + + +COMMENT ON COLUMN "constructive_fbp_private".function_graph_executions.started_at IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/started_at/column.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/started_at/column.sql new file mode 100644 index 00000000..c4a2fb51 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/started_at/column.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/columns/started_at/column + + + + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/alterations/alt0000000051.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/alterations/alt0000000051.sql new file mode 100644 index 00000000..a5ad1560 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/alterations/alt0000000051.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/alterations/alt0000000051 + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + ALTER COLUMN status DROP NOT NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/alterations/alt0000000052.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/alterations/alt0000000052.sql new file mode 100644 index 00000000..07b5e8d7 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/alterations/alt0000000052.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/alterations/alt0000000052 + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + ALTER COLUMN status DROP DEFAULT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/alterations/alt0000000053.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/alterations/alt0000000053.sql new file mode 100644 index 00000000..62f1563b --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/alterations/alt0000000053.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/alterations/alt0000000053 + + +COMMENT ON COLUMN "constructive_fbp_private".function_graph_executions.status IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/alterations/alt0000000054.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/alterations/alt0000000054.sql new file mode 100644 index 00000000..3d83a908 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/alterations/alt0000000054.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/alterations/alt0000000054 + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + DROP CONSTRAINT function_graph_executions_status_chk; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/column.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/column.sql new file mode 100644 index 00000000..e3b2f812 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/column + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + DROP COLUMN status RESTRICT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/tick_count/alterations/alt0000000055.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/tick_count/alterations/alt0000000055.sql new file mode 100644 index 00000000..6e704293 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/tick_count/alterations/alt0000000055.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/columns/tick_count/alterations/alt0000000055 + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + ALTER COLUMN tick_count DROP NOT NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/tick_count/alterations/alt0000000056.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/tick_count/alterations/alt0000000056.sql new file mode 100644 index 00000000..d346084c --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/tick_count/alterations/alt0000000056.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/columns/tick_count/alterations/alt0000000056 + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + ALTER COLUMN tick_count DROP DEFAULT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/tick_count/alterations/alt0000000057.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/tick_count/alterations/alt0000000057.sql new file mode 100644 index 00000000..1adf1d2e --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/tick_count/alterations/alt0000000057.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/columns/tick_count/alterations/alt0000000057 + + +COMMENT ON COLUMN "constructive_fbp_private".function_graph_executions.tick_count IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/tick_count/column.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/tick_count/column.sql new file mode 100644 index 00000000..a51cead0 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/tick_count/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/columns/tick_count/column + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + DROP COLUMN tick_count RESTRICT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/timeout_at/alterations/alt0000000058.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/timeout_at/alterations/alt0000000058.sql new file mode 100644 index 00000000..94bdd036 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/timeout_at/alterations/alt0000000058.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/columns/timeout_at/alterations/alt0000000058 + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + ALTER COLUMN timeout_at DROP NOT NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/timeout_at/alterations/alt0000000059.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/timeout_at/alterations/alt0000000059.sql new file mode 100644 index 00000000..1851fac3 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/timeout_at/alterations/alt0000000059.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/columns/timeout_at/alterations/alt0000000059 + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + ALTER COLUMN timeout_at DROP DEFAULT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/timeout_at/alterations/alt0000000060.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/timeout_at/alterations/alt0000000060.sql new file mode 100644 index 00000000..8990e13d --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/timeout_at/alterations/alt0000000060.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/columns/timeout_at/alterations/alt0000000060 + + +COMMENT ON COLUMN "constructive_fbp_private".function_graph_executions.timeout_at IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/timeout_at/column.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/timeout_at/column.sql new file mode 100644 index 00000000..33eed492 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/columns/timeout_at/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/columns/timeout_at/column + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + DROP COLUMN timeout_at RESTRICT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/constraints/function_graph_executions_graph_id_fkey/constraint.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/constraints/function_graph_executions_graph_id_fkey/constraint.sql new file mode 100644 index 00000000..f997e84a --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/constraints/function_graph_executions_graph_id_fkey/constraint.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/constraints/function_graph_executions_graph_id_fkey/constraint + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + DROP CONSTRAINT function_graph_executions_graph_id_fkey; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/constraints/function_graph_executions_pkey/constraint.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/constraints/function_graph_executions_pkey/constraint.sql new file mode 100644 index 00000000..d3e85d81 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/constraints/function_graph_executions_pkey/constraint.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/constraints/function_graph_executions_pkey/constraint + + +ALTER TABLE "constructive_fbp_private".function_graph_executions + DROP CONSTRAINT function_graph_executions_pkey; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/table.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/table.sql new file mode 100644 index 00000000..d1e035ec --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/tables/function_graph_executions/table.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_private/tables/function_graph_executions/table + + +DROP TABLE "constructive_fbp_private".function_graph_executions CASCADE; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/trigger_fns/tg_graph_object_generate_id_hash.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/trigger_fns/tg_graph_object_generate_id_hash.sql new file mode 100644 index 00000000..85adf11e --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_private/trigger_fns/tg_graph_object_generate_id_hash.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_private/trigger_fns/tg_graph_object_generate_id_hash + + +DROP FUNCTION "constructive_fbp_private".tg_graph_object_generate_id_hash; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/procedures/add_edge/procedure.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/procedures/add_edge/procedure.sql new file mode 100644 index 00000000..6d82d945 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/procedures/add_edge/procedure.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_public/procedures/add_edge/procedure + + +DROP FUNCTION "constructive_fbp_public".add_edge; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/procedures/add_edge_and_save/procedure.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/procedures/add_edge_and_save/procedure.sql new file mode 100644 index 00000000..b3888ca1 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/procedures/add_edge_and_save/procedure.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_public/procedures/add_edge_and_save/procedure + + +DROP FUNCTION "constructive_fbp_public".add_edge_and_save; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/procedures/add_node/procedure.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/procedures/add_node/procedure.sql new file mode 100644 index 00000000..adddff7e --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/procedures/add_node/procedure.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_public/procedures/add_node/procedure + + +DROP FUNCTION "constructive_fbp_public".add_node; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/procedures/add_node_and_save/procedure.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/procedures/add_node_and_save/procedure.sql new file mode 100644 index 00000000..287fab58 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/procedures/add_node_and_save/procedure.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_public/procedures/add_node_and_save/procedure + + +DROP FUNCTION "constructive_fbp_public".add_node_and_save; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/procedures/copy_graph/procedure.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/procedures/copy_graph/procedure.sql new file mode 100644 index 00000000..c1bbba2d --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/procedures/copy_graph/procedure.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_public/procedures/copy_graph/procedure + + +DROP FUNCTION "constructive_fbp_public".copy_graph; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/procedures/create_function_graph/procedure.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/procedures/create_function_graph/procedure.sql new file mode 100644 index 00000000..ca362756 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/procedures/create_function_graph/procedure.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_public/procedures/create_function_graph/procedure + + +DROP FUNCTION "constructive_fbp_public".create_function_graph; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/procedures/graph_get_all/procedure.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/procedures/graph_get_all/procedure.sql new file mode 100644 index 00000000..e03e2250 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/procedures/graph_get_all/procedure.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_public/procedures/graph_get_all/procedure + + +DROP FUNCTION "constructive_fbp_public".graph_get_all; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/procedures/graph_get_node_at_path/procedure.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/procedures/graph_get_node_at_path/procedure.sql new file mode 100644 index 00000000..6ada4b34 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/procedures/graph_get_node_at_path/procedure.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_public/procedures/graph_get_node_at_path/procedure + + +DROP FUNCTION "constructive_fbp_public".graph_get_node_at_path; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/procedures/graph_init_empty_repo/procedure.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/procedures/graph_init_empty_repo/procedure.sql new file mode 100644 index 00000000..ebc5ccc3 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/procedures/graph_init_empty_repo/procedure.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_public/procedures/graph_init_empty_repo/procedure + + +DROP FUNCTION "constructive_fbp_public".graph_init_empty_repo; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/procedures/graph_insert_node_at_path/procedure.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/procedures/graph_insert_node_at_path/procedure.sql new file mode 100644 index 00000000..d1931fe5 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/procedures/graph_insert_node_at_path/procedure.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_public/procedures/graph_insert_node_at_path/procedure + + +DROP FUNCTION "constructive_fbp_public".graph_insert_node_at_path; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/procedures/graph_set_data_at_path/procedure.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/procedures/graph_set_data_at_path/procedure.sql new file mode 100644 index 00000000..4341a3f1 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/procedures/graph_set_data_at_path/procedure.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_public/procedures/graph_set_data_at_path/procedure + + +DROP FUNCTION "constructive_fbp_public".graph_set_data_at_path; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/procedures/import_definitions/procedure.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/procedures/import_definitions/procedure.sql new file mode 100644 index 00000000..932429af --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/procedures/import_definitions/procedure.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_public/procedures/import_definitions/procedure + + +DROP FUNCTION "constructive_fbp_public".import_definitions; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/procedures/import_graph_json/procedure.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/procedures/import_graph_json/procedure.sql new file mode 100644 index 00000000..3faee4e5 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/procedures/import_graph_json/procedure.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_public/procedures/import_graph_json/procedure + + +DROP FUNCTION "constructive_fbp_public".import_graph_json; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/procedures/read_function_graph/procedure.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/procedures/read_function_graph/procedure.sql new file mode 100644 index 00000000..b669582e --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/procedures/read_function_graph/procedure.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_public/procedures/read_function_graph/procedure + + +DROP FUNCTION "constructive_fbp_public".read_function_graph; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/procedures/save_graph/procedure.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/procedures/save_graph/procedure.sql new file mode 100644 index 00000000..20307a09 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/procedures/save_graph/procedure.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_public/procedures/save_graph/procedure + + +DROP FUNCTION "constructive_fbp_public".save_graph; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/procedures/start_execution/procedure.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/procedures/start_execution/procedure.sql new file mode 100644 index 00000000..fe2a3328 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/procedures/start_execution/procedure.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_public/procedures/start_execution/procedure + + +DROP FUNCTION "constructive_fbp_public".start_execution; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/procedures/validate_function_graph/procedure.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/procedures/validate_function_graph/procedure.sql new file mode 100644 index 00000000..094eb3c1 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/procedures/validate_function_graph/procedure.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_public/procedures/validate_function_graph/procedure + + +DROP FUNCTION "constructive_fbp_public".validate_function_graph; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/schema.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/schema.sql new file mode 100644 index 00000000..0808a485 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/schema.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_public/schema + + +DROP SCHEMA "constructive_fbp_public" CASCADE; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/alterations/alt0000000061.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/alterations/alt0000000061.sql new file mode 100644 index 00000000..e0ca5ffe --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/alterations/alt0000000061.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/function_graphs/alterations/alt0000000061 + + +ALTER TABLE "constructive_fbp_public".function_graphs + ENABLE ROW LEVEL SECURITY; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/alterations/alt0000000062.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/alterations/alt0000000062.sql new file mode 100644 index 00000000..96adacb2 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/alterations/alt0000000062.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_public/tables/function_graphs/alterations/alt0000000062 + + +COMMENT ON TABLE "constructive_fbp_public".function_graphs IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/context/alterations/alt0000000063.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/context/alterations/alt0000000063.sql new file mode 100644 index 00000000..0343089e --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/context/alterations/alt0000000063.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/function_graphs/columns/context/alterations/alt0000000063 + + +ALTER TABLE "constructive_fbp_public".function_graphs + ALTER COLUMN context DROP NOT NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/context/alterations/alt0000000064.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/context/alterations/alt0000000064.sql new file mode 100644 index 00000000..8eed1486 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/context/alterations/alt0000000064.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/function_graphs/columns/context/alterations/alt0000000064 + + +ALTER TABLE "constructive_fbp_public".function_graphs + ALTER COLUMN context DROP DEFAULT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/context/alterations/alt0000000065.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/context/alterations/alt0000000065.sql new file mode 100644 index 00000000..9b2a6869 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/context/alterations/alt0000000065.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_public/tables/function_graphs/columns/context/alterations/alt0000000065 + + +COMMENT ON COLUMN "constructive_fbp_public".function_graphs.context IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/context/column.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/context/column.sql new file mode 100644 index 00000000..e2e16081 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/context/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/function_graphs/columns/context/column + + +ALTER TABLE "constructive_fbp_public".function_graphs + DROP COLUMN context RESTRICT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/created_at/alterations/alt0000000066.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/created_at/alterations/alt0000000066.sql new file mode 100644 index 00000000..55c8ae01 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/created_at/alterations/alt0000000066.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/function_graphs/columns/created_at/alterations/alt0000000066 + + +ALTER TABLE "constructive_fbp_public".function_graphs + ALTER COLUMN created_at DROP NOT NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/created_at/alterations/alt0000000067.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/created_at/alterations/alt0000000067.sql new file mode 100644 index 00000000..c77296dc --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/created_at/alterations/alt0000000067.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/function_graphs/columns/created_at/alterations/alt0000000067 + + +ALTER TABLE "constructive_fbp_public".function_graphs + ALTER COLUMN created_at DROP DEFAULT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/created_at/alterations/alt0000000068.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/created_at/alterations/alt0000000068.sql new file mode 100644 index 00000000..b1fdadd4 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/created_at/alterations/alt0000000068.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_public/tables/function_graphs/columns/created_at/alterations/alt0000000068 + + +COMMENT ON COLUMN "constructive_fbp_public".function_graphs.created_at IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/created_at/column.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/created_at/column.sql new file mode 100644 index 00000000..af9414a0 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/created_at/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/function_graphs/columns/created_at/column + + +ALTER TABLE "constructive_fbp_public".function_graphs + DROP COLUMN created_at RESTRICT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/created_by/alterations/alt0000000069.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/created_by/alterations/alt0000000069.sql new file mode 100644 index 00000000..07552534 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/created_by/alterations/alt0000000069.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_public/tables/function_graphs/columns/created_by/alterations/alt0000000069 + + +COMMENT ON COLUMN "constructive_fbp_public".function_graphs.created_by IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/created_by/column.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/created_by/column.sql new file mode 100644 index 00000000..86a01643 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/created_by/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/function_graphs/columns/created_by/column + + +ALTER TABLE "constructive_fbp_public".function_graphs + DROP COLUMN created_by RESTRICT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/database_id/alterations/alt0000000070.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/database_id/alterations/alt0000000070.sql new file mode 100644 index 00000000..f8468104 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/database_id/alterations/alt0000000070.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/function_graphs/columns/database_id/alterations/alt0000000070 + + +ALTER TABLE "constructive_fbp_public".function_graphs + ALTER COLUMN database_id DROP NOT NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/database_id/alterations/alt0000000071.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/database_id/alterations/alt0000000071.sql new file mode 100644 index 00000000..58b70b08 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/database_id/alterations/alt0000000071.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_public/tables/function_graphs/columns/database_id/alterations/alt0000000071 + + +COMMENT ON COLUMN "constructive_fbp_public".function_graphs.database_id IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/database_id/column.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/database_id/column.sql new file mode 100644 index 00000000..bcee5dcc --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/database_id/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/function_graphs/columns/database_id/column + + +ALTER TABLE "constructive_fbp_public".function_graphs + DROP COLUMN database_id RESTRICT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/definitions_commit_id/alterations/alt0000000072.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/definitions_commit_id/alterations/alt0000000072.sql new file mode 100644 index 00000000..b606ba43 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/definitions_commit_id/alterations/alt0000000072.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_public/tables/function_graphs/columns/definitions_commit_id/alterations/alt0000000072 + + +COMMENT ON COLUMN "constructive_fbp_public".function_graphs.definitions_commit_id IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/definitions_commit_id/column.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/definitions_commit_id/column.sql new file mode 100644 index 00000000..e6de3123 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/definitions_commit_id/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/function_graphs/columns/definitions_commit_id/column + + +ALTER TABLE "constructive_fbp_public".function_graphs + DROP COLUMN definitions_commit_id RESTRICT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/description/alterations/alt0000000073.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/description/alterations/alt0000000073.sql new file mode 100644 index 00000000..50aa1db9 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/description/alterations/alt0000000073.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_public/tables/function_graphs/columns/description/alterations/alt0000000073 + + +COMMENT ON COLUMN "constructive_fbp_public".function_graphs.description IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/description/column.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/description/column.sql new file mode 100644 index 00000000..ac098ce1 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/description/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/function_graphs/columns/description/column + + +ALTER TABLE "constructive_fbp_public".function_graphs + DROP COLUMN description RESTRICT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/entity_id/alterations/alt0000000074.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/entity_id/alterations/alt0000000074.sql new file mode 100644 index 00000000..9ac58998 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/entity_id/alterations/alt0000000074.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_public/tables/function_graphs/columns/entity_id/alterations/alt0000000074 + + +COMMENT ON COLUMN "constructive_fbp_public".function_graphs.entity_id IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/entity_id/column.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/entity_id/column.sql new file mode 100644 index 00000000..ca92a61c --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/entity_id/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/function_graphs/columns/entity_id/column + + +ALTER TABLE "constructive_fbp_public".function_graphs + DROP COLUMN entity_id RESTRICT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/id/alterations/alt0000000075.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/id/alterations/alt0000000075.sql new file mode 100644 index 00000000..395bc8f3 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/id/alterations/alt0000000075.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/function_graphs/columns/id/alterations/alt0000000075 + + +ALTER TABLE "constructive_fbp_public".function_graphs + ALTER COLUMN id DROP NOT NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/id/alterations/alt0000000076.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/id/alterations/alt0000000076.sql new file mode 100644 index 00000000..dca4a058 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/id/alterations/alt0000000076.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/function_graphs/columns/id/alterations/alt0000000076 + + +ALTER TABLE "constructive_fbp_public".function_graphs + ALTER COLUMN id DROP DEFAULT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/id/alterations/alt0000000077.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/id/alterations/alt0000000077.sql new file mode 100644 index 00000000..fbd0ba39 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/id/alterations/alt0000000077.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_public/tables/function_graphs/columns/id/alterations/alt0000000077 + + +COMMENT ON COLUMN "constructive_fbp_public".function_graphs.id IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/id/column.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/id/column.sql new file mode 100644 index 00000000..8fd04496 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/id/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/function_graphs/columns/id/column + + +ALTER TABLE "constructive_fbp_public".function_graphs + DROP COLUMN id RESTRICT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/is_valid/alterations/alt0000000078.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/is_valid/alterations/alt0000000078.sql new file mode 100644 index 00000000..d069d865 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/is_valid/alterations/alt0000000078.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/function_graphs/columns/is_valid/alterations/alt0000000078 + + +ALTER TABLE "constructive_fbp_public".function_graphs + ALTER COLUMN is_valid DROP NOT NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/is_valid/alterations/alt0000000079.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/is_valid/alterations/alt0000000079.sql new file mode 100644 index 00000000..55f21527 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/is_valid/alterations/alt0000000079.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/function_graphs/columns/is_valid/alterations/alt0000000079 + + +ALTER TABLE "constructive_fbp_public".function_graphs + ALTER COLUMN is_valid DROP DEFAULT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/is_valid/alterations/alt0000000080.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/is_valid/alterations/alt0000000080.sql new file mode 100644 index 00000000..b5fc3e75 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/is_valid/alterations/alt0000000080.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_public/tables/function_graphs/columns/is_valid/alterations/alt0000000080 + + +COMMENT ON COLUMN "constructive_fbp_public".function_graphs.is_valid IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/is_valid/column.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/is_valid/column.sql new file mode 100644 index 00000000..cb046f74 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/is_valid/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/function_graphs/columns/is_valid/column + + +ALTER TABLE "constructive_fbp_public".function_graphs + DROP COLUMN is_valid RESTRICT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/name/alterations/alt0000000081.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/name/alterations/alt0000000081.sql new file mode 100644 index 00000000..f42b96a4 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/name/alterations/alt0000000081.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/function_graphs/columns/name/alterations/alt0000000081 + + +ALTER TABLE "constructive_fbp_public".function_graphs + ALTER COLUMN name DROP NOT NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/name/alterations/alt0000000082.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/name/alterations/alt0000000082.sql new file mode 100644 index 00000000..28e12a6a --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/name/alterations/alt0000000082.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_public/tables/function_graphs/columns/name/alterations/alt0000000082 + + +COMMENT ON COLUMN "constructive_fbp_public".function_graphs.name IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/name/column.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/name/column.sql new file mode 100644 index 00000000..f5b727e6 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/name/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/function_graphs/columns/name/column + + +ALTER TABLE "constructive_fbp_public".function_graphs + DROP COLUMN name RESTRICT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/store_id/alterations/alt0000000083.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/store_id/alterations/alt0000000083.sql new file mode 100644 index 00000000..87395973 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/store_id/alterations/alt0000000083.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/function_graphs/columns/store_id/alterations/alt0000000083 + + +ALTER TABLE "constructive_fbp_public".function_graphs + ALTER COLUMN store_id DROP NOT NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/store_id/alterations/alt0000000084.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/store_id/alterations/alt0000000084.sql new file mode 100644 index 00000000..95363f4a --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/store_id/alterations/alt0000000084.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_public/tables/function_graphs/columns/store_id/alterations/alt0000000084 + + +COMMENT ON COLUMN "constructive_fbp_public".function_graphs.store_id IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/store_id/column.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/store_id/column.sql new file mode 100644 index 00000000..9803062a --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/store_id/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/function_graphs/columns/store_id/column + + +ALTER TABLE "constructive_fbp_public".function_graphs + DROP COLUMN store_id RESTRICT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/updated_at/alterations/alt0000000085.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/updated_at/alterations/alt0000000085.sql new file mode 100644 index 00000000..b7f35157 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/updated_at/alterations/alt0000000085.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/function_graphs/columns/updated_at/alterations/alt0000000085 + + +ALTER TABLE "constructive_fbp_public".function_graphs + ALTER COLUMN updated_at DROP NOT NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/updated_at/alterations/alt0000000086.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/updated_at/alterations/alt0000000086.sql new file mode 100644 index 00000000..06bcc2ca --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/updated_at/alterations/alt0000000086.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/function_graphs/columns/updated_at/alterations/alt0000000086 + + +ALTER TABLE "constructive_fbp_public".function_graphs + ALTER COLUMN updated_at DROP DEFAULT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/updated_at/alterations/alt0000000087.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/updated_at/alterations/alt0000000087.sql new file mode 100644 index 00000000..16508f7c --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/updated_at/alterations/alt0000000087.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_public/tables/function_graphs/columns/updated_at/alterations/alt0000000087 + + +COMMENT ON COLUMN "constructive_fbp_public".function_graphs.updated_at IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/updated_at/column.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/updated_at/column.sql new file mode 100644 index 00000000..255a65a9 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/updated_at/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/function_graphs/columns/updated_at/column + + +ALTER TABLE "constructive_fbp_public".function_graphs + DROP COLUMN updated_at RESTRICT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/validation_errors/alterations/alt0000000088.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/validation_errors/alterations/alt0000000088.sql new file mode 100644 index 00000000..3c3a611e --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/validation_errors/alterations/alt0000000088.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_public/tables/function_graphs/columns/validation_errors/alterations/alt0000000088 + + +COMMENT ON COLUMN "constructive_fbp_public".function_graphs.validation_errors IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/validation_errors/column.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/validation_errors/column.sql new file mode 100644 index 00000000..2564de4e --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/columns/validation_errors/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/function_graphs/columns/validation_errors/column + + +ALTER TABLE "constructive_fbp_public".function_graphs + DROP COLUMN validation_errors RESTRICT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/constraints/function_graphs_pkey/constraint.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/constraints/function_graphs_pkey/constraint.sql new file mode 100644 index 00000000..6e718b2f --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/constraints/function_graphs_pkey/constraint.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/function_graphs/constraints/function_graphs_pkey/constraint + + +ALTER TABLE "constructive_fbp_public".function_graphs + DROP CONSTRAINT function_graphs_pkey; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/indexes/idx_function_graphs_unique_name.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/indexes/idx_function_graphs_unique_name.sql new file mode 100644 index 00000000..8b7646f1 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/indexes/idx_function_graphs_unique_name.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_public/tables/function_graphs/indexes/idx_function_graphs_unique_name + + +DROP INDEX "constructive_fbp_public".idx_function_graphs_unique_name; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/table.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/table.sql new file mode 100644 index 00000000..9bf89e75 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/function_graphs/table.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_public/tables/function_graphs/table + + +DROP TABLE "constructive_fbp_public".function_graphs; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/alterations/alt0000000089.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/alterations/alt0000000089.sql new file mode 100644 index 00000000..462ef265 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/alterations/alt0000000089.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_commit/alterations/alt0000000089 + + +ALTER TABLE "constructive_fbp_public".graph_commit + ENABLE ROW LEVEL SECURITY; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/alterations/alt0000000090.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/alterations/alt0000000090.sql new file mode 100644 index 00000000..66749383 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/alterations/alt0000000090.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_commit/alterations/alt0000000090 + + +COMMENT ON TABLE "constructive_fbp_public".graph_commit IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/columns/author_id/alterations/alt0000000091.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/columns/author_id/alterations/alt0000000091.sql new file mode 100644 index 00000000..e50e7836 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/columns/author_id/alterations/alt0000000091.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_commit/columns/author_id/alterations/alt0000000091 + + +COMMENT ON COLUMN "constructive_fbp_public".graph_commit.author_id IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/columns/author_id/column.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/columns/author_id/column.sql new file mode 100644 index 00000000..9bcc5a45 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/columns/author_id/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_commit/columns/author_id/column + + +ALTER TABLE "constructive_fbp_public".graph_commit + DROP COLUMN author_id RESTRICT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/columns/committer_id/alterations/alt0000000092.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/columns/committer_id/alterations/alt0000000092.sql new file mode 100644 index 00000000..1e38d464 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/columns/committer_id/alterations/alt0000000092.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_commit/columns/committer_id/alterations/alt0000000092 + + +COMMENT ON COLUMN "constructive_fbp_public".graph_commit.committer_id IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/columns/committer_id/column.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/columns/committer_id/column.sql new file mode 100644 index 00000000..47aa7475 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/columns/committer_id/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_commit/columns/committer_id/column + + +ALTER TABLE "constructive_fbp_public".graph_commit + DROP COLUMN committer_id RESTRICT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/columns/database_id/alterations/alt0000000093.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/columns/database_id/alterations/alt0000000093.sql new file mode 100644 index 00000000..967d638d --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/columns/database_id/alterations/alt0000000093.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_commit/columns/database_id/alterations/alt0000000093 + + +ALTER TABLE "constructive_fbp_public".graph_commit + ALTER COLUMN database_id DROP NOT NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/columns/database_id/alterations/alt0000000094.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/columns/database_id/alterations/alt0000000094.sql new file mode 100644 index 00000000..cac13d09 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/columns/database_id/alterations/alt0000000094.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_commit/columns/database_id/alterations/alt0000000094 + + +COMMENT ON COLUMN "constructive_fbp_public".graph_commit.database_id IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/columns/database_id/column.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/columns/database_id/column.sql new file mode 100644 index 00000000..d52a37b5 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/columns/database_id/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_commit/columns/database_id/column + + +ALTER TABLE "constructive_fbp_public".graph_commit + DROP COLUMN database_id RESTRICT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/columns/date/alterations/alt0000000095.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/columns/date/alterations/alt0000000095.sql new file mode 100644 index 00000000..e7a8aaa5 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/columns/date/alterations/alt0000000095.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_commit/columns/date/alterations/alt0000000095 + + +ALTER TABLE "constructive_fbp_public".graph_commit + ALTER COLUMN date DROP NOT NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/columns/date/alterations/alt0000000096.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/columns/date/alterations/alt0000000096.sql new file mode 100644 index 00000000..aabd9e15 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/columns/date/alterations/alt0000000096.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_commit/columns/date/alterations/alt0000000096 + + +ALTER TABLE "constructive_fbp_public".graph_commit + ALTER COLUMN date DROP DEFAULT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/columns/date/alterations/alt0000000097.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/columns/date/alterations/alt0000000097.sql new file mode 100644 index 00000000..177b2121 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/columns/date/alterations/alt0000000097.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_commit/columns/date/alterations/alt0000000097 + + +COMMENT ON COLUMN "constructive_fbp_public".graph_commit.date IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/columns/date/column.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/columns/date/column.sql new file mode 100644 index 00000000..db3b8f34 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/columns/date/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_commit/columns/date/column + + +ALTER TABLE "constructive_fbp_public".graph_commit + DROP COLUMN date RESTRICT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/columns/id/alterations/alt0000000098.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/columns/id/alterations/alt0000000098.sql new file mode 100644 index 00000000..07eff11f --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/columns/id/alterations/alt0000000098.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_commit/columns/id/alterations/alt0000000098 + + +ALTER TABLE "constructive_fbp_public".graph_commit + ALTER COLUMN id DROP NOT NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/columns/id/alterations/alt0000000099.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/columns/id/alterations/alt0000000099.sql new file mode 100644 index 00000000..a88df5eb --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/columns/id/alterations/alt0000000099.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_commit/columns/id/alterations/alt0000000099 + + +ALTER TABLE "constructive_fbp_public".graph_commit + ALTER COLUMN id DROP DEFAULT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/columns/id/alterations/alt0000000100.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/columns/id/alterations/alt0000000100.sql new file mode 100644 index 00000000..8646367c --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/columns/id/alterations/alt0000000100.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_commit/columns/id/alterations/alt0000000100 + + +COMMENT ON COLUMN "constructive_fbp_public".graph_commit.id IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/columns/id/column.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/columns/id/column.sql new file mode 100644 index 00000000..8ead6b27 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/columns/id/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_commit/columns/id/column + + +ALTER TABLE "constructive_fbp_public".graph_commit + DROP COLUMN id RESTRICT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/columns/message/alterations/alt0000000101.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/columns/message/alterations/alt0000000101.sql new file mode 100644 index 00000000..12296ba7 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/columns/message/alterations/alt0000000101.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_commit/columns/message/alterations/alt0000000101 + + +COMMENT ON COLUMN "constructive_fbp_public".graph_commit.message IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/columns/message/column.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/columns/message/column.sql new file mode 100644 index 00000000..80e17814 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/columns/message/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_commit/columns/message/column + + +ALTER TABLE "constructive_fbp_public".graph_commit + DROP COLUMN message RESTRICT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/columns/parent_ids/alterations/alt0000000102.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/columns/parent_ids/alterations/alt0000000102.sql new file mode 100644 index 00000000..3ad28f8d --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/columns/parent_ids/alterations/alt0000000102.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_commit/columns/parent_ids/alterations/alt0000000102 + + +COMMENT ON COLUMN "constructive_fbp_public".graph_commit.parent_ids IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/columns/parent_ids/column.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/columns/parent_ids/column.sql new file mode 100644 index 00000000..19b69645 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/columns/parent_ids/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_commit/columns/parent_ids/column + + +ALTER TABLE "constructive_fbp_public".graph_commit + DROP COLUMN parent_ids RESTRICT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/columns/store_id/alterations/alt0000000103.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/columns/store_id/alterations/alt0000000103.sql new file mode 100644 index 00000000..91dad9af --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/columns/store_id/alterations/alt0000000103.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_commit/columns/store_id/alterations/alt0000000103 + + +ALTER TABLE "constructive_fbp_public".graph_commit + ALTER COLUMN store_id DROP NOT NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/columns/store_id/alterations/alt0000000104.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/columns/store_id/alterations/alt0000000104.sql new file mode 100644 index 00000000..167a8dfd --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/columns/store_id/alterations/alt0000000104.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_commit/columns/store_id/alterations/alt0000000104 + + +COMMENT ON COLUMN "constructive_fbp_public".graph_commit.store_id IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/columns/store_id/column.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/columns/store_id/column.sql new file mode 100644 index 00000000..f422c4fa --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/columns/store_id/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_commit/columns/store_id/column + + +ALTER TABLE "constructive_fbp_public".graph_commit + DROP COLUMN store_id RESTRICT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/columns/tree_id/alterations/alt0000000105.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/columns/tree_id/alterations/alt0000000105.sql new file mode 100644 index 00000000..76c7bcd6 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/columns/tree_id/alterations/alt0000000105.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_commit/columns/tree_id/alterations/alt0000000105 + + +COMMENT ON COLUMN "constructive_fbp_public".graph_commit.tree_id IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/columns/tree_id/column.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/columns/tree_id/column.sql new file mode 100644 index 00000000..3eb24c29 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/columns/tree_id/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_commit/columns/tree_id/column + + +ALTER TABLE "constructive_fbp_public".graph_commit + DROP COLUMN tree_id RESTRICT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/constraints/graph_commits_pkey/constraint.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/constraints/graph_commits_pkey/constraint.sql new file mode 100644 index 00000000..a695d10c --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/constraints/graph_commits_pkey/constraint.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_commit/constraints/graph_commits_pkey/constraint + + +ALTER TABLE "constructive_fbp_public".graph_commit + DROP CONSTRAINT graph_commits_pkey; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/table.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/table.sql new file mode 100644 index 00000000..b9bf54d7 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_commit/table.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_commit/table + + +DROP TABLE "constructive_fbp_public".graph_commit; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_object/alterations/alt0000000106.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_object/alterations/alt0000000106.sql new file mode 100644 index 00000000..879a21f1 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_object/alterations/alt0000000106.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_object/alterations/alt0000000106 + + +ALTER TABLE "constructive_fbp_public".graph_object + ENABLE ROW LEVEL SECURITY; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_object/alterations/alt0000000107.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_object/alterations/alt0000000107.sql new file mode 100644 index 00000000..83694a07 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_object/alterations/alt0000000107.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_object/alterations/alt0000000107 + + +COMMENT ON TABLE "constructive_fbp_public".graph_object IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_object/columns/created_at/alterations/alt0000000108.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_object/columns/created_at/alterations/alt0000000108.sql new file mode 100644 index 00000000..337e0c5b --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_object/columns/created_at/alterations/alt0000000108.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_object/columns/created_at/alterations/alt0000000108 + + +ALTER TABLE "constructive_fbp_public".graph_object + ALTER COLUMN created_at DROP DEFAULT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_object/columns/created_at/alterations/alt0000000109.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_object/columns/created_at/alterations/alt0000000109.sql new file mode 100644 index 00000000..f3928f47 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_object/columns/created_at/alterations/alt0000000109.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_object/columns/created_at/alterations/alt0000000109 + + +COMMENT ON COLUMN "constructive_fbp_public".graph_object.created_at IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_object/columns/created_at/column.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_object/columns/created_at/column.sql new file mode 100644 index 00000000..9e835c09 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_object/columns/created_at/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_object/columns/created_at/column + + +ALTER TABLE "constructive_fbp_public".graph_object + DROP COLUMN created_at RESTRICT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_object/columns/data/alterations/alt0000000110.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_object/columns/data/alterations/alt0000000110.sql new file mode 100644 index 00000000..9c1799a9 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_object/columns/data/alterations/alt0000000110.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_object/columns/data/alterations/alt0000000110 + + +COMMENT ON COLUMN "constructive_fbp_public".graph_object.data IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_object/columns/data/column.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_object/columns/data/column.sql new file mode 100644 index 00000000..1228204c --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_object/columns/data/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_object/columns/data/column + + +ALTER TABLE "constructive_fbp_public".graph_object + DROP COLUMN data RESTRICT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_object/columns/database_id/alterations/alt0000000111.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_object/columns/database_id/alterations/alt0000000111.sql new file mode 100644 index 00000000..e7a81525 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_object/columns/database_id/alterations/alt0000000111.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_object/columns/database_id/alterations/alt0000000111 + + +ALTER TABLE "constructive_fbp_public".graph_object + ALTER COLUMN database_id DROP NOT NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_object/columns/database_id/alterations/alt0000000112.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_object/columns/database_id/alterations/alt0000000112.sql new file mode 100644 index 00000000..3cbbaca4 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_object/columns/database_id/alterations/alt0000000112.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_object/columns/database_id/alterations/alt0000000112 + + +COMMENT ON COLUMN "constructive_fbp_public".graph_object.database_id IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_object/columns/database_id/column.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_object/columns/database_id/column.sql new file mode 100644 index 00000000..7910ec11 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_object/columns/database_id/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_object/columns/database_id/column + + +ALTER TABLE "constructive_fbp_public".graph_object + DROP COLUMN database_id RESTRICT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_object/columns/id/alterations/alt0000000113.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_object/columns/id/alterations/alt0000000113.sql new file mode 100644 index 00000000..040653fd --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_object/columns/id/alterations/alt0000000113.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_object/columns/id/alterations/alt0000000113 + + +ALTER TABLE "constructive_fbp_public".graph_object + ALTER COLUMN id DROP NOT NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_object/columns/id/alterations/alt0000000114.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_object/columns/id/alterations/alt0000000114.sql new file mode 100644 index 00000000..be895da4 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_object/columns/id/alterations/alt0000000114.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_object/columns/id/alterations/alt0000000114 + + +COMMENT ON COLUMN "constructive_fbp_public".graph_object.id IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_object/columns/id/column.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_object/columns/id/column.sql new file mode 100644 index 00000000..aeb5b0b6 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_object/columns/id/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_object/columns/id/column + + +ALTER TABLE "constructive_fbp_public".graph_object + DROP COLUMN id RESTRICT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_object/columns/kids/alterations/alt0000000115.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_object/columns/kids/alterations/alt0000000115.sql new file mode 100644 index 00000000..db220dca --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_object/columns/kids/alterations/alt0000000115.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_object/columns/kids/alterations/alt0000000115 + + +COMMENT ON COLUMN "constructive_fbp_public".graph_object.kids IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_object/columns/kids/alterations/alt0000000116.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_object/columns/kids/alterations/alt0000000116.sql new file mode 100644 index 00000000..522fd145 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_object/columns/kids/alterations/alt0000000116.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_object/columns/kids/alterations/alt0000000116 + + +ALTER TABLE "constructive_fbp_public".graph_object + DROP CONSTRAINT graph_objects_kids_ktree_chk; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_object/columns/kids/column.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_object/columns/kids/column.sql new file mode 100644 index 00000000..a5f64c1e --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_object/columns/kids/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_object/columns/kids/column + + +ALTER TABLE "constructive_fbp_public".graph_object + DROP COLUMN kids RESTRICT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_object/columns/ktree/alterations/alt0000000117.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_object/columns/ktree/alterations/alt0000000117.sql new file mode 100644 index 00000000..da5230e1 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_object/columns/ktree/alterations/alt0000000117.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_object/columns/ktree/alterations/alt0000000117 + + +COMMENT ON COLUMN "constructive_fbp_public".graph_object.ktree IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_object/columns/ktree/column.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_object/columns/ktree/column.sql new file mode 100644 index 00000000..4b03fccf --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_object/columns/ktree/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_object/columns/ktree/column + + +ALTER TABLE "constructive_fbp_public".graph_object + DROP COLUMN ktree RESTRICT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_object/constraints/graph_objects_pkey/constraint.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_object/constraints/graph_objects_pkey/constraint.sql new file mode 100644 index 00000000..d93fdfc5 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_object/constraints/graph_objects_pkey/constraint.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_object/constraints/graph_objects_pkey/constraint + + +ALTER TABLE "constructive_fbp_public".graph_object + DROP CONSTRAINT graph_objects_pkey; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_object/table.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_object/table.sql new file mode 100644 index 00000000..81a6e100 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_object/table.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_object/table + + +DROP TABLE "constructive_fbp_public".graph_object; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_object/triggers/generate_id_hash.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_object/triggers/generate_id_hash.sql new file mode 100644 index 00000000..97428f58 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_object/triggers/generate_id_hash.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_object/triggers/generate_id_hash + + +DROP TRIGGER generate_id_hash ON "constructive_fbp_public".graph_object; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_ref/alterations/alt0000000118.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_ref/alterations/alt0000000118.sql new file mode 100644 index 00000000..3ae868bd --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_ref/alterations/alt0000000118.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_ref/alterations/alt0000000118 + + +ALTER TABLE "constructive_fbp_public".graph_ref + ENABLE ROW LEVEL SECURITY; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_ref/alterations/alt0000000119.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_ref/alterations/alt0000000119.sql new file mode 100644 index 00000000..b16b2a24 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_ref/alterations/alt0000000119.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_ref/alterations/alt0000000119 + + +COMMENT ON TABLE "constructive_fbp_public".graph_ref IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_ref/columns/commit_id/alterations/alt0000000120.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_ref/columns/commit_id/alterations/alt0000000120.sql new file mode 100644 index 00000000..b9e63627 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_ref/columns/commit_id/alterations/alt0000000120.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_ref/columns/commit_id/alterations/alt0000000120 + + +COMMENT ON COLUMN "constructive_fbp_public".graph_ref.commit_id IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_ref/columns/commit_id/column.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_ref/columns/commit_id/column.sql new file mode 100644 index 00000000..038ef95f --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_ref/columns/commit_id/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_ref/columns/commit_id/column + + +ALTER TABLE "constructive_fbp_public".graph_ref + DROP COLUMN commit_id RESTRICT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_ref/columns/database_id/alterations/alt0000000121.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_ref/columns/database_id/alterations/alt0000000121.sql new file mode 100644 index 00000000..81cf26b4 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_ref/columns/database_id/alterations/alt0000000121.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_ref/columns/database_id/alterations/alt0000000121 + + +ALTER TABLE "constructive_fbp_public".graph_ref + ALTER COLUMN database_id DROP NOT NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_ref/columns/database_id/alterations/alt0000000122.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_ref/columns/database_id/alterations/alt0000000122.sql new file mode 100644 index 00000000..b99a4397 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_ref/columns/database_id/alterations/alt0000000122.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_ref/columns/database_id/alterations/alt0000000122 + + +COMMENT ON COLUMN "constructive_fbp_public".graph_ref.database_id IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_ref/columns/database_id/column.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_ref/columns/database_id/column.sql new file mode 100644 index 00000000..42bdb882 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_ref/columns/database_id/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_ref/columns/database_id/column + + +ALTER TABLE "constructive_fbp_public".graph_ref + DROP COLUMN database_id RESTRICT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_ref/columns/id/alterations/alt0000000123.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_ref/columns/id/alterations/alt0000000123.sql new file mode 100644 index 00000000..6c9dd1ac --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_ref/columns/id/alterations/alt0000000123.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_ref/columns/id/alterations/alt0000000123 + + +ALTER TABLE "constructive_fbp_public".graph_ref + ALTER COLUMN id DROP NOT NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_ref/columns/id/alterations/alt0000000124.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_ref/columns/id/alterations/alt0000000124.sql new file mode 100644 index 00000000..71b75b89 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_ref/columns/id/alterations/alt0000000124.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_ref/columns/id/alterations/alt0000000124 + + +ALTER TABLE "constructive_fbp_public".graph_ref + ALTER COLUMN id DROP DEFAULT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_ref/columns/id/alterations/alt0000000125.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_ref/columns/id/alterations/alt0000000125.sql new file mode 100644 index 00000000..791d7e52 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_ref/columns/id/alterations/alt0000000125.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_ref/columns/id/alterations/alt0000000125 + + +COMMENT ON COLUMN "constructive_fbp_public".graph_ref.id IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_ref/columns/id/column.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_ref/columns/id/column.sql new file mode 100644 index 00000000..ed56be1e --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_ref/columns/id/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_ref/columns/id/column + + +ALTER TABLE "constructive_fbp_public".graph_ref + DROP COLUMN id RESTRICT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_ref/columns/name/alterations/alt0000000126.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_ref/columns/name/alterations/alt0000000126.sql new file mode 100644 index 00000000..590ba7fe --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_ref/columns/name/alterations/alt0000000126.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_ref/columns/name/alterations/alt0000000126 + + +ALTER TABLE "constructive_fbp_public".graph_ref + ALTER COLUMN name DROP NOT NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_ref/columns/name/alterations/alt0000000127.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_ref/columns/name/alterations/alt0000000127.sql new file mode 100644 index 00000000..758903eb --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_ref/columns/name/alterations/alt0000000127.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_ref/columns/name/alterations/alt0000000127 + + +COMMENT ON COLUMN "constructive_fbp_public".graph_ref.name IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_ref/columns/name/column.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_ref/columns/name/column.sql new file mode 100644 index 00000000..6bdc2062 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_ref/columns/name/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_ref/columns/name/column + + +ALTER TABLE "constructive_fbp_public".graph_ref + DROP COLUMN name RESTRICT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_ref/columns/store_id/alterations/alt0000000128.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_ref/columns/store_id/alterations/alt0000000128.sql new file mode 100644 index 00000000..634d8c0d --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_ref/columns/store_id/alterations/alt0000000128.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_ref/columns/store_id/alterations/alt0000000128 + + +ALTER TABLE "constructive_fbp_public".graph_ref + ALTER COLUMN store_id DROP NOT NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_ref/columns/store_id/alterations/alt0000000129.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_ref/columns/store_id/alterations/alt0000000129.sql new file mode 100644 index 00000000..1f2a06bb --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_ref/columns/store_id/alterations/alt0000000129.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_ref/columns/store_id/alterations/alt0000000129 + + +COMMENT ON COLUMN "constructive_fbp_public".graph_ref.store_id IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_ref/columns/store_id/column.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_ref/columns/store_id/column.sql new file mode 100644 index 00000000..651b1137 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_ref/columns/store_id/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_ref/columns/store_id/column + + +ALTER TABLE "constructive_fbp_public".graph_ref + DROP COLUMN store_id RESTRICT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_ref/constraints/graph_refs_pkey/constraint.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_ref/constraints/graph_refs_pkey/constraint.sql new file mode 100644 index 00000000..35f357a7 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_ref/constraints/graph_refs_pkey/constraint.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_ref/constraints/graph_refs_pkey/constraint + + +ALTER TABLE "constructive_fbp_public".graph_ref + DROP CONSTRAINT graph_refs_pkey; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_ref/table.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_ref/table.sql new file mode 100644 index 00000000..b3749d89 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_ref/table.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_ref/table + + +DROP TABLE "constructive_fbp_public".graph_ref; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_store/alterations/alt0000000130.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_store/alterations/alt0000000130.sql new file mode 100644 index 00000000..b6c5ce2f --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_store/alterations/alt0000000130.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_store/alterations/alt0000000130 + + +ALTER TABLE "constructive_fbp_public".graph_store + ENABLE ROW LEVEL SECURITY; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_store/alterations/alt0000000131.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_store/alterations/alt0000000131.sql new file mode 100644 index 00000000..aa6c3eb0 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_store/alterations/alt0000000131.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_store/alterations/alt0000000131 + + +COMMENT ON TABLE "constructive_fbp_public".graph_store IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_store/columns/created_at/alterations/alt0000000132.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_store/columns/created_at/alterations/alt0000000132.sql new file mode 100644 index 00000000..a4031cdc --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_store/columns/created_at/alterations/alt0000000132.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_store/columns/created_at/alterations/alt0000000132 + + +ALTER TABLE "constructive_fbp_public".graph_store + ALTER COLUMN created_at DROP DEFAULT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_store/columns/created_at/alterations/alt0000000133.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_store/columns/created_at/alterations/alt0000000133.sql new file mode 100644 index 00000000..e2b95219 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_store/columns/created_at/alterations/alt0000000133.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_store/columns/created_at/alterations/alt0000000133 + + +COMMENT ON COLUMN "constructive_fbp_public".graph_store.created_at IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_store/columns/created_at/column.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_store/columns/created_at/column.sql new file mode 100644 index 00000000..020a1eed --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_store/columns/created_at/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_store/columns/created_at/column + + +ALTER TABLE "constructive_fbp_public".graph_store + DROP COLUMN created_at RESTRICT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_store/columns/database_id/alterations/alt0000000134.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_store/columns/database_id/alterations/alt0000000134.sql new file mode 100644 index 00000000..3e61b28c --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_store/columns/database_id/alterations/alt0000000134.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_store/columns/database_id/alterations/alt0000000134 + + +ALTER TABLE "constructive_fbp_public".graph_store + ALTER COLUMN database_id DROP NOT NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_store/columns/database_id/alterations/alt0000000135.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_store/columns/database_id/alterations/alt0000000135.sql new file mode 100644 index 00000000..e21e0ecb --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_store/columns/database_id/alterations/alt0000000135.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_store/columns/database_id/alterations/alt0000000135 + + +COMMENT ON COLUMN "constructive_fbp_public".graph_store.database_id IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_store/columns/database_id/column.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_store/columns/database_id/column.sql new file mode 100644 index 00000000..27fb6a41 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_store/columns/database_id/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_store/columns/database_id/column + + +ALTER TABLE "constructive_fbp_public".graph_store + DROP COLUMN database_id RESTRICT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_store/columns/hash/alterations/alt0000000136.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_store/columns/hash/alterations/alt0000000136.sql new file mode 100644 index 00000000..4bc4c53d --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_store/columns/hash/alterations/alt0000000136.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_store/columns/hash/alterations/alt0000000136 + + +COMMENT ON COLUMN "constructive_fbp_public".graph_store.hash IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_store/columns/hash/column.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_store/columns/hash/column.sql new file mode 100644 index 00000000..5b18d0d6 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_store/columns/hash/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_store/columns/hash/column + + +ALTER TABLE "constructive_fbp_public".graph_store + DROP COLUMN hash RESTRICT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_store/columns/id/alterations/alt0000000137.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_store/columns/id/alterations/alt0000000137.sql new file mode 100644 index 00000000..0d02d7b5 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_store/columns/id/alterations/alt0000000137.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_store/columns/id/alterations/alt0000000137 + + +ALTER TABLE "constructive_fbp_public".graph_store + ALTER COLUMN id DROP NOT NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_store/columns/id/alterations/alt0000000138.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_store/columns/id/alterations/alt0000000138.sql new file mode 100644 index 00000000..7f5b70c0 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_store/columns/id/alterations/alt0000000138.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_store/columns/id/alterations/alt0000000138 + + +ALTER TABLE "constructive_fbp_public".graph_store + ALTER COLUMN id DROP DEFAULT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_store/columns/id/alterations/alt0000000139.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_store/columns/id/alterations/alt0000000139.sql new file mode 100644 index 00000000..1c2904de --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_store/columns/id/alterations/alt0000000139.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_store/columns/id/alterations/alt0000000139 + + +COMMENT ON COLUMN "constructive_fbp_public".graph_store.id IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_store/columns/id/column.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_store/columns/id/column.sql new file mode 100644 index 00000000..a9a863aa --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_store/columns/id/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_store/columns/id/column + + +ALTER TABLE "constructive_fbp_public".graph_store + DROP COLUMN id RESTRICT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_store/columns/name/alterations/alt0000000140.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_store/columns/name/alterations/alt0000000140.sql new file mode 100644 index 00000000..ce807cb6 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_store/columns/name/alterations/alt0000000140.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_store/columns/name/alterations/alt0000000140 + + +ALTER TABLE "constructive_fbp_public".graph_store + ALTER COLUMN name DROP NOT NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_store/columns/name/alterations/alt0000000141.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_store/columns/name/alterations/alt0000000141.sql new file mode 100644 index 00000000..64a32e86 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_store/columns/name/alterations/alt0000000141.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_store/columns/name/alterations/alt0000000141 + + +COMMENT ON COLUMN "constructive_fbp_public".graph_store.name IS NULL; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_store/columns/name/column.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_store/columns/name/column.sql new file mode 100644 index 00000000..0ee41c20 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_store/columns/name/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_store/columns/name/column + + +ALTER TABLE "constructive_fbp_public".graph_store + DROP COLUMN name RESTRICT; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_store/constraints/graph_stores_pkey/constraint.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_store/constraints/graph_stores_pkey/constraint.sql new file mode 100644 index 00000000..6c2f64dc --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_store/constraints/graph_stores_pkey/constraint.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_store/constraints/graph_stores_pkey/constraint + + +ALTER TABLE "constructive_fbp_public".graph_store + DROP CONSTRAINT graph_stores_pkey; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_store/indexes/idx_graph_store_unique_name.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_store/indexes/idx_graph_store_unique_name.sql new file mode 100644 index 00000000..48ff6d69 --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_store/indexes/idx_graph_store_unique_name.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_store/indexes/idx_graph_store_unique_name + + +DROP INDEX "constructive_fbp_public".idx_graph_store_unique_name; + + diff --git a/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_store/table.sql b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_store/table.sql new file mode 100644 index 00000000..1b52601f --- /dev/null +++ b/pgpm/constructive-fbp/revert/schemas/constructive_fbp_public/tables/graph_store/table.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_fbp_public/tables/graph_store/table + + +DROP TABLE "constructive_fbp_public".graph_store; + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/procedures/complete_node/procedure.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/procedures/complete_node/procedure.sql new file mode 100644 index 00000000..ee2ec702 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/procedures/complete_node/procedure.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/procedures/complete_node/procedure + + +SELECT verify_function('constructive_fbp_private.complete_node'); + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/procedures/copy_subtree/procedure.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/procedures/copy_subtree/procedure.sql new file mode 100644 index 00000000..6f3af02d --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/procedures/copy_subtree/procedure.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/procedures/copy_subtree/procedure + + +SELECT verify_function('constructive_fbp_private.copy_subtree'); + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/procedures/deserialize_graph/procedure.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/procedures/deserialize_graph/procedure.sql new file mode 100644 index 00000000..a993a50f --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/procedures/deserialize_graph/procedure.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/procedures/deserialize_graph/procedure + + +SELECT verify_function('constructive_fbp_private.deserialize_graph'); + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/procedures/graph_object_hash_uuid/procedure.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/procedures/graph_object_hash_uuid/procedure.sql new file mode 100644 index 00000000..d1fcb5a8 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/procedures/graph_object_hash_uuid/procedure.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/procedures/graph_object_hash_uuid/procedure + + +SELECT verify_function('constructive_fbp_private.graph_object_hash_uuid'); + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/procedures/insert_subnet_nodes/procedure.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/procedures/insert_subnet_nodes/procedure.sql new file mode 100644 index 00000000..f8b63acd --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/procedures/insert_subnet_nodes/procedure.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/procedures/insert_subnet_nodes/procedure + + +SELECT verify_function('constructive_fbp_private.insert_subnet_nodes'); + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/procedures/serialize_graph/procedure.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/procedures/serialize_graph/procedure.sql new file mode 100644 index 00000000..c7b8adff --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/procedures/serialize_graph/procedure.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/procedures/serialize_graph/procedure + + +SELECT verify_function('constructive_fbp_private.serialize_graph'); + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/procedures/tick_execution/procedure.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/procedures/tick_execution/procedure.sql new file mode 100644 index 00000000..64a25d63 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/procedures/tick_execution/procedure.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/procedures/tick_execution/procedure + + +SELECT verify_function('constructive_fbp_private.tick_execution'); + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/schema.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/schema.sql new file mode 100644 index 00000000..afefd8d6 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/schema.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/schema + + +SELECT verify_schema('constructive_fbp_private'); + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/alterations/alt0000000001.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/alterations/alt0000000001.sql new file mode 100644 index 00000000..097a5ed8 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/alterations/alt0000000001.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/alterations/alt0000000001 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/alterations/alt0000000002.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/alterations/alt0000000002.sql new file mode 100644 index 00000000..b21ab8e2 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/alterations/alt0000000002.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/alterations/alt0000000002 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/created_at/alterations/alt0000000003.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/created_at/alterations/alt0000000003.sql new file mode 100644 index 00000000..9c5de3a0 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/created_at/alterations/alt0000000003.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/created_at/alterations/alt0000000003 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/created_at/column.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/created_at/column.sql new file mode 100644 index 00000000..aea285b7 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/created_at/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/created_at/column + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/data/alterations/alt0000000004.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/data/alterations/alt0000000004.sql new file mode 100644 index 00000000..d8bd405e --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/data/alterations/alt0000000004.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/data/alterations/alt0000000004 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/data/alterations/alt0000000005.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/data/alterations/alt0000000005.sql new file mode 100644 index 00000000..9553a58f --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/data/alterations/alt0000000005.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/data/alterations/alt0000000005 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/data/column.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/data/column.sql new file mode 100644 index 00000000..3bec5ac7 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/data/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/data/column + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/database_id/alterations/alt0000000006.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/database_id/alterations/alt0000000006.sql new file mode 100644 index 00000000..743bcb2b --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/database_id/alterations/alt0000000006.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/database_id/alterations/alt0000000006 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/database_id/alterations/alt0000000007.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/database_id/alterations/alt0000000007.sql new file mode 100644 index 00000000..5e520cee --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/database_id/alterations/alt0000000007.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/database_id/alterations/alt0000000007 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/database_id/column.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/database_id/column.sql new file mode 100644 index 00000000..e4b37c76 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/database_id/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/database_id/column + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/hash/alterations/alt0000000008.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/hash/alterations/alt0000000008.sql new file mode 100644 index 00000000..e2d5c94c --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/hash/alterations/alt0000000008.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/hash/alterations/alt0000000008 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/hash/alterations/alt0000000009.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/hash/alterations/alt0000000009.sql new file mode 100644 index 00000000..4d38bf53 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/hash/alterations/alt0000000009.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/hash/alterations/alt0000000009 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/hash/column.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/hash/column.sql new file mode 100644 index 00000000..892fc399 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/hash/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/hash/column + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/id/alterations/alt0000000010.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/id/alterations/alt0000000010.sql new file mode 100644 index 00000000..4811f48f --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/id/alterations/alt0000000010.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/id/alterations/alt0000000010 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/id/alterations/alt0000000011.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/id/alterations/alt0000000011.sql new file mode 100644 index 00000000..641f0d4c --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/id/alterations/alt0000000011.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/id/alterations/alt0000000011 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/id/alterations/alt0000000012.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/id/alterations/alt0000000012.sql new file mode 100644 index 00000000..564fee1a --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/id/alterations/alt0000000012.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/id/alterations/alt0000000012 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/id/column.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/id/column.sql new file mode 100644 index 00000000..f01dad49 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/id/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/columns/id/column + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/constraints/function_graph_execution_outputs_pkey/constraint.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/constraints/function_graph_execution_outputs_pkey/constraint.sql new file mode 100644 index 00000000..c54168af --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/constraints/function_graph_execution_outputs_pkey/constraint.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/constraints/function_graph_execution_outputs_pkey/constraint + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/indexes/idx_function_graph_execution_outputs_unique_hash.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/indexes/idx_function_graph_execution_outputs_unique_hash.sql new file mode 100644 index 00000000..0e2ce83b --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/indexes/idx_function_graph_execution_outputs_unique_hash.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/indexes/idx_function_graph_execution_outputs_unique_hash + + +SELECT verify_index('constructive_fbp_private.function_graph_execution_outputs', 'idx_function_graph_execution_outputs_unique_hash'); + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/table.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/table.sql new file mode 100644 index 00000000..8b1780e5 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_execution_outputs/table.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_execution_outputs/table + + +SELECT verify_table('constructive_fbp_private.function_graph_execution_outputs'); + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/alterations/alt0000000013.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/alterations/alt0000000013.sql new file mode 100644 index 00000000..796bae70 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/alterations/alt0000000013.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/alterations/alt0000000013 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/alterations/alt0000000014.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/alterations/alt0000000014.sql new file mode 100644 index 00000000..6321807f --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/alterations/alt0000000014.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/alterations/alt0000000014 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/completed_at/alterations/alt0000000015.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/completed_at/alterations/alt0000000015.sql new file mode 100644 index 00000000..a9e6e9fc --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/completed_at/alterations/alt0000000015.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/columns/completed_at/alterations/alt0000000015 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/completed_at/column.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/completed_at/column.sql new file mode 100644 index 00000000..72f109dc --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/completed_at/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/columns/completed_at/column + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/current_wave/alterations/alt0000000016.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/current_wave/alterations/alt0000000016.sql new file mode 100644 index 00000000..dfb4c0a7 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/current_wave/alterations/alt0000000016.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/columns/current_wave/alterations/alt0000000016 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/current_wave/alterations/alt0000000017.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/current_wave/alterations/alt0000000017.sql new file mode 100644 index 00000000..86f66ab0 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/current_wave/alterations/alt0000000017.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/columns/current_wave/alterations/alt0000000017 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/current_wave/alterations/alt0000000018.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/current_wave/alterations/alt0000000018.sql new file mode 100644 index 00000000..98825c91 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/current_wave/alterations/alt0000000018.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/columns/current_wave/alterations/alt0000000018 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/current_wave/column.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/current_wave/column.sql new file mode 100644 index 00000000..29436e88 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/current_wave/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/columns/current_wave/column + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/database_id/alterations/alt0000000019.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/database_id/alterations/alt0000000019.sql new file mode 100644 index 00000000..ec4b8db5 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/database_id/alterations/alt0000000019.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/columns/database_id/alterations/alt0000000019 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/database_id/alterations/alt0000000020.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/database_id/alterations/alt0000000020.sql new file mode 100644 index 00000000..188f11a0 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/database_id/alterations/alt0000000020.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/columns/database_id/alterations/alt0000000020 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/database_id/column.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/database_id/column.sql new file mode 100644 index 00000000..34370795 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/database_id/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/columns/database_id/column + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/definitions_commit_id/alterations/alt0000000021.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/definitions_commit_id/alterations/alt0000000021.sql new file mode 100644 index 00000000..b0e56390 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/definitions_commit_id/alterations/alt0000000021.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/columns/definitions_commit_id/alterations/alt0000000021 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/definitions_commit_id/column.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/definitions_commit_id/column.sql new file mode 100644 index 00000000..bbe84b6a --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/definitions_commit_id/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/columns/definitions_commit_id/column + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/entity_id/alterations/alt0000000022.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/entity_id/alterations/alt0000000022.sql new file mode 100644 index 00000000..92dcc5bc --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/entity_id/alterations/alt0000000022.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/columns/entity_id/alterations/alt0000000022 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/entity_id/column.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/entity_id/column.sql new file mode 100644 index 00000000..9465c610 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/entity_id/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/columns/entity_id/column + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/error_code/alterations/alt0000000023.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/error_code/alterations/alt0000000023.sql new file mode 100644 index 00000000..9bdae8fa --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/error_code/alterations/alt0000000023.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/columns/error_code/alterations/alt0000000023 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/error_code/column.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/error_code/column.sql new file mode 100644 index 00000000..fa895d7c --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/error_code/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/columns/error_code/column + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/error_message/alterations/alt0000000024.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/error_message/alterations/alt0000000024.sql new file mode 100644 index 00000000..e8defba8 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/error_message/alterations/alt0000000024.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/columns/error_message/alterations/alt0000000024 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/error_message/column.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/error_message/column.sql new file mode 100644 index 00000000..990912c5 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/error_message/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/columns/error_message/column + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/execution_plan/alterations/alt0000000025.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/execution_plan/alterations/alt0000000025.sql new file mode 100644 index 00000000..ccba09c7 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/execution_plan/alterations/alt0000000025.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/columns/execution_plan/alterations/alt0000000025 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/execution_plan/column.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/execution_plan/column.sql new file mode 100644 index 00000000..417a1279 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/execution_plan/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/columns/execution_plan/column + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/graph_id/alterations/alt0000000026.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/graph_id/alterations/alt0000000026.sql new file mode 100644 index 00000000..ea11a183 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/graph_id/alterations/alt0000000026.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/columns/graph_id/alterations/alt0000000026 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/graph_id/alterations/alt0000000027.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/graph_id/alterations/alt0000000027.sql new file mode 100644 index 00000000..93a20e90 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/graph_id/alterations/alt0000000027.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/columns/graph_id/alterations/alt0000000027 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/graph_id/column.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/graph_id/column.sql new file mode 100644 index 00000000..48ca1857 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/graph_id/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/columns/graph_id/column + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/id/alterations/alt0000000028.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/id/alterations/alt0000000028.sql new file mode 100644 index 00000000..742c041a --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/id/alterations/alt0000000028.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/columns/id/alterations/alt0000000028 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/id/alterations/alt0000000029.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/id/alterations/alt0000000029.sql new file mode 100644 index 00000000..e753e8d1 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/id/alterations/alt0000000029.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/columns/id/alterations/alt0000000029 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/id/alterations/alt0000000030.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/id/alterations/alt0000000030.sql new file mode 100644 index 00000000..d60fecf7 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/id/alterations/alt0000000030.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/columns/id/alterations/alt0000000030 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/id/column.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/id/column.sql new file mode 100644 index 00000000..5381207f --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/id/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/columns/id/column + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/input_payload/alterations/alt0000000031.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/input_payload/alterations/alt0000000031.sql new file mode 100644 index 00000000..f69aaff2 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/input_payload/alterations/alt0000000031.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/columns/input_payload/alterations/alt0000000031 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/input_payload/column.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/input_payload/column.sql new file mode 100644 index 00000000..d1bbbaaa --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/input_payload/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/columns/input_payload/column + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/invocation_id/alterations/alt0000000032.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/invocation_id/alterations/alt0000000032.sql new file mode 100644 index 00000000..a0cfbe4c --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/invocation_id/alterations/alt0000000032.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/columns/invocation_id/alterations/alt0000000032 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/invocation_id/column.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/invocation_id/column.sql new file mode 100644 index 00000000..30c1af49 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/invocation_id/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/columns/invocation_id/column + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_pending_jobs/alterations/alt0000000033.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_pending_jobs/alterations/alt0000000033.sql new file mode 100644 index 00000000..829911a7 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_pending_jobs/alterations/alt0000000033.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_pending_jobs/alterations/alt0000000033 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_pending_jobs/alterations/alt0000000034.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_pending_jobs/alterations/alt0000000034.sql new file mode 100644 index 00000000..3c79f8e7 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_pending_jobs/alterations/alt0000000034.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_pending_jobs/alterations/alt0000000034 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_pending_jobs/alterations/alt0000000035.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_pending_jobs/alterations/alt0000000035.sql new file mode 100644 index 00000000..250af7a9 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_pending_jobs/alterations/alt0000000035.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_pending_jobs/alterations/alt0000000035 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_pending_jobs/column.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_pending_jobs/column.sql new file mode 100644 index 00000000..b5b0ca60 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_pending_jobs/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_pending_jobs/column + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_ticks/alterations/alt0000000036.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_ticks/alterations/alt0000000036.sql new file mode 100644 index 00000000..84863885 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_ticks/alterations/alt0000000036.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_ticks/alterations/alt0000000036 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_ticks/alterations/alt0000000037.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_ticks/alterations/alt0000000037.sql new file mode 100644 index 00000000..9d476a84 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_ticks/alterations/alt0000000037.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_ticks/alterations/alt0000000037 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_ticks/alterations/alt0000000038.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_ticks/alterations/alt0000000038.sql new file mode 100644 index 00000000..9cb2d030 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_ticks/alterations/alt0000000038.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_ticks/alterations/alt0000000038 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_ticks/column.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_ticks/column.sql new file mode 100644 index 00000000..4feab4ca --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_ticks/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/columns/max_ticks/column + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/node_outputs/alterations/alt0000000039.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/node_outputs/alterations/alt0000000039.sql new file mode 100644 index 00000000..d7c0b39b --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/node_outputs/alterations/alt0000000039.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/columns/node_outputs/alterations/alt0000000039 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/node_outputs/alterations/alt0000000040.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/node_outputs/alterations/alt0000000040.sql new file mode 100644 index 00000000..bb6c9896 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/node_outputs/alterations/alt0000000040.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/columns/node_outputs/alterations/alt0000000040 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/node_outputs/alterations/alt0000000041.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/node_outputs/alterations/alt0000000041.sql new file mode 100644 index 00000000..46bc15d2 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/node_outputs/alterations/alt0000000041.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/columns/node_outputs/alterations/alt0000000041 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/node_outputs/column.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/node_outputs/column.sql new file mode 100644 index 00000000..fabc8282 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/node_outputs/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/columns/node_outputs/column + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_node/alterations/alt0000000042.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_node/alterations/alt0000000042.sql new file mode 100644 index 00000000..9a2cdedb --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_node/alterations/alt0000000042.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_node/alterations/alt0000000042 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_node/alterations/alt0000000043.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_node/alterations/alt0000000043.sql new file mode 100644 index 00000000..038ae15c --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_node/alterations/alt0000000043.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_node/alterations/alt0000000043 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_node/column.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_node/column.sql new file mode 100644 index 00000000..f8d810fd --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_node/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_node/column + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_payload/alterations/alt0000000044.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_payload/alterations/alt0000000044.sql new file mode 100644 index 00000000..76e4556c --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_payload/alterations/alt0000000044.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_payload/alterations/alt0000000044 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_payload/column.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_payload/column.sql new file mode 100644 index 00000000..94548152 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_payload/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_payload/column + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_port/alterations/alt0000000045.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_port/alterations/alt0000000045.sql new file mode 100644 index 00000000..9b43a9af --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_port/alterations/alt0000000045.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_port/alterations/alt0000000045 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_port/alterations/alt0000000046.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_port/alterations/alt0000000046.sql new file mode 100644 index 00000000..1831fef7 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_port/alterations/alt0000000046.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_port/alterations/alt0000000046 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_port/alterations/alt0000000047.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_port/alterations/alt0000000047.sql new file mode 100644 index 00000000..e748b4bb --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_port/alterations/alt0000000047.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_port/alterations/alt0000000047 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_port/column.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_port/column.sql new file mode 100644 index 00000000..d723f724 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_port/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/columns/output_port/column + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/parent_execution_id/alterations/alt0000000048.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/parent_execution_id/alterations/alt0000000048.sql new file mode 100644 index 00000000..9daae4c8 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/parent_execution_id/alterations/alt0000000048.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/columns/parent_execution_id/alterations/alt0000000048 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/parent_execution_id/column.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/parent_execution_id/column.sql new file mode 100644 index 00000000..e9216ee5 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/parent_execution_id/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/columns/parent_execution_id/column + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/parent_node_name/alterations/alt0000000049.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/parent_node_name/alterations/alt0000000049.sql new file mode 100644 index 00000000..e441a166 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/parent_node_name/alterations/alt0000000049.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/columns/parent_node_name/alterations/alt0000000049 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/parent_node_name/column.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/parent_node_name/column.sql new file mode 100644 index 00000000..8a8d366a --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/parent_node_name/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/columns/parent_node_name/column + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/started_at/alterations/alt0000000050.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/started_at/alterations/alt0000000050.sql new file mode 100644 index 00000000..ec20aafc --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/started_at/alterations/alt0000000050.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/columns/started_at/alterations/alt0000000050 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/started_at/column.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/started_at/column.sql new file mode 100644 index 00000000..a5d8de4a --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/started_at/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/columns/started_at/column + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/alterations/alt0000000051.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/alterations/alt0000000051.sql new file mode 100644 index 00000000..f73c5e5b --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/alterations/alt0000000051.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/alterations/alt0000000051 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/alterations/alt0000000052.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/alterations/alt0000000052.sql new file mode 100644 index 00000000..e157f809 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/alterations/alt0000000052.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/alterations/alt0000000052 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/alterations/alt0000000053.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/alterations/alt0000000053.sql new file mode 100644 index 00000000..b9aaf436 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/alterations/alt0000000053.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/alterations/alt0000000053 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/alterations/alt0000000054.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/alterations/alt0000000054.sql new file mode 100644 index 00000000..91aa6ebf --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/alterations/alt0000000054.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/alterations/alt0000000054 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/column.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/column.sql new file mode 100644 index 00000000..556de743 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/columns/status/column + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/tick_count/alterations/alt0000000055.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/tick_count/alterations/alt0000000055.sql new file mode 100644 index 00000000..3f36cc2e --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/tick_count/alterations/alt0000000055.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/columns/tick_count/alterations/alt0000000055 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/tick_count/alterations/alt0000000056.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/tick_count/alterations/alt0000000056.sql new file mode 100644 index 00000000..6274a7f7 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/tick_count/alterations/alt0000000056.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/columns/tick_count/alterations/alt0000000056 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/tick_count/alterations/alt0000000057.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/tick_count/alterations/alt0000000057.sql new file mode 100644 index 00000000..164add32 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/tick_count/alterations/alt0000000057.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/columns/tick_count/alterations/alt0000000057 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/tick_count/column.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/tick_count/column.sql new file mode 100644 index 00000000..a1571208 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/tick_count/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/columns/tick_count/column + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/timeout_at/alterations/alt0000000058.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/timeout_at/alterations/alt0000000058.sql new file mode 100644 index 00000000..6d89870c --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/timeout_at/alterations/alt0000000058.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/columns/timeout_at/alterations/alt0000000058 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/timeout_at/alterations/alt0000000059.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/timeout_at/alterations/alt0000000059.sql new file mode 100644 index 00000000..b56a0f10 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/timeout_at/alterations/alt0000000059.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/columns/timeout_at/alterations/alt0000000059 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/timeout_at/alterations/alt0000000060.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/timeout_at/alterations/alt0000000060.sql new file mode 100644 index 00000000..851b9031 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/timeout_at/alterations/alt0000000060.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/columns/timeout_at/alterations/alt0000000060 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/timeout_at/column.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/timeout_at/column.sql new file mode 100644 index 00000000..adcc05d9 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/columns/timeout_at/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/columns/timeout_at/column + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/constraints/function_graph_executions_graph_id_fkey/constraint.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/constraints/function_graph_executions_graph_id_fkey/constraint.sql new file mode 100644 index 00000000..7e1be5ee --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/constraints/function_graph_executions_graph_id_fkey/constraint.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/constraints/function_graph_executions_graph_id_fkey/constraint + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/constraints/function_graph_executions_pkey/constraint.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/constraints/function_graph_executions_pkey/constraint.sql new file mode 100644 index 00000000..21702f11 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/constraints/function_graph_executions_pkey/constraint.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/constraints/function_graph_executions_pkey/constraint + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/table.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/table.sql new file mode 100644 index 00000000..dfa71747 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/tables/function_graph_executions/table.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/tables/function_graph_executions/table + + +SELECT verify_table('constructive_fbp_private.function_graph_executions'); + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/trigger_fns/tg_graph_object_generate_id_hash.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/trigger_fns/tg_graph_object_generate_id_hash.sql new file mode 100644 index 00000000..968c51ab --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_private/trigger_fns/tg_graph_object_generate_id_hash.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_private/trigger_fns/tg_graph_object_generate_id_hash + + +SELECT verify_function('constructive_fbp_private.tg_graph_object_generate_id_hash'); + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/procedures/add_edge/procedure.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/procedures/add_edge/procedure.sql new file mode 100644 index 00000000..43dea7d0 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/procedures/add_edge/procedure.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/procedures/add_edge/procedure + + +SELECT verify_function('constructive_fbp_public.add_edge'); + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/procedures/add_edge_and_save/procedure.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/procedures/add_edge_and_save/procedure.sql new file mode 100644 index 00000000..6ebbe251 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/procedures/add_edge_and_save/procedure.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/procedures/add_edge_and_save/procedure + + +SELECT verify_function('constructive_fbp_public.add_edge_and_save'); + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/procedures/add_node/procedure.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/procedures/add_node/procedure.sql new file mode 100644 index 00000000..893d7293 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/procedures/add_node/procedure.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/procedures/add_node/procedure + + +SELECT verify_function('constructive_fbp_public.add_node'); + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/procedures/add_node_and_save/procedure.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/procedures/add_node_and_save/procedure.sql new file mode 100644 index 00000000..9c91db7a --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/procedures/add_node_and_save/procedure.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/procedures/add_node_and_save/procedure + + +SELECT verify_function('constructive_fbp_public.add_node_and_save'); + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/procedures/copy_graph/procedure.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/procedures/copy_graph/procedure.sql new file mode 100644 index 00000000..29ab33c3 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/procedures/copy_graph/procedure.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/procedures/copy_graph/procedure + + +SELECT verify_function('constructive_fbp_public.copy_graph'); + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/procedures/create_function_graph/procedure.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/procedures/create_function_graph/procedure.sql new file mode 100644 index 00000000..fcd0e905 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/procedures/create_function_graph/procedure.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/procedures/create_function_graph/procedure + + +SELECT verify_function('constructive_fbp_public.create_function_graph'); + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/procedures/graph_get_all/procedure.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/procedures/graph_get_all/procedure.sql new file mode 100644 index 00000000..834af775 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/procedures/graph_get_all/procedure.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/procedures/graph_get_all/procedure + + +SELECT verify_function('constructive_fbp_public.graph_get_all'); + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/procedures/graph_get_node_at_path/procedure.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/procedures/graph_get_node_at_path/procedure.sql new file mode 100644 index 00000000..96de5c91 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/procedures/graph_get_node_at_path/procedure.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/procedures/graph_get_node_at_path/procedure + + +SELECT verify_function('constructive_fbp_public.graph_get_node_at_path'); + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/procedures/graph_init_empty_repo/procedure.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/procedures/graph_init_empty_repo/procedure.sql new file mode 100644 index 00000000..9ab7e956 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/procedures/graph_init_empty_repo/procedure.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/procedures/graph_init_empty_repo/procedure + + +SELECT verify_function('constructive_fbp_public.graph_init_empty_repo'); + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/procedures/graph_insert_node_at_path/procedure.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/procedures/graph_insert_node_at_path/procedure.sql new file mode 100644 index 00000000..7263fbaf --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/procedures/graph_insert_node_at_path/procedure.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/procedures/graph_insert_node_at_path/procedure + + +SELECT verify_function('constructive_fbp_public.graph_insert_node_at_path'); + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/procedures/graph_set_data_at_path/procedure.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/procedures/graph_set_data_at_path/procedure.sql new file mode 100644 index 00000000..26d198cc --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/procedures/graph_set_data_at_path/procedure.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/procedures/graph_set_data_at_path/procedure + + +SELECT verify_function('constructive_fbp_public.graph_set_data_at_path'); + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/procedures/import_definitions/procedure.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/procedures/import_definitions/procedure.sql new file mode 100644 index 00000000..3371f5f8 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/procedures/import_definitions/procedure.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/procedures/import_definitions/procedure + + +SELECT verify_function('constructive_fbp_public.import_definitions'); + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/procedures/import_graph_json/procedure.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/procedures/import_graph_json/procedure.sql new file mode 100644 index 00000000..eeac68f9 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/procedures/import_graph_json/procedure.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/procedures/import_graph_json/procedure + + +SELECT verify_function('constructive_fbp_public.import_graph_json'); + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/procedures/read_function_graph/procedure.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/procedures/read_function_graph/procedure.sql new file mode 100644 index 00000000..7280c4d7 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/procedures/read_function_graph/procedure.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/procedures/read_function_graph/procedure + + +SELECT verify_function('constructive_fbp_public.read_function_graph'); + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/procedures/save_graph/procedure.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/procedures/save_graph/procedure.sql new file mode 100644 index 00000000..72a47cb7 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/procedures/save_graph/procedure.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/procedures/save_graph/procedure + + +SELECT verify_function('constructive_fbp_public.save_graph'); + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/procedures/start_execution/procedure.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/procedures/start_execution/procedure.sql new file mode 100644 index 00000000..3d98d176 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/procedures/start_execution/procedure.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/procedures/start_execution/procedure + + +SELECT verify_function('constructive_fbp_public.start_execution'); + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/procedures/validate_function_graph/procedure.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/procedures/validate_function_graph/procedure.sql new file mode 100644 index 00000000..0afb1c1b --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/procedures/validate_function_graph/procedure.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/procedures/validate_function_graph/procedure + + +SELECT verify_function('constructive_fbp_public.validate_function_graph'); + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/schema.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/schema.sql new file mode 100644 index 00000000..7b552816 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/schema.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/schema + + +SELECT verify_schema('constructive_fbp_public'); + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/alterations/alt0000000061.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/alterations/alt0000000061.sql new file mode 100644 index 00000000..a2103efa --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/alterations/alt0000000061.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/function_graphs/alterations/alt0000000061 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/alterations/alt0000000062.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/alterations/alt0000000062.sql new file mode 100644 index 00000000..88538c11 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/alterations/alt0000000062.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/function_graphs/alterations/alt0000000062 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/context/alterations/alt0000000063.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/context/alterations/alt0000000063.sql new file mode 100644 index 00000000..ddd71773 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/context/alterations/alt0000000063.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/function_graphs/columns/context/alterations/alt0000000063 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/context/alterations/alt0000000064.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/context/alterations/alt0000000064.sql new file mode 100644 index 00000000..7e1086cb --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/context/alterations/alt0000000064.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/function_graphs/columns/context/alterations/alt0000000064 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/context/alterations/alt0000000065.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/context/alterations/alt0000000065.sql new file mode 100644 index 00000000..c3d2f56b --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/context/alterations/alt0000000065.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/function_graphs/columns/context/alterations/alt0000000065 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/context/column.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/context/column.sql new file mode 100644 index 00000000..5bc969bb --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/context/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/function_graphs/columns/context/column + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/created_at/alterations/alt0000000066.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/created_at/alterations/alt0000000066.sql new file mode 100644 index 00000000..6b0f0664 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/created_at/alterations/alt0000000066.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/function_graphs/columns/created_at/alterations/alt0000000066 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/created_at/alterations/alt0000000067.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/created_at/alterations/alt0000000067.sql new file mode 100644 index 00000000..a25bfc97 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/created_at/alterations/alt0000000067.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/function_graphs/columns/created_at/alterations/alt0000000067 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/created_at/alterations/alt0000000068.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/created_at/alterations/alt0000000068.sql new file mode 100644 index 00000000..6c0a9b90 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/created_at/alterations/alt0000000068.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/function_graphs/columns/created_at/alterations/alt0000000068 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/created_at/column.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/created_at/column.sql new file mode 100644 index 00000000..9493bb0c --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/created_at/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/function_graphs/columns/created_at/column + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/created_by/alterations/alt0000000069.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/created_by/alterations/alt0000000069.sql new file mode 100644 index 00000000..dca28668 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/created_by/alterations/alt0000000069.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/function_graphs/columns/created_by/alterations/alt0000000069 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/created_by/column.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/created_by/column.sql new file mode 100644 index 00000000..76a5bbb4 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/created_by/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/function_graphs/columns/created_by/column + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/database_id/alterations/alt0000000070.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/database_id/alterations/alt0000000070.sql new file mode 100644 index 00000000..8d96544d --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/database_id/alterations/alt0000000070.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/function_graphs/columns/database_id/alterations/alt0000000070 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/database_id/alterations/alt0000000071.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/database_id/alterations/alt0000000071.sql new file mode 100644 index 00000000..6b26519e --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/database_id/alterations/alt0000000071.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/function_graphs/columns/database_id/alterations/alt0000000071 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/database_id/column.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/database_id/column.sql new file mode 100644 index 00000000..183c8e8d --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/database_id/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/function_graphs/columns/database_id/column + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/definitions_commit_id/alterations/alt0000000072.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/definitions_commit_id/alterations/alt0000000072.sql new file mode 100644 index 00000000..f66d3277 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/definitions_commit_id/alterations/alt0000000072.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/function_graphs/columns/definitions_commit_id/alterations/alt0000000072 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/definitions_commit_id/column.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/definitions_commit_id/column.sql new file mode 100644 index 00000000..72ccfb6f --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/definitions_commit_id/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/function_graphs/columns/definitions_commit_id/column + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/description/alterations/alt0000000073.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/description/alterations/alt0000000073.sql new file mode 100644 index 00000000..2862ccd4 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/description/alterations/alt0000000073.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/function_graphs/columns/description/alterations/alt0000000073 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/description/column.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/description/column.sql new file mode 100644 index 00000000..9fe1594a --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/description/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/function_graphs/columns/description/column + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/entity_id/alterations/alt0000000074.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/entity_id/alterations/alt0000000074.sql new file mode 100644 index 00000000..83c6ecc2 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/entity_id/alterations/alt0000000074.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/function_graphs/columns/entity_id/alterations/alt0000000074 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/entity_id/column.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/entity_id/column.sql new file mode 100644 index 00000000..2499f2c8 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/entity_id/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/function_graphs/columns/entity_id/column + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/id/alterations/alt0000000075.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/id/alterations/alt0000000075.sql new file mode 100644 index 00000000..30c33dc0 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/id/alterations/alt0000000075.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/function_graphs/columns/id/alterations/alt0000000075 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/id/alterations/alt0000000076.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/id/alterations/alt0000000076.sql new file mode 100644 index 00000000..04691594 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/id/alterations/alt0000000076.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/function_graphs/columns/id/alterations/alt0000000076 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/id/alterations/alt0000000077.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/id/alterations/alt0000000077.sql new file mode 100644 index 00000000..e158fff4 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/id/alterations/alt0000000077.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/function_graphs/columns/id/alterations/alt0000000077 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/id/column.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/id/column.sql new file mode 100644 index 00000000..76672d03 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/id/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/function_graphs/columns/id/column + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/is_valid/alterations/alt0000000078.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/is_valid/alterations/alt0000000078.sql new file mode 100644 index 00000000..4f466dcb --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/is_valid/alterations/alt0000000078.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/function_graphs/columns/is_valid/alterations/alt0000000078 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/is_valid/alterations/alt0000000079.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/is_valid/alterations/alt0000000079.sql new file mode 100644 index 00000000..c3889f55 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/is_valid/alterations/alt0000000079.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/function_graphs/columns/is_valid/alterations/alt0000000079 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/is_valid/alterations/alt0000000080.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/is_valid/alterations/alt0000000080.sql new file mode 100644 index 00000000..9a41b39d --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/is_valid/alterations/alt0000000080.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/function_graphs/columns/is_valid/alterations/alt0000000080 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/is_valid/column.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/is_valid/column.sql new file mode 100644 index 00000000..8237a07b --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/is_valid/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/function_graphs/columns/is_valid/column + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/name/alterations/alt0000000081.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/name/alterations/alt0000000081.sql new file mode 100644 index 00000000..f3c2dc04 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/name/alterations/alt0000000081.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/function_graphs/columns/name/alterations/alt0000000081 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/name/alterations/alt0000000082.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/name/alterations/alt0000000082.sql new file mode 100644 index 00000000..7e102bc6 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/name/alterations/alt0000000082.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/function_graphs/columns/name/alterations/alt0000000082 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/name/column.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/name/column.sql new file mode 100644 index 00000000..5abee870 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/name/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/function_graphs/columns/name/column + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/store_id/alterations/alt0000000083.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/store_id/alterations/alt0000000083.sql new file mode 100644 index 00000000..d1cb5139 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/store_id/alterations/alt0000000083.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/function_graphs/columns/store_id/alterations/alt0000000083 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/store_id/alterations/alt0000000084.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/store_id/alterations/alt0000000084.sql new file mode 100644 index 00000000..d3355d2f --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/store_id/alterations/alt0000000084.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/function_graphs/columns/store_id/alterations/alt0000000084 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/store_id/column.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/store_id/column.sql new file mode 100644 index 00000000..9b0a72c5 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/store_id/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/function_graphs/columns/store_id/column + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/updated_at/alterations/alt0000000085.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/updated_at/alterations/alt0000000085.sql new file mode 100644 index 00000000..0c9c7e50 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/updated_at/alterations/alt0000000085.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/function_graphs/columns/updated_at/alterations/alt0000000085 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/updated_at/alterations/alt0000000086.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/updated_at/alterations/alt0000000086.sql new file mode 100644 index 00000000..e6db6fdc --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/updated_at/alterations/alt0000000086.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/function_graphs/columns/updated_at/alterations/alt0000000086 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/updated_at/alterations/alt0000000087.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/updated_at/alterations/alt0000000087.sql new file mode 100644 index 00000000..99e4605c --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/updated_at/alterations/alt0000000087.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/function_graphs/columns/updated_at/alterations/alt0000000087 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/updated_at/column.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/updated_at/column.sql new file mode 100644 index 00000000..a5a61a18 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/updated_at/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/function_graphs/columns/updated_at/column + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/validation_errors/alterations/alt0000000088.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/validation_errors/alterations/alt0000000088.sql new file mode 100644 index 00000000..77023801 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/validation_errors/alterations/alt0000000088.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/function_graphs/columns/validation_errors/alterations/alt0000000088 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/validation_errors/column.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/validation_errors/column.sql new file mode 100644 index 00000000..364e901b --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/columns/validation_errors/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/function_graphs/columns/validation_errors/column + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/constraints/function_graphs_pkey/constraint.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/constraints/function_graphs_pkey/constraint.sql new file mode 100644 index 00000000..d1c3e14e --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/constraints/function_graphs_pkey/constraint.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/function_graphs/constraints/function_graphs_pkey/constraint + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/indexes/idx_function_graphs_unique_name.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/indexes/idx_function_graphs_unique_name.sql new file mode 100644 index 00000000..e7d79672 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/indexes/idx_function_graphs_unique_name.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/function_graphs/indexes/idx_function_graphs_unique_name + + +SELECT verify_index('constructive_fbp_public.function_graphs', 'idx_function_graphs_unique_name'); + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/table.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/table.sql new file mode 100644 index 00000000..259380c0 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/function_graphs/table.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/function_graphs/table + + +SELECT verify_table('constructive_fbp_public.function_graphs'); + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/alterations/alt0000000089.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/alterations/alt0000000089.sql new file mode 100644 index 00000000..1ab60dbb --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/alterations/alt0000000089.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_commit/alterations/alt0000000089 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/alterations/alt0000000090.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/alterations/alt0000000090.sql new file mode 100644 index 00000000..37c854d3 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/alterations/alt0000000090.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_commit/alterations/alt0000000090 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/columns/author_id/alterations/alt0000000091.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/columns/author_id/alterations/alt0000000091.sql new file mode 100644 index 00000000..8cd3cfdd --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/columns/author_id/alterations/alt0000000091.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_commit/columns/author_id/alterations/alt0000000091 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/columns/author_id/column.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/columns/author_id/column.sql new file mode 100644 index 00000000..11cac663 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/columns/author_id/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_commit/columns/author_id/column + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/columns/committer_id/alterations/alt0000000092.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/columns/committer_id/alterations/alt0000000092.sql new file mode 100644 index 00000000..2424b412 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/columns/committer_id/alterations/alt0000000092.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_commit/columns/committer_id/alterations/alt0000000092 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/columns/committer_id/column.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/columns/committer_id/column.sql new file mode 100644 index 00000000..3b13ed27 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/columns/committer_id/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_commit/columns/committer_id/column + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/columns/database_id/alterations/alt0000000093.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/columns/database_id/alterations/alt0000000093.sql new file mode 100644 index 00000000..f1afaa44 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/columns/database_id/alterations/alt0000000093.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_commit/columns/database_id/alterations/alt0000000093 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/columns/database_id/alterations/alt0000000094.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/columns/database_id/alterations/alt0000000094.sql new file mode 100644 index 00000000..6c2048d9 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/columns/database_id/alterations/alt0000000094.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_commit/columns/database_id/alterations/alt0000000094 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/columns/database_id/column.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/columns/database_id/column.sql new file mode 100644 index 00000000..b39d2926 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/columns/database_id/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_commit/columns/database_id/column + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/columns/date/alterations/alt0000000095.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/columns/date/alterations/alt0000000095.sql new file mode 100644 index 00000000..5a6c084d --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/columns/date/alterations/alt0000000095.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_commit/columns/date/alterations/alt0000000095 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/columns/date/alterations/alt0000000096.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/columns/date/alterations/alt0000000096.sql new file mode 100644 index 00000000..c78b0c03 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/columns/date/alterations/alt0000000096.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_commit/columns/date/alterations/alt0000000096 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/columns/date/alterations/alt0000000097.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/columns/date/alterations/alt0000000097.sql new file mode 100644 index 00000000..02e4e8d7 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/columns/date/alterations/alt0000000097.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_commit/columns/date/alterations/alt0000000097 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/columns/date/column.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/columns/date/column.sql new file mode 100644 index 00000000..34436430 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/columns/date/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_commit/columns/date/column + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/columns/id/alterations/alt0000000098.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/columns/id/alterations/alt0000000098.sql new file mode 100644 index 00000000..10d11902 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/columns/id/alterations/alt0000000098.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_commit/columns/id/alterations/alt0000000098 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/columns/id/alterations/alt0000000099.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/columns/id/alterations/alt0000000099.sql new file mode 100644 index 00000000..5d78aea6 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/columns/id/alterations/alt0000000099.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_commit/columns/id/alterations/alt0000000099 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/columns/id/alterations/alt0000000100.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/columns/id/alterations/alt0000000100.sql new file mode 100644 index 00000000..fdcdfd3e --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/columns/id/alterations/alt0000000100.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_commit/columns/id/alterations/alt0000000100 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/columns/id/column.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/columns/id/column.sql new file mode 100644 index 00000000..da28872a --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/columns/id/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_commit/columns/id/column + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/columns/message/alterations/alt0000000101.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/columns/message/alterations/alt0000000101.sql new file mode 100644 index 00000000..8afcbc35 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/columns/message/alterations/alt0000000101.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_commit/columns/message/alterations/alt0000000101 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/columns/message/column.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/columns/message/column.sql new file mode 100644 index 00000000..e9d4f822 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/columns/message/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_commit/columns/message/column + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/columns/parent_ids/alterations/alt0000000102.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/columns/parent_ids/alterations/alt0000000102.sql new file mode 100644 index 00000000..225b515e --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/columns/parent_ids/alterations/alt0000000102.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_commit/columns/parent_ids/alterations/alt0000000102 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/columns/parent_ids/column.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/columns/parent_ids/column.sql new file mode 100644 index 00000000..5b6c4b44 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/columns/parent_ids/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_commit/columns/parent_ids/column + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/columns/store_id/alterations/alt0000000103.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/columns/store_id/alterations/alt0000000103.sql new file mode 100644 index 00000000..f9dd7ae1 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/columns/store_id/alterations/alt0000000103.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_commit/columns/store_id/alterations/alt0000000103 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/columns/store_id/alterations/alt0000000104.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/columns/store_id/alterations/alt0000000104.sql new file mode 100644 index 00000000..7d747433 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/columns/store_id/alterations/alt0000000104.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_commit/columns/store_id/alterations/alt0000000104 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/columns/store_id/column.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/columns/store_id/column.sql new file mode 100644 index 00000000..61dd6836 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/columns/store_id/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_commit/columns/store_id/column + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/columns/tree_id/alterations/alt0000000105.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/columns/tree_id/alterations/alt0000000105.sql new file mode 100644 index 00000000..da365407 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/columns/tree_id/alterations/alt0000000105.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_commit/columns/tree_id/alterations/alt0000000105 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/columns/tree_id/column.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/columns/tree_id/column.sql new file mode 100644 index 00000000..0d885b02 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/columns/tree_id/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_commit/columns/tree_id/column + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/constraints/graph_commits_pkey/constraint.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/constraints/graph_commits_pkey/constraint.sql new file mode 100644 index 00000000..54b9b3b0 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/constraints/graph_commits_pkey/constraint.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_commit/constraints/graph_commits_pkey/constraint + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/table.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/table.sql new file mode 100644 index 00000000..433cb748 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_commit/table.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_commit/table + + +SELECT verify_table('constructive_fbp_public.graph_commit'); + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_object/alterations/alt0000000106.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_object/alterations/alt0000000106.sql new file mode 100644 index 00000000..45d95acb --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_object/alterations/alt0000000106.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_object/alterations/alt0000000106 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_object/alterations/alt0000000107.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_object/alterations/alt0000000107.sql new file mode 100644 index 00000000..9da36f61 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_object/alterations/alt0000000107.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_object/alterations/alt0000000107 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_object/columns/created_at/alterations/alt0000000108.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_object/columns/created_at/alterations/alt0000000108.sql new file mode 100644 index 00000000..61ad54d7 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_object/columns/created_at/alterations/alt0000000108.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_object/columns/created_at/alterations/alt0000000108 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_object/columns/created_at/alterations/alt0000000109.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_object/columns/created_at/alterations/alt0000000109.sql new file mode 100644 index 00000000..ff451991 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_object/columns/created_at/alterations/alt0000000109.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_object/columns/created_at/alterations/alt0000000109 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_object/columns/created_at/column.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_object/columns/created_at/column.sql new file mode 100644 index 00000000..42beaf96 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_object/columns/created_at/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_object/columns/created_at/column + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_object/columns/data/alterations/alt0000000110.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_object/columns/data/alterations/alt0000000110.sql new file mode 100644 index 00000000..3ce90326 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_object/columns/data/alterations/alt0000000110.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_object/columns/data/alterations/alt0000000110 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_object/columns/data/column.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_object/columns/data/column.sql new file mode 100644 index 00000000..6c7eb3ea --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_object/columns/data/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_object/columns/data/column + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_object/columns/database_id/alterations/alt0000000111.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_object/columns/database_id/alterations/alt0000000111.sql new file mode 100644 index 00000000..58baca3f --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_object/columns/database_id/alterations/alt0000000111.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_object/columns/database_id/alterations/alt0000000111 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_object/columns/database_id/alterations/alt0000000112.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_object/columns/database_id/alterations/alt0000000112.sql new file mode 100644 index 00000000..c465aae7 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_object/columns/database_id/alterations/alt0000000112.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_object/columns/database_id/alterations/alt0000000112 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_object/columns/database_id/column.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_object/columns/database_id/column.sql new file mode 100644 index 00000000..1220daa1 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_object/columns/database_id/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_object/columns/database_id/column + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_object/columns/id/alterations/alt0000000113.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_object/columns/id/alterations/alt0000000113.sql new file mode 100644 index 00000000..dd8939eb --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_object/columns/id/alterations/alt0000000113.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_object/columns/id/alterations/alt0000000113 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_object/columns/id/alterations/alt0000000114.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_object/columns/id/alterations/alt0000000114.sql new file mode 100644 index 00000000..77554f2e --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_object/columns/id/alterations/alt0000000114.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_object/columns/id/alterations/alt0000000114 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_object/columns/id/column.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_object/columns/id/column.sql new file mode 100644 index 00000000..64ea3ebb --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_object/columns/id/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_object/columns/id/column + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_object/columns/kids/alterations/alt0000000115.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_object/columns/kids/alterations/alt0000000115.sql new file mode 100644 index 00000000..705b694d --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_object/columns/kids/alterations/alt0000000115.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_object/columns/kids/alterations/alt0000000115 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_object/columns/kids/alterations/alt0000000116.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_object/columns/kids/alterations/alt0000000116.sql new file mode 100644 index 00000000..c971c1af --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_object/columns/kids/alterations/alt0000000116.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_object/columns/kids/alterations/alt0000000116 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_object/columns/kids/column.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_object/columns/kids/column.sql new file mode 100644 index 00000000..4792348e --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_object/columns/kids/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_object/columns/kids/column + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_object/columns/ktree/alterations/alt0000000117.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_object/columns/ktree/alterations/alt0000000117.sql new file mode 100644 index 00000000..708cefcd --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_object/columns/ktree/alterations/alt0000000117.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_object/columns/ktree/alterations/alt0000000117 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_object/columns/ktree/column.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_object/columns/ktree/column.sql new file mode 100644 index 00000000..9f786688 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_object/columns/ktree/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_object/columns/ktree/column + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_object/constraints/graph_objects_pkey/constraint.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_object/constraints/graph_objects_pkey/constraint.sql new file mode 100644 index 00000000..01bbd5ee --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_object/constraints/graph_objects_pkey/constraint.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_object/constraints/graph_objects_pkey/constraint + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_object/table.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_object/table.sql new file mode 100644 index 00000000..cff8b4fb --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_object/table.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_object/table + + +SELECT verify_table('constructive_fbp_public.graph_object'); + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_object/triggers/generate_id_hash.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_object/triggers/generate_id_hash.sql new file mode 100644 index 00000000..4692f3f4 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_object/triggers/generate_id_hash.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_object/triggers/generate_id_hash + + +SELECT verify_trigger('constructive_fbp_public.generate_id_hash'); + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_ref/alterations/alt0000000118.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_ref/alterations/alt0000000118.sql new file mode 100644 index 00000000..d78952a6 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_ref/alterations/alt0000000118.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_ref/alterations/alt0000000118 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_ref/alterations/alt0000000119.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_ref/alterations/alt0000000119.sql new file mode 100644 index 00000000..263c83b2 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_ref/alterations/alt0000000119.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_ref/alterations/alt0000000119 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_ref/columns/commit_id/alterations/alt0000000120.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_ref/columns/commit_id/alterations/alt0000000120.sql new file mode 100644 index 00000000..6f16d43c --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_ref/columns/commit_id/alterations/alt0000000120.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_ref/columns/commit_id/alterations/alt0000000120 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_ref/columns/commit_id/column.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_ref/columns/commit_id/column.sql new file mode 100644 index 00000000..6ae64327 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_ref/columns/commit_id/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_ref/columns/commit_id/column + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_ref/columns/database_id/alterations/alt0000000121.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_ref/columns/database_id/alterations/alt0000000121.sql new file mode 100644 index 00000000..b10ec875 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_ref/columns/database_id/alterations/alt0000000121.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_ref/columns/database_id/alterations/alt0000000121 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_ref/columns/database_id/alterations/alt0000000122.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_ref/columns/database_id/alterations/alt0000000122.sql new file mode 100644 index 00000000..4b02ba26 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_ref/columns/database_id/alterations/alt0000000122.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_ref/columns/database_id/alterations/alt0000000122 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_ref/columns/database_id/column.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_ref/columns/database_id/column.sql new file mode 100644 index 00000000..8c48434d --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_ref/columns/database_id/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_ref/columns/database_id/column + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_ref/columns/id/alterations/alt0000000123.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_ref/columns/id/alterations/alt0000000123.sql new file mode 100644 index 00000000..1f82722d --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_ref/columns/id/alterations/alt0000000123.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_ref/columns/id/alterations/alt0000000123 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_ref/columns/id/alterations/alt0000000124.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_ref/columns/id/alterations/alt0000000124.sql new file mode 100644 index 00000000..2d3f0f57 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_ref/columns/id/alterations/alt0000000124.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_ref/columns/id/alterations/alt0000000124 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_ref/columns/id/alterations/alt0000000125.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_ref/columns/id/alterations/alt0000000125.sql new file mode 100644 index 00000000..1a554065 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_ref/columns/id/alterations/alt0000000125.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_ref/columns/id/alterations/alt0000000125 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_ref/columns/id/column.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_ref/columns/id/column.sql new file mode 100644 index 00000000..5d44595b --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_ref/columns/id/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_ref/columns/id/column + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_ref/columns/name/alterations/alt0000000126.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_ref/columns/name/alterations/alt0000000126.sql new file mode 100644 index 00000000..891d1c04 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_ref/columns/name/alterations/alt0000000126.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_ref/columns/name/alterations/alt0000000126 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_ref/columns/name/alterations/alt0000000127.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_ref/columns/name/alterations/alt0000000127.sql new file mode 100644 index 00000000..db300d54 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_ref/columns/name/alterations/alt0000000127.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_ref/columns/name/alterations/alt0000000127 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_ref/columns/name/column.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_ref/columns/name/column.sql new file mode 100644 index 00000000..a1300698 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_ref/columns/name/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_ref/columns/name/column + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_ref/columns/store_id/alterations/alt0000000128.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_ref/columns/store_id/alterations/alt0000000128.sql new file mode 100644 index 00000000..29cf6295 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_ref/columns/store_id/alterations/alt0000000128.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_ref/columns/store_id/alterations/alt0000000128 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_ref/columns/store_id/alterations/alt0000000129.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_ref/columns/store_id/alterations/alt0000000129.sql new file mode 100644 index 00000000..d0a0bf83 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_ref/columns/store_id/alterations/alt0000000129.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_ref/columns/store_id/alterations/alt0000000129 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_ref/columns/store_id/column.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_ref/columns/store_id/column.sql new file mode 100644 index 00000000..edf54a52 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_ref/columns/store_id/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_ref/columns/store_id/column + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_ref/constraints/graph_refs_pkey/constraint.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_ref/constraints/graph_refs_pkey/constraint.sql new file mode 100644 index 00000000..00a577b0 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_ref/constraints/graph_refs_pkey/constraint.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_ref/constraints/graph_refs_pkey/constraint + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_ref/table.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_ref/table.sql new file mode 100644 index 00000000..5292fb8f --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_ref/table.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_ref/table + + +SELECT verify_table('constructive_fbp_public.graph_ref'); + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_store/alterations/alt0000000130.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_store/alterations/alt0000000130.sql new file mode 100644 index 00000000..9dc8d020 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_store/alterations/alt0000000130.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_store/alterations/alt0000000130 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_store/alterations/alt0000000131.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_store/alterations/alt0000000131.sql new file mode 100644 index 00000000..d307acb9 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_store/alterations/alt0000000131.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_store/alterations/alt0000000131 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_store/columns/created_at/alterations/alt0000000132.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_store/columns/created_at/alterations/alt0000000132.sql new file mode 100644 index 00000000..9b9a195f --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_store/columns/created_at/alterations/alt0000000132.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_store/columns/created_at/alterations/alt0000000132 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_store/columns/created_at/alterations/alt0000000133.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_store/columns/created_at/alterations/alt0000000133.sql new file mode 100644 index 00000000..d0273864 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_store/columns/created_at/alterations/alt0000000133.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_store/columns/created_at/alterations/alt0000000133 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_store/columns/created_at/column.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_store/columns/created_at/column.sql new file mode 100644 index 00000000..df4290b0 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_store/columns/created_at/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_store/columns/created_at/column + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_store/columns/database_id/alterations/alt0000000134.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_store/columns/database_id/alterations/alt0000000134.sql new file mode 100644 index 00000000..c49a09ed --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_store/columns/database_id/alterations/alt0000000134.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_store/columns/database_id/alterations/alt0000000134 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_store/columns/database_id/alterations/alt0000000135.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_store/columns/database_id/alterations/alt0000000135.sql new file mode 100644 index 00000000..4e1dd216 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_store/columns/database_id/alterations/alt0000000135.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_store/columns/database_id/alterations/alt0000000135 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_store/columns/database_id/column.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_store/columns/database_id/column.sql new file mode 100644 index 00000000..ed38c190 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_store/columns/database_id/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_store/columns/database_id/column + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_store/columns/hash/alterations/alt0000000136.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_store/columns/hash/alterations/alt0000000136.sql new file mode 100644 index 00000000..1f4ddc7f --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_store/columns/hash/alterations/alt0000000136.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_store/columns/hash/alterations/alt0000000136 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_store/columns/hash/column.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_store/columns/hash/column.sql new file mode 100644 index 00000000..2c95578a --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_store/columns/hash/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_store/columns/hash/column + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_store/columns/id/alterations/alt0000000137.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_store/columns/id/alterations/alt0000000137.sql new file mode 100644 index 00000000..2a818ee2 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_store/columns/id/alterations/alt0000000137.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_store/columns/id/alterations/alt0000000137 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_store/columns/id/alterations/alt0000000138.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_store/columns/id/alterations/alt0000000138.sql new file mode 100644 index 00000000..f7743f3b --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_store/columns/id/alterations/alt0000000138.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_store/columns/id/alterations/alt0000000138 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_store/columns/id/alterations/alt0000000139.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_store/columns/id/alterations/alt0000000139.sql new file mode 100644 index 00000000..9ff1411e --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_store/columns/id/alterations/alt0000000139.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_store/columns/id/alterations/alt0000000139 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_store/columns/id/column.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_store/columns/id/column.sql new file mode 100644 index 00000000..e2d7a938 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_store/columns/id/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_store/columns/id/column + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_store/columns/name/alterations/alt0000000140.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_store/columns/name/alterations/alt0000000140.sql new file mode 100644 index 00000000..14cbaed6 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_store/columns/name/alterations/alt0000000140.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_store/columns/name/alterations/alt0000000140 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_store/columns/name/alterations/alt0000000141.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_store/columns/name/alterations/alt0000000141.sql new file mode 100644 index 00000000..43f4e097 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_store/columns/name/alterations/alt0000000141.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_store/columns/name/alterations/alt0000000141 + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_store/columns/name/column.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_store/columns/name/column.sql new file mode 100644 index 00000000..753b57db --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_store/columns/name/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_store/columns/name/column + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_store/constraints/graph_stores_pkey/constraint.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_store/constraints/graph_stores_pkey/constraint.sql new file mode 100644 index 00000000..8381e463 --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_store/constraints/graph_stores_pkey/constraint.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_store/constraints/graph_stores_pkey/constraint + + + + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_store/indexes/idx_graph_store_unique_name.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_store/indexes/idx_graph_store_unique_name.sql new file mode 100644 index 00000000..b5b4fd2d --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_store/indexes/idx_graph_store_unique_name.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_store/indexes/idx_graph_store_unique_name + + +SELECT verify_index('constructive_fbp_public.graph_store', 'idx_graph_store_unique_name'); + + diff --git a/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_store/table.sql b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_store/table.sql new file mode 100644 index 00000000..89dfe69f --- /dev/null +++ b/pgpm/constructive-fbp/verify/schemas/constructive_fbp_public/tables/graph_store/table.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_fbp_public/tables/graph_store/table + + +SELECT verify_table('constructive_fbp_public.graph_store'); + + diff --git a/pgpm/constructive-infra-seed/Makefile b/pgpm/constructive-infra-seed/Makefile new file mode 100644 index 00000000..e22b3d5e --- /dev/null +++ b/pgpm/constructive-infra-seed/Makefile @@ -0,0 +1,6 @@ +EXTENSION = constructive-infra-seed +DATA = sql/constructive-infra-seed--0.0.1.sql + +PG_CONFIG = pg_config +PGXS := $(shell $(PG_CONFIG) --pgxs) +include $(PGXS) diff --git a/pgpm/constructive-infra-seed/constructive-infra-seed.control b/pgpm/constructive-infra-seed/constructive-infra-seed.control new file mode 100644 index 00000000..dd209d74 --- /dev/null +++ b/pgpm/constructive-infra-seed/constructive-infra-seed.control @@ -0,0 +1,7 @@ +# constructive-infra-seed extension +comment = 'Built-in function seed data for constructive-infra' +default_version = '0.0.1' +module_pathname = '$libdir/constructive-infra-seed' +requires = 'constructive-infra' +relocatable = false +superuser = false diff --git a/pgpm/constructive-infra-seed/deploy/schemas/constructive_infra_public/partitions/create_default_partitions.sql b/pgpm/constructive-infra-seed/deploy/schemas/constructive_infra_public/partitions/create_default_partitions.sql new file mode 100644 index 00000000..d4a94b52 --- /dev/null +++ b/pgpm/constructive-infra-seed/deploy/schemas/constructive_infra_public/partitions/create_default_partitions.sql @@ -0,0 +1,26 @@ +-- Deploy: schemas/constructive_infra_public/partitions/create_default_partitions +-- made with <3 @ constructive.io + +-- In the monolith, partitions are created at runtime by metaschema triggers +-- during database provisioning. In standalone mode we create default partitions +-- so that inserts work without the metaschema provisioning layer. + +BEGIN; + +CREATE TABLE IF NOT EXISTS constructive_infra_public.platform_function_invocations_default + PARTITION OF constructive_infra_public.platform_function_invocations DEFAULT; + +CREATE TABLE IF NOT EXISTS constructive_infra_public.platform_function_execution_logs_default + PARTITION OF constructive_infra_public.platform_function_execution_logs DEFAULT; + +CREATE TABLE IF NOT EXISTS constructive_infra_public.platform_namespace_events_default + PARTITION OF constructive_infra_public.platform_namespace_events DEFAULT; + +-- FBP module partitioned tables +CREATE TABLE IF NOT EXISTS constructive_fbp_private.function_graph_executions_default + PARTITION OF constructive_fbp_private.function_graph_executions DEFAULT; + +CREATE TABLE IF NOT EXISTS constructive_fbp_private.function_graph_execution_outputs_default + PARTITION OF constructive_fbp_private.function_graph_execution_outputs DEFAULT; + +COMMIT; diff --git a/pgpm/constructive-infra-seed/deploy/schemas/constructive_infra_public/tables/platform_function_definitions/fixtures/seed_built_in_functions.sql b/pgpm/constructive-infra-seed/deploy/schemas/constructive_infra_public/tables/platform_function_definitions/fixtures/seed_built_in_functions.sql new file mode 100644 index 00000000..3776b9a1 --- /dev/null +++ b/pgpm/constructive-infra-seed/deploy/schemas/constructive_infra_public/tables/platform_function_definitions/fixtures/seed_built_in_functions.sql @@ -0,0 +1,91 @@ +-- Deploy: schemas/constructive_infra_public/tables/platform_function_definitions/fixtures/seed_built_in_functions +-- made with <3 @ constructive.io +-- +-- AUTO-GENERATED by scripts/register-functions.ts +-- Do not edit manually — run: make register + +-- requires: schemas/constructive_infra_public/partitions/create_default_partitions +-- requires: schemas/constructive_infra_public/tables/platform_namespaces/fixtures/seed_default_namespace + +BEGIN; + +INSERT INTO constructive_infra_public.platform_function_definitions + (name, task_identifier, service_url, is_invocable, is_built_in, scope, description, + namespace_id, required_secrets, required_configs, payload_schema) +VALUES + ( + 'node-example', + 'node-example', + 'http://localhost:8083', + true, true, 'platform', + 'Example Node.js function — copy this to create a new function', + (SELECT id FROM constructive_infra_public.platform_namespaces WHERE name = 'default' AND database_id = '00000000-0000-0000-0000-000000000000'), + ARRAY[]::constructive_infra_public.function_requirement[], + ARRAY[]::constructive_infra_public.function_requirement[], + '{"type":"object","properties":{"message":{"type":"string","description":"A message to process"}},"additionalProperties":true}'::jsonb + ), + ( + 'python-example', + 'python-example', + 'http://localhost:8084', + true, true, 'platform', + 'Example Python function — copy this to create a new Python function', + (SELECT id FROM constructive_infra_public.platform_namespaces WHERE name = 'default' AND database_id = '00000000-0000-0000-0000-000000000000'), + ARRAY[]::constructive_infra_public.function_requirement[], + ARRAY[]::constructive_infra_public.function_requirement[], + '{"type":"object","properties":{"message":{"type":"string","description":"A message to process"}},"additionalProperties":true}'::jsonb + ), + ( + 'send-email', + 'send-email', + 'http://localhost:8081', + true, true, 'platform', + 'Sends transactional emails via Mailgun or SMTP', + (SELECT id FROM constructive_infra_public.platform_namespaces WHERE name = 'default' AND database_id = '00000000-0000-0000-0000-000000000000'), + ARRAY[ + ROW('MAILGUN_API_KEY', false), + ROW('MAILGUN_DOMAIN', false), + ROW('MAILGUN_FROM', false) + ]::constructive_infra_public.function_requirement[], + ARRAY[ + ROW('EMAIL_SEND_USE_SMTP', false), + ROW('SMTP_HOST', false), + ROW('SMTP_PORT', false), + ROW('SMTP_FROM', false), + ROW('SEND_EMAIL_DRY_RUN', false) + ]::constructive_infra_public.function_requirement[], + '{"type":"object","required":["to","subject"],"properties":{"to":{"type":"string","format":"email","description":"Recipient email address"},"subject":{"type":"string","description":"Email subject line"},"html":{"type":"string","description":"HTML body content"},"text":{"type":"string","description":"Plain text body content"},"from":{"type":"string","format":"email","description":"Sender email address (overrides env default)"},"replyTo":{"type":"string","format":"email","description":"Reply-to email address"}},"additionalProperties":false}'::jsonb + ), + ( + 'send-verification-link', + 'send-verification-link', + 'http://localhost:8082', + true, true, 'platform', + 'Sends invite, password reset, and verification emails', + (SELECT id FROM constructive_infra_public.platform_namespaces WHERE name = 'default' AND database_id = '00000000-0000-0000-0000-000000000000'), + ARRAY[ + ROW('MAILGUN_API_KEY', false), + ROW('MAILGUN_DOMAIN', false), + ROW('MAILGUN_FROM', false), + ROW('MAILGUN_REPLY', false) + ]::constructive_infra_public.function_requirement[], + ARRAY[ + ROW('EMAIL_SEND_USE_SMTP', false), + ROW('SMTP_HOST', false), + ROW('SMTP_PORT', false), + ROW('SMTP_FROM', false), + ROW('LOCAL_APP_PORT', false), + ROW('SEND_VERIFICATION_LINK_DRY_RUN', false) + ]::constructive_infra_public.function_requirement[], + '{"type":"object","required":["email_type","email"],"properties":{"email_type":{"type":"string","enum":["invite_email","forgot_password","email_verification"],"description":"Type of verification email to send"},"email":{"type":"string","format":"email","description":"Recipient email address"},"invite_type":{"type":["number","string"],"description":"Invite type identifier (for invite_email)"},"invite_token":{"type":"string","description":"Invitation token (required for invite_email)"},"sender_id":{"type":"string","format":"uuid","description":"User ID of the sender (required for invite_email)"},"user_id":{"type":"string","format":"uuid","description":"User ID (required for forgot_password)"},"reset_token":{"type":"string","description":"Password reset token (required for forgot_password)"},"email_id":{"type":"string","format":"uuid","description":"Email record ID (required for email_verification)"},"verification_token":{"type":"string","description":"Email verification token (required for email_verification)"}},"additionalProperties":false}'::jsonb + ) +ON CONFLICT (scope, name) DO UPDATE SET + task_identifier = EXCLUDED.task_identifier, + service_url = EXCLUDED.service_url, + namespace_id = EXCLUDED.namespace_id, + required_secrets = EXCLUDED.required_secrets, + required_configs = EXCLUDED.required_configs, + description = EXCLUDED.description, + payload_schema = EXCLUDED.payload_schema; + +COMMIT; diff --git a/pgpm/constructive-infra-seed/deploy/schemas/constructive_infra_public/tables/platform_namespaces/fixtures/seed_default_namespace.sql b/pgpm/constructive-infra-seed/deploy/schemas/constructive_infra_public/tables/platform_namespaces/fixtures/seed_default_namespace.sql new file mode 100644 index 00000000..3df22844 --- /dev/null +++ b/pgpm/constructive-infra-seed/deploy/schemas/constructive_infra_public/tables/platform_namespaces/fixtures/seed_default_namespace.sql @@ -0,0 +1,12 @@ +-- Deploy: schemas/constructive_infra_public/tables/platform_namespaces/fixtures/seed_default_namespace +-- made with <3 @ constructive.io + +BEGIN; + +INSERT INTO constructive_infra_public.platform_namespaces + (name, namespace_name, description, is_active, database_id) +VALUES + ('default', 'default', 'Default platform namespace', true, '00000000-0000-0000-0000-000000000000') +ON CONFLICT (database_id, name) DO NOTHING; + +COMMIT; diff --git a/pgpm/constructive-infra-seed/package.json b/pgpm/constructive-infra-seed/package.json new file mode 100644 index 00000000..265663fc --- /dev/null +++ b/pgpm/constructive-infra-seed/package.json @@ -0,0 +1,30 @@ +{ + "name": "@constructive-io/constructive-infra-seed", + "version": "0.0.1", + "description": "Built-in platform function seed data for constructive-infra", + "author": "Constructive ", + "keywords": [ + "postgresql", + "pgpm", + "constructive-infra", + "seed" + ], + "publishConfig": { + "access": "public" + }, + "scripts": { + "bundle": "pgpm package", + "test": "jest", + "test:watch": "jest --watch" + }, + "repository": { + "type": "git", + "url": "https://github.com/constructive-io/constructive-functions" + }, + "dependencies": { + "@constructive-io/constructive-infra": "0.0.1" + }, + "devDependencies": { + "pgpm": "^4.26.1" + } +} diff --git a/pgpm/constructive-infra-seed/pgpm.plan b/pgpm/constructive-infra-seed/pgpm.plan new file mode 100644 index 00000000..7ec9bd32 --- /dev/null +++ b/pgpm/constructive-infra-seed/pgpm.plan @@ -0,0 +1,7 @@ +%syntax-version=1.0.0 +%project=constructive-infra-seed +%uri=constructive-infra-seed + +schemas/constructive_infra_public/partitions/create_default_partitions 2017-08-11T08:11:51Z Constructive # create default partitions for range-partitioned tables +schemas/constructive_infra_public/tables/platform_namespaces/fixtures/seed_default_namespace [schemas/constructive_infra_public/partitions/create_default_partitions] 2017-08-11T08:11:51Z Constructive # seed default platform namespace +schemas/constructive_infra_public/tables/platform_function_definitions/fixtures/seed_built_in_functions [schemas/constructive_infra_public/tables/platform_namespaces/fixtures/seed_default_namespace] 2017-08-11T08:11:51Z Constructive # seed built-in platform functions with required_secrets and namespace diff --git a/pgpm/constructive-infra-seed/revert/schemas/constructive_infra_public/partitions/create_default_partitions.sql b/pgpm/constructive-infra-seed/revert/schemas/constructive_infra_public/partitions/create_default_partitions.sql new file mode 100644 index 00000000..654d0f1f --- /dev/null +++ b/pgpm/constructive-infra-seed/revert/schemas/constructive_infra_public/partitions/create_default_partitions.sql @@ -0,0 +1,11 @@ +-- Revert: schemas/constructive_infra_public/partitions/create_default_partitions + +BEGIN; + +DROP TABLE IF EXISTS constructive_infra_public.platform_function_invocations_default; +DROP TABLE IF EXISTS constructive_infra_public.platform_function_execution_logs_default; +DROP TABLE IF EXISTS constructive_infra_public.platform_namespace_events_default; +DROP TABLE IF EXISTS constructive_fbp_private.function_graph_executions_default; +DROP TABLE IF EXISTS constructive_fbp_private.function_graph_execution_outputs_default; + +COMMIT; diff --git a/pgpm/constructive-infra-seed/revert/schemas/constructive_infra_public/tables/platform_function_definitions/fixtures/seed_built_in_functions.sql b/pgpm/constructive-infra-seed/revert/schemas/constructive_infra_public/tables/platform_function_definitions/fixtures/seed_built_in_functions.sql new file mode 100644 index 00000000..f42864e4 --- /dev/null +++ b/pgpm/constructive-infra-seed/revert/schemas/constructive_infra_public/tables/platform_function_definitions/fixtures/seed_built_in_functions.sql @@ -0,0 +1,12 @@ +-- Revert: schemas/constructive_infra_public/tables/platform_function_definitions/fixtures/seed_built_in_functions +-- made with <3 @ constructive.io +-- AUTO-GENERATED by scripts/register-functions.ts + +BEGIN; + +DELETE FROM constructive_infra_public.platform_function_definitions +WHERE is_built_in = true + AND scope = 'platform' + AND name IN ('node-example', 'python-example', 'send-email', 'send-verification-link'); + +COMMIT; diff --git a/pgpm/constructive-infra-seed/revert/schemas/constructive_infra_public/tables/platform_namespaces/fixtures/seed_default_namespace.sql b/pgpm/constructive-infra-seed/revert/schemas/constructive_infra_public/tables/platform_namespaces/fixtures/seed_default_namespace.sql new file mode 100644 index 00000000..edb1b3d4 --- /dev/null +++ b/pgpm/constructive-infra-seed/revert/schemas/constructive_infra_public/tables/platform_namespaces/fixtures/seed_default_namespace.sql @@ -0,0 +1,10 @@ +-- Revert: schemas/constructive_infra_public/tables/platform_namespaces/fixtures/seed_default_namespace +-- made with <3 @ constructive.io + +BEGIN; + +DELETE FROM constructive_infra_public.platform_namespaces +WHERE name = 'default' + AND database_id = '00000000-0000-0000-0000-000000000000'; + +COMMIT; diff --git a/pgpm/constructive-infra-seed/verify/schemas/constructive_infra_public/partitions/create_default_partitions.sql b/pgpm/constructive-infra-seed/verify/schemas/constructive_infra_public/partitions/create_default_partitions.sql new file mode 100644 index 00000000..298a1fa4 --- /dev/null +++ b/pgpm/constructive-infra-seed/verify/schemas/constructive_infra_public/partitions/create_default_partitions.sql @@ -0,0 +1,11 @@ +-- Verify: schemas/constructive_infra_public/partitions/create_default_partitions + +BEGIN; + +SELECT 1 FROM pg_class WHERE relname = 'platform_function_invocations_default'; +SELECT 1 FROM pg_class WHERE relname = 'platform_function_execution_logs_default'; +SELECT 1 FROM pg_class WHERE relname = 'platform_namespace_events_default'; +SELECT 1 FROM pg_class WHERE relname = 'function_graph_executions_default'; +SELECT 1 FROM pg_class WHERE relname = 'function_graph_execution_outputs_default'; + +ROLLBACK; diff --git a/pgpm/constructive-infra-seed/verify/schemas/constructive_infra_public/tables/platform_function_definitions/fixtures/seed_built_in_functions.sql b/pgpm/constructive-infra-seed/verify/schemas/constructive_infra_public/tables/platform_function_definitions/fixtures/seed_built_in_functions.sql new file mode 100644 index 00000000..5e55365d --- /dev/null +++ b/pgpm/constructive-infra-seed/verify/schemas/constructive_infra_public/tables/platform_function_definitions/fixtures/seed_built_in_functions.sql @@ -0,0 +1,19 @@ +-- Verify: schemas/constructive_infra_public/tables/platform_function_definitions/fixtures/seed_built_in_functions +-- made with <3 @ constructive.io +-- AUTO-GENERATED by scripts/register-functions.ts + +BEGIN; + +SELECT 1 FROM constructive_infra_public.platform_function_definitions +WHERE name = 'node-example' AND is_built_in = true; + +SELECT 1 FROM constructive_infra_public.platform_function_definitions +WHERE name = 'python-example' AND is_built_in = true; + +SELECT 1 FROM constructive_infra_public.platform_function_definitions +WHERE name = 'send-email' AND is_built_in = true; + +SELECT 1 FROM constructive_infra_public.platform_function_definitions +WHERE name = 'send-verification-link' AND is_built_in = true; + +ROLLBACK; diff --git a/pgpm/constructive-infra-seed/verify/schemas/constructive_infra_public/tables/platform_namespaces/fixtures/seed_default_namespace.sql b/pgpm/constructive-infra-seed/verify/schemas/constructive_infra_public/tables/platform_namespaces/fixtures/seed_default_namespace.sql new file mode 100644 index 00000000..f036ccbd --- /dev/null +++ b/pgpm/constructive-infra-seed/verify/schemas/constructive_infra_public/tables/platform_namespaces/fixtures/seed_default_namespace.sql @@ -0,0 +1,10 @@ +-- Verify: schemas/constructive_infra_public/tables/platform_namespaces/fixtures/seed_default_namespace +-- made with <3 @ constructive.io + +BEGIN; + +SELECT 1 FROM constructive_infra_public.platform_namespaces +WHERE name = 'default' + AND database_id = '00000000-0000-0000-0000-000000000000'; + +ROLLBACK; diff --git a/pgpm/constructive-infra/constructive-infra.control b/pgpm/constructive-infra/constructive-infra.control index 3d300796..a315e9c5 100644 --- a/pgpm/constructive-infra/constructive-infra.control +++ b/pgpm/constructive-infra/constructive-infra.control @@ -2,4 +2,4 @@ comment = 'constructive-infra module' default_version = '0.0.1' relocatable = false -requires = 'plpgsql,pgpm-inflection,pgpm-stamps' +requires = 'plpgsql,pgpm-inflection,pgpm-stamps,pgpm-database-jobs' diff --git a/pgpm/constructive-infra/deploy/schemas/constructive_infra_public/tables/platform_function_definitions/columns/payload_schema/column.sql b/pgpm/constructive-infra/deploy/schemas/constructive_infra_public/tables/platform_function_definitions/columns/payload_schema/column.sql new file mode 100644 index 00000000..db694901 --- /dev/null +++ b/pgpm/constructive-infra/deploy/schemas/constructive_infra_public/tables/platform_function_definitions/columns/payload_schema/column.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_infra_public/tables/platform_function_definitions/columns/payload_schema/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_infra_public/schema +-- requires: schemas/constructive_infra_public/tables/platform_function_definitions/table + + +ALTER TABLE "constructive_infra_public".platform_function_definitions + ADD COLUMN payload_schema jsonb; diff --git a/pgpm/constructive-infra/package.json b/pgpm/constructive-infra/package.json index 0f4d0e16..782429ab 100644 --- a/pgpm/constructive-infra/package.json +++ b/pgpm/constructive-infra/package.json @@ -1,7 +1,7 @@ { "name": "@constructive-io/constructive-infra", "version": "0.0.1", - "description": "Infrastructure module — schemas, types, all infra tables, triggers (no RLS/grants, standalone publishable)", + "description": "Infrastructure module — function definitions, invocations, namespaces, secret definitions", "author": "Constructive ", "keywords": [ "postgresql", @@ -18,7 +18,8 @@ }, "dependencies": { "@pgpm/inflection": "*", - "@pgpm/stamps": "*" + "@pgpm/stamps": "*", + "@pgpm/database-jobs": "*" }, "devDependencies": { "pgpm": "^4.26.1" diff --git a/pgpm/constructive-infra/pgpm.plan b/pgpm/constructive-infra/pgpm.plan index 7883d41a..ff4c5039 100644 --- a/pgpm/constructive-infra/pgpm.plan +++ b/pgpm/constructive-infra/pgpm.plan @@ -3,11 +3,14 @@ %uri=constructive-infra schemas/constructive_infra_private/schema 2017-08-11T08:11:51Z Constructive # add create_schema -schemas/constructive_infra_private/trigger_fns/platform_namespaces_rename_proxy [schemas/constructive_infra_private/schema] 2017-08-11T08:11:51Z Constructive # add create_trigger_function schemas/constructive_infra_public/schema 2017-08-11T08:11:51Z Constructive # add create_schema +schemas/constructive_infra_public/types/function_requirement/type [schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add create_composite_type schemas/constructive_infra_public/tables/platform_function_definitions/table [schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add create_table -schemas/constructive_infra_public/tables/platform_function_definitions/alterations/alt0000000001 [schemas/constructive_infra_public/tables/platform_function_definitions/table schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add disable_row_level_security -schemas/constructive_infra_public/tables/platform_function_definitions/alterations/alt0000000002 [schemas/constructive_infra_public/tables/platform_function_definitions/table schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_infra_public/tables/platform_namespaces/table [schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add create_table +schemas/constructive_infra_public/tables/platform_function_execution_logs/table [schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add create_partitioned_table +schemas/constructive_infra_public/tables/platform_function_invocations/table [schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add create_partitioned_table +schemas/constructive_infra_public/tables/platform_namespace_events/table [schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add create_partitioned_table +schemas/constructive_infra_public/tables/platform_secret_definitions/table [schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add create_table schemas/constructive_infra_public/tables/platform_function_definitions/columns/created_at/column [schemas/constructive_infra_public/tables/platform_function_definitions/table schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column schemas/constructive_infra_public/tables/platform_function_definitions/columns/created_at/alterations/alt0000000003 [schemas/constructive_infra_public/tables/platform_function_definitions/columns/created_at/column schemas/constructive_infra_public/tables/platform_function_definitions/table schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default schemas/constructive_infra_public/tables/platform_function_definitions/columns/description/column [schemas/constructive_infra_public/tables/platform_function_definitions/table schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column @@ -50,15 +53,7 @@ schemas/constructive_infra_public/tables/platform_function_definitions/columns/t schemas/constructive_infra_public/tables/platform_function_definitions/columns/task_identifier/alterations/alt0000000035 [schemas/constructive_infra_public/tables/platform_function_definitions/columns/task_identifier/column schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add set_comment schemas/constructive_infra_public/tables/platform_function_definitions/columns/updated_at/column [schemas/constructive_infra_public/tables/platform_function_definitions/table schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column schemas/constructive_infra_public/tables/platform_function_definitions/columns/updated_at/alterations/alt0000000036 [schemas/constructive_infra_public/tables/platform_function_definitions/columns/updated_at/column schemas/constructive_infra_public/tables/platform_function_definitions/table schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default -schemas/constructive_infra_public/tables/platform_namespaces/table [schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add create_table -schemas/constructive_infra_public/tables/platform_function_definitions/constraints/platform_function_definitions_pkey/constraint [schemas/constructive_infra_public/tables/platform_function_definitions/table schemas/constructive_infra_public/schema schemas/constructive_infra_public/tables/platform_function_definitions/columns/id/column] 2017-08-11T08:11:51Z Constructive # add alter_table_add_primary_key -schemas/constructive_infra_public/tables/platform_function_definitions/constraints/platform_function_definitions_scope_name_key/constraint [schemas/constructive_infra_public/tables/platform_function_definitions/table schemas/constructive_infra_public/schema schemas/constructive_infra_public/tables/platform_function_definitions/columns/scope/column schemas/constructive_infra_public/tables/platform_function_definitions/columns/name/column] 2017-08-11T08:11:51Z Constructive # add alter_table_add_unique_constraint -schemas/constructive_infra_public/tables/platform_function_definitions/indexes/platform_function_definitions_created_at_idx [schemas/constructive_infra_public/tables/platform_function_definitions/columns/created_at/column schemas/constructive_infra_public/tables/platform_function_definitions/table schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add create_index -schemas/constructive_infra_public/tables/platform_function_definitions/indexes/platform_function_definitions_updated_at_idx [schemas/constructive_infra_public/tables/platform_function_definitions/columns/updated_at/column schemas/constructive_infra_public/tables/platform_function_definitions/table schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add create_index -schemas/constructive_infra_public/tables/platform_function_definitions/triggers/timestamps_tg [schemas/constructive_infra_public/tables/platform_function_definitions/table schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add create_trigger -schemas/constructive_infra_public/tables/platform_function_execution_logs/table [schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add create_partitioned_table -schemas/constructive_infra_public/tables/platform_function_execution_logs/alterations/alt0000000037 [schemas/constructive_infra_public/tables/platform_function_execution_logs/table schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add disable_row_level_security -schemas/constructive_infra_public/tables/platform_function_execution_logs/alterations/alt0000000038 [schemas/constructive_infra_public/tables/platform_function_execution_logs/table schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_infra_public/tables/platform_function_definitions/columns/payload_schema/column [schemas/constructive_infra_public/tables/platform_function_definitions/table schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column payload_schema jsonb schemas/constructive_infra_public/tables/platform_function_execution_logs/columns/actor_id/column [schemas/constructive_infra_public/tables/platform_function_execution_logs/table schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column schemas/constructive_infra_public/tables/platform_function_execution_logs/columns/actor_id/alterations/alt0000000039 [schemas/constructive_infra_public/schema schemas/constructive_infra_public/tables/platform_function_execution_logs/columns/actor_id/column] 2017-08-11T08:11:51Z Constructive # add set_comment schemas/constructive_infra_public/tables/platform_function_execution_logs/columns/created_at/column [schemas/constructive_infra_public/tables/platform_function_execution_logs/table schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column @@ -84,11 +79,6 @@ schemas/constructive_infra_public/tables/platform_function_execution_logs/column schemas/constructive_infra_public/tables/platform_function_execution_logs/columns/metadata/alterations/alt0000000053 [schemas/constructive_infra_public/tables/platform_function_execution_logs/columns/metadata/column schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add set_comment schemas/constructive_infra_public/tables/platform_function_execution_logs/columns/task_identifier/column [schemas/constructive_infra_public/tables/platform_function_execution_logs/table schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column schemas/constructive_infra_public/tables/platform_function_execution_logs/columns/task_identifier/alterations/alt0000000054 [schemas/constructive_infra_public/tables/platform_function_execution_logs/columns/task_identifier/column schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add set_comment -schemas/constructive_infra_public/tables/platform_function_execution_logs/constraints/platform_function_execution_logs_pkey/constraint [schemas/constructive_infra_public/tables/platform_function_execution_logs/table schemas/constructive_infra_public/schema schemas/constructive_infra_public/tables/platform_function_execution_logs/columns/created_at/column schemas/constructive_infra_public/tables/platform_function_execution_logs/columns/id/column] 2017-08-11T08:11:51Z Constructive # add alter_table_add_primary_key -schemas/constructive_infra_public/tables/platform_function_execution_logs/indexes/platform_function_execution_logs_invocation_id_created_at_idx [schemas/constructive_infra_public/tables/platform_function_execution_logs/columns/invocation_id/column schemas/constructive_infra_public/tables/platform_function_execution_logs/columns/created_at/column schemas/constructive_infra_public/tables/platform_function_execution_logs/table schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add create_index -schemas/constructive_infra_public/tables/platform_function_invocations/table [schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add create_partitioned_table -schemas/constructive_infra_public/tables/platform_function_invocations/alterations/alt0000000055 [schemas/constructive_infra_public/schema schemas/constructive_infra_public/tables/platform_function_invocations/table] 2017-08-11T08:11:51Z Constructive # add disable_row_level_security -schemas/constructive_infra_public/tables/platform_function_invocations/alterations/alt0000000056 [schemas/constructive_infra_public/schema schemas/constructive_infra_public/tables/platform_function_invocations/table] 2017-08-11T08:11:51Z Constructive # add set_comment schemas/constructive_infra_public/tables/platform_function_invocations/columns/actor_id/column [schemas/constructive_infra_public/schema schemas/constructive_infra_public/tables/platform_function_invocations/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column schemas/constructive_infra_public/tables/platform_function_invocations/columns/actor_id/alterations/alt0000000057 [schemas/constructive_infra_public/tables/platform_function_invocations/columns/actor_id/column schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add set_comment schemas/constructive_infra_public/tables/platform_function_invocations/columns/completed_at/column [schemas/constructive_infra_public/schema schemas/constructive_infra_public/tables/platform_function_invocations/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column @@ -124,12 +114,6 @@ schemas/constructive_infra_public/tables/platform_function_invocations/columns/s schemas/constructive_infra_public/tables/platform_function_invocations/columns/task_identifier/column [schemas/constructive_infra_public/schema schemas/constructive_infra_public/tables/platform_function_invocations/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column schemas/constructive_infra_public/tables/platform_function_invocations/columns/task_identifier/alterations/alt0000000076 [schemas/constructive_infra_public/schema schemas/constructive_infra_public/tables/platform_function_invocations/table schemas/constructive_infra_public/tables/platform_function_invocations/columns/task_identifier/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null schemas/constructive_infra_public/tables/platform_function_invocations/columns/task_identifier/alterations/alt0000000077 [schemas/constructive_infra_public/schema schemas/constructive_infra_public/tables/platform_function_invocations/columns/task_identifier/column] 2017-08-11T08:11:51Z Constructive # add set_comment -schemas/constructive_infra_public/tables/platform_function_invocations/constraints/platform_function_invocations_pkey/constraint [schemas/constructive_infra_public/schema schemas/constructive_infra_public/tables/platform_function_invocations/table schemas/constructive_infra_public/tables/platform_function_invocations/columns/created_at/column schemas/constructive_infra_public/tables/platform_function_invocations/columns/id/column] 2017-08-11T08:11:51Z Constructive # add alter_table_add_primary_key -schemas/constructive_infra_public/tables/platform_function_invocations/indexes/platform_function_invocations_actor_id_created_at_idx [schemas/constructive_infra_public/tables/platform_function_invocations/columns/created_at/column schemas/constructive_infra_public/tables/platform_function_invocations/columns/actor_id/column schemas/constructive_infra_public/schema schemas/constructive_infra_public/tables/platform_function_invocations/table] 2017-08-11T08:11:51Z Constructive # add create_index -schemas/constructive_infra_public/tables/platform_function_invocations/indexes/platform_function_invocations_task_identifier_created_at_idx [schemas/constructive_infra_public/tables/platform_function_invocations/columns/created_at/column schemas/constructive_infra_public/schema schemas/constructive_infra_public/tables/platform_function_invocations/table schemas/constructive_infra_public/tables/platform_function_invocations/columns/task_identifier/column] 2017-08-11T08:11:51Z Constructive # add create_index -schemas/constructive_infra_public/tables/platform_namespace_events/table [schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add create_partitioned_table -schemas/constructive_infra_public/tables/platform_namespace_events/alterations/alt0000000078 [schemas/constructive_infra_public/tables/platform_namespace_events/table schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add disable_row_level_security -schemas/constructive_infra_public/tables/platform_namespace_events/alterations/alt0000000079 [schemas/constructive_infra_public/tables/platform_namespace_events/table schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add set_comment schemas/constructive_infra_public/tables/platform_namespace_events/columns/actor_id/column [schemas/constructive_infra_public/tables/platform_namespace_events/table schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column schemas/constructive_infra_public/tables/platform_namespace_events/columns/actor_id/alterations/alt0000000080 [schemas/constructive_infra_public/schema schemas/constructive_infra_public/tables/platform_namespace_events/columns/actor_id/column] 2017-08-11T08:11:51Z Constructive # add set_comment schemas/constructive_infra_public/tables/platform_namespace_events/columns/cpu_millicores/column [schemas/constructive_infra_public/tables/platform_namespace_events/table schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column @@ -166,10 +150,6 @@ schemas/constructive_infra_public/tables/platform_namespace_events/columns/pod_c schemas/constructive_infra_public/tables/platform_namespace_events/columns/pod_count/alterations/alt0000000099 [schemas/constructive_infra_public/tables/platform_namespace_events/columns/pod_count/column schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add set_comment schemas/constructive_infra_public/tables/platform_namespace_events/columns/storage_bytes/column [schemas/constructive_infra_public/tables/platform_namespace_events/table schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column schemas/constructive_infra_public/tables/platform_namespace_events/columns/storage_bytes/alterations/alt0000000100 [schemas/constructive_infra_public/tables/platform_namespace_events/columns/storage_bytes/column schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add set_comment -schemas/constructive_infra_public/tables/platform_namespace_events/constraints/platform_namespace_events_pkey/constraint [schemas/constructive_infra_public/tables/platform_namespace_events/table schemas/constructive_infra_public/schema schemas/constructive_infra_public/tables/platform_namespace_events/columns/created_at/column schemas/constructive_infra_public/tables/platform_namespace_events/columns/id/column] 2017-08-11T08:11:51Z Constructive # add alter_table_add_primary_key -schemas/constructive_infra_public/tables/platform_namespace_events/indexes/platform_namespace_events_namespace_id_created_at_idx [schemas/constructive_infra_public/tables/platform_namespace_events/table schemas/constructive_infra_public/tables/platform_namespace_events/columns/namespace_id/column schemas/constructive_infra_public/schema schemas/constructive_infra_public/tables/platform_namespace_events/columns/created_at/column] 2017-08-11T08:11:51Z Constructive # add create_index -schemas/constructive_infra_public/tables/platform_namespaces/alterations/alt0000000101 [schemas/constructive_infra_public/tables/platform_namespaces/table schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add disable_row_level_security -schemas/constructive_infra_public/tables/platform_namespaces/alterations/alt0000000102 [schemas/constructive_infra_public/tables/platform_namespaces/table schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add set_comment schemas/constructive_infra_public/tables/platform_namespaces/columns/annotations/column [schemas/constructive_infra_public/tables/platform_namespaces/table schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column schemas/constructive_infra_public/tables/platform_namespaces/columns/annotations/alterations/alt0000000103 [schemas/constructive_infra_public/tables/platform_namespaces/table schemas/constructive_infra_public/tables/platform_namespaces/columns/annotations/column schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null schemas/constructive_infra_public/tables/platform_namespaces/columns/annotations/alterations/alt0000000104 [schemas/constructive_infra_public/tables/platform_namespaces/table schemas/constructive_infra_public/tables/platform_namespaces/columns/annotations/column schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default @@ -200,18 +180,6 @@ schemas/constructive_infra_public/tables/platform_namespaces/columns/namespace_n schemas/constructive_infra_public/tables/platform_namespaces/columns/namespace_name/alterations/alt0000000121 [schemas/constructive_infra_public/tables/platform_namespaces/columns/namespace_name/column schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add set_comment schemas/constructive_infra_public/tables/platform_namespaces/columns/updated_at/column [schemas/constructive_infra_public/tables/platform_namespaces/table schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column schemas/constructive_infra_public/tables/platform_namespaces/columns/updated_at/alterations/alt0000000122 [schemas/constructive_infra_public/tables/platform_namespaces/table schemas/constructive_infra_public/tables/platform_namespaces/columns/updated_at/column schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default -schemas/constructive_infra_public/tables/platform_namespaces/constraints/platform_namespaces_database_id_name_key/constraint [schemas/constructive_infra_public/tables/platform_namespaces/table schemas/constructive_infra_public/schema schemas/constructive_infra_public/tables/platform_namespaces/columns/database_id/column schemas/constructive_infra_public/tables/platform_namespaces/columns/name/column] 2017-08-11T08:11:51Z Constructive # add alter_table_add_unique_constraint -schemas/constructive_infra_public/tables/platform_namespaces/constraints/platform_namespaces_namespace_name_key/constraint [schemas/constructive_infra_public/tables/platform_namespaces/table schemas/constructive_infra_public/schema schemas/constructive_infra_public/tables/platform_namespaces/columns/namespace_name/column] 2017-08-11T08:11:51Z Constructive # add alter_table_add_unique_constraint -schemas/constructive_infra_public/tables/platform_namespaces/constraints/platform_namespaces_pkey/constraint [schemas/constructive_infra_public/tables/platform_namespaces/table schemas/constructive_infra_public/schema schemas/constructive_infra_public/tables/platform_namespaces/columns/id/column] 2017-08-11T08:11:51Z Constructive # add alter_table_add_primary_key -schemas/constructive_infra_public/tables/platform_function_definitions/constraints/platform_function_definitions_namespace_id_fkey/constraint [schemas/constructive_infra_public/tables/platform_namespaces/table schemas/constructive_infra_public/tables/platform_function_definitions/table schemas/constructive_infra_public/schema schemas/constructive_infra_public/tables/platform_function_definitions/columns/namespace_id/column schemas/constructive_infra_public/tables/platform_namespaces/columns/id/column schemas/constructive_infra_public/tables/platform_namespaces/constraints/platform_namespaces_database_id_name_key/constraint schemas/constructive_infra_public/tables/platform_namespaces/constraints/platform_namespaces_namespace_name_key/constraint schemas/constructive_infra_public/tables/platform_namespaces/constraints/platform_namespaces_pkey/constraint] 2017-08-11T08:11:51Z Constructive # add alter_table_add_foreign_key -schemas/constructive_infra_public/tables/platform_namespaces/indexes/platform_namespaces_created_at_idx [schemas/constructive_infra_public/tables/platform_namespaces/table schemas/constructive_infra_public/schema schemas/constructive_infra_public/tables/platform_namespaces/columns/created_at/column] 2017-08-11T08:11:51Z Constructive # add create_index -schemas/constructive_infra_public/tables/platform_namespaces/indexes/platform_namespaces_updated_at_idx [schemas/constructive_infra_public/tables/platform_namespaces/table schemas/constructive_infra_public/tables/platform_namespaces/columns/updated_at/column schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add create_index -schemas/constructive_infra_public/tables/platform_namespaces/triggers/platform_namespaces_rename_proxy_insert_tg [schemas/constructive_infra_public/tables/platform_namespaces/table schemas/constructive_infra_private/schema schemas/constructive_infra_public/schema schemas/constructive_infra_private/trigger_fns/platform_namespaces_rename_proxy] 2017-08-11T08:11:51Z Constructive # add create_trigger -schemas/constructive_infra_public/tables/platform_namespaces/triggers/platform_namespaces_rename_proxy_update_tg [schemas/constructive_infra_public/tables/platform_namespaces/table schemas/constructive_infra_private/schema schemas/constructive_infra_public/schema schemas/constructive_infra_private/trigger_fns/platform_namespaces_rename_proxy] 2017-08-11T08:11:51Z Constructive # add create_trigger -schemas/constructive_infra_public/tables/platform_namespaces/triggers/timestamps_tg [schemas/constructive_infra_public/tables/platform_namespaces/table schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add create_trigger -schemas/constructive_infra_public/tables/platform_secret_definitions/table [schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add create_table -schemas/constructive_infra_public/tables/platform_secret_definitions/alterations/alt0000000123 [schemas/constructive_infra_public/tables/platform_secret_definitions/table schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add disable_row_level_security -schemas/constructive_infra_public/tables/platform_secret_definitions/alterations/alt0000000124 [schemas/constructive_infra_public/tables/platform_secret_definitions/table schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add set_comment schemas/constructive_infra_public/tables/platform_secret_definitions/columns/annotations/column [schemas/constructive_infra_public/tables/platform_secret_definitions/table schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column schemas/constructive_infra_public/tables/platform_secret_definitions/columns/annotations/alterations/alt0000000125 [schemas/constructive_infra_public/tables/platform_secret_definitions/table schemas/constructive_infra_public/tables/platform_secret_definitions/columns/annotations/column schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null schemas/constructive_infra_public/tables/platform_secret_definitions/columns/annotations/alterations/alt0000000126 [schemas/constructive_infra_public/tables/platform_secret_definitions/table schemas/constructive_infra_public/tables/platform_secret_definitions/columns/annotations/column schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default @@ -239,12 +207,6 @@ schemas/constructive_infra_public/tables/platform_secret_definitions/columns/nam schemas/constructive_infra_public/tables/platform_secret_definitions/columns/name/alterations/alt0000000141 [schemas/constructive_infra_public/tables/platform_secret_definitions/columns/name/column schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add set_comment schemas/constructive_infra_public/tables/platform_secret_definitions/columns/updated_at/column [schemas/constructive_infra_public/tables/platform_secret_definitions/table schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column schemas/constructive_infra_public/tables/platform_secret_definitions/columns/updated_at/alterations/alt0000000142 [schemas/constructive_infra_public/tables/platform_secret_definitions/table schemas/constructive_infra_public/schema schemas/constructive_infra_public/tables/platform_secret_definitions/columns/updated_at/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default -schemas/constructive_infra_public/tables/platform_secret_definitions/constraints/platform_secret_definitions_name_key/constraint [schemas/constructive_infra_public/tables/platform_secret_definitions/table schemas/constructive_infra_public/schema schemas/constructive_infra_public/tables/platform_secret_definitions/columns/name/column] 2017-08-11T08:11:51Z Constructive # add alter_table_add_unique_constraint -schemas/constructive_infra_public/tables/platform_secret_definitions/constraints/platform_secret_definitions_pkey/constraint [schemas/constructive_infra_public/tables/platform_secret_definitions/table schemas/constructive_infra_public/schema schemas/constructive_infra_public/tables/platform_secret_definitions/columns/id/column] 2017-08-11T08:11:51Z Constructive # add alter_table_add_primary_key -schemas/constructive_infra_public/tables/platform_secret_definitions/indexes/platform_secret_definitions_created_at_idx [schemas/constructive_infra_public/tables/platform_secret_definitions/columns/created_at/column schemas/constructive_infra_public/tables/platform_secret_definitions/table schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add create_index -schemas/constructive_infra_public/tables/platform_secret_definitions/indexes/platform_secret_definitions_updated_at_idx [schemas/constructive_infra_public/tables/platform_secret_definitions/table schemas/constructive_infra_public/schema schemas/constructive_infra_public/tables/platform_secret_definitions/columns/updated_at/column] 2017-08-11T08:11:51Z Constructive # add create_index -schemas/constructive_infra_public/tables/platform_secret_definitions/triggers/timestamps_tg [schemas/constructive_infra_public/tables/platform_secret_definitions/table schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add create_trigger -schemas/constructive_infra_public/types/function_requirement/type [schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add create_composite_type schemas/constructive_infra_public/tables/platform_function_definitions/columns/required_configs/column [schemas/constructive_infra_public/tables/platform_function_definitions/table schemas/constructive_infra_public/schema schemas/constructive_infra_public/types/function_requirement/type] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column schemas/constructive_infra_public/tables/platform_function_definitions/columns/required_configs/alterations/alt0000000025 [schemas/constructive_infra_public/tables/platform_function_definitions/table schemas/constructive_infra_public/tables/platform_function_definitions/columns/required_configs/column schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null schemas/constructive_infra_public/tables/platform_function_definitions/columns/required_configs/alterations/alt0000000026 [schemas/constructive_infra_public/tables/platform_function_definitions/table schemas/constructive_infra_public/tables/platform_function_definitions/columns/required_configs/column schemas/constructive_infra_public/schema schemas/constructive_infra_public/types/function_requirement/type] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default @@ -253,3 +215,42 @@ schemas/constructive_infra_public/tables/platform_function_definitions/columns/r schemas/constructive_infra_public/tables/platform_function_definitions/columns/required_secrets/alterations/alt0000000028 [schemas/constructive_infra_public/tables/platform_function_definitions/columns/required_secrets/column schemas/constructive_infra_public/tables/platform_function_definitions/table schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null schemas/constructive_infra_public/tables/platform_function_definitions/columns/required_secrets/alterations/alt0000000029 [schemas/constructive_infra_public/tables/platform_function_definitions/columns/required_secrets/column schemas/constructive_infra_public/tables/platform_function_definitions/table schemas/constructive_infra_public/schema schemas/constructive_infra_public/types/function_requirement/type] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default schemas/constructive_infra_public/tables/platform_function_definitions/columns/required_secrets/alterations/alt0000000030 [schemas/constructive_infra_public/tables/platform_function_definitions/columns/required_secrets/column schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_infra_public/tables/platform_function_definitions/alterations/alt0000000001 [schemas/constructive_infra_public/tables/platform_function_definitions/table schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add disable_row_level_security +schemas/constructive_infra_public/tables/platform_function_definitions/alterations/alt0000000002 [schemas/constructive_infra_public/tables/platform_function_definitions/table schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_infra_public/tables/platform_function_execution_logs/alterations/alt0000000037 [schemas/constructive_infra_public/tables/platform_function_execution_logs/table schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add disable_row_level_security +schemas/constructive_infra_public/tables/platform_function_execution_logs/alterations/alt0000000038 [schemas/constructive_infra_public/tables/platform_function_execution_logs/table schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_infra_public/tables/platform_function_invocations/alterations/alt0000000055 [schemas/constructive_infra_public/schema schemas/constructive_infra_public/tables/platform_function_invocations/table] 2017-08-11T08:11:51Z Constructive # add disable_row_level_security +schemas/constructive_infra_public/tables/platform_function_invocations/alterations/alt0000000056 [schemas/constructive_infra_public/schema schemas/constructive_infra_public/tables/platform_function_invocations/table] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_infra_public/tables/platform_namespace_events/alterations/alt0000000078 [schemas/constructive_infra_public/tables/platform_namespace_events/table schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add disable_row_level_security +schemas/constructive_infra_public/tables/platform_namespace_events/alterations/alt0000000079 [schemas/constructive_infra_public/tables/platform_namespace_events/table schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_infra_public/tables/platform_namespaces/alterations/alt0000000101 [schemas/constructive_infra_public/tables/platform_namespaces/table schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add disable_row_level_security +schemas/constructive_infra_public/tables/platform_namespaces/alterations/alt0000000102 [schemas/constructive_infra_public/tables/platform_namespaces/table schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_infra_public/tables/platform_secret_definitions/alterations/alt0000000123 [schemas/constructive_infra_public/tables/platform_secret_definitions/table schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add disable_row_level_security +schemas/constructive_infra_public/tables/platform_secret_definitions/alterations/alt0000000124 [schemas/constructive_infra_public/tables/platform_secret_definitions/table schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_infra_public/tables/platform_function_definitions/constraints/platform_function_definitions_pkey/constraint [schemas/constructive_infra_public/tables/platform_function_definitions/table schemas/constructive_infra_public/schema schemas/constructive_infra_public/tables/platform_function_definitions/columns/id/column] 2017-08-11T08:11:51Z Constructive # add alter_table_add_primary_key +schemas/constructive_infra_public/tables/platform_function_definitions/constraints/platform_function_definitions_scope_name_key/constraint [schemas/constructive_infra_public/tables/platform_function_definitions/table schemas/constructive_infra_public/schema schemas/constructive_infra_public/tables/platform_function_definitions/columns/scope/column schemas/constructive_infra_public/tables/platform_function_definitions/columns/name/column] 2017-08-11T08:11:51Z Constructive # add alter_table_add_unique_constraint +schemas/constructive_infra_public/tables/platform_function_execution_logs/constraints/platform_function_execution_logs_pkey/constraint [schemas/constructive_infra_public/tables/platform_function_execution_logs/table schemas/constructive_infra_public/schema schemas/constructive_infra_public/tables/platform_function_execution_logs/columns/created_at/column schemas/constructive_infra_public/tables/platform_function_execution_logs/columns/id/column] 2017-08-11T08:11:51Z Constructive # add alter_table_add_primary_key +schemas/constructive_infra_public/tables/platform_function_invocations/constraints/platform_function_invocations_pkey/constraint [schemas/constructive_infra_public/schema schemas/constructive_infra_public/tables/platform_function_invocations/table schemas/constructive_infra_public/tables/platform_function_invocations/columns/created_at/column schemas/constructive_infra_public/tables/platform_function_invocations/columns/id/column] 2017-08-11T08:11:51Z Constructive # add alter_table_add_primary_key +schemas/constructive_infra_public/tables/platform_namespace_events/constraints/platform_namespace_events_pkey/constraint [schemas/constructive_infra_public/tables/platform_namespace_events/table schemas/constructive_infra_public/schema schemas/constructive_infra_public/tables/platform_namespace_events/columns/created_at/column schemas/constructive_infra_public/tables/platform_namespace_events/columns/id/column] 2017-08-11T08:11:51Z Constructive # add alter_table_add_primary_key +schemas/constructive_infra_public/tables/platform_namespaces/constraints/platform_namespaces_database_id_name_key/constraint [schemas/constructive_infra_public/tables/platform_namespaces/table schemas/constructive_infra_public/schema schemas/constructive_infra_public/tables/platform_namespaces/columns/database_id/column schemas/constructive_infra_public/tables/platform_namespaces/columns/name/column] 2017-08-11T08:11:51Z Constructive # add alter_table_add_unique_constraint +schemas/constructive_infra_public/tables/platform_namespaces/constraints/platform_namespaces_namespace_name_key/constraint [schemas/constructive_infra_public/tables/platform_namespaces/table schemas/constructive_infra_public/schema schemas/constructive_infra_public/tables/platform_namespaces/columns/namespace_name/column] 2017-08-11T08:11:51Z Constructive # add alter_table_add_unique_constraint +schemas/constructive_infra_public/tables/platform_namespaces/constraints/platform_namespaces_pkey/constraint [schemas/constructive_infra_public/tables/platform_namespaces/table schemas/constructive_infra_public/schema schemas/constructive_infra_public/tables/platform_namespaces/columns/id/column] 2017-08-11T08:11:51Z Constructive # add alter_table_add_primary_key +schemas/constructive_infra_public/tables/platform_function_definitions/constraints/platform_function_definitions_namespace_id_fkey/constraint [schemas/constructive_infra_public/tables/platform_namespaces/table schemas/constructive_infra_public/tables/platform_function_definitions/table schemas/constructive_infra_public/schema schemas/constructive_infra_public/tables/platform_function_definitions/columns/namespace_id/column schemas/constructive_infra_public/tables/platform_namespaces/columns/id/column schemas/constructive_infra_public/tables/platform_namespaces/constraints/platform_namespaces_database_id_name_key/constraint schemas/constructive_infra_public/tables/platform_namespaces/constraints/platform_namespaces_namespace_name_key/constraint schemas/constructive_infra_public/tables/platform_namespaces/constraints/platform_namespaces_pkey/constraint] 2017-08-11T08:11:51Z Constructive # add alter_table_add_foreign_key +schemas/constructive_infra_public/tables/platform_secret_definitions/constraints/platform_secret_definitions_name_key/constraint [schemas/constructive_infra_public/tables/platform_secret_definitions/table schemas/constructive_infra_public/schema schemas/constructive_infra_public/tables/platform_secret_definitions/columns/name/column] 2017-08-11T08:11:51Z Constructive # add alter_table_add_unique_constraint +schemas/constructive_infra_public/tables/platform_secret_definitions/constraints/platform_secret_definitions_pkey/constraint [schemas/constructive_infra_public/tables/platform_secret_definitions/table schemas/constructive_infra_public/schema schemas/constructive_infra_public/tables/platform_secret_definitions/columns/id/column] 2017-08-11T08:11:51Z Constructive # add alter_table_add_primary_key +schemas/constructive_infra_public/tables/platform_function_definitions/indexes/platform_function_definitions_created_at_idx [schemas/constructive_infra_public/tables/platform_function_definitions/columns/created_at/column schemas/constructive_infra_public/tables/platform_function_definitions/table schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add create_index +schemas/constructive_infra_public/tables/platform_function_definitions/indexes/platform_function_definitions_updated_at_idx [schemas/constructive_infra_public/tables/platform_function_definitions/columns/updated_at/column schemas/constructive_infra_public/tables/platform_function_definitions/table schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add create_index +schemas/constructive_infra_public/tables/platform_function_execution_logs/indexes/platform_function_execution_logs_invocation_id_created_at_idx [schemas/constructive_infra_public/tables/platform_function_execution_logs/columns/invocation_id/column schemas/constructive_infra_public/tables/platform_function_execution_logs/columns/created_at/column schemas/constructive_infra_public/tables/platform_function_execution_logs/table schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add create_index +schemas/constructive_infra_public/tables/platform_function_invocations/indexes/platform_function_invocations_actor_id_created_at_idx [schemas/constructive_infra_public/tables/platform_function_invocations/columns/created_at/column schemas/constructive_infra_public/tables/platform_function_invocations/columns/actor_id/column schemas/constructive_infra_public/schema schemas/constructive_infra_public/tables/platform_function_invocations/table] 2017-08-11T08:11:51Z Constructive # add create_index +schemas/constructive_infra_public/tables/platform_function_invocations/indexes/platform_function_invocations_task_identifier_created_at_idx [schemas/constructive_infra_public/tables/platform_function_invocations/columns/created_at/column schemas/constructive_infra_public/schema schemas/constructive_infra_public/tables/platform_function_invocations/table schemas/constructive_infra_public/tables/platform_function_invocations/columns/task_identifier/column] 2017-08-11T08:11:51Z Constructive # add create_index +schemas/constructive_infra_public/tables/platform_namespace_events/indexes/platform_namespace_events_namespace_id_created_at_idx [schemas/constructive_infra_public/tables/platform_namespace_events/table schemas/constructive_infra_public/tables/platform_namespace_events/columns/namespace_id/column schemas/constructive_infra_public/schema schemas/constructive_infra_public/tables/platform_namespace_events/columns/created_at/column] 2017-08-11T08:11:51Z Constructive # add create_index +schemas/constructive_infra_public/tables/platform_namespaces/indexes/platform_namespaces_created_at_idx [schemas/constructive_infra_public/tables/platform_namespaces/table schemas/constructive_infra_public/schema schemas/constructive_infra_public/tables/platform_namespaces/columns/created_at/column] 2017-08-11T08:11:51Z Constructive # add create_index +schemas/constructive_infra_public/tables/platform_namespaces/indexes/platform_namespaces_updated_at_idx [schemas/constructive_infra_public/tables/platform_namespaces/table schemas/constructive_infra_public/tables/platform_namespaces/columns/updated_at/column schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add create_index +schemas/constructive_infra_public/tables/platform_secret_definitions/indexes/platform_secret_definitions_created_at_idx [schemas/constructive_infra_public/tables/platform_secret_definitions/columns/created_at/column schemas/constructive_infra_public/tables/platform_secret_definitions/table schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add create_index +schemas/constructive_infra_public/tables/platform_secret_definitions/indexes/platform_secret_definitions_updated_at_idx [schemas/constructive_infra_public/tables/platform_secret_definitions/table schemas/constructive_infra_public/schema schemas/constructive_infra_public/tables/platform_secret_definitions/columns/updated_at/column] 2017-08-11T08:11:51Z Constructive # add create_index +schemas/constructive_infra_private/trigger_fns/platform_namespaces_rename_proxy [schemas/constructive_infra_private/schema] 2017-08-11T08:11:51Z Constructive # add create_trigger_function +schemas/constructive_infra_public/tables/platform_function_definitions/triggers/timestamps_tg [schemas/constructive_infra_public/tables/platform_function_definitions/table schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add create_trigger +schemas/constructive_infra_public/tables/platform_namespaces/triggers/platform_namespaces_rename_proxy_insert_tg [schemas/constructive_infra_public/tables/platform_namespaces/table schemas/constructive_infra_private/schema schemas/constructive_infra_public/schema schemas/constructive_infra_private/trigger_fns/platform_namespaces_rename_proxy] 2017-08-11T08:11:51Z Constructive # add create_trigger +schemas/constructive_infra_public/tables/platform_namespaces/triggers/platform_namespaces_rename_proxy_update_tg [schemas/constructive_infra_public/tables/platform_namespaces/table schemas/constructive_infra_private/schema schemas/constructive_infra_public/schema schemas/constructive_infra_private/trigger_fns/platform_namespaces_rename_proxy] 2017-08-11T08:11:51Z Constructive # add create_trigger +schemas/constructive_infra_public/tables/platform_namespaces/triggers/timestamps_tg [schemas/constructive_infra_public/tables/platform_namespaces/table schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add create_trigger +schemas/constructive_infra_public/tables/platform_secret_definitions/triggers/timestamps_tg [schemas/constructive_infra_public/tables/platform_secret_definitions/table schemas/constructive_infra_public/schema] 2017-08-11T08:11:51Z Constructive # add create_trigger diff --git a/pgpm/constructive-infra/revert/schemas/constructive_infra_public/tables/platform_function_definitions/columns/payload_schema/column.sql b/pgpm/constructive-infra/revert/schemas/constructive_infra_public/tables/platform_function_definitions/columns/payload_schema/column.sql new file mode 100644 index 00000000..4622346b --- /dev/null +++ b/pgpm/constructive-infra/revert/schemas/constructive_infra_public/tables/platform_function_definitions/columns/payload_schema/column.sql @@ -0,0 +1,5 @@ +-- Revert: schemas/constructive_infra_public/tables/platform_function_definitions/columns/payload_schema/column + + +ALTER TABLE "constructive_infra_public".platform_function_definitions + DROP COLUMN payload_schema RESTRICT; diff --git a/pgpm/constructive-infra/verify/schemas/constructive_infra_public/tables/platform_function_definitions/columns/payload_schema/column.sql b/pgpm/constructive-infra/verify/schemas/constructive_infra_public/tables/platform_function_definitions/columns/payload_schema/column.sql new file mode 100644 index 00000000..8628de2e --- /dev/null +++ b/pgpm/constructive-infra/verify/schemas/constructive_infra_public/tables/platform_function_definitions/columns/payload_schema/column.sql @@ -0,0 +1 @@ +-- Verify: schemas/constructive_infra_public/tables/platform_function_definitions/columns/payload_schema/column diff --git a/pgpm/constructive-objects/.npmignore b/pgpm/constructive-objects/.npmignore new file mode 100644 index 00000000..cf8a4554 --- /dev/null +++ b/pgpm/constructive-objects/.npmignore @@ -0,0 +1,2 @@ +__tests__ +jest.config.js diff --git a/pgpm/constructive-objects/Makefile b/pgpm/constructive-objects/Makefile new file mode 100644 index 00000000..3dd11213 --- /dev/null +++ b/pgpm/constructive-objects/Makefile @@ -0,0 +1,6 @@ +EXTENSION = constructive-objects +DATA = sql/constructive-objects--0.0.1.sql + +PG_CONFIG = pg_config +PGXS := $(shell $(PG_CONFIG) --pgxs) +include $(PGXS) diff --git a/pgpm/constructive-objects/constructive-objects.control b/pgpm/constructive-objects/constructive-objects.control new file mode 100644 index 00000000..90001e78 --- /dev/null +++ b/pgpm/constructive-objects/constructive-objects.control @@ -0,0 +1,5 @@ +# constructive-objects extension +comment = 'constructive-objects module' +default_version = '0.0.1' +relocatable = false +requires = 'plpgsql,uuid-ossp,pgpm-inflection,pgpm-stamps' diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_private/procedures/object_hash_uuid/procedure.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_private/procedures/object_hash_uuid/procedure.sql new file mode 100644 index 00000000..2900ea12 --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_private/procedures/object_hash_uuid/procedure.sql @@ -0,0 +1,25 @@ +-- Deploy: schemas/constructive_objects_private/procedures/object_hash_uuid/procedure +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_private/schema + + +CREATE FUNCTION "constructive_objects_private".object_hash_uuid( + IN obj "constructive_objects_public".object +) RETURNS uuid AS $_PGFN_$ +DECLARE + v_cash jsonb := '{}'::jsonb; + v_hash1 uuid; + v_hash2 uuid; +BEGIN + IF obj.data IS NOT NULL THEN + v_hash1 := uuid_generate_v5(uuid_ns_url(), obj.data::text); + END IF; + IF obj.kids IS NOT NULL AND obj.ktree IS NOT NULL THEN + v_cash := json_object(obj.ktree::text[], obj.kids::text[]); + v_hash2 := uuid_generate_v5(uuid_ns_url(), v_cash::text); + END IF; + RETURN uuid_generate_v5(uuid_ns_url(), (concat(v_hash1, v_hash2))::text); +END; +$_PGFN_$ LANGUAGE plpgsql IMMUTABLE SECURITY INVOKER; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_private/schema.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_private/schema.sql new file mode 100644 index 00000000..16cec786 --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_private/schema.sql @@ -0,0 +1,8 @@ +-- Deploy: schemas/constructive_objects_private/schema +-- made with <3 @ constructive.io + + + + +CREATE SCHEMA "constructive_objects_private"; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_private/trigger_fns/tg_object_generate_id_hash.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_private/trigger_fns/tg_object_generate_id_hash.sql new file mode 100644 index 00000000..0923f13e --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_private/trigger_fns/tg_object_generate_id_hash.sql @@ -0,0 +1,13 @@ +-- Deploy: schemas/constructive_objects_private/trigger_fns/tg_object_generate_id_hash +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_private/schema + + +CREATE FUNCTION "constructive_objects_private".tg_object_generate_id_hash() RETURNS TRIGGER AS $_PGFN_$ +BEGIN + NEW.id := "constructive_objects_private".object_hash_uuid(NEW); + RETURN NEW; +END; +$_PGFN_$ LANGUAGE plpgsql VOLATILE SECURITY INVOKER; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/procedures/get_all/procedure.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/procedures/get_all/procedure.sql new file mode 100644 index 00000000..1769f52a --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/procedures/get_all/procedure.sql @@ -0,0 +1,39 @@ +-- Deploy: schemas/constructive_objects_public/procedures/get_all/procedure +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema + + +CREATE FUNCTION "constructive_objects_public".get_all( + IN s_id uuid, + IN id uuid +) RETURNS TABLE(path text[], data jsonb) AS $_PGFN_$ +DECLARE + root "constructive_objects_public".object; + i int; + cid uuid; + cname text; + rpath text[]; + rdata jsonb; +BEGIN + SELECT * + FROM "constructive_objects_public".object AS o + WHERE + o.database_id = s_id AND o.id = get_all.id INTO root; + FOR i IN SELECT * + FROM generate_series(1, cardinality(root.kids)) LOOP + cid := (root.kids)[i]; + cname := (root.ktree)[i]; + FOR rpath, rdata IN SELECT * + FROM "constructive_objects_public".get_all(s_id, cid) LOOP + path := ARRAY[cname] || rpath; + data := rdata; + RETURN NEXT; + END LOOP; + END LOOP; + path := ARRAY[]::text[]; + data := root.data; + RETURN NEXT; +END; +$_PGFN_$ LANGUAGE plpgsql STABLE SECURITY DEFINER; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/procedures/get_node_at_path/procedure.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/procedures/get_node_at_path/procedure.sql new file mode 100644 index 00000000..6f04ca73 --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/procedures/get_node_at_path/procedure.sql @@ -0,0 +1,47 @@ +-- Deploy: schemas/constructive_objects_public/procedures/get_node_at_path/procedure +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema + + +CREATE FUNCTION "constructive_objects_public".get_node_at_path( + IN s_id uuid, + IN id uuid, + IN path text[] DEFAULT ARRAY[]::text[] +) RETURNS "constructive_objects_public".object AS $_PGFN_$ +DECLARE + _path text[] := path; + _obj "constructive_objects_public".object; + i int; + pos int; + curpath text; + _node_id uuid; +BEGIN + SELECT * + FROM "constructive_objects_public".object AS o + WHERE + o.id = get_node_at_path.id AND o.database_id = s_id INTO _obj; + IF array_length(_path, 1) > 0 THEN + FOR i IN SELECT * + FROM generate_subscripts(_path, 1) AS g (i) LOOP + curpath := (_path)[1]; + pos := object_store_utils.array_index_of(_obj.ktree, curpath); + IF pos > 0 THEN + _node_id := (_obj.kids)[pos]; + SELECT * + FROM "constructive_objects_public".object AS o + WHERE + o.id = _node_id AND o.database_id = s_id INTO _obj; + IF array_length(_path, 1) = 1 THEN + RETURN _obj; + END IF; + END IF; + _path := object_store_utils.array_shift(_path); + END LOOP; + ELSE + RETURN _obj; + END IF; + RETURN NULL; +END; +$_PGFN_$ LANGUAGE plpgsql STABLE SECURITY DEFINER; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/procedures/init_empty_repo/procedure.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/procedures/init_empty_repo/procedure.sql new file mode 100644 index 00000000..bf19d7f3 --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/procedures/init_empty_repo/procedure.sql @@ -0,0 +1,52 @@ +-- Deploy: schemas/constructive_objects_public/procedures/init_empty_repo/procedure +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema + + +CREATE FUNCTION "constructive_objects_public".init_empty_repo( + IN s_id uuid, + IN store_id uuid +) RETURNS void AS $_PGFN_$ +DECLARE + v_tree_id uuid; + v_commit_id uuid; + v_ref_id uuid; +BEGIN + IF EXISTS (SELECT 1 + FROM "constructive_objects_public".commit AS c + WHERE + c.database_id = s_id AND c.store_id = init_empty_repo.store_id) THEN + RAISE EXCEPTION 'REPO_EXISTS'; + END IF; + INSERT INTO "constructive_objects_public".object ( + database_id + ) + VALUES + (s_id) + ON CONFLICT DO NOTHING + RETURNING id INTO v_tree_id; + INSERT INTO "constructive_objects_public".ref ( + database_id, + store_id, + name + ) + VALUES + (s_id, init_empty_repo.store_id, 'main') + RETURNING id INTO v_ref_id; + INSERT INTO "constructive_objects_public".commit ( + database_id, + store_id, + message, + tree_id + ) + VALUES + (s_id, init_empty_repo.store_id, 'first commit', v_tree_id) + RETURNING id INTO v_commit_id; + UPDATE "constructive_objects_public".ref SET + commit_id = v_commit_id + WHERE + id = v_ref_id AND database_id = s_id; +END; +$_PGFN_$ LANGUAGE plpgsql VOLATILE SECURITY DEFINER; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/procedures/insert_node_at_path/procedure.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/procedures/insert_node_at_path/procedure.sql new file mode 100644 index 00000000..7428cddb --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/procedures/insert_node_at_path/procedure.sql @@ -0,0 +1,125 @@ +-- Deploy: schemas/constructive_objects_public/procedures/insert_node_at_path/procedure +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema + + +CREATE FUNCTION "constructive_objects_public".insert_node_at_path( + IN s_id uuid, + IN root uuid, + IN path text[], + IN data jsonb, + IN kids uuid[], + IN ktree text[] +) RETURNS uuid AS $_PGFN_$ +DECLARE + _newnode_id uuid; + _newparent_id uuid; + _parent "constructive_objects_public".object; + _orig_name text; + _repl uuid; + _uuid_to_return uuid; + _parent_existed bool; + vkids uuid[]; + vktree text[]; + i int; + _path_len int; + _depth int; + _pos int; + _cur_id uuid; + _cur_obj "constructive_objects_public".object; + _cached "constructive_objects_public".object[]; + children_hash jsonb; +BEGIN + _path_len := coalesce(array_length(path, 1), 0); + SELECT * + FROM "constructive_objects_public".object AS o + WHERE + o.id = insert_node_at_path.root AND o.database_id = s_id INTO _cur_obj; + _cached := array_fill(_cur_obj, ARRAY[1]); + _depth := 0; + IF _cur_obj.id IS NOT NULL AND _path_len > 0 THEN + FOR i IN 1.._path_len LOOP + _pos := object_store_utils.array_index_of(_cur_obj.ktree, (path)[i]); + IF _pos > 0 THEN + _cur_id := (_cur_obj.kids)[_pos]; + SELECT * + FROM "constructive_objects_public".object AS o + WHERE + o.id = _cur_id AND o.database_id = s_id INTO _cur_obj; + _cached := array_cat(_cached, array_fill(_cur_obj, ARRAY[1])); + _depth := i; + ELSE + EXIT; + END IF; + END LOOP; + END IF; + INSERT INTO "constructive_objects_public".object ( + database_id, + data, + kids, + ktree + ) + VALUES + (s_id, insert_node_at_path.data, insert_node_at_path.kids, insert_node_at_path.ktree) + ON CONFLICT (id, database_id) DO UPDATE SET + database_id = EXCLUDED.database_id + RETURNING id INTO _newnode_id; + IF _newnode_id IS NULL THEN + RAISE EXCEPTION '_newnode_id failed'; + END IF; + _orig_name := (path)[_path_len]; + _repl := _newnode_id; + _uuid_to_return := _newnode_id; + FOR i IN REVERSE _path_len..1 LOOP + IF (i - 1) = 0 THEN + _parent := (_cached)[1]; + _parent_existed := _parent.id IS NOT NULL; + ELSIF (i - 1) <= _depth THEN + _parent := (_cached)[i]; + _parent_existed := true; + ELSE + _parent_existed := false; + END IF; + IF _parent_existed THEN + children_hash := object_store_utils.zip_arrays(_parent.ktree, _parent.kids); + children_hash := jsonb_set(children_hash, ARRAY[_orig_name]::text[], to_jsonb(_repl)); + SELECT + h.ktree, + h.kids + FROM object_store_utils.unzip_obj_to_ktree_and_kids(children_hash) AS h INTO vktree, vkids; + INSERT INTO "constructive_objects_public".object ( + database_id, + data, + kids, + ktree + ) + VALUES + (s_id, _parent.data, vkids, vktree) + ON CONFLICT (id, database_id) DO UPDATE SET + database_id = EXCLUDED.database_id + RETURNING id INTO _newparent_id; + IF _newparent_id IS NULL THEN + RAISE EXCEPTION 'parent insert failed'; + END IF; + ELSE + INSERT INTO "constructive_objects_public".object ( + database_id, + data, + kids, + ktree + ) + VALUES + (s_id, NULL, ARRAY[_repl]::uuid[], ARRAY[_orig_name]::text[]) + ON CONFLICT (id, database_id) DO UPDATE SET + database_id = EXCLUDED.database_id + RETURNING id INTO _newparent_id; + END IF; + _orig_name := (path)[i - 1]; + _repl := _newparent_id; + _uuid_to_return := _newparent_id; + END LOOP; + RETURN _uuid_to_return; +END; +$_PGFN_$ LANGUAGE plpgsql VOLATILE SECURITY DEFINER; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/procedures/set_data_at_path/procedure.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/procedures/set_data_at_path/procedure.sql new file mode 100644 index 00000000..166d347c --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/procedures/set_data_at_path/procedure.sql @@ -0,0 +1,27 @@ +-- Deploy: schemas/constructive_objects_public/procedures/set_data_at_path/procedure +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema + + +CREATE FUNCTION "constructive_objects_public".set_data_at_path( + IN s_id uuid, + IN root uuid, + IN path text[], + IN data jsonb +) RETURNS uuid AS $_PGFN_$ +DECLARE + _node "constructive_objects_public".object; + _kids uuid[] := ARRAY[]::uuid[]; + _ktree text[] := ARRAY[]::text[]; +BEGIN + SELECT * + FROM "constructive_objects_public".get_node_at_path(s_id, root, path) INTO _node; + IF _node.id IS NOT NULL THEN + _kids := _node.kids; + _ktree := _node.ktree; + END IF; + RETURN "constructive_objects_public".insert_node_at_path(s_id, root, path, data, _kids, _ktree); +END; +$_PGFN_$ LANGUAGE plpgsql VOLATILE SECURITY DEFINER; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/schema.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/schema.sql new file mode 100644 index 00000000..53b991ae --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/schema.sql @@ -0,0 +1,8 @@ +-- Deploy: schemas/constructive_objects_public/schema +-- made with <3 @ constructive.io + + + + +CREATE SCHEMA "constructive_objects_public"; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/alterations/alt0000000001.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/alterations/alt0000000001.sql new file mode 100644 index 00000000..649104f7 --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/alterations/alt0000000001.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_objects_public/tables/commit/alterations/alt0000000001 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/commit/table + + +ALTER TABLE "constructive_objects_public".commit + DISABLE ROW LEVEL SECURITY; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/alterations/alt0000000002.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/alterations/alt0000000002.sql new file mode 100644 index 00000000..7926df8b --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/alterations/alt0000000002.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_objects_public/tables/commit/alterations/alt0000000002 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/commit/table + + +COMMENT ON TABLE "constructive_objects_public".commit IS E'Commit history — each commit snapshots a tree root for a store'; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/columns/author_id/alterations/alt0000000003.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/columns/author_id/alterations/alt0000000003.sql new file mode 100644 index 00000000..2238ed3d --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/columns/author_id/alterations/alt0000000003.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_objects_public/tables/commit/columns/author_id/alterations/alt0000000003 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/commit/columns/author_id/column + + +COMMENT ON COLUMN "constructive_objects_public".commit.author_id IS 'User who authored the changes'; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/columns/author_id/column.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/columns/author_id/column.sql new file mode 100644 index 00000000..15c7da14 --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/columns/author_id/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_objects_public/tables/commit/columns/author_id/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/commit/table + + +ALTER TABLE "constructive_objects_public".commit + ADD COLUMN author_id uuid; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/columns/committer_id/alterations/alt0000000004.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/columns/committer_id/alterations/alt0000000004.sql new file mode 100644 index 00000000..d150df67 --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/columns/committer_id/alterations/alt0000000004.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_objects_public/tables/commit/columns/committer_id/alterations/alt0000000004 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/commit/columns/committer_id/column + + +COMMENT ON COLUMN "constructive_objects_public".commit.committer_id IS E'User who committed (may differ from author)'; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/columns/committer_id/column.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/columns/committer_id/column.sql new file mode 100644 index 00000000..76a37180 --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/columns/committer_id/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_objects_public/tables/commit/columns/committer_id/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/commit/table + + +ALTER TABLE "constructive_objects_public".commit + ADD COLUMN committer_id uuid; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/columns/database_id/alterations/alt0000000005.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/columns/database_id/alterations/alt0000000005.sql new file mode 100644 index 00000000..c40c5bec --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/columns/database_id/alterations/alt0000000005.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_objects_public/tables/commit/columns/database_id/alterations/alt0000000005 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/commit/table +-- requires: schemas/constructive_objects_public/tables/commit/columns/database_id/column + + +ALTER TABLE "constructive_objects_public".commit + ALTER COLUMN database_id SET NOT NULL; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/columns/database_id/alterations/alt0000000006.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/columns/database_id/alterations/alt0000000006.sql new file mode 100644 index 00000000..32df7ab8 --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/columns/database_id/alterations/alt0000000006.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_objects_public/tables/commit/columns/database_id/alterations/alt0000000006 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/commit/columns/database_id/column + + +COMMENT ON COLUMN "constructive_objects_public".commit.database_id IS E'Database scope for multi-tenant isolation'; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/columns/database_id/column.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/columns/database_id/column.sql new file mode 100644 index 00000000..c6e04929 --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/columns/database_id/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_objects_public/tables/commit/columns/database_id/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/commit/table + + +ALTER TABLE "constructive_objects_public".commit + ADD COLUMN database_id uuid; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/columns/date/alterations/alt0000000007.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/columns/date/alterations/alt0000000007.sql new file mode 100644 index 00000000..d485eaa6 --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/columns/date/alterations/alt0000000007.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_objects_public/tables/commit/columns/date/alterations/alt0000000007 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/commit/table +-- requires: schemas/constructive_objects_public/tables/commit/columns/date/column + + +ALTER TABLE "constructive_objects_public".commit + ALTER COLUMN date SET NOT NULL; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/columns/date/alterations/alt0000000008.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/columns/date/alterations/alt0000000008.sql new file mode 100644 index 00000000..7484719c --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/columns/date/alterations/alt0000000008.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_objects_public/tables/commit/columns/date/alterations/alt0000000008 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/commit/table +-- requires: schemas/constructive_objects_public/tables/commit/columns/date/column + + +ALTER TABLE "constructive_objects_public".commit + ALTER COLUMN date SET DEFAULT CURRENT_TIMESTAMP; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/columns/date/alterations/alt0000000009.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/columns/date/alterations/alt0000000009.sql new file mode 100644 index 00000000..05ef9f48 --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/columns/date/alterations/alt0000000009.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_objects_public/tables/commit/columns/date/alterations/alt0000000009 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/commit/columns/date/column + + +COMMENT ON COLUMN "constructive_objects_public".commit.date IS 'Commit timestamp'; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/columns/date/column.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/columns/date/column.sql new file mode 100644 index 00000000..e97d7a51 --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/columns/date/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_objects_public/tables/commit/columns/date/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/commit/table + + +ALTER TABLE "constructive_objects_public".commit + ADD COLUMN date timestamptz; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/columns/id/alterations/alt0000000010.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/columns/id/alterations/alt0000000010.sql new file mode 100644 index 00000000..d854b9ac --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/columns/id/alterations/alt0000000010.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_objects_public/tables/commit/columns/id/alterations/alt0000000010 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/commit/table +-- requires: schemas/constructive_objects_public/tables/commit/columns/id/column + + +ALTER TABLE "constructive_objects_public".commit + ALTER COLUMN id SET NOT NULL; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/columns/id/alterations/alt0000000011.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/columns/id/alterations/alt0000000011.sql new file mode 100644 index 00000000..f1d9f06f --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/columns/id/alterations/alt0000000011.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_objects_public/tables/commit/columns/id/alterations/alt0000000011 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/commit/table +-- requires: schemas/constructive_objects_public/tables/commit/columns/id/column + + +ALTER TABLE "constructive_objects_public".commit + ALTER COLUMN id SET DEFAULT uuidv7(); + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/columns/id/alterations/alt0000000012.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/columns/id/alterations/alt0000000012.sql new file mode 100644 index 00000000..c59451b5 --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/columns/id/alterations/alt0000000012.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_objects_public/tables/commit/columns/id/alterations/alt0000000012 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/commit/columns/id/column + + +COMMENT ON COLUMN "constructive_objects_public".commit.id IS 'Unique commit identifier'; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/columns/id/column.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/columns/id/column.sql new file mode 100644 index 00000000..faae72ce --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/columns/id/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_objects_public/tables/commit/columns/id/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/commit/table + + +ALTER TABLE "constructive_objects_public".commit + ADD COLUMN id uuid; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/columns/message/alterations/alt0000000013.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/columns/message/alterations/alt0000000013.sql new file mode 100644 index 00000000..fb7b88c6 --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/columns/message/alterations/alt0000000013.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_objects_public/tables/commit/columns/message/alterations/alt0000000013 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/commit/columns/message/column + + +COMMENT ON COLUMN "constructive_objects_public".commit.message IS 'Optional commit message'; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/columns/message/column.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/columns/message/column.sql new file mode 100644 index 00000000..6fc2f6ac --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/columns/message/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_objects_public/tables/commit/columns/message/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/commit/table + + +ALTER TABLE "constructive_objects_public".commit + ADD COLUMN message text; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/columns/parent_ids/alterations/alt0000000014.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/columns/parent_ids/alterations/alt0000000014.sql new file mode 100644 index 00000000..19b61a23 --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/columns/parent_ids/alterations/alt0000000014.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_objects_public/tables/commit/columns/parent_ids/alterations/alt0000000014 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/commit/columns/parent_ids/column + + +COMMENT ON COLUMN "constructive_objects_public".commit.parent_ids IS E'Parent commit IDs (supports merge commits)'; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/columns/parent_ids/column.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/columns/parent_ids/column.sql new file mode 100644 index 00000000..0270f880 --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/columns/parent_ids/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_objects_public/tables/commit/columns/parent_ids/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/commit/table + + +ALTER TABLE "constructive_objects_public".commit + ADD COLUMN parent_ids uuid[]; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/columns/store_id/alterations/alt0000000015.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/columns/store_id/alterations/alt0000000015.sql new file mode 100644 index 00000000..1ecea1f2 --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/columns/store_id/alterations/alt0000000015.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_objects_public/tables/commit/columns/store_id/alterations/alt0000000015 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/commit/table +-- requires: schemas/constructive_objects_public/tables/commit/columns/store_id/column + + +ALTER TABLE "constructive_objects_public".commit + ALTER COLUMN store_id SET NOT NULL; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/columns/store_id/alterations/alt0000000016.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/columns/store_id/alterations/alt0000000016.sql new file mode 100644 index 00000000..9bc13511 --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/columns/store_id/alterations/alt0000000016.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_objects_public/tables/commit/columns/store_id/alterations/alt0000000016 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/commit/columns/store_id/column + + +COMMENT ON COLUMN "constructive_objects_public".commit.store_id IS 'Store this commit belongs to'; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/columns/store_id/column.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/columns/store_id/column.sql new file mode 100644 index 00000000..454a59b6 --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/columns/store_id/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_objects_public/tables/commit/columns/store_id/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/commit/table + + +ALTER TABLE "constructive_objects_public".commit + ADD COLUMN store_id uuid; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/columns/tree_id/alterations/alt0000000017.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/columns/tree_id/alterations/alt0000000017.sql new file mode 100644 index 00000000..bd4c511c --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/columns/tree_id/alterations/alt0000000017.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_objects_public/tables/commit/columns/tree_id/alterations/alt0000000017 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/commit/columns/tree_id/column + + +COMMENT ON COLUMN "constructive_objects_public".commit.tree_id IS 'Root object ID of the tree snapshot at this commit'; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/columns/tree_id/column.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/columns/tree_id/column.sql new file mode 100644 index 00000000..83be98b9 --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/columns/tree_id/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_objects_public/tables/commit/columns/tree_id/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/commit/table + + +ALTER TABLE "constructive_objects_public".commit + ADD COLUMN tree_id uuid; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/constraints/commits_pkey/constraint.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/constraints/commits_pkey/constraint.sql new file mode 100644 index 00000000..78e6cf9c --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/constraints/commits_pkey/constraint.sql @@ -0,0 +1,12 @@ +-- Deploy: schemas/constructive_objects_public/tables/commit/constraints/commits_pkey/constraint +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/commit/table +-- requires: schemas/constructive_objects_public/tables/commit/columns/id/column +-- requires: schemas/constructive_objects_public/tables/commit/columns/database_id/column + + +ALTER TABLE "constructive_objects_public".commit + ADD CONSTRAINT commits_pkey PRIMARY KEY (id, database_id); + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/table.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/table.sql new file mode 100644 index 00000000..49e46299 --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/commit/table.sql @@ -0,0 +1,8 @@ +-- Deploy: schemas/constructive_objects_public/tables/commit/table +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema + + +CREATE TABLE "constructive_objects_public".commit (); + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/object/alterations/alt0000000018.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/object/alterations/alt0000000018.sql new file mode 100644 index 00000000..1e6c913b --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/object/alterations/alt0000000018.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_objects_public/tables/object/alterations/alt0000000018 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/object/table + + +ALTER TABLE "constructive_objects_public".object + DISABLE ROW LEVEL SECURITY; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/object/alterations/alt0000000019.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/object/alterations/alt0000000019.sql new file mode 100644 index 00000000..0af7d9cf --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/object/alterations/alt0000000019.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_objects_public/tables/object/alterations/alt0000000019 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/object/table + + +COMMENT ON TABLE "constructive_objects_public".object IS E'Content-addressed Merkle tree objects keyed by UUID v5 hash of data + children'; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/object/columns/created_at/alterations/alt0000000020.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/object/columns/created_at/alterations/alt0000000020.sql new file mode 100644 index 00000000..4debd400 --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/object/columns/created_at/alterations/alt0000000020.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_objects_public/tables/object/columns/created_at/alterations/alt0000000020 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/object/table +-- requires: schemas/constructive_objects_public/tables/object/columns/created_at/column + + +ALTER TABLE "constructive_objects_public".object + ALTER COLUMN created_at SET DEFAULT CURRENT_TIMESTAMP; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/object/columns/created_at/alterations/alt0000000021.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/object/columns/created_at/alterations/alt0000000021.sql new file mode 100644 index 00000000..eb5ca320 --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/object/columns/created_at/alterations/alt0000000021.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_objects_public/tables/object/columns/created_at/alterations/alt0000000021 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/object/columns/created_at/column + + +COMMENT ON COLUMN "constructive_objects_public".object.created_at IS 'Timestamp of object creation'; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/object/columns/created_at/column.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/object/columns/created_at/column.sql new file mode 100644 index 00000000..c394d806 --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/object/columns/created_at/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_objects_public/tables/object/columns/created_at/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/object/table + + +ALTER TABLE "constructive_objects_public".object + ADD COLUMN created_at timestamptz; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/object/columns/data/alterations/alt0000000022.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/object/columns/data/alterations/alt0000000022.sql new file mode 100644 index 00000000..5ac2e5e0 --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/object/columns/data/alterations/alt0000000022.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_objects_public/tables/object/columns/data/alterations/alt0000000022 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/object/columns/data/column + + +COMMENT ON COLUMN "constructive_objects_public".object.data IS 'Payload data for this object node'; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/object/columns/data/column.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/object/columns/data/column.sql new file mode 100644 index 00000000..23f1a9ae --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/object/columns/data/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_objects_public/tables/object/columns/data/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/object/table + + +ALTER TABLE "constructive_objects_public".object + ADD COLUMN data jsonb; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/object/columns/database_id/alterations/alt0000000023.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/object/columns/database_id/alterations/alt0000000023.sql new file mode 100644 index 00000000..b3a71747 --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/object/columns/database_id/alterations/alt0000000023.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_objects_public/tables/object/columns/database_id/alterations/alt0000000023 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/object/table +-- requires: schemas/constructive_objects_public/tables/object/columns/database_id/column + + +ALTER TABLE "constructive_objects_public".object + ALTER COLUMN database_id SET NOT NULL; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/object/columns/database_id/alterations/alt0000000024.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/object/columns/database_id/alterations/alt0000000024.sql new file mode 100644 index 00000000..6d4ff411 --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/object/columns/database_id/alterations/alt0000000024.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_objects_public/tables/object/columns/database_id/alterations/alt0000000024 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/object/columns/database_id/column + + +COMMENT ON COLUMN "constructive_objects_public".object.database_id IS E'Database scope for multi-tenant isolation'; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/object/columns/database_id/column.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/object/columns/database_id/column.sql new file mode 100644 index 00000000..6ed56ea3 --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/object/columns/database_id/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_objects_public/tables/object/columns/database_id/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/object/table + + +ALTER TABLE "constructive_objects_public".object + ADD COLUMN database_id uuid; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/object/columns/id/alterations/alt0000000025.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/object/columns/id/alterations/alt0000000025.sql new file mode 100644 index 00000000..bd3649bb --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/object/columns/id/alterations/alt0000000025.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_objects_public/tables/object/columns/id/alterations/alt0000000025 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/object/table +-- requires: schemas/constructive_objects_public/tables/object/columns/id/column + + +ALTER TABLE "constructive_objects_public".object + ALTER COLUMN id SET NOT NULL; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/object/columns/id/alterations/alt0000000026.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/object/columns/id/alterations/alt0000000026.sql new file mode 100644 index 00000000..450f296c --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/object/columns/id/alterations/alt0000000026.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_objects_public/tables/object/columns/id/alterations/alt0000000026 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/object/columns/id/column + + +COMMENT ON COLUMN "constructive_objects_public".object.id IS E'Content-addressed UUID v5 — deterministic hash of (data, kids, ktree)'; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/object/columns/id/column.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/object/columns/id/column.sql new file mode 100644 index 00000000..12b0cbc8 --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/object/columns/id/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_objects_public/tables/object/columns/id/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/object/table + + +ALTER TABLE "constructive_objects_public".object + ADD COLUMN id uuid; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/object/columns/kids/alterations/alt0000000027.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/object/columns/kids/alterations/alt0000000027.sql new file mode 100644 index 00000000..807d9c5b --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/object/columns/kids/alterations/alt0000000027.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_objects_public/tables/object/columns/kids/alterations/alt0000000027 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/object/columns/kids/column + + +COMMENT ON COLUMN "constructive_objects_public".object.kids IS 'Ordered array of child object IDs'; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/object/columns/kids/alterations/alt0000000028.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/object/columns/kids/alterations/alt0000000028.sql new file mode 100644 index 00000000..3382d459 --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/object/columns/kids/alterations/alt0000000028.sql @@ -0,0 +1,13 @@ +-- Deploy: schemas/constructive_objects_public/tables/object/columns/kids/alterations/alt0000000028 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/object/table +-- requires: schemas/constructive_objects_public/tables/object/columns/kids/column +-- requires: schemas/constructive_objects_public/tables/object/columns/ktree/column + + +ALTER TABLE "constructive_objects_public".object + ADD CONSTRAINT objects_kids_ktree_chk + CHECK (cardinality(kids) = cardinality(ktree) OR (kids IS NULL AND ktree IS NULL)); + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/object/columns/kids/column.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/object/columns/kids/column.sql new file mode 100644 index 00000000..e4bd18f8 --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/object/columns/kids/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_objects_public/tables/object/columns/kids/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/object/table + + +ALTER TABLE "constructive_objects_public".object + ADD COLUMN kids uuid[]; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/object/columns/ktree/alterations/alt0000000029.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/object/columns/ktree/alterations/alt0000000029.sql new file mode 100644 index 00000000..9c4f0e73 --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/object/columns/ktree/alterations/alt0000000029.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_objects_public/tables/object/columns/ktree/alterations/alt0000000029 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/object/columns/ktree/column + + +COMMENT ON COLUMN "constructive_objects_public".object.ktree IS E'Ordered array of child path names (parallel to kids)'; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/object/columns/ktree/column.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/object/columns/ktree/column.sql new file mode 100644 index 00000000..68b3208a --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/object/columns/ktree/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_objects_public/tables/object/columns/ktree/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/object/table + + +ALTER TABLE "constructive_objects_public".object + ADD COLUMN ktree text[]; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/object/constraints/objects_pkey/constraint.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/object/constraints/objects_pkey/constraint.sql new file mode 100644 index 00000000..f6b69d28 --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/object/constraints/objects_pkey/constraint.sql @@ -0,0 +1,12 @@ +-- Deploy: schemas/constructive_objects_public/tables/object/constraints/objects_pkey/constraint +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/object/table +-- requires: schemas/constructive_objects_public/tables/object/columns/id/column +-- requires: schemas/constructive_objects_public/tables/object/columns/database_id/column + + +ALTER TABLE "constructive_objects_public".object + ADD CONSTRAINT objects_pkey PRIMARY KEY (id, database_id); + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/object/table.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/object/table.sql new file mode 100644 index 00000000..5640a777 --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/object/table.sql @@ -0,0 +1,8 @@ +-- Deploy: schemas/constructive_objects_public/tables/object/table +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema + + +CREATE TABLE "constructive_objects_public".object (); + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/object/triggers/generate_id_hash.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/object/triggers/generate_id_hash.sql new file mode 100644 index 00000000..50ff9d41 --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/object/triggers/generate_id_hash.sql @@ -0,0 +1,14 @@ +-- Deploy: schemas/constructive_objects_public/tables/object/triggers/generate_id_hash +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_private/schema +-- requires: schemas/constructive_objects_public/tables/object/table +-- requires: schemas/constructive_objects_private/trigger_fns/tg_object_generate_id_hash + + +CREATE TRIGGER generate_id_hash +BEFORE INSERT ON "constructive_objects_public".object +FOR EACH ROW +EXECUTE PROCEDURE "constructive_objects_private".tg_object_generate_id_hash ( ); + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/ref/alterations/alt0000000030.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/ref/alterations/alt0000000030.sql new file mode 100644 index 00000000..9b743acc --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/ref/alterations/alt0000000030.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_objects_public/tables/ref/alterations/alt0000000030 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/ref/table + + +ALTER TABLE "constructive_objects_public".ref + DISABLE ROW LEVEL SECURITY; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/ref/alterations/alt0000000031.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/ref/alterations/alt0000000031.sql new file mode 100644 index 00000000..832a607c --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/ref/alterations/alt0000000031.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_objects_public/tables/ref/alterations/alt0000000031 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/ref/table + + +COMMENT ON TABLE "constructive_objects_public".ref IS E'Branch heads — mutable pointers into the commit chain'; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/ref/columns/commit_id/alterations/alt0000000032.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/ref/columns/commit_id/alterations/alt0000000032.sql new file mode 100644 index 00000000..0194b952 --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/ref/columns/commit_id/alterations/alt0000000032.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_objects_public/tables/ref/columns/commit_id/alterations/alt0000000032 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/ref/columns/commit_id/column + + +COMMENT ON COLUMN "constructive_objects_public".ref.commit_id IS 'Commit this ref points to'; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/ref/columns/commit_id/column.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/ref/columns/commit_id/column.sql new file mode 100644 index 00000000..d44ce18f --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/ref/columns/commit_id/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_objects_public/tables/ref/columns/commit_id/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/ref/table + + +ALTER TABLE "constructive_objects_public".ref + ADD COLUMN commit_id uuid; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/ref/columns/database_id/alterations/alt0000000033.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/ref/columns/database_id/alterations/alt0000000033.sql new file mode 100644 index 00000000..760bb418 --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/ref/columns/database_id/alterations/alt0000000033.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_objects_public/tables/ref/columns/database_id/alterations/alt0000000033 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/ref/table +-- requires: schemas/constructive_objects_public/tables/ref/columns/database_id/column + + +ALTER TABLE "constructive_objects_public".ref + ALTER COLUMN database_id SET NOT NULL; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/ref/columns/database_id/alterations/alt0000000034.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/ref/columns/database_id/alterations/alt0000000034.sql new file mode 100644 index 00000000..e417e764 --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/ref/columns/database_id/alterations/alt0000000034.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_objects_public/tables/ref/columns/database_id/alterations/alt0000000034 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/ref/columns/database_id/column + + +COMMENT ON COLUMN "constructive_objects_public".ref.database_id IS E'Database scope for multi-tenant isolation'; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/ref/columns/database_id/column.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/ref/columns/database_id/column.sql new file mode 100644 index 00000000..f5f24e34 --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/ref/columns/database_id/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_objects_public/tables/ref/columns/database_id/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/ref/table + + +ALTER TABLE "constructive_objects_public".ref + ADD COLUMN database_id uuid; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/ref/columns/id/alterations/alt0000000035.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/ref/columns/id/alterations/alt0000000035.sql new file mode 100644 index 00000000..314ea9c5 --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/ref/columns/id/alterations/alt0000000035.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_objects_public/tables/ref/columns/id/alterations/alt0000000035 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/ref/table +-- requires: schemas/constructive_objects_public/tables/ref/columns/id/column + + +ALTER TABLE "constructive_objects_public".ref + ALTER COLUMN id SET NOT NULL; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/ref/columns/id/alterations/alt0000000036.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/ref/columns/id/alterations/alt0000000036.sql new file mode 100644 index 00000000..a5c5392e --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/ref/columns/id/alterations/alt0000000036.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_objects_public/tables/ref/columns/id/alterations/alt0000000036 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/ref/table +-- requires: schemas/constructive_objects_public/tables/ref/columns/id/column + + +ALTER TABLE "constructive_objects_public".ref + ALTER COLUMN id SET DEFAULT uuidv7(); + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/ref/columns/id/alterations/alt0000000037.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/ref/columns/id/alterations/alt0000000037.sql new file mode 100644 index 00000000..45670687 --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/ref/columns/id/alterations/alt0000000037.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_objects_public/tables/ref/columns/id/alterations/alt0000000037 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/ref/columns/id/column + + +COMMENT ON COLUMN "constructive_objects_public".ref.id IS 'Unique ref identifier'; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/ref/columns/id/column.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/ref/columns/id/column.sql new file mode 100644 index 00000000..3dfc0d65 --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/ref/columns/id/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_objects_public/tables/ref/columns/id/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/ref/table + + +ALTER TABLE "constructive_objects_public".ref + ADD COLUMN id uuid; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/ref/columns/name/alterations/alt0000000038.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/ref/columns/name/alterations/alt0000000038.sql new file mode 100644 index 00000000..15ceb28a --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/ref/columns/name/alterations/alt0000000038.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_objects_public/tables/ref/columns/name/alterations/alt0000000038 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/ref/table +-- requires: schemas/constructive_objects_public/tables/ref/columns/name/column + + +ALTER TABLE "constructive_objects_public".ref + ALTER COLUMN name SET NOT NULL; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/ref/columns/name/alterations/alt0000000039.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/ref/columns/name/alterations/alt0000000039.sql new file mode 100644 index 00000000..6a68fba5 --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/ref/columns/name/alterations/alt0000000039.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_objects_public/tables/ref/columns/name/alterations/alt0000000039 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/ref/columns/name/column + + +COMMENT ON COLUMN "constructive_objects_public".ref.name IS E'Ref name (e.g. HEAD, main)'; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/ref/columns/name/column.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/ref/columns/name/column.sql new file mode 100644 index 00000000..279cdf93 --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/ref/columns/name/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_objects_public/tables/ref/columns/name/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/ref/table + + +ALTER TABLE "constructive_objects_public".ref + ADD COLUMN name text; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/ref/columns/store_id/alterations/alt0000000040.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/ref/columns/store_id/alterations/alt0000000040.sql new file mode 100644 index 00000000..181dd53a --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/ref/columns/store_id/alterations/alt0000000040.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_objects_public/tables/ref/columns/store_id/alterations/alt0000000040 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/ref/table +-- requires: schemas/constructive_objects_public/tables/ref/columns/store_id/column + + +ALTER TABLE "constructive_objects_public".ref + ALTER COLUMN store_id SET NOT NULL; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/ref/columns/store_id/alterations/alt0000000041.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/ref/columns/store_id/alterations/alt0000000041.sql new file mode 100644 index 00000000..be68c2b1 --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/ref/columns/store_id/alterations/alt0000000041.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_objects_public/tables/ref/columns/store_id/alterations/alt0000000041 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/ref/columns/store_id/column + + +COMMENT ON COLUMN "constructive_objects_public".ref.store_id IS 'Store this ref belongs to'; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/ref/columns/store_id/column.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/ref/columns/store_id/column.sql new file mode 100644 index 00000000..a0e180af --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/ref/columns/store_id/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_objects_public/tables/ref/columns/store_id/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/ref/table + + +ALTER TABLE "constructive_objects_public".ref + ADD COLUMN store_id uuid; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/ref/constraints/refs_pkey/constraint.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/ref/constraints/refs_pkey/constraint.sql new file mode 100644 index 00000000..fa78ae10 --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/ref/constraints/refs_pkey/constraint.sql @@ -0,0 +1,12 @@ +-- Deploy: schemas/constructive_objects_public/tables/ref/constraints/refs_pkey/constraint +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/ref/table +-- requires: schemas/constructive_objects_public/tables/ref/columns/id/column +-- requires: schemas/constructive_objects_public/tables/ref/columns/database_id/column + + +ALTER TABLE "constructive_objects_public".ref + ADD CONSTRAINT refs_pkey PRIMARY KEY (id, database_id); + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/ref/table.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/ref/table.sql new file mode 100644 index 00000000..ae9105be --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/ref/table.sql @@ -0,0 +1,8 @@ +-- Deploy: schemas/constructive_objects_public/tables/ref/table +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema + + +CREATE TABLE "constructive_objects_public".ref (); + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/store/alterations/alt0000000042.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/store/alterations/alt0000000042.sql new file mode 100644 index 00000000..76f9b2e8 --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/store/alterations/alt0000000042.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_objects_public/tables/store/alterations/alt0000000042 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/store/table + + +ALTER TABLE "constructive_objects_public".store + DISABLE ROW LEVEL SECURITY; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/store/alterations/alt0000000043.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/store/alterations/alt0000000043.sql new file mode 100644 index 00000000..a8e80a39 --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/store/alterations/alt0000000043.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_objects_public/tables/store/alterations/alt0000000043 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/store/table + + +COMMENT ON TABLE "constructive_objects_public".store IS E'Named stores — one per version-controlled tree (e.g. one graph, one definition set)'; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/store/columns/created_at/alterations/alt0000000044.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/store/columns/created_at/alterations/alt0000000044.sql new file mode 100644 index 00000000..54318dc7 --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/store/columns/created_at/alterations/alt0000000044.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_objects_public/tables/store/columns/created_at/alterations/alt0000000044 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/store/table +-- requires: schemas/constructive_objects_public/tables/store/columns/created_at/column + + +ALTER TABLE "constructive_objects_public".store + ALTER COLUMN created_at SET DEFAULT CURRENT_TIMESTAMP; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/store/columns/created_at/alterations/alt0000000045.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/store/columns/created_at/alterations/alt0000000045.sql new file mode 100644 index 00000000..4e82f7ca --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/store/columns/created_at/alterations/alt0000000045.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_objects_public/tables/store/columns/created_at/alterations/alt0000000045 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/store/columns/created_at/column + + +COMMENT ON COLUMN "constructive_objects_public".store.created_at IS 'Timestamp of store creation'; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/store/columns/created_at/column.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/store/columns/created_at/column.sql new file mode 100644 index 00000000..693df886 --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/store/columns/created_at/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_objects_public/tables/store/columns/created_at/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/store/table + + +ALTER TABLE "constructive_objects_public".store + ADD COLUMN created_at timestamptz; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/store/columns/database_id/alterations/alt0000000046.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/store/columns/database_id/alterations/alt0000000046.sql new file mode 100644 index 00000000..07703572 --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/store/columns/database_id/alterations/alt0000000046.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_objects_public/tables/store/columns/database_id/alterations/alt0000000046 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/store/table +-- requires: schemas/constructive_objects_public/tables/store/columns/database_id/column + + +ALTER TABLE "constructive_objects_public".store + ALTER COLUMN database_id SET NOT NULL; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/store/columns/database_id/alterations/alt0000000047.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/store/columns/database_id/alterations/alt0000000047.sql new file mode 100644 index 00000000..1d2f6ef2 --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/store/columns/database_id/alterations/alt0000000047.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_objects_public/tables/store/columns/database_id/alterations/alt0000000047 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/store/columns/database_id/column + + +COMMENT ON COLUMN "constructive_objects_public".store.database_id IS E'Database scope for multi-tenant isolation'; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/store/columns/database_id/column.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/store/columns/database_id/column.sql new file mode 100644 index 00000000..f5baff7f --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/store/columns/database_id/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_objects_public/tables/store/columns/database_id/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/store/table + + +ALTER TABLE "constructive_objects_public".store + ADD COLUMN database_id uuid; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/store/columns/hash/alterations/alt0000000048.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/store/columns/hash/alterations/alt0000000048.sql new file mode 100644 index 00000000..6a4c4d2a --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/store/columns/hash/alterations/alt0000000048.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_objects_public/tables/store/columns/hash/alterations/alt0000000048 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/store/columns/hash/column + + +COMMENT ON COLUMN "constructive_objects_public".store.hash IS 'Current root object hash of this store'; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/store/columns/hash/column.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/store/columns/hash/column.sql new file mode 100644 index 00000000..96983fae --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/store/columns/hash/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_objects_public/tables/store/columns/hash/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/store/table + + +ALTER TABLE "constructive_objects_public".store + ADD COLUMN hash uuid; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/store/columns/id/alterations/alt0000000049.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/store/columns/id/alterations/alt0000000049.sql new file mode 100644 index 00000000..3916b8a8 --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/store/columns/id/alterations/alt0000000049.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_objects_public/tables/store/columns/id/alterations/alt0000000049 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/store/table +-- requires: schemas/constructive_objects_public/tables/store/columns/id/column + + +ALTER TABLE "constructive_objects_public".store + ALTER COLUMN id SET NOT NULL; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/store/columns/id/alterations/alt0000000050.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/store/columns/id/alterations/alt0000000050.sql new file mode 100644 index 00000000..41d9bc8d --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/store/columns/id/alterations/alt0000000050.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_objects_public/tables/store/columns/id/alterations/alt0000000050 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/store/table +-- requires: schemas/constructive_objects_public/tables/store/columns/id/column + + +ALTER TABLE "constructive_objects_public".store + ALTER COLUMN id SET DEFAULT uuidv7(); + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/store/columns/id/alterations/alt0000000051.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/store/columns/id/alterations/alt0000000051.sql new file mode 100644 index 00000000..13218476 --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/store/columns/id/alterations/alt0000000051.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_objects_public/tables/store/columns/id/alterations/alt0000000051 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/store/columns/id/column + + +COMMENT ON COLUMN "constructive_objects_public".store.id IS 'Unique store identifier'; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/store/columns/id/column.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/store/columns/id/column.sql new file mode 100644 index 00000000..68c41531 --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/store/columns/id/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_objects_public/tables/store/columns/id/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/store/table + + +ALTER TABLE "constructive_objects_public".store + ADD COLUMN id uuid; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/store/columns/name/alterations/alt0000000052.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/store/columns/name/alterations/alt0000000052.sql new file mode 100644 index 00000000..a9a415df --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/store/columns/name/alterations/alt0000000052.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_objects_public/tables/store/columns/name/alterations/alt0000000052 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/store/table +-- requires: schemas/constructive_objects_public/tables/store/columns/name/column + + +ALTER TABLE "constructive_objects_public".store + ALTER COLUMN name SET NOT NULL; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/store/columns/name/alterations/alt0000000053.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/store/columns/name/alterations/alt0000000053.sql new file mode 100644 index 00000000..fd09c3a9 --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/store/columns/name/alterations/alt0000000053.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_objects_public/tables/store/columns/name/alterations/alt0000000053 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/store/columns/name/column + + +COMMENT ON COLUMN "constructive_objects_public".store.name IS E'Human-readable store name'; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/store/columns/name/column.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/store/columns/name/column.sql new file mode 100644 index 00000000..fb9b126c --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/store/columns/name/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_objects_public/tables/store/columns/name/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/store/table + + +ALTER TABLE "constructive_objects_public".store + ADD COLUMN name text; + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/store/constraints/stores_pkey/constraint.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/store/constraints/stores_pkey/constraint.sql new file mode 100644 index 00000000..10699361 --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/store/constraints/stores_pkey/constraint.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_objects_public/tables/store/constraints/stores_pkey/constraint +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/store/table +-- requires: schemas/constructive_objects_public/tables/store/columns/id/column + + +ALTER TABLE "constructive_objects_public".store + ADD CONSTRAINT stores_pkey PRIMARY KEY (id); + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/store/indexes/idx_store_unique_name.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/store/indexes/idx_store_unique_name.sql new file mode 100644 index 00000000..d970fca3 --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/store/indexes/idx_store_unique_name.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_objects_public/tables/store/indexes/idx_store_unique_name +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema +-- requires: schemas/constructive_objects_public/tables/store/table +-- requires: schemas/constructive_objects_public/tables/store/columns/database_id/column + + +CREATE UNIQUE INDEX idx_store_unique_name ON "constructive_objects_public".store ( database_id, (decode(md5(lower(name)), 'hex')) ); + diff --git a/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/store/table.sql b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/store/table.sql new file mode 100644 index 00000000..3599a8cf --- /dev/null +++ b/pgpm/constructive-objects/deploy/schemas/constructive_objects_public/tables/store/table.sql @@ -0,0 +1,8 @@ +-- Deploy: schemas/constructive_objects_public/tables/store/table +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_objects_public/schema + + +CREATE TABLE "constructive_objects_public".store (); + diff --git a/pgpm/constructive-objects/package.json b/pgpm/constructive-objects/package.json new file mode 100644 index 00000000..2ac4066c --- /dev/null +++ b/pgpm/constructive-objects/package.json @@ -0,0 +1,30 @@ +{ + "name": "@constructive-io/constructive-objects", + "version": "0.0.1", + "description": "Objects module — content-addressable merkle store, refs, commits", + "author": "Constructive ", + "keywords": [ + "postgresql", + "pgpm", + "constructive-objects" + ], + "publishConfig": { + "access": "public" + }, + "scripts": { + "bundle": "pgpm package", + "test": "jest", + "test:watch": "jest --watch" + }, + "dependencies": { + "@pgpm/inflection": "*", + "@pgpm/stamps": "*" + }, + "devDependencies": { + "pgpm": "^4.26.1" + }, + "repository": { + "type": "git", + "url": "https://github.com/constructive-io/constructive-functions" + } +} diff --git a/pgpm/constructive-objects/pgpm.plan b/pgpm/constructive-objects/pgpm.plan new file mode 100644 index 00000000..c7336611 --- /dev/null +++ b/pgpm/constructive-objects/pgpm.plan @@ -0,0 +1,101 @@ +%syntax-version=1.0.0 +%project=constructive-objects +%uri=constructive-objects + +schemas/constructive_objects_private/schema 2017-08-11T08:11:51Z Constructive # add create_schema +schemas/constructive_objects_public/schema 2017-08-11T08:11:51Z Constructive # add create_schema +schemas/constructive_objects_public/tables/commit/table [schemas/constructive_objects_public/schema] 2017-08-11T08:11:51Z Constructive # add create_table +schemas/constructive_objects_public/tables/object/table [schemas/constructive_objects_public/schema] 2017-08-11T08:11:51Z Constructive # add create_table +schemas/constructive_objects_public/tables/ref/table [schemas/constructive_objects_public/schema] 2017-08-11T08:11:51Z Constructive # add create_table +schemas/constructive_objects_public/tables/store/table [schemas/constructive_objects_public/schema] 2017-08-11T08:11:51Z Constructive # add create_table +schemas/constructive_objects_public/tables/commit/columns/author_id/column [schemas/constructive_objects_public/tables/commit/table schemas/constructive_objects_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_objects_public/tables/commit/columns/author_id/alterations/alt0000000003 [schemas/constructive_objects_public/tables/commit/columns/author_id/column schemas/constructive_objects_public/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_objects_public/tables/commit/columns/committer_id/column [schemas/constructive_objects_public/tables/commit/table schemas/constructive_objects_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_objects_public/tables/commit/columns/committer_id/alterations/alt0000000004 [schemas/constructive_objects_public/schema schemas/constructive_objects_public/tables/commit/columns/committer_id/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_objects_public/tables/commit/columns/database_id/column [schemas/constructive_objects_public/tables/commit/table schemas/constructive_objects_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_objects_public/tables/commit/columns/database_id/alterations/alt0000000005 [schemas/constructive_objects_public/tables/commit/table schemas/constructive_objects_public/tables/commit/columns/database_id/column schemas/constructive_objects_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_objects_public/tables/commit/columns/database_id/alterations/alt0000000006 [schemas/constructive_objects_public/tables/commit/columns/database_id/column schemas/constructive_objects_public/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_objects_public/tables/commit/columns/date/column [schemas/constructive_objects_public/tables/commit/table schemas/constructive_objects_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_objects_public/tables/commit/columns/date/alterations/alt0000000007 [schemas/constructive_objects_public/tables/commit/columns/date/column schemas/constructive_objects_public/tables/commit/table schemas/constructive_objects_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_objects_public/tables/commit/columns/date/alterations/alt0000000008 [schemas/constructive_objects_public/tables/commit/columns/date/column schemas/constructive_objects_public/tables/commit/table schemas/constructive_objects_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default +schemas/constructive_objects_public/tables/commit/columns/date/alterations/alt0000000009 [schemas/constructive_objects_public/tables/commit/columns/date/column schemas/constructive_objects_public/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_objects_public/tables/commit/columns/id/column [schemas/constructive_objects_public/tables/commit/table schemas/constructive_objects_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_objects_public/tables/commit/columns/id/alterations/alt0000000010 [schemas/constructive_objects_public/tables/commit/table schemas/constructive_objects_public/tables/commit/columns/id/column schemas/constructive_objects_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_objects_public/tables/commit/columns/id/alterations/alt0000000011 [schemas/constructive_objects_public/tables/commit/table schemas/constructive_objects_public/tables/commit/columns/id/column schemas/constructive_objects_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default +schemas/constructive_objects_public/tables/commit/columns/id/alterations/alt0000000012 [schemas/constructive_objects_public/tables/commit/columns/id/column schemas/constructive_objects_public/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_objects_public/tables/commit/columns/message/column [schemas/constructive_objects_public/tables/commit/table schemas/constructive_objects_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_objects_public/tables/commit/columns/message/alterations/alt0000000013 [schemas/constructive_objects_public/schema schemas/constructive_objects_public/tables/commit/columns/message/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_objects_public/tables/commit/columns/parent_ids/column [schemas/constructive_objects_public/tables/commit/table schemas/constructive_objects_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_objects_public/tables/commit/columns/parent_ids/alterations/alt0000000014 [schemas/constructive_objects_public/schema schemas/constructive_objects_public/tables/commit/columns/parent_ids/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_objects_public/tables/commit/columns/store_id/column [schemas/constructive_objects_public/tables/commit/table schemas/constructive_objects_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_objects_public/tables/commit/columns/store_id/alterations/alt0000000015 [schemas/constructive_objects_public/tables/commit/table schemas/constructive_objects_public/schema schemas/constructive_objects_public/tables/commit/columns/store_id/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_objects_public/tables/commit/columns/store_id/alterations/alt0000000016 [schemas/constructive_objects_public/schema schemas/constructive_objects_public/tables/commit/columns/store_id/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_objects_public/tables/commit/columns/tree_id/column [schemas/constructive_objects_public/tables/commit/table schemas/constructive_objects_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_objects_public/tables/commit/columns/tree_id/alterations/alt0000000017 [schemas/constructive_objects_public/schema schemas/constructive_objects_public/tables/commit/columns/tree_id/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_objects_public/tables/object/columns/created_at/column [schemas/constructive_objects_public/schema schemas/constructive_objects_public/tables/object/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_objects_public/tables/object/columns/created_at/alterations/alt0000000020 [schemas/constructive_objects_public/tables/object/columns/created_at/column schemas/constructive_objects_public/schema schemas/constructive_objects_public/tables/object/table] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default +schemas/constructive_objects_public/tables/object/columns/created_at/alterations/alt0000000021 [schemas/constructive_objects_public/tables/object/columns/created_at/column schemas/constructive_objects_public/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_objects_public/tables/object/columns/data/column [schemas/constructive_objects_public/schema schemas/constructive_objects_public/tables/object/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_objects_public/tables/object/columns/data/alterations/alt0000000022 [schemas/constructive_objects_public/schema schemas/constructive_objects_public/tables/object/columns/data/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_objects_public/tables/object/columns/database_id/column [schemas/constructive_objects_public/schema schemas/constructive_objects_public/tables/object/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_objects_public/tables/object/columns/database_id/alterations/alt0000000023 [schemas/constructive_objects_public/schema schemas/constructive_objects_public/tables/object/columns/database_id/column schemas/constructive_objects_public/tables/object/table] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_objects_public/tables/object/columns/database_id/alterations/alt0000000024 [schemas/constructive_objects_public/schema schemas/constructive_objects_public/tables/object/columns/database_id/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_objects_public/tables/object/columns/id/column [schemas/constructive_objects_public/schema schemas/constructive_objects_public/tables/object/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_objects_public/tables/object/columns/id/alterations/alt0000000025 [schemas/constructive_objects_public/tables/object/columns/id/column schemas/constructive_objects_public/schema schemas/constructive_objects_public/tables/object/table] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_objects_public/tables/object/columns/id/alterations/alt0000000026 [schemas/constructive_objects_public/tables/object/columns/id/column schemas/constructive_objects_public/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_objects_public/tables/object/columns/kids/column [schemas/constructive_objects_public/schema schemas/constructive_objects_public/tables/object/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_objects_public/tables/object/columns/kids/alterations/alt0000000027 [schemas/constructive_objects_public/schema schemas/constructive_objects_public/tables/object/columns/kids/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_objects_public/tables/object/columns/ktree/column [schemas/constructive_objects_public/schema schemas/constructive_objects_public/tables/object/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_objects_public/tables/object/columns/kids/alterations/alt0000000028 [schemas/constructive_objects_public/tables/object/columns/ktree/column schemas/constructive_objects_public/schema schemas/constructive_objects_public/tables/object/columns/kids/column schemas/constructive_objects_public/tables/object/table] 2017-08-11T08:11:51Z Constructive # add create_check_constraint +schemas/constructive_objects_public/tables/object/columns/ktree/alterations/alt0000000029 [schemas/constructive_objects_public/tables/object/columns/ktree/column schemas/constructive_objects_public/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_objects_public/tables/ref/columns/commit_id/column [schemas/constructive_objects_public/tables/ref/table schemas/constructive_objects_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_objects_public/tables/ref/columns/commit_id/alterations/alt0000000032 [schemas/constructive_objects_public/schema schemas/constructive_objects_public/tables/ref/columns/commit_id/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_objects_public/tables/ref/columns/database_id/column [schemas/constructive_objects_public/tables/ref/table schemas/constructive_objects_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_objects_public/tables/ref/columns/database_id/alterations/alt0000000033 [schemas/constructive_objects_public/tables/ref/table schemas/constructive_objects_public/schema schemas/constructive_objects_public/tables/ref/columns/database_id/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_objects_public/tables/ref/columns/database_id/alterations/alt0000000034 [schemas/constructive_objects_public/schema schemas/constructive_objects_public/tables/ref/columns/database_id/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_objects_public/tables/ref/columns/id/column [schemas/constructive_objects_public/tables/ref/table schemas/constructive_objects_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_objects_public/tables/ref/columns/id/alterations/alt0000000035 [schemas/constructive_objects_public/tables/ref/table schemas/constructive_objects_public/schema schemas/constructive_objects_public/tables/ref/columns/id/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_objects_public/tables/ref/columns/id/alterations/alt0000000036 [schemas/constructive_objects_public/tables/ref/table schemas/constructive_objects_public/schema schemas/constructive_objects_public/tables/ref/columns/id/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default +schemas/constructive_objects_public/tables/ref/columns/id/alterations/alt0000000037 [schemas/constructive_objects_public/schema schemas/constructive_objects_public/tables/ref/columns/id/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_objects_public/tables/ref/columns/name/column [schemas/constructive_objects_public/tables/ref/table schemas/constructive_objects_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_objects_public/tables/ref/columns/name/alterations/alt0000000038 [schemas/constructive_objects_public/tables/ref/columns/name/column schemas/constructive_objects_public/tables/ref/table schemas/constructive_objects_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_objects_public/tables/ref/columns/name/alterations/alt0000000039 [schemas/constructive_objects_public/tables/ref/columns/name/column schemas/constructive_objects_public/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_objects_public/tables/ref/columns/store_id/column [schemas/constructive_objects_public/tables/ref/table schemas/constructive_objects_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_objects_public/tables/ref/columns/store_id/alterations/alt0000000040 [schemas/constructive_objects_public/tables/ref/columns/store_id/column schemas/constructive_objects_public/tables/ref/table schemas/constructive_objects_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_objects_public/tables/ref/columns/store_id/alterations/alt0000000041 [schemas/constructive_objects_public/tables/ref/columns/store_id/column schemas/constructive_objects_public/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_objects_public/tables/store/columns/created_at/column [schemas/constructive_objects_public/schema schemas/constructive_objects_public/tables/store/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_objects_public/tables/store/columns/created_at/alterations/alt0000000044 [schemas/constructive_objects_public/schema schemas/constructive_objects_public/tables/store/table schemas/constructive_objects_public/tables/store/columns/created_at/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default +schemas/constructive_objects_public/tables/store/columns/created_at/alterations/alt0000000045 [schemas/constructive_objects_public/schema schemas/constructive_objects_public/tables/store/columns/created_at/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_objects_public/tables/store/columns/database_id/column [schemas/constructive_objects_public/schema schemas/constructive_objects_public/tables/store/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_objects_public/tables/store/columns/database_id/alterations/alt0000000046 [schemas/constructive_objects_public/tables/store/columns/database_id/column schemas/constructive_objects_public/schema schemas/constructive_objects_public/tables/store/table] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_objects_public/tables/store/columns/database_id/alterations/alt0000000047 [schemas/constructive_objects_public/tables/store/columns/database_id/column schemas/constructive_objects_public/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_objects_public/tables/store/columns/hash/column [schemas/constructive_objects_public/schema schemas/constructive_objects_public/tables/store/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_objects_public/tables/store/columns/hash/alterations/alt0000000048 [schemas/constructive_objects_public/schema schemas/constructive_objects_public/tables/store/columns/hash/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_objects_public/tables/store/columns/id/column [schemas/constructive_objects_public/schema schemas/constructive_objects_public/tables/store/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_objects_public/tables/store/columns/id/alterations/alt0000000049 [schemas/constructive_objects_public/tables/store/columns/id/column schemas/constructive_objects_public/schema schemas/constructive_objects_public/tables/store/table] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_objects_public/tables/store/columns/id/alterations/alt0000000050 [schemas/constructive_objects_public/tables/store/columns/id/column schemas/constructive_objects_public/schema schemas/constructive_objects_public/tables/store/table] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default +schemas/constructive_objects_public/tables/store/columns/id/alterations/alt0000000051 [schemas/constructive_objects_public/tables/store/columns/id/column schemas/constructive_objects_public/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_objects_public/tables/store/columns/name/column [schemas/constructive_objects_public/schema schemas/constructive_objects_public/tables/store/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_objects_public/tables/store/columns/name/alterations/alt0000000052 [schemas/constructive_objects_public/schema schemas/constructive_objects_public/tables/store/columns/name/column schemas/constructive_objects_public/tables/store/table] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_objects_public/tables/store/columns/name/alterations/alt0000000053 [schemas/constructive_objects_public/schema schemas/constructive_objects_public/tables/store/columns/name/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_objects_public/tables/commit/alterations/alt0000000001 [schemas/constructive_objects_public/tables/commit/table schemas/constructive_objects_public/schema] 2017-08-11T08:11:51Z Constructive # add disable_row_level_security +schemas/constructive_objects_public/tables/commit/alterations/alt0000000002 [schemas/constructive_objects_public/tables/commit/table schemas/constructive_objects_public/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_objects_public/tables/object/alterations/alt0000000018 [schemas/constructive_objects_public/schema schemas/constructive_objects_public/tables/object/table] 2017-08-11T08:11:51Z Constructive # add disable_row_level_security +schemas/constructive_objects_public/tables/object/alterations/alt0000000019 [schemas/constructive_objects_public/schema schemas/constructive_objects_public/tables/object/table] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_objects_public/tables/ref/alterations/alt0000000030 [schemas/constructive_objects_public/tables/ref/table schemas/constructive_objects_public/schema] 2017-08-11T08:11:51Z Constructive # add disable_row_level_security +schemas/constructive_objects_public/tables/ref/alterations/alt0000000031 [schemas/constructive_objects_public/tables/ref/table schemas/constructive_objects_public/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_objects_public/tables/store/alterations/alt0000000042 [schemas/constructive_objects_public/schema schemas/constructive_objects_public/tables/store/table] 2017-08-11T08:11:51Z Constructive # add disable_row_level_security +schemas/constructive_objects_public/tables/store/alterations/alt0000000043 [schemas/constructive_objects_public/schema schemas/constructive_objects_public/tables/store/table] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_objects_public/tables/commit/constraints/commits_pkey/constraint [schemas/constructive_objects_public/tables/commit/table schemas/constructive_objects_public/schema schemas/constructive_objects_public/tables/commit/columns/id/column schemas/constructive_objects_public/tables/commit/columns/database_id/column] 2017-08-11T08:11:51Z Constructive # add alter_table_add_primary_key +schemas/constructive_objects_public/tables/object/constraints/objects_pkey/constraint [schemas/constructive_objects_public/schema schemas/constructive_objects_public/tables/object/table schemas/constructive_objects_public/tables/object/columns/id/column schemas/constructive_objects_public/tables/object/columns/database_id/column] 2017-08-11T08:11:51Z Constructive # add alter_table_add_primary_key +schemas/constructive_objects_public/tables/ref/constraints/refs_pkey/constraint [schemas/constructive_objects_public/tables/ref/table schemas/constructive_objects_public/schema schemas/constructive_objects_public/tables/ref/columns/id/column schemas/constructive_objects_public/tables/ref/columns/database_id/column] 2017-08-11T08:11:51Z Constructive # add alter_table_add_primary_key +schemas/constructive_objects_public/tables/store/constraints/stores_pkey/constraint [schemas/constructive_objects_public/schema schemas/constructive_objects_public/tables/store/table schemas/constructive_objects_public/tables/store/columns/id/column] 2017-08-11T08:11:51Z Constructive # add alter_table_add_primary_key +schemas/constructive_objects_public/tables/store/indexes/idx_store_unique_name [schemas/constructive_objects_public/schema schemas/constructive_objects_public/tables/store/table schemas/constructive_objects_public/tables/store/columns/database_id/column] 2017-08-11T08:11:51Z Constructive # add create_index_expression +schemas/constructive_objects_private/trigger_fns/tg_object_generate_id_hash [schemas/constructive_objects_private/schema] 2017-08-11T08:11:51Z Constructive # add create_trigger_function +schemas/constructive_objects_private/procedures/object_hash_uuid/procedure [schemas/constructive_objects_private/schema] 2017-08-11T08:11:51Z Constructive # add create_function +schemas/constructive_objects_public/procedures/get_all/procedure [schemas/constructive_objects_public/schema] 2017-08-11T08:11:51Z Constructive # add create_function +schemas/constructive_objects_public/procedures/get_node_at_path/procedure [schemas/constructive_objects_public/schema] 2017-08-11T08:11:51Z Constructive # add create_function +schemas/constructive_objects_public/procedures/init_empty_repo/procedure [schemas/constructive_objects_public/schema] 2017-08-11T08:11:51Z Constructive # add create_function +schemas/constructive_objects_public/procedures/insert_node_at_path/procedure [schemas/constructive_objects_public/schema] 2017-08-11T08:11:51Z Constructive # add create_function +schemas/constructive_objects_public/procedures/set_data_at_path/procedure [schemas/constructive_objects_public/schema] 2017-08-11T08:11:51Z Constructive # add create_function +schemas/constructive_objects_public/tables/object/triggers/generate_id_hash [schemas/constructive_objects_private/schema schemas/constructive_objects_public/schema schemas/constructive_objects_public/tables/object/table schemas/constructive_objects_private/trigger_fns/tg_object_generate_id_hash] 2017-08-11T08:11:51Z Constructive # add create_trigger diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_private/procedures/object_hash_uuid/procedure.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_private/procedures/object_hash_uuid/procedure.sql new file mode 100644 index 00000000..69386e9c --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_private/procedures/object_hash_uuid/procedure.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_objects_private/procedures/object_hash_uuid/procedure + + +DROP FUNCTION "constructive_objects_private".object_hash_uuid; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_private/schema.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_private/schema.sql new file mode 100644 index 00000000..265b60ea --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_private/schema.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_objects_private/schema + + +DROP SCHEMA "constructive_objects_private" CASCADE; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_private/trigger_fns/tg_object_generate_id_hash.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_private/trigger_fns/tg_object_generate_id_hash.sql new file mode 100644 index 00000000..221a31b7 --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_private/trigger_fns/tg_object_generate_id_hash.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_objects_private/trigger_fns/tg_object_generate_id_hash + + +DROP FUNCTION "constructive_objects_private".tg_object_generate_id_hash; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/procedures/get_all/procedure.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/procedures/get_all/procedure.sql new file mode 100644 index 00000000..41fd50b8 --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/procedures/get_all/procedure.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_objects_public/procedures/get_all/procedure + + +DROP FUNCTION "constructive_objects_public".get_all; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/procedures/get_node_at_path/procedure.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/procedures/get_node_at_path/procedure.sql new file mode 100644 index 00000000..3b2a77f8 --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/procedures/get_node_at_path/procedure.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_objects_public/procedures/get_node_at_path/procedure + + +DROP FUNCTION "constructive_objects_public".get_node_at_path; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/procedures/init_empty_repo/procedure.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/procedures/init_empty_repo/procedure.sql new file mode 100644 index 00000000..1f5849db --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/procedures/init_empty_repo/procedure.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_objects_public/procedures/init_empty_repo/procedure + + +DROP FUNCTION "constructive_objects_public".init_empty_repo; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/procedures/insert_node_at_path/procedure.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/procedures/insert_node_at_path/procedure.sql new file mode 100644 index 00000000..519d78a6 --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/procedures/insert_node_at_path/procedure.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_objects_public/procedures/insert_node_at_path/procedure + + +DROP FUNCTION "constructive_objects_public".insert_node_at_path; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/procedures/set_data_at_path/procedure.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/procedures/set_data_at_path/procedure.sql new file mode 100644 index 00000000..9e4d0868 --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/procedures/set_data_at_path/procedure.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_objects_public/procedures/set_data_at_path/procedure + + +DROP FUNCTION "constructive_objects_public".set_data_at_path; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/schema.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/schema.sql new file mode 100644 index 00000000..c3798bca --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/schema.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_objects_public/schema + + +DROP SCHEMA "constructive_objects_public" CASCADE; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/alterations/alt0000000001.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/alterations/alt0000000001.sql new file mode 100644 index 00000000..9c01ed48 --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/alterations/alt0000000001.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_objects_public/tables/commit/alterations/alt0000000001 + + +ALTER TABLE "constructive_objects_public".commit + ENABLE ROW LEVEL SECURITY; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/alterations/alt0000000002.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/alterations/alt0000000002.sql new file mode 100644 index 00000000..b88d698a --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/alterations/alt0000000002.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_objects_public/tables/commit/alterations/alt0000000002 + + +COMMENT ON TABLE "constructive_objects_public".commit IS NULL; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/columns/author_id/alterations/alt0000000003.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/columns/author_id/alterations/alt0000000003.sql new file mode 100644 index 00000000..bb0702f2 --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/columns/author_id/alterations/alt0000000003.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_objects_public/tables/commit/columns/author_id/alterations/alt0000000003 + + +COMMENT ON COLUMN "constructive_objects_public".commit.author_id IS NULL; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/columns/author_id/column.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/columns/author_id/column.sql new file mode 100644 index 00000000..7b63face --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/columns/author_id/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_objects_public/tables/commit/columns/author_id/column + + +ALTER TABLE "constructive_objects_public".commit + DROP COLUMN author_id RESTRICT; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/columns/committer_id/alterations/alt0000000004.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/columns/committer_id/alterations/alt0000000004.sql new file mode 100644 index 00000000..faf4693f --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/columns/committer_id/alterations/alt0000000004.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_objects_public/tables/commit/columns/committer_id/alterations/alt0000000004 + + +COMMENT ON COLUMN "constructive_objects_public".commit.committer_id IS NULL; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/columns/committer_id/column.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/columns/committer_id/column.sql new file mode 100644 index 00000000..75e33e94 --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/columns/committer_id/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_objects_public/tables/commit/columns/committer_id/column + + +ALTER TABLE "constructive_objects_public".commit + DROP COLUMN committer_id RESTRICT; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/columns/database_id/alterations/alt0000000005.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/columns/database_id/alterations/alt0000000005.sql new file mode 100644 index 00000000..6a31fc92 --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/columns/database_id/alterations/alt0000000005.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_objects_public/tables/commit/columns/database_id/alterations/alt0000000005 + + +ALTER TABLE "constructive_objects_public".commit + ALTER COLUMN database_id DROP NOT NULL; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/columns/database_id/alterations/alt0000000006.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/columns/database_id/alterations/alt0000000006.sql new file mode 100644 index 00000000..6da56fc6 --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/columns/database_id/alterations/alt0000000006.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_objects_public/tables/commit/columns/database_id/alterations/alt0000000006 + + +COMMENT ON COLUMN "constructive_objects_public".commit.database_id IS NULL; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/columns/database_id/column.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/columns/database_id/column.sql new file mode 100644 index 00000000..366701a3 --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/columns/database_id/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_objects_public/tables/commit/columns/database_id/column + + +ALTER TABLE "constructive_objects_public".commit + DROP COLUMN database_id RESTRICT; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/columns/date/alterations/alt0000000007.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/columns/date/alterations/alt0000000007.sql new file mode 100644 index 00000000..4339cbe3 --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/columns/date/alterations/alt0000000007.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_objects_public/tables/commit/columns/date/alterations/alt0000000007 + + +ALTER TABLE "constructive_objects_public".commit + ALTER COLUMN date DROP NOT NULL; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/columns/date/alterations/alt0000000008.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/columns/date/alterations/alt0000000008.sql new file mode 100644 index 00000000..7157756a --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/columns/date/alterations/alt0000000008.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_objects_public/tables/commit/columns/date/alterations/alt0000000008 + + +ALTER TABLE "constructive_objects_public".commit + ALTER COLUMN date DROP DEFAULT; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/columns/date/alterations/alt0000000009.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/columns/date/alterations/alt0000000009.sql new file mode 100644 index 00000000..90deeef2 --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/columns/date/alterations/alt0000000009.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_objects_public/tables/commit/columns/date/alterations/alt0000000009 + + +COMMENT ON COLUMN "constructive_objects_public".commit.date IS NULL; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/columns/date/column.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/columns/date/column.sql new file mode 100644 index 00000000..05bb0a5d --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/columns/date/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_objects_public/tables/commit/columns/date/column + + +ALTER TABLE "constructive_objects_public".commit + DROP COLUMN date RESTRICT; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/columns/id/alterations/alt0000000010.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/columns/id/alterations/alt0000000010.sql new file mode 100644 index 00000000..30c3ed9c --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/columns/id/alterations/alt0000000010.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_objects_public/tables/commit/columns/id/alterations/alt0000000010 + + +ALTER TABLE "constructive_objects_public".commit + ALTER COLUMN id DROP NOT NULL; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/columns/id/alterations/alt0000000011.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/columns/id/alterations/alt0000000011.sql new file mode 100644 index 00000000..bb4ce4ba --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/columns/id/alterations/alt0000000011.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_objects_public/tables/commit/columns/id/alterations/alt0000000011 + + +ALTER TABLE "constructive_objects_public".commit + ALTER COLUMN id DROP DEFAULT; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/columns/id/alterations/alt0000000012.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/columns/id/alterations/alt0000000012.sql new file mode 100644 index 00000000..67c3b8e9 --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/columns/id/alterations/alt0000000012.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_objects_public/tables/commit/columns/id/alterations/alt0000000012 + + +COMMENT ON COLUMN "constructive_objects_public".commit.id IS NULL; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/columns/id/column.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/columns/id/column.sql new file mode 100644 index 00000000..e37477ba --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/columns/id/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_objects_public/tables/commit/columns/id/column + + +ALTER TABLE "constructive_objects_public".commit + DROP COLUMN id RESTRICT; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/columns/message/alterations/alt0000000013.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/columns/message/alterations/alt0000000013.sql new file mode 100644 index 00000000..7fd0a63a --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/columns/message/alterations/alt0000000013.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_objects_public/tables/commit/columns/message/alterations/alt0000000013 + + +COMMENT ON COLUMN "constructive_objects_public".commit.message IS NULL; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/columns/message/column.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/columns/message/column.sql new file mode 100644 index 00000000..6427da91 --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/columns/message/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_objects_public/tables/commit/columns/message/column + + +ALTER TABLE "constructive_objects_public".commit + DROP COLUMN message RESTRICT; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/columns/parent_ids/alterations/alt0000000014.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/columns/parent_ids/alterations/alt0000000014.sql new file mode 100644 index 00000000..45baf82a --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/columns/parent_ids/alterations/alt0000000014.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_objects_public/tables/commit/columns/parent_ids/alterations/alt0000000014 + + +COMMENT ON COLUMN "constructive_objects_public".commit.parent_ids IS NULL; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/columns/parent_ids/column.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/columns/parent_ids/column.sql new file mode 100644 index 00000000..b397a6b7 --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/columns/parent_ids/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_objects_public/tables/commit/columns/parent_ids/column + + +ALTER TABLE "constructive_objects_public".commit + DROP COLUMN parent_ids RESTRICT; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/columns/store_id/alterations/alt0000000015.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/columns/store_id/alterations/alt0000000015.sql new file mode 100644 index 00000000..7797ecc6 --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/columns/store_id/alterations/alt0000000015.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_objects_public/tables/commit/columns/store_id/alterations/alt0000000015 + + +ALTER TABLE "constructive_objects_public".commit + ALTER COLUMN store_id DROP NOT NULL; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/columns/store_id/alterations/alt0000000016.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/columns/store_id/alterations/alt0000000016.sql new file mode 100644 index 00000000..48eecf9a --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/columns/store_id/alterations/alt0000000016.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_objects_public/tables/commit/columns/store_id/alterations/alt0000000016 + + +COMMENT ON COLUMN "constructive_objects_public".commit.store_id IS NULL; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/columns/store_id/column.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/columns/store_id/column.sql new file mode 100644 index 00000000..bc4c1ab9 --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/columns/store_id/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_objects_public/tables/commit/columns/store_id/column + + +ALTER TABLE "constructive_objects_public".commit + DROP COLUMN store_id RESTRICT; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/columns/tree_id/alterations/alt0000000017.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/columns/tree_id/alterations/alt0000000017.sql new file mode 100644 index 00000000..16e8fd53 --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/columns/tree_id/alterations/alt0000000017.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_objects_public/tables/commit/columns/tree_id/alterations/alt0000000017 + + +COMMENT ON COLUMN "constructive_objects_public".commit.tree_id IS NULL; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/columns/tree_id/column.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/columns/tree_id/column.sql new file mode 100644 index 00000000..c6a73308 --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/columns/tree_id/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_objects_public/tables/commit/columns/tree_id/column + + +ALTER TABLE "constructive_objects_public".commit + DROP COLUMN tree_id RESTRICT; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/constraints/commits_pkey/constraint.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/constraints/commits_pkey/constraint.sql new file mode 100644 index 00000000..19ffe6b5 --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/constraints/commits_pkey/constraint.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_objects_public/tables/commit/constraints/commits_pkey/constraint + + +ALTER TABLE "constructive_objects_public".commit + DROP CONSTRAINT commits_pkey; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/table.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/table.sql new file mode 100644 index 00000000..e3eac5b6 --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/commit/table.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_objects_public/tables/commit/table + + +DROP TABLE "constructive_objects_public".commit; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/object/alterations/alt0000000018.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/object/alterations/alt0000000018.sql new file mode 100644 index 00000000..ea6d30f3 --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/object/alterations/alt0000000018.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_objects_public/tables/object/alterations/alt0000000018 + + +ALTER TABLE "constructive_objects_public".object + ENABLE ROW LEVEL SECURITY; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/object/alterations/alt0000000019.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/object/alterations/alt0000000019.sql new file mode 100644 index 00000000..4c2c8c59 --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/object/alterations/alt0000000019.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_objects_public/tables/object/alterations/alt0000000019 + + +COMMENT ON TABLE "constructive_objects_public".object IS NULL; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/object/columns/created_at/alterations/alt0000000020.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/object/columns/created_at/alterations/alt0000000020.sql new file mode 100644 index 00000000..4b07b576 --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/object/columns/created_at/alterations/alt0000000020.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_objects_public/tables/object/columns/created_at/alterations/alt0000000020 + + +ALTER TABLE "constructive_objects_public".object + ALTER COLUMN created_at DROP DEFAULT; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/object/columns/created_at/alterations/alt0000000021.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/object/columns/created_at/alterations/alt0000000021.sql new file mode 100644 index 00000000..e5b55580 --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/object/columns/created_at/alterations/alt0000000021.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_objects_public/tables/object/columns/created_at/alterations/alt0000000021 + + +COMMENT ON COLUMN "constructive_objects_public".object.created_at IS NULL; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/object/columns/created_at/column.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/object/columns/created_at/column.sql new file mode 100644 index 00000000..26907058 --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/object/columns/created_at/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_objects_public/tables/object/columns/created_at/column + + +ALTER TABLE "constructive_objects_public".object + DROP COLUMN created_at RESTRICT; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/object/columns/data/alterations/alt0000000022.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/object/columns/data/alterations/alt0000000022.sql new file mode 100644 index 00000000..2f3cae6a --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/object/columns/data/alterations/alt0000000022.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_objects_public/tables/object/columns/data/alterations/alt0000000022 + + +COMMENT ON COLUMN "constructive_objects_public".object.data IS NULL; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/object/columns/data/column.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/object/columns/data/column.sql new file mode 100644 index 00000000..c25b3962 --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/object/columns/data/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_objects_public/tables/object/columns/data/column + + +ALTER TABLE "constructive_objects_public".object + DROP COLUMN data RESTRICT; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/object/columns/database_id/alterations/alt0000000023.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/object/columns/database_id/alterations/alt0000000023.sql new file mode 100644 index 00000000..86da5bc1 --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/object/columns/database_id/alterations/alt0000000023.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_objects_public/tables/object/columns/database_id/alterations/alt0000000023 + + +ALTER TABLE "constructive_objects_public".object + ALTER COLUMN database_id DROP NOT NULL; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/object/columns/database_id/alterations/alt0000000024.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/object/columns/database_id/alterations/alt0000000024.sql new file mode 100644 index 00000000..5f43fb27 --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/object/columns/database_id/alterations/alt0000000024.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_objects_public/tables/object/columns/database_id/alterations/alt0000000024 + + +COMMENT ON COLUMN "constructive_objects_public".object.database_id IS NULL; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/object/columns/database_id/column.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/object/columns/database_id/column.sql new file mode 100644 index 00000000..a9c1695b --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/object/columns/database_id/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_objects_public/tables/object/columns/database_id/column + + +ALTER TABLE "constructive_objects_public".object + DROP COLUMN database_id RESTRICT; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/object/columns/id/alterations/alt0000000025.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/object/columns/id/alterations/alt0000000025.sql new file mode 100644 index 00000000..dbf26d69 --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/object/columns/id/alterations/alt0000000025.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_objects_public/tables/object/columns/id/alterations/alt0000000025 + + +ALTER TABLE "constructive_objects_public".object + ALTER COLUMN id DROP NOT NULL; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/object/columns/id/alterations/alt0000000026.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/object/columns/id/alterations/alt0000000026.sql new file mode 100644 index 00000000..5e90c6d7 --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/object/columns/id/alterations/alt0000000026.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_objects_public/tables/object/columns/id/alterations/alt0000000026 + + +COMMENT ON COLUMN "constructive_objects_public".object.id IS NULL; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/object/columns/id/column.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/object/columns/id/column.sql new file mode 100644 index 00000000..a7cdb46b --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/object/columns/id/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_objects_public/tables/object/columns/id/column + + +ALTER TABLE "constructive_objects_public".object + DROP COLUMN id RESTRICT; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/object/columns/kids/alterations/alt0000000027.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/object/columns/kids/alterations/alt0000000027.sql new file mode 100644 index 00000000..9b80e37d --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/object/columns/kids/alterations/alt0000000027.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_objects_public/tables/object/columns/kids/alterations/alt0000000027 + + +COMMENT ON COLUMN "constructive_objects_public".object.kids IS NULL; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/object/columns/kids/alterations/alt0000000028.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/object/columns/kids/alterations/alt0000000028.sql new file mode 100644 index 00000000..3cbba16e --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/object/columns/kids/alterations/alt0000000028.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_objects_public/tables/object/columns/kids/alterations/alt0000000028 + + +ALTER TABLE "constructive_objects_public".object + DROP CONSTRAINT objects_kids_ktree_chk; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/object/columns/kids/column.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/object/columns/kids/column.sql new file mode 100644 index 00000000..1620cae1 --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/object/columns/kids/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_objects_public/tables/object/columns/kids/column + + +ALTER TABLE "constructive_objects_public".object + DROP COLUMN kids RESTRICT; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/object/columns/ktree/alterations/alt0000000029.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/object/columns/ktree/alterations/alt0000000029.sql new file mode 100644 index 00000000..21e63725 --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/object/columns/ktree/alterations/alt0000000029.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_objects_public/tables/object/columns/ktree/alterations/alt0000000029 + + +COMMENT ON COLUMN "constructive_objects_public".object.ktree IS NULL; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/object/columns/ktree/column.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/object/columns/ktree/column.sql new file mode 100644 index 00000000..09ad36d0 --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/object/columns/ktree/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_objects_public/tables/object/columns/ktree/column + + +ALTER TABLE "constructive_objects_public".object + DROP COLUMN ktree RESTRICT; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/object/constraints/objects_pkey/constraint.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/object/constraints/objects_pkey/constraint.sql new file mode 100644 index 00000000..04693d6a --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/object/constraints/objects_pkey/constraint.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_objects_public/tables/object/constraints/objects_pkey/constraint + + +ALTER TABLE "constructive_objects_public".object + DROP CONSTRAINT objects_pkey; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/object/table.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/object/table.sql new file mode 100644 index 00000000..254cb461 --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/object/table.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_objects_public/tables/object/table + + +DROP TABLE "constructive_objects_public".object; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/object/triggers/generate_id_hash.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/object/triggers/generate_id_hash.sql new file mode 100644 index 00000000..c1074356 --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/object/triggers/generate_id_hash.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_objects_public/tables/object/triggers/generate_id_hash + + +DROP TRIGGER generate_id_hash ON "constructive_objects_public".object; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/ref/alterations/alt0000000030.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/ref/alterations/alt0000000030.sql new file mode 100644 index 00000000..f55f390e --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/ref/alterations/alt0000000030.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_objects_public/tables/ref/alterations/alt0000000030 + + +ALTER TABLE "constructive_objects_public".ref + ENABLE ROW LEVEL SECURITY; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/ref/alterations/alt0000000031.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/ref/alterations/alt0000000031.sql new file mode 100644 index 00000000..61908ed9 --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/ref/alterations/alt0000000031.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_objects_public/tables/ref/alterations/alt0000000031 + + +COMMENT ON TABLE "constructive_objects_public".ref IS NULL; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/ref/columns/commit_id/alterations/alt0000000032.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/ref/columns/commit_id/alterations/alt0000000032.sql new file mode 100644 index 00000000..6c2bfc9c --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/ref/columns/commit_id/alterations/alt0000000032.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_objects_public/tables/ref/columns/commit_id/alterations/alt0000000032 + + +COMMENT ON COLUMN "constructive_objects_public".ref.commit_id IS NULL; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/ref/columns/commit_id/column.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/ref/columns/commit_id/column.sql new file mode 100644 index 00000000..46ccd72a --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/ref/columns/commit_id/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_objects_public/tables/ref/columns/commit_id/column + + +ALTER TABLE "constructive_objects_public".ref + DROP COLUMN commit_id RESTRICT; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/ref/columns/database_id/alterations/alt0000000033.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/ref/columns/database_id/alterations/alt0000000033.sql new file mode 100644 index 00000000..4d66aaf4 --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/ref/columns/database_id/alterations/alt0000000033.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_objects_public/tables/ref/columns/database_id/alterations/alt0000000033 + + +ALTER TABLE "constructive_objects_public".ref + ALTER COLUMN database_id DROP NOT NULL; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/ref/columns/database_id/alterations/alt0000000034.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/ref/columns/database_id/alterations/alt0000000034.sql new file mode 100644 index 00000000..75764c63 --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/ref/columns/database_id/alterations/alt0000000034.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_objects_public/tables/ref/columns/database_id/alterations/alt0000000034 + + +COMMENT ON COLUMN "constructive_objects_public".ref.database_id IS NULL; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/ref/columns/database_id/column.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/ref/columns/database_id/column.sql new file mode 100644 index 00000000..ffb8d180 --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/ref/columns/database_id/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_objects_public/tables/ref/columns/database_id/column + + +ALTER TABLE "constructive_objects_public".ref + DROP COLUMN database_id RESTRICT; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/ref/columns/id/alterations/alt0000000035.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/ref/columns/id/alterations/alt0000000035.sql new file mode 100644 index 00000000..5ac3c724 --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/ref/columns/id/alterations/alt0000000035.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_objects_public/tables/ref/columns/id/alterations/alt0000000035 + + +ALTER TABLE "constructive_objects_public".ref + ALTER COLUMN id DROP NOT NULL; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/ref/columns/id/alterations/alt0000000036.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/ref/columns/id/alterations/alt0000000036.sql new file mode 100644 index 00000000..b9021020 --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/ref/columns/id/alterations/alt0000000036.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_objects_public/tables/ref/columns/id/alterations/alt0000000036 + + +ALTER TABLE "constructive_objects_public".ref + ALTER COLUMN id DROP DEFAULT; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/ref/columns/id/alterations/alt0000000037.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/ref/columns/id/alterations/alt0000000037.sql new file mode 100644 index 00000000..fff56f41 --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/ref/columns/id/alterations/alt0000000037.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_objects_public/tables/ref/columns/id/alterations/alt0000000037 + + +COMMENT ON COLUMN "constructive_objects_public".ref.id IS NULL; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/ref/columns/id/column.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/ref/columns/id/column.sql new file mode 100644 index 00000000..5c32942c --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/ref/columns/id/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_objects_public/tables/ref/columns/id/column + + +ALTER TABLE "constructive_objects_public".ref + DROP COLUMN id RESTRICT; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/ref/columns/name/alterations/alt0000000038.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/ref/columns/name/alterations/alt0000000038.sql new file mode 100644 index 00000000..d0b67ef5 --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/ref/columns/name/alterations/alt0000000038.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_objects_public/tables/ref/columns/name/alterations/alt0000000038 + + +ALTER TABLE "constructive_objects_public".ref + ALTER COLUMN name DROP NOT NULL; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/ref/columns/name/alterations/alt0000000039.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/ref/columns/name/alterations/alt0000000039.sql new file mode 100644 index 00000000..c3deb3d0 --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/ref/columns/name/alterations/alt0000000039.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_objects_public/tables/ref/columns/name/alterations/alt0000000039 + + +COMMENT ON COLUMN "constructive_objects_public".ref.name IS NULL; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/ref/columns/name/column.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/ref/columns/name/column.sql new file mode 100644 index 00000000..bd872cc3 --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/ref/columns/name/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_objects_public/tables/ref/columns/name/column + + +ALTER TABLE "constructive_objects_public".ref + DROP COLUMN name RESTRICT; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/ref/columns/store_id/alterations/alt0000000040.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/ref/columns/store_id/alterations/alt0000000040.sql new file mode 100644 index 00000000..998fd18b --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/ref/columns/store_id/alterations/alt0000000040.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_objects_public/tables/ref/columns/store_id/alterations/alt0000000040 + + +ALTER TABLE "constructive_objects_public".ref + ALTER COLUMN store_id DROP NOT NULL; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/ref/columns/store_id/alterations/alt0000000041.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/ref/columns/store_id/alterations/alt0000000041.sql new file mode 100644 index 00000000..1ba00a20 --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/ref/columns/store_id/alterations/alt0000000041.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_objects_public/tables/ref/columns/store_id/alterations/alt0000000041 + + +COMMENT ON COLUMN "constructive_objects_public".ref.store_id IS NULL; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/ref/columns/store_id/column.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/ref/columns/store_id/column.sql new file mode 100644 index 00000000..a7d72f01 --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/ref/columns/store_id/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_objects_public/tables/ref/columns/store_id/column + + +ALTER TABLE "constructive_objects_public".ref + DROP COLUMN store_id RESTRICT; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/ref/constraints/refs_pkey/constraint.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/ref/constraints/refs_pkey/constraint.sql new file mode 100644 index 00000000..c0c666c7 --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/ref/constraints/refs_pkey/constraint.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_objects_public/tables/ref/constraints/refs_pkey/constraint + + +ALTER TABLE "constructive_objects_public".ref + DROP CONSTRAINT refs_pkey; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/ref/table.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/ref/table.sql new file mode 100644 index 00000000..3abc82c7 --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/ref/table.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_objects_public/tables/ref/table + + +DROP TABLE "constructive_objects_public".ref; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/store/alterations/alt0000000042.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/store/alterations/alt0000000042.sql new file mode 100644 index 00000000..bac0ad1f --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/store/alterations/alt0000000042.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_objects_public/tables/store/alterations/alt0000000042 + + +ALTER TABLE "constructive_objects_public".store + ENABLE ROW LEVEL SECURITY; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/store/alterations/alt0000000043.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/store/alterations/alt0000000043.sql new file mode 100644 index 00000000..b5f52ea1 --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/store/alterations/alt0000000043.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_objects_public/tables/store/alterations/alt0000000043 + + +COMMENT ON TABLE "constructive_objects_public".store IS NULL; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/store/columns/created_at/alterations/alt0000000044.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/store/columns/created_at/alterations/alt0000000044.sql new file mode 100644 index 00000000..1cc2b018 --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/store/columns/created_at/alterations/alt0000000044.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_objects_public/tables/store/columns/created_at/alterations/alt0000000044 + + +ALTER TABLE "constructive_objects_public".store + ALTER COLUMN created_at DROP DEFAULT; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/store/columns/created_at/alterations/alt0000000045.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/store/columns/created_at/alterations/alt0000000045.sql new file mode 100644 index 00000000..87c0e83b --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/store/columns/created_at/alterations/alt0000000045.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_objects_public/tables/store/columns/created_at/alterations/alt0000000045 + + +COMMENT ON COLUMN "constructive_objects_public".store.created_at IS NULL; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/store/columns/created_at/column.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/store/columns/created_at/column.sql new file mode 100644 index 00000000..1d4aba98 --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/store/columns/created_at/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_objects_public/tables/store/columns/created_at/column + + +ALTER TABLE "constructive_objects_public".store + DROP COLUMN created_at RESTRICT; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/store/columns/database_id/alterations/alt0000000046.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/store/columns/database_id/alterations/alt0000000046.sql new file mode 100644 index 00000000..47e250a2 --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/store/columns/database_id/alterations/alt0000000046.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_objects_public/tables/store/columns/database_id/alterations/alt0000000046 + + +ALTER TABLE "constructive_objects_public".store + ALTER COLUMN database_id DROP NOT NULL; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/store/columns/database_id/alterations/alt0000000047.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/store/columns/database_id/alterations/alt0000000047.sql new file mode 100644 index 00000000..3045b7aa --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/store/columns/database_id/alterations/alt0000000047.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_objects_public/tables/store/columns/database_id/alterations/alt0000000047 + + +COMMENT ON COLUMN "constructive_objects_public".store.database_id IS NULL; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/store/columns/database_id/column.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/store/columns/database_id/column.sql new file mode 100644 index 00000000..728fe231 --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/store/columns/database_id/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_objects_public/tables/store/columns/database_id/column + + +ALTER TABLE "constructive_objects_public".store + DROP COLUMN database_id RESTRICT; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/store/columns/hash/alterations/alt0000000048.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/store/columns/hash/alterations/alt0000000048.sql new file mode 100644 index 00000000..f3904863 --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/store/columns/hash/alterations/alt0000000048.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_objects_public/tables/store/columns/hash/alterations/alt0000000048 + + +COMMENT ON COLUMN "constructive_objects_public".store.hash IS NULL; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/store/columns/hash/column.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/store/columns/hash/column.sql new file mode 100644 index 00000000..876b4067 --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/store/columns/hash/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_objects_public/tables/store/columns/hash/column + + +ALTER TABLE "constructive_objects_public".store + DROP COLUMN hash RESTRICT; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/store/columns/id/alterations/alt0000000049.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/store/columns/id/alterations/alt0000000049.sql new file mode 100644 index 00000000..6952454b --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/store/columns/id/alterations/alt0000000049.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_objects_public/tables/store/columns/id/alterations/alt0000000049 + + +ALTER TABLE "constructive_objects_public".store + ALTER COLUMN id DROP NOT NULL; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/store/columns/id/alterations/alt0000000050.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/store/columns/id/alterations/alt0000000050.sql new file mode 100644 index 00000000..b58cb846 --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/store/columns/id/alterations/alt0000000050.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_objects_public/tables/store/columns/id/alterations/alt0000000050 + + +ALTER TABLE "constructive_objects_public".store + ALTER COLUMN id DROP DEFAULT; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/store/columns/id/alterations/alt0000000051.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/store/columns/id/alterations/alt0000000051.sql new file mode 100644 index 00000000..bd2cbddb --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/store/columns/id/alterations/alt0000000051.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_objects_public/tables/store/columns/id/alterations/alt0000000051 + + +COMMENT ON COLUMN "constructive_objects_public".store.id IS NULL; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/store/columns/id/column.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/store/columns/id/column.sql new file mode 100644 index 00000000..04453dc6 --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/store/columns/id/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_objects_public/tables/store/columns/id/column + + +ALTER TABLE "constructive_objects_public".store + DROP COLUMN id RESTRICT; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/store/columns/name/alterations/alt0000000052.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/store/columns/name/alterations/alt0000000052.sql new file mode 100644 index 00000000..dfcb742a --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/store/columns/name/alterations/alt0000000052.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_objects_public/tables/store/columns/name/alterations/alt0000000052 + + +ALTER TABLE "constructive_objects_public".store + ALTER COLUMN name DROP NOT NULL; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/store/columns/name/alterations/alt0000000053.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/store/columns/name/alterations/alt0000000053.sql new file mode 100644 index 00000000..a28ddff0 --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/store/columns/name/alterations/alt0000000053.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_objects_public/tables/store/columns/name/alterations/alt0000000053 + + +COMMENT ON COLUMN "constructive_objects_public".store.name IS NULL; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/store/columns/name/column.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/store/columns/name/column.sql new file mode 100644 index 00000000..6f901ef6 --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/store/columns/name/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_objects_public/tables/store/columns/name/column + + +ALTER TABLE "constructive_objects_public".store + DROP COLUMN name RESTRICT; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/store/constraints/stores_pkey/constraint.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/store/constraints/stores_pkey/constraint.sql new file mode 100644 index 00000000..9571924a --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/store/constraints/stores_pkey/constraint.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_objects_public/tables/store/constraints/stores_pkey/constraint + + +ALTER TABLE "constructive_objects_public".store + DROP CONSTRAINT stores_pkey; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/store/indexes/idx_store_unique_name.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/store/indexes/idx_store_unique_name.sql new file mode 100644 index 00000000..c75ba48c --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/store/indexes/idx_store_unique_name.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_objects_public/tables/store/indexes/idx_store_unique_name + + +DROP INDEX "constructive_objects_public".idx_store_unique_name; + + diff --git a/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/store/table.sql b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/store/table.sql new file mode 100644 index 00000000..b16f0e2a --- /dev/null +++ b/pgpm/constructive-objects/revert/schemas/constructive_objects_public/tables/store/table.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_objects_public/tables/store/table + + +DROP TABLE "constructive_objects_public".store; + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_private/procedures/object_hash_uuid/procedure.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_private/procedures/object_hash_uuid/procedure.sql new file mode 100644 index 00000000..638839d0 --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_private/procedures/object_hash_uuid/procedure.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_private/procedures/object_hash_uuid/procedure + + +SELECT verify_function('constructive_objects_private.object_hash_uuid'); + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_private/schema.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_private/schema.sql new file mode 100644 index 00000000..5b822b65 --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_private/schema.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_private/schema + + +SELECT verify_schema('constructive_objects_private'); + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_private/trigger_fns/tg_object_generate_id_hash.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_private/trigger_fns/tg_object_generate_id_hash.sql new file mode 100644 index 00000000..c7a03370 --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_private/trigger_fns/tg_object_generate_id_hash.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_private/trigger_fns/tg_object_generate_id_hash + + +SELECT verify_function('constructive_objects_private.tg_object_generate_id_hash'); + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/procedures/get_all/procedure.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/procedures/get_all/procedure.sql new file mode 100644 index 00000000..238260f4 --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/procedures/get_all/procedure.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/procedures/get_all/procedure + + +SELECT verify_function('constructive_objects_public.get_all'); + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/procedures/get_node_at_path/procedure.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/procedures/get_node_at_path/procedure.sql new file mode 100644 index 00000000..6be4acf4 --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/procedures/get_node_at_path/procedure.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/procedures/get_node_at_path/procedure + + +SELECT verify_function('constructive_objects_public.get_node_at_path'); + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/procedures/init_empty_repo/procedure.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/procedures/init_empty_repo/procedure.sql new file mode 100644 index 00000000..c8b0c28c --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/procedures/init_empty_repo/procedure.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/procedures/init_empty_repo/procedure + + +SELECT verify_function('constructive_objects_public.init_empty_repo'); + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/procedures/insert_node_at_path/procedure.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/procedures/insert_node_at_path/procedure.sql new file mode 100644 index 00000000..bad30a9d --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/procedures/insert_node_at_path/procedure.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/procedures/insert_node_at_path/procedure + + +SELECT verify_function('constructive_objects_public.insert_node_at_path'); + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/procedures/set_data_at_path/procedure.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/procedures/set_data_at_path/procedure.sql new file mode 100644 index 00000000..7ae54109 --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/procedures/set_data_at_path/procedure.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/procedures/set_data_at_path/procedure + + +SELECT verify_function('constructive_objects_public.set_data_at_path'); + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/schema.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/schema.sql new file mode 100644 index 00000000..e3ec7d19 --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/schema.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/schema + + +SELECT verify_schema('constructive_objects_public'); + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/alterations/alt0000000001.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/alterations/alt0000000001.sql new file mode 100644 index 00000000..deab5e3c --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/alterations/alt0000000001.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/commit/alterations/alt0000000001 + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/alterations/alt0000000002.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/alterations/alt0000000002.sql new file mode 100644 index 00000000..51f3a92d --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/alterations/alt0000000002.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/commit/alterations/alt0000000002 + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/columns/author_id/alterations/alt0000000003.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/columns/author_id/alterations/alt0000000003.sql new file mode 100644 index 00000000..840cca24 --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/columns/author_id/alterations/alt0000000003.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/commit/columns/author_id/alterations/alt0000000003 + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/columns/author_id/column.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/columns/author_id/column.sql new file mode 100644 index 00000000..c71697a6 --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/columns/author_id/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/commit/columns/author_id/column + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/columns/committer_id/alterations/alt0000000004.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/columns/committer_id/alterations/alt0000000004.sql new file mode 100644 index 00000000..233cb675 --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/columns/committer_id/alterations/alt0000000004.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/commit/columns/committer_id/alterations/alt0000000004 + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/columns/committer_id/column.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/columns/committer_id/column.sql new file mode 100644 index 00000000..5d37a8ce --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/columns/committer_id/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/commit/columns/committer_id/column + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/columns/database_id/alterations/alt0000000005.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/columns/database_id/alterations/alt0000000005.sql new file mode 100644 index 00000000..42996975 --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/columns/database_id/alterations/alt0000000005.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/commit/columns/database_id/alterations/alt0000000005 + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/columns/database_id/alterations/alt0000000006.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/columns/database_id/alterations/alt0000000006.sql new file mode 100644 index 00000000..46ebf253 --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/columns/database_id/alterations/alt0000000006.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/commit/columns/database_id/alterations/alt0000000006 + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/columns/database_id/column.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/columns/database_id/column.sql new file mode 100644 index 00000000..a7064d72 --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/columns/database_id/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/commit/columns/database_id/column + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/columns/date/alterations/alt0000000007.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/columns/date/alterations/alt0000000007.sql new file mode 100644 index 00000000..9b36d42c --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/columns/date/alterations/alt0000000007.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/commit/columns/date/alterations/alt0000000007 + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/columns/date/alterations/alt0000000008.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/columns/date/alterations/alt0000000008.sql new file mode 100644 index 00000000..c696707c --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/columns/date/alterations/alt0000000008.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/commit/columns/date/alterations/alt0000000008 + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/columns/date/alterations/alt0000000009.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/columns/date/alterations/alt0000000009.sql new file mode 100644 index 00000000..343b87c0 --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/columns/date/alterations/alt0000000009.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/commit/columns/date/alterations/alt0000000009 + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/columns/date/column.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/columns/date/column.sql new file mode 100644 index 00000000..c1661dba --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/columns/date/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/commit/columns/date/column + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/columns/id/alterations/alt0000000010.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/columns/id/alterations/alt0000000010.sql new file mode 100644 index 00000000..f5acc389 --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/columns/id/alterations/alt0000000010.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/commit/columns/id/alterations/alt0000000010 + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/columns/id/alterations/alt0000000011.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/columns/id/alterations/alt0000000011.sql new file mode 100644 index 00000000..3bd3d9dd --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/columns/id/alterations/alt0000000011.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/commit/columns/id/alterations/alt0000000011 + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/columns/id/alterations/alt0000000012.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/columns/id/alterations/alt0000000012.sql new file mode 100644 index 00000000..2f25b901 --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/columns/id/alterations/alt0000000012.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/commit/columns/id/alterations/alt0000000012 + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/columns/id/column.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/columns/id/column.sql new file mode 100644 index 00000000..c3273788 --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/columns/id/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/commit/columns/id/column + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/columns/message/alterations/alt0000000013.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/columns/message/alterations/alt0000000013.sql new file mode 100644 index 00000000..92ab3263 --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/columns/message/alterations/alt0000000013.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/commit/columns/message/alterations/alt0000000013 + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/columns/message/column.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/columns/message/column.sql new file mode 100644 index 00000000..dbf6a465 --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/columns/message/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/commit/columns/message/column + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/columns/parent_ids/alterations/alt0000000014.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/columns/parent_ids/alterations/alt0000000014.sql new file mode 100644 index 00000000..47b02fe6 --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/columns/parent_ids/alterations/alt0000000014.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/commit/columns/parent_ids/alterations/alt0000000014 + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/columns/parent_ids/column.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/columns/parent_ids/column.sql new file mode 100644 index 00000000..3d2c016d --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/columns/parent_ids/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/commit/columns/parent_ids/column + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/columns/store_id/alterations/alt0000000015.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/columns/store_id/alterations/alt0000000015.sql new file mode 100644 index 00000000..e2f28e6f --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/columns/store_id/alterations/alt0000000015.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/commit/columns/store_id/alterations/alt0000000015 + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/columns/store_id/alterations/alt0000000016.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/columns/store_id/alterations/alt0000000016.sql new file mode 100644 index 00000000..8531d29e --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/columns/store_id/alterations/alt0000000016.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/commit/columns/store_id/alterations/alt0000000016 + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/columns/store_id/column.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/columns/store_id/column.sql new file mode 100644 index 00000000..006f98fe --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/columns/store_id/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/commit/columns/store_id/column + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/columns/tree_id/alterations/alt0000000017.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/columns/tree_id/alterations/alt0000000017.sql new file mode 100644 index 00000000..c224e3c3 --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/columns/tree_id/alterations/alt0000000017.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/commit/columns/tree_id/alterations/alt0000000017 + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/columns/tree_id/column.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/columns/tree_id/column.sql new file mode 100644 index 00000000..f0b04a5c --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/columns/tree_id/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/commit/columns/tree_id/column + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/constraints/commits_pkey/constraint.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/constraints/commits_pkey/constraint.sql new file mode 100644 index 00000000..27a79a90 --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/constraints/commits_pkey/constraint.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/commit/constraints/commits_pkey/constraint + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/table.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/table.sql new file mode 100644 index 00000000..3fd73060 --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/commit/table.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/commit/table + + +SELECT verify_table('constructive_objects_public.commit'); + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/object/alterations/alt0000000018.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/object/alterations/alt0000000018.sql new file mode 100644 index 00000000..4813bf25 --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/object/alterations/alt0000000018.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/object/alterations/alt0000000018 + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/object/alterations/alt0000000019.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/object/alterations/alt0000000019.sql new file mode 100644 index 00000000..7c304acb --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/object/alterations/alt0000000019.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/object/alterations/alt0000000019 + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/object/columns/created_at/alterations/alt0000000020.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/object/columns/created_at/alterations/alt0000000020.sql new file mode 100644 index 00000000..4428ffc1 --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/object/columns/created_at/alterations/alt0000000020.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/object/columns/created_at/alterations/alt0000000020 + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/object/columns/created_at/alterations/alt0000000021.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/object/columns/created_at/alterations/alt0000000021.sql new file mode 100644 index 00000000..bdab24b5 --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/object/columns/created_at/alterations/alt0000000021.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/object/columns/created_at/alterations/alt0000000021 + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/object/columns/created_at/column.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/object/columns/created_at/column.sql new file mode 100644 index 00000000..273a1dcb --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/object/columns/created_at/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/object/columns/created_at/column + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/object/columns/data/alterations/alt0000000022.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/object/columns/data/alterations/alt0000000022.sql new file mode 100644 index 00000000..d66ab974 --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/object/columns/data/alterations/alt0000000022.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/object/columns/data/alterations/alt0000000022 + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/object/columns/data/column.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/object/columns/data/column.sql new file mode 100644 index 00000000..aa253758 --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/object/columns/data/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/object/columns/data/column + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/object/columns/database_id/alterations/alt0000000023.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/object/columns/database_id/alterations/alt0000000023.sql new file mode 100644 index 00000000..fa778192 --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/object/columns/database_id/alterations/alt0000000023.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/object/columns/database_id/alterations/alt0000000023 + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/object/columns/database_id/alterations/alt0000000024.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/object/columns/database_id/alterations/alt0000000024.sql new file mode 100644 index 00000000..cdd0d407 --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/object/columns/database_id/alterations/alt0000000024.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/object/columns/database_id/alterations/alt0000000024 + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/object/columns/database_id/column.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/object/columns/database_id/column.sql new file mode 100644 index 00000000..da3b78a5 --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/object/columns/database_id/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/object/columns/database_id/column + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/object/columns/id/alterations/alt0000000025.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/object/columns/id/alterations/alt0000000025.sql new file mode 100644 index 00000000..bfbfa1bf --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/object/columns/id/alterations/alt0000000025.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/object/columns/id/alterations/alt0000000025 + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/object/columns/id/alterations/alt0000000026.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/object/columns/id/alterations/alt0000000026.sql new file mode 100644 index 00000000..01d7ce1d --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/object/columns/id/alterations/alt0000000026.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/object/columns/id/alterations/alt0000000026 + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/object/columns/id/column.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/object/columns/id/column.sql new file mode 100644 index 00000000..7bd062aa --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/object/columns/id/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/object/columns/id/column + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/object/columns/kids/alterations/alt0000000027.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/object/columns/kids/alterations/alt0000000027.sql new file mode 100644 index 00000000..a0db319f --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/object/columns/kids/alterations/alt0000000027.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/object/columns/kids/alterations/alt0000000027 + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/object/columns/kids/alterations/alt0000000028.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/object/columns/kids/alterations/alt0000000028.sql new file mode 100644 index 00000000..56f083bb --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/object/columns/kids/alterations/alt0000000028.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/object/columns/kids/alterations/alt0000000028 + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/object/columns/kids/column.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/object/columns/kids/column.sql new file mode 100644 index 00000000..05cae415 --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/object/columns/kids/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/object/columns/kids/column + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/object/columns/ktree/alterations/alt0000000029.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/object/columns/ktree/alterations/alt0000000029.sql new file mode 100644 index 00000000..be175c62 --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/object/columns/ktree/alterations/alt0000000029.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/object/columns/ktree/alterations/alt0000000029 + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/object/columns/ktree/column.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/object/columns/ktree/column.sql new file mode 100644 index 00000000..8e7f6fa8 --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/object/columns/ktree/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/object/columns/ktree/column + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/object/constraints/objects_pkey/constraint.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/object/constraints/objects_pkey/constraint.sql new file mode 100644 index 00000000..dc24f3c2 --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/object/constraints/objects_pkey/constraint.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/object/constraints/objects_pkey/constraint + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/object/table.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/object/table.sql new file mode 100644 index 00000000..77988cc3 --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/object/table.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/object/table + + +SELECT verify_table('constructive_objects_public.object'); + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/object/triggers/generate_id_hash.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/object/triggers/generate_id_hash.sql new file mode 100644 index 00000000..f54652ae --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/object/triggers/generate_id_hash.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/object/triggers/generate_id_hash + + +SELECT verify_trigger('constructive_objects_public.generate_id_hash'); + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/ref/alterations/alt0000000030.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/ref/alterations/alt0000000030.sql new file mode 100644 index 00000000..f047841b --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/ref/alterations/alt0000000030.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/ref/alterations/alt0000000030 + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/ref/alterations/alt0000000031.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/ref/alterations/alt0000000031.sql new file mode 100644 index 00000000..f559c26a --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/ref/alterations/alt0000000031.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/ref/alterations/alt0000000031 + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/ref/columns/commit_id/alterations/alt0000000032.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/ref/columns/commit_id/alterations/alt0000000032.sql new file mode 100644 index 00000000..b58aaf82 --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/ref/columns/commit_id/alterations/alt0000000032.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/ref/columns/commit_id/alterations/alt0000000032 + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/ref/columns/commit_id/column.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/ref/columns/commit_id/column.sql new file mode 100644 index 00000000..752eb1f9 --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/ref/columns/commit_id/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/ref/columns/commit_id/column + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/ref/columns/database_id/alterations/alt0000000033.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/ref/columns/database_id/alterations/alt0000000033.sql new file mode 100644 index 00000000..ff18eb52 --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/ref/columns/database_id/alterations/alt0000000033.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/ref/columns/database_id/alterations/alt0000000033 + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/ref/columns/database_id/alterations/alt0000000034.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/ref/columns/database_id/alterations/alt0000000034.sql new file mode 100644 index 00000000..1e9a2825 --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/ref/columns/database_id/alterations/alt0000000034.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/ref/columns/database_id/alterations/alt0000000034 + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/ref/columns/database_id/column.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/ref/columns/database_id/column.sql new file mode 100644 index 00000000..17e8d867 --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/ref/columns/database_id/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/ref/columns/database_id/column + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/ref/columns/id/alterations/alt0000000035.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/ref/columns/id/alterations/alt0000000035.sql new file mode 100644 index 00000000..bf0eb83a --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/ref/columns/id/alterations/alt0000000035.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/ref/columns/id/alterations/alt0000000035 + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/ref/columns/id/alterations/alt0000000036.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/ref/columns/id/alterations/alt0000000036.sql new file mode 100644 index 00000000..a9932ed4 --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/ref/columns/id/alterations/alt0000000036.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/ref/columns/id/alterations/alt0000000036 + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/ref/columns/id/alterations/alt0000000037.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/ref/columns/id/alterations/alt0000000037.sql new file mode 100644 index 00000000..9315f333 --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/ref/columns/id/alterations/alt0000000037.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/ref/columns/id/alterations/alt0000000037 + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/ref/columns/id/column.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/ref/columns/id/column.sql new file mode 100644 index 00000000..347f615d --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/ref/columns/id/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/ref/columns/id/column + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/ref/columns/name/alterations/alt0000000038.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/ref/columns/name/alterations/alt0000000038.sql new file mode 100644 index 00000000..04704549 --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/ref/columns/name/alterations/alt0000000038.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/ref/columns/name/alterations/alt0000000038 + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/ref/columns/name/alterations/alt0000000039.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/ref/columns/name/alterations/alt0000000039.sql new file mode 100644 index 00000000..e85013b4 --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/ref/columns/name/alterations/alt0000000039.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/ref/columns/name/alterations/alt0000000039 + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/ref/columns/name/column.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/ref/columns/name/column.sql new file mode 100644 index 00000000..514d9330 --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/ref/columns/name/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/ref/columns/name/column + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/ref/columns/store_id/alterations/alt0000000040.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/ref/columns/store_id/alterations/alt0000000040.sql new file mode 100644 index 00000000..8dc95fdc --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/ref/columns/store_id/alterations/alt0000000040.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/ref/columns/store_id/alterations/alt0000000040 + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/ref/columns/store_id/alterations/alt0000000041.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/ref/columns/store_id/alterations/alt0000000041.sql new file mode 100644 index 00000000..dbaa5d72 --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/ref/columns/store_id/alterations/alt0000000041.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/ref/columns/store_id/alterations/alt0000000041 + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/ref/columns/store_id/column.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/ref/columns/store_id/column.sql new file mode 100644 index 00000000..8db93044 --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/ref/columns/store_id/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/ref/columns/store_id/column + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/ref/constraints/refs_pkey/constraint.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/ref/constraints/refs_pkey/constraint.sql new file mode 100644 index 00000000..95ac7266 --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/ref/constraints/refs_pkey/constraint.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/ref/constraints/refs_pkey/constraint + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/ref/table.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/ref/table.sql new file mode 100644 index 00000000..86feb33c --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/ref/table.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/ref/table + + +SELECT verify_table('constructive_objects_public.ref'); + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/store/alterations/alt0000000042.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/store/alterations/alt0000000042.sql new file mode 100644 index 00000000..0e43000a --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/store/alterations/alt0000000042.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/store/alterations/alt0000000042 + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/store/alterations/alt0000000043.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/store/alterations/alt0000000043.sql new file mode 100644 index 00000000..43c10ab4 --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/store/alterations/alt0000000043.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/store/alterations/alt0000000043 + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/store/columns/created_at/alterations/alt0000000044.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/store/columns/created_at/alterations/alt0000000044.sql new file mode 100644 index 00000000..e2c36547 --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/store/columns/created_at/alterations/alt0000000044.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/store/columns/created_at/alterations/alt0000000044 + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/store/columns/created_at/alterations/alt0000000045.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/store/columns/created_at/alterations/alt0000000045.sql new file mode 100644 index 00000000..52c2e19a --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/store/columns/created_at/alterations/alt0000000045.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/store/columns/created_at/alterations/alt0000000045 + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/store/columns/created_at/column.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/store/columns/created_at/column.sql new file mode 100644 index 00000000..c9dc4dca --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/store/columns/created_at/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/store/columns/created_at/column + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/store/columns/database_id/alterations/alt0000000046.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/store/columns/database_id/alterations/alt0000000046.sql new file mode 100644 index 00000000..eede67ea --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/store/columns/database_id/alterations/alt0000000046.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/store/columns/database_id/alterations/alt0000000046 + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/store/columns/database_id/alterations/alt0000000047.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/store/columns/database_id/alterations/alt0000000047.sql new file mode 100644 index 00000000..a56f234f --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/store/columns/database_id/alterations/alt0000000047.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/store/columns/database_id/alterations/alt0000000047 + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/store/columns/database_id/column.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/store/columns/database_id/column.sql new file mode 100644 index 00000000..06fc2044 --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/store/columns/database_id/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/store/columns/database_id/column + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/store/columns/hash/alterations/alt0000000048.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/store/columns/hash/alterations/alt0000000048.sql new file mode 100644 index 00000000..7d12bbb4 --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/store/columns/hash/alterations/alt0000000048.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/store/columns/hash/alterations/alt0000000048 + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/store/columns/hash/column.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/store/columns/hash/column.sql new file mode 100644 index 00000000..9c6a7f6e --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/store/columns/hash/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/store/columns/hash/column + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/store/columns/id/alterations/alt0000000049.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/store/columns/id/alterations/alt0000000049.sql new file mode 100644 index 00000000..5f2e65e6 --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/store/columns/id/alterations/alt0000000049.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/store/columns/id/alterations/alt0000000049 + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/store/columns/id/alterations/alt0000000050.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/store/columns/id/alterations/alt0000000050.sql new file mode 100644 index 00000000..1d041562 --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/store/columns/id/alterations/alt0000000050.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/store/columns/id/alterations/alt0000000050 + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/store/columns/id/alterations/alt0000000051.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/store/columns/id/alterations/alt0000000051.sql new file mode 100644 index 00000000..501c0408 --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/store/columns/id/alterations/alt0000000051.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/store/columns/id/alterations/alt0000000051 + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/store/columns/id/column.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/store/columns/id/column.sql new file mode 100644 index 00000000..4097a277 --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/store/columns/id/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/store/columns/id/column + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/store/columns/name/alterations/alt0000000052.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/store/columns/name/alterations/alt0000000052.sql new file mode 100644 index 00000000..99f96e04 --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/store/columns/name/alterations/alt0000000052.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/store/columns/name/alterations/alt0000000052 + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/store/columns/name/alterations/alt0000000053.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/store/columns/name/alterations/alt0000000053.sql new file mode 100644 index 00000000..4dfae2e5 --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/store/columns/name/alterations/alt0000000053.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/store/columns/name/alterations/alt0000000053 + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/store/columns/name/column.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/store/columns/name/column.sql new file mode 100644 index 00000000..9e6c2468 --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/store/columns/name/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/store/columns/name/column + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/store/constraints/stores_pkey/constraint.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/store/constraints/stores_pkey/constraint.sql new file mode 100644 index 00000000..bd9c3381 --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/store/constraints/stores_pkey/constraint.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/store/constraints/stores_pkey/constraint + + + + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/store/indexes/idx_store_unique_name.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/store/indexes/idx_store_unique_name.sql new file mode 100644 index 00000000..db7aaa40 --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/store/indexes/idx_store_unique_name.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/store/indexes/idx_store_unique_name + + +SELECT verify_index('constructive_objects_public.store', 'idx_store_unique_name'); + + diff --git a/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/store/table.sql b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/store/table.sql new file mode 100644 index 00000000..5c93eb72 --- /dev/null +++ b/pgpm/constructive-objects/verify/schemas/constructive_objects_public/tables/store/table.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_objects_public/tables/store/table + + +SELECT verify_table('constructive_objects_public.store'); + + diff --git a/pgpm/constructive-storage/.npmignore b/pgpm/constructive-storage/.npmignore new file mode 100644 index 00000000..cf8a4554 --- /dev/null +++ b/pgpm/constructive-storage/.npmignore @@ -0,0 +1,2 @@ +__tests__ +jest.config.js diff --git a/pgpm/constructive-storage/Makefile b/pgpm/constructive-storage/Makefile new file mode 100644 index 00000000..2924c4e0 --- /dev/null +++ b/pgpm/constructive-storage/Makefile @@ -0,0 +1,6 @@ +EXTENSION = constructive-storage +DATA = sql/constructive-storage--0.0.1.sql + +PG_CONFIG = pg_config +PGXS := $(shell $(PG_CONFIG) --pgxs) +include $(PGXS) diff --git a/pgpm/constructive-storage/constructive-storage.control b/pgpm/constructive-storage/constructive-storage.control new file mode 100644 index 00000000..33fc34c6 --- /dev/null +++ b/pgpm/constructive-storage/constructive-storage.control @@ -0,0 +1,5 @@ +# constructive-storage extension +comment = 'constructive-storage module' +default_version = '0.0.1' +relocatable = false +requires = 'plpgsql,pgpm-inflection,pgpm-stamps' diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_private/schema.sql b/pgpm/constructive-storage/deploy/schemas/constructive_private/schema.sql new file mode 100644 index 00000000..034baed9 --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_private/schema.sql @@ -0,0 +1,8 @@ +-- Deploy: schemas/constructive_private/schema +-- made with <3 @ constructive.io + + + + +CREATE SCHEMA "constructive_private"; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_private/trigger_fns/platform_buckets_immutable_fields.sql b/pgpm/constructive-storage/deploy/schemas/constructive_private/trigger_fns/platform_buckets_immutable_fields.sql new file mode 100644 index 00000000..b4161c13 --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_private/trigger_fns/platform_buckets_immutable_fields.sql @@ -0,0 +1,15 @@ +-- Deploy: schemas/constructive_private/trigger_fns/platform_buckets_immutable_fields +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_private/schema + + +CREATE FUNCTION "constructive_private".platform_buckets_immutable_fields() RETURNS TRIGGER AS $_PGFN_$ +BEGIN + IF ((((NEW.key IS DISTINCT FROM OLD.key OR NEW.database_id IS DISTINCT FROM OLD.database_id) OR NEW.type IS DISTINCT FROM OLD.type) OR NEW.is_public IS DISTINCT FROM OLD.is_public) OR NEW.actor_id IS DISTINCT FROM OLD.actor_id) OR NEW.allow_custom_keys IS DISTINCT FROM OLD.allow_custom_keys THEN + RAISE EXCEPTION 'Cannot modify immutable fields on platform_buckets'; + END IF; + RETURN NEW; +END; +$_PGFN_$ LANGUAGE plpgsql VOLATILE; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_private/trigger_fns/platform_files_immutable_fields.sql b/pgpm/constructive-storage/deploy/schemas/constructive_private/trigger_fns/platform_files_immutable_fields.sql new file mode 100644 index 00000000..de22775d --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_private/trigger_fns/platform_files_immutable_fields.sql @@ -0,0 +1,15 @@ +-- Deploy: schemas/constructive_private/trigger_fns/platform_files_immutable_fields +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_private/schema + + +CREATE FUNCTION "constructive_private".platform_files_immutable_fields() RETURNS TRIGGER AS $_PGFN_$ +BEGIN + IF ((((((NEW.key IS DISTINCT FROM OLD.key OR NEW.bucket_id IS DISTINCT FROM OLD.bucket_id) OR NEW.database_id IS DISTINCT FROM OLD.database_id) OR NEW.actor_id IS DISTINCT FROM OLD.actor_id) OR NEW.is_public IS DISTINCT FROM OLD.is_public) OR NEW.mime_type IS DISTINCT FROM OLD.mime_type) OR NEW.size IS DISTINCT FROM OLD.size) OR NEW.content_hash IS DISTINCT FROM OLD.content_hash THEN + RAISE EXCEPTION 'Cannot modify immutable fields on platform_files'; + END IF; + RETURN NEW; +END; +$_PGFN_$ LANGUAGE plpgsql VOLATILE; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_private/trigger_fns/platform_files_inherit_from_parent.sql b/pgpm/constructive-storage/deploy/schemas/constructive_private/trigger_fns/platform_files_inherit_from_parent.sql new file mode 100644 index 00000000..5bbec080 --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_private/trigger_fns/platform_files_inherit_from_parent.sql @@ -0,0 +1,21 @@ +-- Deploy: schemas/constructive_private/trigger_fns/platform_files_inherit_from_parent +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_private/schema + + +CREATE FUNCTION "constructive_private".platform_files_inherit_from_parent() RETURNS TRIGGER AS $_PGFN_$ +BEGIN + SELECT + p.database_id, + p.is_public + FROM ONLY "constructive_storage_public".platform_buckets AS p + WHERE + p.id = NEW.bucket_id INTO NEW.database_id, NEW.is_public; + IF NOT (FOUND) THEN + RAISE EXCEPTION 'Parent not found: %', NEW.bucket_id; + END IF; + RETURN NEW; +END; +$_PGFN_$ LANGUAGE plpgsql VOLATILE; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_private/schema.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_private/schema.sql new file mode 100644 index 00000000..2fb2ad07 --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_private/schema.sql @@ -0,0 +1,8 @@ +-- Deploy: schemas/constructive_storage_private/schema +-- made with <3 @ constructive.io + + + + +CREATE SCHEMA "constructive_storage_private"; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_private/trigger_fns/platform_files_gc_storage_object.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_private/trigger_fns/platform_files_gc_storage_object.sql new file mode 100644 index 00000000..2dba3195 --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_private/trigger_fns/platform_files_gc_storage_object.sql @@ -0,0 +1,13 @@ +-- Deploy: schemas/constructive_storage_private/trigger_fns/platform_files_gc_storage_object +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_private/schema + + +CREATE FUNCTION "constructive_storage_private".platform_files_gc_storage_object() RETURNS TRIGGER AS $_PGFN_$ +BEGIN + PERFORM app_jobs.add_job(identifier:='delete_s3_object', payload:=json_build_object('table', 'platform_files', 'schema', 'constructive-storage-public', 'bucket_id', OLD.bucket_id, 'key', OLD.key), queue_name:='storage_gc', run_at:=now() + '5 seconds'::interval, max_attempts:=5, priority:=100); + RETURN OLD; +END; +$_PGFN_$ LANGUAGE plpgsql VOLATILE; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/procedures/platform_files_file_path/procedure.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/procedures/platform_files_file_path/procedure.sql new file mode 100644 index 00000000..f60840fd --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/procedures/platform_files_file_path/procedure.sql @@ -0,0 +1,13 @@ +-- Deploy: schemas/constructive_storage_public/procedures/platform_files_file_path/procedure +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_files/table + + +CREATE FUNCTION "constructive_storage_public".platform_files_file_path( + IN f "constructive_storage_public".platform_files +) RETURNS text AS $_PGFN_$ +SELECT f.filename +$_PGFN_$ LANGUAGE sql STABLE; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/procedures/platform_files_rename/procedure.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/procedures/platform_files_rename/procedure.sql new file mode 100644 index 00000000..4f8ff183 --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/procedures/platform_files_rename/procedure.sql @@ -0,0 +1,18 @@ +-- Deploy: schemas/constructive_storage_public/procedures/platform_files_rename/procedure +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_files/table + + +CREATE FUNCTION "constructive_storage_public".platform_files_rename( + IN p_file_id pg_catalog.uuid, + IN p_new_filename pg_catalog.text +) RETURNS "constructive_storage_public".platform_files AS $_PGFN_$ +UPDATE "constructive_storage_public".platform_files SET +filename = p_new_filename +WHERE + id = p_file_id +RETURNING * +$_PGFN_$ LANGUAGE sql VOLATILE; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/schema.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/schema.sql new file mode 100644 index 00000000..f6fc8fcf --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/schema.sql @@ -0,0 +1,8 @@ +-- Deploy: schemas/constructive_storage_public/schema +-- made with <3 @ constructive.io + + + + +CREATE SCHEMA "constructive_storage_public"; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/alterations/alt0000000001.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/alterations/alt0000000001.sql new file mode 100644 index 00000000..8aff8164 --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/alterations/alt0000000001.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_buckets/alterations/alt0000000001 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_buckets/table + + +ALTER TABLE "constructive_storage_public".platform_buckets + DISABLE ROW LEVEL SECURITY; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/alterations/alt0000000002.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/alterations/alt0000000002.sql new file mode 100644 index 00000000..2b277c46 --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/alterations/alt0000000002.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_buckets/alterations/alt0000000002 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_buckets/table + + +COMMENT ON TABLE "constructive_storage_public".platform_buckets IS 'Logical storage containers that group files with shared access policies and CDN behavior'; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/alterations/alt0000000003.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/alterations/alt0000000003.sql new file mode 100644 index 00000000..00c9b9a0 --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/alterations/alt0000000003.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_buckets/alterations/alt0000000003 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_buckets/table + + +COMMENT ON TABLE "constructive_storage_public".platform_buckets IS E'@storageBuckets +Logical storage containers that group files with shared access policies and CDN behavior'; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/actor_id/alterations/alt0000000004.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/actor_id/alterations/alt0000000004.sql new file mode 100644 index 00000000..de311b31 --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/actor_id/alterations/alt0000000004.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_buckets/columns/actor_id/alterations/alt0000000004 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_buckets/table +-- requires: schemas/constructive_storage_public/tables/platform_buckets/columns/actor_id/column + + +ALTER TABLE "constructive_storage_public".platform_buckets + ALTER COLUMN actor_id SET NOT NULL; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/actor_id/alterations/alt0000000005.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/actor_id/alterations/alt0000000005.sql new file mode 100644 index 00000000..eb4bdda8 --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/actor_id/alterations/alt0000000005.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_buckets/columns/actor_id/alterations/alt0000000005 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_buckets/columns/actor_id/column + + +COMMENT ON COLUMN "constructive_storage_public".platform_buckets.actor_id IS E'User who created this bucket. Forced to current_user_id() on INSERT.'; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/actor_id/column.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/actor_id/column.sql new file mode 100644 index 00000000..efbe1995 --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/actor_id/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_buckets/columns/actor_id/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_buckets/table + + +ALTER TABLE "constructive_storage_public".platform_buckets + ADD COLUMN actor_id uuid; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/allow_custom_keys/alterations/alt0000000006.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/allow_custom_keys/alterations/alt0000000006.sql new file mode 100644 index 00000000..2b4418bf --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/allow_custom_keys/alterations/alt0000000006.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_buckets/columns/allow_custom_keys/alterations/alt0000000006 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_buckets/table +-- requires: schemas/constructive_storage_public/tables/platform_buckets/columns/allow_custom_keys/column + + +ALTER TABLE "constructive_storage_public".platform_buckets + ALTER COLUMN allow_custom_keys SET NOT NULL; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/allow_custom_keys/alterations/alt0000000007.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/allow_custom_keys/alterations/alt0000000007.sql new file mode 100644 index 00000000..ae64c02a --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/allow_custom_keys/alterations/alt0000000007.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_buckets/columns/allow_custom_keys/alterations/alt0000000007 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_buckets/table +-- requires: schemas/constructive_storage_public/tables/platform_buckets/columns/allow_custom_keys/column + + +ALTER TABLE "constructive_storage_public".platform_buckets + ALTER COLUMN allow_custom_keys SET DEFAULT false; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/allow_custom_keys/alterations/alt0000000008.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/allow_custom_keys/alterations/alt0000000008.sql new file mode 100644 index 00000000..cc07ae5d --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/allow_custom_keys/alterations/alt0000000008.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_buckets/columns/allow_custom_keys/alterations/alt0000000008 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_buckets/columns/allow_custom_keys/column + + +COMMENT ON COLUMN "constructive_storage_public".platform_buckets.allow_custom_keys IS E'When true, clients can provide custom S3 keys (e.g. reports/2024/Q1.pdf). When false (default), S3 key = content hash (automatic dedup). contentHash always required for integrity.'; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/allow_custom_keys/column.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/allow_custom_keys/column.sql new file mode 100644 index 00000000..c4cac477 --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/allow_custom_keys/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_buckets/columns/allow_custom_keys/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_buckets/table + + +ALTER TABLE "constructive_storage_public".platform_buckets + ADD COLUMN allow_custom_keys boolean; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/allowed_mime_types/alterations/alt0000000009.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/allowed_mime_types/alterations/alt0000000009.sql new file mode 100644 index 00000000..00cce0b8 --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/allowed_mime_types/alterations/alt0000000009.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_buckets/columns/allowed_mime_types/alterations/alt0000000009 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_buckets/columns/allowed_mime_types/column + + +COMMENT ON COLUMN "constructive_storage_public".platform_buckets.allowed_mime_types IS E'Whitelist of allowed MIME types for files in this bucket (NULL = all allowed, enforcement deferred)'; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/allowed_mime_types/column.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/allowed_mime_types/column.sql new file mode 100644 index 00000000..b0c3f219 --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/allowed_mime_types/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_buckets/columns/allowed_mime_types/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_buckets/table + + +ALTER TABLE "constructive_storage_public".platform_buckets + ADD COLUMN allowed_mime_types text[]; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/allowed_origins/alterations/alt0000000010.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/allowed_origins/alterations/alt0000000010.sql new file mode 100644 index 00000000..f9dcd61b --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/allowed_origins/alterations/alt0000000010.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_buckets/columns/allowed_origins/alterations/alt0000000010 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_buckets/columns/allowed_origins/column + + +COMMENT ON COLUMN "constructive_storage_public".platform_buckets.allowed_origins IS E'Per-bucket CORS allowed origins override (NULL = inherit from storage_module/plugin defaults). Use ARRAY[''*''] for open/CDN mode.'; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/allowed_origins/column.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/allowed_origins/column.sql new file mode 100644 index 00000000..4249c60f --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/allowed_origins/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_buckets/columns/allowed_origins/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_buckets/table + + +ALTER TABLE "constructive_storage_public".platform_buckets + ADD COLUMN allowed_origins text[]; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/created_at/alterations/alt0000000011.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/created_at/alterations/alt0000000011.sql new file mode 100644 index 00000000..1e49f937 --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/created_at/alterations/alt0000000011.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_buckets/columns/created_at/alterations/alt0000000011 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_buckets/table +-- requires: schemas/constructive_storage_public/tables/platform_buckets/columns/created_at/column + + +ALTER TABLE "constructive_storage_public".platform_buckets + ALTER COLUMN created_at SET DEFAULT now(); + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/created_at/column.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/created_at/column.sql new file mode 100644 index 00000000..ae788114 --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/created_at/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_buckets/columns/created_at/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_buckets/table + + +ALTER TABLE "constructive_storage_public".platform_buckets + ADD COLUMN created_at timestamptz; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/database_id/alterations/alt0000000012.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/database_id/alterations/alt0000000012.sql new file mode 100644 index 00000000..6cf066bf --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/database_id/alterations/alt0000000012.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_buckets/columns/database_id/alterations/alt0000000012 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_buckets/table +-- requires: schemas/constructive_storage_public/tables/platform_buckets/columns/database_id/column + + +ALTER TABLE "constructive_storage_public".platform_buckets + ALTER COLUMN database_id SET NOT NULL; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/database_id/alterations/alt0000000013.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/database_id/alterations/alt0000000013.sql new file mode 100644 index 00000000..48bca19e --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/database_id/alterations/alt0000000013.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_buckets/columns/database_id/alterations/alt0000000013 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_buckets/columns/database_id/column + + +COMMENT ON COLUMN "constructive_storage_public".platform_buckets.database_id IS E'Database that owns this resource (database-scoped isolation)'; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/database_id/column.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/database_id/column.sql new file mode 100644 index 00000000..2402d0bd --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/database_id/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_buckets/columns/database_id/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_buckets/table + + +ALTER TABLE "constructive_storage_public".platform_buckets + ADD COLUMN database_id uuid; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/description/alterations/alt0000000014.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/description/alterations/alt0000000014.sql new file mode 100644 index 00000000..44040d4e --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/description/alterations/alt0000000014.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_buckets/columns/description/alterations/alt0000000014 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_buckets/columns/description/column + + +COMMENT ON COLUMN "constructive_storage_public".platform_buckets.description IS E'Human-readable description of the bucket purpose'; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/description/column.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/description/column.sql new file mode 100644 index 00000000..75520435 --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/description/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_buckets/columns/description/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_buckets/table + + +ALTER TABLE "constructive_storage_public".platform_buckets + ADD COLUMN description text; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/id/alterations/alt0000000015.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/id/alterations/alt0000000015.sql new file mode 100644 index 00000000..2f25205b --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/id/alterations/alt0000000015.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_buckets/columns/id/alterations/alt0000000015 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_buckets/table +-- requires: schemas/constructive_storage_public/tables/platform_buckets/columns/id/column + + +ALTER TABLE "constructive_storage_public".platform_buckets + ALTER COLUMN id SET NOT NULL; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/id/alterations/alt0000000016.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/id/alterations/alt0000000016.sql new file mode 100644 index 00000000..9ead4b81 --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/id/alterations/alt0000000016.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_buckets/columns/id/alterations/alt0000000016 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_buckets/table +-- requires: schemas/constructive_storage_public/tables/platform_buckets/columns/id/column + + +ALTER TABLE "constructive_storage_public".platform_buckets + ALTER COLUMN id SET DEFAULT uuidv7(); + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/id/column.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/id/column.sql new file mode 100644 index 00000000..87a51673 --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/id/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_buckets/columns/id/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_buckets/table + + +ALTER TABLE "constructive_storage_public".platform_buckets + ADD COLUMN id uuid; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/is_public/alterations/alt0000000017.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/is_public/alterations/alt0000000017.sql new file mode 100644 index 00000000..bc488f55 --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/is_public/alterations/alt0000000017.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_buckets/columns/is_public/alterations/alt0000000017 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_buckets/table +-- requires: schemas/constructive_storage_public/tables/platform_buckets/columns/is_public/column + + +ALTER TABLE "constructive_storage_public".platform_buckets + ALTER COLUMN is_public SET NOT NULL; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/is_public/alterations/alt0000000018.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/is_public/alterations/alt0000000018.sql new file mode 100644 index 00000000..8c07132a --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/is_public/alterations/alt0000000018.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_buckets/columns/is_public/alterations/alt0000000018 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_buckets/table +-- requires: schemas/constructive_storage_public/tables/platform_buckets/columns/is_public/column + + +ALTER TABLE "constructive_storage_public".platform_buckets + ALTER COLUMN is_public SET DEFAULT false; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/is_public/alterations/alt0000000019.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/is_public/alterations/alt0000000019.sql new file mode 100644 index 00000000..b1421273 --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/is_public/alterations/alt0000000019.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_buckets/columns/is_public/alterations/alt0000000019 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_buckets/columns/is_public/column + + +COMMENT ON COLUMN "constructive_storage_public".platform_buckets.is_public IS E'Whether bucket contents are publicly readable. Set to true when type is public.'; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/is_public/column.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/is_public/column.sql new file mode 100644 index 00000000..a81f722c --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/is_public/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_buckets/columns/is_public/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_buckets/table + + +ALTER TABLE "constructive_storage_public".platform_buckets + ADD COLUMN is_public boolean; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/key/alterations/alt0000000020.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/key/alterations/alt0000000020.sql new file mode 100644 index 00000000..3d946620 --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/key/alterations/alt0000000020.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_buckets/columns/key/alterations/alt0000000020 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_buckets/table +-- requires: schemas/constructive_storage_public/tables/platform_buckets/columns/key/column + + +ALTER TABLE "constructive_storage_public".platform_buckets + ALTER COLUMN key SET NOT NULL; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/key/alterations/alt0000000021.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/key/alterations/alt0000000021.sql new file mode 100644 index 00000000..ea7b3cbd --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/key/alterations/alt0000000021.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_buckets/columns/key/alterations/alt0000000021 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_buckets/columns/key/column + + +COMMENT ON COLUMN "constructive_storage_public".platform_buckets.key IS E'Unique bucket identifier used in S3 key paths (e.g. avatars, documents, temp)'; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/key/column.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/key/column.sql new file mode 100644 index 00000000..b383736a --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/key/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_buckets/columns/key/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_buckets/table + + +ALTER TABLE "constructive_storage_public".platform_buckets + ADD COLUMN key text; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/max_file_size/alterations/alt0000000022.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/max_file_size/alterations/alt0000000022.sql new file mode 100644 index 00000000..d21db36c --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/max_file_size/alterations/alt0000000022.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_buckets/columns/max_file_size/alterations/alt0000000022 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_buckets/columns/max_file_size/column + + +COMMENT ON COLUMN "constructive_storage_public".platform_buckets.max_file_size IS E'Maximum file size in bytes allowed in this bucket (NULL = no limit, enforcement deferred)'; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/max_file_size/column.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/max_file_size/column.sql new file mode 100644 index 00000000..0af8a0dc --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/max_file_size/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_buckets/columns/max_file_size/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_buckets/table + + +ALTER TABLE "constructive_storage_public".platform_buckets + ADD COLUMN max_file_size bigint; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/type/alterations/alt0000000023.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/type/alterations/alt0000000023.sql new file mode 100644 index 00000000..e9278ec5 --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/type/alterations/alt0000000023.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_buckets/columns/type/alterations/alt0000000023 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_buckets/table +-- requires: schemas/constructive_storage_public/tables/platform_buckets/columns/type/column + + +ALTER TABLE "constructive_storage_public".platform_buckets + ALTER COLUMN type SET NOT NULL; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/type/alterations/alt0000000024.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/type/alterations/alt0000000024.sql new file mode 100644 index 00000000..099679a6 --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/type/alterations/alt0000000024.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_buckets/columns/type/alterations/alt0000000024 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_buckets/table +-- requires: schemas/constructive_storage_public/tables/platform_buckets/columns/type/column + + +ALTER TABLE "constructive_storage_public".platform_buckets + ALTER COLUMN type SET DEFAULT 'private'; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/type/alterations/alt0000000025.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/type/alterations/alt0000000025.sql new file mode 100644 index 00000000..19ec7377 --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/type/alterations/alt0000000025.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_buckets/columns/type/alterations/alt0000000025 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_buckets/columns/type/column + + +COMMENT ON COLUMN "constructive_storage_public".platform_buckets.type IS E'Bucket CDN access type: public (CDN-served), private (presigned GET), temp (staging uploads)'; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/type/column.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/type/column.sql new file mode 100644 index 00000000..154c25d8 --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/type/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_buckets/columns/type/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_buckets/table + + +ALTER TABLE "constructive_storage_public".platform_buckets + ADD COLUMN type text; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/updated_at/alterations/alt0000000026.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/updated_at/alterations/alt0000000026.sql new file mode 100644 index 00000000..8ee767d1 --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/updated_at/alterations/alt0000000026.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_buckets/columns/updated_at/alterations/alt0000000026 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_buckets/table +-- requires: schemas/constructive_storage_public/tables/platform_buckets/columns/updated_at/column + + +ALTER TABLE "constructive_storage_public".platform_buckets + ALTER COLUMN updated_at SET DEFAULT now(); + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/updated_at/column.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/updated_at/column.sql new file mode 100644 index 00000000..be8573c4 --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/columns/updated_at/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_buckets/columns/updated_at/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_buckets/table + + +ALTER TABLE "constructive_storage_public".platform_buckets + ADD COLUMN updated_at timestamptz; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/constraints/platform_buckets_database_id_key_key/constraint.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/constraints/platform_buckets_database_id_key_key/constraint.sql new file mode 100644 index 00000000..7386237a --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/constraints/platform_buckets_database_id_key_key/constraint.sql @@ -0,0 +1,13 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_buckets/constraints/platform_buckets_database_id_key_key/constraint +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_buckets/table +-- requires: schemas/constructive_storage_public/tables/platform_buckets/columns/database_id/column +-- requires: schemas/constructive_storage_public/tables/platform_buckets/columns/key/column + + +ALTER TABLE "constructive_storage_public".platform_buckets + ADD CONSTRAINT platform_buckets_database_id_key_key + UNIQUE (database_id, key); + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/constraints/platform_buckets_pkey/constraint.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/constraints/platform_buckets_pkey/constraint.sql new file mode 100644 index 00000000..99a0f0b2 --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/constraints/platform_buckets_pkey/constraint.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_buckets/constraints/platform_buckets_pkey/constraint +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_buckets/table +-- requires: schemas/constructive_storage_public/tables/platform_buckets/columns/id/column + + +ALTER TABLE "constructive_storage_public".platform_buckets + ADD CONSTRAINT platform_buckets_pkey PRIMARY KEY (id); + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/indexes/platform_buckets_created_at_idx.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/indexes/platform_buckets_created_at_idx.sql new file mode 100644 index 00000000..7558175e --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/indexes/platform_buckets_created_at_idx.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_buckets/indexes/platform_buckets_created_at_idx +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_buckets/table +-- requires: schemas/constructive_storage_public/tables/platform_buckets/columns/created_at/column + + +CREATE INDEX platform_buckets_created_at_idx ON "constructive_storage_public".platform_buckets ( created_at ); + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/indexes/platform_buckets_is_public_idx.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/indexes/platform_buckets_is_public_idx.sql new file mode 100644 index 00000000..056c6936 --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/indexes/platform_buckets_is_public_idx.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_buckets/indexes/platform_buckets_is_public_idx +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_buckets/table +-- requires: schemas/constructive_storage_public/tables/platform_buckets/columns/is_public/column + + +CREATE INDEX platform_buckets_is_public_idx ON "constructive_storage_public".platform_buckets USING BTREE ( is_public ); + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/indexes/platform_buckets_updated_at_idx.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/indexes/platform_buckets_updated_at_idx.sql new file mode 100644 index 00000000..5fea951b --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/indexes/platform_buckets_updated_at_idx.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_buckets/indexes/platform_buckets_updated_at_idx +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_buckets/table +-- requires: schemas/constructive_storage_public/tables/platform_buckets/columns/updated_at/column + + +CREATE INDEX platform_buckets_updated_at_idx ON "constructive_storage_public".platform_buckets ( updated_at ); + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/table.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/table.sql new file mode 100644 index 00000000..241c6a8d --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/table.sql @@ -0,0 +1,8 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_buckets/table +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema + + +CREATE TABLE "constructive_storage_public".platform_buckets (); + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/triggers/platform_buckets_immutable_fields_tg.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/triggers/platform_buckets_immutable_fields_tg.sql new file mode 100644 index 00000000..d424e120 --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/triggers/platform_buckets_immutable_fields_tg.sql @@ -0,0 +1,14 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_buckets/triggers/platform_buckets_immutable_fields_tg +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_private/schema +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_buckets/table +-- requires: schemas/constructive_private/trigger_fns/platform_buckets_immutable_fields + + +CREATE TRIGGER platform_buckets_immutable_fields_tg +BEFORE UPDATE ON "constructive_storage_public".platform_buckets +FOR EACH ROW +EXECUTE PROCEDURE "constructive_private".platform_buckets_immutable_fields ( ); + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/triggers/timestamps_tg.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/triggers/timestamps_tg.sql new file mode 100644 index 00000000..759c92f4 --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_buckets/triggers/timestamps_tg.sql @@ -0,0 +1,12 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_buckets/triggers/timestamps_tg +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_buckets/table + + +CREATE TRIGGER timestamps_tg +BEFORE INSERT OR UPDATE ON "constructive_storage_public".platform_buckets +FOR EACH ROW +EXECUTE PROCEDURE stamps.timestamps ( ); + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/alterations/alt0000000027.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/alterations/alt0000000027.sql new file mode 100644 index 00000000..ab49fa3e --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/alterations/alt0000000027.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_files/alterations/alt0000000027 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_files/table + + +ALTER TABLE "constructive_storage_public".platform_files + DISABLE ROW LEVEL SECURITY; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/alterations/alt0000000028.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/alterations/alt0000000028.sql new file mode 100644 index 00000000..611ee1d8 --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/alterations/alt0000000028.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_files/alterations/alt0000000028 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_files/table + + +COMMENT ON TABLE "constructive_storage_public".platform_files IS E'Individual file records within buckets, with immutable identity fields and mutable metadata'; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/alterations/alt0000000029.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/alterations/alt0000000029.sql new file mode 100644 index 00000000..9c314295 --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/alterations/alt0000000029.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_files/alterations/alt0000000029 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_files/table + + +COMMENT ON TABLE "constructive_storage_public".platform_files IS E'@storageFiles +Individual file records within buckets, with immutable identity fields and mutable metadata'; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/actor_id/alterations/alt0000000030.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/actor_id/alterations/alt0000000030.sql new file mode 100644 index 00000000..72423889 --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/actor_id/alterations/alt0000000030.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_files/columns/actor_id/alterations/alt0000000030 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_files/table +-- requires: schemas/constructive_storage_public/tables/platform_files/columns/actor_id/column + + +ALTER TABLE "constructive_storage_public".platform_files + ALTER COLUMN actor_id SET NOT NULL; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/actor_id/alterations/alt0000000031.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/actor_id/alterations/alt0000000031.sql new file mode 100644 index 00000000..84140cd4 --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/actor_id/alterations/alt0000000031.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_files/columns/actor_id/alterations/alt0000000031 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_files/columns/actor_id/column + + +COMMENT ON COLUMN "constructive_storage_public".platform_files.actor_id IS E'User who uploaded this file. Forced to current_user_id() on INSERT. Used for UPDATE/DELETE authorization.'; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/actor_id/column.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/actor_id/column.sql new file mode 100644 index 00000000..945a596c --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/actor_id/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_files/columns/actor_id/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_files/table + + +ALTER TABLE "constructive_storage_public".platform_files + ADD COLUMN actor_id uuid; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/bucket_id/alterations/alt0000000032.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/bucket_id/alterations/alt0000000032.sql new file mode 100644 index 00000000..1fdf57d7 --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/bucket_id/alterations/alt0000000032.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_files/columns/bucket_id/alterations/alt0000000032 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_files/table +-- requires: schemas/constructive_storage_public/tables/platform_files/columns/bucket_id/column + + +ALTER TABLE "constructive_storage_public".platform_files + ALTER COLUMN bucket_id SET NOT NULL; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/bucket_id/alterations/alt0000000033.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/bucket_id/alterations/alt0000000033.sql new file mode 100644 index 00000000..76860a39 --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/bucket_id/alterations/alt0000000033.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_files/columns/bucket_id/alterations/alt0000000033 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_files/columns/bucket_id/column + + +COMMENT ON COLUMN "constructive_storage_public".platform_files.bucket_id IS E'Bucket this file belongs to. Determines owner_id and is_public via inheritance trigger.'; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/bucket_id/column.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/bucket_id/column.sql new file mode 100644 index 00000000..1df5e431 --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/bucket_id/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_files/columns/bucket_id/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_files/table + + +ALTER TABLE "constructive_storage_public".platform_files + ADD COLUMN bucket_id uuid; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/content_hash/alterations/alt0000000034.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/content_hash/alterations/alt0000000034.sql new file mode 100644 index 00000000..3c13410b --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/content_hash/alterations/alt0000000034.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_files/columns/content_hash/alterations/alt0000000034 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_files/columns/content_hash/column + + +COMMENT ON COLUMN "constructive_storage_public".platform_files.content_hash IS E'SHA-256 content hash for integrity verification and dedup. In default mode, equals the S3 key. In custom key mode, stored separately.'; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/content_hash/column.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/content_hash/column.sql new file mode 100644 index 00000000..c8551e7d --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/content_hash/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_files/columns/content_hash/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_files/table + + +ALTER TABLE "constructive_storage_public".platform_files + ADD COLUMN content_hash text; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/created_at/alterations/alt0000000035.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/created_at/alterations/alt0000000035.sql new file mode 100644 index 00000000..06669d0e --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/created_at/alterations/alt0000000035.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_files/columns/created_at/alterations/alt0000000035 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_files/table +-- requires: schemas/constructive_storage_public/tables/platform_files/columns/created_at/column + + +ALTER TABLE "constructive_storage_public".platform_files + ALTER COLUMN created_at SET DEFAULT now(); + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/created_at/column.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/created_at/column.sql new file mode 100644 index 00000000..7445be7f --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/created_at/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_files/columns/created_at/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_files/table + + +ALTER TABLE "constructive_storage_public".platform_files + ADD COLUMN created_at timestamptz; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/database_id/alterations/alt0000000036.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/database_id/alterations/alt0000000036.sql new file mode 100644 index 00000000..82a02993 --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/database_id/alterations/alt0000000036.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_files/columns/database_id/alterations/alt0000000036 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_files/table +-- requires: schemas/constructive_storage_public/tables/platform_files/columns/database_id/column + + +ALTER TABLE "constructive_storage_public".platform_files + ALTER COLUMN database_id SET NOT NULL; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/database_id/alterations/alt0000000037.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/database_id/alterations/alt0000000037.sql new file mode 100644 index 00000000..71f88c98 --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/database_id/alterations/alt0000000037.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_files/columns/database_id/alterations/alt0000000037 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_files/columns/database_id/column + + +COMMENT ON COLUMN "constructive_storage_public".platform_files.database_id IS E'Database that owns this resource (database-scoped isolation)'; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/database_id/column.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/database_id/column.sql new file mode 100644 index 00000000..69f78c52 --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/database_id/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_files/columns/database_id/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_files/table + + +ALTER TABLE "constructive_storage_public".platform_files + ADD COLUMN database_id uuid; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/description/alterations/alt0000000038.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/description/alterations/alt0000000038.sql new file mode 100644 index 00000000..5b51b75f --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/description/alterations/alt0000000038.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_files/columns/description/alterations/alt0000000038 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_files/columns/description/column + + +COMMENT ON COLUMN "constructive_storage_public".platform_files.description IS E'Human-readable description or alt text for the file (mutable)'; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/description/column.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/description/column.sql new file mode 100644 index 00000000..0e6b86a5 --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/description/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_files/columns/description/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_files/table + + +ALTER TABLE "constructive_storage_public".platform_files + ADD COLUMN description text; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/filename/alterations/alt0000000039.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/filename/alterations/alt0000000039.sql new file mode 100644 index 00000000..0399d960 --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/filename/alterations/alt0000000039.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_files/columns/filename/alterations/alt0000000039 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_files/columns/filename/column + + +COMMENT ON COLUMN "constructive_storage_public".platform_files.filename IS E'Original filename provided by the uploader. Used for display and Content-Disposition header on download.'; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/filename/column.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/filename/column.sql new file mode 100644 index 00000000..b6c6f5e2 --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/filename/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_files/columns/filename/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_files/table + + +ALTER TABLE "constructive_storage_public".platform_files + ADD COLUMN filename text; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/id/alterations/alt0000000040.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/id/alterations/alt0000000040.sql new file mode 100644 index 00000000..44cc8cad --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/id/alterations/alt0000000040.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_files/columns/id/alterations/alt0000000040 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_files/table +-- requires: schemas/constructive_storage_public/tables/platform_files/columns/id/column + + +ALTER TABLE "constructive_storage_public".platform_files + ALTER COLUMN id SET NOT NULL; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/id/alterations/alt0000000041.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/id/alterations/alt0000000041.sql new file mode 100644 index 00000000..2749ca31 --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/id/alterations/alt0000000041.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_files/columns/id/alterations/alt0000000041 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_files/table +-- requires: schemas/constructive_storage_public/tables/platform_files/columns/id/column + + +ALTER TABLE "constructive_storage_public".platform_files + ALTER COLUMN id SET DEFAULT uuidv7(); + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/id/column.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/id/column.sql new file mode 100644 index 00000000..4f1c4a9e --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/id/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_files/columns/id/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_files/table + + +ALTER TABLE "constructive_storage_public".platform_files + ADD COLUMN id uuid; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/is_public/alterations/alt0000000042.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/is_public/alterations/alt0000000042.sql new file mode 100644 index 00000000..26cd687a --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/is_public/alterations/alt0000000042.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_files/columns/is_public/alterations/alt0000000042 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_files/table +-- requires: schemas/constructive_storage_public/tables/platform_files/columns/is_public/column + + +ALTER TABLE "constructive_storage_public".platform_files + ALTER COLUMN is_public SET NOT NULL; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/is_public/alterations/alt0000000043.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/is_public/alterations/alt0000000043.sql new file mode 100644 index 00000000..b74c13eb --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/is_public/alterations/alt0000000043.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_files/columns/is_public/alterations/alt0000000043 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_files/table +-- requires: schemas/constructive_storage_public/tables/platform_files/columns/is_public/column + + +ALTER TABLE "constructive_storage_public".platform_files + ALTER COLUMN is_public SET DEFAULT false; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/is_public/alterations/alt0000000044.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/is_public/alterations/alt0000000044.sql new file mode 100644 index 00000000..0f1caeb3 --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/is_public/alterations/alt0000000044.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_files/columns/is_public/alterations/alt0000000044 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_files/columns/is_public/column + + +COMMENT ON COLUMN "constructive_storage_public".platform_files.is_public IS E'Whether this file is publicly readable. Inherited from bucket on INSERT.'; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/is_public/column.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/is_public/column.sql new file mode 100644 index 00000000..11838f2e --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/is_public/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_files/columns/is_public/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_files/table + + +ALTER TABLE "constructive_storage_public".platform_files + ADD COLUMN is_public boolean; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/key/alterations/alt0000000045.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/key/alterations/alt0000000045.sql new file mode 100644 index 00000000..e74b04f6 --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/key/alterations/alt0000000045.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_files/columns/key/alterations/alt0000000045 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_files/table +-- requires: schemas/constructive_storage_public/tables/platform_files/columns/key/column + + +ALTER TABLE "constructive_storage_public".platform_files + ALTER COLUMN key SET NOT NULL; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/key/alterations/alt0000000046.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/key/alterations/alt0000000046.sql new file mode 100644 index 00000000..7fbc614c --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/key/alterations/alt0000000046.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_files/columns/key/alterations/alt0000000046 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_files/columns/key/column + + +COMMENT ON COLUMN "constructive_storage_public".platform_files.key IS E'S3 object key for this file, unique within its bucket'; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/key/column.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/key/column.sql new file mode 100644 index 00000000..3c6343f3 --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/key/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_files/columns/key/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_files/table + + +ALTER TABLE "constructive_storage_public".platform_files + ADD COLUMN key text; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/mime_type/alterations/alt0000000047.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/mime_type/alterations/alt0000000047.sql new file mode 100644 index 00000000..e7ffccea --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/mime_type/alterations/alt0000000047.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_files/columns/mime_type/alterations/alt0000000047 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_files/table +-- requires: schemas/constructive_storage_public/tables/platform_files/columns/mime_type/column + + +ALTER TABLE "constructive_storage_public".platform_files + ALTER COLUMN mime_type SET NOT NULL; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/mime_type/alterations/alt0000000048.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/mime_type/alterations/alt0000000048.sql new file mode 100644 index 00000000..2c28723c --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/mime_type/alterations/alt0000000048.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_files/columns/mime_type/alterations/alt0000000048 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_files/columns/mime_type/column + + +COMMENT ON COLUMN "constructive_storage_public".platform_files.mime_type IS E'MIME type of the file (e.g. image/png, application/pdf). Immutable after INSERT.'; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/mime_type/column.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/mime_type/column.sql new file mode 100644 index 00000000..4ab17984 --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/mime_type/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_files/columns/mime_type/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_files/table + + +ALTER TABLE "constructive_storage_public".platform_files + ADD COLUMN mime_type text; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/size/alterations/alt0000000049.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/size/alterations/alt0000000049.sql new file mode 100644 index 00000000..b0db0a54 --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/size/alterations/alt0000000049.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_files/columns/size/alterations/alt0000000049 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_files/table +-- requires: schemas/constructive_storage_public/tables/platform_files/columns/size/column + + +ALTER TABLE "constructive_storage_public".platform_files + ALTER COLUMN size SET NOT NULL; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/size/alterations/alt0000000050.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/size/alterations/alt0000000050.sql new file mode 100644 index 00000000..ead7616d --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/size/alterations/alt0000000050.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_files/columns/size/alterations/alt0000000050 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_files/columns/size/column + + +COMMENT ON COLUMN "constructive_storage_public".platform_files.size IS E'File size in bytes. Immutable after INSERT.'; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/size/column.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/size/column.sql new file mode 100644 index 00000000..e0eb5d32 --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/size/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_files/columns/size/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_files/table + + +ALTER TABLE "constructive_storage_public".platform_files + ADD COLUMN size bigint; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/status/alterations/alt0000000051.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/status/alterations/alt0000000051.sql new file mode 100644 index 00000000..4effca88 --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/status/alterations/alt0000000051.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_files/columns/status/alterations/alt0000000051 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_files/table +-- requires: schemas/constructive_storage_public/tables/platform_files/columns/status/column + + +ALTER TABLE "constructive_storage_public".platform_files + ALTER COLUMN status SET NOT NULL; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/status/alterations/alt0000000052.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/status/alterations/alt0000000052.sql new file mode 100644 index 00000000..788f7a62 --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/status/alterations/alt0000000052.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_files/columns/status/alterations/alt0000000052 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_files/table +-- requires: schemas/constructive_storage_public/tables/platform_files/columns/status/column + + +ALTER TABLE "constructive_storage_public".platform_files + ALTER COLUMN status SET DEFAULT 'requested'; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/status/alterations/alt0000000053.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/status/alterations/alt0000000053.sql new file mode 100644 index 00000000..53218135 --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/status/alterations/alt0000000053.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_files/columns/status/alterations/alt0000000053 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_files/columns/status/column + + +COMMENT ON COLUMN "constructive_storage_public".platform_files.status IS E'File lifecycle status: requested (presigned URL generated, not yet in S3), uploaded (file in S3, ready for basic use), processed (MIME verified, image resized, embedding computed).'; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/status/column.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/status/column.sql new file mode 100644 index 00000000..cbc92c69 --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/status/column.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_files/columns/status/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_files/table +-- requires: schemas/constructive_storage_public/types/file_status/type + + +ALTER TABLE "constructive_storage_public".platform_files + ADD COLUMN status "constructive_storage_public".file_status; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/tags/alterations/alt0000000054.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/tags/alterations/alt0000000054.sql new file mode 100644 index 00000000..f9ab6289 --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/tags/alterations/alt0000000054.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_files/columns/tags/alterations/alt0000000054 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_files/columns/tags/column + + +COMMENT ON COLUMN "constructive_storage_public".platform_files.tags IS E'User-defined tags for categorization and search (mutable)'; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/tags/column.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/tags/column.sql new file mode 100644 index 00000000..87b5f0fd --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/tags/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_files/columns/tags/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_files/table + + +ALTER TABLE "constructive_storage_public".platform_files + ADD COLUMN tags text[]; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/updated_at/alterations/alt0000000055.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/updated_at/alterations/alt0000000055.sql new file mode 100644 index 00000000..e559a587 --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/updated_at/alterations/alt0000000055.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_files/columns/updated_at/alterations/alt0000000055 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_files/table +-- requires: schemas/constructive_storage_public/tables/platform_files/columns/updated_at/column + + +ALTER TABLE "constructive_storage_public".platform_files + ALTER COLUMN updated_at SET DEFAULT now(); + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/updated_at/column.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/updated_at/column.sql new file mode 100644 index 00000000..3fcc9347 --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/updated_at/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_files/columns/updated_at/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_files/table + + +ALTER TABLE "constructive_storage_public".platform_files + ADD COLUMN updated_at timestamptz; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/upload/alterations/alt0000000056.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/upload/alterations/alt0000000056.sql new file mode 100644 index 00000000..96e535a7 --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/upload/alterations/alt0000000056.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_files/columns/upload/alterations/alt0000000056 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_files/columns/upload/column + + +COMMENT ON COLUMN "constructive_storage_public".platform_files.upload IS E'Processed file reference (upload domain). Populated by processing jobs after file is uploaded. Copy this value to other tables to reference the file.'; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/upload/column.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/upload/column.sql new file mode 100644 index 00000000..5d7866bc --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/columns/upload/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_files/columns/upload/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_files/table + + +ALTER TABLE "constructive_storage_public".platform_files + ADD COLUMN upload upload; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/constraints/platform_files_bucket_id_fkey/constraint.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/constraints/platform_files_bucket_id_fkey/constraint.sql new file mode 100644 index 00000000..29ea2aff --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/constraints/platform_files_bucket_id_fkey/constraint.sql @@ -0,0 +1,18 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_files/constraints/platform_files_bucket_id_fkey/constraint +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_files/table +-- requires: schemas/constructive_storage_public/tables/platform_buckets/table +-- requires: schemas/constructive_storage_public/tables/platform_files/columns/bucket_id/column +-- requires: schemas/constructive_storage_public/tables/platform_buckets/columns/id/column +-- requires: schemas/constructive_storage_public/tables/platform_buckets/constraints/platform_buckets_database_id_key_key/constraint +-- requires: schemas/constructive_storage_public/tables/platform_buckets/constraints/platform_buckets_pkey/constraint + + +ALTER TABLE "constructive_storage_public".platform_files + ADD CONSTRAINT platform_files_bucket_id_fkey + FOREIGN KEY(bucket_id) + REFERENCES "constructive_storage_public".platform_buckets (id) + ON DELETE RESTRICT; + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/constraints/platform_files_bucket_id_key_key/constraint.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/constraints/platform_files_bucket_id_key_key/constraint.sql new file mode 100644 index 00000000..d3f11604 --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/constraints/platform_files_bucket_id_key_key/constraint.sql @@ -0,0 +1,13 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_files/constraints/platform_files_bucket_id_key_key/constraint +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_files/table +-- requires: schemas/constructive_storage_public/tables/platform_files/columns/bucket_id/column +-- requires: schemas/constructive_storage_public/tables/platform_files/columns/key/column + + +ALTER TABLE "constructive_storage_public".platform_files + ADD CONSTRAINT platform_files_bucket_id_key_key + UNIQUE (bucket_id, key); + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/constraints/platform_files_pkey/constraint.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/constraints/platform_files_pkey/constraint.sql new file mode 100644 index 00000000..b7e058f4 --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/constraints/platform_files_pkey/constraint.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_files/constraints/platform_files_pkey/constraint +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_files/table +-- requires: schemas/constructive_storage_public/tables/platform_files/columns/id/column + + +ALTER TABLE "constructive_storage_public".platform_files + ADD CONSTRAINT platform_files_pkey PRIMARY KEY (id); + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_actor_id_idx.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_actor_id_idx.sql new file mode 100644 index 00000000..5978f0bf --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_actor_id_idx.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_actor_id_idx +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_files/table +-- requires: schemas/constructive_storage_public/tables/platform_files/columns/actor_id/column + + +CREATE INDEX platform_files_actor_id_idx ON "constructive_storage_public".platform_files USING BTREE ( actor_id ); + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_bucket_id_content_hash_idx.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_bucket_id_content_hash_idx.sql new file mode 100644 index 00000000..4d50994d --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_bucket_id_content_hash_idx.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_bucket_id_content_hash_idx +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_files/table +-- requires: schemas/constructive_storage_public/tables/platform_files/columns/bucket_id/column +-- requires: schemas/constructive_storage_public/tables/platform_files/columns/content_hash/column + + +CREATE INDEX platform_files_bucket_id_content_hash_idx ON "constructive_storage_public".platform_files USING BTREE ( bucket_id, content_hash ); + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_bucket_id_idx.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_bucket_id_idx.sql new file mode 100644 index 00000000..5c6c8215 --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_bucket_id_idx.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_bucket_id_idx +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_files/table +-- requires: schemas/constructive_storage_public/tables/platform_files/columns/bucket_id/column + + +CREATE INDEX platform_files_bucket_id_idx ON "constructive_storage_public".platform_files USING BTREE ( bucket_id ); + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_created_at_idx.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_created_at_idx.sql new file mode 100644 index 00000000..31fd4361 --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_created_at_idx.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_created_at_idx +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_files/table +-- requires: schemas/constructive_storage_public/tables/platform_files/columns/created_at/column + + +CREATE INDEX platform_files_created_at_idx ON "constructive_storage_public".platform_files ( created_at ); + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_is_public_idx.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_is_public_idx.sql new file mode 100644 index 00000000..9720d657 --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_is_public_idx.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_is_public_idx +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_files/table +-- requires: schemas/constructive_storage_public/tables/platform_files/columns/is_public/column + + +CREATE INDEX platform_files_is_public_idx ON "constructive_storage_public".platform_files USING BTREE ( is_public ); + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_updated_at_idx.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_updated_at_idx.sql new file mode 100644 index 00000000..aa698ebd --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_updated_at_idx.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_updated_at_idx +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_files/table +-- requires: schemas/constructive_storage_public/tables/platform_files/columns/updated_at/column + + +CREATE INDEX platform_files_updated_at_idx ON "constructive_storage_public".platform_files ( updated_at ); + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/table.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/table.sql new file mode 100644 index 00000000..f9b0a14d --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/table.sql @@ -0,0 +1,8 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_files/table +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema + + +CREATE TABLE "constructive_storage_public".platform_files (); + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/triggers/platform_files_gc_storage_object_tg.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/triggers/platform_files_gc_storage_object_tg.sql new file mode 100644 index 00000000..077369b9 --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/triggers/platform_files_gc_storage_object_tg.sql @@ -0,0 +1,14 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_files/triggers/platform_files_gc_storage_object_tg +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_private/schema +-- requires: schemas/constructive_storage_public/tables/platform_files/table +-- requires: schemas/constructive_storage_private/trigger_fns/platform_files_gc_storage_object + + +CREATE TRIGGER platform_files_gc_storage_object_tg +AFTER DELETE ON "constructive_storage_public".platform_files +FOR EACH ROW +EXECUTE PROCEDURE "constructive_storage_private".platform_files_gc_storage_object ( ); + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/triggers/platform_files_immutable_fields_tg.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/triggers/platform_files_immutable_fields_tg.sql new file mode 100644 index 00000000..486f4d75 --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/triggers/platform_files_immutable_fields_tg.sql @@ -0,0 +1,14 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_files/triggers/platform_files_immutable_fields_tg +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_private/schema +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_files/table +-- requires: schemas/constructive_private/trigger_fns/platform_files_immutable_fields + + +CREATE TRIGGER platform_files_immutable_fields_tg +BEFORE UPDATE ON "constructive_storage_public".platform_files +FOR EACH ROW +EXECUTE PROCEDURE "constructive_private".platform_files_immutable_fields ( ); + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/triggers/platform_files_inherit_from_parent_tg.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/triggers/platform_files_inherit_from_parent_tg.sql new file mode 100644 index 00000000..032e9939 --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/triggers/platform_files_inherit_from_parent_tg.sql @@ -0,0 +1,14 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_files/triggers/platform_files_inherit_from_parent_tg +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_private/schema +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_files/table +-- requires: schemas/constructive_private/trigger_fns/platform_files_inherit_from_parent + + +CREATE TRIGGER platform_files_inherit_from_parent_tg +BEFORE INSERT ON "constructive_storage_public".platform_files +FOR EACH ROW +EXECUTE PROCEDURE "constructive_private".platform_files_inherit_from_parent ( ); + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/triggers/timestamps_tg.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/triggers/timestamps_tg.sql new file mode 100644 index 00000000..6bc28c8d --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/tables/platform_files/triggers/timestamps_tg.sql @@ -0,0 +1,12 @@ +-- Deploy: schemas/constructive_storage_public/tables/platform_files/triggers/timestamps_tg +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema +-- requires: schemas/constructive_storage_public/tables/platform_files/table + + +CREATE TRIGGER timestamps_tg +BEFORE INSERT OR UPDATE ON "constructive_storage_public".platform_files +FOR EACH ROW +EXECUTE PROCEDURE stamps.timestamps ( ); + diff --git a/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/types/file_status/type.sql b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/types/file_status/type.sql new file mode 100644 index 00000000..1a594595 --- /dev/null +++ b/pgpm/constructive-storage/deploy/schemas/constructive_storage_public/types/file_status/type.sql @@ -0,0 +1,8 @@ +-- Deploy: schemas/constructive_storage_public/types/file_status/type +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_storage_public/schema + + +CREATE TYPE "constructive_storage_public".file_status AS ENUM ( 'requested', 'uploaded', 'processed' ); + diff --git a/pgpm/constructive-storage/package.json b/pgpm/constructive-storage/package.json new file mode 100644 index 00000000..bff9a30b --- /dev/null +++ b/pgpm/constructive-storage/package.json @@ -0,0 +1,30 @@ +{ + "name": "@constructive-io/constructive-storage", + "version": "0.0.1", + "description": "Storage module — file uploads, buckets, versioning, GC", + "author": "Constructive ", + "keywords": [ + "postgresql", + "pgpm", + "constructive-storage" + ], + "publishConfig": { + "access": "public" + }, + "scripts": { + "bundle": "pgpm package", + "test": "jest", + "test:watch": "jest --watch" + }, + "dependencies": { + "@pgpm/inflection": "*", + "@pgpm/stamps": "*" + }, + "devDependencies": { + "pgpm": "^4.26.1" + }, + "repository": { + "type": "git", + "url": "https://github.com/constructive-io/constructive-functions" + } +} diff --git a/pgpm/constructive-storage/pgpm.plan b/pgpm/constructive-storage/pgpm.plan new file mode 100644 index 00000000..d54dccb7 --- /dev/null +++ b/pgpm/constructive-storage/pgpm.plan @@ -0,0 +1,121 @@ +%syntax-version=1.0.0 +%project=constructive-storage +%uri=constructive-storage + +schemas/constructive_private/schema 2017-08-11T08:11:51Z Constructive # add create_schema +schemas/constructive_storage_private/schema 2017-08-11T08:11:51Z Constructive # add create_schema +schemas/constructive_storage_public/schema 2017-08-11T08:11:51Z Constructive # add create_schema +schemas/constructive_storage_public/types/file_status/type [schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add create_enum +schemas/constructive_storage_public/tables/platform_files/table [schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add create_table +schemas/constructive_storage_public/tables/platform_buckets/table [schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add create_table +schemas/constructive_storage_public/tables/platform_buckets/columns/actor_id/column [schemas/constructive_storage_public/tables/platform_buckets/table schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_storage_public/tables/platform_buckets/columns/actor_id/alterations/alt0000000004 [schemas/constructive_storage_public/tables/platform_buckets/columns/actor_id/column schemas/constructive_storage_public/tables/platform_buckets/table schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_storage_public/tables/platform_buckets/columns/actor_id/alterations/alt0000000005 [schemas/constructive_storage_public/tables/platform_buckets/columns/actor_id/column schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_storage_public/tables/platform_buckets/columns/allow_custom_keys/column [schemas/constructive_storage_public/tables/platform_buckets/table schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_storage_public/tables/platform_buckets/columns/allow_custom_keys/alterations/alt0000000006 [schemas/constructive_storage_public/tables/platform_buckets/table schemas/constructive_storage_public/tables/platform_buckets/columns/allow_custom_keys/column schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_storage_public/tables/platform_buckets/columns/allow_custom_keys/alterations/alt0000000007 [schemas/constructive_storage_public/tables/platform_buckets/table schemas/constructive_storage_public/tables/platform_buckets/columns/allow_custom_keys/column schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default +schemas/constructive_storage_public/tables/platform_buckets/columns/allow_custom_keys/alterations/alt0000000008 [schemas/constructive_storage_public/tables/platform_buckets/columns/allow_custom_keys/column schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_storage_public/tables/platform_buckets/columns/allowed_mime_types/column [schemas/constructive_storage_public/tables/platform_buckets/table schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_storage_public/tables/platform_buckets/columns/allowed_mime_types/alterations/alt0000000009 [schemas/constructive_storage_public/tables/platform_buckets/columns/allowed_mime_types/column schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_storage_public/tables/platform_buckets/columns/allowed_origins/column [schemas/constructive_storage_public/tables/platform_buckets/table schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_storage_public/tables/platform_buckets/columns/allowed_origins/alterations/alt0000000010 [schemas/constructive_storage_public/tables/platform_buckets/columns/allowed_origins/column schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_storage_public/tables/platform_buckets/columns/created_at/column [schemas/constructive_storage_public/tables/platform_buckets/table schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_storage_public/tables/platform_buckets/columns/created_at/alterations/alt0000000011 [schemas/constructive_storage_public/tables/platform_buckets/table schemas/constructive_storage_public/schema schemas/constructive_storage_public/tables/platform_buckets/columns/created_at/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default +schemas/constructive_storage_public/tables/platform_buckets/columns/database_id/column [schemas/constructive_storage_public/tables/platform_buckets/table schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_storage_public/tables/platform_buckets/columns/database_id/alterations/alt0000000012 [schemas/constructive_storage_public/tables/platform_buckets/table schemas/constructive_storage_public/tables/platform_buckets/columns/database_id/column schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_storage_public/tables/platform_buckets/columns/database_id/alterations/alt0000000013 [schemas/constructive_storage_public/tables/platform_buckets/columns/database_id/column schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_storage_public/tables/platform_buckets/columns/description/column [schemas/constructive_storage_public/tables/platform_buckets/table schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_storage_public/tables/platform_buckets/columns/description/alterations/alt0000000014 [schemas/constructive_storage_public/tables/platform_buckets/columns/description/column schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_storage_public/tables/platform_buckets/columns/id/column [schemas/constructive_storage_public/tables/platform_buckets/table schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_storage_public/tables/platform_buckets/columns/id/alterations/alt0000000015 [schemas/constructive_storage_public/tables/platform_buckets/table schemas/constructive_storage_public/tables/platform_buckets/columns/id/column schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_storage_public/tables/platform_buckets/columns/id/alterations/alt0000000016 [schemas/constructive_storage_public/tables/platform_buckets/table schemas/constructive_storage_public/tables/platform_buckets/columns/id/column schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default +schemas/constructive_storage_public/tables/platform_buckets/columns/is_public/column [schemas/constructive_storage_public/tables/platform_buckets/table schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_storage_public/tables/platform_buckets/columns/is_public/alterations/alt0000000017 [schemas/constructive_storage_public/tables/platform_buckets/table schemas/constructive_storage_public/schema schemas/constructive_storage_public/tables/platform_buckets/columns/is_public/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_storage_public/tables/platform_buckets/columns/is_public/alterations/alt0000000018 [schemas/constructive_storage_public/tables/platform_buckets/table schemas/constructive_storage_public/schema schemas/constructive_storage_public/tables/platform_buckets/columns/is_public/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default +schemas/constructive_storage_public/tables/platform_buckets/columns/is_public/alterations/alt0000000019 [schemas/constructive_storage_public/schema schemas/constructive_storage_public/tables/platform_buckets/columns/is_public/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_storage_public/tables/platform_buckets/columns/key/column [schemas/constructive_storage_public/tables/platform_buckets/table schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_storage_public/tables/platform_buckets/columns/key/alterations/alt0000000020 [schemas/constructive_storage_public/tables/platform_buckets/table schemas/constructive_storage_public/tables/platform_buckets/columns/key/column schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_storage_public/tables/platform_buckets/columns/key/alterations/alt0000000021 [schemas/constructive_storage_public/tables/platform_buckets/columns/key/column schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_storage_public/tables/platform_buckets/columns/max_file_size/column [schemas/constructive_storage_public/tables/platform_buckets/table schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_storage_public/tables/platform_buckets/columns/max_file_size/alterations/alt0000000022 [schemas/constructive_storage_public/tables/platform_buckets/columns/max_file_size/column schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_storage_public/tables/platform_buckets/columns/type/column [schemas/constructive_storage_public/tables/platform_buckets/table schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_storage_public/tables/platform_buckets/columns/type/alterations/alt0000000023 [schemas/constructive_storage_public/tables/platform_buckets/table schemas/constructive_storage_public/schema schemas/constructive_storage_public/tables/platform_buckets/columns/type/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_storage_public/tables/platform_buckets/columns/type/alterations/alt0000000024 [schemas/constructive_storage_public/tables/platform_buckets/table schemas/constructive_storage_public/schema schemas/constructive_storage_public/tables/platform_buckets/columns/type/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default +schemas/constructive_storage_public/tables/platform_buckets/columns/type/alterations/alt0000000025 [schemas/constructive_storage_public/tables/platform_buckets/columns/type/column schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_storage_public/tables/platform_buckets/columns/updated_at/column [schemas/constructive_storage_public/tables/platform_buckets/table schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_storage_public/tables/platform_buckets/columns/updated_at/alterations/alt0000000026 [schemas/constructive_storage_public/tables/platform_buckets/table schemas/constructive_storage_public/tables/platform_buckets/columns/updated_at/column schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default +schemas/constructive_storage_public/tables/platform_files/columns/actor_id/column [schemas/constructive_storage_public/tables/platform_files/table schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_storage_public/tables/platform_files/columns/actor_id/alterations/alt0000000030 [schemas/constructive_storage_public/tables/platform_files/table schemas/constructive_storage_public/tables/platform_files/columns/actor_id/column schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_storage_public/tables/platform_files/columns/actor_id/alterations/alt0000000031 [schemas/constructive_storage_public/tables/platform_files/columns/actor_id/column schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_storage_public/tables/platform_files/columns/bucket_id/column [schemas/constructive_storage_public/tables/platform_files/table schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_storage_public/tables/platform_files/columns/bucket_id/alterations/alt0000000032 [schemas/constructive_storage_public/tables/platform_files/columns/bucket_id/column schemas/constructive_storage_public/tables/platform_files/table schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_storage_public/tables/platform_files/columns/bucket_id/alterations/alt0000000033 [schemas/constructive_storage_public/tables/platform_files/columns/bucket_id/column schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_storage_public/tables/platform_files/columns/content_hash/column [schemas/constructive_storage_public/tables/platform_files/table schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_storage_public/tables/platform_files/columns/content_hash/alterations/alt0000000034 [schemas/constructive_storage_public/tables/platform_files/columns/content_hash/column schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_storage_public/tables/platform_files/columns/created_at/column [schemas/constructive_storage_public/tables/platform_files/table schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_storage_public/tables/platform_files/columns/created_at/alterations/alt0000000035 [schemas/constructive_storage_public/tables/platform_files/table schemas/constructive_storage_public/tables/platform_files/columns/created_at/column schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default +schemas/constructive_storage_public/tables/platform_files/columns/database_id/column [schemas/constructive_storage_public/tables/platform_files/table schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_storage_public/tables/platform_files/columns/database_id/alterations/alt0000000036 [schemas/constructive_storage_public/tables/platform_files/table schemas/constructive_storage_public/tables/platform_files/columns/database_id/column schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_storage_public/tables/platform_files/columns/database_id/alterations/alt0000000037 [schemas/constructive_storage_public/tables/platform_files/columns/database_id/column schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_storage_public/tables/platform_files/columns/description/column [schemas/constructive_storage_public/tables/platform_files/table schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_storage_public/tables/platform_files/columns/description/alterations/alt0000000038 [schemas/constructive_storage_public/tables/platform_files/columns/description/column schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_storage_public/tables/platform_files/columns/filename/column [schemas/constructive_storage_public/tables/platform_files/table schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_storage_public/tables/platform_files/columns/filename/alterations/alt0000000039 [schemas/constructive_storage_public/tables/platform_files/columns/filename/column schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_storage_public/tables/platform_files/columns/id/column [schemas/constructive_storage_public/tables/platform_files/table schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_storage_public/tables/platform_files/columns/id/alterations/alt0000000040 [schemas/constructive_storage_public/tables/platform_files/table schemas/constructive_storage_public/tables/platform_files/columns/id/column schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_storage_public/tables/platform_files/columns/id/alterations/alt0000000041 [schemas/constructive_storage_public/tables/platform_files/table schemas/constructive_storage_public/tables/platform_files/columns/id/column schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default +schemas/constructive_storage_public/tables/platform_files/columns/is_public/column [schemas/constructive_storage_public/tables/platform_files/table schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_storage_public/tables/platform_files/columns/is_public/alterations/alt0000000042 [schemas/constructive_storage_public/tables/platform_files/table schemas/constructive_storage_public/schema schemas/constructive_storage_public/tables/platform_files/columns/is_public/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_storage_public/tables/platform_files/columns/is_public/alterations/alt0000000043 [schemas/constructive_storage_public/tables/platform_files/table schemas/constructive_storage_public/schema schemas/constructive_storage_public/tables/platform_files/columns/is_public/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default +schemas/constructive_storage_public/tables/platform_files/columns/is_public/alterations/alt0000000044 [schemas/constructive_storage_public/schema schemas/constructive_storage_public/tables/platform_files/columns/is_public/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_storage_public/tables/platform_files/columns/key/column [schemas/constructive_storage_public/tables/platform_files/table schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_storage_public/tables/platform_files/columns/key/alterations/alt0000000045 [schemas/constructive_storage_public/tables/platform_files/table schemas/constructive_storage_public/tables/platform_files/columns/key/column schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_storage_public/tables/platform_files/columns/key/alterations/alt0000000046 [schemas/constructive_storage_public/tables/platform_files/columns/key/column schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_storage_public/tables/platform_files/columns/mime_type/column [schemas/constructive_storage_public/tables/platform_files/table schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_storage_public/tables/platform_files/columns/mime_type/alterations/alt0000000047 [schemas/constructive_storage_public/tables/platform_files/columns/mime_type/column schemas/constructive_storage_public/tables/platform_files/table schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_storage_public/tables/platform_files/columns/mime_type/alterations/alt0000000048 [schemas/constructive_storage_public/tables/platform_files/columns/mime_type/column schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_storage_public/tables/platform_files/columns/size/column [schemas/constructive_storage_public/tables/platform_files/table schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_storage_public/tables/platform_files/columns/size/alterations/alt0000000049 [schemas/constructive_storage_public/tables/platform_files/columns/size/column schemas/constructive_storage_public/tables/platform_files/table schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_storage_public/tables/platform_files/columns/size/alterations/alt0000000050 [schemas/constructive_storage_public/tables/platform_files/columns/size/column schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_storage_public/tables/platform_files/columns/tags/column [schemas/constructive_storage_public/tables/platform_files/table schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_storage_public/tables/platform_files/columns/tags/alterations/alt0000000054 [schemas/constructive_storage_public/tables/platform_files/columns/tags/column schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_storage_public/tables/platform_files/columns/updated_at/column [schemas/constructive_storage_public/tables/platform_files/table schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_storage_public/tables/platform_files/columns/updated_at/alterations/alt0000000055 [schemas/constructive_storage_public/tables/platform_files/table schemas/constructive_storage_public/schema schemas/constructive_storage_public/tables/platform_files/columns/updated_at/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default +schemas/constructive_storage_public/tables/platform_files/columns/upload/column [schemas/constructive_storage_public/tables/platform_files/table schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_storage_public/tables/platform_files/columns/upload/alterations/alt0000000056 [schemas/constructive_storage_public/tables/platform_files/columns/upload/column schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_storage_public/tables/platform_files/columns/status/column [schemas/constructive_storage_public/tables/platform_files/table schemas/constructive_storage_public/schema schemas/constructive_storage_public/types/file_status/type] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_storage_public/tables/platform_files/columns/status/alterations/alt0000000051 [schemas/constructive_storage_public/tables/platform_files/table schemas/constructive_storage_public/tables/platform_files/columns/status/column schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_storage_public/tables/platform_files/columns/status/alterations/alt0000000052 [schemas/constructive_storage_public/tables/platform_files/table schemas/constructive_storage_public/tables/platform_files/columns/status/column schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default +schemas/constructive_storage_public/tables/platform_files/columns/status/alterations/alt0000000053 [schemas/constructive_storage_public/tables/platform_files/columns/status/column schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_storage_public/tables/platform_buckets/alterations/alt0000000001 [schemas/constructive_storage_public/tables/platform_buckets/table schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add disable_row_level_security +schemas/constructive_storage_public/tables/platform_buckets/alterations/alt0000000002 [schemas/constructive_storage_public/tables/platform_buckets/table schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_storage_public/tables/platform_buckets/alterations/alt0000000003 [schemas/constructive_storage_public/tables/platform_buckets/table schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_storage_public/tables/platform_files/alterations/alt0000000027 [schemas/constructive_storage_public/tables/platform_files/table schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add disable_row_level_security +schemas/constructive_storage_public/tables/platform_files/alterations/alt0000000028 [schemas/constructive_storage_public/tables/platform_files/table schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_storage_public/tables/platform_files/alterations/alt0000000029 [schemas/constructive_storage_public/tables/platform_files/table schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_storage_public/tables/platform_buckets/constraints/platform_buckets_database_id_key_key/constraint [schemas/constructive_storage_public/tables/platform_buckets/table schemas/constructive_storage_public/schema schemas/constructive_storage_public/tables/platform_buckets/columns/database_id/column schemas/constructive_storage_public/tables/platform_buckets/columns/key/column] 2017-08-11T08:11:51Z Constructive # add alter_table_add_unique_constraint +schemas/constructive_storage_public/tables/platform_buckets/constraints/platform_buckets_pkey/constraint [schemas/constructive_storage_public/tables/platform_buckets/table schemas/constructive_storage_public/schema schemas/constructive_storage_public/tables/platform_buckets/columns/id/column] 2017-08-11T08:11:51Z Constructive # add alter_table_add_primary_key +schemas/constructive_storage_public/tables/platform_files/constraints/platform_files_bucket_id_fkey/constraint [schemas/constructive_storage_public/tables/platform_buckets/table schemas/constructive_storage_public/tables/platform_files/table schemas/constructive_storage_public/schema schemas/constructive_storage_public/tables/platform_files/columns/bucket_id/column schemas/constructive_storage_public/tables/platform_buckets/columns/id/column schemas/constructive_storage_public/tables/platform_buckets/constraints/platform_buckets_database_id_key_key/constraint schemas/constructive_storage_public/tables/platform_buckets/constraints/platform_buckets_pkey/constraint] 2017-08-11T08:11:51Z Constructive # add alter_table_add_foreign_key +schemas/constructive_storage_public/tables/platform_files/constraints/platform_files_bucket_id_key_key/constraint [schemas/constructive_storage_public/tables/platform_files/table schemas/constructive_storage_public/schema schemas/constructive_storage_public/tables/platform_files/columns/bucket_id/column schemas/constructive_storage_public/tables/platform_files/columns/key/column] 2017-08-11T08:11:51Z Constructive # add alter_table_add_unique_constraint +schemas/constructive_storage_public/tables/platform_files/constraints/platform_files_pkey/constraint [schemas/constructive_storage_public/tables/platform_files/table schemas/constructive_storage_public/schema schemas/constructive_storage_public/tables/platform_files/columns/id/column] 2017-08-11T08:11:51Z Constructive # add alter_table_add_primary_key +schemas/constructive_storage_public/tables/platform_buckets/indexes/platform_buckets_created_at_idx [schemas/constructive_storage_public/tables/platform_buckets/table schemas/constructive_storage_public/tables/platform_buckets/columns/created_at/column schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add create_index +schemas/constructive_storage_public/tables/platform_buckets/indexes/platform_buckets_is_public_idx [schemas/constructive_storage_public/tables/platform_buckets/table schemas/constructive_storage_public/schema schemas/constructive_storage_public/tables/platform_buckets/columns/is_public/column] 2017-08-11T08:11:51Z Constructive # add create_index +schemas/constructive_storage_public/tables/platform_buckets/indexes/platform_buckets_updated_at_idx [schemas/constructive_storage_public/tables/platform_buckets/table schemas/constructive_storage_public/tables/platform_buckets/columns/updated_at/column schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add create_index +schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_actor_id_idx [schemas/constructive_storage_public/tables/platform_files/table schemas/constructive_storage_public/tables/platform_files/columns/actor_id/column schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add create_index +schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_bucket_id_content_hash_idx [schemas/constructive_storage_public/tables/platform_files/columns/bucket_id/column schemas/constructive_storage_public/tables/platform_files/table schemas/constructive_storage_public/tables/platform_files/columns/content_hash/column schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add create_index +schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_bucket_id_idx [schemas/constructive_storage_public/tables/platform_files/columns/bucket_id/column schemas/constructive_storage_public/tables/platform_files/table schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add create_index +schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_created_at_idx [schemas/constructive_storage_public/tables/platform_files/table schemas/constructive_storage_public/tables/platform_files/columns/created_at/column schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add create_index +schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_is_public_idx [schemas/constructive_storage_public/tables/platform_files/table schemas/constructive_storage_public/schema schemas/constructive_storage_public/tables/platform_files/columns/is_public/column] 2017-08-11T08:11:51Z Constructive # add create_index +schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_updated_at_idx [schemas/constructive_storage_public/tables/platform_files/table schemas/constructive_storage_public/tables/platform_files/columns/updated_at/column schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add create_index +schemas/constructive_private/trigger_fns/platform_buckets_immutable_fields [schemas/constructive_private/schema] 2017-08-11T08:11:51Z Constructive # add create_trigger_function +schemas/constructive_private/trigger_fns/platform_files_immutable_fields [schemas/constructive_private/schema] 2017-08-11T08:11:51Z Constructive # add create_trigger_function +schemas/constructive_private/trigger_fns/platform_files_inherit_from_parent [schemas/constructive_private/schema] 2017-08-11T08:11:51Z Constructive # add create_trigger_function +schemas/constructive_storage_private/trigger_fns/platform_files_gc_storage_object [schemas/constructive_storage_private/schema] 2017-08-11T08:11:51Z Constructive # add create_trigger_function +schemas/constructive_storage_public/procedures/platform_files_file_path/procedure [schemas/constructive_storage_public/tables/platform_files/table schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add file_path_function +schemas/constructive_storage_public/procedures/platform_files_rename/procedure [schemas/constructive_storage_public/tables/platform_files/table schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add rename_file_function +schemas/constructive_storage_public/tables/platform_buckets/triggers/platform_buckets_immutable_fields_tg [schemas/constructive_private/trigger_fns/platform_buckets_immutable_fields schemas/constructive_storage_public/tables/platform_buckets/table schemas/constructive_private/schema schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add create_trigger +schemas/constructive_storage_public/tables/platform_buckets/triggers/timestamps_tg [schemas/constructive_storage_public/tables/platform_buckets/table schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add create_trigger +schemas/constructive_storage_public/tables/platform_files/triggers/platform_files_gc_storage_object_tg [schemas/constructive_storage_public/tables/platform_files/table schemas/constructive_storage_private/trigger_fns/platform_files_gc_storage_object schemas/constructive_storage_private/schema schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add create_trigger +schemas/constructive_storage_public/tables/platform_files/triggers/platform_files_immutable_fields_tg [schemas/constructive_storage_public/tables/platform_files/table schemas/constructive_private/schema schemas/constructive_storage_public/schema schemas/constructive_private/trigger_fns/platform_files_immutable_fields] 2017-08-11T08:11:51Z Constructive # add create_trigger +schemas/constructive_storage_public/tables/platform_files/triggers/platform_files_inherit_from_parent_tg [schemas/constructive_storage_public/tables/platform_files/table schemas/constructive_private/trigger_fns/platform_files_inherit_from_parent schemas/constructive_private/schema schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add create_trigger +schemas/constructive_storage_public/tables/platform_files/triggers/timestamps_tg [schemas/constructive_storage_public/tables/platform_files/table schemas/constructive_storage_public/schema] 2017-08-11T08:11:51Z Constructive # add create_trigger diff --git a/pgpm/constructive-storage/revert/schemas/constructive_private/schema.sql b/pgpm/constructive-storage/revert/schemas/constructive_private/schema.sql new file mode 100644 index 00000000..4beb6d63 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_private/schema.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_private/schema + + +DROP SCHEMA "constructive_private" CASCADE; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_private/trigger_fns/platform_buckets_immutable_fields.sql b/pgpm/constructive-storage/revert/schemas/constructive_private/trigger_fns/platform_buckets_immutable_fields.sql new file mode 100644 index 00000000..cbf46c46 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_private/trigger_fns/platform_buckets_immutable_fields.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_private/trigger_fns/platform_buckets_immutable_fields + + +DROP FUNCTION "constructive_private".platform_buckets_immutable_fields; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_private/trigger_fns/platform_files_immutable_fields.sql b/pgpm/constructive-storage/revert/schemas/constructive_private/trigger_fns/platform_files_immutable_fields.sql new file mode 100644 index 00000000..fe8fb950 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_private/trigger_fns/platform_files_immutable_fields.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_private/trigger_fns/platform_files_immutable_fields + + +DROP FUNCTION "constructive_private".platform_files_immutable_fields; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_private/trigger_fns/platform_files_inherit_from_parent.sql b/pgpm/constructive-storage/revert/schemas/constructive_private/trigger_fns/platform_files_inherit_from_parent.sql new file mode 100644 index 00000000..71b30c1a --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_private/trigger_fns/platform_files_inherit_from_parent.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_private/trigger_fns/platform_files_inherit_from_parent + + +DROP FUNCTION "constructive_private".platform_files_inherit_from_parent; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_private/schema.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_private/schema.sql new file mode 100644 index 00000000..c921d629 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_private/schema.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_storage_private/schema + + +DROP SCHEMA "constructive_storage_private" CASCADE; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_private/trigger_fns/platform_files_gc_storage_object.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_private/trigger_fns/platform_files_gc_storage_object.sql new file mode 100644 index 00000000..57c55e54 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_private/trigger_fns/platform_files_gc_storage_object.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_storage_private/trigger_fns/platform_files_gc_storage_object + + +DROP FUNCTION "constructive_storage_private".platform_files_gc_storage_object; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/procedures/platform_files_file_path/procedure.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/procedures/platform_files_file_path/procedure.sql new file mode 100644 index 00000000..dea4fc46 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/procedures/platform_files_file_path/procedure.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_storage_public/procedures/platform_files_file_path/procedure + + +DROP FUNCTION "constructive_storage_public".platform_files_file_path; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/procedures/platform_files_rename/procedure.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/procedures/platform_files_rename/procedure.sql new file mode 100644 index 00000000..acc43b36 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/procedures/platform_files_rename/procedure.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_storage_public/procedures/platform_files_rename/procedure + + +DROP FUNCTION "constructive_storage_public".platform_files_rename; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/schema.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/schema.sql new file mode 100644 index 00000000..da1ac503 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/schema.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_storage_public/schema + + +DROP SCHEMA "constructive_storage_public" CASCADE; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/alterations/alt0000000001.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/alterations/alt0000000001.sql new file mode 100644 index 00000000..0a5474c4 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/alterations/alt0000000001.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_buckets/alterations/alt0000000001 + + +ALTER TABLE "constructive_storage_public".platform_buckets + ENABLE ROW LEVEL SECURITY; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/alterations/alt0000000002.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/alterations/alt0000000002.sql new file mode 100644 index 00000000..c9bdedd0 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/alterations/alt0000000002.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_buckets/alterations/alt0000000002 + + +COMMENT ON TABLE "constructive_storage_public".platform_buckets IS NULL; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/alterations/alt0000000003.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/alterations/alt0000000003.sql new file mode 100644 index 00000000..079caef9 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/alterations/alt0000000003.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_buckets/alterations/alt0000000003 + + +COMMENT ON TABLE "constructive_storage_public".platform_buckets IS NULL; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/actor_id/alterations/alt0000000004.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/actor_id/alterations/alt0000000004.sql new file mode 100644 index 00000000..71228a55 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/actor_id/alterations/alt0000000004.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_buckets/columns/actor_id/alterations/alt0000000004 + + +ALTER TABLE "constructive_storage_public".platform_buckets + ALTER COLUMN actor_id DROP NOT NULL; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/actor_id/alterations/alt0000000005.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/actor_id/alterations/alt0000000005.sql new file mode 100644 index 00000000..b1e29282 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/actor_id/alterations/alt0000000005.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_buckets/columns/actor_id/alterations/alt0000000005 + + +COMMENT ON COLUMN "constructive_storage_public".platform_buckets.actor_id IS NULL; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/actor_id/column.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/actor_id/column.sql new file mode 100644 index 00000000..0ad9e1ea --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/actor_id/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_buckets/columns/actor_id/column + + +ALTER TABLE "constructive_storage_public".platform_buckets + DROP COLUMN actor_id RESTRICT; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/allow_custom_keys/alterations/alt0000000006.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/allow_custom_keys/alterations/alt0000000006.sql new file mode 100644 index 00000000..bec9d663 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/allow_custom_keys/alterations/alt0000000006.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_buckets/columns/allow_custom_keys/alterations/alt0000000006 + + +ALTER TABLE "constructive_storage_public".platform_buckets + ALTER COLUMN allow_custom_keys DROP NOT NULL; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/allow_custom_keys/alterations/alt0000000007.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/allow_custom_keys/alterations/alt0000000007.sql new file mode 100644 index 00000000..23698809 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/allow_custom_keys/alterations/alt0000000007.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_buckets/columns/allow_custom_keys/alterations/alt0000000007 + + +ALTER TABLE "constructive_storage_public".platform_buckets + ALTER COLUMN allow_custom_keys DROP DEFAULT; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/allow_custom_keys/alterations/alt0000000008.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/allow_custom_keys/alterations/alt0000000008.sql new file mode 100644 index 00000000..ad7b8c44 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/allow_custom_keys/alterations/alt0000000008.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_buckets/columns/allow_custom_keys/alterations/alt0000000008 + + +COMMENT ON COLUMN "constructive_storage_public".platform_buckets.allow_custom_keys IS NULL; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/allow_custom_keys/column.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/allow_custom_keys/column.sql new file mode 100644 index 00000000..c813d143 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/allow_custom_keys/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_buckets/columns/allow_custom_keys/column + + +ALTER TABLE "constructive_storage_public".platform_buckets + DROP COLUMN allow_custom_keys RESTRICT; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/allowed_mime_types/alterations/alt0000000009.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/allowed_mime_types/alterations/alt0000000009.sql new file mode 100644 index 00000000..7ff08948 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/allowed_mime_types/alterations/alt0000000009.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_buckets/columns/allowed_mime_types/alterations/alt0000000009 + + +COMMENT ON COLUMN "constructive_storage_public".platform_buckets.allowed_mime_types IS NULL; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/allowed_mime_types/column.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/allowed_mime_types/column.sql new file mode 100644 index 00000000..2eb7a11c --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/allowed_mime_types/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_buckets/columns/allowed_mime_types/column + + +ALTER TABLE "constructive_storage_public".platform_buckets + DROP COLUMN allowed_mime_types RESTRICT; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/allowed_origins/alterations/alt0000000010.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/allowed_origins/alterations/alt0000000010.sql new file mode 100644 index 00000000..66a20581 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/allowed_origins/alterations/alt0000000010.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_buckets/columns/allowed_origins/alterations/alt0000000010 + + +COMMENT ON COLUMN "constructive_storage_public".platform_buckets.allowed_origins IS NULL; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/allowed_origins/column.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/allowed_origins/column.sql new file mode 100644 index 00000000..d047a56b --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/allowed_origins/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_buckets/columns/allowed_origins/column + + +ALTER TABLE "constructive_storage_public".platform_buckets + DROP COLUMN allowed_origins RESTRICT; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/created_at/alterations/alt0000000011.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/created_at/alterations/alt0000000011.sql new file mode 100644 index 00000000..0136fb03 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/created_at/alterations/alt0000000011.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_buckets/columns/created_at/alterations/alt0000000011 + + +ALTER TABLE "constructive_storage_public".platform_buckets + ALTER COLUMN created_at DROP DEFAULT; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/created_at/column.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/created_at/column.sql new file mode 100644 index 00000000..fda88739 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/created_at/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_buckets/columns/created_at/column + + +ALTER TABLE "constructive_storage_public".platform_buckets + DROP COLUMN created_at RESTRICT; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/database_id/alterations/alt0000000012.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/database_id/alterations/alt0000000012.sql new file mode 100644 index 00000000..b1d8ad0d --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/database_id/alterations/alt0000000012.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_buckets/columns/database_id/alterations/alt0000000012 + + +ALTER TABLE "constructive_storage_public".platform_buckets + ALTER COLUMN database_id DROP NOT NULL; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/database_id/alterations/alt0000000013.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/database_id/alterations/alt0000000013.sql new file mode 100644 index 00000000..2f59a967 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/database_id/alterations/alt0000000013.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_buckets/columns/database_id/alterations/alt0000000013 + + +COMMENT ON COLUMN "constructive_storage_public".platform_buckets.database_id IS NULL; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/database_id/column.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/database_id/column.sql new file mode 100644 index 00000000..03d0c302 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/database_id/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_buckets/columns/database_id/column + + +ALTER TABLE "constructive_storage_public".platform_buckets + DROP COLUMN database_id RESTRICT; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/description/alterations/alt0000000014.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/description/alterations/alt0000000014.sql new file mode 100644 index 00000000..28a367b9 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/description/alterations/alt0000000014.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_buckets/columns/description/alterations/alt0000000014 + + +COMMENT ON COLUMN "constructive_storage_public".platform_buckets.description IS NULL; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/description/column.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/description/column.sql new file mode 100644 index 00000000..b7d73c77 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/description/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_buckets/columns/description/column + + +ALTER TABLE "constructive_storage_public".platform_buckets + DROP COLUMN description RESTRICT; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/id/alterations/alt0000000015.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/id/alterations/alt0000000015.sql new file mode 100644 index 00000000..dfc87d03 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/id/alterations/alt0000000015.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_buckets/columns/id/alterations/alt0000000015 + + +ALTER TABLE "constructive_storage_public".platform_buckets + ALTER COLUMN id DROP NOT NULL; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/id/alterations/alt0000000016.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/id/alterations/alt0000000016.sql new file mode 100644 index 00000000..a3b669ca --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/id/alterations/alt0000000016.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_buckets/columns/id/alterations/alt0000000016 + + +ALTER TABLE "constructive_storage_public".platform_buckets + ALTER COLUMN id DROP DEFAULT; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/id/column.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/id/column.sql new file mode 100644 index 00000000..8a0acfec --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/id/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_buckets/columns/id/column + + +ALTER TABLE "constructive_storage_public".platform_buckets + DROP COLUMN id RESTRICT; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/is_public/alterations/alt0000000017.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/is_public/alterations/alt0000000017.sql new file mode 100644 index 00000000..1d9af811 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/is_public/alterations/alt0000000017.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_buckets/columns/is_public/alterations/alt0000000017 + + +ALTER TABLE "constructive_storage_public".platform_buckets + ALTER COLUMN is_public DROP NOT NULL; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/is_public/alterations/alt0000000018.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/is_public/alterations/alt0000000018.sql new file mode 100644 index 00000000..e93fde71 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/is_public/alterations/alt0000000018.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_buckets/columns/is_public/alterations/alt0000000018 + + +ALTER TABLE "constructive_storage_public".platform_buckets + ALTER COLUMN is_public DROP DEFAULT; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/is_public/alterations/alt0000000019.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/is_public/alterations/alt0000000019.sql new file mode 100644 index 00000000..dec8e56f --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/is_public/alterations/alt0000000019.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_buckets/columns/is_public/alterations/alt0000000019 + + +COMMENT ON COLUMN "constructive_storage_public".platform_buckets.is_public IS NULL; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/is_public/column.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/is_public/column.sql new file mode 100644 index 00000000..c2c47cde --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/is_public/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_buckets/columns/is_public/column + + +ALTER TABLE "constructive_storage_public".platform_buckets + DROP COLUMN is_public RESTRICT; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/key/alterations/alt0000000020.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/key/alterations/alt0000000020.sql new file mode 100644 index 00000000..ecb37e54 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/key/alterations/alt0000000020.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_buckets/columns/key/alterations/alt0000000020 + + +ALTER TABLE "constructive_storage_public".platform_buckets + ALTER COLUMN key DROP NOT NULL; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/key/alterations/alt0000000021.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/key/alterations/alt0000000021.sql new file mode 100644 index 00000000..389f8b5d --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/key/alterations/alt0000000021.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_buckets/columns/key/alterations/alt0000000021 + + +COMMENT ON COLUMN "constructive_storage_public".platform_buckets.key IS NULL; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/key/column.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/key/column.sql new file mode 100644 index 00000000..f484f6ae --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/key/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_buckets/columns/key/column + + +ALTER TABLE "constructive_storage_public".platform_buckets + DROP COLUMN key RESTRICT; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/max_file_size/alterations/alt0000000022.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/max_file_size/alterations/alt0000000022.sql new file mode 100644 index 00000000..ae97fdc0 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/max_file_size/alterations/alt0000000022.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_buckets/columns/max_file_size/alterations/alt0000000022 + + +COMMENT ON COLUMN "constructive_storage_public".platform_buckets.max_file_size IS NULL; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/max_file_size/column.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/max_file_size/column.sql new file mode 100644 index 00000000..008db3fb --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/max_file_size/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_buckets/columns/max_file_size/column + + +ALTER TABLE "constructive_storage_public".platform_buckets + DROP COLUMN max_file_size RESTRICT; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/type/alterations/alt0000000023.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/type/alterations/alt0000000023.sql new file mode 100644 index 00000000..69aa1de8 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/type/alterations/alt0000000023.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_buckets/columns/type/alterations/alt0000000023 + + +ALTER TABLE "constructive_storage_public".platform_buckets + ALTER COLUMN type DROP NOT NULL; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/type/alterations/alt0000000024.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/type/alterations/alt0000000024.sql new file mode 100644 index 00000000..3488587d --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/type/alterations/alt0000000024.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_buckets/columns/type/alterations/alt0000000024 + + +ALTER TABLE "constructive_storage_public".platform_buckets + ALTER COLUMN type DROP DEFAULT; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/type/alterations/alt0000000025.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/type/alterations/alt0000000025.sql new file mode 100644 index 00000000..bbb05368 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/type/alterations/alt0000000025.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_buckets/columns/type/alterations/alt0000000025 + + +COMMENT ON COLUMN "constructive_storage_public".platform_buckets.type IS NULL; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/type/column.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/type/column.sql new file mode 100644 index 00000000..da6e74fb --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/type/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_buckets/columns/type/column + + +ALTER TABLE "constructive_storage_public".platform_buckets + DROP COLUMN type RESTRICT; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/updated_at/alterations/alt0000000026.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/updated_at/alterations/alt0000000026.sql new file mode 100644 index 00000000..c1386f7e --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/updated_at/alterations/alt0000000026.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_buckets/columns/updated_at/alterations/alt0000000026 + + +ALTER TABLE "constructive_storage_public".platform_buckets + ALTER COLUMN updated_at DROP DEFAULT; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/updated_at/column.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/updated_at/column.sql new file mode 100644 index 00000000..f5fda3eb --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/columns/updated_at/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_buckets/columns/updated_at/column + + +ALTER TABLE "constructive_storage_public".platform_buckets + DROP COLUMN updated_at RESTRICT; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/constraints/platform_buckets_database_id_key_key/constraint.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/constraints/platform_buckets_database_id_key_key/constraint.sql new file mode 100644 index 00000000..c26f2deb --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/constraints/platform_buckets_database_id_key_key/constraint.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_buckets/constraints/platform_buckets_database_id_key_key/constraint + + +ALTER TABLE "constructive_storage_public".platform_buckets + DROP CONSTRAINT platform_buckets_database_id_key_key; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/constraints/platform_buckets_pkey/constraint.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/constraints/platform_buckets_pkey/constraint.sql new file mode 100644 index 00000000..d2ede4c5 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/constraints/platform_buckets_pkey/constraint.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_buckets/constraints/platform_buckets_pkey/constraint + + +ALTER TABLE "constructive_storage_public".platform_buckets + DROP CONSTRAINT platform_buckets_pkey; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/indexes/platform_buckets_created_at_idx.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/indexes/platform_buckets_created_at_idx.sql new file mode 100644 index 00000000..d68c1d3a --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/indexes/platform_buckets_created_at_idx.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_buckets/indexes/platform_buckets_created_at_idx + + +DROP INDEX "constructive_storage_public".platform_buckets_created_at_idx; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/indexes/platform_buckets_is_public_idx.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/indexes/platform_buckets_is_public_idx.sql new file mode 100644 index 00000000..6a00e6f3 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/indexes/platform_buckets_is_public_idx.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_buckets/indexes/platform_buckets_is_public_idx + + +DROP INDEX "constructive_storage_public".platform_buckets_is_public_idx; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/indexes/platform_buckets_updated_at_idx.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/indexes/platform_buckets_updated_at_idx.sql new file mode 100644 index 00000000..c6963b7f --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/indexes/platform_buckets_updated_at_idx.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_buckets/indexes/platform_buckets_updated_at_idx + + +DROP INDEX "constructive_storage_public".platform_buckets_updated_at_idx; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/table.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/table.sql new file mode 100644 index 00000000..464aa853 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/table.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_buckets/table + + +DROP TABLE "constructive_storage_public".platform_buckets; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/triggers/platform_buckets_immutable_fields_tg.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/triggers/platform_buckets_immutable_fields_tg.sql new file mode 100644 index 00000000..8561618c --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/triggers/platform_buckets_immutable_fields_tg.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_buckets/triggers/platform_buckets_immutable_fields_tg + + +DROP TRIGGER platform_buckets_immutable_fields_tg ON "constructive_storage_public".platform_buckets; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/triggers/timestamps_tg.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/triggers/timestamps_tg.sql new file mode 100644 index 00000000..1d7db4f2 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_buckets/triggers/timestamps_tg.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_buckets/triggers/timestamps_tg + + +DROP TRIGGER timestamps_tg ON "constructive_storage_public".platform_buckets; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/alterations/alt0000000027.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/alterations/alt0000000027.sql new file mode 100644 index 00000000..4fc2c719 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/alterations/alt0000000027.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_files/alterations/alt0000000027 + + +ALTER TABLE "constructive_storage_public".platform_files + ENABLE ROW LEVEL SECURITY; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/alterations/alt0000000028.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/alterations/alt0000000028.sql new file mode 100644 index 00000000..e4e851d1 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/alterations/alt0000000028.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_files/alterations/alt0000000028 + + +COMMENT ON TABLE "constructive_storage_public".platform_files IS NULL; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/alterations/alt0000000029.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/alterations/alt0000000029.sql new file mode 100644 index 00000000..36625521 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/alterations/alt0000000029.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_files/alterations/alt0000000029 + + +COMMENT ON TABLE "constructive_storage_public".platform_files IS NULL; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/actor_id/alterations/alt0000000030.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/actor_id/alterations/alt0000000030.sql new file mode 100644 index 00000000..c31e5348 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/actor_id/alterations/alt0000000030.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_files/columns/actor_id/alterations/alt0000000030 + + +ALTER TABLE "constructive_storage_public".platform_files + ALTER COLUMN actor_id DROP NOT NULL; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/actor_id/alterations/alt0000000031.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/actor_id/alterations/alt0000000031.sql new file mode 100644 index 00000000..576e5af5 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/actor_id/alterations/alt0000000031.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_files/columns/actor_id/alterations/alt0000000031 + + +COMMENT ON COLUMN "constructive_storage_public".platform_files.actor_id IS NULL; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/actor_id/column.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/actor_id/column.sql new file mode 100644 index 00000000..d3bbc328 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/actor_id/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_files/columns/actor_id/column + + +ALTER TABLE "constructive_storage_public".platform_files + DROP COLUMN actor_id RESTRICT; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/bucket_id/alterations/alt0000000032.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/bucket_id/alterations/alt0000000032.sql new file mode 100644 index 00000000..0ae8c267 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/bucket_id/alterations/alt0000000032.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_files/columns/bucket_id/alterations/alt0000000032 + + +ALTER TABLE "constructive_storage_public".platform_files + ALTER COLUMN bucket_id DROP NOT NULL; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/bucket_id/alterations/alt0000000033.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/bucket_id/alterations/alt0000000033.sql new file mode 100644 index 00000000..fb827747 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/bucket_id/alterations/alt0000000033.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_files/columns/bucket_id/alterations/alt0000000033 + + +COMMENT ON COLUMN "constructive_storage_public".platform_files.bucket_id IS NULL; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/bucket_id/column.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/bucket_id/column.sql new file mode 100644 index 00000000..7b761da4 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/bucket_id/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_files/columns/bucket_id/column + + +ALTER TABLE "constructive_storage_public".platform_files + DROP COLUMN bucket_id RESTRICT; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/content_hash/alterations/alt0000000034.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/content_hash/alterations/alt0000000034.sql new file mode 100644 index 00000000..8981f973 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/content_hash/alterations/alt0000000034.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_files/columns/content_hash/alterations/alt0000000034 + + +COMMENT ON COLUMN "constructive_storage_public".platform_files.content_hash IS NULL; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/content_hash/column.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/content_hash/column.sql new file mode 100644 index 00000000..02d168fe --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/content_hash/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_files/columns/content_hash/column + + +ALTER TABLE "constructive_storage_public".platform_files + DROP COLUMN content_hash RESTRICT; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/created_at/alterations/alt0000000035.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/created_at/alterations/alt0000000035.sql new file mode 100644 index 00000000..c18befbd --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/created_at/alterations/alt0000000035.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_files/columns/created_at/alterations/alt0000000035 + + +ALTER TABLE "constructive_storage_public".platform_files + ALTER COLUMN created_at DROP DEFAULT; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/created_at/column.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/created_at/column.sql new file mode 100644 index 00000000..99362510 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/created_at/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_files/columns/created_at/column + + +ALTER TABLE "constructive_storage_public".platform_files + DROP COLUMN created_at RESTRICT; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/database_id/alterations/alt0000000036.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/database_id/alterations/alt0000000036.sql new file mode 100644 index 00000000..1137a0c8 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/database_id/alterations/alt0000000036.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_files/columns/database_id/alterations/alt0000000036 + + +ALTER TABLE "constructive_storage_public".platform_files + ALTER COLUMN database_id DROP NOT NULL; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/database_id/alterations/alt0000000037.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/database_id/alterations/alt0000000037.sql new file mode 100644 index 00000000..be1fc9cd --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/database_id/alterations/alt0000000037.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_files/columns/database_id/alterations/alt0000000037 + + +COMMENT ON COLUMN "constructive_storage_public".platform_files.database_id IS NULL; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/database_id/column.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/database_id/column.sql new file mode 100644 index 00000000..2c7733ba --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/database_id/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_files/columns/database_id/column + + +ALTER TABLE "constructive_storage_public".platform_files + DROP COLUMN database_id RESTRICT; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/description/alterations/alt0000000038.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/description/alterations/alt0000000038.sql new file mode 100644 index 00000000..449335ba --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/description/alterations/alt0000000038.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_files/columns/description/alterations/alt0000000038 + + +COMMENT ON COLUMN "constructive_storage_public".platform_files.description IS NULL; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/description/column.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/description/column.sql new file mode 100644 index 00000000..fc35e69c --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/description/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_files/columns/description/column + + +ALTER TABLE "constructive_storage_public".platform_files + DROP COLUMN description RESTRICT; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/filename/alterations/alt0000000039.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/filename/alterations/alt0000000039.sql new file mode 100644 index 00000000..a04a1b92 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/filename/alterations/alt0000000039.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_files/columns/filename/alterations/alt0000000039 + + +COMMENT ON COLUMN "constructive_storage_public".platform_files.filename IS NULL; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/filename/column.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/filename/column.sql new file mode 100644 index 00000000..2b7c8d60 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/filename/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_files/columns/filename/column + + +ALTER TABLE "constructive_storage_public".platform_files + DROP COLUMN filename RESTRICT; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/id/alterations/alt0000000040.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/id/alterations/alt0000000040.sql new file mode 100644 index 00000000..c8e1956c --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/id/alterations/alt0000000040.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_files/columns/id/alterations/alt0000000040 + + +ALTER TABLE "constructive_storage_public".platform_files + ALTER COLUMN id DROP NOT NULL; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/id/alterations/alt0000000041.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/id/alterations/alt0000000041.sql new file mode 100644 index 00000000..dc3a7433 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/id/alterations/alt0000000041.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_files/columns/id/alterations/alt0000000041 + + +ALTER TABLE "constructive_storage_public".platform_files + ALTER COLUMN id DROP DEFAULT; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/id/column.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/id/column.sql new file mode 100644 index 00000000..a08ac656 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/id/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_files/columns/id/column + + +ALTER TABLE "constructive_storage_public".platform_files + DROP COLUMN id RESTRICT; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/is_public/alterations/alt0000000042.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/is_public/alterations/alt0000000042.sql new file mode 100644 index 00000000..d5cef0e8 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/is_public/alterations/alt0000000042.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_files/columns/is_public/alterations/alt0000000042 + + +ALTER TABLE "constructive_storage_public".platform_files + ALTER COLUMN is_public DROP NOT NULL; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/is_public/alterations/alt0000000043.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/is_public/alterations/alt0000000043.sql new file mode 100644 index 00000000..85106ad8 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/is_public/alterations/alt0000000043.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_files/columns/is_public/alterations/alt0000000043 + + +ALTER TABLE "constructive_storage_public".platform_files + ALTER COLUMN is_public DROP DEFAULT; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/is_public/alterations/alt0000000044.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/is_public/alterations/alt0000000044.sql new file mode 100644 index 00000000..bc37f227 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/is_public/alterations/alt0000000044.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_files/columns/is_public/alterations/alt0000000044 + + +COMMENT ON COLUMN "constructive_storage_public".platform_files.is_public IS NULL; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/is_public/column.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/is_public/column.sql new file mode 100644 index 00000000..70c5f693 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/is_public/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_files/columns/is_public/column + + +ALTER TABLE "constructive_storage_public".platform_files + DROP COLUMN is_public RESTRICT; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/key/alterations/alt0000000045.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/key/alterations/alt0000000045.sql new file mode 100644 index 00000000..06ca4629 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/key/alterations/alt0000000045.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_files/columns/key/alterations/alt0000000045 + + +ALTER TABLE "constructive_storage_public".platform_files + ALTER COLUMN key DROP NOT NULL; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/key/alterations/alt0000000046.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/key/alterations/alt0000000046.sql new file mode 100644 index 00000000..0645df6a --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/key/alterations/alt0000000046.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_files/columns/key/alterations/alt0000000046 + + +COMMENT ON COLUMN "constructive_storage_public".platform_files.key IS NULL; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/key/column.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/key/column.sql new file mode 100644 index 00000000..e5255d84 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/key/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_files/columns/key/column + + +ALTER TABLE "constructive_storage_public".platform_files + DROP COLUMN key RESTRICT; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/mime_type/alterations/alt0000000047.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/mime_type/alterations/alt0000000047.sql new file mode 100644 index 00000000..4641a2e2 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/mime_type/alterations/alt0000000047.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_files/columns/mime_type/alterations/alt0000000047 + + +ALTER TABLE "constructive_storage_public".platform_files + ALTER COLUMN mime_type DROP NOT NULL; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/mime_type/alterations/alt0000000048.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/mime_type/alterations/alt0000000048.sql new file mode 100644 index 00000000..82b366b7 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/mime_type/alterations/alt0000000048.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_files/columns/mime_type/alterations/alt0000000048 + + +COMMENT ON COLUMN "constructive_storage_public".platform_files.mime_type IS NULL; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/mime_type/column.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/mime_type/column.sql new file mode 100644 index 00000000..63705926 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/mime_type/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_files/columns/mime_type/column + + +ALTER TABLE "constructive_storage_public".platform_files + DROP COLUMN mime_type RESTRICT; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/size/alterations/alt0000000049.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/size/alterations/alt0000000049.sql new file mode 100644 index 00000000..d157617d --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/size/alterations/alt0000000049.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_files/columns/size/alterations/alt0000000049 + + +ALTER TABLE "constructive_storage_public".platform_files + ALTER COLUMN size DROP NOT NULL; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/size/alterations/alt0000000050.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/size/alterations/alt0000000050.sql new file mode 100644 index 00000000..beb58d3d --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/size/alterations/alt0000000050.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_files/columns/size/alterations/alt0000000050 + + +COMMENT ON COLUMN "constructive_storage_public".platform_files.size IS NULL; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/size/column.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/size/column.sql new file mode 100644 index 00000000..eb4a7d27 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/size/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_files/columns/size/column + + +ALTER TABLE "constructive_storage_public".platform_files + DROP COLUMN size RESTRICT; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/status/alterations/alt0000000051.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/status/alterations/alt0000000051.sql new file mode 100644 index 00000000..28c3682f --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/status/alterations/alt0000000051.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_files/columns/status/alterations/alt0000000051 + + +ALTER TABLE "constructive_storage_public".platform_files + ALTER COLUMN status DROP NOT NULL; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/status/alterations/alt0000000052.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/status/alterations/alt0000000052.sql new file mode 100644 index 00000000..3b21fc60 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/status/alterations/alt0000000052.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_files/columns/status/alterations/alt0000000052 + + +ALTER TABLE "constructive_storage_public".platform_files + ALTER COLUMN status DROP DEFAULT; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/status/alterations/alt0000000053.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/status/alterations/alt0000000053.sql new file mode 100644 index 00000000..c3cd3bc2 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/status/alterations/alt0000000053.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_files/columns/status/alterations/alt0000000053 + + +COMMENT ON COLUMN "constructive_storage_public".platform_files.status IS NULL; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/status/column.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/status/column.sql new file mode 100644 index 00000000..6c833c02 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/status/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_files/columns/status/column + + +ALTER TABLE "constructive_storage_public".platform_files + DROP COLUMN status RESTRICT; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/tags/alterations/alt0000000054.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/tags/alterations/alt0000000054.sql new file mode 100644 index 00000000..3d27c2ff --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/tags/alterations/alt0000000054.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_files/columns/tags/alterations/alt0000000054 + + +COMMENT ON COLUMN "constructive_storage_public".platform_files.tags IS NULL; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/tags/column.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/tags/column.sql new file mode 100644 index 00000000..dcbdef74 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/tags/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_files/columns/tags/column + + +ALTER TABLE "constructive_storage_public".platform_files + DROP COLUMN tags RESTRICT; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/updated_at/alterations/alt0000000055.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/updated_at/alterations/alt0000000055.sql new file mode 100644 index 00000000..b0ceaff7 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/updated_at/alterations/alt0000000055.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_files/columns/updated_at/alterations/alt0000000055 + + +ALTER TABLE "constructive_storage_public".platform_files + ALTER COLUMN updated_at DROP DEFAULT; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/updated_at/column.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/updated_at/column.sql new file mode 100644 index 00000000..5125f746 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/updated_at/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_files/columns/updated_at/column + + +ALTER TABLE "constructive_storage_public".platform_files + DROP COLUMN updated_at RESTRICT; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/upload/alterations/alt0000000056.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/upload/alterations/alt0000000056.sql new file mode 100644 index 00000000..4b7f8c7c --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/upload/alterations/alt0000000056.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_files/columns/upload/alterations/alt0000000056 + + +COMMENT ON COLUMN "constructive_storage_public".platform_files.upload IS NULL; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/upload/column.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/upload/column.sql new file mode 100644 index 00000000..920a9d7c --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/columns/upload/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_files/columns/upload/column + + +ALTER TABLE "constructive_storage_public".platform_files + DROP COLUMN upload RESTRICT; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/constraints/platform_files_bucket_id_fkey/constraint.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/constraints/platform_files_bucket_id_fkey/constraint.sql new file mode 100644 index 00000000..81575af7 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/constraints/platform_files_bucket_id_fkey/constraint.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_files/constraints/platform_files_bucket_id_fkey/constraint + + +ALTER TABLE "constructive_storage_public".platform_files + DROP CONSTRAINT platform_files_bucket_id_fkey; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/constraints/platform_files_bucket_id_key_key/constraint.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/constraints/platform_files_bucket_id_key_key/constraint.sql new file mode 100644 index 00000000..8d3dcd18 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/constraints/platform_files_bucket_id_key_key/constraint.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_files/constraints/platform_files_bucket_id_key_key/constraint + + +ALTER TABLE "constructive_storage_public".platform_files + DROP CONSTRAINT platform_files_bucket_id_key_key; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/constraints/platform_files_pkey/constraint.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/constraints/platform_files_pkey/constraint.sql new file mode 100644 index 00000000..940c8e70 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/constraints/platform_files_pkey/constraint.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_files/constraints/platform_files_pkey/constraint + + +ALTER TABLE "constructive_storage_public".platform_files + DROP CONSTRAINT platform_files_pkey; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_actor_id_idx.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_actor_id_idx.sql new file mode 100644 index 00000000..a8fcc10f --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_actor_id_idx.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_actor_id_idx + + +DROP INDEX "constructive_storage_public".platform_files_actor_id_idx; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_bucket_id_content_hash_idx.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_bucket_id_content_hash_idx.sql new file mode 100644 index 00000000..116ebbac --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_bucket_id_content_hash_idx.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_bucket_id_content_hash_idx + + +DROP INDEX "constructive_storage_public".platform_files_bucket_id_content_hash_idx; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_bucket_id_idx.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_bucket_id_idx.sql new file mode 100644 index 00000000..9a0997de --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_bucket_id_idx.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_bucket_id_idx + + +DROP INDEX "constructive_storage_public".platform_files_bucket_id_idx; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_created_at_idx.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_created_at_idx.sql new file mode 100644 index 00000000..c6ceeb75 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_created_at_idx.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_created_at_idx + + +DROP INDEX "constructive_storage_public".platform_files_created_at_idx; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_is_public_idx.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_is_public_idx.sql new file mode 100644 index 00000000..bc05b359 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_is_public_idx.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_is_public_idx + + +DROP INDEX "constructive_storage_public".platform_files_is_public_idx; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_updated_at_idx.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_updated_at_idx.sql new file mode 100644 index 00000000..9dd65ed3 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_updated_at_idx.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_updated_at_idx + + +DROP INDEX "constructive_storage_public".platform_files_updated_at_idx; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/table.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/table.sql new file mode 100644 index 00000000..303a1d2e --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/table.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_files/table + + +DROP TABLE "constructive_storage_public".platform_files; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/triggers/platform_files_gc_storage_object_tg.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/triggers/platform_files_gc_storage_object_tg.sql new file mode 100644 index 00000000..a91eb75f --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/triggers/platform_files_gc_storage_object_tg.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_files/triggers/platform_files_gc_storage_object_tg + + +DROP TRIGGER platform_files_gc_storage_object_tg ON "constructive_storage_public".platform_files; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/triggers/platform_files_immutable_fields_tg.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/triggers/platform_files_immutable_fields_tg.sql new file mode 100644 index 00000000..daa2d5e3 --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/triggers/platform_files_immutable_fields_tg.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_files/triggers/platform_files_immutable_fields_tg + + +DROP TRIGGER platform_files_immutable_fields_tg ON "constructive_storage_public".platform_files; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/triggers/platform_files_inherit_from_parent_tg.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/triggers/platform_files_inherit_from_parent_tg.sql new file mode 100644 index 00000000..81dbffce --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/triggers/platform_files_inherit_from_parent_tg.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_files/triggers/platform_files_inherit_from_parent_tg + + +DROP TRIGGER platform_files_inherit_from_parent_tg ON "constructive_storage_public".platform_files; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/triggers/timestamps_tg.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/triggers/timestamps_tg.sql new file mode 100644 index 00000000..64f83b0b --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/tables/platform_files/triggers/timestamps_tg.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_storage_public/tables/platform_files/triggers/timestamps_tg + + +DROP TRIGGER timestamps_tg ON "constructive_storage_public".platform_files; + + diff --git a/pgpm/constructive-storage/revert/schemas/constructive_storage_public/types/file_status/type.sql b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/types/file_status/type.sql new file mode 100644 index 00000000..ec5d437f --- /dev/null +++ b/pgpm/constructive-storage/revert/schemas/constructive_storage_public/types/file_status/type.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_storage_public/types/file_status/type + + +DROP TYPE "constructive_storage_public".file_status; + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_private/schema.sql b/pgpm/constructive-storage/verify/schemas/constructive_private/schema.sql new file mode 100644 index 00000000..c9b89454 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_private/schema.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_private/schema + + +SELECT verify_schema('constructive_private'); + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_private/trigger_fns/platform_buckets_immutable_fields.sql b/pgpm/constructive-storage/verify/schemas/constructive_private/trigger_fns/platform_buckets_immutable_fields.sql new file mode 100644 index 00000000..a1b95d33 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_private/trigger_fns/platform_buckets_immutable_fields.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_private/trigger_fns/platform_buckets_immutable_fields + + +SELECT verify_function('constructive_private.platform_buckets_immutable_fields'); + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_private/trigger_fns/platform_files_immutable_fields.sql b/pgpm/constructive-storage/verify/schemas/constructive_private/trigger_fns/platform_files_immutable_fields.sql new file mode 100644 index 00000000..b8913d8e --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_private/trigger_fns/platform_files_immutable_fields.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_private/trigger_fns/platform_files_immutable_fields + + +SELECT verify_function('constructive_private.platform_files_immutable_fields'); + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_private/trigger_fns/platform_files_inherit_from_parent.sql b/pgpm/constructive-storage/verify/schemas/constructive_private/trigger_fns/platform_files_inherit_from_parent.sql new file mode 100644 index 00000000..39ed3046 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_private/trigger_fns/platform_files_inherit_from_parent.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_private/trigger_fns/platform_files_inherit_from_parent + + +SELECT verify_function('constructive_private.platform_files_inherit_from_parent'); + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_private/schema.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_private/schema.sql new file mode 100644 index 00000000..edd11a73 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_private/schema.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_private/schema + + +SELECT verify_schema('constructive_storage_private'); + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_private/trigger_fns/platform_files_gc_storage_object.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_private/trigger_fns/platform_files_gc_storage_object.sql new file mode 100644 index 00000000..c846ad50 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_private/trigger_fns/platform_files_gc_storage_object.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_private/trigger_fns/platform_files_gc_storage_object + + +SELECT verify_function('constructive_storage_private.platform_files_gc_storage_object'); + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/procedures/platform_files_file_path/procedure.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/procedures/platform_files_file_path/procedure.sql new file mode 100644 index 00000000..7dfbf848 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/procedures/platform_files_file_path/procedure.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/procedures/platform_files_file_path/procedure + + +SELECT verify_function('constructive_storage_public.platform_files_file_path'); + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/procedures/platform_files_rename/procedure.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/procedures/platform_files_rename/procedure.sql new file mode 100644 index 00000000..5193d470 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/procedures/platform_files_rename/procedure.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/procedures/platform_files_rename/procedure + + +SELECT verify_function('constructive_storage_public.platform_files_rename'); + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/schema.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/schema.sql new file mode 100644 index 00000000..9f361da3 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/schema.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/schema + + +SELECT verify_schema('constructive_storage_public'); + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/alterations/alt0000000001.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/alterations/alt0000000001.sql new file mode 100644 index 00000000..55f8b367 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/alterations/alt0000000001.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_buckets/alterations/alt0000000001 + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/alterations/alt0000000002.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/alterations/alt0000000002.sql new file mode 100644 index 00000000..b0b5c71c --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/alterations/alt0000000002.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_buckets/alterations/alt0000000002 + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/alterations/alt0000000003.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/alterations/alt0000000003.sql new file mode 100644 index 00000000..680ebfe4 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/alterations/alt0000000003.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_buckets/alterations/alt0000000003 + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/actor_id/alterations/alt0000000004.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/actor_id/alterations/alt0000000004.sql new file mode 100644 index 00000000..f079d247 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/actor_id/alterations/alt0000000004.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_buckets/columns/actor_id/alterations/alt0000000004 + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/actor_id/alterations/alt0000000005.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/actor_id/alterations/alt0000000005.sql new file mode 100644 index 00000000..830af56d --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/actor_id/alterations/alt0000000005.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_buckets/columns/actor_id/alterations/alt0000000005 + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/actor_id/column.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/actor_id/column.sql new file mode 100644 index 00000000..18a2658d --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/actor_id/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_buckets/columns/actor_id/column + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/allow_custom_keys/alterations/alt0000000006.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/allow_custom_keys/alterations/alt0000000006.sql new file mode 100644 index 00000000..6d4bf3f4 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/allow_custom_keys/alterations/alt0000000006.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_buckets/columns/allow_custom_keys/alterations/alt0000000006 + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/allow_custom_keys/alterations/alt0000000007.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/allow_custom_keys/alterations/alt0000000007.sql new file mode 100644 index 00000000..10ce132a --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/allow_custom_keys/alterations/alt0000000007.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_buckets/columns/allow_custom_keys/alterations/alt0000000007 + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/allow_custom_keys/alterations/alt0000000008.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/allow_custom_keys/alterations/alt0000000008.sql new file mode 100644 index 00000000..218bd7ac --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/allow_custom_keys/alterations/alt0000000008.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_buckets/columns/allow_custom_keys/alterations/alt0000000008 + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/allow_custom_keys/column.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/allow_custom_keys/column.sql new file mode 100644 index 00000000..ee00195c --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/allow_custom_keys/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_buckets/columns/allow_custom_keys/column + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/allowed_mime_types/alterations/alt0000000009.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/allowed_mime_types/alterations/alt0000000009.sql new file mode 100644 index 00000000..bb9ffa82 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/allowed_mime_types/alterations/alt0000000009.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_buckets/columns/allowed_mime_types/alterations/alt0000000009 + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/allowed_mime_types/column.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/allowed_mime_types/column.sql new file mode 100644 index 00000000..b079d071 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/allowed_mime_types/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_buckets/columns/allowed_mime_types/column + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/allowed_origins/alterations/alt0000000010.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/allowed_origins/alterations/alt0000000010.sql new file mode 100644 index 00000000..9e594399 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/allowed_origins/alterations/alt0000000010.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_buckets/columns/allowed_origins/alterations/alt0000000010 + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/allowed_origins/column.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/allowed_origins/column.sql new file mode 100644 index 00000000..f4385339 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/allowed_origins/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_buckets/columns/allowed_origins/column + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/created_at/alterations/alt0000000011.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/created_at/alterations/alt0000000011.sql new file mode 100644 index 00000000..f9756603 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/created_at/alterations/alt0000000011.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_buckets/columns/created_at/alterations/alt0000000011 + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/created_at/column.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/created_at/column.sql new file mode 100644 index 00000000..bfb7e14f --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/created_at/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_buckets/columns/created_at/column + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/database_id/alterations/alt0000000012.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/database_id/alterations/alt0000000012.sql new file mode 100644 index 00000000..1ba9ec05 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/database_id/alterations/alt0000000012.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_buckets/columns/database_id/alterations/alt0000000012 + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/database_id/alterations/alt0000000013.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/database_id/alterations/alt0000000013.sql new file mode 100644 index 00000000..39f45e97 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/database_id/alterations/alt0000000013.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_buckets/columns/database_id/alterations/alt0000000013 + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/database_id/column.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/database_id/column.sql new file mode 100644 index 00000000..e632225e --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/database_id/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_buckets/columns/database_id/column + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/description/alterations/alt0000000014.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/description/alterations/alt0000000014.sql new file mode 100644 index 00000000..c953bbf9 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/description/alterations/alt0000000014.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_buckets/columns/description/alterations/alt0000000014 + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/description/column.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/description/column.sql new file mode 100644 index 00000000..95acf0e1 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/description/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_buckets/columns/description/column + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/id/alterations/alt0000000015.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/id/alterations/alt0000000015.sql new file mode 100644 index 00000000..997aabbb --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/id/alterations/alt0000000015.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_buckets/columns/id/alterations/alt0000000015 + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/id/alterations/alt0000000016.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/id/alterations/alt0000000016.sql new file mode 100644 index 00000000..4fe1dab4 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/id/alterations/alt0000000016.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_buckets/columns/id/alterations/alt0000000016 + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/id/column.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/id/column.sql new file mode 100644 index 00000000..fbc8e037 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/id/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_buckets/columns/id/column + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/is_public/alterations/alt0000000017.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/is_public/alterations/alt0000000017.sql new file mode 100644 index 00000000..a91c2b44 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/is_public/alterations/alt0000000017.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_buckets/columns/is_public/alterations/alt0000000017 + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/is_public/alterations/alt0000000018.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/is_public/alterations/alt0000000018.sql new file mode 100644 index 00000000..cd720ab1 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/is_public/alterations/alt0000000018.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_buckets/columns/is_public/alterations/alt0000000018 + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/is_public/alterations/alt0000000019.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/is_public/alterations/alt0000000019.sql new file mode 100644 index 00000000..7a3e2108 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/is_public/alterations/alt0000000019.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_buckets/columns/is_public/alterations/alt0000000019 + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/is_public/column.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/is_public/column.sql new file mode 100644 index 00000000..c34b882a --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/is_public/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_buckets/columns/is_public/column + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/key/alterations/alt0000000020.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/key/alterations/alt0000000020.sql new file mode 100644 index 00000000..c1895f18 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/key/alterations/alt0000000020.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_buckets/columns/key/alterations/alt0000000020 + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/key/alterations/alt0000000021.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/key/alterations/alt0000000021.sql new file mode 100644 index 00000000..8cbc3506 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/key/alterations/alt0000000021.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_buckets/columns/key/alterations/alt0000000021 + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/key/column.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/key/column.sql new file mode 100644 index 00000000..15cfbe09 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/key/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_buckets/columns/key/column + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/max_file_size/alterations/alt0000000022.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/max_file_size/alterations/alt0000000022.sql new file mode 100644 index 00000000..c5d33f52 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/max_file_size/alterations/alt0000000022.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_buckets/columns/max_file_size/alterations/alt0000000022 + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/max_file_size/column.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/max_file_size/column.sql new file mode 100644 index 00000000..cb90cae4 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/max_file_size/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_buckets/columns/max_file_size/column + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/type/alterations/alt0000000023.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/type/alterations/alt0000000023.sql new file mode 100644 index 00000000..890d772f --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/type/alterations/alt0000000023.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_buckets/columns/type/alterations/alt0000000023 + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/type/alterations/alt0000000024.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/type/alterations/alt0000000024.sql new file mode 100644 index 00000000..d57e9828 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/type/alterations/alt0000000024.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_buckets/columns/type/alterations/alt0000000024 + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/type/alterations/alt0000000025.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/type/alterations/alt0000000025.sql new file mode 100644 index 00000000..fff06439 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/type/alterations/alt0000000025.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_buckets/columns/type/alterations/alt0000000025 + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/type/column.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/type/column.sql new file mode 100644 index 00000000..3db710e2 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/type/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_buckets/columns/type/column + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/updated_at/alterations/alt0000000026.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/updated_at/alterations/alt0000000026.sql new file mode 100644 index 00000000..39b58ddf --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/updated_at/alterations/alt0000000026.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_buckets/columns/updated_at/alterations/alt0000000026 + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/updated_at/column.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/updated_at/column.sql new file mode 100644 index 00000000..144188dd --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/columns/updated_at/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_buckets/columns/updated_at/column + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/constraints/platform_buckets_database_id_key_key/constraint.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/constraints/platform_buckets_database_id_key_key/constraint.sql new file mode 100644 index 00000000..c5951a0e --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/constraints/platform_buckets_database_id_key_key/constraint.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_buckets/constraints/platform_buckets_database_id_key_key/constraint + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/constraints/platform_buckets_pkey/constraint.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/constraints/platform_buckets_pkey/constraint.sql new file mode 100644 index 00000000..040de2de --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/constraints/platform_buckets_pkey/constraint.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_buckets/constraints/platform_buckets_pkey/constraint + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/indexes/platform_buckets_created_at_idx.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/indexes/platform_buckets_created_at_idx.sql new file mode 100644 index 00000000..5836315c --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/indexes/platform_buckets_created_at_idx.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_buckets/indexes/platform_buckets_created_at_idx + + +SELECT verify_index('constructive_storage_public.platform_buckets', 'platform_buckets_created_at_idx'); + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/indexes/platform_buckets_is_public_idx.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/indexes/platform_buckets_is_public_idx.sql new file mode 100644 index 00000000..e4c0e8bb --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/indexes/platform_buckets_is_public_idx.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_buckets/indexes/platform_buckets_is_public_idx + + +SELECT verify_index('constructive_storage_public.platform_buckets', 'platform_buckets_is_public_idx'); + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/indexes/platform_buckets_updated_at_idx.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/indexes/platform_buckets_updated_at_idx.sql new file mode 100644 index 00000000..8df5b710 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/indexes/platform_buckets_updated_at_idx.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_buckets/indexes/platform_buckets_updated_at_idx + + +SELECT verify_index('constructive_storage_public.platform_buckets', 'platform_buckets_updated_at_idx'); + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/table.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/table.sql new file mode 100644 index 00000000..157a8c50 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/table.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_buckets/table + + +SELECT verify_table('constructive_storage_public.platform_buckets'); + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/triggers/platform_buckets_immutable_fields_tg.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/triggers/platform_buckets_immutable_fields_tg.sql new file mode 100644 index 00000000..70606579 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/triggers/platform_buckets_immutable_fields_tg.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_buckets/triggers/platform_buckets_immutable_fields_tg + + +SELECT verify_trigger('constructive_storage_public.platform_buckets_immutable_fields_tg'); + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/triggers/timestamps_tg.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/triggers/timestamps_tg.sql new file mode 100644 index 00000000..4fd4a169 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_buckets/triggers/timestamps_tg.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_buckets/triggers/timestamps_tg + + +SELECT verify_trigger('constructive_storage_public.timestamps_tg'); + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/alterations/alt0000000027.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/alterations/alt0000000027.sql new file mode 100644 index 00000000..cc80e915 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/alterations/alt0000000027.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_files/alterations/alt0000000027 + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/alterations/alt0000000028.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/alterations/alt0000000028.sql new file mode 100644 index 00000000..bf568437 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/alterations/alt0000000028.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_files/alterations/alt0000000028 + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/alterations/alt0000000029.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/alterations/alt0000000029.sql new file mode 100644 index 00000000..b6526f1a --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/alterations/alt0000000029.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_files/alterations/alt0000000029 + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/actor_id/alterations/alt0000000030.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/actor_id/alterations/alt0000000030.sql new file mode 100644 index 00000000..d76f40e4 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/actor_id/alterations/alt0000000030.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_files/columns/actor_id/alterations/alt0000000030 + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/actor_id/alterations/alt0000000031.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/actor_id/alterations/alt0000000031.sql new file mode 100644 index 00000000..e271877d --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/actor_id/alterations/alt0000000031.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_files/columns/actor_id/alterations/alt0000000031 + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/actor_id/column.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/actor_id/column.sql new file mode 100644 index 00000000..f1bf7807 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/actor_id/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_files/columns/actor_id/column + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/bucket_id/alterations/alt0000000032.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/bucket_id/alterations/alt0000000032.sql new file mode 100644 index 00000000..be466c73 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/bucket_id/alterations/alt0000000032.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_files/columns/bucket_id/alterations/alt0000000032 + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/bucket_id/alterations/alt0000000033.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/bucket_id/alterations/alt0000000033.sql new file mode 100644 index 00000000..e2e5b3bc --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/bucket_id/alterations/alt0000000033.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_files/columns/bucket_id/alterations/alt0000000033 + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/bucket_id/column.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/bucket_id/column.sql new file mode 100644 index 00000000..9b45fa31 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/bucket_id/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_files/columns/bucket_id/column + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/content_hash/alterations/alt0000000034.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/content_hash/alterations/alt0000000034.sql new file mode 100644 index 00000000..66f9d073 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/content_hash/alterations/alt0000000034.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_files/columns/content_hash/alterations/alt0000000034 + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/content_hash/column.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/content_hash/column.sql new file mode 100644 index 00000000..055841e2 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/content_hash/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_files/columns/content_hash/column + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/created_at/alterations/alt0000000035.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/created_at/alterations/alt0000000035.sql new file mode 100644 index 00000000..a95f05d8 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/created_at/alterations/alt0000000035.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_files/columns/created_at/alterations/alt0000000035 + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/created_at/column.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/created_at/column.sql new file mode 100644 index 00000000..6c784095 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/created_at/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_files/columns/created_at/column + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/database_id/alterations/alt0000000036.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/database_id/alterations/alt0000000036.sql new file mode 100644 index 00000000..da490b05 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/database_id/alterations/alt0000000036.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_files/columns/database_id/alterations/alt0000000036 + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/database_id/alterations/alt0000000037.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/database_id/alterations/alt0000000037.sql new file mode 100644 index 00000000..739334f0 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/database_id/alterations/alt0000000037.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_files/columns/database_id/alterations/alt0000000037 + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/database_id/column.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/database_id/column.sql new file mode 100644 index 00000000..f085c2a9 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/database_id/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_files/columns/database_id/column + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/description/alterations/alt0000000038.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/description/alterations/alt0000000038.sql new file mode 100644 index 00000000..42045789 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/description/alterations/alt0000000038.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_files/columns/description/alterations/alt0000000038 + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/description/column.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/description/column.sql new file mode 100644 index 00000000..55673bc6 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/description/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_files/columns/description/column + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/filename/alterations/alt0000000039.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/filename/alterations/alt0000000039.sql new file mode 100644 index 00000000..95a9a4b9 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/filename/alterations/alt0000000039.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_files/columns/filename/alterations/alt0000000039 + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/filename/column.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/filename/column.sql new file mode 100644 index 00000000..9622b8de --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/filename/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_files/columns/filename/column + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/id/alterations/alt0000000040.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/id/alterations/alt0000000040.sql new file mode 100644 index 00000000..522d9076 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/id/alterations/alt0000000040.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_files/columns/id/alterations/alt0000000040 + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/id/alterations/alt0000000041.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/id/alterations/alt0000000041.sql new file mode 100644 index 00000000..ebcb0040 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/id/alterations/alt0000000041.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_files/columns/id/alterations/alt0000000041 + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/id/column.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/id/column.sql new file mode 100644 index 00000000..811f0891 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/id/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_files/columns/id/column + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/is_public/alterations/alt0000000042.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/is_public/alterations/alt0000000042.sql new file mode 100644 index 00000000..65fdfbd0 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/is_public/alterations/alt0000000042.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_files/columns/is_public/alterations/alt0000000042 + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/is_public/alterations/alt0000000043.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/is_public/alterations/alt0000000043.sql new file mode 100644 index 00000000..9d6eb7c0 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/is_public/alterations/alt0000000043.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_files/columns/is_public/alterations/alt0000000043 + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/is_public/alterations/alt0000000044.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/is_public/alterations/alt0000000044.sql new file mode 100644 index 00000000..2734ce3c --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/is_public/alterations/alt0000000044.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_files/columns/is_public/alterations/alt0000000044 + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/is_public/column.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/is_public/column.sql new file mode 100644 index 00000000..436ec6f6 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/is_public/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_files/columns/is_public/column + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/key/alterations/alt0000000045.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/key/alterations/alt0000000045.sql new file mode 100644 index 00000000..446f2be7 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/key/alterations/alt0000000045.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_files/columns/key/alterations/alt0000000045 + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/key/alterations/alt0000000046.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/key/alterations/alt0000000046.sql new file mode 100644 index 00000000..1f131ffc --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/key/alterations/alt0000000046.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_files/columns/key/alterations/alt0000000046 + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/key/column.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/key/column.sql new file mode 100644 index 00000000..29454e82 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/key/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_files/columns/key/column + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/mime_type/alterations/alt0000000047.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/mime_type/alterations/alt0000000047.sql new file mode 100644 index 00000000..ce42be09 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/mime_type/alterations/alt0000000047.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_files/columns/mime_type/alterations/alt0000000047 + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/mime_type/alterations/alt0000000048.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/mime_type/alterations/alt0000000048.sql new file mode 100644 index 00000000..7765814b --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/mime_type/alterations/alt0000000048.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_files/columns/mime_type/alterations/alt0000000048 + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/mime_type/column.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/mime_type/column.sql new file mode 100644 index 00000000..37bb5968 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/mime_type/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_files/columns/mime_type/column + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/size/alterations/alt0000000049.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/size/alterations/alt0000000049.sql new file mode 100644 index 00000000..76c7981e --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/size/alterations/alt0000000049.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_files/columns/size/alterations/alt0000000049 + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/size/alterations/alt0000000050.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/size/alterations/alt0000000050.sql new file mode 100644 index 00000000..448bc7aa --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/size/alterations/alt0000000050.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_files/columns/size/alterations/alt0000000050 + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/size/column.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/size/column.sql new file mode 100644 index 00000000..81779859 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/size/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_files/columns/size/column + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/status/alterations/alt0000000051.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/status/alterations/alt0000000051.sql new file mode 100644 index 00000000..cf0c76de --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/status/alterations/alt0000000051.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_files/columns/status/alterations/alt0000000051 + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/status/alterations/alt0000000052.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/status/alterations/alt0000000052.sql new file mode 100644 index 00000000..5fa71306 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/status/alterations/alt0000000052.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_files/columns/status/alterations/alt0000000052 + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/status/alterations/alt0000000053.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/status/alterations/alt0000000053.sql new file mode 100644 index 00000000..7fdbbf33 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/status/alterations/alt0000000053.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_files/columns/status/alterations/alt0000000053 + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/status/column.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/status/column.sql new file mode 100644 index 00000000..a95974ab --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/status/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_files/columns/status/column + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/tags/alterations/alt0000000054.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/tags/alterations/alt0000000054.sql new file mode 100644 index 00000000..d2f70c08 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/tags/alterations/alt0000000054.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_files/columns/tags/alterations/alt0000000054 + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/tags/column.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/tags/column.sql new file mode 100644 index 00000000..659aa05e --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/tags/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_files/columns/tags/column + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/updated_at/alterations/alt0000000055.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/updated_at/alterations/alt0000000055.sql new file mode 100644 index 00000000..c8b9d554 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/updated_at/alterations/alt0000000055.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_files/columns/updated_at/alterations/alt0000000055 + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/updated_at/column.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/updated_at/column.sql new file mode 100644 index 00000000..3505aa00 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/updated_at/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_files/columns/updated_at/column + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/upload/alterations/alt0000000056.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/upload/alterations/alt0000000056.sql new file mode 100644 index 00000000..9d51c9a1 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/upload/alterations/alt0000000056.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_files/columns/upload/alterations/alt0000000056 + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/upload/column.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/upload/column.sql new file mode 100644 index 00000000..690ef6f9 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/columns/upload/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_files/columns/upload/column + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/constraints/platform_files_bucket_id_fkey/constraint.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/constraints/platform_files_bucket_id_fkey/constraint.sql new file mode 100644 index 00000000..ab60d916 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/constraints/platform_files_bucket_id_fkey/constraint.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_files/constraints/platform_files_bucket_id_fkey/constraint + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/constraints/platform_files_bucket_id_key_key/constraint.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/constraints/platform_files_bucket_id_key_key/constraint.sql new file mode 100644 index 00000000..38e312ab --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/constraints/platform_files_bucket_id_key_key/constraint.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_files/constraints/platform_files_bucket_id_key_key/constraint + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/constraints/platform_files_pkey/constraint.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/constraints/platform_files_pkey/constraint.sql new file mode 100644 index 00000000..c89c6c70 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/constraints/platform_files_pkey/constraint.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_files/constraints/platform_files_pkey/constraint + + + + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_actor_id_idx.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_actor_id_idx.sql new file mode 100644 index 00000000..991a0317 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_actor_id_idx.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_actor_id_idx + + +SELECT verify_index('constructive_storage_public.platform_files', 'platform_files_actor_id_idx'); + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_bucket_id_content_hash_idx.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_bucket_id_content_hash_idx.sql new file mode 100644 index 00000000..239d986f --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_bucket_id_content_hash_idx.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_bucket_id_content_hash_idx + + +SELECT verify_index('constructive_storage_public.platform_files', 'platform_files_bucket_id_content_hash_idx'); + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_bucket_id_idx.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_bucket_id_idx.sql new file mode 100644 index 00000000..b95d3d39 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_bucket_id_idx.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_bucket_id_idx + + +SELECT verify_index('constructive_storage_public.platform_files', 'platform_files_bucket_id_idx'); + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_created_at_idx.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_created_at_idx.sql new file mode 100644 index 00000000..35cb6cb5 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_created_at_idx.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_created_at_idx + + +SELECT verify_index('constructive_storage_public.platform_files', 'platform_files_created_at_idx'); + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_is_public_idx.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_is_public_idx.sql new file mode 100644 index 00000000..a8828be5 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_is_public_idx.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_is_public_idx + + +SELECT verify_index('constructive_storage_public.platform_files', 'platform_files_is_public_idx'); + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_updated_at_idx.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_updated_at_idx.sql new file mode 100644 index 00000000..688f7ce1 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_updated_at_idx.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_files/indexes/platform_files_updated_at_idx + + +SELECT verify_index('constructive_storage_public.platform_files', 'platform_files_updated_at_idx'); + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/table.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/table.sql new file mode 100644 index 00000000..66239650 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/table.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_files/table + + +SELECT verify_table('constructive_storage_public.platform_files'); + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/triggers/platform_files_gc_storage_object_tg.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/triggers/platform_files_gc_storage_object_tg.sql new file mode 100644 index 00000000..53757a27 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/triggers/platform_files_gc_storage_object_tg.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_files/triggers/platform_files_gc_storage_object_tg + + +SELECT verify_trigger('constructive_storage_public.platform_files_gc_storage_object_tg'); + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/triggers/platform_files_immutable_fields_tg.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/triggers/platform_files_immutable_fields_tg.sql new file mode 100644 index 00000000..9fe91cf1 --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/triggers/platform_files_immutable_fields_tg.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_files/triggers/platform_files_immutable_fields_tg + + +SELECT verify_trigger('constructive_storage_public.platform_files_immutable_fields_tg'); + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/triggers/platform_files_inherit_from_parent_tg.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/triggers/platform_files_inherit_from_parent_tg.sql new file mode 100644 index 00000000..dd8ab06d --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/triggers/platform_files_inherit_from_parent_tg.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_files/triggers/platform_files_inherit_from_parent_tg + + +SELECT verify_trigger('constructive_storage_public.platform_files_inherit_from_parent_tg'); + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/triggers/timestamps_tg.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/triggers/timestamps_tg.sql new file mode 100644 index 00000000..d554117b --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/tables/platform_files/triggers/timestamps_tg.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/tables/platform_files/triggers/timestamps_tg + + +SELECT verify_trigger('constructive_storage_public.timestamps_tg'); + + diff --git a/pgpm/constructive-storage/verify/schemas/constructive_storage_public/types/file_status/type.sql b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/types/file_status/type.sql new file mode 100644 index 00000000..e51354bb --- /dev/null +++ b/pgpm/constructive-storage/verify/schemas/constructive_storage_public/types/file_status/type.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_storage_public/types/file_status/type + + + + + diff --git a/pgpm/constructive-store/.npmignore b/pgpm/constructive-store/.npmignore new file mode 100644 index 00000000..cf8a4554 --- /dev/null +++ b/pgpm/constructive-store/.npmignore @@ -0,0 +1,2 @@ +__tests__ +jest.config.js diff --git a/pgpm/constructive-store/Makefile b/pgpm/constructive-store/Makefile new file mode 100644 index 00000000..2ff6819e --- /dev/null +++ b/pgpm/constructive-store/Makefile @@ -0,0 +1,6 @@ +EXTENSION = constructive-store +DATA = sql/constructive-store--0.0.1.sql + +PG_CONFIG = pg_config +PGXS := $(shell $(PG_CONFIG) --pgxs) +include $(PGXS) diff --git a/pgpm/constructive-store/constructive-store.control b/pgpm/constructive-store/constructive-store.control new file mode 100644 index 00000000..2a6ba792 --- /dev/null +++ b/pgpm/constructive-store/constructive-store.control @@ -0,0 +1,5 @@ +# constructive-store extension +comment = 'constructive-store module' +default_version = '0.0.1' +relocatable = false +requires = 'plpgsql,pgpm-inflection,pgpm-stamps,pgcrypto,constructive-infra' diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/procedures/org_secrets_get/procedure.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/procedures/org_secrets_get/procedure.sql new file mode 100644 index 00000000..0f432118 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/procedures/org_secrets_get/procedure.sql @@ -0,0 +1,37 @@ +-- Deploy: schemas/constructive_store_private/procedures/org_secrets_get/procedure +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/org_secrets/table + + +CREATE FUNCTION "constructive_store_private".org_secrets_get( + IN owner_id uuid, + IN secret_name text, + IN default_value text DEFAULT NULL, + IN secret_namespace text DEFAULT 'default' +) RETURNS text AS $_PGFN_$ +DECLARE + v_namespace_id uuid; + v_secret "constructive_store_private".org_secrets; +BEGIN + SELECT ns.id + FROM "constructive_infra_public".platform_namespaces AS ns + WHERE + ns.name = org_secrets_get.secret_namespace INTO v_namespace_id; + SELECT * + FROM "constructive_store_private".org_secrets AS s + WHERE + (s.owner_id = org_secrets_get.owner_id AND s.namespace_id = v_namespace_id) AND s.name = org_secrets_get.secret_name INTO v_secret; + IF NOT (FOUND) OR v_secret IS NULL THEN + RETURN org_secrets_get.default_value; + END IF; + IF v_secret.algo = 'crypt' THEN + RETURN pg_catalog.convert_from(v_secret.value, 'SQL_ASCII'); + ELSIF v_secret.algo = 'pgp' THEN + RETURN pg_catalog.convert_from(pg_catalog.decode(public.pgp_sym_decrypt(v_secret.value, v_secret.key_id::text), 'hex'), 'SQL_ASCII'); + END IF; + RETURN pg_catalog.convert_from(v_secret.value, 'SQL_ASCII'); +END; +$_PGFN_$ LANGUAGE plpgsql STABLE; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/procedures/org_secrets_verify/procedure.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/procedures/org_secrets_verify/procedure.sql new file mode 100644 index 00000000..70e3f882 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/procedures/org_secrets_verify/procedure.sql @@ -0,0 +1,36 @@ +-- Deploy: schemas/constructive_store_private/procedures/org_secrets_verify/procedure +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/org_secrets/table + + +CREATE FUNCTION "constructive_store_private".org_secrets_verify( + IN owner_id uuid, + IN secret_name text, + IN value text, + IN secret_namespace text DEFAULT 'default' +) RETURNS boolean AS $_PGFN_$ +DECLARE + v_namespace_id uuid; + v_secret_text text; + v_secret "constructive_store_private".org_secrets; +BEGIN + SELECT ns.id + FROM "constructive_infra_public".platform_namespaces AS ns + WHERE + ns.name = org_secrets_verify.secret_namespace INTO v_namespace_id; + SELECT "constructive_store_private".org_secrets_get(org_secrets_verify.owner_id, org_secrets_verify.secret_name, NULL::text, org_secrets_verify.secret_namespace) INTO v_secret_text; + SELECT * + FROM "constructive_store_private".org_secrets AS s + WHERE + (s.owner_id = org_secrets_verify.owner_id AND s.namespace_id = v_namespace_id) AND s.name = org_secrets_verify.secret_name INTO v_secret; + IF v_secret.algo = 'crypt' THEN + RETURN v_secret_text = public.crypt(org_secrets_verify.value::bytea::text, v_secret_text); + ELSIF v_secret.algo = 'pgp' THEN + RETURN org_secrets_verify.value = v_secret_text; + END IF; + RETURN org_secrets_verify.value = v_secret_text; +END; +$_PGFN_$ LANGUAGE plpgsql STABLE; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/procedures/platform_config_get/procedure.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/procedures/platform_config_get/procedure.sql new file mode 100644 index 00000000..57ad97ca --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/procedures/platform_config_get/procedure.sql @@ -0,0 +1,32 @@ +-- Deploy: schemas/constructive_store_private/procedures/platform_config_get/procedure +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_public/tables/platform_config/table +-- requires: schemas/constructive_infra_public/tables/platform_namespaces/table + + +CREATE FUNCTION "constructive_store_private".platform_config_get( + IN config_name text, + IN default_value text DEFAULT NULL, + IN config_namespace text DEFAULT 'default' +) RETURNS text AS $_PGFN_$ +DECLARE + v_namespace_id uuid; + v_value text; +BEGIN + SELECT ns.id + FROM "constructive_infra_public".platform_namespaces AS ns + WHERE + ns.name = platform_config_get.config_namespace INTO v_namespace_id; + SELECT c.value + FROM "constructive_store_public".platform_config AS c + WHERE + c.namespace_id = v_namespace_id AND c.name = platform_config_get.config_name INTO v_value; + IF NOT (FOUND) OR v_value IS NULL THEN + RETURN platform_config_get.default_value; + END IF; + RETURN v_value; +END; +$_PGFN_$ LANGUAGE plpgsql STABLE SECURITY DEFINER; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/procedures/platform_secrets_get/procedure.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/procedures/platform_secrets_get/procedure.sql new file mode 100644 index 00000000..b9d59c66 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/procedures/platform_secrets_get/procedure.sql @@ -0,0 +1,36 @@ +-- Deploy: schemas/constructive_store_private/procedures/platform_secrets_get/procedure +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/platform_secrets/table + + +CREATE FUNCTION "constructive_store_private".platform_secrets_get( + IN secret_name text, + IN default_value text DEFAULT NULL, + IN secret_namespace text DEFAULT 'default' +) RETURNS text AS $_PGFN_$ +DECLARE + v_namespace_id uuid; + v_secret "constructive_store_private".platform_secrets; +BEGIN + SELECT ns.id + FROM "constructive_infra_public".platform_namespaces AS ns + WHERE + ns.name = platform_secrets_get.secret_namespace INTO v_namespace_id; + SELECT * + FROM "constructive_store_private".platform_secrets AS s + WHERE + s.namespace_id = v_namespace_id AND s.name = platform_secrets_get.secret_name INTO v_secret; + IF NOT (FOUND) OR v_secret IS NULL THEN + RETURN platform_secrets_get.default_value; + END IF; + IF v_secret.algo = 'crypt' THEN + RETURN pg_catalog.convert_from(v_secret.value, 'SQL_ASCII'); + ELSIF v_secret.algo = 'pgp' THEN + RETURN pg_catalog.convert_from(pg_catalog.decode(public.pgp_sym_decrypt(v_secret.value, v_secret.key_id::text), 'hex'), 'SQL_ASCII'); + END IF; + RETURN pg_catalog.convert_from(v_secret.value, 'SQL_ASCII'); +END; +$_PGFN_$ LANGUAGE plpgsql STABLE; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/procedures/platform_secrets_verify/procedure.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/procedures/platform_secrets_verify/procedure.sql new file mode 100644 index 00000000..211423e9 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/procedures/platform_secrets_verify/procedure.sql @@ -0,0 +1,35 @@ +-- Deploy: schemas/constructive_store_private/procedures/platform_secrets_verify/procedure +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/platform_secrets/table + + +CREATE FUNCTION "constructive_store_private".platform_secrets_verify( + IN secret_name text, + IN value text, + IN secret_namespace text DEFAULT 'default' +) RETURNS boolean AS $_PGFN_$ +DECLARE + v_namespace_id uuid; + v_secret_text text; + v_secret "constructive_store_private".platform_secrets; +BEGIN + SELECT ns.id + FROM "constructive_infra_public".platform_namespaces AS ns + WHERE + ns.name = platform_secrets_verify.secret_namespace INTO v_namespace_id; + SELECT "constructive_store_private".platform_secrets_get(platform_secrets_verify.secret_name, NULL::text, platform_secrets_verify.secret_namespace) INTO v_secret_text; + SELECT * + FROM "constructive_store_private".platform_secrets AS s + WHERE + s.namespace_id = v_namespace_id AND s.name = platform_secrets_verify.secret_name INTO v_secret; + IF v_secret.algo = 'crypt' THEN + RETURN v_secret_text = public.crypt(platform_secrets_verify.value::bytea::text, v_secret_text); + ELSIF v_secret.algo = 'pgp' THEN + RETURN platform_secrets_verify.value = v_secret_text; + END IF; + RETURN platform_secrets_verify.value = v_secret_text; +END; +$_PGFN_$ LANGUAGE plpgsql STABLE; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/procedures/user_secrets_del/procedure.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/procedures/user_secrets_del/procedure.sql new file mode 100644 index 00000000..3c09f44c --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/procedures/user_secrets_del/procedure.sql @@ -0,0 +1,18 @@ +-- Deploy: schemas/constructive_store_private/procedures/user_secrets_del/procedure +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/user_secrets/table + + +CREATE FUNCTION "constructive_store_private".user_secrets_del( + IN owner_id uuid, + IN secret_name text +) RETURNS void AS $_PGFN_$ +BEGIN + DELETE FROM "constructive_store_private".user_secrets AS s + WHERE + s.owner_id = user_secrets_del.owner_id AND s.name = user_secrets_del.secret_name; +END; +$_PGFN_$ LANGUAGE plpgsql VOLATILE SECURITY DEFINER; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/procedures/user_secrets_get/procedure.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/procedures/user_secrets_get/procedure.sql new file mode 100644 index 00000000..28f1df62 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/procedures/user_secrets_get/procedure.sql @@ -0,0 +1,31 @@ +-- Deploy: schemas/constructive_store_private/procedures/user_secrets_get/procedure +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/user_secrets/table + + +CREATE FUNCTION "constructive_store_private".user_secrets_get( + IN owner_id uuid, + IN secret_name text, + IN default_value text DEFAULT NULL +) RETURNS text AS $_PGFN_$ +DECLARE + v_secret "constructive_store_private".user_secrets; +BEGIN + SELECT * + FROM "constructive_store_private".user_secrets AS s + WHERE + s.name = user_secrets_get.secret_name AND s.owner_id = user_secrets_get.owner_id INTO v_secret; + IF NOT (FOUND) OR v_secret IS NULL THEN + RETURN user_secrets_get.default_value; + END IF; + IF v_secret.algo = 'crypt' THEN + RETURN pg_catalog.convert_from(v_secret.value, 'SQL_ASCII'); + ELSIF v_secret.algo = 'pgp' THEN + RETURN pg_catalog.convert_from(pg_catalog.decode(public.pgp_sym_decrypt(v_secret.value, v_secret.owner_id::text), 'hex'), 'SQL_ASCII'); + END IF; + RETURN pg_catalog.convert_from(v_secret.value, 'SQL_ASCII'); +END; +$_PGFN_$ LANGUAGE plpgsql STABLE; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/procedures/user_secrets_set/procedure.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/procedures/user_secrets_set/procedure.sql new file mode 100644 index 00000000..39c5ad96 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/procedures/user_secrets_set/procedure.sql @@ -0,0 +1,28 @@ +-- Deploy: schemas/constructive_store_private/procedures/user_secrets_set/procedure +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/user_secrets/table + + +CREATE FUNCTION "constructive_store_private".user_secrets_set( + IN user_id uuid, + IN secret_name text, + IN secret_value text, + IN algo text DEFAULT 'pgp' +) RETURNS boolean AS $_PGFN_$ +BEGIN + INSERT INTO "constructive_store_private".user_secrets ( + owner_id, + name, + value, + algo + ) + VALUES + (user_secrets_set.user_id, user_secrets_set.secret_name, user_secrets_set.secret_value::bytea, user_secrets_set.algo) + ON CONFLICT (owner_id, name) DO UPDATE SET + value = user_secrets_set.secret_value::bytea, algo = EXCLUDED.algo; + RETURN true; +END; +$_PGFN_$ LANGUAGE plpgsql VOLATILE; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/procedures/user_secrets_verify/procedure.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/procedures/user_secrets_verify/procedure.sql new file mode 100644 index 00000000..2e52d7c1 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/procedures/user_secrets_verify/procedure.sql @@ -0,0 +1,30 @@ +-- Deploy: schemas/constructive_store_private/procedures/user_secrets_verify/procedure +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/user_secrets/table + + +CREATE FUNCTION "constructive_store_private".user_secrets_verify( + IN owner_id uuid, + IN secret_name text, + IN value text +) RETURNS boolean AS $_PGFN_$ +DECLARE + v_secret_text text; + v_secret "constructive_store_private".user_secrets; +BEGIN + SELECT "constructive_store_private".user_secrets_get(user_secrets_verify.owner_id, user_secrets_verify.secret_name) INTO v_secret_text; + SELECT * + FROM "constructive_store_private".user_secrets AS s + WHERE + s.name = user_secrets_verify.secret_name AND s.owner_id = user_secrets_verify.owner_id INTO v_secret; + IF v_secret.algo = 'crypt' THEN + RETURN v_secret_text = public.crypt(user_secrets_verify.value::bytea::text, v_secret_text); + ELSIF v_secret.algo = 'pgp' THEN + RETURN user_secrets_verify.value = v_secret_text; + END IF; + RETURN user_secrets_verify.value = v_secret_text; +END; +$_PGFN_$ LANGUAGE plpgsql STABLE; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/procedures/user_state_del/procedure.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/procedures/user_state_del/procedure.sql new file mode 100644 index 00000000..f22e5454 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/procedures/user_state_del/procedure.sql @@ -0,0 +1,18 @@ +-- Deploy: schemas/constructive_store_private/procedures/user_state_del/procedure +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/user_state/table + + +CREATE FUNCTION "constructive_store_private".user_state_del( + IN owner_id uuid, + IN secret_name text +) RETURNS void AS $_PGFN_$ +BEGIN + DELETE FROM "constructive_store_private".user_state AS s + WHERE + s.owner_id = user_state_del.owner_id AND s.name = secret_name; +END; +$_PGFN_$ LANGUAGE plpgsql VOLATILE; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/procedures/user_state_del/procedure/alterations/alt0000000001.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/procedures/user_state_del/procedure/alterations/alt0000000001.sql new file mode 100644 index 00000000..538d6ade --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/procedures/user_state_del/procedure/alterations/alt0000000001.sql @@ -0,0 +1,18 @@ +-- Deploy: schemas/constructive_store_private/procedures/user_state_del/procedure/alterations/alt0000000001 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/user_state/table + + +CREATE FUNCTION "constructive_store_private".user_state_del( + IN owner_id uuid, + IN secret_names text[] +) RETURNS void AS $_PGFN_$ +BEGIN + DELETE FROM "constructive_store_private".user_state AS s + WHERE + s.owner_id = user_state_del.owner_id AND s.name = ANY( user_state_del.secret_names ); +END; +$_PGFN_$ LANGUAGE plpgsql VOLATILE; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/procedures/user_state_get/procedure.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/procedures/user_state_get/procedure.sql new file mode 100644 index 00000000..e90a9cd3 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/procedures/user_state_get/procedure.sql @@ -0,0 +1,26 @@ +-- Deploy: schemas/constructive_store_private/procedures/user_state_get/procedure +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/user_state/table + + +CREATE FUNCTION "constructive_store_private".user_state_get( + IN owner_id uuid, + IN secret_name text, + IN default_value text DEFAULT NULL +) RETURNS text AS $_PGFN_$ +DECLARE + val text; +BEGIN + SELECT value + FROM "constructive_store_private".user_state AS t + WHERE + t.owner_id = user_state_get.owner_id AND t.name = user_state_get.secret_name INTO val; + IF NOT (FOUND) OR val IS NULL THEN + RETURN default_value; + END IF; + RETURN val; +END; +$_PGFN_$ LANGUAGE plpgsql STABLE; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/procedures/user_state_set/procedure.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/procedures/user_state_set/procedure.sql new file mode 100644 index 00000000..1a3b4ebe --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/procedures/user_state_set/procedure.sql @@ -0,0 +1,25 @@ +-- Deploy: schemas/constructive_store_private/procedures/user_state_set/procedure +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/user_state/table + + +CREATE FUNCTION "constructive_store_private".user_state_set( + IN user_id uuid, + IN secret_name text, + IN value anyelement +) RETURNS void AS $_PGFN_$ +BEGIN + INSERT INTO "constructive_store_private".user_state ( + owner_id, + name, + value + ) + VALUES + (user_state_set.user_id, user_state_set.secret_name, user_state_set.value::text) + ON CONFLICT (owner_id, name) DO UPDATE SET + value = EXCLUDED.value; +END; +$_PGFN_$ LANGUAGE plpgsql VOLATILE; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/schema.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/schema.sql new file mode 100644 index 00000000..d23353d8 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/schema.sql @@ -0,0 +1,8 @@ +-- Deploy: schemas/constructive_store_private/schema +-- made with <3 @ constructive.io + + + + +CREATE SCHEMA "constructive_store_private"; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/alterations/alt0000000002.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/alterations/alt0000000002.sql new file mode 100644 index 00000000..616a4739 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/alterations/alt0000000002.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_store_private/tables/org_secrets/alterations/alt0000000002 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/org_secrets/table + + +ALTER TABLE "constructive_store_private".org_secrets + DISABLE ROW LEVEL SECURITY; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/alterations/alt0000000003.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/alterations/alt0000000003.sql new file mode 100644 index 00000000..632363d1 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/alterations/alt0000000003.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_store_private/tables/org_secrets/alterations/alt0000000003 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/org_secrets/table + + +COMMENT ON TABLE "constructive_store_private".org_secrets IS E'org-level PGP-encrypted key-value secrets store'; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/algo/alterations/alt0000000004.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/algo/alterations/alt0000000004.sql new file mode 100644 index 00000000..1107ef99 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/algo/alterations/alt0000000004.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_store_private/tables/org_secrets/columns/algo/alterations/alt0000000004 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/org_secrets/columns/algo/column + + +COMMENT ON COLUMN "constructive_store_private".org_secrets.algo IS E'Encryption algorithm used (pgp)'; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/algo/column.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/algo/column.sql new file mode 100644 index 00000000..cf97fd70 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/algo/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_store_private/tables/org_secrets/columns/algo/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/org_secrets/table + + +ALTER TABLE "constructive_store_private".org_secrets + ADD COLUMN algo text; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/annotations/alterations/alt0000000005.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/annotations/alterations/alt0000000005.sql new file mode 100644 index 00000000..186f1e22 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/annotations/alterations/alt0000000005.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_store_private/tables/org_secrets/columns/annotations/alterations/alt0000000005 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/org_secrets/table +-- requires: schemas/constructive_store_private/tables/org_secrets/columns/annotations/column + + +ALTER TABLE "constructive_store_private".org_secrets + ALTER COLUMN annotations SET NOT NULL; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/annotations/alterations/alt0000000006.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/annotations/alterations/alt0000000006.sql new file mode 100644 index 00000000..9d0a0f44 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/annotations/alterations/alt0000000006.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_store_private/tables/org_secrets/columns/annotations/alterations/alt0000000006 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/org_secrets/table +-- requires: schemas/constructive_store_private/tables/org_secrets/columns/annotations/column + + +ALTER TABLE "constructive_store_private".org_secrets + ALTER COLUMN annotations SET DEFAULT '{}'::jsonb; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/annotations/alterations/alt0000000007.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/annotations/alterations/alt0000000007.sql new file mode 100644 index 00000000..3c5f638a --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/annotations/alterations/alt0000000007.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_store_private/tables/org_secrets/columns/annotations/alterations/alt0000000007 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/org_secrets/columns/annotations/column + + +COMMENT ON COLUMN "constructive_store_private".org_secrets.annotations IS 'Freeform metadata for tooling and operational notes'; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/annotations/column.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/annotations/column.sql new file mode 100644 index 00000000..dc530ea7 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/annotations/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_store_private/tables/org_secrets/columns/annotations/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/org_secrets/table + + +ALTER TABLE "constructive_store_private".org_secrets + ADD COLUMN annotations jsonb; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/created_at/alterations/alt0000000008.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/created_at/alterations/alt0000000008.sql new file mode 100644 index 00000000..bbb9836a --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/created_at/alterations/alt0000000008.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_store_private/tables/org_secrets/columns/created_at/alterations/alt0000000008 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/org_secrets/table +-- requires: schemas/constructive_store_private/tables/org_secrets/columns/created_at/column + + +ALTER TABLE "constructive_store_private".org_secrets + ALTER COLUMN created_at SET DEFAULT now(); + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/created_at/column.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/created_at/column.sql new file mode 100644 index 00000000..d1c75071 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/created_at/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_store_private/tables/org_secrets/columns/created_at/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/org_secrets/table + + +ALTER TABLE "constructive_store_private".org_secrets + ADD COLUMN created_at timestamptz; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/description/alterations/alt0000000009.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/description/alterations/alt0000000009.sql new file mode 100644 index 00000000..fa391d57 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/description/alterations/alt0000000009.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_store_private/tables/org_secrets/columns/description/alterations/alt0000000009 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/org_secrets/columns/description/column + + +COMMENT ON COLUMN "constructive_store_private".org_secrets.description IS E'Human-readable note about this secret'; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/description/column.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/description/column.sql new file mode 100644 index 00000000..0f266696 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/description/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_store_private/tables/org_secrets/columns/description/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/org_secrets/table + + +ALTER TABLE "constructive_store_private".org_secrets + ADD COLUMN description text; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/id/alterations/alt0000000010.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/id/alterations/alt0000000010.sql new file mode 100644 index 00000000..ebe4e35e --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/id/alterations/alt0000000010.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_store_private/tables/org_secrets/columns/id/alterations/alt0000000010 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/org_secrets/table +-- requires: schemas/constructive_store_private/tables/org_secrets/columns/id/column + + +ALTER TABLE "constructive_store_private".org_secrets + ALTER COLUMN id SET NOT NULL; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/id/alterations/alt0000000011.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/id/alterations/alt0000000011.sql new file mode 100644 index 00000000..40d540bb --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/id/alterations/alt0000000011.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_store_private/tables/org_secrets/columns/id/alterations/alt0000000011 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/org_secrets/table +-- requires: schemas/constructive_store_private/tables/org_secrets/columns/id/column + + +ALTER TABLE "constructive_store_private".org_secrets + ALTER COLUMN id SET DEFAULT uuidv7(); + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/id/alterations/alt0000000012.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/id/alterations/alt0000000012.sql new file mode 100644 index 00000000..cf39f3b1 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/id/alterations/alt0000000012.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_store_private/tables/org_secrets/columns/id/alterations/alt0000000012 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/org_secrets/columns/id/column + + +COMMENT ON COLUMN "constructive_store_private".org_secrets.id IS 'Unique identifier for this secret entry'; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/id/column.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/id/column.sql new file mode 100644 index 00000000..c87984b9 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/id/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_store_private/tables/org_secrets/columns/id/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/org_secrets/table + + +ALTER TABLE "constructive_store_private".org_secrets + ADD COLUMN id uuid; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/key_id/alterations/alt0000000013.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/key_id/alterations/alt0000000013.sql new file mode 100644 index 00000000..a9ba0d6f --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/key_id/alterations/alt0000000013.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_store_private/tables/org_secrets/columns/key_id/alterations/alt0000000013 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/org_secrets/table +-- requires: schemas/constructive_store_private/tables/org_secrets/columns/key_id/column + + +ALTER TABLE "constructive_store_private".org_secrets + ALTER COLUMN key_id SET NOT NULL; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/key_id/alterations/alt0000000014.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/key_id/alterations/alt0000000014.sql new file mode 100644 index 00000000..21115726 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/key_id/alterations/alt0000000014.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_store_private/tables/org_secrets/columns/key_id/alterations/alt0000000014 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/org_secrets/table +-- requires: schemas/constructive_store_private/tables/org_secrets/columns/key_id/column + + +ALTER TABLE "constructive_store_private".org_secrets + ALTER COLUMN key_id SET DEFAULT uuidv7(); + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/key_id/alterations/alt0000000015.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/key_id/alterations/alt0000000015.sql new file mode 100644 index 00000000..028b935c --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/key_id/alterations/alt0000000015.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_store_private/tables/org_secrets/columns/key_id/alterations/alt0000000015 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/org_secrets/columns/key_id/column + + +COMMENT ON COLUMN "constructive_store_private".org_secrets.key_id IS E'Per-secret key used as PGP symmetric encryption passphrase'; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/key_id/column.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/key_id/column.sql new file mode 100644 index 00000000..f5845b00 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/key_id/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_store_private/tables/org_secrets/columns/key_id/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/org_secrets/table + + +ALTER TABLE "constructive_store_private".org_secrets + ADD COLUMN key_id uuid; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/labels/alterations/alt0000000016.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/labels/alterations/alt0000000016.sql new file mode 100644 index 00000000..c77345be --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/labels/alterations/alt0000000016.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_store_private/tables/org_secrets/columns/labels/alterations/alt0000000016 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/org_secrets/table +-- requires: schemas/constructive_store_private/tables/org_secrets/columns/labels/column + + +ALTER TABLE "constructive_store_private".org_secrets + ALTER COLUMN labels SET NOT NULL; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/labels/alterations/alt0000000017.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/labels/alterations/alt0000000017.sql new file mode 100644 index 00000000..06ed7aa5 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/labels/alterations/alt0000000017.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_store_private/tables/org_secrets/columns/labels/alterations/alt0000000017 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/org_secrets/table +-- requires: schemas/constructive_store_private/tables/org_secrets/columns/labels/column + + +ALTER TABLE "constructive_store_private".org_secrets + ALTER COLUMN labels SET DEFAULT '{}'::jsonb; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/labels/alterations/alt0000000018.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/labels/alterations/alt0000000018.sql new file mode 100644 index 00000000..cb97b570 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/labels/alterations/alt0000000018.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_store_private/tables/org_secrets/columns/labels/alterations/alt0000000018 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/org_secrets/columns/labels/column + + +COMMENT ON COLUMN "constructive_store_private".org_secrets.labels IS E'Key/value pairs for selecting/filtering secrets'; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/labels/column.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/labels/column.sql new file mode 100644 index 00000000..1fe2e455 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/labels/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_store_private/tables/org_secrets/columns/labels/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/org_secrets/table + + +ALTER TABLE "constructive_store_private".org_secrets + ADD COLUMN labels jsonb; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/name/alterations/alt0000000019.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/name/alterations/alt0000000019.sql new file mode 100644 index 00000000..cac1c9ac --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/name/alterations/alt0000000019.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_store_private/tables/org_secrets/columns/name/alterations/alt0000000019 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/org_secrets/table +-- requires: schemas/constructive_store_private/tables/org_secrets/columns/name/column + + +ALTER TABLE "constructive_store_private".org_secrets + ALTER COLUMN name SET NOT NULL; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/name/alterations/alt0000000020.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/name/alterations/alt0000000020.sql new file mode 100644 index 00000000..7067be99 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/name/alterations/alt0000000020.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_store_private/tables/org_secrets/columns/name/alterations/alt0000000020 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/org_secrets/columns/name/column + + +COMMENT ON COLUMN "constructive_store_private".org_secrets.name IS 'Key name identifying the secret'; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/name/column.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/name/column.sql new file mode 100644 index 00000000..a3a35556 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/name/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_store_private/tables/org_secrets/columns/name/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/org_secrets/table + + +ALTER TABLE "constructive_store_private".org_secrets + ADD COLUMN name text; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/namespace_id/alterations/alt0000000021.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/namespace_id/alterations/alt0000000021.sql new file mode 100644 index 00000000..9138dd65 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/namespace_id/alterations/alt0000000021.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_store_private/tables/org_secrets/columns/namespace_id/alterations/alt0000000021 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/org_secrets/table +-- requires: schemas/constructive_store_private/tables/org_secrets/columns/namespace_id/column + + +ALTER TABLE "constructive_store_private".org_secrets + ALTER COLUMN namespace_id SET NOT NULL; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/namespace_id/alterations/alt0000000022.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/namespace_id/alterations/alt0000000022.sql new file mode 100644 index 00000000..d46d639c --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/namespace_id/alterations/alt0000000022.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_store_private/tables/org_secrets/columns/namespace_id/alterations/alt0000000022 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/org_secrets/columns/namespace_id/column + + +COMMENT ON COLUMN "constructive_store_private".org_secrets.namespace_id IS E'FK to namespaces — logical grouping for secrets'; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/namespace_id/column.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/namespace_id/column.sql new file mode 100644 index 00000000..ad718978 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/namespace_id/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_store_private/tables/org_secrets/columns/namespace_id/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/org_secrets/table + + +ALTER TABLE "constructive_store_private".org_secrets + ADD COLUMN namespace_id uuid; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/owner_id/alterations/alt0000000023.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/owner_id/alterations/alt0000000023.sql new file mode 100644 index 00000000..3209df58 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/owner_id/alterations/alt0000000023.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_store_private/tables/org_secrets/columns/owner_id/alterations/alt0000000023 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/org_secrets/table +-- requires: schemas/constructive_store_private/tables/org_secrets/columns/owner_id/column + + +ALTER TABLE "constructive_store_private".org_secrets + ALTER COLUMN owner_id SET NOT NULL; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/owner_id/alterations/alt0000000024.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/owner_id/alterations/alt0000000024.sql new file mode 100644 index 00000000..dba6557d --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/owner_id/alterations/alt0000000024.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_store_private/tables/org_secrets/columns/owner_id/alterations/alt0000000024 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/org_secrets/columns/owner_id/column + + +COMMENT ON COLUMN "constructive_store_private".org_secrets.owner_id IS E'Organization/entity that owns this secret'; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/owner_id/column.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/owner_id/column.sql new file mode 100644 index 00000000..ee67da93 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/owner_id/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_store_private/tables/org_secrets/columns/owner_id/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/org_secrets/table + + +ALTER TABLE "constructive_store_private".org_secrets + ADD COLUMN owner_id uuid; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/updated_at/alterations/alt0000000025.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/updated_at/alterations/alt0000000025.sql new file mode 100644 index 00000000..d9c359ee --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/updated_at/alterations/alt0000000025.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_store_private/tables/org_secrets/columns/updated_at/alterations/alt0000000025 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/org_secrets/table +-- requires: schemas/constructive_store_private/tables/org_secrets/columns/updated_at/column + + +ALTER TABLE "constructive_store_private".org_secrets + ALTER COLUMN updated_at SET DEFAULT now(); + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/updated_at/column.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/updated_at/column.sql new file mode 100644 index 00000000..b190c84b --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/updated_at/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_store_private/tables/org_secrets/columns/updated_at/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/org_secrets/table + + +ALTER TABLE "constructive_store_private".org_secrets + ADD COLUMN updated_at timestamptz; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/value/alterations/alt0000000026.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/value/alterations/alt0000000026.sql new file mode 100644 index 00000000..fc1b602e --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/value/alterations/alt0000000026.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_store_private/tables/org_secrets/columns/value/alterations/alt0000000026 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/org_secrets/columns/value/column + + +COMMENT ON COLUMN "constructive_store_private".org_secrets.value IS E'The PGP-encrypted secret value stored as binary'; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/value/column.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/value/column.sql new file mode 100644 index 00000000..25804df8 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/columns/value/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_store_private/tables/org_secrets/columns/value/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/org_secrets/table + + +ALTER TABLE "constructive_store_private".org_secrets + ADD COLUMN value bytea; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/constraints/org_secrets_namespace_id_fkey/constraint.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/constraints/org_secrets_namespace_id_fkey/constraint.sql new file mode 100644 index 00000000..1531b096 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/constraints/org_secrets_namespace_id_fkey/constraint.sql @@ -0,0 +1,16 @@ +-- Deploy: schemas/constructive_store_private/tables/org_secrets/constraints/org_secrets_namespace_id_fkey/constraint +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_infra_public/schema +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/org_secrets/table +-- requires: schemas/constructive_infra_public/tables/platform_namespaces/table +-- requires: schemas/constructive_store_private/tables/org_secrets/columns/namespace_id/column + + +ALTER TABLE "constructive_store_private".org_secrets + ADD CONSTRAINT org_secrets_namespace_id_fkey + FOREIGN KEY(namespace_id) + REFERENCES "constructive_infra_public".platform_namespaces (id) + ON DELETE RESTRICT; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/constraints/org_secrets_owner_id_namespace_id_name_key/constraint.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/constraints/org_secrets_owner_id_namespace_id_name_key/constraint.sql new file mode 100644 index 00000000..15a446b3 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/constraints/org_secrets_owner_id_namespace_id_name_key/constraint.sql @@ -0,0 +1,14 @@ +-- Deploy: schemas/constructive_store_private/tables/org_secrets/constraints/org_secrets_owner_id_namespace_id_name_key/constraint +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/org_secrets/table +-- requires: schemas/constructive_store_private/tables/org_secrets/columns/owner_id/column +-- requires: schemas/constructive_store_private/tables/org_secrets/columns/namespace_id/column +-- requires: schemas/constructive_store_private/tables/org_secrets/columns/name/column + + +ALTER TABLE "constructive_store_private".org_secrets + ADD CONSTRAINT org_secrets_owner_id_namespace_id_name_key + UNIQUE (owner_id, namespace_id, name); + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/constraints/org_secrets_pkey/constraint.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/constraints/org_secrets_pkey/constraint.sql new file mode 100644 index 00000000..089bbf6e --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/constraints/org_secrets_pkey/constraint.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_store_private/tables/org_secrets/constraints/org_secrets_pkey/constraint +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/org_secrets/table +-- requires: schemas/constructive_store_private/tables/org_secrets/columns/id/column + + +ALTER TABLE "constructive_store_private".org_secrets + ADD CONSTRAINT org_secrets_pkey PRIMARY KEY (id); + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/indexes/org_secrets_created_at_idx.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/indexes/org_secrets_created_at_idx.sql new file mode 100644 index 00000000..0d807f6b --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/indexes/org_secrets_created_at_idx.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_store_private/tables/org_secrets/indexes/org_secrets_created_at_idx +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/org_secrets/table +-- requires: schemas/constructive_store_private/tables/org_secrets/columns/created_at/column + + +CREATE INDEX org_secrets_created_at_idx ON "constructive_store_private".org_secrets ( created_at ); + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/indexes/org_secrets_updated_at_idx.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/indexes/org_secrets_updated_at_idx.sql new file mode 100644 index 00000000..ac8333ea --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/indexes/org_secrets_updated_at_idx.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_store_private/tables/org_secrets/indexes/org_secrets_updated_at_idx +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/org_secrets/table +-- requires: schemas/constructive_store_private/tables/org_secrets/columns/updated_at/column + + +CREATE INDEX org_secrets_updated_at_idx ON "constructive_store_private".org_secrets ( updated_at ); + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/table.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/table.sql new file mode 100644 index 00000000..8b952be4 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/table.sql @@ -0,0 +1,8 @@ +-- Deploy: schemas/constructive_store_private/tables/org_secrets/table +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema + + +CREATE TABLE "constructive_store_private".org_secrets (); + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/triggers/org_secrets_insert_tg.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/triggers/org_secrets_insert_tg.sql new file mode 100644 index 00000000..b7563327 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/triggers/org_secrets_insert_tg.sql @@ -0,0 +1,13 @@ +-- Deploy: schemas/constructive_store_private/tables/org_secrets/triggers/org_secrets_insert_tg +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/org_secrets/table +-- requires: schemas/constructive_store_private/trigger_fns/org_secrets_hash + + +CREATE TRIGGER org_secrets_insert_tg +BEFORE INSERT ON "constructive_store_private".org_secrets +FOR EACH ROW +EXECUTE PROCEDURE "constructive_store_private".org_secrets_hash ( ); + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/triggers/org_secrets_update_tg.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/triggers/org_secrets_update_tg.sql new file mode 100644 index 00000000..11aca24c --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/triggers/org_secrets_update_tg.sql @@ -0,0 +1,14 @@ +-- Deploy: schemas/constructive_store_private/tables/org_secrets/triggers/org_secrets_update_tg +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/org_secrets/table +-- requires: schemas/constructive_store_private/trigger_fns/org_secrets_hash + + +CREATE TRIGGER org_secrets_update_tg +BEFORE UPDATE ON "constructive_store_private".org_secrets +FOR EACH ROW +WHEN (OLD.value IS DISTINCT FROM NEW.value) +EXECUTE PROCEDURE "constructive_store_private".org_secrets_hash ( ); + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/triggers/timestamps_tg.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/triggers/timestamps_tg.sql new file mode 100644 index 00000000..f7c13ae7 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/org_secrets/triggers/timestamps_tg.sql @@ -0,0 +1,12 @@ +-- Deploy: schemas/constructive_store_private/tables/org_secrets/triggers/timestamps_tg +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/org_secrets/table + + +CREATE TRIGGER timestamps_tg +BEFORE INSERT OR UPDATE ON "constructive_store_private".org_secrets +FOR EACH ROW +EXECUTE PROCEDURE stamps.timestamps ( ); + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/alterations/alt0000000027.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/alterations/alt0000000027.sql new file mode 100644 index 00000000..7e4e5ef6 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/alterations/alt0000000027.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_store_private/tables/platform_secrets/alterations/alt0000000027 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/platform_secrets/table + + +ALTER TABLE "constructive_store_private".platform_secrets + DISABLE ROW LEVEL SECURITY; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/alterations/alt0000000028.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/alterations/alt0000000028.sql new file mode 100644 index 00000000..60affbf3 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/alterations/alt0000000028.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_store_private/tables/platform_secrets/alterations/alt0000000028 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/platform_secrets/table + + +COMMENT ON TABLE "constructive_store_private".platform_secrets IS E'platform-level PGP-encrypted key-value secrets store'; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/algo/alterations/alt0000000029.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/algo/alterations/alt0000000029.sql new file mode 100644 index 00000000..3be7c9f4 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/algo/alterations/alt0000000029.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_store_private/tables/platform_secrets/columns/algo/alterations/alt0000000029 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/platform_secrets/columns/algo/column + + +COMMENT ON COLUMN "constructive_store_private".platform_secrets.algo IS E'Encryption algorithm used (pgp)'; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/algo/column.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/algo/column.sql new file mode 100644 index 00000000..94bcdc54 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/algo/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_store_private/tables/platform_secrets/columns/algo/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/platform_secrets/table + + +ALTER TABLE "constructive_store_private".platform_secrets + ADD COLUMN algo text; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/annotations/alterations/alt0000000030.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/annotations/alterations/alt0000000030.sql new file mode 100644 index 00000000..f093cacc --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/annotations/alterations/alt0000000030.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_store_private/tables/platform_secrets/columns/annotations/alterations/alt0000000030 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/platform_secrets/table +-- requires: schemas/constructive_store_private/tables/platform_secrets/columns/annotations/column + + +ALTER TABLE "constructive_store_private".platform_secrets + ALTER COLUMN annotations SET NOT NULL; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/annotations/alterations/alt0000000031.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/annotations/alterations/alt0000000031.sql new file mode 100644 index 00000000..33d1fbf9 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/annotations/alterations/alt0000000031.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_store_private/tables/platform_secrets/columns/annotations/alterations/alt0000000031 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/platform_secrets/table +-- requires: schemas/constructive_store_private/tables/platform_secrets/columns/annotations/column + + +ALTER TABLE "constructive_store_private".platform_secrets + ALTER COLUMN annotations SET DEFAULT '{}'::jsonb; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/annotations/alterations/alt0000000032.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/annotations/alterations/alt0000000032.sql new file mode 100644 index 00000000..38ea761c --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/annotations/alterations/alt0000000032.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_store_private/tables/platform_secrets/columns/annotations/alterations/alt0000000032 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/platform_secrets/columns/annotations/column + + +COMMENT ON COLUMN "constructive_store_private".platform_secrets.annotations IS 'Freeform metadata for tooling and operational notes'; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/annotations/column.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/annotations/column.sql new file mode 100644 index 00000000..16e74251 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/annotations/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_store_private/tables/platform_secrets/columns/annotations/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/platform_secrets/table + + +ALTER TABLE "constructive_store_private".platform_secrets + ADD COLUMN annotations jsonb; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/created_at/alterations/alt0000000033.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/created_at/alterations/alt0000000033.sql new file mode 100644 index 00000000..ab513804 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/created_at/alterations/alt0000000033.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_store_private/tables/platform_secrets/columns/created_at/alterations/alt0000000033 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/platform_secrets/table +-- requires: schemas/constructive_store_private/tables/platform_secrets/columns/created_at/column + + +ALTER TABLE "constructive_store_private".platform_secrets + ALTER COLUMN created_at SET DEFAULT now(); + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/created_at/column.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/created_at/column.sql new file mode 100644 index 00000000..a8b3d55a --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/created_at/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_store_private/tables/platform_secrets/columns/created_at/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/platform_secrets/table + + +ALTER TABLE "constructive_store_private".platform_secrets + ADD COLUMN created_at timestamptz; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/database_id/alterations/alt0000000034.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/database_id/alterations/alt0000000034.sql new file mode 100644 index 00000000..697f2c39 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/database_id/alterations/alt0000000034.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_store_private/tables/platform_secrets/columns/database_id/alterations/alt0000000034 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/platform_secrets/table +-- requires: schemas/constructive_store_private/tables/platform_secrets/columns/database_id/column + + +ALTER TABLE "constructive_store_private".platform_secrets + ALTER COLUMN database_id SET NOT NULL; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/database_id/alterations/alt0000000035.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/database_id/alterations/alt0000000035.sql new file mode 100644 index 00000000..aad65775 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/database_id/alterations/alt0000000035.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_store_private/tables/platform_secrets/columns/database_id/alterations/alt0000000035 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/platform_secrets/columns/database_id/column + + +COMMENT ON COLUMN "constructive_store_private".platform_secrets.database_id IS E'Database that owns this resource (database-scoped isolation)'; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/database_id/column.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/database_id/column.sql new file mode 100644 index 00000000..e7548589 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/database_id/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_store_private/tables/platform_secrets/columns/database_id/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/platform_secrets/table + + +ALTER TABLE "constructive_store_private".platform_secrets + ADD COLUMN database_id uuid; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/description/alterations/alt0000000036.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/description/alterations/alt0000000036.sql new file mode 100644 index 00000000..fdcb5de1 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/description/alterations/alt0000000036.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_store_private/tables/platform_secrets/columns/description/alterations/alt0000000036 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/platform_secrets/columns/description/column + + +COMMENT ON COLUMN "constructive_store_private".platform_secrets.description IS E'Human-readable note about this secret'; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/description/column.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/description/column.sql new file mode 100644 index 00000000..25ae970b --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/description/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_store_private/tables/platform_secrets/columns/description/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/platform_secrets/table + + +ALTER TABLE "constructive_store_private".platform_secrets + ADD COLUMN description text; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/id/alterations/alt0000000037.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/id/alterations/alt0000000037.sql new file mode 100644 index 00000000..9f7287c2 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/id/alterations/alt0000000037.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_store_private/tables/platform_secrets/columns/id/alterations/alt0000000037 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/platform_secrets/table +-- requires: schemas/constructive_store_private/tables/platform_secrets/columns/id/column + + +ALTER TABLE "constructive_store_private".platform_secrets + ALTER COLUMN id SET NOT NULL; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/id/alterations/alt0000000038.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/id/alterations/alt0000000038.sql new file mode 100644 index 00000000..76cb84bd --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/id/alterations/alt0000000038.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_store_private/tables/platform_secrets/columns/id/alterations/alt0000000038 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/platform_secrets/table +-- requires: schemas/constructive_store_private/tables/platform_secrets/columns/id/column + + +ALTER TABLE "constructive_store_private".platform_secrets + ALTER COLUMN id SET DEFAULT uuidv7(); + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/id/alterations/alt0000000039.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/id/alterations/alt0000000039.sql new file mode 100644 index 00000000..e051521c --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/id/alterations/alt0000000039.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_store_private/tables/platform_secrets/columns/id/alterations/alt0000000039 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/platform_secrets/columns/id/column + + +COMMENT ON COLUMN "constructive_store_private".platform_secrets.id IS 'Unique identifier for this secret entry'; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/id/column.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/id/column.sql new file mode 100644 index 00000000..0ea7db79 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/id/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_store_private/tables/platform_secrets/columns/id/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/platform_secrets/table + + +ALTER TABLE "constructive_store_private".platform_secrets + ADD COLUMN id uuid; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/key_id/alterations/alt0000000040.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/key_id/alterations/alt0000000040.sql new file mode 100644 index 00000000..143a1e2b --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/key_id/alterations/alt0000000040.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_store_private/tables/platform_secrets/columns/key_id/alterations/alt0000000040 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/platform_secrets/table +-- requires: schemas/constructive_store_private/tables/platform_secrets/columns/key_id/column + + +ALTER TABLE "constructive_store_private".platform_secrets + ALTER COLUMN key_id SET NOT NULL; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/key_id/alterations/alt0000000041.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/key_id/alterations/alt0000000041.sql new file mode 100644 index 00000000..c7474df8 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/key_id/alterations/alt0000000041.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_store_private/tables/platform_secrets/columns/key_id/alterations/alt0000000041 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/platform_secrets/table +-- requires: schemas/constructive_store_private/tables/platform_secrets/columns/key_id/column + + +ALTER TABLE "constructive_store_private".platform_secrets + ALTER COLUMN key_id SET DEFAULT uuidv7(); + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/key_id/alterations/alt0000000042.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/key_id/alterations/alt0000000042.sql new file mode 100644 index 00000000..1b6e6220 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/key_id/alterations/alt0000000042.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_store_private/tables/platform_secrets/columns/key_id/alterations/alt0000000042 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/platform_secrets/columns/key_id/column + + +COMMENT ON COLUMN "constructive_store_private".platform_secrets.key_id IS E'Per-secret key used as PGP symmetric encryption passphrase'; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/key_id/column.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/key_id/column.sql new file mode 100644 index 00000000..27dce3b3 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/key_id/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_store_private/tables/platform_secrets/columns/key_id/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/platform_secrets/table + + +ALTER TABLE "constructive_store_private".platform_secrets + ADD COLUMN key_id uuid; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/labels/alterations/alt0000000043.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/labels/alterations/alt0000000043.sql new file mode 100644 index 00000000..fe6bba3b --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/labels/alterations/alt0000000043.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_store_private/tables/platform_secrets/columns/labels/alterations/alt0000000043 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/platform_secrets/table +-- requires: schemas/constructive_store_private/tables/platform_secrets/columns/labels/column + + +ALTER TABLE "constructive_store_private".platform_secrets + ALTER COLUMN labels SET NOT NULL; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/labels/alterations/alt0000000044.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/labels/alterations/alt0000000044.sql new file mode 100644 index 00000000..22b90b61 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/labels/alterations/alt0000000044.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_store_private/tables/platform_secrets/columns/labels/alterations/alt0000000044 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/platform_secrets/table +-- requires: schemas/constructive_store_private/tables/platform_secrets/columns/labels/column + + +ALTER TABLE "constructive_store_private".platform_secrets + ALTER COLUMN labels SET DEFAULT '{}'::jsonb; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/labels/alterations/alt0000000045.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/labels/alterations/alt0000000045.sql new file mode 100644 index 00000000..988ef6a8 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/labels/alterations/alt0000000045.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_store_private/tables/platform_secrets/columns/labels/alterations/alt0000000045 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/platform_secrets/columns/labels/column + + +COMMENT ON COLUMN "constructive_store_private".platform_secrets.labels IS E'Key/value pairs for selecting/filtering secrets'; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/labels/column.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/labels/column.sql new file mode 100644 index 00000000..552c7aef --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/labels/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_store_private/tables/platform_secrets/columns/labels/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/platform_secrets/table + + +ALTER TABLE "constructive_store_private".platform_secrets + ADD COLUMN labels jsonb; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/name/alterations/alt0000000046.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/name/alterations/alt0000000046.sql new file mode 100644 index 00000000..6b067f5a --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/name/alterations/alt0000000046.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_store_private/tables/platform_secrets/columns/name/alterations/alt0000000046 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/platform_secrets/table +-- requires: schemas/constructive_store_private/tables/platform_secrets/columns/name/column + + +ALTER TABLE "constructive_store_private".platform_secrets + ALTER COLUMN name SET NOT NULL; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/name/alterations/alt0000000047.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/name/alterations/alt0000000047.sql new file mode 100644 index 00000000..141c61e5 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/name/alterations/alt0000000047.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_store_private/tables/platform_secrets/columns/name/alterations/alt0000000047 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/platform_secrets/columns/name/column + + +COMMENT ON COLUMN "constructive_store_private".platform_secrets.name IS 'Key name identifying the secret'; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/name/column.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/name/column.sql new file mode 100644 index 00000000..7cecb9cf --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/name/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_store_private/tables/platform_secrets/columns/name/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/platform_secrets/table + + +ALTER TABLE "constructive_store_private".platform_secrets + ADD COLUMN name text; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/namespace_id/alterations/alt0000000048.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/namespace_id/alterations/alt0000000048.sql new file mode 100644 index 00000000..4df2ea73 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/namespace_id/alterations/alt0000000048.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_store_private/tables/platform_secrets/columns/namespace_id/alterations/alt0000000048 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/platform_secrets/table +-- requires: schemas/constructive_store_private/tables/platform_secrets/columns/namespace_id/column + + +ALTER TABLE "constructive_store_private".platform_secrets + ALTER COLUMN namespace_id SET NOT NULL; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/namespace_id/alterations/alt0000000049.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/namespace_id/alterations/alt0000000049.sql new file mode 100644 index 00000000..a65cb606 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/namespace_id/alterations/alt0000000049.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_store_private/tables/platform_secrets/columns/namespace_id/alterations/alt0000000049 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/platform_secrets/columns/namespace_id/column + + +COMMENT ON COLUMN "constructive_store_private".platform_secrets.namespace_id IS E'FK to namespaces — logical grouping for secrets'; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/namespace_id/column.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/namespace_id/column.sql new file mode 100644 index 00000000..c7f838ce --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/namespace_id/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_store_private/tables/platform_secrets/columns/namespace_id/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/platform_secrets/table + + +ALTER TABLE "constructive_store_private".platform_secrets + ADD COLUMN namespace_id uuid; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/updated_at/alterations/alt0000000050.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/updated_at/alterations/alt0000000050.sql new file mode 100644 index 00000000..2567a206 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/updated_at/alterations/alt0000000050.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_store_private/tables/platform_secrets/columns/updated_at/alterations/alt0000000050 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/platform_secrets/table +-- requires: schemas/constructive_store_private/tables/platform_secrets/columns/updated_at/column + + +ALTER TABLE "constructive_store_private".platform_secrets + ALTER COLUMN updated_at SET DEFAULT now(); + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/updated_at/column.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/updated_at/column.sql new file mode 100644 index 00000000..c9baabf8 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/updated_at/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_store_private/tables/platform_secrets/columns/updated_at/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/platform_secrets/table + + +ALTER TABLE "constructive_store_private".platform_secrets + ADD COLUMN updated_at timestamptz; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/value/alterations/alt0000000051.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/value/alterations/alt0000000051.sql new file mode 100644 index 00000000..0769079c --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/value/alterations/alt0000000051.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_store_private/tables/platform_secrets/columns/value/alterations/alt0000000051 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/platform_secrets/columns/value/column + + +COMMENT ON COLUMN "constructive_store_private".platform_secrets.value IS E'The PGP-encrypted secret value stored as binary'; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/value/column.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/value/column.sql new file mode 100644 index 00000000..a4ffe442 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/columns/value/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_store_private/tables/platform_secrets/columns/value/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/platform_secrets/table + + +ALTER TABLE "constructive_store_private".platform_secrets + ADD COLUMN value bytea; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/constraints/platform_secrets_database_id_namespace_id_name_key/constraint.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/constraints/platform_secrets_database_id_namespace_id_name_key/constraint.sql new file mode 100644 index 00000000..591f173a --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/constraints/platform_secrets_database_id_namespace_id_name_key/constraint.sql @@ -0,0 +1,14 @@ +-- Deploy: schemas/constructive_store_private/tables/platform_secrets/constraints/platform_secrets_database_id_namespace_id_name_key/constraint +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/platform_secrets/table +-- requires: schemas/constructive_store_private/tables/platform_secrets/columns/database_id/column +-- requires: schemas/constructive_store_private/tables/platform_secrets/columns/namespace_id/column +-- requires: schemas/constructive_store_private/tables/platform_secrets/columns/name/column + + +ALTER TABLE "constructive_store_private".platform_secrets + ADD CONSTRAINT platform_secrets_database_id_namespace_id_name_key + UNIQUE (database_id, namespace_id, name); + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/constraints/platform_secrets_namespace_id_fkey/constraint.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/constraints/platform_secrets_namespace_id_fkey/constraint.sql new file mode 100644 index 00000000..1f57fdbd --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/constraints/platform_secrets_namespace_id_fkey/constraint.sql @@ -0,0 +1,16 @@ +-- Deploy: schemas/constructive_store_private/tables/platform_secrets/constraints/platform_secrets_namespace_id_fkey/constraint +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_infra_public/schema +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/platform_secrets/table +-- requires: schemas/constructive_infra_public/tables/platform_namespaces/table +-- requires: schemas/constructive_store_private/tables/platform_secrets/columns/namespace_id/column + + +ALTER TABLE "constructive_store_private".platform_secrets + ADD CONSTRAINT platform_secrets_namespace_id_fkey + FOREIGN KEY(namespace_id) + REFERENCES "constructive_infra_public".platform_namespaces (id) + ON DELETE RESTRICT; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/constraints/platform_secrets_pkey/constraint.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/constraints/platform_secrets_pkey/constraint.sql new file mode 100644 index 00000000..dd381095 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/constraints/platform_secrets_pkey/constraint.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_store_private/tables/platform_secrets/constraints/platform_secrets_pkey/constraint +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/platform_secrets/table +-- requires: schemas/constructive_store_private/tables/platform_secrets/columns/id/column + + +ALTER TABLE "constructive_store_private".platform_secrets + ADD CONSTRAINT platform_secrets_pkey PRIMARY KEY (id); + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/indexes/platform_secrets_created_at_idx.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/indexes/platform_secrets_created_at_idx.sql new file mode 100644 index 00000000..0c3629b8 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/indexes/platform_secrets_created_at_idx.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_store_private/tables/platform_secrets/indexes/platform_secrets_created_at_idx +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/platform_secrets/table +-- requires: schemas/constructive_store_private/tables/platform_secrets/columns/created_at/column + + +CREATE INDEX platform_secrets_created_at_idx ON "constructive_store_private".platform_secrets ( created_at ); + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/indexes/platform_secrets_updated_at_idx.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/indexes/platform_secrets_updated_at_idx.sql new file mode 100644 index 00000000..a314c0b3 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/indexes/platform_secrets_updated_at_idx.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_store_private/tables/platform_secrets/indexes/platform_secrets_updated_at_idx +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/platform_secrets/table +-- requires: schemas/constructive_store_private/tables/platform_secrets/columns/updated_at/column + + +CREATE INDEX platform_secrets_updated_at_idx ON "constructive_store_private".platform_secrets ( updated_at ); + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/table.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/table.sql new file mode 100644 index 00000000..c71e078f --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/table.sql @@ -0,0 +1,8 @@ +-- Deploy: schemas/constructive_store_private/tables/platform_secrets/table +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema + + +CREATE TABLE "constructive_store_private".platform_secrets (); + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/triggers/platform_secrets_insert_tg.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/triggers/platform_secrets_insert_tg.sql new file mode 100644 index 00000000..efb4428b --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/triggers/platform_secrets_insert_tg.sql @@ -0,0 +1,13 @@ +-- Deploy: schemas/constructive_store_private/tables/platform_secrets/triggers/platform_secrets_insert_tg +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/platform_secrets/table +-- requires: schemas/constructive_store_private/trigger_fns/platform_secrets_hash + + +CREATE TRIGGER platform_secrets_insert_tg +BEFORE INSERT ON "constructive_store_private".platform_secrets +FOR EACH ROW +EXECUTE PROCEDURE "constructive_store_private".platform_secrets_hash ( ); + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/triggers/platform_secrets_update_tg.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/triggers/platform_secrets_update_tg.sql new file mode 100644 index 00000000..d1bc7dd3 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/triggers/platform_secrets_update_tg.sql @@ -0,0 +1,14 @@ +-- Deploy: schemas/constructive_store_private/tables/platform_secrets/triggers/platform_secrets_update_tg +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/platform_secrets/table +-- requires: schemas/constructive_store_private/trigger_fns/platform_secrets_hash + + +CREATE TRIGGER platform_secrets_update_tg +BEFORE UPDATE ON "constructive_store_private".platform_secrets +FOR EACH ROW +WHEN (OLD.value IS DISTINCT FROM NEW.value) +EXECUTE PROCEDURE "constructive_store_private".platform_secrets_hash ( ); + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/triggers/timestamps_tg.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/triggers/timestamps_tg.sql new file mode 100644 index 00000000..c58f8761 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/platform_secrets/triggers/timestamps_tg.sql @@ -0,0 +1,12 @@ +-- Deploy: schemas/constructive_store_private/tables/platform_secrets/triggers/timestamps_tg +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/platform_secrets/table + + +CREATE TRIGGER timestamps_tg +BEFORE INSERT OR UPDATE ON "constructive_store_private".platform_secrets +FOR EACH ROW +EXECUTE PROCEDURE stamps.timestamps ( ); + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/alterations/alt0000000052.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/alterations/alt0000000052.sql new file mode 100644 index 00000000..68ce05cd --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/alterations/alt0000000052.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_store_private/tables/user_secrets/alterations/alt0000000052 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/user_secrets/table + + +ALTER TABLE "constructive_store_private".user_secrets + DISABLE ROW LEVEL SECURITY; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/alterations/alt0000000053.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/alterations/alt0000000053.sql new file mode 100644 index 00000000..4c6a5044 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/alterations/alt0000000053.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_store_private/tables/user_secrets/alterations/alt0000000053 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/user_secrets/table + + +COMMENT ON TABLE "constructive_store_private".user_secrets IS E'Per-user bcrypt credential store (password hashes, API key hashes)'; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/columns/algo/alterations/alt0000000054.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/columns/algo/alterations/alt0000000054.sql new file mode 100644 index 00000000..6327fc56 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/columns/algo/alterations/alt0000000054.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_store_private/tables/user_secrets/columns/algo/alterations/alt0000000054 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/user_secrets/columns/algo/column + + +COMMENT ON COLUMN "constructive_store_private".user_secrets.algo IS E'Hash algorithm used (crypt/bcrypt)'; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/columns/algo/column.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/columns/algo/column.sql new file mode 100644 index 00000000..ba96bacf --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/columns/algo/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_store_private/tables/user_secrets/columns/algo/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/user_secrets/table + + +ALTER TABLE "constructive_store_private".user_secrets + ADD COLUMN algo text; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/columns/created_at/alterations/alt0000000055.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/columns/created_at/alterations/alt0000000055.sql new file mode 100644 index 00000000..63888024 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/columns/created_at/alterations/alt0000000055.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_store_private/tables/user_secrets/columns/created_at/alterations/alt0000000055 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/user_secrets/table +-- requires: schemas/constructive_store_private/tables/user_secrets/columns/created_at/column + + +ALTER TABLE "constructive_store_private".user_secrets + ALTER COLUMN created_at SET DEFAULT now(); + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/columns/created_at/column.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/columns/created_at/column.sql new file mode 100644 index 00000000..c65a8e79 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/columns/created_at/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_store_private/tables/user_secrets/columns/created_at/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/user_secrets/table + + +ALTER TABLE "constructive_store_private".user_secrets + ADD COLUMN created_at timestamptz; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/columns/id/alterations/alt0000000056.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/columns/id/alterations/alt0000000056.sql new file mode 100644 index 00000000..621065c6 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/columns/id/alterations/alt0000000056.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_store_private/tables/user_secrets/columns/id/alterations/alt0000000056 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/user_secrets/table +-- requires: schemas/constructive_store_private/tables/user_secrets/columns/id/column + + +ALTER TABLE "constructive_store_private".user_secrets + ALTER COLUMN id SET NOT NULL; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/columns/id/alterations/alt0000000057.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/columns/id/alterations/alt0000000057.sql new file mode 100644 index 00000000..b6aedacc --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/columns/id/alterations/alt0000000057.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_store_private/tables/user_secrets/columns/id/alterations/alt0000000057 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/user_secrets/table +-- requires: schemas/constructive_store_private/tables/user_secrets/columns/id/column + + +ALTER TABLE "constructive_store_private".user_secrets + ALTER COLUMN id SET DEFAULT uuidv7(); + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/columns/id/alterations/alt0000000058.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/columns/id/alterations/alt0000000058.sql new file mode 100644 index 00000000..f406fd56 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/columns/id/alterations/alt0000000058.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_store_private/tables/user_secrets/columns/id/alterations/alt0000000058 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/user_secrets/columns/id/column + + +COMMENT ON COLUMN "constructive_store_private".user_secrets.id IS 'Unique identifier for this credential entry'; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/columns/id/column.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/columns/id/column.sql new file mode 100644 index 00000000..13ae31b5 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/columns/id/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_store_private/tables/user_secrets/columns/id/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/user_secrets/table + + +ALTER TABLE "constructive_store_private".user_secrets + ADD COLUMN id uuid; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/columns/name/alterations/alt0000000059.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/columns/name/alterations/alt0000000059.sql new file mode 100644 index 00000000..c26ef4c4 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/columns/name/alterations/alt0000000059.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_store_private/tables/user_secrets/columns/name/alterations/alt0000000059 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/user_secrets/table +-- requires: schemas/constructive_store_private/tables/user_secrets/columns/name/column + + +ALTER TABLE "constructive_store_private".user_secrets + ALTER COLUMN name SET NOT NULL; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/columns/name/alterations/alt0000000060.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/columns/name/alterations/alt0000000060.sql new file mode 100644 index 00000000..a3acc68a --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/columns/name/alterations/alt0000000060.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_store_private/tables/user_secrets/columns/name/alterations/alt0000000060 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/user_secrets/columns/name/column + + +COMMENT ON COLUMN "constructive_store_private".user_secrets.name IS E'Key name identifying the credential (e.g. password_hash)'; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/columns/name/column.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/columns/name/column.sql new file mode 100644 index 00000000..3692e237 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/columns/name/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_store_private/tables/user_secrets/columns/name/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/user_secrets/table + + +ALTER TABLE "constructive_store_private".user_secrets + ADD COLUMN name text; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/columns/owner_id/alterations/alt0000000061.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/columns/owner_id/alterations/alt0000000061.sql new file mode 100644 index 00000000..27d47e92 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/columns/owner_id/alterations/alt0000000061.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_store_private/tables/user_secrets/columns/owner_id/alterations/alt0000000061 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/user_secrets/table +-- requires: schemas/constructive_store_private/tables/user_secrets/columns/owner_id/column + + +ALTER TABLE "constructive_store_private".user_secrets + ALTER COLUMN owner_id SET NOT NULL; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/columns/owner_id/alterations/alt0000000062.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/columns/owner_id/alterations/alt0000000062.sql new file mode 100644 index 00000000..bb339a84 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/columns/owner_id/alterations/alt0000000062.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_store_private/tables/user_secrets/columns/owner_id/alterations/alt0000000062 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/user_secrets/columns/owner_id/column + + +COMMENT ON COLUMN "constructive_store_private".user_secrets.owner_id IS 'User who owns this credential'; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/columns/owner_id/column.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/columns/owner_id/column.sql new file mode 100644 index 00000000..c3ec181f --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/columns/owner_id/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_store_private/tables/user_secrets/columns/owner_id/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/user_secrets/table + + +ALTER TABLE "constructive_store_private".user_secrets + ADD COLUMN owner_id uuid; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/columns/updated_at/alterations/alt0000000063.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/columns/updated_at/alterations/alt0000000063.sql new file mode 100644 index 00000000..ed7109d0 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/columns/updated_at/alterations/alt0000000063.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_store_private/tables/user_secrets/columns/updated_at/alterations/alt0000000063 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/user_secrets/table +-- requires: schemas/constructive_store_private/tables/user_secrets/columns/updated_at/column + + +ALTER TABLE "constructive_store_private".user_secrets + ALTER COLUMN updated_at SET DEFAULT now(); + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/columns/updated_at/column.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/columns/updated_at/column.sql new file mode 100644 index 00000000..69382cbe --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/columns/updated_at/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_store_private/tables/user_secrets/columns/updated_at/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/user_secrets/table + + +ALTER TABLE "constructive_store_private".user_secrets + ADD COLUMN updated_at timestamptz; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/columns/value/alterations/alt0000000064.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/columns/value/alterations/alt0000000064.sql new file mode 100644 index 00000000..cb8e29cc --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/columns/value/alterations/alt0000000064.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_store_private/tables/user_secrets/columns/value/alterations/alt0000000064 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/user_secrets/columns/value/column + + +COMMENT ON COLUMN "constructive_store_private".user_secrets.value IS E'The bcrypt-hashed credential value stored as binary'; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/columns/value/column.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/columns/value/column.sql new file mode 100644 index 00000000..7acedd5d --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/columns/value/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_store_private/tables/user_secrets/columns/value/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/user_secrets/table + + +ALTER TABLE "constructive_store_private".user_secrets + ADD COLUMN value bytea; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/constraints/user_secrets_owner_id_name_key/constraint.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/constraints/user_secrets_owner_id_name_key/constraint.sql new file mode 100644 index 00000000..d9ee5dd0 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/constraints/user_secrets_owner_id_name_key/constraint.sql @@ -0,0 +1,13 @@ +-- Deploy: schemas/constructive_store_private/tables/user_secrets/constraints/user_secrets_owner_id_name_key/constraint +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/user_secrets/table +-- requires: schemas/constructive_store_private/tables/user_secrets/columns/owner_id/column +-- requires: schemas/constructive_store_private/tables/user_secrets/columns/name/column + + +ALTER TABLE "constructive_store_private".user_secrets + ADD CONSTRAINT user_secrets_owner_id_name_key + UNIQUE (owner_id, name); + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/constraints/user_secrets_pkey/constraint.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/constraints/user_secrets_pkey/constraint.sql new file mode 100644 index 00000000..0ce4d4ef --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/constraints/user_secrets_pkey/constraint.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_store_private/tables/user_secrets/constraints/user_secrets_pkey/constraint +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/user_secrets/table +-- requires: schemas/constructive_store_private/tables/user_secrets/columns/id/column + + +ALTER TABLE "constructive_store_private".user_secrets + ADD CONSTRAINT user_secrets_pkey PRIMARY KEY (id); + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/indexes/user_secrets_created_at_idx.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/indexes/user_secrets_created_at_idx.sql new file mode 100644 index 00000000..1049f063 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/indexes/user_secrets_created_at_idx.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_store_private/tables/user_secrets/indexes/user_secrets_created_at_idx +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/user_secrets/table +-- requires: schemas/constructive_store_private/tables/user_secrets/columns/created_at/column + + +CREATE INDEX user_secrets_created_at_idx ON "constructive_store_private".user_secrets ( created_at ); + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/indexes/user_secrets_updated_at_idx.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/indexes/user_secrets_updated_at_idx.sql new file mode 100644 index 00000000..4f2b6fd8 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/indexes/user_secrets_updated_at_idx.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_store_private/tables/user_secrets/indexes/user_secrets_updated_at_idx +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/user_secrets/table +-- requires: schemas/constructive_store_private/tables/user_secrets/columns/updated_at/column + + +CREATE INDEX user_secrets_updated_at_idx ON "constructive_store_private".user_secrets ( updated_at ); + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/table.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/table.sql new file mode 100644 index 00000000..3e25ed34 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/table.sql @@ -0,0 +1,8 @@ +-- Deploy: schemas/constructive_store_private/tables/user_secrets/table +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema + + +CREATE TABLE "constructive_store_private".user_secrets (); + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/triggers/timestamps_tg.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/triggers/timestamps_tg.sql new file mode 100644 index 00000000..c4ff386f --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/triggers/timestamps_tg.sql @@ -0,0 +1,12 @@ +-- Deploy: schemas/constructive_store_private/tables/user_secrets/triggers/timestamps_tg +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/user_secrets/table + + +CREATE TRIGGER timestamps_tg +BEFORE INSERT OR UPDATE ON "constructive_store_private".user_secrets +FOR EACH ROW +EXECUTE PROCEDURE stamps.timestamps ( ); + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/triggers/user_secrets_insert_tg.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/triggers/user_secrets_insert_tg.sql new file mode 100644 index 00000000..31edce1a --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/triggers/user_secrets_insert_tg.sql @@ -0,0 +1,13 @@ +-- Deploy: schemas/constructive_store_private/tables/user_secrets/triggers/user_secrets_insert_tg +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/user_secrets/table +-- requires: schemas/constructive_store_private/trigger_fns/user_secrets_hash + + +CREATE TRIGGER user_secrets_insert_tg +BEFORE INSERT ON "constructive_store_private".user_secrets +FOR EACH ROW +EXECUTE PROCEDURE "constructive_store_private".user_secrets_hash ( ); + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/triggers/user_secrets_update_tg.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/triggers/user_secrets_update_tg.sql new file mode 100644 index 00000000..23d7f744 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_secrets/triggers/user_secrets_update_tg.sql @@ -0,0 +1,14 @@ +-- Deploy: schemas/constructive_store_private/tables/user_secrets/triggers/user_secrets_update_tg +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/user_secrets/table +-- requires: schemas/constructive_store_private/trigger_fns/user_secrets_hash + + +CREATE TRIGGER user_secrets_update_tg +BEFORE UPDATE ON "constructive_store_private".user_secrets +FOR EACH ROW +WHEN (OLD.value IS DISTINCT FROM NEW.value) +EXECUTE PROCEDURE "constructive_store_private".user_secrets_hash ( ); + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_state/alterations/alt0000000065.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_state/alterations/alt0000000065.sql new file mode 100644 index 00000000..a0b11166 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_state/alterations/alt0000000065.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_store_private/tables/user_state/alterations/alt0000000065 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/user_state/table + + +ALTER TABLE "constructive_store_private".user_state + DISABLE ROW LEVEL SECURITY; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_state/alterations/alt0000000066.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_state/alterations/alt0000000066.sql new file mode 100644 index 00000000..25ceac74 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_state/alterations/alt0000000066.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_store_private/tables/user_state/alterations/alt0000000066 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/user_state/table + + +COMMENT ON TABLE "constructive_store_private".user_state IS E'Internal per-user state store for auth counters, tokens, and ephemeral data'; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_state/columns/id/alterations/alt0000000067.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_state/columns/id/alterations/alt0000000067.sql new file mode 100644 index 00000000..234f043f --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_state/columns/id/alterations/alt0000000067.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_store_private/tables/user_state/columns/id/alterations/alt0000000067 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/user_state/table +-- requires: schemas/constructive_store_private/tables/user_state/columns/id/column + + +ALTER TABLE "constructive_store_private".user_state + ALTER COLUMN id SET NOT NULL; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_state/columns/id/alterations/alt0000000068.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_state/columns/id/alterations/alt0000000068.sql new file mode 100644 index 00000000..29b83297 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_state/columns/id/alterations/alt0000000068.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_store_private/tables/user_state/columns/id/alterations/alt0000000068 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/user_state/table +-- requires: schemas/constructive_store_private/tables/user_state/columns/id/column + + +ALTER TABLE "constructive_store_private".user_state + ALTER COLUMN id SET DEFAULT uuidv7(); + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_state/columns/id/alterations/alt0000000069.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_state/columns/id/alterations/alt0000000069.sql new file mode 100644 index 00000000..8c04ad4a --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_state/columns/id/alterations/alt0000000069.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_store_private/tables/user_state/columns/id/alterations/alt0000000069 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/user_state/columns/id/column + + +COMMENT ON COLUMN "constructive_store_private".user_state.id IS 'Unique identifier for this secret entry'; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_state/columns/id/column.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_state/columns/id/column.sql new file mode 100644 index 00000000..77e1ef07 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_state/columns/id/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_store_private/tables/user_state/columns/id/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/user_state/table + + +ALTER TABLE "constructive_store_private".user_state + ADD COLUMN id uuid; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_state/columns/name/alterations/alt0000000070.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_state/columns/name/alterations/alt0000000070.sql new file mode 100644 index 00000000..432079cc --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_state/columns/name/alterations/alt0000000070.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_store_private/tables/user_state/columns/name/alterations/alt0000000070 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/user_state/table +-- requires: schemas/constructive_store_private/tables/user_state/columns/name/column + + +ALTER TABLE "constructive_store_private".user_state + ALTER COLUMN name SET NOT NULL; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_state/columns/name/alterations/alt0000000071.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_state/columns/name/alterations/alt0000000071.sql new file mode 100644 index 00000000..3717d25c --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_state/columns/name/alterations/alt0000000071.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_store_private/tables/user_state/columns/name/alterations/alt0000000071 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/user_state/columns/name/column + + +COMMENT ON COLUMN "constructive_store_private".user_state.name IS E'Key name identifying the state entry (e.g. signin_attempts, verification_token)'; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_state/columns/name/column.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_state/columns/name/column.sql new file mode 100644 index 00000000..269990da --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_state/columns/name/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_store_private/tables/user_state/columns/name/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/user_state/table + + +ALTER TABLE "constructive_store_private".user_state + ADD COLUMN name text; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_state/columns/owner_id/alterations/alt0000000072.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_state/columns/owner_id/alterations/alt0000000072.sql new file mode 100644 index 00000000..9f9fa7cc --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_state/columns/owner_id/alterations/alt0000000072.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_store_private/tables/user_state/columns/owner_id/alterations/alt0000000072 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/user_state/table +-- requires: schemas/constructive_store_private/tables/user_state/columns/owner_id/column + + +ALTER TABLE "constructive_store_private".user_state + ALTER COLUMN owner_id SET NOT NULL; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_state/columns/owner_id/alterations/alt0000000073.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_state/columns/owner_id/alterations/alt0000000073.sql new file mode 100644 index 00000000..311c7d1f --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_state/columns/owner_id/alterations/alt0000000073.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_store_private/tables/user_state/columns/owner_id/alterations/alt0000000073 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/user_state/columns/owner_id/column + + +COMMENT ON COLUMN "constructive_store_private".user_state.owner_id IS 'User who owns this secret'; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_state/columns/owner_id/column.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_state/columns/owner_id/column.sql new file mode 100644 index 00000000..066a9972 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_state/columns/owner_id/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_store_private/tables/user_state/columns/owner_id/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/user_state/table + + +ALTER TABLE "constructive_store_private".user_state + ADD COLUMN owner_id uuid; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_state/columns/value/alterations/alt0000000074.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_state/columns/value/alterations/alt0000000074.sql new file mode 100644 index 00000000..e5e281d8 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_state/columns/value/alterations/alt0000000074.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_store_private/tables/user_state/columns/value/alterations/alt0000000074 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/user_state/columns/value/column + + +COMMENT ON COLUMN "constructive_store_private".user_state.value IS 'The plaintext state value'; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_state/columns/value/column.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_state/columns/value/column.sql new file mode 100644 index 00000000..6732ddb2 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_state/columns/value/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_store_private/tables/user_state/columns/value/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/user_state/table + + +ALTER TABLE "constructive_store_private".user_state + ADD COLUMN value text; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_state/constraints/user_states_owner_id_name_key/constraint.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_state/constraints/user_states_owner_id_name_key/constraint.sql new file mode 100644 index 00000000..4bdc553a --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_state/constraints/user_states_owner_id_name_key/constraint.sql @@ -0,0 +1,13 @@ +-- Deploy: schemas/constructive_store_private/tables/user_state/constraints/user_states_owner_id_name_key/constraint +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/user_state/table +-- requires: schemas/constructive_store_private/tables/user_state/columns/owner_id/column +-- requires: schemas/constructive_store_private/tables/user_state/columns/name/column + + +ALTER TABLE "constructive_store_private".user_state + ADD CONSTRAINT user_states_owner_id_name_key + UNIQUE (owner_id, name); + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_state/constraints/user_states_pkey/constraint.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_state/constraints/user_states_pkey/constraint.sql new file mode 100644 index 00000000..4f067959 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_state/constraints/user_states_pkey/constraint.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_store_private/tables/user_state/constraints/user_states_pkey/constraint +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema +-- requires: schemas/constructive_store_private/tables/user_state/table +-- requires: schemas/constructive_store_private/tables/user_state/columns/id/column + + +ALTER TABLE "constructive_store_private".user_state + ADD CONSTRAINT user_states_pkey PRIMARY KEY (id); + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_state/table.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_state/table.sql new file mode 100644 index 00000000..6d45789f --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/tables/user_state/table.sql @@ -0,0 +1,8 @@ +-- Deploy: schemas/constructive_store_private/tables/user_state/table +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema + + +CREATE TABLE "constructive_store_private".user_state (); + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/trigger_fns/org_secrets_hash.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/trigger_fns/org_secrets_hash.sql new file mode 100644 index 00000000..5e0f0d85 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/trigger_fns/org_secrets_hash.sql @@ -0,0 +1,21 @@ +-- Deploy: schemas/constructive_store_private/trigger_fns/org_secrets_hash +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema + + +CREATE FUNCTION "constructive_store_private".org_secrets_hash() RETURNS TRIGGER AS $_PGFN_$ +BEGIN + IF NEW.algo = 'crypt' THEN + SELECT public.crypt(NEW.value::text, public.gen_salt('bf')) INTO NEW.value; + ELSE + IF NEW.algo = 'pgp' THEN + SELECT public.pgp_sym_encrypt(pg_catalog.encode(NEW.value::bytea, 'hex'), NEW.key_id::text, 'compress-algo=1, cipher-algo=aes256') INTO NEW.value; + ELSE + SELECT 'none' INTO NEW.algo; + END IF; + END IF; + RETURN NEW; +END; +$_PGFN_$ LANGUAGE plpgsql VOLATILE; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/trigger_fns/platform_secrets_hash.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/trigger_fns/platform_secrets_hash.sql new file mode 100644 index 00000000..31af14cd --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/trigger_fns/platform_secrets_hash.sql @@ -0,0 +1,21 @@ +-- Deploy: schemas/constructive_store_private/trigger_fns/platform_secrets_hash +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema + + +CREATE FUNCTION "constructive_store_private".platform_secrets_hash() RETURNS TRIGGER AS $_PGFN_$ +BEGIN + IF NEW.algo = 'crypt' THEN + SELECT public.crypt(NEW.value::text, public.gen_salt('bf')) INTO NEW.value; + ELSE + IF NEW.algo = 'pgp' THEN + SELECT public.pgp_sym_encrypt(pg_catalog.encode(NEW.value::bytea, 'hex'), NEW.key_id::text, 'compress-algo=1, cipher-algo=aes256') INTO NEW.value; + ELSE + SELECT 'none' INTO NEW.algo; + END IF; + END IF; + RETURN NEW; +END; +$_PGFN_$ LANGUAGE plpgsql VOLATILE; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_private/trigger_fns/user_secrets_hash.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_private/trigger_fns/user_secrets_hash.sql new file mode 100644 index 00000000..89fc6a44 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_private/trigger_fns/user_secrets_hash.sql @@ -0,0 +1,21 @@ +-- Deploy: schemas/constructive_store_private/trigger_fns/user_secrets_hash +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_private/schema + + +CREATE FUNCTION "constructive_store_private".user_secrets_hash() RETURNS TRIGGER AS $_PGFN_$ +BEGIN + IF NEW.algo = 'crypt' THEN + SELECT public.crypt(NEW.value::text, public.gen_salt('bf')) INTO NEW.value; + ELSE + IF NEW.algo = 'pgp' THEN + SELECT public.pgp_sym_encrypt(pg_catalog.encode(NEW.value::bytea, 'hex'), NEW.owner_id::text, 'compress-algo=1, cipher-algo=aes256') INTO NEW.value; + ELSE + SELECT 'none' INTO NEW.algo; + END IF; + END IF; + RETURN NEW; +END; +$_PGFN_$ LANGUAGE plpgsql VOLATILE; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/procedures/org_secrets_del/procedure.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/procedures/org_secrets_del/procedure.sql new file mode 100644 index 00000000..7b9fe66a --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/procedures/org_secrets_del/procedure.sql @@ -0,0 +1,25 @@ +-- Deploy: schemas/constructive_store_public/procedures/org_secrets_del/procedure +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_private/tables/org_secrets/table + + +CREATE FUNCTION "constructive_store_public".org_secrets_del( + IN owner_id uuid, + IN secret_name text, + IN secret_namespace text DEFAULT 'default' +) RETURNS void AS $_PGFN_$ +DECLARE + v_namespace_id uuid; +BEGIN + SELECT ns.id + FROM "constructive_infra_public".platform_namespaces AS ns + WHERE + ns.name = org_secrets_del.secret_namespace INTO v_namespace_id; + DELETE FROM "constructive_store_private".org_secrets AS s + WHERE + (s.owner_id = org_secrets_del.owner_id AND s.namespace_id = v_namespace_id) AND s.name = org_secrets_del.secret_name; +END; +$_PGFN_$ LANGUAGE plpgsql VOLATILE; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/procedures/org_secrets_remove_array/procedure.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/procedures/org_secrets_remove_array/procedure.sql new file mode 100644 index 00000000..f3dd521b --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/procedures/org_secrets_remove_array/procedure.sql @@ -0,0 +1,25 @@ +-- Deploy: schemas/constructive_store_public/procedures/org_secrets_remove_array/procedure +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_private/tables/org_secrets/table + + +CREATE FUNCTION "constructive_store_public".org_secrets_remove_array( + IN owner_id uuid, + IN secret_names text[], + IN secret_namespace text DEFAULT 'default' +) RETURNS void AS $_PGFN_$ +DECLARE + v_namespace_id uuid; +BEGIN + SELECT ns.id + FROM "constructive_infra_public".platform_namespaces AS ns + WHERE + ns.name = org_secrets_remove_array.secret_namespace INTO v_namespace_id; + DELETE FROM "constructive_store_private".org_secrets AS s + WHERE + (s.owner_id = org_secrets_remove_array.owner_id AND s.namespace_id = v_namespace_id) AND s.name = ANY( org_secrets_remove_array.secret_names ); +END; +$_PGFN_$ LANGUAGE plpgsql VOLATILE SECURITY DEFINER; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/procedures/org_secrets_set/procedure.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/procedures/org_secrets_set/procedure.sql new file mode 100644 index 00000000..956ccd58 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/procedures/org_secrets_set/procedure.sql @@ -0,0 +1,36 @@ +-- Deploy: schemas/constructive_store_public/procedures/org_secrets_set/procedure +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_private/tables/org_secrets/table + + +CREATE FUNCTION "constructive_store_public".org_secrets_set( + IN owner_id uuid, + IN secret_name text, + IN secret_value text, + IN algo text DEFAULT 'pgp', + IN secret_namespace text DEFAULT 'default' +) RETURNS boolean AS $_PGFN_$ +DECLARE + v_namespace_id uuid; +BEGIN + SELECT ns.id + FROM "constructive_infra_public".platform_namespaces AS ns + WHERE + ns.name = org_secrets_set.secret_namespace INTO v_namespace_id; + INSERT INTO "constructive_store_private".org_secrets ( + owner_id, + namespace_id, + name, + value, + algo + ) + VALUES + (org_secrets_set.owner_id, v_namespace_id, org_secrets_set.secret_name, org_secrets_set.secret_value::bytea, org_secrets_set.algo) + ON CONFLICT (owner_id, namespace_id, name) DO UPDATE SET + value = org_secrets_set.secret_value::bytea, algo = EXCLUDED.algo; + RETURN true; +END; +$_PGFN_$ LANGUAGE plpgsql VOLATILE; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/procedures/platform_secrets_del/procedure.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/procedures/platform_secrets_del/procedure.sql new file mode 100644 index 00000000..8dc44594 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/procedures/platform_secrets_del/procedure.sql @@ -0,0 +1,24 @@ +-- Deploy: schemas/constructive_store_public/procedures/platform_secrets_del/procedure +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_private/tables/platform_secrets/table + + +CREATE FUNCTION "constructive_store_public".platform_secrets_del( + IN secret_name text, + IN secret_namespace text DEFAULT 'default' +) RETURNS void AS $_PGFN_$ +DECLARE + v_namespace_id uuid; +BEGIN + SELECT ns.id + FROM "constructive_infra_public".platform_namespaces AS ns + WHERE + ns.name = platform_secrets_del.secret_namespace INTO v_namespace_id; + DELETE FROM "constructive_store_private".platform_secrets AS s + WHERE + s.namespace_id = v_namespace_id AND s.name = platform_secrets_del.secret_name; +END; +$_PGFN_$ LANGUAGE plpgsql VOLATILE; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/procedures/platform_secrets_set/procedure.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/procedures/platform_secrets_set/procedure.sql new file mode 100644 index 00000000..fe856d23 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/procedures/platform_secrets_set/procedure.sql @@ -0,0 +1,34 @@ +-- Deploy: schemas/constructive_store_public/procedures/platform_secrets_set/procedure +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_private/tables/platform_secrets/table + + +CREATE FUNCTION "constructive_store_public".platform_secrets_set( + IN secret_name text, + IN secret_value text, + IN algo text DEFAULT 'pgp', + IN secret_namespace text DEFAULT 'default' +) RETURNS boolean AS $_PGFN_$ +DECLARE + v_namespace_id uuid; +BEGIN + SELECT ns.id + FROM "constructive_infra_public".platform_namespaces AS ns + WHERE + ns.name = platform_secrets_set.secret_namespace INTO v_namespace_id; + INSERT INTO "constructive_store_private".platform_secrets ( + namespace_id, + name, + value, + algo + ) + VALUES + (v_namespace_id, platform_secrets_set.secret_name, platform_secrets_set.secret_value::bytea, platform_secrets_set.algo) + ON CONFLICT (namespace_id, name) DO UPDATE SET + value = platform_secrets_set.secret_value::bytea, algo = EXCLUDED.algo; + RETURN true; +END; +$_PGFN_$ LANGUAGE plpgsql VOLATILE; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/schema.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/schema.sql new file mode 100644 index 00000000..274939c7 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/schema.sql @@ -0,0 +1,8 @@ +-- Deploy: schemas/constructive_store_public/schema +-- made with <3 @ constructive.io + + + + +CREATE SCHEMA "constructive_store_public"; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/alterations/alt0000000075.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/alterations/alt0000000075.sql new file mode 100644 index 00000000..66616db2 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/alterations/alt0000000075.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_store_public/tables/platform_config/alterations/alt0000000075 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_public/tables/platform_config/table + + +ALTER TABLE "constructive_store_public".platform_config + DISABLE ROW LEVEL SECURITY; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/alterations/alt0000000076.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/alterations/alt0000000076.sql new file mode 100644 index 00000000..f9cbe932 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/alterations/alt0000000076.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_store_public/tables/platform_config/alterations/alt0000000076 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_public/tables/platform_config/table + + +COMMENT ON TABLE "constructive_store_public".platform_config IS E'App-level plaintext key-value config store (like a k8s ConfigMap); admin-only, fully CRUD-exposed'; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/annotations/alterations/alt0000000077.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/annotations/alterations/alt0000000077.sql new file mode 100644 index 00000000..6b8ab9ec --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/annotations/alterations/alt0000000077.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_store_public/tables/platform_config/columns/annotations/alterations/alt0000000077 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_public/tables/platform_config/table +-- requires: schemas/constructive_store_public/tables/platform_config/columns/annotations/column + + +ALTER TABLE "constructive_store_public".platform_config + ALTER COLUMN annotations SET NOT NULL; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/annotations/alterations/alt0000000078.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/annotations/alterations/alt0000000078.sql new file mode 100644 index 00000000..e7538f21 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/annotations/alterations/alt0000000078.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_store_public/tables/platform_config/columns/annotations/alterations/alt0000000078 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_public/tables/platform_config/table +-- requires: schemas/constructive_store_public/tables/platform_config/columns/annotations/column + + +ALTER TABLE "constructive_store_public".platform_config + ALTER COLUMN annotations SET DEFAULT '{}'::jsonb; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/annotations/alterations/alt0000000079.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/annotations/alterations/alt0000000079.sql new file mode 100644 index 00000000..08ae21af --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/annotations/alterations/alt0000000079.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_store_public/tables/platform_config/columns/annotations/alterations/alt0000000079 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_public/tables/platform_config/columns/annotations/column + + +COMMENT ON COLUMN "constructive_store_public".platform_config.annotations IS 'Freeform metadata for tooling and operational notes'; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/annotations/column.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/annotations/column.sql new file mode 100644 index 00000000..833c77c7 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/annotations/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_store_public/tables/platform_config/columns/annotations/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_public/tables/platform_config/table + + +ALTER TABLE "constructive_store_public".platform_config + ADD COLUMN annotations jsonb; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/created_at/alterations/alt0000000080.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/created_at/alterations/alt0000000080.sql new file mode 100644 index 00000000..2373cdfa --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/created_at/alterations/alt0000000080.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_store_public/tables/platform_config/columns/created_at/alterations/alt0000000080 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_public/tables/platform_config/table +-- requires: schemas/constructive_store_public/tables/platform_config/columns/created_at/column + + +ALTER TABLE "constructive_store_public".platform_config + ALTER COLUMN created_at SET DEFAULT now(); + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/created_at/column.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/created_at/column.sql new file mode 100644 index 00000000..4501cb67 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/created_at/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_store_public/tables/platform_config/columns/created_at/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_public/tables/platform_config/table + + +ALTER TABLE "constructive_store_public".platform_config + ADD COLUMN created_at timestamptz; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/description/alterations/alt0000000081.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/description/alterations/alt0000000081.sql new file mode 100644 index 00000000..8f6687d2 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/description/alterations/alt0000000081.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_store_public/tables/platform_config/columns/description/alterations/alt0000000081 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_public/tables/platform_config/columns/description/column + + +COMMENT ON COLUMN "constructive_store_public".platform_config.description IS E'Human-readable note about this config entry'; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/description/column.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/description/column.sql new file mode 100644 index 00000000..cc390398 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/description/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_store_public/tables/platform_config/columns/description/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_public/tables/platform_config/table + + +ALTER TABLE "constructive_store_public".platform_config + ADD COLUMN description text; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/expires_at/alterations/alt0000000082.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/expires_at/alterations/alt0000000082.sql new file mode 100644 index 00000000..70d015ff --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/expires_at/alterations/alt0000000082.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_store_public/tables/platform_config/columns/expires_at/alterations/alt0000000082 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_public/tables/platform_config/columns/expires_at/column + + +COMMENT ON COLUMN "constructive_store_public".platform_config.expires_at IS E'Optional expiration timestamp for time-limited config entries'; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/expires_at/column.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/expires_at/column.sql new file mode 100644 index 00000000..c793ad2d --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/expires_at/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_store_public/tables/platform_config/columns/expires_at/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_public/tables/platform_config/table + + +ALTER TABLE "constructive_store_public".platform_config + ADD COLUMN expires_at timestamptz; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/id/alterations/alt0000000083.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/id/alterations/alt0000000083.sql new file mode 100644 index 00000000..45a8c097 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/id/alterations/alt0000000083.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_store_public/tables/platform_config/columns/id/alterations/alt0000000083 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_public/tables/platform_config/table +-- requires: schemas/constructive_store_public/tables/platform_config/columns/id/column + + +ALTER TABLE "constructive_store_public".platform_config + ALTER COLUMN id SET NOT NULL; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/id/alterations/alt0000000084.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/id/alterations/alt0000000084.sql new file mode 100644 index 00000000..fbdf0207 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/id/alterations/alt0000000084.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_store_public/tables/platform_config/columns/id/alterations/alt0000000084 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_public/tables/platform_config/table +-- requires: schemas/constructive_store_public/tables/platform_config/columns/id/column + + +ALTER TABLE "constructive_store_public".platform_config + ALTER COLUMN id SET DEFAULT uuidv7(); + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/id/alterations/alt0000000085.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/id/alterations/alt0000000085.sql new file mode 100644 index 00000000..6e732b49 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/id/alterations/alt0000000085.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_store_public/tables/platform_config/columns/id/alterations/alt0000000085 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_public/tables/platform_config/columns/id/column + + +COMMENT ON COLUMN "constructive_store_public".platform_config.id IS 'Unique identifier for this config entry'; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/id/column.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/id/column.sql new file mode 100644 index 00000000..38ea645a --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/id/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_store_public/tables/platform_config/columns/id/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_public/tables/platform_config/table + + +ALTER TABLE "constructive_store_public".platform_config + ADD COLUMN id uuid; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/labels/alterations/alt0000000086.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/labels/alterations/alt0000000086.sql new file mode 100644 index 00000000..9186453a --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/labels/alterations/alt0000000086.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_store_public/tables/platform_config/columns/labels/alterations/alt0000000086 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_public/tables/platform_config/table +-- requires: schemas/constructive_store_public/tables/platform_config/columns/labels/column + + +ALTER TABLE "constructive_store_public".platform_config + ALTER COLUMN labels SET NOT NULL; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/labels/alterations/alt0000000087.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/labels/alterations/alt0000000087.sql new file mode 100644 index 00000000..c1f22df3 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/labels/alterations/alt0000000087.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_store_public/tables/platform_config/columns/labels/alterations/alt0000000087 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_public/tables/platform_config/table +-- requires: schemas/constructive_store_public/tables/platform_config/columns/labels/column + + +ALTER TABLE "constructive_store_public".platform_config + ALTER COLUMN labels SET DEFAULT '{}'::jsonb; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/labels/alterations/alt0000000088.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/labels/alterations/alt0000000088.sql new file mode 100644 index 00000000..d6b228c7 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/labels/alterations/alt0000000088.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_store_public/tables/platform_config/columns/labels/alterations/alt0000000088 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_public/tables/platform_config/columns/labels/column + + +COMMENT ON COLUMN "constructive_store_public".platform_config.labels IS E'Key/value pairs for selecting/filtering config entries'; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/labels/column.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/labels/column.sql new file mode 100644 index 00000000..b6580e0d --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/labels/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_store_public/tables/platform_config/columns/labels/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_public/tables/platform_config/table + + +ALTER TABLE "constructive_store_public".platform_config + ADD COLUMN labels jsonb; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/name/alterations/alt0000000089.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/name/alterations/alt0000000089.sql new file mode 100644 index 00000000..89fcd32d --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/name/alterations/alt0000000089.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_store_public/tables/platform_config/columns/name/alterations/alt0000000089 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_public/tables/platform_config/table +-- requires: schemas/constructive_store_public/tables/platform_config/columns/name/column + + +ALTER TABLE "constructive_store_public".platform_config + ALTER COLUMN name SET NOT NULL; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/name/alterations/alt0000000090.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/name/alterations/alt0000000090.sql new file mode 100644 index 00000000..89fc4a46 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/name/alterations/alt0000000090.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_store_public/tables/platform_config/columns/name/alterations/alt0000000090 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_public/tables/platform_config/columns/name/column + + +COMMENT ON COLUMN "constructive_store_public".platform_config.name IS 'Key name identifying the config entry'; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/name/column.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/name/column.sql new file mode 100644 index 00000000..5ffac770 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/name/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_store_public/tables/platform_config/columns/name/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_public/tables/platform_config/table + + +ALTER TABLE "constructive_store_public".platform_config + ADD COLUMN name text; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/namespace_id/alterations/alt0000000091.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/namespace_id/alterations/alt0000000091.sql new file mode 100644 index 00000000..55b4fb4c --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/namespace_id/alterations/alt0000000091.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_store_public/tables/platform_config/columns/namespace_id/alterations/alt0000000091 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_public/tables/platform_config/table +-- requires: schemas/constructive_store_public/tables/platform_config/columns/namespace_id/column + + +ALTER TABLE "constructive_store_public".platform_config + ALTER COLUMN namespace_id SET NOT NULL; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/namespace_id/alterations/alt0000000092.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/namespace_id/alterations/alt0000000092.sql new file mode 100644 index 00000000..e16e864e --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/namespace_id/alterations/alt0000000092.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_store_public/tables/platform_config/columns/namespace_id/alterations/alt0000000092 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_public/tables/platform_config/columns/namespace_id/column + + +COMMENT ON COLUMN "constructive_store_public".platform_config.namespace_id IS E'FK to namespaces — logical grouping for config entries'; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/namespace_id/column.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/namespace_id/column.sql new file mode 100644 index 00000000..ce415bc0 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/namespace_id/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_store_public/tables/platform_config/columns/namespace_id/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_public/tables/platform_config/table + + +ALTER TABLE "constructive_store_public".platform_config + ADD COLUMN namespace_id uuid; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/updated_at/alterations/alt0000000093.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/updated_at/alterations/alt0000000093.sql new file mode 100644 index 00000000..57b149fd --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/updated_at/alterations/alt0000000093.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_store_public/tables/platform_config/columns/updated_at/alterations/alt0000000093 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_public/tables/platform_config/table +-- requires: schemas/constructive_store_public/tables/platform_config/columns/updated_at/column + + +ALTER TABLE "constructive_store_public".platform_config + ALTER COLUMN updated_at SET DEFAULT now(); + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/updated_at/column.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/updated_at/column.sql new file mode 100644 index 00000000..b0fb6168 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/updated_at/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_store_public/tables/platform_config/columns/updated_at/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_public/tables/platform_config/table + + +ALTER TABLE "constructive_store_public".platform_config + ADD COLUMN updated_at timestamptz; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/value/alterations/alt0000000094.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/value/alterations/alt0000000094.sql new file mode 100644 index 00000000..e342699d --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/value/alterations/alt0000000094.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_store_public/tables/platform_config/columns/value/alterations/alt0000000094 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_public/tables/platform_config/columns/value/column + + +COMMENT ON COLUMN "constructive_store_public".platform_config.value IS 'Plaintext config value'; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/value/column.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/value/column.sql new file mode 100644 index 00000000..8623ca10 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/columns/value/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_store_public/tables/platform_config/columns/value/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_public/tables/platform_config/table + + +ALTER TABLE "constructive_store_public".platform_config + ADD COLUMN value text; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/constraints/platform_configs_namespace_id_fkey/constraint.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/constraints/platform_configs_namespace_id_fkey/constraint.sql new file mode 100644 index 00000000..96f126c3 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/constraints/platform_configs_namespace_id_fkey/constraint.sql @@ -0,0 +1,16 @@ +-- Deploy: schemas/constructive_store_public/tables/platform_config/constraints/platform_configs_namespace_id_fkey/constraint +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_infra_public/schema +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_public/tables/platform_config/table +-- requires: schemas/constructive_infra_public/tables/platform_namespaces/table +-- requires: schemas/constructive_store_public/tables/platform_config/columns/namespace_id/column + + +ALTER TABLE "constructive_store_public".platform_config + ADD CONSTRAINT platform_configs_namespace_id_fkey + FOREIGN KEY(namespace_id) + REFERENCES "constructive_infra_public".platform_namespaces (id) + ON DELETE RESTRICT; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/constraints/platform_configs_namespace_id_name_key/constraint.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/constraints/platform_configs_namespace_id_name_key/constraint.sql new file mode 100644 index 00000000..ae78d9a8 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/constraints/platform_configs_namespace_id_name_key/constraint.sql @@ -0,0 +1,13 @@ +-- Deploy: schemas/constructive_store_public/tables/platform_config/constraints/platform_configs_namespace_id_name_key/constraint +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_public/tables/platform_config/table +-- requires: schemas/constructive_store_public/tables/platform_config/columns/namespace_id/column +-- requires: schemas/constructive_store_public/tables/platform_config/columns/name/column + + +ALTER TABLE "constructive_store_public".platform_config + ADD CONSTRAINT platform_configs_namespace_id_name_key + UNIQUE (namespace_id, name); + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/constraints/platform_configs_pkey/constraint.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/constraints/platform_configs_pkey/constraint.sql new file mode 100644 index 00000000..e36c61fb --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/constraints/platform_configs_pkey/constraint.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_store_public/tables/platform_config/constraints/platform_configs_pkey/constraint +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_public/tables/platform_config/table +-- requires: schemas/constructive_store_public/tables/platform_config/columns/id/column + + +ALTER TABLE "constructive_store_public".platform_config + ADD CONSTRAINT platform_configs_pkey PRIMARY KEY (id); + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/indexes/platform_config_created_at_idx.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/indexes/platform_config_created_at_idx.sql new file mode 100644 index 00000000..1a2a7ddc --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/indexes/platform_config_created_at_idx.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_store_public/tables/platform_config/indexes/platform_config_created_at_idx +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_public/tables/platform_config/table +-- requires: schemas/constructive_store_public/tables/platform_config/columns/created_at/column + + +CREATE INDEX platform_config_created_at_idx ON "constructive_store_public".platform_config ( created_at ); + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/indexes/platform_config_updated_at_idx.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/indexes/platform_config_updated_at_idx.sql new file mode 100644 index 00000000..0b02c5a2 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/indexes/platform_config_updated_at_idx.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_store_public/tables/platform_config/indexes/platform_config_updated_at_idx +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_public/tables/platform_config/table +-- requires: schemas/constructive_store_public/tables/platform_config/columns/updated_at/column + + +CREATE INDEX platform_config_updated_at_idx ON "constructive_store_public".platform_config ( updated_at ); + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/table.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/table.sql new file mode 100644 index 00000000..22e1841e --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/table.sql @@ -0,0 +1,8 @@ +-- Deploy: schemas/constructive_store_public/tables/platform_config/table +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema + + +CREATE TABLE "constructive_store_public".platform_config (); + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/triggers/timestamps_tg.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/triggers/timestamps_tg.sql new file mode 100644 index 00000000..8bbffbcf --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config/triggers/timestamps_tg.sql @@ -0,0 +1,12 @@ +-- Deploy: schemas/constructive_store_public/tables/platform_config/triggers/timestamps_tg +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_public/tables/platform_config/table + + +CREATE TRIGGER timestamps_tg +BEFORE INSERT OR UPDATE ON "constructive_store_public".platform_config +FOR EACH ROW +EXECUTE PROCEDURE stamps.timestamps ( ); + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/alterations/alt0000000095.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/alterations/alt0000000095.sql new file mode 100644 index 00000000..0c61bb39 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/alterations/alt0000000095.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_store_public/tables/platform_config_definitions/alterations/alt0000000095 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_public/tables/platform_config_definitions/table + + +ALTER TABLE "constructive_store_public".platform_config_definitions + DISABLE ROW LEVEL SECURITY; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/alterations/alt0000000096.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/alterations/alt0000000096.sql new file mode 100644 index 00000000..9de50ea1 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/alterations/alt0000000096.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_store_public/tables/platform_config_definitions/alterations/alt0000000096 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_public/tables/platform_config_definitions/table + + +COMMENT ON TABLE "constructive_store_public".platform_config_definitions IS E'Registry of valid config keys — declares which config entries the platform recognizes'; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/annotations/alterations/alt0000000097.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/annotations/alterations/alt0000000097.sql new file mode 100644 index 00000000..dd7000f1 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/annotations/alterations/alt0000000097.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_store_public/tables/platform_config_definitions/columns/annotations/alterations/alt0000000097 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_public/tables/platform_config_definitions/table +-- requires: schemas/constructive_store_public/tables/platform_config_definitions/columns/annotations/column + + +ALTER TABLE "constructive_store_public".platform_config_definitions + ALTER COLUMN annotations SET NOT NULL; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/annotations/alterations/alt0000000098.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/annotations/alterations/alt0000000098.sql new file mode 100644 index 00000000..33c70bd1 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/annotations/alterations/alt0000000098.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_store_public/tables/platform_config_definitions/columns/annotations/alterations/alt0000000098 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_public/tables/platform_config_definitions/table +-- requires: schemas/constructive_store_public/tables/platform_config_definitions/columns/annotations/column + + +ALTER TABLE "constructive_store_public".platform_config_definitions + ALTER COLUMN annotations SET DEFAULT '{}'::jsonb; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/annotations/alterations/alt0000000099.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/annotations/alterations/alt0000000099.sql new file mode 100644 index 00000000..c73883b8 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/annotations/alterations/alt0000000099.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_store_public/tables/platform_config_definitions/columns/annotations/alterations/alt0000000099 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_public/tables/platform_config_definitions/columns/annotations/column + + +COMMENT ON COLUMN "constructive_store_public".platform_config_definitions.annotations IS 'Freeform metadata annotations for config definitions'; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/annotations/column.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/annotations/column.sql new file mode 100644 index 00000000..8a8d2040 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/annotations/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_store_public/tables/platform_config_definitions/columns/annotations/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_public/tables/platform_config_definitions/table + + +ALTER TABLE "constructive_store_public".platform_config_definitions + ADD COLUMN annotations jsonb; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/created_at/alterations/alt0000000100.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/created_at/alterations/alt0000000100.sql new file mode 100644 index 00000000..ed71c157 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/created_at/alterations/alt0000000100.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_store_public/tables/platform_config_definitions/columns/created_at/alterations/alt0000000100 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_public/tables/platform_config_definitions/table +-- requires: schemas/constructive_store_public/tables/platform_config_definitions/columns/created_at/column + + +ALTER TABLE "constructive_store_public".platform_config_definitions + ALTER COLUMN created_at SET DEFAULT now(); + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/created_at/column.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/created_at/column.sql new file mode 100644 index 00000000..a932347a --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/created_at/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_store_public/tables/platform_config_definitions/columns/created_at/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_public/tables/platform_config_definitions/table + + +ALTER TABLE "constructive_store_public".platform_config_definitions + ADD COLUMN created_at timestamptz; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/default_value/alterations/alt0000000101.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/default_value/alterations/alt0000000101.sql new file mode 100644 index 00000000..94eb6c3f --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/default_value/alterations/alt0000000101.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_store_public/tables/platform_config_definitions/columns/default_value/alterations/alt0000000101 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_public/tables/platform_config_definitions/columns/default_value/column + + +COMMENT ON COLUMN "constructive_store_public".platform_config_definitions.default_value IS 'Default value used when no config entry exists for a namespace'; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/default_value/column.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/default_value/column.sql new file mode 100644 index 00000000..b91f5079 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/default_value/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_store_public/tables/platform_config_definitions/columns/default_value/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_public/tables/platform_config_definitions/table + + +ALTER TABLE "constructive_store_public".platform_config_definitions + ADD COLUMN default_value text; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/description/alterations/alt0000000102.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/description/alterations/alt0000000102.sql new file mode 100644 index 00000000..9e41570b --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/description/alterations/alt0000000102.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_store_public/tables/platform_config_definitions/columns/description/alterations/alt0000000102 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_public/tables/platform_config_definitions/columns/description/column + + +COMMENT ON COLUMN "constructive_store_public".platform_config_definitions.description IS E'Human-readable description of what this config key controls'; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/description/column.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/description/column.sql new file mode 100644 index 00000000..8a4301d9 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/description/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_store_public/tables/platform_config_definitions/columns/description/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_public/tables/platform_config_definitions/table + + +ALTER TABLE "constructive_store_public".platform_config_definitions + ADD COLUMN description text; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/id/alterations/alt0000000103.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/id/alterations/alt0000000103.sql new file mode 100644 index 00000000..2908a75c --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/id/alterations/alt0000000103.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_store_public/tables/platform_config_definitions/columns/id/alterations/alt0000000103 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_public/tables/platform_config_definitions/table +-- requires: schemas/constructive_store_public/tables/platform_config_definitions/columns/id/column + + +ALTER TABLE "constructive_store_public".platform_config_definitions + ALTER COLUMN id SET NOT NULL; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/id/alterations/alt0000000104.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/id/alterations/alt0000000104.sql new file mode 100644 index 00000000..08bb9d70 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/id/alterations/alt0000000104.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_store_public/tables/platform_config_definitions/columns/id/alterations/alt0000000104 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_public/tables/platform_config_definitions/table +-- requires: schemas/constructive_store_public/tables/platform_config_definitions/columns/id/column + + +ALTER TABLE "constructive_store_public".platform_config_definitions + ALTER COLUMN id SET DEFAULT uuidv7(); + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/id/alterations/alt0000000105.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/id/alterations/alt0000000105.sql new file mode 100644 index 00000000..7735d467 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/id/alterations/alt0000000105.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_store_public/tables/platform_config_definitions/columns/id/alterations/alt0000000105 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_public/tables/platform_config_definitions/columns/id/column + + +COMMENT ON COLUMN "constructive_store_public".platform_config_definitions.id IS 'Unique identifier for this config definition'; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/id/column.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/id/column.sql new file mode 100644 index 00000000..12e172c7 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/id/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_store_public/tables/platform_config_definitions/columns/id/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_public/tables/platform_config_definitions/table + + +ALTER TABLE "constructive_store_public".platform_config_definitions + ADD COLUMN id uuid; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/is_built_in/alterations/alt0000000106.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/is_built_in/alterations/alt0000000106.sql new file mode 100644 index 00000000..505930ab --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/is_built_in/alterations/alt0000000106.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_store_public/tables/platform_config_definitions/columns/is_built_in/alterations/alt0000000106 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_public/tables/platform_config_definitions/table +-- requires: schemas/constructive_store_public/tables/platform_config_definitions/columns/is_built_in/column + + +ALTER TABLE "constructive_store_public".platform_config_definitions + ALTER COLUMN is_built_in SET NOT NULL; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/is_built_in/alterations/alt0000000107.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/is_built_in/alterations/alt0000000107.sql new file mode 100644 index 00000000..fd488358 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/is_built_in/alterations/alt0000000107.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_store_public/tables/platform_config_definitions/columns/is_built_in/alterations/alt0000000107 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_public/tables/platform_config_definitions/table +-- requires: schemas/constructive_store_public/tables/platform_config_definitions/columns/is_built_in/column + + +ALTER TABLE "constructive_store_public".platform_config_definitions + ALTER COLUMN is_built_in SET DEFAULT false; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/is_built_in/alterations/alt0000000108.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/is_built_in/alterations/alt0000000108.sql new file mode 100644 index 00000000..992bd66e --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/is_built_in/alterations/alt0000000108.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_store_public/tables/platform_config_definitions/columns/is_built_in/alterations/alt0000000108 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_public/tables/platform_config_definitions/columns/is_built_in/column + + +COMMENT ON COLUMN "constructive_store_public".platform_config_definitions.is_built_in IS E'Whether this row was seeded as a built-in config definition'; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/is_built_in/column.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/is_built_in/column.sql new file mode 100644 index 00000000..29cb109d --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/is_built_in/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_store_public/tables/platform_config_definitions/columns/is_built_in/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_public/tables/platform_config_definitions/table + + +ALTER TABLE "constructive_store_public".platform_config_definitions + ADD COLUMN is_built_in boolean; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/labels/alterations/alt0000000109.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/labels/alterations/alt0000000109.sql new file mode 100644 index 00000000..d61674cf --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/labels/alterations/alt0000000109.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_store_public/tables/platform_config_definitions/columns/labels/alterations/alt0000000109 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_public/tables/platform_config_definitions/table +-- requires: schemas/constructive_store_public/tables/platform_config_definitions/columns/labels/column + + +ALTER TABLE "constructive_store_public".platform_config_definitions + ALTER COLUMN labels SET NOT NULL; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/labels/alterations/alt0000000110.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/labels/alterations/alt0000000110.sql new file mode 100644 index 00000000..24c02966 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/labels/alterations/alt0000000110.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_store_public/tables/platform_config_definitions/columns/labels/alterations/alt0000000110 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_public/tables/platform_config_definitions/table +-- requires: schemas/constructive_store_public/tables/platform_config_definitions/columns/labels/column + + +ALTER TABLE "constructive_store_public".platform_config_definitions + ALTER COLUMN labels SET DEFAULT '{}'::jsonb; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/labels/alterations/alt0000000111.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/labels/alterations/alt0000000111.sql new file mode 100644 index 00000000..1160181a --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/labels/alterations/alt0000000111.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_store_public/tables/platform_config_definitions/columns/labels/alterations/alt0000000111 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_public/tables/platform_config_definitions/columns/labels/column + + +COMMENT ON COLUMN "constructive_store_public".platform_config_definitions.labels IS E'Key-value metadata for filtering and grouping config definitions'; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/labels/column.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/labels/column.sql new file mode 100644 index 00000000..6ff18dbb --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/labels/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_store_public/tables/platform_config_definitions/columns/labels/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_public/tables/platform_config_definitions/table + + +ALTER TABLE "constructive_store_public".platform_config_definitions + ADD COLUMN labels jsonb; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/name/alterations/alt0000000112.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/name/alterations/alt0000000112.sql new file mode 100644 index 00000000..7ab4fbd3 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/name/alterations/alt0000000112.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_store_public/tables/platform_config_definitions/columns/name/alterations/alt0000000112 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_public/tables/platform_config_definitions/table +-- requires: schemas/constructive_store_public/tables/platform_config_definitions/columns/name/column + + +ALTER TABLE "constructive_store_public".platform_config_definitions + ALTER COLUMN name SET NOT NULL; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/name/alterations/alt0000000113.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/name/alterations/alt0000000113.sql new file mode 100644 index 00000000..e9a905f7 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/name/alterations/alt0000000113.sql @@ -0,0 +1,9 @@ +-- Deploy: schemas/constructive_store_public/tables/platform_config_definitions/columns/name/alterations/alt0000000113 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_public/tables/platform_config_definitions/columns/name/column + + +COMMENT ON COLUMN "constructive_store_public".platform_config_definitions.name IS E'Config key name (must match config table name for resolution)'; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/name/column.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/name/column.sql new file mode 100644 index 00000000..2785682c --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/name/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_store_public/tables/platform_config_definitions/columns/name/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_public/tables/platform_config_definitions/table + + +ALTER TABLE "constructive_store_public".platform_config_definitions + ADD COLUMN name text; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/updated_at/alterations/alt0000000114.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/updated_at/alterations/alt0000000114.sql new file mode 100644 index 00000000..c60f2818 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/updated_at/alterations/alt0000000114.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_store_public/tables/platform_config_definitions/columns/updated_at/alterations/alt0000000114 +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_public/tables/platform_config_definitions/table +-- requires: schemas/constructive_store_public/tables/platform_config_definitions/columns/updated_at/column + + +ALTER TABLE "constructive_store_public".platform_config_definitions + ALTER COLUMN updated_at SET DEFAULT now(); + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/updated_at/column.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/updated_at/column.sql new file mode 100644 index 00000000..c83fba19 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/columns/updated_at/column.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_store_public/tables/platform_config_definitions/columns/updated_at/column +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_public/tables/platform_config_definitions/table + + +ALTER TABLE "constructive_store_public".platform_config_definitions + ADD COLUMN updated_at timestamptz; + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/constraints/platform_config_definitions_name_key/constraint.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/constraints/platform_config_definitions_name_key/constraint.sql new file mode 100644 index 00000000..6378b356 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/constraints/platform_config_definitions_name_key/constraint.sql @@ -0,0 +1,12 @@ +-- Deploy: schemas/constructive_store_public/tables/platform_config_definitions/constraints/platform_config_definitions_name_key/constraint +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_public/tables/platform_config_definitions/table +-- requires: schemas/constructive_store_public/tables/platform_config_definitions/columns/name/column + + +ALTER TABLE "constructive_store_public".platform_config_definitions + ADD CONSTRAINT platform_config_definitions_name_key + UNIQUE (name); + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/constraints/platform_config_definitions_pkey/constraint.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/constraints/platform_config_definitions_pkey/constraint.sql new file mode 100644 index 00000000..c0cef075 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/constraints/platform_config_definitions_pkey/constraint.sql @@ -0,0 +1,11 @@ +-- Deploy: schemas/constructive_store_public/tables/platform_config_definitions/constraints/platform_config_definitions_pkey/constraint +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_public/tables/platform_config_definitions/table +-- requires: schemas/constructive_store_public/tables/platform_config_definitions/columns/id/column + + +ALTER TABLE "constructive_store_public".platform_config_definitions + ADD CONSTRAINT platform_config_definitions_pkey PRIMARY KEY (id); + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/indexes/platform_config_definitions_created_at_idx.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/indexes/platform_config_definitions_created_at_idx.sql new file mode 100644 index 00000000..0d7ce389 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/indexes/platform_config_definitions_created_at_idx.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_store_public/tables/platform_config_definitions/indexes/platform_config_definitions_created_at_idx +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_public/tables/platform_config_definitions/table +-- requires: schemas/constructive_store_public/tables/platform_config_definitions/columns/created_at/column + + +CREATE INDEX platform_config_definitions_created_at_idx ON "constructive_store_public".platform_config_definitions ( created_at ); + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/indexes/platform_config_definitions_updated_at_idx.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/indexes/platform_config_definitions_updated_at_idx.sql new file mode 100644 index 00000000..e3dbb817 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/indexes/platform_config_definitions_updated_at_idx.sql @@ -0,0 +1,10 @@ +-- Deploy: schemas/constructive_store_public/tables/platform_config_definitions/indexes/platform_config_definitions_updated_at_idx +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_public/tables/platform_config_definitions/table +-- requires: schemas/constructive_store_public/tables/platform_config_definitions/columns/updated_at/column + + +CREATE INDEX platform_config_definitions_updated_at_idx ON "constructive_store_public".platform_config_definitions ( updated_at ); + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/table.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/table.sql new file mode 100644 index 00000000..d8480d08 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/table.sql @@ -0,0 +1,8 @@ +-- Deploy: schemas/constructive_store_public/tables/platform_config_definitions/table +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema + + +CREATE TABLE "constructive_store_public".platform_config_definitions (); + diff --git a/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/triggers/timestamps_tg.sql b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/triggers/timestamps_tg.sql new file mode 100644 index 00000000..dd2e6df4 --- /dev/null +++ b/pgpm/constructive-store/deploy/schemas/constructive_store_public/tables/platform_config_definitions/triggers/timestamps_tg.sql @@ -0,0 +1,12 @@ +-- Deploy: schemas/constructive_store_public/tables/platform_config_definitions/triggers/timestamps_tg +-- made with <3 @ constructive.io + +-- requires: schemas/constructive_store_public/schema +-- requires: schemas/constructive_store_public/tables/platform_config_definitions/table + + +CREATE TRIGGER timestamps_tg +BEFORE INSERT OR UPDATE ON "constructive_store_public".platform_config_definitions +FOR EACH ROW +EXECUTE PROCEDURE stamps.timestamps ( ); + diff --git a/pgpm/constructive-store/package.json b/pgpm/constructive-store/package.json new file mode 100644 index 00000000..19ea822d --- /dev/null +++ b/pgpm/constructive-store/package.json @@ -0,0 +1,30 @@ +{ + "name": "@constructive-io/constructive-store", + "version": "0.0.1", + "description": "Store module — encrypted secrets (platform/org/user), config definitions, user state", + "author": "Constructive ", + "keywords": [ + "postgresql", + "pgpm", + "constructive-store" + ], + "publishConfig": { + "access": "public" + }, + "scripts": { + "bundle": "pgpm package", + "test": "jest", + "test:watch": "jest --watch" + }, + "dependencies": { + "@pgpm/inflection": "*", + "@pgpm/stamps": "*" + }, + "devDependencies": { + "pgpm": "^4.26.1" + }, + "repository": { + "type": "git", + "url": "https://github.com/constructive-io/constructive-functions" + } +} diff --git a/pgpm/constructive-store/pgpm.plan b/pgpm/constructive-store/pgpm.plan new file mode 100644 index 00000000..b6ac30a1 --- /dev/null +++ b/pgpm/constructive-store/pgpm.plan @@ -0,0 +1,236 @@ +%syntax-version=1.0.0 +%project=constructive-store +%uri=constructive-store + +schemas/constructive_store_private/schema 2017-08-11T08:11:51Z Constructive # add create_schema +schemas/constructive_store_public/schema 2017-08-11T08:11:51Z Constructive # add create_schema +schemas/constructive_store_private/tables/org_secrets/table [schemas/constructive_store_private/schema] 2017-08-11T08:11:51Z Constructive # add create_table +schemas/constructive_store_public/tables/platform_config/table [schemas/constructive_store_public/schema] 2017-08-11T08:11:51Z Constructive # add create_table +schemas/constructive_store_private/tables/platform_secrets/table [schemas/constructive_store_private/schema] 2017-08-11T08:11:51Z Constructive # add create_table +schemas/constructive_store_private/tables/user_secrets/table [schemas/constructive_store_private/schema] 2017-08-11T08:11:51Z Constructive # add create_table +schemas/constructive_store_private/tables/user_state/table [schemas/constructive_store_private/schema] 2017-08-11T08:11:51Z Constructive # add create_table +schemas/constructive_store_public/tables/platform_config_definitions/table [schemas/constructive_store_public/schema] 2017-08-11T08:11:51Z Constructive # add create_table +schemas/constructive_store_private/tables/org_secrets/columns/algo/column [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/org_secrets/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_store_private/tables/org_secrets/columns/algo/alterations/alt0000000004 [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/org_secrets/columns/algo/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_store_private/tables/org_secrets/columns/annotations/column [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/org_secrets/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_store_private/tables/org_secrets/columns/annotations/alterations/alt0000000005 [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/org_secrets/table schemas/constructive_store_private/tables/org_secrets/columns/annotations/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_store_private/tables/org_secrets/columns/annotations/alterations/alt0000000006 [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/org_secrets/table schemas/constructive_store_private/tables/org_secrets/columns/annotations/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default +schemas/constructive_store_private/tables/org_secrets/columns/annotations/alterations/alt0000000007 [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/org_secrets/columns/annotations/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_store_private/tables/org_secrets/columns/created_at/column [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/org_secrets/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_store_private/tables/org_secrets/columns/created_at/alterations/alt0000000008 [schemas/constructive_store_private/tables/org_secrets/columns/created_at/column schemas/constructive_store_private/schema schemas/constructive_store_private/tables/org_secrets/table] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default +schemas/constructive_store_private/tables/org_secrets/columns/description/column [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/org_secrets/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_store_private/tables/org_secrets/columns/description/alterations/alt0000000009 [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/org_secrets/columns/description/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_store_private/tables/org_secrets/columns/id/column [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/org_secrets/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_store_private/tables/org_secrets/columns/id/alterations/alt0000000010 [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/org_secrets/columns/id/column schemas/constructive_store_private/tables/org_secrets/table] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_store_private/tables/org_secrets/columns/id/alterations/alt0000000011 [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/org_secrets/columns/id/column schemas/constructive_store_private/tables/org_secrets/table] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default +schemas/constructive_store_private/tables/org_secrets/columns/id/alterations/alt0000000012 [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/org_secrets/columns/id/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_store_private/tables/org_secrets/columns/key_id/column [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/org_secrets/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_store_private/tables/org_secrets/columns/key_id/alterations/alt0000000013 [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/org_secrets/table schemas/constructive_store_private/tables/org_secrets/columns/key_id/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_store_private/tables/org_secrets/columns/key_id/alterations/alt0000000014 [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/org_secrets/table schemas/constructive_store_private/tables/org_secrets/columns/key_id/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default +schemas/constructive_store_private/tables/org_secrets/columns/key_id/alterations/alt0000000015 [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/org_secrets/columns/key_id/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_store_private/tables/org_secrets/columns/labels/column [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/org_secrets/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_store_private/tables/org_secrets/columns/labels/alterations/alt0000000016 [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/org_secrets/table schemas/constructive_store_private/tables/org_secrets/columns/labels/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_store_private/tables/org_secrets/columns/labels/alterations/alt0000000017 [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/org_secrets/table schemas/constructive_store_private/tables/org_secrets/columns/labels/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default +schemas/constructive_store_private/tables/org_secrets/columns/labels/alterations/alt0000000018 [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/org_secrets/columns/labels/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_store_private/tables/org_secrets/columns/name/column [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/org_secrets/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_store_private/tables/org_secrets/columns/name/alterations/alt0000000019 [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/org_secrets/columns/name/column schemas/constructive_store_private/tables/org_secrets/table] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_store_private/tables/org_secrets/columns/name/alterations/alt0000000020 [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/org_secrets/columns/name/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_store_private/tables/org_secrets/columns/namespace_id/column [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/org_secrets/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_store_private/tables/org_secrets/columns/namespace_id/alterations/alt0000000021 [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/org_secrets/columns/namespace_id/column schemas/constructive_store_private/tables/org_secrets/table] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_store_private/tables/org_secrets/columns/namespace_id/alterations/alt0000000022 [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/org_secrets/columns/namespace_id/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_store_private/tables/org_secrets/columns/owner_id/column [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/org_secrets/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_store_private/tables/org_secrets/columns/owner_id/alterations/alt0000000023 [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/org_secrets/table schemas/constructive_store_private/tables/org_secrets/columns/owner_id/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_store_private/tables/org_secrets/columns/owner_id/alterations/alt0000000024 [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/org_secrets/columns/owner_id/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_store_private/tables/org_secrets/columns/updated_at/column [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/org_secrets/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_store_private/tables/org_secrets/columns/updated_at/alterations/alt0000000025 [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/org_secrets/table schemas/constructive_store_private/tables/org_secrets/columns/updated_at/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default +schemas/constructive_store_private/tables/org_secrets/columns/value/column [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/org_secrets/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_store_private/tables/org_secrets/columns/value/alterations/alt0000000026 [schemas/constructive_store_private/tables/org_secrets/columns/value/column schemas/constructive_store_private/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_store_private/tables/platform_secrets/columns/algo/column [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/platform_secrets/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_store_private/tables/platform_secrets/columns/algo/alterations/alt0000000029 [schemas/constructive_store_private/tables/platform_secrets/columns/algo/column schemas/constructive_store_private/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_store_private/tables/platform_secrets/columns/annotations/column [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/platform_secrets/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_store_private/tables/platform_secrets/columns/annotations/alterations/alt0000000030 [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/platform_secrets/table schemas/constructive_store_private/tables/platform_secrets/columns/annotations/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_store_private/tables/platform_secrets/columns/annotations/alterations/alt0000000031 [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/platform_secrets/table schemas/constructive_store_private/tables/platform_secrets/columns/annotations/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default +schemas/constructive_store_private/tables/platform_secrets/columns/annotations/alterations/alt0000000032 [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/platform_secrets/columns/annotations/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_store_private/tables/platform_secrets/columns/created_at/column [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/platform_secrets/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_store_private/tables/platform_secrets/columns/created_at/alterations/alt0000000033 [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/platform_secrets/table schemas/constructive_store_private/tables/platform_secrets/columns/created_at/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default +schemas/constructive_store_private/tables/platform_secrets/columns/database_id/column [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/platform_secrets/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_store_private/tables/platform_secrets/columns/database_id/alterations/alt0000000034 [schemas/constructive_store_private/tables/platform_secrets/columns/database_id/column schemas/constructive_store_private/schema schemas/constructive_store_private/tables/platform_secrets/table] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_store_private/tables/platform_secrets/columns/database_id/alterations/alt0000000035 [schemas/constructive_store_private/tables/platform_secrets/columns/database_id/column schemas/constructive_store_private/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_store_private/tables/platform_secrets/columns/description/column [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/platform_secrets/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_store_private/tables/platform_secrets/columns/description/alterations/alt0000000036 [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/platform_secrets/columns/description/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_store_private/tables/platform_secrets/columns/id/column [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/platform_secrets/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_store_private/tables/platform_secrets/columns/id/alterations/alt0000000037 [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/platform_secrets/columns/id/column schemas/constructive_store_private/tables/platform_secrets/table] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_store_private/tables/platform_secrets/columns/id/alterations/alt0000000038 [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/platform_secrets/columns/id/column schemas/constructive_store_private/tables/platform_secrets/table] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default +schemas/constructive_store_private/tables/platform_secrets/columns/id/alterations/alt0000000039 [schemas/constructive_store_private/tables/platform_secrets/columns/id/column schemas/constructive_store_private/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_store_private/tables/platform_secrets/columns/key_id/column [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/platform_secrets/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_store_private/tables/platform_secrets/columns/key_id/alterations/alt0000000040 [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/platform_secrets/columns/key_id/column schemas/constructive_store_private/tables/platform_secrets/table] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_store_private/tables/platform_secrets/columns/key_id/alterations/alt0000000041 [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/platform_secrets/columns/key_id/column schemas/constructive_store_private/tables/platform_secrets/table] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default +schemas/constructive_store_private/tables/platform_secrets/columns/key_id/alterations/alt0000000042 [schemas/constructive_store_private/tables/platform_secrets/columns/key_id/column schemas/constructive_store_private/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_store_private/tables/platform_secrets/columns/labels/column [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/platform_secrets/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_store_private/tables/platform_secrets/columns/labels/alterations/alt0000000043 [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/platform_secrets/table schemas/constructive_store_private/tables/platform_secrets/columns/labels/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_store_private/tables/platform_secrets/columns/labels/alterations/alt0000000044 [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/platform_secrets/table schemas/constructive_store_private/tables/platform_secrets/columns/labels/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default +schemas/constructive_store_private/tables/platform_secrets/columns/labels/alterations/alt0000000045 [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/platform_secrets/columns/labels/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_store_private/tables/platform_secrets/columns/name/column [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/platform_secrets/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_store_private/tables/platform_secrets/columns/name/alterations/alt0000000046 [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/platform_secrets/columns/name/column schemas/constructive_store_private/tables/platform_secrets/table] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_store_private/tables/platform_secrets/columns/name/alterations/alt0000000047 [schemas/constructive_store_private/tables/platform_secrets/columns/name/column schemas/constructive_store_private/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_store_private/tables/platform_secrets/columns/namespace_id/column [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/platform_secrets/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_store_private/tables/platform_secrets/columns/namespace_id/alterations/alt0000000048 [schemas/constructive_store_private/tables/platform_secrets/columns/namespace_id/column schemas/constructive_store_private/schema schemas/constructive_store_private/tables/platform_secrets/table] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_store_private/tables/platform_secrets/columns/namespace_id/alterations/alt0000000049 [schemas/constructive_store_private/tables/platform_secrets/columns/namespace_id/column schemas/constructive_store_private/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_store_private/tables/platform_secrets/columns/updated_at/column [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/platform_secrets/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_store_private/tables/platform_secrets/columns/updated_at/alterations/alt0000000050 [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/platform_secrets/table schemas/constructive_store_private/tables/platform_secrets/columns/updated_at/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default +schemas/constructive_store_private/tables/platform_secrets/columns/value/column [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/platform_secrets/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_store_private/tables/platform_secrets/columns/value/alterations/alt0000000051 [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/platform_secrets/columns/value/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_store_private/tables/user_secrets/columns/algo/column [schemas/constructive_store_private/tables/user_secrets/table schemas/constructive_store_private/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_store_private/tables/user_secrets/columns/algo/alterations/alt0000000054 [schemas/constructive_store_private/tables/user_secrets/columns/algo/column schemas/constructive_store_private/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_store_private/tables/user_secrets/columns/created_at/column [schemas/constructive_store_private/tables/user_secrets/table schemas/constructive_store_private/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_store_private/tables/user_secrets/columns/created_at/alterations/alt0000000055 [schemas/constructive_store_private/tables/user_secrets/table schemas/constructive_store_private/schema schemas/constructive_store_private/tables/user_secrets/columns/created_at/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default +schemas/constructive_store_private/tables/user_secrets/columns/id/column [schemas/constructive_store_private/tables/user_secrets/table schemas/constructive_store_private/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_store_private/tables/user_secrets/columns/id/alterations/alt0000000056 [schemas/constructive_store_private/tables/user_secrets/table schemas/constructive_store_private/schema schemas/constructive_store_private/tables/user_secrets/columns/id/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_store_private/tables/user_secrets/columns/id/alterations/alt0000000057 [schemas/constructive_store_private/tables/user_secrets/table schemas/constructive_store_private/schema schemas/constructive_store_private/tables/user_secrets/columns/id/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default +schemas/constructive_store_private/tables/user_secrets/columns/id/alterations/alt0000000058 [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/user_secrets/columns/id/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_store_private/tables/user_secrets/columns/name/column [schemas/constructive_store_private/tables/user_secrets/table schemas/constructive_store_private/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_store_private/tables/user_secrets/columns/name/alterations/alt0000000059 [schemas/constructive_store_private/tables/user_secrets/table schemas/constructive_store_private/schema schemas/constructive_store_private/tables/user_secrets/columns/name/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_store_private/tables/user_secrets/columns/name/alterations/alt0000000060 [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/user_secrets/columns/name/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_store_private/tables/user_secrets/columns/owner_id/column [schemas/constructive_store_private/tables/user_secrets/table schemas/constructive_store_private/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_store_private/tables/user_secrets/columns/owner_id/alterations/alt0000000061 [schemas/constructive_store_private/tables/user_secrets/table schemas/constructive_store_private/schema schemas/constructive_store_private/tables/user_secrets/columns/owner_id/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_store_private/tables/user_secrets/columns/owner_id/alterations/alt0000000062 [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/user_secrets/columns/owner_id/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_store_private/tables/user_secrets/columns/updated_at/column [schemas/constructive_store_private/tables/user_secrets/table schemas/constructive_store_private/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_store_private/tables/user_secrets/columns/updated_at/alterations/alt0000000063 [schemas/constructive_store_private/tables/user_secrets/table schemas/constructive_store_private/schema schemas/constructive_store_private/tables/user_secrets/columns/updated_at/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default +schemas/constructive_store_private/tables/user_secrets/columns/value/column [schemas/constructive_store_private/tables/user_secrets/table schemas/constructive_store_private/schema] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_store_private/tables/user_secrets/columns/value/alterations/alt0000000064 [schemas/constructive_store_private/tables/user_secrets/columns/value/column schemas/constructive_store_private/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_store_private/tables/user_state/columns/id/column [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/user_state/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_store_private/tables/user_state/columns/id/alterations/alt0000000067 [schemas/constructive_store_private/tables/user_state/columns/id/column schemas/constructive_store_private/schema schemas/constructive_store_private/tables/user_state/table] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_store_private/tables/user_state/columns/id/alterations/alt0000000068 [schemas/constructive_store_private/tables/user_state/columns/id/column schemas/constructive_store_private/schema schemas/constructive_store_private/tables/user_state/table] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default +schemas/constructive_store_private/tables/user_state/columns/id/alterations/alt0000000069 [schemas/constructive_store_private/tables/user_state/columns/id/column schemas/constructive_store_private/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_store_private/tables/user_state/columns/name/column [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/user_state/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_store_private/tables/user_state/columns/name/alterations/alt0000000070 [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/user_state/columns/name/column schemas/constructive_store_private/tables/user_state/table] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_store_private/tables/user_state/columns/name/alterations/alt0000000071 [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/user_state/columns/name/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_store_private/tables/user_state/columns/owner_id/column [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/user_state/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_store_private/tables/user_state/columns/owner_id/alterations/alt0000000072 [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/user_state/table schemas/constructive_store_private/tables/user_state/columns/owner_id/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_store_private/tables/user_state/columns/owner_id/alterations/alt0000000073 [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/user_state/columns/owner_id/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_store_private/tables/user_state/columns/value/column [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/user_state/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_store_private/tables/user_state/columns/value/alterations/alt0000000074 [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/user_state/columns/value/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_store_public/tables/platform_config/columns/annotations/column [schemas/constructive_store_public/schema schemas/constructive_store_public/tables/platform_config/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_store_public/tables/platform_config/columns/annotations/alterations/alt0000000077 [schemas/constructive_store_public/schema schemas/constructive_store_public/tables/platform_config/table schemas/constructive_store_public/tables/platform_config/columns/annotations/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_store_public/tables/platform_config/columns/annotations/alterations/alt0000000078 [schemas/constructive_store_public/schema schemas/constructive_store_public/tables/platform_config/table schemas/constructive_store_public/tables/platform_config/columns/annotations/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default +schemas/constructive_store_public/tables/platform_config/columns/annotations/alterations/alt0000000079 [schemas/constructive_store_public/schema schemas/constructive_store_public/tables/platform_config/columns/annotations/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_store_public/tables/platform_config/columns/created_at/column [schemas/constructive_store_public/schema schemas/constructive_store_public/tables/platform_config/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_store_public/tables/platform_config/columns/created_at/alterations/alt0000000080 [schemas/constructive_store_public/schema schemas/constructive_store_public/tables/platform_config/table schemas/constructive_store_public/tables/platform_config/columns/created_at/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default +schemas/constructive_store_public/tables/platform_config/columns/description/column [schemas/constructive_store_public/schema schemas/constructive_store_public/tables/platform_config/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_store_public/tables/platform_config/columns/description/alterations/alt0000000081 [schemas/constructive_store_public/schema schemas/constructive_store_public/tables/platform_config/columns/description/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_store_public/tables/platform_config/columns/expires_at/column [schemas/constructive_store_public/schema schemas/constructive_store_public/tables/platform_config/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_store_public/tables/platform_config/columns/expires_at/alterations/alt0000000082 [schemas/constructive_store_public/schema schemas/constructive_store_public/tables/platform_config/columns/expires_at/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_store_public/tables/platform_config/columns/id/column [schemas/constructive_store_public/schema schemas/constructive_store_public/tables/platform_config/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_store_public/tables/platform_config/columns/id/alterations/alt0000000083 [schemas/constructive_store_public/schema schemas/constructive_store_public/tables/platform_config/table schemas/constructive_store_public/tables/platform_config/columns/id/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_store_public/tables/platform_config/columns/id/alterations/alt0000000084 [schemas/constructive_store_public/schema schemas/constructive_store_public/tables/platform_config/table schemas/constructive_store_public/tables/platform_config/columns/id/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default +schemas/constructive_store_public/tables/platform_config/columns/id/alterations/alt0000000085 [schemas/constructive_store_public/schema schemas/constructive_store_public/tables/platform_config/columns/id/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_store_public/tables/platform_config/columns/labels/column [schemas/constructive_store_public/schema schemas/constructive_store_public/tables/platform_config/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_store_public/tables/platform_config/columns/labels/alterations/alt0000000086 [schemas/constructive_store_public/schema schemas/constructive_store_public/tables/platform_config/table schemas/constructive_store_public/tables/platform_config/columns/labels/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_store_public/tables/platform_config/columns/labels/alterations/alt0000000087 [schemas/constructive_store_public/schema schemas/constructive_store_public/tables/platform_config/table schemas/constructive_store_public/tables/platform_config/columns/labels/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default +schemas/constructive_store_public/tables/platform_config/columns/labels/alterations/alt0000000088 [schemas/constructive_store_public/schema schemas/constructive_store_public/tables/platform_config/columns/labels/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_store_public/tables/platform_config/columns/name/column [schemas/constructive_store_public/schema schemas/constructive_store_public/tables/platform_config/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_store_public/tables/platform_config/columns/name/alterations/alt0000000089 [schemas/constructive_store_public/schema schemas/constructive_store_public/tables/platform_config/columns/name/column schemas/constructive_store_public/tables/platform_config/table] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_store_public/tables/platform_config/columns/name/alterations/alt0000000090 [schemas/constructive_store_public/tables/platform_config/columns/name/column schemas/constructive_store_public/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_store_public/tables/platform_config/columns/namespace_id/column [schemas/constructive_store_public/schema schemas/constructive_store_public/tables/platform_config/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_store_public/tables/platform_config/columns/namespace_id/alterations/alt0000000091 [schemas/constructive_store_public/schema schemas/constructive_store_public/tables/platform_config/table schemas/constructive_store_public/tables/platform_config/columns/namespace_id/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_store_public/tables/platform_config/columns/namespace_id/alterations/alt0000000092 [schemas/constructive_store_public/schema schemas/constructive_store_public/tables/platform_config/columns/namespace_id/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_store_public/tables/platform_config/columns/updated_at/column [schemas/constructive_store_public/schema schemas/constructive_store_public/tables/platform_config/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_store_public/tables/platform_config/columns/updated_at/alterations/alt0000000093 [schemas/constructive_store_public/schema schemas/constructive_store_public/tables/platform_config/table schemas/constructive_store_public/tables/platform_config/columns/updated_at/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default +schemas/constructive_store_public/tables/platform_config/columns/value/column [schemas/constructive_store_public/schema schemas/constructive_store_public/tables/platform_config/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_store_public/tables/platform_config/columns/value/alterations/alt0000000094 [schemas/constructive_store_public/tables/platform_config/columns/value/column schemas/constructive_store_public/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_store_public/tables/platform_config_definitions/columns/annotations/column [schemas/constructive_store_public/schema schemas/constructive_store_public/tables/platform_config_definitions/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_store_public/tables/platform_config_definitions/columns/annotations/alterations/alt0000000097 [schemas/constructive_store_public/schema schemas/constructive_store_public/tables/platform_config_definitions/table schemas/constructive_store_public/tables/platform_config_definitions/columns/annotations/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_store_public/tables/platform_config_definitions/columns/annotations/alterations/alt0000000098 [schemas/constructive_store_public/schema schemas/constructive_store_public/tables/platform_config_definitions/table schemas/constructive_store_public/tables/platform_config_definitions/columns/annotations/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default +schemas/constructive_store_public/tables/platform_config_definitions/columns/annotations/alterations/alt0000000099 [schemas/constructive_store_public/schema schemas/constructive_store_public/tables/platform_config_definitions/columns/annotations/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_store_public/tables/platform_config_definitions/columns/created_at/column [schemas/constructive_store_public/schema schemas/constructive_store_public/tables/platform_config_definitions/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_store_public/tables/platform_config_definitions/columns/created_at/alterations/alt0000000100 [schemas/constructive_store_public/schema schemas/constructive_store_public/tables/platform_config_definitions/columns/created_at/column schemas/constructive_store_public/tables/platform_config_definitions/table] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default +schemas/constructive_store_public/tables/platform_config_definitions/columns/default_value/column [schemas/constructive_store_public/schema schemas/constructive_store_public/tables/platform_config_definitions/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_store_public/tables/platform_config_definitions/columns/default_value/alterations/alt0000000101 [schemas/constructive_store_public/schema schemas/constructive_store_public/tables/platform_config_definitions/columns/default_value/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_store_public/tables/platform_config_definitions/columns/description/column [schemas/constructive_store_public/schema schemas/constructive_store_public/tables/platform_config_definitions/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_store_public/tables/platform_config_definitions/columns/description/alterations/alt0000000102 [schemas/constructive_store_public/schema schemas/constructive_store_public/tables/platform_config_definitions/columns/description/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_store_public/tables/platform_config_definitions/columns/id/column [schemas/constructive_store_public/schema schemas/constructive_store_public/tables/platform_config_definitions/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_store_public/tables/platform_config_definitions/columns/id/alterations/alt0000000103 [schemas/constructive_store_public/schema schemas/constructive_store_public/tables/platform_config_definitions/table schemas/constructive_store_public/tables/platform_config_definitions/columns/id/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_store_public/tables/platform_config_definitions/columns/id/alterations/alt0000000104 [schemas/constructive_store_public/schema schemas/constructive_store_public/tables/platform_config_definitions/table schemas/constructive_store_public/tables/platform_config_definitions/columns/id/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default +schemas/constructive_store_public/tables/platform_config_definitions/columns/id/alterations/alt0000000105 [schemas/constructive_store_public/schema schemas/constructive_store_public/tables/platform_config_definitions/columns/id/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_store_public/tables/platform_config_definitions/columns/is_built_in/column [schemas/constructive_store_public/schema schemas/constructive_store_public/tables/platform_config_definitions/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_store_public/tables/platform_config_definitions/columns/is_built_in/alterations/alt0000000106 [schemas/constructive_store_public/schema schemas/constructive_store_public/tables/platform_config_definitions/columns/is_built_in/column schemas/constructive_store_public/tables/platform_config_definitions/table] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_store_public/tables/platform_config_definitions/columns/is_built_in/alterations/alt0000000107 [schemas/constructive_store_public/schema schemas/constructive_store_public/tables/platform_config_definitions/columns/is_built_in/column schemas/constructive_store_public/tables/platform_config_definitions/table] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default +schemas/constructive_store_public/tables/platform_config_definitions/columns/is_built_in/alterations/alt0000000108 [schemas/constructive_store_public/tables/platform_config_definitions/columns/is_built_in/column schemas/constructive_store_public/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_store_public/tables/platform_config_definitions/columns/labels/column [schemas/constructive_store_public/schema schemas/constructive_store_public/tables/platform_config_definitions/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_store_public/tables/platform_config_definitions/columns/labels/alterations/alt0000000109 [schemas/constructive_store_public/schema schemas/constructive_store_public/tables/platform_config_definitions/table schemas/constructive_store_public/tables/platform_config_definitions/columns/labels/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_store_public/tables/platform_config_definitions/columns/labels/alterations/alt0000000110 [schemas/constructive_store_public/schema schemas/constructive_store_public/tables/platform_config_definitions/table schemas/constructive_store_public/tables/platform_config_definitions/columns/labels/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default +schemas/constructive_store_public/tables/platform_config_definitions/columns/labels/alterations/alt0000000111 [schemas/constructive_store_public/schema schemas/constructive_store_public/tables/platform_config_definitions/columns/labels/column] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_store_public/tables/platform_config_definitions/columns/name/column [schemas/constructive_store_public/schema schemas/constructive_store_public/tables/platform_config_definitions/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_store_public/tables/platform_config_definitions/columns/name/alterations/alt0000000112 [schemas/constructive_store_public/tables/platform_config_definitions/columns/name/column schemas/constructive_store_public/schema schemas/constructive_store_public/tables/platform_config_definitions/table] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_not_null +schemas/constructive_store_public/tables/platform_config_definitions/columns/name/alterations/alt0000000113 [schemas/constructive_store_public/tables/platform_config_definitions/columns/name/column schemas/constructive_store_public/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_store_public/tables/platform_config_definitions/columns/updated_at/column [schemas/constructive_store_public/schema schemas/constructive_store_public/tables/platform_config_definitions/table] 2017-08-11T08:11:51Z Constructive # add alter_table_add_column +schemas/constructive_store_public/tables/platform_config_definitions/columns/updated_at/alterations/alt0000000114 [schemas/constructive_store_public/schema schemas/constructive_store_public/tables/platform_config_definitions/table schemas/constructive_store_public/tables/platform_config_definitions/columns/updated_at/column] 2017-08-11T08:11:51Z Constructive # add alter_table_set_column_default +schemas/constructive_store_private/tables/org_secrets/alterations/alt0000000002 [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/org_secrets/table] 2017-08-11T08:11:51Z Constructive # add disable_row_level_security +schemas/constructive_store_private/tables/org_secrets/alterations/alt0000000003 [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/org_secrets/table] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_store_private/tables/platform_secrets/alterations/alt0000000027 [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/platform_secrets/table] 2017-08-11T08:11:51Z Constructive # add disable_row_level_security +schemas/constructive_store_private/tables/platform_secrets/alterations/alt0000000028 [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/platform_secrets/table] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_store_private/tables/user_secrets/alterations/alt0000000052 [schemas/constructive_store_private/tables/user_secrets/table schemas/constructive_store_private/schema] 2017-08-11T08:11:51Z Constructive # add disable_row_level_security +schemas/constructive_store_private/tables/user_secrets/alterations/alt0000000053 [schemas/constructive_store_private/tables/user_secrets/table schemas/constructive_store_private/schema] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_store_private/tables/user_state/alterations/alt0000000065 [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/user_state/table] 2017-08-11T08:11:51Z Constructive # add disable_row_level_security +schemas/constructive_store_private/tables/user_state/alterations/alt0000000066 [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/user_state/table] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_store_public/tables/platform_config/alterations/alt0000000075 [schemas/constructive_store_public/schema schemas/constructive_store_public/tables/platform_config/table] 2017-08-11T08:11:51Z Constructive # add disable_row_level_security +schemas/constructive_store_public/tables/platform_config/alterations/alt0000000076 [schemas/constructive_store_public/schema schemas/constructive_store_public/tables/platform_config/table] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_store_public/tables/platform_config_definitions/alterations/alt0000000095 [schemas/constructive_store_public/schema schemas/constructive_store_public/tables/platform_config_definitions/table] 2017-08-11T08:11:51Z Constructive # add disable_row_level_security +schemas/constructive_store_public/tables/platform_config_definitions/alterations/alt0000000096 [schemas/constructive_store_public/schema schemas/constructive_store_public/tables/platform_config_definitions/table] 2017-08-11T08:11:51Z Constructive # add set_comment +schemas/constructive_store_private/tables/org_secrets/constraints/org_secrets_namespace_id_fkey/constraint [constructive-infra:schemas/constructive_infra_public/tables/platform_namespaces/table schemas/constructive_store_private/schema schemas/constructive_store_private/tables/org_secrets/table constructive-infra:schemas/constructive_infra_public/schema schemas/constructive_store_private/tables/org_secrets/columns/namespace_id/column] 2017-08-11T08:11:51Z Constructive # add alter_table_add_foreign_key +schemas/constructive_store_private/tables/org_secrets/constraints/org_secrets_owner_id_namespace_id_name_key/constraint [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/org_secrets/table schemas/constructive_store_private/tables/org_secrets/columns/owner_id/column schemas/constructive_store_private/tables/org_secrets/columns/namespace_id/column schemas/constructive_store_private/tables/org_secrets/columns/name/column] 2017-08-11T08:11:51Z Constructive # add alter_table_add_unique_constraint +schemas/constructive_store_private/tables/org_secrets/constraints/org_secrets_pkey/constraint [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/org_secrets/table schemas/constructive_store_private/tables/org_secrets/columns/id/column] 2017-08-11T08:11:51Z Constructive # add alter_table_add_primary_key +schemas/constructive_store_private/tables/platform_secrets/constraints/platform_secrets_database_id_namespace_id_name_key/constraint [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/platform_secrets/table schemas/constructive_store_private/tables/platform_secrets/columns/database_id/column schemas/constructive_store_private/tables/platform_secrets/columns/namespace_id/column schemas/constructive_store_private/tables/platform_secrets/columns/name/column] 2017-08-11T08:11:51Z Constructive # add alter_table_add_unique_constraint +schemas/constructive_store_private/tables/platform_secrets/constraints/platform_secrets_namespace_id_fkey/constraint [constructive-infra:schemas/constructive_infra_public/tables/platform_namespaces/table schemas/constructive_store_private/schema schemas/constructive_store_private/tables/platform_secrets/table constructive-infra:schemas/constructive_infra_public/schema schemas/constructive_store_private/tables/platform_secrets/columns/namespace_id/column] 2017-08-11T08:11:51Z Constructive # add alter_table_add_foreign_key +schemas/constructive_store_private/tables/platform_secrets/constraints/platform_secrets_pkey/constraint [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/platform_secrets/table schemas/constructive_store_private/tables/platform_secrets/columns/id/column] 2017-08-11T08:11:51Z Constructive # add alter_table_add_primary_key +schemas/constructive_store_private/tables/user_secrets/constraints/user_secrets_owner_id_name_key/constraint [schemas/constructive_store_private/tables/user_secrets/table schemas/constructive_store_private/schema schemas/constructive_store_private/tables/user_secrets/columns/owner_id/column schemas/constructive_store_private/tables/user_secrets/columns/name/column] 2017-08-11T08:11:51Z Constructive # add alter_table_add_unique_constraint +schemas/constructive_store_private/tables/user_secrets/constraints/user_secrets_pkey/constraint [schemas/constructive_store_private/tables/user_secrets/table schemas/constructive_store_private/schema schemas/constructive_store_private/tables/user_secrets/columns/id/column] 2017-08-11T08:11:51Z Constructive # add alter_table_add_primary_key +schemas/constructive_store_private/tables/user_state/constraints/user_states_owner_id_name_key/constraint [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/user_state/table schemas/constructive_store_private/tables/user_state/columns/owner_id/column schemas/constructive_store_private/tables/user_state/columns/name/column] 2017-08-11T08:11:51Z Constructive # add alter_table_add_unique_constraint +schemas/constructive_store_private/tables/user_state/constraints/user_states_pkey/constraint [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/user_state/table schemas/constructive_store_private/tables/user_state/columns/id/column] 2017-08-11T08:11:51Z Constructive # add alter_table_add_primary_key +schemas/constructive_store_public/tables/platform_config/constraints/platform_configs_namespace_id_fkey/constraint [schemas/constructive_store_public/schema constructive-infra:schemas/constructive_infra_public/tables/platform_namespaces/table schemas/constructive_store_public/tables/platform_config/table constructive-infra:schemas/constructive_infra_public/schema schemas/constructive_store_public/tables/platform_config/columns/namespace_id/column] 2017-08-11T08:11:51Z Constructive # add alter_table_add_foreign_key +schemas/constructive_store_public/tables/platform_config/constraints/platform_configs_namespace_id_name_key/constraint [schemas/constructive_store_public/schema schemas/constructive_store_public/tables/platform_config/table schemas/constructive_store_public/tables/platform_config/columns/namespace_id/column schemas/constructive_store_public/tables/platform_config/columns/name/column] 2017-08-11T08:11:51Z Constructive # add alter_table_add_unique_constraint +schemas/constructive_store_public/tables/platform_config/constraints/platform_configs_pkey/constraint [schemas/constructive_store_public/schema schemas/constructive_store_public/tables/platform_config/table schemas/constructive_store_public/tables/platform_config/columns/id/column] 2017-08-11T08:11:51Z Constructive # add alter_table_add_primary_key +schemas/constructive_store_public/tables/platform_config_definitions/constraints/platform_config_definitions_name_key/constraint [schemas/constructive_store_public/schema schemas/constructive_store_public/tables/platform_config_definitions/table schemas/constructive_store_public/tables/platform_config_definitions/columns/name/column] 2017-08-11T08:11:51Z Constructive # add alter_table_add_unique_constraint +schemas/constructive_store_public/tables/platform_config_definitions/constraints/platform_config_definitions_pkey/constraint [schemas/constructive_store_public/schema schemas/constructive_store_public/tables/platform_config_definitions/table schemas/constructive_store_public/tables/platform_config_definitions/columns/id/column] 2017-08-11T08:11:51Z Constructive # add alter_table_add_primary_key +schemas/constructive_store_private/tables/org_secrets/indexes/org_secrets_created_at_idx [schemas/constructive_store_private/tables/org_secrets/columns/created_at/column schemas/constructive_store_private/schema schemas/constructive_store_private/tables/org_secrets/table] 2017-08-11T08:11:51Z Constructive # add create_index +schemas/constructive_store_private/tables/org_secrets/indexes/org_secrets_updated_at_idx [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/org_secrets/table schemas/constructive_store_private/tables/org_secrets/columns/updated_at/column] 2017-08-11T08:11:51Z Constructive # add create_index +schemas/constructive_store_private/tables/platform_secrets/indexes/platform_secrets_created_at_idx [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/platform_secrets/table schemas/constructive_store_private/tables/platform_secrets/columns/created_at/column] 2017-08-11T08:11:51Z Constructive # add create_index +schemas/constructive_store_private/tables/platform_secrets/indexes/platform_secrets_updated_at_idx [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/platform_secrets/table schemas/constructive_store_private/tables/platform_secrets/columns/updated_at/column] 2017-08-11T08:11:51Z Constructive # add create_index +schemas/constructive_store_private/tables/user_secrets/indexes/user_secrets_created_at_idx [schemas/constructive_store_private/tables/user_secrets/table schemas/constructive_store_private/schema schemas/constructive_store_private/tables/user_secrets/columns/created_at/column] 2017-08-11T08:11:51Z Constructive # add create_index +schemas/constructive_store_private/tables/user_secrets/indexes/user_secrets_updated_at_idx [schemas/constructive_store_private/tables/user_secrets/table schemas/constructive_store_private/schema schemas/constructive_store_private/tables/user_secrets/columns/updated_at/column] 2017-08-11T08:11:51Z Constructive # add create_index +schemas/constructive_store_public/tables/platform_config/indexes/platform_config_created_at_idx [schemas/constructive_store_public/schema schemas/constructive_store_public/tables/platform_config/table schemas/constructive_store_public/tables/platform_config/columns/created_at/column] 2017-08-11T08:11:51Z Constructive # add create_index +schemas/constructive_store_public/tables/platform_config/indexes/platform_config_updated_at_idx [schemas/constructive_store_public/schema schemas/constructive_store_public/tables/platform_config/table schemas/constructive_store_public/tables/platform_config/columns/updated_at/column] 2017-08-11T08:11:51Z Constructive # add create_index +schemas/constructive_store_public/tables/platform_config_definitions/indexes/platform_config_definitions_created_at_idx [schemas/constructive_store_public/tables/platform_config_definitions/columns/created_at/column schemas/constructive_store_public/schema schemas/constructive_store_public/tables/platform_config_definitions/table] 2017-08-11T08:11:51Z Constructive # add create_index +schemas/constructive_store_public/tables/platform_config_definitions/indexes/platform_config_definitions_updated_at_idx [schemas/constructive_store_public/schema schemas/constructive_store_public/tables/platform_config_definitions/table schemas/constructive_store_public/tables/platform_config_definitions/columns/updated_at/column] 2017-08-11T08:11:51Z Constructive # add create_index +schemas/constructive_store_private/trigger_fns/org_secrets_hash [schemas/constructive_store_private/schema] 2017-08-11T08:11:51Z Constructive # add create_trigger_function +schemas/constructive_store_private/trigger_fns/platform_secrets_hash [schemas/constructive_store_private/schema] 2017-08-11T08:11:51Z Constructive # add create_trigger_function +schemas/constructive_store_private/trigger_fns/user_secrets_hash [schemas/constructive_store_private/schema] 2017-08-11T08:11:51Z Constructive # add create_trigger_function +schemas/constructive_store_private/procedures/org_secrets_get/procedure [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/org_secrets/table] 2017-08-11T08:11:51Z Constructive # add org_secrets_get_fn +schemas/constructive_store_private/procedures/org_secrets_verify/procedure [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/org_secrets/table] 2017-08-11T08:11:51Z Constructive # add org_secrets_verify_fn +schemas/constructive_store_private/procedures/platform_config_get/procedure [constructive-infra:schemas/constructive_infra_public/tables/platform_namespaces/table schemas/constructive_store_private/schema schemas/constructive_store_public/tables/platform_config/table] 2017-08-11T08:11:51Z Constructive # add app_config_get_fn +schemas/constructive_store_private/procedures/platform_secrets_get/procedure [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/platform_secrets/table] 2017-08-11T08:11:51Z Constructive # add app_secrets_get_fn +schemas/constructive_store_private/procedures/platform_secrets_verify/procedure [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/platform_secrets/table] 2017-08-11T08:11:51Z Constructive # add app_secrets_verify_fn +schemas/constructive_store_private/procedures/user_secrets_del/procedure [schemas/constructive_store_private/tables/user_secrets/table schemas/constructive_store_private/schema] 2017-08-11T08:11:51Z Constructive # add user_secrets_remove +schemas/constructive_store_private/procedures/user_secrets_get/procedure [schemas/constructive_store_private/tables/user_secrets/table schemas/constructive_store_private/schema] 2017-08-11T08:11:51Z Constructive # add secrets_get_fn +schemas/constructive_store_private/procedures/user_secrets_set/procedure [schemas/constructive_store_private/tables/user_secrets/table schemas/constructive_store_private/schema] 2017-08-11T08:11:51Z Constructive # add secrets_upsert_fn +schemas/constructive_store_private/procedures/user_secrets_verify/procedure [schemas/constructive_store_private/tables/user_secrets/table schemas/constructive_store_private/schema] 2017-08-11T08:11:51Z Constructive # add secrets_verify_fn +schemas/constructive_store_private/procedures/user_state_del/procedure [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/user_state/table] 2017-08-11T08:11:51Z Constructive # add basic_user_state_delete +schemas/constructive_store_private/procedures/user_state_del/procedure/alterations/alt0000000001 [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/user_state/table] 2017-08-11T08:11:51Z Constructive # add basic_user_state_delete_array +schemas/constructive_store_private/procedures/user_state_get/procedure [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/user_state/table] 2017-08-11T08:11:51Z Constructive # add basic_user_state_getter +schemas/constructive_store_private/procedures/user_state_set/procedure [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/user_state/table] 2017-08-11T08:11:51Z Constructive # add basic_user_state_upsert +schemas/constructive_store_public/procedures/org_secrets_del/procedure [schemas/constructive_store_public/schema schemas/constructive_store_private/tables/org_secrets/table] 2017-08-11T08:11:51Z Constructive # add org_secrets_remove_fn +schemas/constructive_store_public/procedures/org_secrets_remove_array/procedure [schemas/constructive_store_public/schema schemas/constructive_store_private/tables/org_secrets/table] 2017-08-11T08:11:51Z Constructive # add org_secrets_remove_array_fn +schemas/constructive_store_public/procedures/org_secrets_set/procedure [schemas/constructive_store_public/schema schemas/constructive_store_private/tables/org_secrets/table] 2017-08-11T08:11:51Z Constructive # add org_secrets_upsert_fn +schemas/constructive_store_public/procedures/platform_secrets_del/procedure [schemas/constructive_store_public/schema schemas/constructive_store_private/tables/platform_secrets/table] 2017-08-11T08:11:51Z Constructive # add app_secrets_remove_fn +schemas/constructive_store_public/procedures/platform_secrets_set/procedure [schemas/constructive_store_public/schema schemas/constructive_store_private/tables/platform_secrets/table] 2017-08-11T08:11:51Z Constructive # add app_secrets_upsert_fn +schemas/constructive_store_private/tables/org_secrets/triggers/org_secrets_insert_tg [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/org_secrets/table schemas/constructive_store_private/trigger_fns/org_secrets_hash] 2017-08-11T08:11:51Z Constructive # add create_trigger +schemas/constructive_store_private/tables/org_secrets/triggers/org_secrets_update_tg [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/org_secrets/table schemas/constructive_store_private/trigger_fns/org_secrets_hash] 2017-08-11T08:11:51Z Constructive # add create_trigger_distinct_fields +schemas/constructive_store_private/tables/org_secrets/triggers/timestamps_tg [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/org_secrets/table] 2017-08-11T08:11:51Z Constructive # add create_trigger +schemas/constructive_store_private/tables/platform_secrets/triggers/platform_secrets_insert_tg [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/platform_secrets/table schemas/constructive_store_private/trigger_fns/platform_secrets_hash] 2017-08-11T08:11:51Z Constructive # add create_trigger +schemas/constructive_store_private/tables/platform_secrets/triggers/platform_secrets_update_tg [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/platform_secrets/table schemas/constructive_store_private/trigger_fns/platform_secrets_hash] 2017-08-11T08:11:51Z Constructive # add create_trigger_distinct_fields +schemas/constructive_store_private/tables/platform_secrets/triggers/timestamps_tg [schemas/constructive_store_private/schema schemas/constructive_store_private/tables/platform_secrets/table] 2017-08-11T08:11:51Z Constructive # add create_trigger +schemas/constructive_store_private/tables/user_secrets/triggers/timestamps_tg [schemas/constructive_store_private/tables/user_secrets/table schemas/constructive_store_private/schema] 2017-08-11T08:11:51Z Constructive # add create_trigger +schemas/constructive_store_private/tables/user_secrets/triggers/user_secrets_insert_tg [schemas/constructive_store_private/tables/user_secrets/table schemas/constructive_store_private/schema schemas/constructive_store_private/trigger_fns/user_secrets_hash] 2017-08-11T08:11:51Z Constructive # add create_trigger +schemas/constructive_store_private/tables/user_secrets/triggers/user_secrets_update_tg [schemas/constructive_store_private/tables/user_secrets/table schemas/constructive_store_private/schema schemas/constructive_store_private/trigger_fns/user_secrets_hash] 2017-08-11T08:11:51Z Constructive # add create_trigger_distinct_fields +schemas/constructive_store_public/tables/platform_config/triggers/timestamps_tg [schemas/constructive_store_public/schema schemas/constructive_store_public/tables/platform_config/table] 2017-08-11T08:11:51Z Constructive # add create_trigger +schemas/constructive_store_public/tables/platform_config_definitions/triggers/timestamps_tg [schemas/constructive_store_public/schema schemas/constructive_store_public/tables/platform_config_definitions/table] 2017-08-11T08:11:51Z Constructive # add create_trigger diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/procedures/org_secrets_get/procedure.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/procedures/org_secrets_get/procedure.sql new file mode 100644 index 00000000..e8395680 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/procedures/org_secrets_get/procedure.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_private/procedures/org_secrets_get/procedure + + +DROP FUNCTION "constructive_store_private".org_secrets_get; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/procedures/org_secrets_verify/procedure.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/procedures/org_secrets_verify/procedure.sql new file mode 100644 index 00000000..09db7888 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/procedures/org_secrets_verify/procedure.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_private/procedures/org_secrets_verify/procedure + + +DROP FUNCTION "constructive_store_private".org_secrets_verify; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/procedures/platform_config_get/procedure.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/procedures/platform_config_get/procedure.sql new file mode 100644 index 00000000..7185c99e --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/procedures/platform_config_get/procedure.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_private/procedures/platform_config_get/procedure + + +DROP FUNCTION "constructive_store_private".platform_config_get; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/procedures/platform_secrets_get/procedure.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/procedures/platform_secrets_get/procedure.sql new file mode 100644 index 00000000..e729eda4 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/procedures/platform_secrets_get/procedure.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_private/procedures/platform_secrets_get/procedure + + +DROP FUNCTION "constructive_store_private".platform_secrets_get; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/procedures/platform_secrets_verify/procedure.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/procedures/platform_secrets_verify/procedure.sql new file mode 100644 index 00000000..a221c825 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/procedures/platform_secrets_verify/procedure.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_private/procedures/platform_secrets_verify/procedure + + +DROP FUNCTION "constructive_store_private".platform_secrets_verify; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/procedures/user_secrets_del/procedure.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/procedures/user_secrets_del/procedure.sql new file mode 100644 index 00000000..a38ad032 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/procedures/user_secrets_del/procedure.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_private/procedures/user_secrets_del/procedure + + +DROP FUNCTION "constructive_store_private".user_secrets_del; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/procedures/user_secrets_get/procedure.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/procedures/user_secrets_get/procedure.sql new file mode 100644 index 00000000..9fe3b7f9 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/procedures/user_secrets_get/procedure.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_private/procedures/user_secrets_get/procedure + + +DROP FUNCTION "constructive_store_private".user_secrets_get; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/procedures/user_secrets_set/procedure.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/procedures/user_secrets_set/procedure.sql new file mode 100644 index 00000000..d53087c5 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/procedures/user_secrets_set/procedure.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_private/procedures/user_secrets_set/procedure + + +DROP FUNCTION "constructive_store_private".user_secrets_set; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/procedures/user_secrets_verify/procedure.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/procedures/user_secrets_verify/procedure.sql new file mode 100644 index 00000000..66879dac --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/procedures/user_secrets_verify/procedure.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_private/procedures/user_secrets_verify/procedure + + +DROP FUNCTION "constructive_store_private".user_secrets_verify; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/procedures/user_state_del/procedure.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/procedures/user_state_del/procedure.sql new file mode 100644 index 00000000..1b3f6a2c --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/procedures/user_state_del/procedure.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_private/procedures/user_state_del/procedure + + +DROP FUNCTION "constructive_store_private".user_state_del; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/procedures/user_state_del/procedure/alterations/alt0000000001.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/procedures/user_state_del/procedure/alterations/alt0000000001.sql new file mode 100644 index 00000000..b3a5385d --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/procedures/user_state_del/procedure/alterations/alt0000000001.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_private/procedures/user_state_del/procedure/alterations/alt0000000001 + + +DROP FUNCTION "constructive_store_private".user_state_del; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/procedures/user_state_get/procedure.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/procedures/user_state_get/procedure.sql new file mode 100644 index 00000000..4f71f214 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/procedures/user_state_get/procedure.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_private/procedures/user_state_get/procedure + + +DROP FUNCTION "constructive_store_private".user_state_get; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/procedures/user_state_set/procedure.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/procedures/user_state_set/procedure.sql new file mode 100644 index 00000000..424fed4a --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/procedures/user_state_set/procedure.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_private/procedures/user_state_set/procedure + + +DROP FUNCTION "constructive_store_private".user_state_set; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/schema.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/schema.sql new file mode 100644 index 00000000..bbf047aa --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/schema.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_private/schema + + +DROP SCHEMA "constructive_store_private" CASCADE; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/alterations/alt0000000002.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/alterations/alt0000000002.sql new file mode 100644 index 00000000..4abb2c09 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/alterations/alt0000000002.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/org_secrets/alterations/alt0000000002 + + +ALTER TABLE "constructive_store_private".org_secrets + ENABLE ROW LEVEL SECURITY; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/alterations/alt0000000003.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/alterations/alt0000000003.sql new file mode 100644 index 00000000..98dce030 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/alterations/alt0000000003.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_private/tables/org_secrets/alterations/alt0000000003 + + +COMMENT ON TABLE "constructive_store_private".org_secrets IS NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/algo/alterations/alt0000000004.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/algo/alterations/alt0000000004.sql new file mode 100644 index 00000000..756a9785 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/algo/alterations/alt0000000004.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_private/tables/org_secrets/columns/algo/alterations/alt0000000004 + + +COMMENT ON COLUMN "constructive_store_private".org_secrets.algo IS NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/algo/column.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/algo/column.sql new file mode 100644 index 00000000..e5e5670c --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/algo/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/org_secrets/columns/algo/column + + +ALTER TABLE "constructive_store_private".org_secrets + DROP COLUMN algo RESTRICT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/annotations/alterations/alt0000000005.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/annotations/alterations/alt0000000005.sql new file mode 100644 index 00000000..d50ea6ff --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/annotations/alterations/alt0000000005.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/org_secrets/columns/annotations/alterations/alt0000000005 + + +ALTER TABLE "constructive_store_private".org_secrets + ALTER COLUMN annotations DROP NOT NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/annotations/alterations/alt0000000006.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/annotations/alterations/alt0000000006.sql new file mode 100644 index 00000000..e7324ac0 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/annotations/alterations/alt0000000006.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/org_secrets/columns/annotations/alterations/alt0000000006 + + +ALTER TABLE "constructive_store_private".org_secrets + ALTER COLUMN annotations DROP DEFAULT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/annotations/alterations/alt0000000007.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/annotations/alterations/alt0000000007.sql new file mode 100644 index 00000000..f4112771 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/annotations/alterations/alt0000000007.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_private/tables/org_secrets/columns/annotations/alterations/alt0000000007 + + +COMMENT ON COLUMN "constructive_store_private".org_secrets.annotations IS NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/annotations/column.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/annotations/column.sql new file mode 100644 index 00000000..f9299667 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/annotations/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/org_secrets/columns/annotations/column + + +ALTER TABLE "constructive_store_private".org_secrets + DROP COLUMN annotations RESTRICT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/created_at/alterations/alt0000000008.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/created_at/alterations/alt0000000008.sql new file mode 100644 index 00000000..4bf1572b --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/created_at/alterations/alt0000000008.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/org_secrets/columns/created_at/alterations/alt0000000008 + + +ALTER TABLE "constructive_store_private".org_secrets + ALTER COLUMN created_at DROP DEFAULT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/created_at/column.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/created_at/column.sql new file mode 100644 index 00000000..1ca84d54 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/created_at/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/org_secrets/columns/created_at/column + + +ALTER TABLE "constructive_store_private".org_secrets + DROP COLUMN created_at RESTRICT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/description/alterations/alt0000000009.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/description/alterations/alt0000000009.sql new file mode 100644 index 00000000..78b5dc3e --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/description/alterations/alt0000000009.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_private/tables/org_secrets/columns/description/alterations/alt0000000009 + + +COMMENT ON COLUMN "constructive_store_private".org_secrets.description IS NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/description/column.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/description/column.sql new file mode 100644 index 00000000..e36f4069 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/description/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/org_secrets/columns/description/column + + +ALTER TABLE "constructive_store_private".org_secrets + DROP COLUMN description RESTRICT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/id/alterations/alt0000000010.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/id/alterations/alt0000000010.sql new file mode 100644 index 00000000..9412dbc0 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/id/alterations/alt0000000010.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/org_secrets/columns/id/alterations/alt0000000010 + + +ALTER TABLE "constructive_store_private".org_secrets + ALTER COLUMN id DROP NOT NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/id/alterations/alt0000000011.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/id/alterations/alt0000000011.sql new file mode 100644 index 00000000..5c9f7113 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/id/alterations/alt0000000011.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/org_secrets/columns/id/alterations/alt0000000011 + + +ALTER TABLE "constructive_store_private".org_secrets + ALTER COLUMN id DROP DEFAULT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/id/alterations/alt0000000012.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/id/alterations/alt0000000012.sql new file mode 100644 index 00000000..1caa33b0 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/id/alterations/alt0000000012.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_private/tables/org_secrets/columns/id/alterations/alt0000000012 + + +COMMENT ON COLUMN "constructive_store_private".org_secrets.id IS NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/id/column.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/id/column.sql new file mode 100644 index 00000000..6801b3a7 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/id/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/org_secrets/columns/id/column + + +ALTER TABLE "constructive_store_private".org_secrets + DROP COLUMN id RESTRICT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/key_id/alterations/alt0000000013.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/key_id/alterations/alt0000000013.sql new file mode 100644 index 00000000..f62d3bbe --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/key_id/alterations/alt0000000013.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/org_secrets/columns/key_id/alterations/alt0000000013 + + +ALTER TABLE "constructive_store_private".org_secrets + ALTER COLUMN key_id DROP NOT NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/key_id/alterations/alt0000000014.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/key_id/alterations/alt0000000014.sql new file mode 100644 index 00000000..079158a0 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/key_id/alterations/alt0000000014.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/org_secrets/columns/key_id/alterations/alt0000000014 + + +ALTER TABLE "constructive_store_private".org_secrets + ALTER COLUMN key_id DROP DEFAULT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/key_id/alterations/alt0000000015.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/key_id/alterations/alt0000000015.sql new file mode 100644 index 00000000..6fc14fec --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/key_id/alterations/alt0000000015.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_private/tables/org_secrets/columns/key_id/alterations/alt0000000015 + + +COMMENT ON COLUMN "constructive_store_private".org_secrets.key_id IS NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/key_id/column.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/key_id/column.sql new file mode 100644 index 00000000..b6883340 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/key_id/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/org_secrets/columns/key_id/column + + +ALTER TABLE "constructive_store_private".org_secrets + DROP COLUMN key_id RESTRICT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/labels/alterations/alt0000000016.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/labels/alterations/alt0000000016.sql new file mode 100644 index 00000000..d4fbd384 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/labels/alterations/alt0000000016.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/org_secrets/columns/labels/alterations/alt0000000016 + + +ALTER TABLE "constructive_store_private".org_secrets + ALTER COLUMN labels DROP NOT NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/labels/alterations/alt0000000017.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/labels/alterations/alt0000000017.sql new file mode 100644 index 00000000..9661d71e --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/labels/alterations/alt0000000017.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/org_secrets/columns/labels/alterations/alt0000000017 + + +ALTER TABLE "constructive_store_private".org_secrets + ALTER COLUMN labels DROP DEFAULT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/labels/alterations/alt0000000018.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/labels/alterations/alt0000000018.sql new file mode 100644 index 00000000..061ddd5c --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/labels/alterations/alt0000000018.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_private/tables/org_secrets/columns/labels/alterations/alt0000000018 + + +COMMENT ON COLUMN "constructive_store_private".org_secrets.labels IS NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/labels/column.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/labels/column.sql new file mode 100644 index 00000000..952376ab --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/labels/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/org_secrets/columns/labels/column + + +ALTER TABLE "constructive_store_private".org_secrets + DROP COLUMN labels RESTRICT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/name/alterations/alt0000000019.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/name/alterations/alt0000000019.sql new file mode 100644 index 00000000..b53cbc28 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/name/alterations/alt0000000019.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/org_secrets/columns/name/alterations/alt0000000019 + + +ALTER TABLE "constructive_store_private".org_secrets + ALTER COLUMN name DROP NOT NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/name/alterations/alt0000000020.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/name/alterations/alt0000000020.sql new file mode 100644 index 00000000..f5b6f9c4 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/name/alterations/alt0000000020.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_private/tables/org_secrets/columns/name/alterations/alt0000000020 + + +COMMENT ON COLUMN "constructive_store_private".org_secrets.name IS NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/name/column.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/name/column.sql new file mode 100644 index 00000000..0a81fa2b --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/name/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/org_secrets/columns/name/column + + +ALTER TABLE "constructive_store_private".org_secrets + DROP COLUMN name RESTRICT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/namespace_id/alterations/alt0000000021.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/namespace_id/alterations/alt0000000021.sql new file mode 100644 index 00000000..8186886f --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/namespace_id/alterations/alt0000000021.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/org_secrets/columns/namespace_id/alterations/alt0000000021 + + +ALTER TABLE "constructive_store_private".org_secrets + ALTER COLUMN namespace_id DROP NOT NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/namespace_id/alterations/alt0000000022.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/namespace_id/alterations/alt0000000022.sql new file mode 100644 index 00000000..6f89be3e --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/namespace_id/alterations/alt0000000022.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_private/tables/org_secrets/columns/namespace_id/alterations/alt0000000022 + + +COMMENT ON COLUMN "constructive_store_private".org_secrets.namespace_id IS NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/namespace_id/column.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/namespace_id/column.sql new file mode 100644 index 00000000..79a15a07 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/namespace_id/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/org_secrets/columns/namespace_id/column + + +ALTER TABLE "constructive_store_private".org_secrets + DROP COLUMN namespace_id RESTRICT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/owner_id/alterations/alt0000000023.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/owner_id/alterations/alt0000000023.sql new file mode 100644 index 00000000..9e9a9607 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/owner_id/alterations/alt0000000023.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/org_secrets/columns/owner_id/alterations/alt0000000023 + + +ALTER TABLE "constructive_store_private".org_secrets + ALTER COLUMN owner_id DROP NOT NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/owner_id/alterations/alt0000000024.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/owner_id/alterations/alt0000000024.sql new file mode 100644 index 00000000..f9cd81c6 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/owner_id/alterations/alt0000000024.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_private/tables/org_secrets/columns/owner_id/alterations/alt0000000024 + + +COMMENT ON COLUMN "constructive_store_private".org_secrets.owner_id IS NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/owner_id/column.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/owner_id/column.sql new file mode 100644 index 00000000..3aaf74aa --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/owner_id/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/org_secrets/columns/owner_id/column + + +ALTER TABLE "constructive_store_private".org_secrets + DROP COLUMN owner_id RESTRICT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/updated_at/alterations/alt0000000025.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/updated_at/alterations/alt0000000025.sql new file mode 100644 index 00000000..066810f3 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/updated_at/alterations/alt0000000025.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/org_secrets/columns/updated_at/alterations/alt0000000025 + + +ALTER TABLE "constructive_store_private".org_secrets + ALTER COLUMN updated_at DROP DEFAULT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/updated_at/column.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/updated_at/column.sql new file mode 100644 index 00000000..0f2a63d5 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/updated_at/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/org_secrets/columns/updated_at/column + + +ALTER TABLE "constructive_store_private".org_secrets + DROP COLUMN updated_at RESTRICT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/value/alterations/alt0000000026.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/value/alterations/alt0000000026.sql new file mode 100644 index 00000000..f3bc5b06 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/value/alterations/alt0000000026.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_private/tables/org_secrets/columns/value/alterations/alt0000000026 + + +COMMENT ON COLUMN "constructive_store_private".org_secrets.value IS NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/value/column.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/value/column.sql new file mode 100644 index 00000000..f1e8377a --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/columns/value/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/org_secrets/columns/value/column + + +ALTER TABLE "constructive_store_private".org_secrets + DROP COLUMN value RESTRICT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/constraints/org_secrets_namespace_id_fkey/constraint.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/constraints/org_secrets_namespace_id_fkey/constraint.sql new file mode 100644 index 00000000..9c475f85 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/constraints/org_secrets_namespace_id_fkey/constraint.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/org_secrets/constraints/org_secrets_namespace_id_fkey/constraint + + +ALTER TABLE "constructive_store_private".org_secrets + DROP CONSTRAINT org_secrets_namespace_id_fkey; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/constraints/org_secrets_owner_id_namespace_id_name_key/constraint.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/constraints/org_secrets_owner_id_namespace_id_name_key/constraint.sql new file mode 100644 index 00000000..0c7e873a --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/constraints/org_secrets_owner_id_namespace_id_name_key/constraint.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/org_secrets/constraints/org_secrets_owner_id_namespace_id_name_key/constraint + + +ALTER TABLE "constructive_store_private".org_secrets + DROP CONSTRAINT org_secrets_owner_id_namespace_id_name_key; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/constraints/org_secrets_pkey/constraint.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/constraints/org_secrets_pkey/constraint.sql new file mode 100644 index 00000000..22a59eb8 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/constraints/org_secrets_pkey/constraint.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/org_secrets/constraints/org_secrets_pkey/constraint + + +ALTER TABLE "constructive_store_private".org_secrets + DROP CONSTRAINT org_secrets_pkey; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/indexes/org_secrets_created_at_idx.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/indexes/org_secrets_created_at_idx.sql new file mode 100644 index 00000000..c50aa3ac --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/indexes/org_secrets_created_at_idx.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_private/tables/org_secrets/indexes/org_secrets_created_at_idx + + +DROP INDEX "constructive_store_private".org_secrets_created_at_idx; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/indexes/org_secrets_updated_at_idx.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/indexes/org_secrets_updated_at_idx.sql new file mode 100644 index 00000000..f300cb3c --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/indexes/org_secrets_updated_at_idx.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_private/tables/org_secrets/indexes/org_secrets_updated_at_idx + + +DROP INDEX "constructive_store_private".org_secrets_updated_at_idx; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/table.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/table.sql new file mode 100644 index 00000000..1941399d --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/table.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_private/tables/org_secrets/table + + +DROP TABLE "constructive_store_private".org_secrets; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/triggers/org_secrets_insert_tg.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/triggers/org_secrets_insert_tg.sql new file mode 100644 index 00000000..541e28e9 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/triggers/org_secrets_insert_tg.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_private/tables/org_secrets/triggers/org_secrets_insert_tg + + +DROP TRIGGER org_secrets_insert_tg ON "constructive_store_private".org_secrets; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/triggers/org_secrets_update_tg.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/triggers/org_secrets_update_tg.sql new file mode 100644 index 00000000..7ed0bb42 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/triggers/org_secrets_update_tg.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_private/tables/org_secrets/triggers/org_secrets_update_tg + + +DROP TRIGGER org_secrets_update_tg ON "constructive_store_private".org_secrets; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/triggers/timestamps_tg.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/triggers/timestamps_tg.sql new file mode 100644 index 00000000..95274bd9 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/org_secrets/triggers/timestamps_tg.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_private/tables/org_secrets/triggers/timestamps_tg + + +DROP TRIGGER timestamps_tg ON "constructive_store_private".org_secrets; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/alterations/alt0000000027.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/alterations/alt0000000027.sql new file mode 100644 index 00000000..5bd526b2 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/alterations/alt0000000027.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/platform_secrets/alterations/alt0000000027 + + +ALTER TABLE "constructive_store_private".platform_secrets + ENABLE ROW LEVEL SECURITY; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/alterations/alt0000000028.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/alterations/alt0000000028.sql new file mode 100644 index 00000000..4da3d549 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/alterations/alt0000000028.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_private/tables/platform_secrets/alterations/alt0000000028 + + +COMMENT ON TABLE "constructive_store_private".platform_secrets IS NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/algo/alterations/alt0000000029.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/algo/alterations/alt0000000029.sql new file mode 100644 index 00000000..e80b01d8 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/algo/alterations/alt0000000029.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_private/tables/platform_secrets/columns/algo/alterations/alt0000000029 + + +COMMENT ON COLUMN "constructive_store_private".platform_secrets.algo IS NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/algo/column.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/algo/column.sql new file mode 100644 index 00000000..bd45c95a --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/algo/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/platform_secrets/columns/algo/column + + +ALTER TABLE "constructive_store_private".platform_secrets + DROP COLUMN algo RESTRICT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/annotations/alterations/alt0000000030.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/annotations/alterations/alt0000000030.sql new file mode 100644 index 00000000..7701f79a --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/annotations/alterations/alt0000000030.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/platform_secrets/columns/annotations/alterations/alt0000000030 + + +ALTER TABLE "constructive_store_private".platform_secrets + ALTER COLUMN annotations DROP NOT NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/annotations/alterations/alt0000000031.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/annotations/alterations/alt0000000031.sql new file mode 100644 index 00000000..9c87d09b --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/annotations/alterations/alt0000000031.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/platform_secrets/columns/annotations/alterations/alt0000000031 + + +ALTER TABLE "constructive_store_private".platform_secrets + ALTER COLUMN annotations DROP DEFAULT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/annotations/alterations/alt0000000032.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/annotations/alterations/alt0000000032.sql new file mode 100644 index 00000000..ebec16ac --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/annotations/alterations/alt0000000032.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_private/tables/platform_secrets/columns/annotations/alterations/alt0000000032 + + +COMMENT ON COLUMN "constructive_store_private".platform_secrets.annotations IS NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/annotations/column.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/annotations/column.sql new file mode 100644 index 00000000..567db5ec --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/annotations/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/platform_secrets/columns/annotations/column + + +ALTER TABLE "constructive_store_private".platform_secrets + DROP COLUMN annotations RESTRICT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/created_at/alterations/alt0000000033.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/created_at/alterations/alt0000000033.sql new file mode 100644 index 00000000..45c6ee58 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/created_at/alterations/alt0000000033.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/platform_secrets/columns/created_at/alterations/alt0000000033 + + +ALTER TABLE "constructive_store_private".platform_secrets + ALTER COLUMN created_at DROP DEFAULT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/created_at/column.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/created_at/column.sql new file mode 100644 index 00000000..bfa7cf3d --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/created_at/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/platform_secrets/columns/created_at/column + + +ALTER TABLE "constructive_store_private".platform_secrets + DROP COLUMN created_at RESTRICT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/database_id/alterations/alt0000000034.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/database_id/alterations/alt0000000034.sql new file mode 100644 index 00000000..f70af7f6 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/database_id/alterations/alt0000000034.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/platform_secrets/columns/database_id/alterations/alt0000000034 + + +ALTER TABLE "constructive_store_private".platform_secrets + ALTER COLUMN database_id DROP NOT NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/database_id/alterations/alt0000000035.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/database_id/alterations/alt0000000035.sql new file mode 100644 index 00000000..be4f2681 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/database_id/alterations/alt0000000035.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_private/tables/platform_secrets/columns/database_id/alterations/alt0000000035 + + +COMMENT ON COLUMN "constructive_store_private".platform_secrets.database_id IS NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/database_id/column.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/database_id/column.sql new file mode 100644 index 00000000..fd09d9cd --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/database_id/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/platform_secrets/columns/database_id/column + + +ALTER TABLE "constructive_store_private".platform_secrets + DROP COLUMN database_id RESTRICT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/description/alterations/alt0000000036.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/description/alterations/alt0000000036.sql new file mode 100644 index 00000000..52519ed0 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/description/alterations/alt0000000036.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_private/tables/platform_secrets/columns/description/alterations/alt0000000036 + + +COMMENT ON COLUMN "constructive_store_private".platform_secrets.description IS NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/description/column.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/description/column.sql new file mode 100644 index 00000000..5f38e598 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/description/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/platform_secrets/columns/description/column + + +ALTER TABLE "constructive_store_private".platform_secrets + DROP COLUMN description RESTRICT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/id/alterations/alt0000000037.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/id/alterations/alt0000000037.sql new file mode 100644 index 00000000..d67e8620 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/id/alterations/alt0000000037.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/platform_secrets/columns/id/alterations/alt0000000037 + + +ALTER TABLE "constructive_store_private".platform_secrets + ALTER COLUMN id DROP NOT NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/id/alterations/alt0000000038.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/id/alterations/alt0000000038.sql new file mode 100644 index 00000000..de9e7ead --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/id/alterations/alt0000000038.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/platform_secrets/columns/id/alterations/alt0000000038 + + +ALTER TABLE "constructive_store_private".platform_secrets + ALTER COLUMN id DROP DEFAULT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/id/alterations/alt0000000039.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/id/alterations/alt0000000039.sql new file mode 100644 index 00000000..f87f7ea4 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/id/alterations/alt0000000039.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_private/tables/platform_secrets/columns/id/alterations/alt0000000039 + + +COMMENT ON COLUMN "constructive_store_private".platform_secrets.id IS NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/id/column.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/id/column.sql new file mode 100644 index 00000000..90037c65 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/id/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/platform_secrets/columns/id/column + + +ALTER TABLE "constructive_store_private".platform_secrets + DROP COLUMN id RESTRICT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/key_id/alterations/alt0000000040.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/key_id/alterations/alt0000000040.sql new file mode 100644 index 00000000..bea4780e --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/key_id/alterations/alt0000000040.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/platform_secrets/columns/key_id/alterations/alt0000000040 + + +ALTER TABLE "constructive_store_private".platform_secrets + ALTER COLUMN key_id DROP NOT NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/key_id/alterations/alt0000000041.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/key_id/alterations/alt0000000041.sql new file mode 100644 index 00000000..e0948ce4 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/key_id/alterations/alt0000000041.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/platform_secrets/columns/key_id/alterations/alt0000000041 + + +ALTER TABLE "constructive_store_private".platform_secrets + ALTER COLUMN key_id DROP DEFAULT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/key_id/alterations/alt0000000042.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/key_id/alterations/alt0000000042.sql new file mode 100644 index 00000000..a0bc9bac --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/key_id/alterations/alt0000000042.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_private/tables/platform_secrets/columns/key_id/alterations/alt0000000042 + + +COMMENT ON COLUMN "constructive_store_private".platform_secrets.key_id IS NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/key_id/column.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/key_id/column.sql new file mode 100644 index 00000000..010fd2b3 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/key_id/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/platform_secrets/columns/key_id/column + + +ALTER TABLE "constructive_store_private".platform_secrets + DROP COLUMN key_id RESTRICT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/labels/alterations/alt0000000043.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/labels/alterations/alt0000000043.sql new file mode 100644 index 00000000..9cf73ecf --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/labels/alterations/alt0000000043.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/platform_secrets/columns/labels/alterations/alt0000000043 + + +ALTER TABLE "constructive_store_private".platform_secrets + ALTER COLUMN labels DROP NOT NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/labels/alterations/alt0000000044.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/labels/alterations/alt0000000044.sql new file mode 100644 index 00000000..70787a2f --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/labels/alterations/alt0000000044.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/platform_secrets/columns/labels/alterations/alt0000000044 + + +ALTER TABLE "constructive_store_private".platform_secrets + ALTER COLUMN labels DROP DEFAULT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/labels/alterations/alt0000000045.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/labels/alterations/alt0000000045.sql new file mode 100644 index 00000000..27f7e98a --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/labels/alterations/alt0000000045.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_private/tables/platform_secrets/columns/labels/alterations/alt0000000045 + + +COMMENT ON COLUMN "constructive_store_private".platform_secrets.labels IS NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/labels/column.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/labels/column.sql new file mode 100644 index 00000000..684fffcd --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/labels/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/platform_secrets/columns/labels/column + + +ALTER TABLE "constructive_store_private".platform_secrets + DROP COLUMN labels RESTRICT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/name/alterations/alt0000000046.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/name/alterations/alt0000000046.sql new file mode 100644 index 00000000..0086627d --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/name/alterations/alt0000000046.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/platform_secrets/columns/name/alterations/alt0000000046 + + +ALTER TABLE "constructive_store_private".platform_secrets + ALTER COLUMN name DROP NOT NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/name/alterations/alt0000000047.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/name/alterations/alt0000000047.sql new file mode 100644 index 00000000..81a6f2e7 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/name/alterations/alt0000000047.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_private/tables/platform_secrets/columns/name/alterations/alt0000000047 + + +COMMENT ON COLUMN "constructive_store_private".platform_secrets.name IS NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/name/column.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/name/column.sql new file mode 100644 index 00000000..a2895a22 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/name/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/platform_secrets/columns/name/column + + +ALTER TABLE "constructive_store_private".platform_secrets + DROP COLUMN name RESTRICT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/namespace_id/alterations/alt0000000048.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/namespace_id/alterations/alt0000000048.sql new file mode 100644 index 00000000..54369012 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/namespace_id/alterations/alt0000000048.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/platform_secrets/columns/namespace_id/alterations/alt0000000048 + + +ALTER TABLE "constructive_store_private".platform_secrets + ALTER COLUMN namespace_id DROP NOT NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/namespace_id/alterations/alt0000000049.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/namespace_id/alterations/alt0000000049.sql new file mode 100644 index 00000000..02ffc181 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/namespace_id/alterations/alt0000000049.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_private/tables/platform_secrets/columns/namespace_id/alterations/alt0000000049 + + +COMMENT ON COLUMN "constructive_store_private".platform_secrets.namespace_id IS NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/namespace_id/column.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/namespace_id/column.sql new file mode 100644 index 00000000..7ced389c --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/namespace_id/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/platform_secrets/columns/namespace_id/column + + +ALTER TABLE "constructive_store_private".platform_secrets + DROP COLUMN namespace_id RESTRICT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/updated_at/alterations/alt0000000050.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/updated_at/alterations/alt0000000050.sql new file mode 100644 index 00000000..cefc0f34 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/updated_at/alterations/alt0000000050.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/platform_secrets/columns/updated_at/alterations/alt0000000050 + + +ALTER TABLE "constructive_store_private".platform_secrets + ALTER COLUMN updated_at DROP DEFAULT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/updated_at/column.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/updated_at/column.sql new file mode 100644 index 00000000..3cd08d8a --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/updated_at/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/platform_secrets/columns/updated_at/column + + +ALTER TABLE "constructive_store_private".platform_secrets + DROP COLUMN updated_at RESTRICT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/value/alterations/alt0000000051.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/value/alterations/alt0000000051.sql new file mode 100644 index 00000000..89040256 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/value/alterations/alt0000000051.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_private/tables/platform_secrets/columns/value/alterations/alt0000000051 + + +COMMENT ON COLUMN "constructive_store_private".platform_secrets.value IS NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/value/column.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/value/column.sql new file mode 100644 index 00000000..81ae2dc7 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/columns/value/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/platform_secrets/columns/value/column + + +ALTER TABLE "constructive_store_private".platform_secrets + DROP COLUMN value RESTRICT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/constraints/platform_secrets_database_id_namespace_id_name_key/constraint.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/constraints/platform_secrets_database_id_namespace_id_name_key/constraint.sql new file mode 100644 index 00000000..104cc3f1 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/constraints/platform_secrets_database_id_namespace_id_name_key/constraint.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/platform_secrets/constraints/platform_secrets_database_id_namespace_id_name_key/constraint + + +ALTER TABLE "constructive_store_private".platform_secrets + DROP CONSTRAINT platform_secrets_database_id_namespace_id_name_key; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/constraints/platform_secrets_namespace_id_fkey/constraint.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/constraints/platform_secrets_namespace_id_fkey/constraint.sql new file mode 100644 index 00000000..98239adc --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/constraints/platform_secrets_namespace_id_fkey/constraint.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/platform_secrets/constraints/platform_secrets_namespace_id_fkey/constraint + + +ALTER TABLE "constructive_store_private".platform_secrets + DROP CONSTRAINT platform_secrets_namespace_id_fkey; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/constraints/platform_secrets_pkey/constraint.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/constraints/platform_secrets_pkey/constraint.sql new file mode 100644 index 00000000..770ce8d6 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/constraints/platform_secrets_pkey/constraint.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/platform_secrets/constraints/platform_secrets_pkey/constraint + + +ALTER TABLE "constructive_store_private".platform_secrets + DROP CONSTRAINT platform_secrets_pkey; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/indexes/platform_secrets_created_at_idx.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/indexes/platform_secrets_created_at_idx.sql new file mode 100644 index 00000000..4ed7623a --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/indexes/platform_secrets_created_at_idx.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_private/tables/platform_secrets/indexes/platform_secrets_created_at_idx + + +DROP INDEX "constructive_store_private".platform_secrets_created_at_idx; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/indexes/platform_secrets_updated_at_idx.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/indexes/platform_secrets_updated_at_idx.sql new file mode 100644 index 00000000..68cab969 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/indexes/platform_secrets_updated_at_idx.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_private/tables/platform_secrets/indexes/platform_secrets_updated_at_idx + + +DROP INDEX "constructive_store_private".platform_secrets_updated_at_idx; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/table.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/table.sql new file mode 100644 index 00000000..443c2590 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/table.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_private/tables/platform_secrets/table + + +DROP TABLE "constructive_store_private".platform_secrets; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/triggers/platform_secrets_insert_tg.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/triggers/platform_secrets_insert_tg.sql new file mode 100644 index 00000000..283e5110 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/triggers/platform_secrets_insert_tg.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_private/tables/platform_secrets/triggers/platform_secrets_insert_tg + + +DROP TRIGGER platform_secrets_insert_tg ON "constructive_store_private".platform_secrets; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/triggers/platform_secrets_update_tg.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/triggers/platform_secrets_update_tg.sql new file mode 100644 index 00000000..1e9de7eb --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/triggers/platform_secrets_update_tg.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_private/tables/platform_secrets/triggers/platform_secrets_update_tg + + +DROP TRIGGER platform_secrets_update_tg ON "constructive_store_private".platform_secrets; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/triggers/timestamps_tg.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/triggers/timestamps_tg.sql new file mode 100644 index 00000000..7b980fcd --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/platform_secrets/triggers/timestamps_tg.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_private/tables/platform_secrets/triggers/timestamps_tg + + +DROP TRIGGER timestamps_tg ON "constructive_store_private".platform_secrets; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/alterations/alt0000000052.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/alterations/alt0000000052.sql new file mode 100644 index 00000000..4db0da31 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/alterations/alt0000000052.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/user_secrets/alterations/alt0000000052 + + +ALTER TABLE "constructive_store_private".user_secrets + ENABLE ROW LEVEL SECURITY; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/alterations/alt0000000053.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/alterations/alt0000000053.sql new file mode 100644 index 00000000..aae598e9 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/alterations/alt0000000053.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_private/tables/user_secrets/alterations/alt0000000053 + + +COMMENT ON TABLE "constructive_store_private".user_secrets IS NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/columns/algo/alterations/alt0000000054.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/columns/algo/alterations/alt0000000054.sql new file mode 100644 index 00000000..2a36a45f --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/columns/algo/alterations/alt0000000054.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_private/tables/user_secrets/columns/algo/alterations/alt0000000054 + + +COMMENT ON COLUMN "constructive_store_private".user_secrets.algo IS NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/columns/algo/column.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/columns/algo/column.sql new file mode 100644 index 00000000..6a08e793 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/columns/algo/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/user_secrets/columns/algo/column + + +ALTER TABLE "constructive_store_private".user_secrets + DROP COLUMN algo RESTRICT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/columns/created_at/alterations/alt0000000055.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/columns/created_at/alterations/alt0000000055.sql new file mode 100644 index 00000000..4ca62a98 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/columns/created_at/alterations/alt0000000055.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/user_secrets/columns/created_at/alterations/alt0000000055 + + +ALTER TABLE "constructive_store_private".user_secrets + ALTER COLUMN created_at DROP DEFAULT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/columns/created_at/column.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/columns/created_at/column.sql new file mode 100644 index 00000000..58cfc0a4 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/columns/created_at/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/user_secrets/columns/created_at/column + + +ALTER TABLE "constructive_store_private".user_secrets + DROP COLUMN created_at RESTRICT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/columns/id/alterations/alt0000000056.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/columns/id/alterations/alt0000000056.sql new file mode 100644 index 00000000..8ea9f3c2 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/columns/id/alterations/alt0000000056.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/user_secrets/columns/id/alterations/alt0000000056 + + +ALTER TABLE "constructive_store_private".user_secrets + ALTER COLUMN id DROP NOT NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/columns/id/alterations/alt0000000057.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/columns/id/alterations/alt0000000057.sql new file mode 100644 index 00000000..1d0e7709 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/columns/id/alterations/alt0000000057.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/user_secrets/columns/id/alterations/alt0000000057 + + +ALTER TABLE "constructive_store_private".user_secrets + ALTER COLUMN id DROP DEFAULT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/columns/id/alterations/alt0000000058.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/columns/id/alterations/alt0000000058.sql new file mode 100644 index 00000000..5bf2bedc --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/columns/id/alterations/alt0000000058.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_private/tables/user_secrets/columns/id/alterations/alt0000000058 + + +COMMENT ON COLUMN "constructive_store_private".user_secrets.id IS NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/columns/id/column.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/columns/id/column.sql new file mode 100644 index 00000000..66cc3905 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/columns/id/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/user_secrets/columns/id/column + + +ALTER TABLE "constructive_store_private".user_secrets + DROP COLUMN id RESTRICT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/columns/name/alterations/alt0000000059.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/columns/name/alterations/alt0000000059.sql new file mode 100644 index 00000000..453a185a --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/columns/name/alterations/alt0000000059.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/user_secrets/columns/name/alterations/alt0000000059 + + +ALTER TABLE "constructive_store_private".user_secrets + ALTER COLUMN name DROP NOT NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/columns/name/alterations/alt0000000060.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/columns/name/alterations/alt0000000060.sql new file mode 100644 index 00000000..80810d89 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/columns/name/alterations/alt0000000060.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_private/tables/user_secrets/columns/name/alterations/alt0000000060 + + +COMMENT ON COLUMN "constructive_store_private".user_secrets.name IS NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/columns/name/column.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/columns/name/column.sql new file mode 100644 index 00000000..bd427f1f --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/columns/name/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/user_secrets/columns/name/column + + +ALTER TABLE "constructive_store_private".user_secrets + DROP COLUMN name RESTRICT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/columns/owner_id/alterations/alt0000000061.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/columns/owner_id/alterations/alt0000000061.sql new file mode 100644 index 00000000..ca0bcb54 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/columns/owner_id/alterations/alt0000000061.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/user_secrets/columns/owner_id/alterations/alt0000000061 + + +ALTER TABLE "constructive_store_private".user_secrets + ALTER COLUMN owner_id DROP NOT NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/columns/owner_id/alterations/alt0000000062.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/columns/owner_id/alterations/alt0000000062.sql new file mode 100644 index 00000000..805a5c97 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/columns/owner_id/alterations/alt0000000062.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_private/tables/user_secrets/columns/owner_id/alterations/alt0000000062 + + +COMMENT ON COLUMN "constructive_store_private".user_secrets.owner_id IS NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/columns/owner_id/column.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/columns/owner_id/column.sql new file mode 100644 index 00000000..b78b8519 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/columns/owner_id/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/user_secrets/columns/owner_id/column + + +ALTER TABLE "constructive_store_private".user_secrets + DROP COLUMN owner_id RESTRICT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/columns/updated_at/alterations/alt0000000063.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/columns/updated_at/alterations/alt0000000063.sql new file mode 100644 index 00000000..fbf6f223 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/columns/updated_at/alterations/alt0000000063.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/user_secrets/columns/updated_at/alterations/alt0000000063 + + +ALTER TABLE "constructive_store_private".user_secrets + ALTER COLUMN updated_at DROP DEFAULT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/columns/updated_at/column.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/columns/updated_at/column.sql new file mode 100644 index 00000000..b4bd75d7 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/columns/updated_at/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/user_secrets/columns/updated_at/column + + +ALTER TABLE "constructive_store_private".user_secrets + DROP COLUMN updated_at RESTRICT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/columns/value/alterations/alt0000000064.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/columns/value/alterations/alt0000000064.sql new file mode 100644 index 00000000..5e31b0d7 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/columns/value/alterations/alt0000000064.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_private/tables/user_secrets/columns/value/alterations/alt0000000064 + + +COMMENT ON COLUMN "constructive_store_private".user_secrets.value IS NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/columns/value/column.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/columns/value/column.sql new file mode 100644 index 00000000..9500e387 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/columns/value/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/user_secrets/columns/value/column + + +ALTER TABLE "constructive_store_private".user_secrets + DROP COLUMN value RESTRICT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/constraints/user_secrets_owner_id_name_key/constraint.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/constraints/user_secrets_owner_id_name_key/constraint.sql new file mode 100644 index 00000000..ec554722 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/constraints/user_secrets_owner_id_name_key/constraint.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/user_secrets/constraints/user_secrets_owner_id_name_key/constraint + + +ALTER TABLE "constructive_store_private".user_secrets + DROP CONSTRAINT user_secrets_owner_id_name_key; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/constraints/user_secrets_pkey/constraint.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/constraints/user_secrets_pkey/constraint.sql new file mode 100644 index 00000000..6385d3d0 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/constraints/user_secrets_pkey/constraint.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/user_secrets/constraints/user_secrets_pkey/constraint + + +ALTER TABLE "constructive_store_private".user_secrets + DROP CONSTRAINT user_secrets_pkey; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/indexes/user_secrets_created_at_idx.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/indexes/user_secrets_created_at_idx.sql new file mode 100644 index 00000000..2b4acb1f --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/indexes/user_secrets_created_at_idx.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_private/tables/user_secrets/indexes/user_secrets_created_at_idx + + +DROP INDEX "constructive_store_private".user_secrets_created_at_idx; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/indexes/user_secrets_updated_at_idx.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/indexes/user_secrets_updated_at_idx.sql new file mode 100644 index 00000000..76257232 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/indexes/user_secrets_updated_at_idx.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_private/tables/user_secrets/indexes/user_secrets_updated_at_idx + + +DROP INDEX "constructive_store_private".user_secrets_updated_at_idx; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/table.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/table.sql new file mode 100644 index 00000000..0383770f --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/table.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_private/tables/user_secrets/table + + +DROP TABLE "constructive_store_private".user_secrets; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/triggers/timestamps_tg.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/triggers/timestamps_tg.sql new file mode 100644 index 00000000..fa03404d --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/triggers/timestamps_tg.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_private/tables/user_secrets/triggers/timestamps_tg + + +DROP TRIGGER timestamps_tg ON "constructive_store_private".user_secrets; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/triggers/user_secrets_insert_tg.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/triggers/user_secrets_insert_tg.sql new file mode 100644 index 00000000..1ee0ed54 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/triggers/user_secrets_insert_tg.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_private/tables/user_secrets/triggers/user_secrets_insert_tg + + +DROP TRIGGER user_secrets_insert_tg ON "constructive_store_private".user_secrets; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/triggers/user_secrets_update_tg.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/triggers/user_secrets_update_tg.sql new file mode 100644 index 00000000..0c8b657c --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_secrets/triggers/user_secrets_update_tg.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_private/tables/user_secrets/triggers/user_secrets_update_tg + + +DROP TRIGGER user_secrets_update_tg ON "constructive_store_private".user_secrets; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_state/alterations/alt0000000065.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_state/alterations/alt0000000065.sql new file mode 100644 index 00000000..530734ae --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_state/alterations/alt0000000065.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/user_state/alterations/alt0000000065 + + +ALTER TABLE "constructive_store_private".user_state + ENABLE ROW LEVEL SECURITY; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_state/alterations/alt0000000066.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_state/alterations/alt0000000066.sql new file mode 100644 index 00000000..45f80d69 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_state/alterations/alt0000000066.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_private/tables/user_state/alterations/alt0000000066 + + +COMMENT ON TABLE "constructive_store_private".user_state IS NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_state/columns/id/alterations/alt0000000067.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_state/columns/id/alterations/alt0000000067.sql new file mode 100644 index 00000000..8b80a325 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_state/columns/id/alterations/alt0000000067.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/user_state/columns/id/alterations/alt0000000067 + + +ALTER TABLE "constructive_store_private".user_state + ALTER COLUMN id DROP NOT NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_state/columns/id/alterations/alt0000000068.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_state/columns/id/alterations/alt0000000068.sql new file mode 100644 index 00000000..9de2dafa --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_state/columns/id/alterations/alt0000000068.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/user_state/columns/id/alterations/alt0000000068 + + +ALTER TABLE "constructive_store_private".user_state + ALTER COLUMN id DROP DEFAULT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_state/columns/id/alterations/alt0000000069.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_state/columns/id/alterations/alt0000000069.sql new file mode 100644 index 00000000..8659346c --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_state/columns/id/alterations/alt0000000069.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_private/tables/user_state/columns/id/alterations/alt0000000069 + + +COMMENT ON COLUMN "constructive_store_private".user_state.id IS NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_state/columns/id/column.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_state/columns/id/column.sql new file mode 100644 index 00000000..55c84b83 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_state/columns/id/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/user_state/columns/id/column + + +ALTER TABLE "constructive_store_private".user_state + DROP COLUMN id RESTRICT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_state/columns/name/alterations/alt0000000070.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_state/columns/name/alterations/alt0000000070.sql new file mode 100644 index 00000000..4368f8da --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_state/columns/name/alterations/alt0000000070.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/user_state/columns/name/alterations/alt0000000070 + + +ALTER TABLE "constructive_store_private".user_state + ALTER COLUMN name DROP NOT NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_state/columns/name/alterations/alt0000000071.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_state/columns/name/alterations/alt0000000071.sql new file mode 100644 index 00000000..d2ba970c --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_state/columns/name/alterations/alt0000000071.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_private/tables/user_state/columns/name/alterations/alt0000000071 + + +COMMENT ON COLUMN "constructive_store_private".user_state.name IS NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_state/columns/name/column.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_state/columns/name/column.sql new file mode 100644 index 00000000..4bb8d7d8 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_state/columns/name/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/user_state/columns/name/column + + +ALTER TABLE "constructive_store_private".user_state + DROP COLUMN name RESTRICT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_state/columns/owner_id/alterations/alt0000000072.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_state/columns/owner_id/alterations/alt0000000072.sql new file mode 100644 index 00000000..c8749925 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_state/columns/owner_id/alterations/alt0000000072.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/user_state/columns/owner_id/alterations/alt0000000072 + + +ALTER TABLE "constructive_store_private".user_state + ALTER COLUMN owner_id DROP NOT NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_state/columns/owner_id/alterations/alt0000000073.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_state/columns/owner_id/alterations/alt0000000073.sql new file mode 100644 index 00000000..1c32ee1f --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_state/columns/owner_id/alterations/alt0000000073.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_private/tables/user_state/columns/owner_id/alterations/alt0000000073 + + +COMMENT ON COLUMN "constructive_store_private".user_state.owner_id IS NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_state/columns/owner_id/column.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_state/columns/owner_id/column.sql new file mode 100644 index 00000000..9c487bcd --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_state/columns/owner_id/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/user_state/columns/owner_id/column + + +ALTER TABLE "constructive_store_private".user_state + DROP COLUMN owner_id RESTRICT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_state/columns/value/alterations/alt0000000074.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_state/columns/value/alterations/alt0000000074.sql new file mode 100644 index 00000000..e049f636 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_state/columns/value/alterations/alt0000000074.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_private/tables/user_state/columns/value/alterations/alt0000000074 + + +COMMENT ON COLUMN "constructive_store_private".user_state.value IS NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_state/columns/value/column.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_state/columns/value/column.sql new file mode 100644 index 00000000..28bb4bb3 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_state/columns/value/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/user_state/columns/value/column + + +ALTER TABLE "constructive_store_private".user_state + DROP COLUMN value RESTRICT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_state/constraints/user_states_owner_id_name_key/constraint.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_state/constraints/user_states_owner_id_name_key/constraint.sql new file mode 100644 index 00000000..ca7cfb0a --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_state/constraints/user_states_owner_id_name_key/constraint.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/user_state/constraints/user_states_owner_id_name_key/constraint + + +ALTER TABLE "constructive_store_private".user_state + DROP CONSTRAINT user_states_owner_id_name_key; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_state/constraints/user_states_pkey/constraint.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_state/constraints/user_states_pkey/constraint.sql new file mode 100644 index 00000000..dbee6e4e --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_state/constraints/user_states_pkey/constraint.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_private/tables/user_state/constraints/user_states_pkey/constraint + + +ALTER TABLE "constructive_store_private".user_state + DROP CONSTRAINT user_states_pkey; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_state/table.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_state/table.sql new file mode 100644 index 00000000..bf7adaa0 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/tables/user_state/table.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_private/tables/user_state/table + + +DROP TABLE "constructive_store_private".user_state; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/trigger_fns/org_secrets_hash.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/trigger_fns/org_secrets_hash.sql new file mode 100644 index 00000000..3f990e78 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/trigger_fns/org_secrets_hash.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_private/trigger_fns/org_secrets_hash + + +DROP FUNCTION "constructive_store_private".org_secrets_hash; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/trigger_fns/platform_secrets_hash.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/trigger_fns/platform_secrets_hash.sql new file mode 100644 index 00000000..709d33da --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/trigger_fns/platform_secrets_hash.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_private/trigger_fns/platform_secrets_hash + + +DROP FUNCTION "constructive_store_private".platform_secrets_hash; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_private/trigger_fns/user_secrets_hash.sql b/pgpm/constructive-store/revert/schemas/constructive_store_private/trigger_fns/user_secrets_hash.sql new file mode 100644 index 00000000..03725bbb --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_private/trigger_fns/user_secrets_hash.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_private/trigger_fns/user_secrets_hash + + +DROP FUNCTION "constructive_store_private".user_secrets_hash; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/procedures/org_secrets_del/procedure.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/procedures/org_secrets_del/procedure.sql new file mode 100644 index 00000000..933b2e64 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/procedures/org_secrets_del/procedure.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_public/procedures/org_secrets_del/procedure + + +DROP FUNCTION "constructive_store_public".org_secrets_del; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/procedures/org_secrets_remove_array/procedure.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/procedures/org_secrets_remove_array/procedure.sql new file mode 100644 index 00000000..20b75535 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/procedures/org_secrets_remove_array/procedure.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_public/procedures/org_secrets_remove_array/procedure + + +DROP FUNCTION "constructive_store_public".org_secrets_remove_array; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/procedures/org_secrets_set/procedure.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/procedures/org_secrets_set/procedure.sql new file mode 100644 index 00000000..e693eb13 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/procedures/org_secrets_set/procedure.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_public/procedures/org_secrets_set/procedure + + +DROP FUNCTION "constructive_store_public".org_secrets_set; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/procedures/platform_secrets_del/procedure.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/procedures/platform_secrets_del/procedure.sql new file mode 100644 index 00000000..ed87d415 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/procedures/platform_secrets_del/procedure.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_public/procedures/platform_secrets_del/procedure + + +DROP FUNCTION "constructive_store_public".platform_secrets_del; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/procedures/platform_secrets_set/procedure.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/procedures/platform_secrets_set/procedure.sql new file mode 100644 index 00000000..1f782f0e --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/procedures/platform_secrets_set/procedure.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_public/procedures/platform_secrets_set/procedure + + +DROP FUNCTION "constructive_store_public".platform_secrets_set; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/schema.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/schema.sql new file mode 100644 index 00000000..61c13dea --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/schema.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_public/schema + + +DROP SCHEMA "constructive_store_public" CASCADE; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/alterations/alt0000000075.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/alterations/alt0000000075.sql new file mode 100644 index 00000000..4a86421f --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/alterations/alt0000000075.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_public/tables/platform_config/alterations/alt0000000075 + + +ALTER TABLE "constructive_store_public".platform_config + ENABLE ROW LEVEL SECURITY; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/alterations/alt0000000076.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/alterations/alt0000000076.sql new file mode 100644 index 00000000..a847caa2 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/alterations/alt0000000076.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_public/tables/platform_config/alterations/alt0000000076 + + +COMMENT ON TABLE "constructive_store_public".platform_config IS NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/annotations/alterations/alt0000000077.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/annotations/alterations/alt0000000077.sql new file mode 100644 index 00000000..ad84de76 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/annotations/alterations/alt0000000077.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_public/tables/platform_config/columns/annotations/alterations/alt0000000077 + + +ALTER TABLE "constructive_store_public".platform_config + ALTER COLUMN annotations DROP NOT NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/annotations/alterations/alt0000000078.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/annotations/alterations/alt0000000078.sql new file mode 100644 index 00000000..1410383b --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/annotations/alterations/alt0000000078.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_public/tables/platform_config/columns/annotations/alterations/alt0000000078 + + +ALTER TABLE "constructive_store_public".platform_config + ALTER COLUMN annotations DROP DEFAULT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/annotations/alterations/alt0000000079.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/annotations/alterations/alt0000000079.sql new file mode 100644 index 00000000..247b2c5b --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/annotations/alterations/alt0000000079.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_public/tables/platform_config/columns/annotations/alterations/alt0000000079 + + +COMMENT ON COLUMN "constructive_store_public".platform_config.annotations IS NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/annotations/column.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/annotations/column.sql new file mode 100644 index 00000000..e2a571b3 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/annotations/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_public/tables/platform_config/columns/annotations/column + + +ALTER TABLE "constructive_store_public".platform_config + DROP COLUMN annotations RESTRICT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/created_at/alterations/alt0000000080.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/created_at/alterations/alt0000000080.sql new file mode 100644 index 00000000..25f68f13 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/created_at/alterations/alt0000000080.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_public/tables/platform_config/columns/created_at/alterations/alt0000000080 + + +ALTER TABLE "constructive_store_public".platform_config + ALTER COLUMN created_at DROP DEFAULT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/created_at/column.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/created_at/column.sql new file mode 100644 index 00000000..f0d196c6 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/created_at/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_public/tables/platform_config/columns/created_at/column + + +ALTER TABLE "constructive_store_public".platform_config + DROP COLUMN created_at RESTRICT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/description/alterations/alt0000000081.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/description/alterations/alt0000000081.sql new file mode 100644 index 00000000..8c26218d --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/description/alterations/alt0000000081.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_public/tables/platform_config/columns/description/alterations/alt0000000081 + + +COMMENT ON COLUMN "constructive_store_public".platform_config.description IS NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/description/column.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/description/column.sql new file mode 100644 index 00000000..7f947772 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/description/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_public/tables/platform_config/columns/description/column + + +ALTER TABLE "constructive_store_public".platform_config + DROP COLUMN description RESTRICT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/expires_at/alterations/alt0000000082.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/expires_at/alterations/alt0000000082.sql new file mode 100644 index 00000000..f62e6009 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/expires_at/alterations/alt0000000082.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_public/tables/platform_config/columns/expires_at/alterations/alt0000000082 + + +COMMENT ON COLUMN "constructive_store_public".platform_config.expires_at IS NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/expires_at/column.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/expires_at/column.sql new file mode 100644 index 00000000..9ab52aa1 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/expires_at/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_public/tables/platform_config/columns/expires_at/column + + +ALTER TABLE "constructive_store_public".platform_config + DROP COLUMN expires_at RESTRICT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/id/alterations/alt0000000083.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/id/alterations/alt0000000083.sql new file mode 100644 index 00000000..0c653133 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/id/alterations/alt0000000083.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_public/tables/platform_config/columns/id/alterations/alt0000000083 + + +ALTER TABLE "constructive_store_public".platform_config + ALTER COLUMN id DROP NOT NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/id/alterations/alt0000000084.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/id/alterations/alt0000000084.sql new file mode 100644 index 00000000..9c777cc9 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/id/alterations/alt0000000084.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_public/tables/platform_config/columns/id/alterations/alt0000000084 + + +ALTER TABLE "constructive_store_public".platform_config + ALTER COLUMN id DROP DEFAULT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/id/alterations/alt0000000085.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/id/alterations/alt0000000085.sql new file mode 100644 index 00000000..41242b7f --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/id/alterations/alt0000000085.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_public/tables/platform_config/columns/id/alterations/alt0000000085 + + +COMMENT ON COLUMN "constructive_store_public".platform_config.id IS NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/id/column.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/id/column.sql new file mode 100644 index 00000000..1b376bc5 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/id/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_public/tables/platform_config/columns/id/column + + +ALTER TABLE "constructive_store_public".platform_config + DROP COLUMN id RESTRICT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/labels/alterations/alt0000000086.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/labels/alterations/alt0000000086.sql new file mode 100644 index 00000000..dc92e63f --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/labels/alterations/alt0000000086.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_public/tables/platform_config/columns/labels/alterations/alt0000000086 + + +ALTER TABLE "constructive_store_public".platform_config + ALTER COLUMN labels DROP NOT NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/labels/alterations/alt0000000087.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/labels/alterations/alt0000000087.sql new file mode 100644 index 00000000..4ac4fa26 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/labels/alterations/alt0000000087.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_public/tables/platform_config/columns/labels/alterations/alt0000000087 + + +ALTER TABLE "constructive_store_public".platform_config + ALTER COLUMN labels DROP DEFAULT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/labels/alterations/alt0000000088.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/labels/alterations/alt0000000088.sql new file mode 100644 index 00000000..60947af5 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/labels/alterations/alt0000000088.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_public/tables/platform_config/columns/labels/alterations/alt0000000088 + + +COMMENT ON COLUMN "constructive_store_public".platform_config.labels IS NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/labels/column.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/labels/column.sql new file mode 100644 index 00000000..3ba5f025 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/labels/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_public/tables/platform_config/columns/labels/column + + +ALTER TABLE "constructive_store_public".platform_config + DROP COLUMN labels RESTRICT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/name/alterations/alt0000000089.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/name/alterations/alt0000000089.sql new file mode 100644 index 00000000..b07f147c --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/name/alterations/alt0000000089.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_public/tables/platform_config/columns/name/alterations/alt0000000089 + + +ALTER TABLE "constructive_store_public".platform_config + ALTER COLUMN name DROP NOT NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/name/alterations/alt0000000090.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/name/alterations/alt0000000090.sql new file mode 100644 index 00000000..5a52e600 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/name/alterations/alt0000000090.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_public/tables/platform_config/columns/name/alterations/alt0000000090 + + +COMMENT ON COLUMN "constructive_store_public".platform_config.name IS NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/name/column.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/name/column.sql new file mode 100644 index 00000000..ab2a925e --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/name/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_public/tables/platform_config/columns/name/column + + +ALTER TABLE "constructive_store_public".platform_config + DROP COLUMN name RESTRICT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/namespace_id/alterations/alt0000000091.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/namespace_id/alterations/alt0000000091.sql new file mode 100644 index 00000000..c886b56d --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/namespace_id/alterations/alt0000000091.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_public/tables/platform_config/columns/namespace_id/alterations/alt0000000091 + + +ALTER TABLE "constructive_store_public".platform_config + ALTER COLUMN namespace_id DROP NOT NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/namespace_id/alterations/alt0000000092.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/namespace_id/alterations/alt0000000092.sql new file mode 100644 index 00000000..31ba8919 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/namespace_id/alterations/alt0000000092.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_public/tables/platform_config/columns/namespace_id/alterations/alt0000000092 + + +COMMENT ON COLUMN "constructive_store_public".platform_config.namespace_id IS NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/namespace_id/column.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/namespace_id/column.sql new file mode 100644 index 00000000..a1a11844 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/namespace_id/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_public/tables/platform_config/columns/namespace_id/column + + +ALTER TABLE "constructive_store_public".platform_config + DROP COLUMN namespace_id RESTRICT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/updated_at/alterations/alt0000000093.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/updated_at/alterations/alt0000000093.sql new file mode 100644 index 00000000..04666497 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/updated_at/alterations/alt0000000093.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_public/tables/platform_config/columns/updated_at/alterations/alt0000000093 + + +ALTER TABLE "constructive_store_public".platform_config + ALTER COLUMN updated_at DROP DEFAULT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/updated_at/column.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/updated_at/column.sql new file mode 100644 index 00000000..154ea818 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/updated_at/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_public/tables/platform_config/columns/updated_at/column + + +ALTER TABLE "constructive_store_public".platform_config + DROP COLUMN updated_at RESTRICT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/value/alterations/alt0000000094.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/value/alterations/alt0000000094.sql new file mode 100644 index 00000000..70169303 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/value/alterations/alt0000000094.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_public/tables/platform_config/columns/value/alterations/alt0000000094 + + +COMMENT ON COLUMN "constructive_store_public".platform_config.value IS NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/value/column.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/value/column.sql new file mode 100644 index 00000000..a091c9d7 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/columns/value/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_public/tables/platform_config/columns/value/column + + +ALTER TABLE "constructive_store_public".platform_config + DROP COLUMN value RESTRICT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/constraints/platform_configs_namespace_id_fkey/constraint.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/constraints/platform_configs_namespace_id_fkey/constraint.sql new file mode 100644 index 00000000..26f3d6b1 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/constraints/platform_configs_namespace_id_fkey/constraint.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_public/tables/platform_config/constraints/platform_configs_namespace_id_fkey/constraint + + +ALTER TABLE "constructive_store_public".platform_config + DROP CONSTRAINT platform_configs_namespace_id_fkey; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/constraints/platform_configs_namespace_id_name_key/constraint.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/constraints/platform_configs_namespace_id_name_key/constraint.sql new file mode 100644 index 00000000..8b3e1521 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/constraints/platform_configs_namespace_id_name_key/constraint.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_public/tables/platform_config/constraints/platform_configs_namespace_id_name_key/constraint + + +ALTER TABLE "constructive_store_public".platform_config + DROP CONSTRAINT platform_configs_namespace_id_name_key; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/constraints/platform_configs_pkey/constraint.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/constraints/platform_configs_pkey/constraint.sql new file mode 100644 index 00000000..8b6a64cb --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/constraints/platform_configs_pkey/constraint.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_public/tables/platform_config/constraints/platform_configs_pkey/constraint + + +ALTER TABLE "constructive_store_public".platform_config + DROP CONSTRAINT platform_configs_pkey; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/indexes/platform_config_created_at_idx.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/indexes/platform_config_created_at_idx.sql new file mode 100644 index 00000000..4772baea --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/indexes/platform_config_created_at_idx.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_public/tables/platform_config/indexes/platform_config_created_at_idx + + +DROP INDEX "constructive_store_public".platform_config_created_at_idx; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/indexes/platform_config_updated_at_idx.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/indexes/platform_config_updated_at_idx.sql new file mode 100644 index 00000000..55d5d76f --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/indexes/platform_config_updated_at_idx.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_public/tables/platform_config/indexes/platform_config_updated_at_idx + + +DROP INDEX "constructive_store_public".platform_config_updated_at_idx; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/table.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/table.sql new file mode 100644 index 00000000..e1345687 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/table.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_public/tables/platform_config/table + + +DROP TABLE "constructive_store_public".platform_config; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/triggers/timestamps_tg.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/triggers/timestamps_tg.sql new file mode 100644 index 00000000..22ffaa60 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config/triggers/timestamps_tg.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_public/tables/platform_config/triggers/timestamps_tg + + +DROP TRIGGER timestamps_tg ON "constructive_store_public".platform_config; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/alterations/alt0000000095.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/alterations/alt0000000095.sql new file mode 100644 index 00000000..9b8e61fd --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/alterations/alt0000000095.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_public/tables/platform_config_definitions/alterations/alt0000000095 + + +ALTER TABLE "constructive_store_public".platform_config_definitions + ENABLE ROW LEVEL SECURITY; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/alterations/alt0000000096.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/alterations/alt0000000096.sql new file mode 100644 index 00000000..5a86f8d9 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/alterations/alt0000000096.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_public/tables/platform_config_definitions/alterations/alt0000000096 + + +COMMENT ON TABLE "constructive_store_public".platform_config_definitions IS NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/annotations/alterations/alt0000000097.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/annotations/alterations/alt0000000097.sql new file mode 100644 index 00000000..9888e536 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/annotations/alterations/alt0000000097.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_public/tables/platform_config_definitions/columns/annotations/alterations/alt0000000097 + + +ALTER TABLE "constructive_store_public".platform_config_definitions + ALTER COLUMN annotations DROP NOT NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/annotations/alterations/alt0000000098.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/annotations/alterations/alt0000000098.sql new file mode 100644 index 00000000..35d4ca38 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/annotations/alterations/alt0000000098.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_public/tables/platform_config_definitions/columns/annotations/alterations/alt0000000098 + + +ALTER TABLE "constructive_store_public".platform_config_definitions + ALTER COLUMN annotations DROP DEFAULT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/annotations/alterations/alt0000000099.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/annotations/alterations/alt0000000099.sql new file mode 100644 index 00000000..477487c7 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/annotations/alterations/alt0000000099.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_public/tables/platform_config_definitions/columns/annotations/alterations/alt0000000099 + + +COMMENT ON COLUMN "constructive_store_public".platform_config_definitions.annotations IS NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/annotations/column.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/annotations/column.sql new file mode 100644 index 00000000..d6957eb7 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/annotations/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_public/tables/platform_config_definitions/columns/annotations/column + + +ALTER TABLE "constructive_store_public".platform_config_definitions + DROP COLUMN annotations RESTRICT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/created_at/alterations/alt0000000100.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/created_at/alterations/alt0000000100.sql new file mode 100644 index 00000000..1a3e050b --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/created_at/alterations/alt0000000100.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_public/tables/platform_config_definitions/columns/created_at/alterations/alt0000000100 + + +ALTER TABLE "constructive_store_public".platform_config_definitions + ALTER COLUMN created_at DROP DEFAULT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/created_at/column.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/created_at/column.sql new file mode 100644 index 00000000..c38fdcb1 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/created_at/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_public/tables/platform_config_definitions/columns/created_at/column + + +ALTER TABLE "constructive_store_public".platform_config_definitions + DROP COLUMN created_at RESTRICT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/default_value/alterations/alt0000000101.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/default_value/alterations/alt0000000101.sql new file mode 100644 index 00000000..4054f080 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/default_value/alterations/alt0000000101.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_public/tables/platform_config_definitions/columns/default_value/alterations/alt0000000101 + + +COMMENT ON COLUMN "constructive_store_public".platform_config_definitions.default_value IS NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/default_value/column.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/default_value/column.sql new file mode 100644 index 00000000..e872d44e --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/default_value/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_public/tables/platform_config_definitions/columns/default_value/column + + +ALTER TABLE "constructive_store_public".platform_config_definitions + DROP COLUMN default_value RESTRICT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/description/alterations/alt0000000102.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/description/alterations/alt0000000102.sql new file mode 100644 index 00000000..63be839c --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/description/alterations/alt0000000102.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_public/tables/platform_config_definitions/columns/description/alterations/alt0000000102 + + +COMMENT ON COLUMN "constructive_store_public".platform_config_definitions.description IS NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/description/column.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/description/column.sql new file mode 100644 index 00000000..ee0a7262 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/description/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_public/tables/platform_config_definitions/columns/description/column + + +ALTER TABLE "constructive_store_public".platform_config_definitions + DROP COLUMN description RESTRICT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/id/alterations/alt0000000103.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/id/alterations/alt0000000103.sql new file mode 100644 index 00000000..d7163f66 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/id/alterations/alt0000000103.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_public/tables/platform_config_definitions/columns/id/alterations/alt0000000103 + + +ALTER TABLE "constructive_store_public".platform_config_definitions + ALTER COLUMN id DROP NOT NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/id/alterations/alt0000000104.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/id/alterations/alt0000000104.sql new file mode 100644 index 00000000..ba04e429 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/id/alterations/alt0000000104.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_public/tables/platform_config_definitions/columns/id/alterations/alt0000000104 + + +ALTER TABLE "constructive_store_public".platform_config_definitions + ALTER COLUMN id DROP DEFAULT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/id/alterations/alt0000000105.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/id/alterations/alt0000000105.sql new file mode 100644 index 00000000..119c4cfa --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/id/alterations/alt0000000105.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_public/tables/platform_config_definitions/columns/id/alterations/alt0000000105 + + +COMMENT ON COLUMN "constructive_store_public".platform_config_definitions.id IS NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/id/column.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/id/column.sql new file mode 100644 index 00000000..92b3aa91 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/id/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_public/tables/platform_config_definitions/columns/id/column + + +ALTER TABLE "constructive_store_public".platform_config_definitions + DROP COLUMN id RESTRICT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/is_built_in/alterations/alt0000000106.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/is_built_in/alterations/alt0000000106.sql new file mode 100644 index 00000000..67ff3979 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/is_built_in/alterations/alt0000000106.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_public/tables/platform_config_definitions/columns/is_built_in/alterations/alt0000000106 + + +ALTER TABLE "constructive_store_public".platform_config_definitions + ALTER COLUMN is_built_in DROP NOT NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/is_built_in/alterations/alt0000000107.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/is_built_in/alterations/alt0000000107.sql new file mode 100644 index 00000000..5ce47103 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/is_built_in/alterations/alt0000000107.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_public/tables/platform_config_definitions/columns/is_built_in/alterations/alt0000000107 + + +ALTER TABLE "constructive_store_public".platform_config_definitions + ALTER COLUMN is_built_in DROP DEFAULT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/is_built_in/alterations/alt0000000108.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/is_built_in/alterations/alt0000000108.sql new file mode 100644 index 00000000..48c4cf61 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/is_built_in/alterations/alt0000000108.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_public/tables/platform_config_definitions/columns/is_built_in/alterations/alt0000000108 + + +COMMENT ON COLUMN "constructive_store_public".platform_config_definitions.is_built_in IS NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/is_built_in/column.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/is_built_in/column.sql new file mode 100644 index 00000000..6a930f27 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/is_built_in/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_public/tables/platform_config_definitions/columns/is_built_in/column + + +ALTER TABLE "constructive_store_public".platform_config_definitions + DROP COLUMN is_built_in RESTRICT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/labels/alterations/alt0000000109.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/labels/alterations/alt0000000109.sql new file mode 100644 index 00000000..21e76d31 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/labels/alterations/alt0000000109.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_public/tables/platform_config_definitions/columns/labels/alterations/alt0000000109 + + +ALTER TABLE "constructive_store_public".platform_config_definitions + ALTER COLUMN labels DROP NOT NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/labels/alterations/alt0000000110.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/labels/alterations/alt0000000110.sql new file mode 100644 index 00000000..0bbb21b4 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/labels/alterations/alt0000000110.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_public/tables/platform_config_definitions/columns/labels/alterations/alt0000000110 + + +ALTER TABLE "constructive_store_public".platform_config_definitions + ALTER COLUMN labels DROP DEFAULT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/labels/alterations/alt0000000111.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/labels/alterations/alt0000000111.sql new file mode 100644 index 00000000..7b59e7bb --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/labels/alterations/alt0000000111.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_public/tables/platform_config_definitions/columns/labels/alterations/alt0000000111 + + +COMMENT ON COLUMN "constructive_store_public".platform_config_definitions.labels IS NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/labels/column.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/labels/column.sql new file mode 100644 index 00000000..f8860d55 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/labels/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_public/tables/platform_config_definitions/columns/labels/column + + +ALTER TABLE "constructive_store_public".platform_config_definitions + DROP COLUMN labels RESTRICT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/name/alterations/alt0000000112.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/name/alterations/alt0000000112.sql new file mode 100644 index 00000000..3f6233a0 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/name/alterations/alt0000000112.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_public/tables/platform_config_definitions/columns/name/alterations/alt0000000112 + + +ALTER TABLE "constructive_store_public".platform_config_definitions + ALTER COLUMN name DROP NOT NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/name/alterations/alt0000000113.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/name/alterations/alt0000000113.sql new file mode 100644 index 00000000..d4b52936 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/name/alterations/alt0000000113.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_public/tables/platform_config_definitions/columns/name/alterations/alt0000000113 + + +COMMENT ON COLUMN "constructive_store_public".platform_config_definitions.name IS NULL; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/name/column.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/name/column.sql new file mode 100644 index 00000000..ba6145d7 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/name/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_public/tables/platform_config_definitions/columns/name/column + + +ALTER TABLE "constructive_store_public".platform_config_definitions + DROP COLUMN name RESTRICT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/updated_at/alterations/alt0000000114.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/updated_at/alterations/alt0000000114.sql new file mode 100644 index 00000000..caf29abe --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/updated_at/alterations/alt0000000114.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_public/tables/platform_config_definitions/columns/updated_at/alterations/alt0000000114 + + +ALTER TABLE "constructive_store_public".platform_config_definitions + ALTER COLUMN updated_at DROP DEFAULT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/updated_at/column.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/updated_at/column.sql new file mode 100644 index 00000000..d8b0e668 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/columns/updated_at/column.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_public/tables/platform_config_definitions/columns/updated_at/column + + +ALTER TABLE "constructive_store_public".platform_config_definitions + DROP COLUMN updated_at RESTRICT; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/constraints/platform_config_definitions_name_key/constraint.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/constraints/platform_config_definitions_name_key/constraint.sql new file mode 100644 index 00000000..1f177e84 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/constraints/platform_config_definitions_name_key/constraint.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_public/tables/platform_config_definitions/constraints/platform_config_definitions_name_key/constraint + + +ALTER TABLE "constructive_store_public".platform_config_definitions + DROP CONSTRAINT platform_config_definitions_name_key; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/constraints/platform_config_definitions_pkey/constraint.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/constraints/platform_config_definitions_pkey/constraint.sql new file mode 100644 index 00000000..ef8cf8c2 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/constraints/platform_config_definitions_pkey/constraint.sql @@ -0,0 +1,7 @@ +-- Revert: schemas/constructive_store_public/tables/platform_config_definitions/constraints/platform_config_definitions_pkey/constraint + + +ALTER TABLE "constructive_store_public".platform_config_definitions + DROP CONSTRAINT platform_config_definitions_pkey; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/indexes/platform_config_definitions_created_at_idx.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/indexes/platform_config_definitions_created_at_idx.sql new file mode 100644 index 00000000..d0b05eae --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/indexes/platform_config_definitions_created_at_idx.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_public/tables/platform_config_definitions/indexes/platform_config_definitions_created_at_idx + + +DROP INDEX "constructive_store_public".platform_config_definitions_created_at_idx; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/indexes/platform_config_definitions_updated_at_idx.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/indexes/platform_config_definitions_updated_at_idx.sql new file mode 100644 index 00000000..de18a952 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/indexes/platform_config_definitions_updated_at_idx.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_public/tables/platform_config_definitions/indexes/platform_config_definitions_updated_at_idx + + +DROP INDEX "constructive_store_public".platform_config_definitions_updated_at_idx; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/table.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/table.sql new file mode 100644 index 00000000..e5c342a2 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/table.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_public/tables/platform_config_definitions/table + + +DROP TABLE "constructive_store_public".platform_config_definitions; + + diff --git a/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/triggers/timestamps_tg.sql b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/triggers/timestamps_tg.sql new file mode 100644 index 00000000..0b50afb9 --- /dev/null +++ b/pgpm/constructive-store/revert/schemas/constructive_store_public/tables/platform_config_definitions/triggers/timestamps_tg.sql @@ -0,0 +1,6 @@ +-- Revert: schemas/constructive_store_public/tables/platform_config_definitions/triggers/timestamps_tg + + +DROP TRIGGER timestamps_tg ON "constructive_store_public".platform_config_definitions; + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/procedures/org_secrets_get/procedure.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/procedures/org_secrets_get/procedure.sql new file mode 100644 index 00000000..02457904 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/procedures/org_secrets_get/procedure.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/procedures/org_secrets_get/procedure + + +SELECT verify_function('constructive_store_private.org_secrets_get'); + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/procedures/org_secrets_verify/procedure.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/procedures/org_secrets_verify/procedure.sql new file mode 100644 index 00000000..144af727 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/procedures/org_secrets_verify/procedure.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/procedures/org_secrets_verify/procedure + + +SELECT verify_function('constructive_store_private.org_secrets_verify'); + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/procedures/platform_config_get/procedure.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/procedures/platform_config_get/procedure.sql new file mode 100644 index 00000000..52648989 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/procedures/platform_config_get/procedure.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/procedures/platform_config_get/procedure + + +SELECT verify_function('constructive_store_private.platform_config_get'); + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/procedures/platform_secrets_get/procedure.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/procedures/platform_secrets_get/procedure.sql new file mode 100644 index 00000000..f8e90026 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/procedures/platform_secrets_get/procedure.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/procedures/platform_secrets_get/procedure + + +SELECT verify_function('constructive_store_private.platform_secrets_get'); + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/procedures/platform_secrets_verify/procedure.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/procedures/platform_secrets_verify/procedure.sql new file mode 100644 index 00000000..3a1824a1 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/procedures/platform_secrets_verify/procedure.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/procedures/platform_secrets_verify/procedure + + +SELECT verify_function('constructive_store_private.platform_secrets_verify'); + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/procedures/user_secrets_del/procedure.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/procedures/user_secrets_del/procedure.sql new file mode 100644 index 00000000..31060349 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/procedures/user_secrets_del/procedure.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/procedures/user_secrets_del/procedure + + +SELECT verify_function('constructive_store_private.user_secrets_del'); + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/procedures/user_secrets_get/procedure.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/procedures/user_secrets_get/procedure.sql new file mode 100644 index 00000000..ea87f3b9 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/procedures/user_secrets_get/procedure.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/procedures/user_secrets_get/procedure + + +SELECT verify_function('constructive_store_private.user_secrets_get'); + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/procedures/user_secrets_set/procedure.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/procedures/user_secrets_set/procedure.sql new file mode 100644 index 00000000..d1440c4b --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/procedures/user_secrets_set/procedure.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/procedures/user_secrets_set/procedure + + +SELECT verify_function('constructive_store_private.user_secrets_set'); + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/procedures/user_secrets_verify/procedure.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/procedures/user_secrets_verify/procedure.sql new file mode 100644 index 00000000..8617468e --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/procedures/user_secrets_verify/procedure.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/procedures/user_secrets_verify/procedure + + +SELECT verify_function('constructive_store_private.user_secrets_verify'); + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/procedures/user_state_del/procedure.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/procedures/user_state_del/procedure.sql new file mode 100644 index 00000000..139708b7 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/procedures/user_state_del/procedure.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/procedures/user_state_del/procedure + + +SELECT verify_function('constructive_store_private.user_state_del'); + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/procedures/user_state_del/procedure/alterations/alt0000000001.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/procedures/user_state_del/procedure/alterations/alt0000000001.sql new file mode 100644 index 00000000..969306cb --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/procedures/user_state_del/procedure/alterations/alt0000000001.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/procedures/user_state_del/procedure/alterations/alt0000000001 + + +SELECT verify_function('constructive_store_private.user_state_del'); + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/procedures/user_state_get/procedure.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/procedures/user_state_get/procedure.sql new file mode 100644 index 00000000..4b5fc082 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/procedures/user_state_get/procedure.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/procedures/user_state_get/procedure + + +SELECT verify_function('constructive_store_private.user_state_get'); + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/procedures/user_state_set/procedure.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/procedures/user_state_set/procedure.sql new file mode 100644 index 00000000..b6e9c27b --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/procedures/user_state_set/procedure.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/procedures/user_state_set/procedure + + +SELECT verify_function('constructive_store_private.user_state_set'); + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/schema.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/schema.sql new file mode 100644 index 00000000..91d49834 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/schema.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/schema + + +SELECT verify_schema('constructive_store_private'); + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/alterations/alt0000000002.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/alterations/alt0000000002.sql new file mode 100644 index 00000000..23407f80 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/alterations/alt0000000002.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/org_secrets/alterations/alt0000000002 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/alterations/alt0000000003.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/alterations/alt0000000003.sql new file mode 100644 index 00000000..2692e785 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/alterations/alt0000000003.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/org_secrets/alterations/alt0000000003 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/algo/alterations/alt0000000004.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/algo/alterations/alt0000000004.sql new file mode 100644 index 00000000..940ed14d --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/algo/alterations/alt0000000004.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/org_secrets/columns/algo/alterations/alt0000000004 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/algo/column.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/algo/column.sql new file mode 100644 index 00000000..0f72ea9a --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/algo/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/org_secrets/columns/algo/column + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/annotations/alterations/alt0000000005.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/annotations/alterations/alt0000000005.sql new file mode 100644 index 00000000..2604be17 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/annotations/alterations/alt0000000005.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/org_secrets/columns/annotations/alterations/alt0000000005 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/annotations/alterations/alt0000000006.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/annotations/alterations/alt0000000006.sql new file mode 100644 index 00000000..061824bb --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/annotations/alterations/alt0000000006.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/org_secrets/columns/annotations/alterations/alt0000000006 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/annotations/alterations/alt0000000007.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/annotations/alterations/alt0000000007.sql new file mode 100644 index 00000000..fcdb3217 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/annotations/alterations/alt0000000007.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/org_secrets/columns/annotations/alterations/alt0000000007 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/annotations/column.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/annotations/column.sql new file mode 100644 index 00000000..be345b93 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/annotations/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/org_secrets/columns/annotations/column + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/created_at/alterations/alt0000000008.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/created_at/alterations/alt0000000008.sql new file mode 100644 index 00000000..009757c9 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/created_at/alterations/alt0000000008.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/org_secrets/columns/created_at/alterations/alt0000000008 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/created_at/column.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/created_at/column.sql new file mode 100644 index 00000000..2a80a8fd --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/created_at/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/org_secrets/columns/created_at/column + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/description/alterations/alt0000000009.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/description/alterations/alt0000000009.sql new file mode 100644 index 00000000..a1993646 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/description/alterations/alt0000000009.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/org_secrets/columns/description/alterations/alt0000000009 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/description/column.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/description/column.sql new file mode 100644 index 00000000..9db1f6fb --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/description/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/org_secrets/columns/description/column + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/id/alterations/alt0000000010.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/id/alterations/alt0000000010.sql new file mode 100644 index 00000000..140fe4fc --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/id/alterations/alt0000000010.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/org_secrets/columns/id/alterations/alt0000000010 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/id/alterations/alt0000000011.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/id/alterations/alt0000000011.sql new file mode 100644 index 00000000..197d2162 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/id/alterations/alt0000000011.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/org_secrets/columns/id/alterations/alt0000000011 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/id/alterations/alt0000000012.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/id/alterations/alt0000000012.sql new file mode 100644 index 00000000..a9fd3291 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/id/alterations/alt0000000012.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/org_secrets/columns/id/alterations/alt0000000012 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/id/column.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/id/column.sql new file mode 100644 index 00000000..3910bfdb --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/id/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/org_secrets/columns/id/column + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/key_id/alterations/alt0000000013.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/key_id/alterations/alt0000000013.sql new file mode 100644 index 00000000..c2ba4c47 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/key_id/alterations/alt0000000013.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/org_secrets/columns/key_id/alterations/alt0000000013 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/key_id/alterations/alt0000000014.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/key_id/alterations/alt0000000014.sql new file mode 100644 index 00000000..ccc702cd --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/key_id/alterations/alt0000000014.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/org_secrets/columns/key_id/alterations/alt0000000014 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/key_id/alterations/alt0000000015.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/key_id/alterations/alt0000000015.sql new file mode 100644 index 00000000..3fdced6e --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/key_id/alterations/alt0000000015.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/org_secrets/columns/key_id/alterations/alt0000000015 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/key_id/column.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/key_id/column.sql new file mode 100644 index 00000000..d6007d3e --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/key_id/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/org_secrets/columns/key_id/column + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/labels/alterations/alt0000000016.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/labels/alterations/alt0000000016.sql new file mode 100644 index 00000000..c3dd69a5 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/labels/alterations/alt0000000016.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/org_secrets/columns/labels/alterations/alt0000000016 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/labels/alterations/alt0000000017.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/labels/alterations/alt0000000017.sql new file mode 100644 index 00000000..7897c769 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/labels/alterations/alt0000000017.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/org_secrets/columns/labels/alterations/alt0000000017 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/labels/alterations/alt0000000018.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/labels/alterations/alt0000000018.sql new file mode 100644 index 00000000..0f77796a --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/labels/alterations/alt0000000018.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/org_secrets/columns/labels/alterations/alt0000000018 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/labels/column.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/labels/column.sql new file mode 100644 index 00000000..e96e076d --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/labels/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/org_secrets/columns/labels/column + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/name/alterations/alt0000000019.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/name/alterations/alt0000000019.sql new file mode 100644 index 00000000..7b44ce9a --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/name/alterations/alt0000000019.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/org_secrets/columns/name/alterations/alt0000000019 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/name/alterations/alt0000000020.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/name/alterations/alt0000000020.sql new file mode 100644 index 00000000..c32dbfe6 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/name/alterations/alt0000000020.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/org_secrets/columns/name/alterations/alt0000000020 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/name/column.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/name/column.sql new file mode 100644 index 00000000..090bf37d --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/name/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/org_secrets/columns/name/column + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/namespace_id/alterations/alt0000000021.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/namespace_id/alterations/alt0000000021.sql new file mode 100644 index 00000000..c05d4dc4 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/namespace_id/alterations/alt0000000021.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/org_secrets/columns/namespace_id/alterations/alt0000000021 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/namespace_id/alterations/alt0000000022.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/namespace_id/alterations/alt0000000022.sql new file mode 100644 index 00000000..7ca53ba9 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/namespace_id/alterations/alt0000000022.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/org_secrets/columns/namespace_id/alterations/alt0000000022 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/namespace_id/column.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/namespace_id/column.sql new file mode 100644 index 00000000..873ce289 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/namespace_id/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/org_secrets/columns/namespace_id/column + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/owner_id/alterations/alt0000000023.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/owner_id/alterations/alt0000000023.sql new file mode 100644 index 00000000..f49e08e6 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/owner_id/alterations/alt0000000023.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/org_secrets/columns/owner_id/alterations/alt0000000023 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/owner_id/alterations/alt0000000024.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/owner_id/alterations/alt0000000024.sql new file mode 100644 index 00000000..46a64281 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/owner_id/alterations/alt0000000024.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/org_secrets/columns/owner_id/alterations/alt0000000024 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/owner_id/column.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/owner_id/column.sql new file mode 100644 index 00000000..2b3e3571 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/owner_id/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/org_secrets/columns/owner_id/column + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/updated_at/alterations/alt0000000025.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/updated_at/alterations/alt0000000025.sql new file mode 100644 index 00000000..f592c6ad --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/updated_at/alterations/alt0000000025.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/org_secrets/columns/updated_at/alterations/alt0000000025 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/updated_at/column.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/updated_at/column.sql new file mode 100644 index 00000000..87c1dd50 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/updated_at/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/org_secrets/columns/updated_at/column + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/value/alterations/alt0000000026.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/value/alterations/alt0000000026.sql new file mode 100644 index 00000000..d145a34a --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/value/alterations/alt0000000026.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/org_secrets/columns/value/alterations/alt0000000026 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/value/column.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/value/column.sql new file mode 100644 index 00000000..fee01d5b --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/columns/value/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/org_secrets/columns/value/column + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/constraints/org_secrets_namespace_id_fkey/constraint.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/constraints/org_secrets_namespace_id_fkey/constraint.sql new file mode 100644 index 00000000..83285ac9 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/constraints/org_secrets_namespace_id_fkey/constraint.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/org_secrets/constraints/org_secrets_namespace_id_fkey/constraint + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/constraints/org_secrets_owner_id_namespace_id_name_key/constraint.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/constraints/org_secrets_owner_id_namespace_id_name_key/constraint.sql new file mode 100644 index 00000000..5ddae1a2 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/constraints/org_secrets_owner_id_namespace_id_name_key/constraint.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/org_secrets/constraints/org_secrets_owner_id_namespace_id_name_key/constraint + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/constraints/org_secrets_pkey/constraint.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/constraints/org_secrets_pkey/constraint.sql new file mode 100644 index 00000000..c1b3c4d8 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/constraints/org_secrets_pkey/constraint.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/org_secrets/constraints/org_secrets_pkey/constraint + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/indexes/org_secrets_created_at_idx.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/indexes/org_secrets_created_at_idx.sql new file mode 100644 index 00000000..f6ee1b2c --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/indexes/org_secrets_created_at_idx.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/org_secrets/indexes/org_secrets_created_at_idx + + +SELECT verify_index('constructive_store_private.org_secrets', 'org_secrets_created_at_idx'); + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/indexes/org_secrets_updated_at_idx.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/indexes/org_secrets_updated_at_idx.sql new file mode 100644 index 00000000..94d63a0c --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/indexes/org_secrets_updated_at_idx.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/org_secrets/indexes/org_secrets_updated_at_idx + + +SELECT verify_index('constructive_store_private.org_secrets', 'org_secrets_updated_at_idx'); + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/table.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/table.sql new file mode 100644 index 00000000..3b2b221f --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/table.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/org_secrets/table + + +SELECT verify_table('constructive_store_private.org_secrets'); + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/triggers/org_secrets_insert_tg.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/triggers/org_secrets_insert_tg.sql new file mode 100644 index 00000000..6f306579 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/triggers/org_secrets_insert_tg.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/org_secrets/triggers/org_secrets_insert_tg + + +SELECT verify_trigger('constructive_store_private.org_secrets_insert_tg'); + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/triggers/org_secrets_update_tg.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/triggers/org_secrets_update_tg.sql new file mode 100644 index 00000000..25eaf491 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/triggers/org_secrets_update_tg.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/org_secrets/triggers/org_secrets_update_tg + + +SELECT verify_trigger('constructive_store_private.org_secrets_update_tg'); + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/triggers/timestamps_tg.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/triggers/timestamps_tg.sql new file mode 100644 index 00000000..9c63f4fd --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/org_secrets/triggers/timestamps_tg.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/org_secrets/triggers/timestamps_tg + + +SELECT verify_trigger('constructive_store_private.timestamps_tg'); + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/alterations/alt0000000027.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/alterations/alt0000000027.sql new file mode 100644 index 00000000..c7c5297c --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/alterations/alt0000000027.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/platform_secrets/alterations/alt0000000027 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/alterations/alt0000000028.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/alterations/alt0000000028.sql new file mode 100644 index 00000000..039c6502 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/alterations/alt0000000028.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/platform_secrets/alterations/alt0000000028 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/algo/alterations/alt0000000029.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/algo/alterations/alt0000000029.sql new file mode 100644 index 00000000..0a86a9a8 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/algo/alterations/alt0000000029.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/platform_secrets/columns/algo/alterations/alt0000000029 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/algo/column.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/algo/column.sql new file mode 100644 index 00000000..e65a1e3a --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/algo/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/platform_secrets/columns/algo/column + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/annotations/alterations/alt0000000030.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/annotations/alterations/alt0000000030.sql new file mode 100644 index 00000000..dcba7082 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/annotations/alterations/alt0000000030.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/platform_secrets/columns/annotations/alterations/alt0000000030 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/annotations/alterations/alt0000000031.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/annotations/alterations/alt0000000031.sql new file mode 100644 index 00000000..64d5bd90 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/annotations/alterations/alt0000000031.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/platform_secrets/columns/annotations/alterations/alt0000000031 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/annotations/alterations/alt0000000032.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/annotations/alterations/alt0000000032.sql new file mode 100644 index 00000000..0df06037 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/annotations/alterations/alt0000000032.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/platform_secrets/columns/annotations/alterations/alt0000000032 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/annotations/column.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/annotations/column.sql new file mode 100644 index 00000000..a5156749 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/annotations/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/platform_secrets/columns/annotations/column + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/created_at/alterations/alt0000000033.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/created_at/alterations/alt0000000033.sql new file mode 100644 index 00000000..85053b18 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/created_at/alterations/alt0000000033.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/platform_secrets/columns/created_at/alterations/alt0000000033 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/created_at/column.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/created_at/column.sql new file mode 100644 index 00000000..24e6490b --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/created_at/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/platform_secrets/columns/created_at/column + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/database_id/alterations/alt0000000034.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/database_id/alterations/alt0000000034.sql new file mode 100644 index 00000000..d99e9eeb --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/database_id/alterations/alt0000000034.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/platform_secrets/columns/database_id/alterations/alt0000000034 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/database_id/alterations/alt0000000035.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/database_id/alterations/alt0000000035.sql new file mode 100644 index 00000000..223257aa --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/database_id/alterations/alt0000000035.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/platform_secrets/columns/database_id/alterations/alt0000000035 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/database_id/column.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/database_id/column.sql new file mode 100644 index 00000000..599f4661 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/database_id/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/platform_secrets/columns/database_id/column + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/description/alterations/alt0000000036.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/description/alterations/alt0000000036.sql new file mode 100644 index 00000000..d407bf36 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/description/alterations/alt0000000036.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/platform_secrets/columns/description/alterations/alt0000000036 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/description/column.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/description/column.sql new file mode 100644 index 00000000..93168b54 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/description/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/platform_secrets/columns/description/column + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/id/alterations/alt0000000037.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/id/alterations/alt0000000037.sql new file mode 100644 index 00000000..e249c2a7 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/id/alterations/alt0000000037.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/platform_secrets/columns/id/alterations/alt0000000037 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/id/alterations/alt0000000038.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/id/alterations/alt0000000038.sql new file mode 100644 index 00000000..9ac9ba4a --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/id/alterations/alt0000000038.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/platform_secrets/columns/id/alterations/alt0000000038 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/id/alterations/alt0000000039.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/id/alterations/alt0000000039.sql new file mode 100644 index 00000000..9e9db93d --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/id/alterations/alt0000000039.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/platform_secrets/columns/id/alterations/alt0000000039 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/id/column.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/id/column.sql new file mode 100644 index 00000000..3a0fb26a --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/id/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/platform_secrets/columns/id/column + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/key_id/alterations/alt0000000040.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/key_id/alterations/alt0000000040.sql new file mode 100644 index 00000000..7341b75d --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/key_id/alterations/alt0000000040.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/platform_secrets/columns/key_id/alterations/alt0000000040 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/key_id/alterations/alt0000000041.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/key_id/alterations/alt0000000041.sql new file mode 100644 index 00000000..d72448df --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/key_id/alterations/alt0000000041.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/platform_secrets/columns/key_id/alterations/alt0000000041 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/key_id/alterations/alt0000000042.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/key_id/alterations/alt0000000042.sql new file mode 100644 index 00000000..fc65c4b8 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/key_id/alterations/alt0000000042.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/platform_secrets/columns/key_id/alterations/alt0000000042 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/key_id/column.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/key_id/column.sql new file mode 100644 index 00000000..049d00fa --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/key_id/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/platform_secrets/columns/key_id/column + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/labels/alterations/alt0000000043.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/labels/alterations/alt0000000043.sql new file mode 100644 index 00000000..c8da5d78 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/labels/alterations/alt0000000043.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/platform_secrets/columns/labels/alterations/alt0000000043 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/labels/alterations/alt0000000044.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/labels/alterations/alt0000000044.sql new file mode 100644 index 00000000..30e9fe0d --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/labels/alterations/alt0000000044.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/platform_secrets/columns/labels/alterations/alt0000000044 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/labels/alterations/alt0000000045.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/labels/alterations/alt0000000045.sql new file mode 100644 index 00000000..71d976e0 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/labels/alterations/alt0000000045.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/platform_secrets/columns/labels/alterations/alt0000000045 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/labels/column.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/labels/column.sql new file mode 100644 index 00000000..9f8fd68b --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/labels/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/platform_secrets/columns/labels/column + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/name/alterations/alt0000000046.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/name/alterations/alt0000000046.sql new file mode 100644 index 00000000..36f5b480 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/name/alterations/alt0000000046.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/platform_secrets/columns/name/alterations/alt0000000046 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/name/alterations/alt0000000047.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/name/alterations/alt0000000047.sql new file mode 100644 index 00000000..bd1a50b5 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/name/alterations/alt0000000047.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/platform_secrets/columns/name/alterations/alt0000000047 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/name/column.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/name/column.sql new file mode 100644 index 00000000..e89fd84b --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/name/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/platform_secrets/columns/name/column + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/namespace_id/alterations/alt0000000048.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/namespace_id/alterations/alt0000000048.sql new file mode 100644 index 00000000..af046f0a --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/namespace_id/alterations/alt0000000048.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/platform_secrets/columns/namespace_id/alterations/alt0000000048 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/namespace_id/alterations/alt0000000049.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/namespace_id/alterations/alt0000000049.sql new file mode 100644 index 00000000..a4c2c807 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/namespace_id/alterations/alt0000000049.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/platform_secrets/columns/namespace_id/alterations/alt0000000049 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/namespace_id/column.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/namespace_id/column.sql new file mode 100644 index 00000000..33f8aa02 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/namespace_id/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/platform_secrets/columns/namespace_id/column + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/updated_at/alterations/alt0000000050.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/updated_at/alterations/alt0000000050.sql new file mode 100644 index 00000000..592a8e44 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/updated_at/alterations/alt0000000050.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/platform_secrets/columns/updated_at/alterations/alt0000000050 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/updated_at/column.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/updated_at/column.sql new file mode 100644 index 00000000..17278110 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/updated_at/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/platform_secrets/columns/updated_at/column + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/value/alterations/alt0000000051.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/value/alterations/alt0000000051.sql new file mode 100644 index 00000000..0d02f4d7 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/value/alterations/alt0000000051.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/platform_secrets/columns/value/alterations/alt0000000051 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/value/column.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/value/column.sql new file mode 100644 index 00000000..cbda06e6 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/columns/value/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/platform_secrets/columns/value/column + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/constraints/platform_secrets_database_id_namespace_id_name_key/constraint.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/constraints/platform_secrets_database_id_namespace_id_name_key/constraint.sql new file mode 100644 index 00000000..7b3450cd --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/constraints/platform_secrets_database_id_namespace_id_name_key/constraint.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/platform_secrets/constraints/platform_secrets_database_id_namespace_id_name_key/constraint + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/constraints/platform_secrets_namespace_id_fkey/constraint.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/constraints/platform_secrets_namespace_id_fkey/constraint.sql new file mode 100644 index 00000000..cfb2f7fb --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/constraints/platform_secrets_namespace_id_fkey/constraint.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/platform_secrets/constraints/platform_secrets_namespace_id_fkey/constraint + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/constraints/platform_secrets_pkey/constraint.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/constraints/platform_secrets_pkey/constraint.sql new file mode 100644 index 00000000..4e3455a0 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/constraints/platform_secrets_pkey/constraint.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/platform_secrets/constraints/platform_secrets_pkey/constraint + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/indexes/platform_secrets_created_at_idx.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/indexes/platform_secrets_created_at_idx.sql new file mode 100644 index 00000000..8ffb1357 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/indexes/platform_secrets_created_at_idx.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/platform_secrets/indexes/platform_secrets_created_at_idx + + +SELECT verify_index('constructive_store_private.platform_secrets', 'platform_secrets_created_at_idx'); + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/indexes/platform_secrets_updated_at_idx.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/indexes/platform_secrets_updated_at_idx.sql new file mode 100644 index 00000000..88763b2c --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/indexes/platform_secrets_updated_at_idx.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/platform_secrets/indexes/platform_secrets_updated_at_idx + + +SELECT verify_index('constructive_store_private.platform_secrets', 'platform_secrets_updated_at_idx'); + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/table.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/table.sql new file mode 100644 index 00000000..b5e536f9 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/table.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/platform_secrets/table + + +SELECT verify_table('constructive_store_private.platform_secrets'); + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/triggers/platform_secrets_insert_tg.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/triggers/platform_secrets_insert_tg.sql new file mode 100644 index 00000000..1e05e141 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/triggers/platform_secrets_insert_tg.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/platform_secrets/triggers/platform_secrets_insert_tg + + +SELECT verify_trigger('constructive_store_private.platform_secrets_insert_tg'); + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/triggers/platform_secrets_update_tg.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/triggers/platform_secrets_update_tg.sql new file mode 100644 index 00000000..fcf375ac --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/triggers/platform_secrets_update_tg.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/platform_secrets/triggers/platform_secrets_update_tg + + +SELECT verify_trigger('constructive_store_private.platform_secrets_update_tg'); + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/triggers/timestamps_tg.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/triggers/timestamps_tg.sql new file mode 100644 index 00000000..b2c5d191 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/platform_secrets/triggers/timestamps_tg.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/platform_secrets/triggers/timestamps_tg + + +SELECT verify_trigger('constructive_store_private.timestamps_tg'); + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/alterations/alt0000000052.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/alterations/alt0000000052.sql new file mode 100644 index 00000000..5fd13771 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/alterations/alt0000000052.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/user_secrets/alterations/alt0000000052 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/alterations/alt0000000053.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/alterations/alt0000000053.sql new file mode 100644 index 00000000..b6e565a7 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/alterations/alt0000000053.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/user_secrets/alterations/alt0000000053 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/columns/algo/alterations/alt0000000054.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/columns/algo/alterations/alt0000000054.sql new file mode 100644 index 00000000..2b93f08d --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/columns/algo/alterations/alt0000000054.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/user_secrets/columns/algo/alterations/alt0000000054 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/columns/algo/column.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/columns/algo/column.sql new file mode 100644 index 00000000..e9a1366a --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/columns/algo/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/user_secrets/columns/algo/column + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/columns/created_at/alterations/alt0000000055.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/columns/created_at/alterations/alt0000000055.sql new file mode 100644 index 00000000..1af238cc --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/columns/created_at/alterations/alt0000000055.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/user_secrets/columns/created_at/alterations/alt0000000055 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/columns/created_at/column.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/columns/created_at/column.sql new file mode 100644 index 00000000..8e8bcfa1 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/columns/created_at/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/user_secrets/columns/created_at/column + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/columns/id/alterations/alt0000000056.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/columns/id/alterations/alt0000000056.sql new file mode 100644 index 00000000..f899c124 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/columns/id/alterations/alt0000000056.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/user_secrets/columns/id/alterations/alt0000000056 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/columns/id/alterations/alt0000000057.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/columns/id/alterations/alt0000000057.sql new file mode 100644 index 00000000..62510815 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/columns/id/alterations/alt0000000057.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/user_secrets/columns/id/alterations/alt0000000057 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/columns/id/alterations/alt0000000058.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/columns/id/alterations/alt0000000058.sql new file mode 100644 index 00000000..56628928 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/columns/id/alterations/alt0000000058.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/user_secrets/columns/id/alterations/alt0000000058 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/columns/id/column.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/columns/id/column.sql new file mode 100644 index 00000000..ef024e17 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/columns/id/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/user_secrets/columns/id/column + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/columns/name/alterations/alt0000000059.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/columns/name/alterations/alt0000000059.sql new file mode 100644 index 00000000..a280fb77 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/columns/name/alterations/alt0000000059.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/user_secrets/columns/name/alterations/alt0000000059 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/columns/name/alterations/alt0000000060.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/columns/name/alterations/alt0000000060.sql new file mode 100644 index 00000000..f5f1a9f8 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/columns/name/alterations/alt0000000060.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/user_secrets/columns/name/alterations/alt0000000060 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/columns/name/column.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/columns/name/column.sql new file mode 100644 index 00000000..7830ccf7 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/columns/name/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/user_secrets/columns/name/column + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/columns/owner_id/alterations/alt0000000061.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/columns/owner_id/alterations/alt0000000061.sql new file mode 100644 index 00000000..4dd448ff --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/columns/owner_id/alterations/alt0000000061.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/user_secrets/columns/owner_id/alterations/alt0000000061 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/columns/owner_id/alterations/alt0000000062.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/columns/owner_id/alterations/alt0000000062.sql new file mode 100644 index 00000000..7ef5f48c --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/columns/owner_id/alterations/alt0000000062.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/user_secrets/columns/owner_id/alterations/alt0000000062 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/columns/owner_id/column.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/columns/owner_id/column.sql new file mode 100644 index 00000000..98780612 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/columns/owner_id/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/user_secrets/columns/owner_id/column + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/columns/updated_at/alterations/alt0000000063.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/columns/updated_at/alterations/alt0000000063.sql new file mode 100644 index 00000000..ea564d05 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/columns/updated_at/alterations/alt0000000063.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/user_secrets/columns/updated_at/alterations/alt0000000063 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/columns/updated_at/column.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/columns/updated_at/column.sql new file mode 100644 index 00000000..23f1bd43 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/columns/updated_at/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/user_secrets/columns/updated_at/column + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/columns/value/alterations/alt0000000064.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/columns/value/alterations/alt0000000064.sql new file mode 100644 index 00000000..63ce17c0 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/columns/value/alterations/alt0000000064.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/user_secrets/columns/value/alterations/alt0000000064 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/columns/value/column.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/columns/value/column.sql new file mode 100644 index 00000000..07aa4f54 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/columns/value/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/user_secrets/columns/value/column + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/constraints/user_secrets_owner_id_name_key/constraint.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/constraints/user_secrets_owner_id_name_key/constraint.sql new file mode 100644 index 00000000..7f43b8c1 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/constraints/user_secrets_owner_id_name_key/constraint.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/user_secrets/constraints/user_secrets_owner_id_name_key/constraint + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/constraints/user_secrets_pkey/constraint.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/constraints/user_secrets_pkey/constraint.sql new file mode 100644 index 00000000..f6364e44 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/constraints/user_secrets_pkey/constraint.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/user_secrets/constraints/user_secrets_pkey/constraint + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/indexes/user_secrets_created_at_idx.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/indexes/user_secrets_created_at_idx.sql new file mode 100644 index 00000000..dbcda654 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/indexes/user_secrets_created_at_idx.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/user_secrets/indexes/user_secrets_created_at_idx + + +SELECT verify_index('constructive_store_private.user_secrets', 'user_secrets_created_at_idx'); + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/indexes/user_secrets_updated_at_idx.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/indexes/user_secrets_updated_at_idx.sql new file mode 100644 index 00000000..abefe6ca --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/indexes/user_secrets_updated_at_idx.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/user_secrets/indexes/user_secrets_updated_at_idx + + +SELECT verify_index('constructive_store_private.user_secrets', 'user_secrets_updated_at_idx'); + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/table.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/table.sql new file mode 100644 index 00000000..4cf972fe --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/table.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/user_secrets/table + + +SELECT verify_table('constructive_store_private.user_secrets'); + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/triggers/timestamps_tg.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/triggers/timestamps_tg.sql new file mode 100644 index 00000000..c0400d27 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/triggers/timestamps_tg.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/user_secrets/triggers/timestamps_tg + + +SELECT verify_trigger('constructive_store_private.timestamps_tg'); + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/triggers/user_secrets_insert_tg.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/triggers/user_secrets_insert_tg.sql new file mode 100644 index 00000000..66077277 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/triggers/user_secrets_insert_tg.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/user_secrets/triggers/user_secrets_insert_tg + + +SELECT verify_trigger('constructive_store_private.user_secrets_insert_tg'); + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/triggers/user_secrets_update_tg.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/triggers/user_secrets_update_tg.sql new file mode 100644 index 00000000..e816fe07 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_secrets/triggers/user_secrets_update_tg.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/user_secrets/triggers/user_secrets_update_tg + + +SELECT verify_trigger('constructive_store_private.user_secrets_update_tg'); + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_state/alterations/alt0000000065.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_state/alterations/alt0000000065.sql new file mode 100644 index 00000000..bd4b9085 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_state/alterations/alt0000000065.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/user_state/alterations/alt0000000065 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_state/alterations/alt0000000066.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_state/alterations/alt0000000066.sql new file mode 100644 index 00000000..ee852649 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_state/alterations/alt0000000066.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/user_state/alterations/alt0000000066 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_state/columns/id/alterations/alt0000000067.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_state/columns/id/alterations/alt0000000067.sql new file mode 100644 index 00000000..f8784b5a --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_state/columns/id/alterations/alt0000000067.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/user_state/columns/id/alterations/alt0000000067 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_state/columns/id/alterations/alt0000000068.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_state/columns/id/alterations/alt0000000068.sql new file mode 100644 index 00000000..43cb4e3e --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_state/columns/id/alterations/alt0000000068.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/user_state/columns/id/alterations/alt0000000068 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_state/columns/id/alterations/alt0000000069.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_state/columns/id/alterations/alt0000000069.sql new file mode 100644 index 00000000..81aa240b --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_state/columns/id/alterations/alt0000000069.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/user_state/columns/id/alterations/alt0000000069 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_state/columns/id/column.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_state/columns/id/column.sql new file mode 100644 index 00000000..4d4d6809 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_state/columns/id/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/user_state/columns/id/column + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_state/columns/name/alterations/alt0000000070.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_state/columns/name/alterations/alt0000000070.sql new file mode 100644 index 00000000..a9a5a0fd --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_state/columns/name/alterations/alt0000000070.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/user_state/columns/name/alterations/alt0000000070 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_state/columns/name/alterations/alt0000000071.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_state/columns/name/alterations/alt0000000071.sql new file mode 100644 index 00000000..ab96b92c --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_state/columns/name/alterations/alt0000000071.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/user_state/columns/name/alterations/alt0000000071 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_state/columns/name/column.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_state/columns/name/column.sql new file mode 100644 index 00000000..68a3afe8 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_state/columns/name/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/user_state/columns/name/column + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_state/columns/owner_id/alterations/alt0000000072.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_state/columns/owner_id/alterations/alt0000000072.sql new file mode 100644 index 00000000..01def8c0 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_state/columns/owner_id/alterations/alt0000000072.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/user_state/columns/owner_id/alterations/alt0000000072 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_state/columns/owner_id/alterations/alt0000000073.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_state/columns/owner_id/alterations/alt0000000073.sql new file mode 100644 index 00000000..228b3275 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_state/columns/owner_id/alterations/alt0000000073.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/user_state/columns/owner_id/alterations/alt0000000073 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_state/columns/owner_id/column.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_state/columns/owner_id/column.sql new file mode 100644 index 00000000..440d6bd5 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_state/columns/owner_id/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/user_state/columns/owner_id/column + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_state/columns/value/alterations/alt0000000074.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_state/columns/value/alterations/alt0000000074.sql new file mode 100644 index 00000000..165d1e84 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_state/columns/value/alterations/alt0000000074.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/user_state/columns/value/alterations/alt0000000074 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_state/columns/value/column.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_state/columns/value/column.sql new file mode 100644 index 00000000..52d17745 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_state/columns/value/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/user_state/columns/value/column + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_state/constraints/user_states_owner_id_name_key/constraint.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_state/constraints/user_states_owner_id_name_key/constraint.sql new file mode 100644 index 00000000..d6a3d62c --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_state/constraints/user_states_owner_id_name_key/constraint.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/user_state/constraints/user_states_owner_id_name_key/constraint + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_state/constraints/user_states_pkey/constraint.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_state/constraints/user_states_pkey/constraint.sql new file mode 100644 index 00000000..48175af5 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_state/constraints/user_states_pkey/constraint.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/user_state/constraints/user_states_pkey/constraint + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_state/table.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_state/table.sql new file mode 100644 index 00000000..684fba9c --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/tables/user_state/table.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/tables/user_state/table + + +SELECT verify_table('constructive_store_private.user_state'); + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/trigger_fns/org_secrets_hash.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/trigger_fns/org_secrets_hash.sql new file mode 100644 index 00000000..4f0dcf7d --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/trigger_fns/org_secrets_hash.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/trigger_fns/org_secrets_hash + + +SELECT verify_function('constructive_store_private.org_secrets_hash'); + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/trigger_fns/platform_secrets_hash.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/trigger_fns/platform_secrets_hash.sql new file mode 100644 index 00000000..80a6a1b5 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/trigger_fns/platform_secrets_hash.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/trigger_fns/platform_secrets_hash + + +SELECT verify_function('constructive_store_private.platform_secrets_hash'); + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_private/trigger_fns/user_secrets_hash.sql b/pgpm/constructive-store/verify/schemas/constructive_store_private/trigger_fns/user_secrets_hash.sql new file mode 100644 index 00000000..1a686a0b --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_private/trigger_fns/user_secrets_hash.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_private/trigger_fns/user_secrets_hash + + +SELECT verify_function('constructive_store_private.user_secrets_hash'); + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/procedures/org_secrets_del/procedure.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/procedures/org_secrets_del/procedure.sql new file mode 100644 index 00000000..93ce2487 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/procedures/org_secrets_del/procedure.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/procedures/org_secrets_del/procedure + + +SELECT verify_function('constructive_store_public.org_secrets_del'); + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/procedures/org_secrets_remove_array/procedure.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/procedures/org_secrets_remove_array/procedure.sql new file mode 100644 index 00000000..31fb57c5 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/procedures/org_secrets_remove_array/procedure.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/procedures/org_secrets_remove_array/procedure + + +SELECT verify_function('constructive_store_public.org_secrets_remove_array'); + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/procedures/org_secrets_set/procedure.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/procedures/org_secrets_set/procedure.sql new file mode 100644 index 00000000..6309f341 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/procedures/org_secrets_set/procedure.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/procedures/org_secrets_set/procedure + + +SELECT verify_function('constructive_store_public.org_secrets_set'); + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/procedures/platform_secrets_del/procedure.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/procedures/platform_secrets_del/procedure.sql new file mode 100644 index 00000000..1f08b1ef --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/procedures/platform_secrets_del/procedure.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/procedures/platform_secrets_del/procedure + + +SELECT verify_function('constructive_store_public.platform_secrets_del'); + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/procedures/platform_secrets_set/procedure.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/procedures/platform_secrets_set/procedure.sql new file mode 100644 index 00000000..802b9bc2 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/procedures/platform_secrets_set/procedure.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/procedures/platform_secrets_set/procedure + + +SELECT verify_function('constructive_store_public.platform_secrets_set'); + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/schema.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/schema.sql new file mode 100644 index 00000000..4084d170 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/schema.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/schema + + +SELECT verify_schema('constructive_store_public'); + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/alterations/alt0000000075.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/alterations/alt0000000075.sql new file mode 100644 index 00000000..f32764c8 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/alterations/alt0000000075.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/tables/platform_config/alterations/alt0000000075 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/alterations/alt0000000076.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/alterations/alt0000000076.sql new file mode 100644 index 00000000..26fab441 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/alterations/alt0000000076.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/tables/platform_config/alterations/alt0000000076 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/annotations/alterations/alt0000000077.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/annotations/alterations/alt0000000077.sql new file mode 100644 index 00000000..cfd8a13f --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/annotations/alterations/alt0000000077.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/tables/platform_config/columns/annotations/alterations/alt0000000077 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/annotations/alterations/alt0000000078.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/annotations/alterations/alt0000000078.sql new file mode 100644 index 00000000..0fa3fffc --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/annotations/alterations/alt0000000078.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/tables/platform_config/columns/annotations/alterations/alt0000000078 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/annotations/alterations/alt0000000079.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/annotations/alterations/alt0000000079.sql new file mode 100644 index 00000000..9ae839ed --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/annotations/alterations/alt0000000079.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/tables/platform_config/columns/annotations/alterations/alt0000000079 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/annotations/column.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/annotations/column.sql new file mode 100644 index 00000000..eba30079 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/annotations/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/tables/platform_config/columns/annotations/column + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/created_at/alterations/alt0000000080.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/created_at/alterations/alt0000000080.sql new file mode 100644 index 00000000..17e18ddb --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/created_at/alterations/alt0000000080.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/tables/platform_config/columns/created_at/alterations/alt0000000080 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/created_at/column.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/created_at/column.sql new file mode 100644 index 00000000..680924ae --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/created_at/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/tables/platform_config/columns/created_at/column + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/description/alterations/alt0000000081.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/description/alterations/alt0000000081.sql new file mode 100644 index 00000000..63e53bf6 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/description/alterations/alt0000000081.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/tables/platform_config/columns/description/alterations/alt0000000081 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/description/column.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/description/column.sql new file mode 100644 index 00000000..fe494886 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/description/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/tables/platform_config/columns/description/column + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/expires_at/alterations/alt0000000082.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/expires_at/alterations/alt0000000082.sql new file mode 100644 index 00000000..5c385754 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/expires_at/alterations/alt0000000082.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/tables/platform_config/columns/expires_at/alterations/alt0000000082 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/expires_at/column.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/expires_at/column.sql new file mode 100644 index 00000000..5d5efa72 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/expires_at/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/tables/platform_config/columns/expires_at/column + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/id/alterations/alt0000000083.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/id/alterations/alt0000000083.sql new file mode 100644 index 00000000..3692f79a --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/id/alterations/alt0000000083.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/tables/platform_config/columns/id/alterations/alt0000000083 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/id/alterations/alt0000000084.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/id/alterations/alt0000000084.sql new file mode 100644 index 00000000..46748b64 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/id/alterations/alt0000000084.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/tables/platform_config/columns/id/alterations/alt0000000084 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/id/alterations/alt0000000085.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/id/alterations/alt0000000085.sql new file mode 100644 index 00000000..9a39d52f --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/id/alterations/alt0000000085.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/tables/platform_config/columns/id/alterations/alt0000000085 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/id/column.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/id/column.sql new file mode 100644 index 00000000..f6475b00 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/id/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/tables/platform_config/columns/id/column + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/labels/alterations/alt0000000086.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/labels/alterations/alt0000000086.sql new file mode 100644 index 00000000..167cbe42 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/labels/alterations/alt0000000086.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/tables/platform_config/columns/labels/alterations/alt0000000086 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/labels/alterations/alt0000000087.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/labels/alterations/alt0000000087.sql new file mode 100644 index 00000000..e1d7c53b --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/labels/alterations/alt0000000087.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/tables/platform_config/columns/labels/alterations/alt0000000087 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/labels/alterations/alt0000000088.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/labels/alterations/alt0000000088.sql new file mode 100644 index 00000000..c723f33f --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/labels/alterations/alt0000000088.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/tables/platform_config/columns/labels/alterations/alt0000000088 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/labels/column.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/labels/column.sql new file mode 100644 index 00000000..414c427c --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/labels/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/tables/platform_config/columns/labels/column + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/name/alterations/alt0000000089.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/name/alterations/alt0000000089.sql new file mode 100644 index 00000000..65236b85 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/name/alterations/alt0000000089.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/tables/platform_config/columns/name/alterations/alt0000000089 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/name/alterations/alt0000000090.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/name/alterations/alt0000000090.sql new file mode 100644 index 00000000..3f793bfc --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/name/alterations/alt0000000090.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/tables/platform_config/columns/name/alterations/alt0000000090 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/name/column.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/name/column.sql new file mode 100644 index 00000000..437848ba --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/name/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/tables/platform_config/columns/name/column + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/namespace_id/alterations/alt0000000091.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/namespace_id/alterations/alt0000000091.sql new file mode 100644 index 00000000..eafb87d9 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/namespace_id/alterations/alt0000000091.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/tables/platform_config/columns/namespace_id/alterations/alt0000000091 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/namespace_id/alterations/alt0000000092.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/namespace_id/alterations/alt0000000092.sql new file mode 100644 index 00000000..fd29a4a7 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/namespace_id/alterations/alt0000000092.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/tables/platform_config/columns/namespace_id/alterations/alt0000000092 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/namespace_id/column.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/namespace_id/column.sql new file mode 100644 index 00000000..fa8b8918 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/namespace_id/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/tables/platform_config/columns/namespace_id/column + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/updated_at/alterations/alt0000000093.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/updated_at/alterations/alt0000000093.sql new file mode 100644 index 00000000..0f49b66e --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/updated_at/alterations/alt0000000093.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/tables/platform_config/columns/updated_at/alterations/alt0000000093 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/updated_at/column.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/updated_at/column.sql new file mode 100644 index 00000000..6f711fe3 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/updated_at/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/tables/platform_config/columns/updated_at/column + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/value/alterations/alt0000000094.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/value/alterations/alt0000000094.sql new file mode 100644 index 00000000..a42b8afc --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/value/alterations/alt0000000094.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/tables/platform_config/columns/value/alterations/alt0000000094 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/value/column.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/value/column.sql new file mode 100644 index 00000000..6c121882 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/columns/value/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/tables/platform_config/columns/value/column + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/constraints/platform_configs_namespace_id_fkey/constraint.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/constraints/platform_configs_namespace_id_fkey/constraint.sql new file mode 100644 index 00000000..4c3341dd --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/constraints/platform_configs_namespace_id_fkey/constraint.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/tables/platform_config/constraints/platform_configs_namespace_id_fkey/constraint + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/constraints/platform_configs_namespace_id_name_key/constraint.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/constraints/platform_configs_namespace_id_name_key/constraint.sql new file mode 100644 index 00000000..ceb46d72 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/constraints/platform_configs_namespace_id_name_key/constraint.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/tables/platform_config/constraints/platform_configs_namespace_id_name_key/constraint + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/constraints/platform_configs_pkey/constraint.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/constraints/platform_configs_pkey/constraint.sql new file mode 100644 index 00000000..6bd9299d --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/constraints/platform_configs_pkey/constraint.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/tables/platform_config/constraints/platform_configs_pkey/constraint + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/indexes/platform_config_created_at_idx.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/indexes/platform_config_created_at_idx.sql new file mode 100644 index 00000000..bbb16421 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/indexes/platform_config_created_at_idx.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/tables/platform_config/indexes/platform_config_created_at_idx + + +SELECT verify_index('constructive_store_public.platform_config', 'platform_config_created_at_idx'); + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/indexes/platform_config_updated_at_idx.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/indexes/platform_config_updated_at_idx.sql new file mode 100644 index 00000000..9951bb7b --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/indexes/platform_config_updated_at_idx.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/tables/platform_config/indexes/platform_config_updated_at_idx + + +SELECT verify_index('constructive_store_public.platform_config', 'platform_config_updated_at_idx'); + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/table.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/table.sql new file mode 100644 index 00000000..2a6f0e54 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/table.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/tables/platform_config/table + + +SELECT verify_table('constructive_store_public.platform_config'); + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/triggers/timestamps_tg.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/triggers/timestamps_tg.sql new file mode 100644 index 00000000..8c2b90b6 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config/triggers/timestamps_tg.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/tables/platform_config/triggers/timestamps_tg + + +SELECT verify_trigger('constructive_store_public.timestamps_tg'); + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/alterations/alt0000000095.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/alterations/alt0000000095.sql new file mode 100644 index 00000000..e18f7629 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/alterations/alt0000000095.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/tables/platform_config_definitions/alterations/alt0000000095 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/alterations/alt0000000096.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/alterations/alt0000000096.sql new file mode 100644 index 00000000..09a3d19b --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/alterations/alt0000000096.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/tables/platform_config_definitions/alterations/alt0000000096 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/annotations/alterations/alt0000000097.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/annotations/alterations/alt0000000097.sql new file mode 100644 index 00000000..bf838d5e --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/annotations/alterations/alt0000000097.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/tables/platform_config_definitions/columns/annotations/alterations/alt0000000097 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/annotations/alterations/alt0000000098.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/annotations/alterations/alt0000000098.sql new file mode 100644 index 00000000..cc4bc7a4 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/annotations/alterations/alt0000000098.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/tables/platform_config_definitions/columns/annotations/alterations/alt0000000098 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/annotations/alterations/alt0000000099.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/annotations/alterations/alt0000000099.sql new file mode 100644 index 00000000..58e3773c --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/annotations/alterations/alt0000000099.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/tables/platform_config_definitions/columns/annotations/alterations/alt0000000099 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/annotations/column.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/annotations/column.sql new file mode 100644 index 00000000..51223b53 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/annotations/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/tables/platform_config_definitions/columns/annotations/column + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/created_at/alterations/alt0000000100.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/created_at/alterations/alt0000000100.sql new file mode 100644 index 00000000..4bfc40f2 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/created_at/alterations/alt0000000100.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/tables/platform_config_definitions/columns/created_at/alterations/alt0000000100 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/created_at/column.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/created_at/column.sql new file mode 100644 index 00000000..1e4a327a --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/created_at/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/tables/platform_config_definitions/columns/created_at/column + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/default_value/alterations/alt0000000101.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/default_value/alterations/alt0000000101.sql new file mode 100644 index 00000000..5579df72 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/default_value/alterations/alt0000000101.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/tables/platform_config_definitions/columns/default_value/alterations/alt0000000101 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/default_value/column.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/default_value/column.sql new file mode 100644 index 00000000..6d9eabee --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/default_value/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/tables/platform_config_definitions/columns/default_value/column + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/description/alterations/alt0000000102.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/description/alterations/alt0000000102.sql new file mode 100644 index 00000000..6d6608bd --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/description/alterations/alt0000000102.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/tables/platform_config_definitions/columns/description/alterations/alt0000000102 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/description/column.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/description/column.sql new file mode 100644 index 00000000..289c0ba3 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/description/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/tables/platform_config_definitions/columns/description/column + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/id/alterations/alt0000000103.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/id/alterations/alt0000000103.sql new file mode 100644 index 00000000..84b7954c --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/id/alterations/alt0000000103.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/tables/platform_config_definitions/columns/id/alterations/alt0000000103 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/id/alterations/alt0000000104.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/id/alterations/alt0000000104.sql new file mode 100644 index 00000000..76ca4a57 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/id/alterations/alt0000000104.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/tables/platform_config_definitions/columns/id/alterations/alt0000000104 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/id/alterations/alt0000000105.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/id/alterations/alt0000000105.sql new file mode 100644 index 00000000..0379536e --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/id/alterations/alt0000000105.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/tables/platform_config_definitions/columns/id/alterations/alt0000000105 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/id/column.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/id/column.sql new file mode 100644 index 00000000..f6d39786 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/id/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/tables/platform_config_definitions/columns/id/column + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/is_built_in/alterations/alt0000000106.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/is_built_in/alterations/alt0000000106.sql new file mode 100644 index 00000000..55b3cbe1 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/is_built_in/alterations/alt0000000106.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/tables/platform_config_definitions/columns/is_built_in/alterations/alt0000000106 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/is_built_in/alterations/alt0000000107.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/is_built_in/alterations/alt0000000107.sql new file mode 100644 index 00000000..d96bad6b --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/is_built_in/alterations/alt0000000107.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/tables/platform_config_definitions/columns/is_built_in/alterations/alt0000000107 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/is_built_in/alterations/alt0000000108.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/is_built_in/alterations/alt0000000108.sql new file mode 100644 index 00000000..eec607be --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/is_built_in/alterations/alt0000000108.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/tables/platform_config_definitions/columns/is_built_in/alterations/alt0000000108 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/is_built_in/column.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/is_built_in/column.sql new file mode 100644 index 00000000..1c41eaef --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/is_built_in/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/tables/platform_config_definitions/columns/is_built_in/column + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/labels/alterations/alt0000000109.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/labels/alterations/alt0000000109.sql new file mode 100644 index 00000000..4122143e --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/labels/alterations/alt0000000109.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/tables/platform_config_definitions/columns/labels/alterations/alt0000000109 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/labels/alterations/alt0000000110.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/labels/alterations/alt0000000110.sql new file mode 100644 index 00000000..6675b410 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/labels/alterations/alt0000000110.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/tables/platform_config_definitions/columns/labels/alterations/alt0000000110 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/labels/alterations/alt0000000111.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/labels/alterations/alt0000000111.sql new file mode 100644 index 00000000..374b5e1b --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/labels/alterations/alt0000000111.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/tables/platform_config_definitions/columns/labels/alterations/alt0000000111 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/labels/column.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/labels/column.sql new file mode 100644 index 00000000..8d07714b --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/labels/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/tables/platform_config_definitions/columns/labels/column + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/name/alterations/alt0000000112.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/name/alterations/alt0000000112.sql new file mode 100644 index 00000000..8bd1aa2d --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/name/alterations/alt0000000112.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/tables/platform_config_definitions/columns/name/alterations/alt0000000112 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/name/alterations/alt0000000113.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/name/alterations/alt0000000113.sql new file mode 100644 index 00000000..a8e11e3f --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/name/alterations/alt0000000113.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/tables/platform_config_definitions/columns/name/alterations/alt0000000113 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/name/column.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/name/column.sql new file mode 100644 index 00000000..7b0710dd --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/name/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/tables/platform_config_definitions/columns/name/column + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/updated_at/alterations/alt0000000114.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/updated_at/alterations/alt0000000114.sql new file mode 100644 index 00000000..0c7c1aa9 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/updated_at/alterations/alt0000000114.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/tables/platform_config_definitions/columns/updated_at/alterations/alt0000000114 + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/updated_at/column.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/updated_at/column.sql new file mode 100644 index 00000000..32f09416 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/columns/updated_at/column.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/tables/platform_config_definitions/columns/updated_at/column + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/constraints/platform_config_definitions_name_key/constraint.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/constraints/platform_config_definitions_name_key/constraint.sql new file mode 100644 index 00000000..6a56ee17 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/constraints/platform_config_definitions_name_key/constraint.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/tables/platform_config_definitions/constraints/platform_config_definitions_name_key/constraint + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/constraints/platform_config_definitions_pkey/constraint.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/constraints/platform_config_definitions_pkey/constraint.sql new file mode 100644 index 00000000..54921664 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/constraints/platform_config_definitions_pkey/constraint.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/tables/platform_config_definitions/constraints/platform_config_definitions_pkey/constraint + + + + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/indexes/platform_config_definitions_created_at_idx.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/indexes/platform_config_definitions_created_at_idx.sql new file mode 100644 index 00000000..8ac11c5d --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/indexes/platform_config_definitions_created_at_idx.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/tables/platform_config_definitions/indexes/platform_config_definitions_created_at_idx + + +SELECT verify_index('constructive_store_public.platform_config_definitions', 'platform_config_definitions_created_at_idx'); + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/indexes/platform_config_definitions_updated_at_idx.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/indexes/platform_config_definitions_updated_at_idx.sql new file mode 100644 index 00000000..4fe74ac8 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/indexes/platform_config_definitions_updated_at_idx.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/tables/platform_config_definitions/indexes/platform_config_definitions_updated_at_idx + + +SELECT verify_index('constructive_store_public.platform_config_definitions', 'platform_config_definitions_updated_at_idx'); + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/table.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/table.sql new file mode 100644 index 00000000..a583a967 --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/table.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/tables/platform_config_definitions/table + + +SELECT verify_table('constructive_store_public.platform_config_definitions'); + + diff --git a/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/triggers/timestamps_tg.sql b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/triggers/timestamps_tg.sql new file mode 100644 index 00000000..a08c58ea --- /dev/null +++ b/pgpm/constructive-store/verify/schemas/constructive_store_public/tables/platform_config_definitions/triggers/timestamps_tg.sql @@ -0,0 +1,6 @@ +-- Verify: schemas/constructive_store_public/tables/platform_config_definitions/triggers/timestamps_tg + + +SELECT verify_trigger('constructive_store_public.timestamps_tg'); + + diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 661e94a7..c7d3bf4e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -22,16 +22,16 @@ importers: version: 8.16.0 eslint: specifier: ^9.39.2 - version: 9.39.2 + version: 9.39.2(jiti@2.7.0) eslint-config-prettier: specifier: ^10.1.8 - version: 10.1.8(eslint@9.39.2) + version: 10.1.8(eslint@9.39.2(jiti@2.7.0)) eslint-plugin-simple-import-sort: specifier: ^12.1.0 - version: 12.1.1(eslint@9.39.2) + version: 12.1.1(eslint@9.39.2(jiti@2.7.0)) eslint-plugin-unused-imports: specifier: ^4.0.0 - version: 4.3.0(@typescript-eslint/eslint-plugin@8.55.0(@typescript-eslint/parser@8.55.0(eslint@9.39.2)(typescript@5.9.3))(eslint@9.39.2)(typescript@5.9.3))(eslint@9.39.2) + version: 4.3.0(@typescript-eslint/eslint-plugin@8.55.0(@typescript-eslint/parser@8.55.0(eslint@9.39.2(jiti@2.7.0))(typescript@5.9.3))(eslint@9.39.2(jiti@2.7.0))(typescript@5.9.3))(eslint@9.39.2(jiti@2.7.0)) globals: specifier: ^16.5.0 version: 16.5.0 @@ -55,7 +55,7 @@ importers: version: 5.9.3 typescript-eslint: specifier: ^8.33.0 - version: 8.55.0(eslint@9.39.2)(typescript@5.9.3) + version: 8.55.0(eslint@9.39.2(jiti@2.7.0))(typescript@5.9.3) generated/example: dependencies: @@ -111,10 +111,10 @@ importers: version: 1.6.2 '@launchql/mjml': specifier: 0.1.1 - version: 0.1.1(@babel/core@7.28.5)(react-dom@16.14.0(react@16.14.0))(react-is@18.3.1)(react@16.14.0) + version: 0.1.1(@babel/core@7.28.5)(react-dom@19.2.7(react@19.2.7))(react-is@18.3.1)(react@19.2.7) '@launchql/styled-email': specifier: 0.1.0 - version: 0.1.0(@babel/core@7.28.5)(react-dom@16.14.0(react@16.14.0))(react-is@18.3.1)(react@16.14.0) + version: 0.1.0(@babel/core@7.28.5)(react-dom@19.2.7(react@19.2.7))(react-is@18.3.1)(react@19.2.7) '@pgpmjs/env': specifier: ^2.15.3 version: 2.17.0 @@ -141,6 +141,83 @@ importers: specifier: ^5.1.6 version: 5.9.3 + job/compute-service: + dependencies: + '@constructive-io/compute-worker': + specifier: workspace:^ + version: link:../compute-worker + '@constructive-io/job-pg': + specifier: ^2.5.4 + version: 2.5.4 + '@constructive-io/job-scheduler': + specifier: ^2.5.4 + version: 2.5.4 + '@constructive-io/job-utils': + specifier: ^2.5.4 + version: 2.5.4 + '@constructive-io/knative-job-fn': + specifier: workspace:^ + version: link:../../packages/fn-app + '@constructive-io/knative-job-server': + specifier: workspace:^ + version: link:../server + '@pgpmjs/env': + specifier: ^2.15.3 + version: 2.17.0 + '@pgpmjs/logger': + specifier: ^2.4.3 + version: 2.5.2 + async-retry: + specifier: 1.3.3 + version: 1.3.3 + pg: + specifier: 8.20.0 + version: 8.20.0 + devDependencies: + '@types/async-retry': + specifier: ^1.4.9 + version: 1.4.9 + '@types/node': + specifier: ^22.10.4 + version: 22.19.3 + '@types/pg': + specifier: ^8.11.0 + version: 8.16.0 + makage: + specifier: ^0.1.12 + version: 0.1.12 + typescript: + specifier: ^5.1.6 + version: 5.9.3 + + job/compute-worker: + dependencies: + '@constructive-io/job-pg': + specifier: ^2.5.4 + version: 2.5.4 + '@constructive-io/job-utils': + specifier: ^2.5.4 + version: 2.5.4 + '@pgpmjs/logger': + specifier: ^2.4.3 + version: 2.5.2 + pg: + specifier: 8.20.0 + version: 8.20.0 + devDependencies: + '@types/node': + specifier: ^22.10.4 + version: 22.19.3 + '@types/pg': + specifier: ^8.11.0 + version: 8.16.0 + makage: + specifier: ^0.1.12 + version: 0.1.12 + typescript: + specifier: ^5.1.6 + version: 5.9.3 + job/server: dependencies: '@constructive-io/job-pg': @@ -408,6 +485,76 @@ importers: specifier: ^5.1.6 version: 5.9.3 + www: + dependencies: + '@xterm/addon-fit': + specifier: ^0.10.0 + version: 0.10.0(@xterm/xterm@5.5.0) + '@xterm/xterm': + specifier: ^5.5.0 + version: 5.5.0 + commander: + specifier: ^15.0.0 + version: 15.0.0 + express: + specifier: ^4.21.0 + version: 4.22.2 + kubernetesjs: + specifier: ^0.7.7 + version: 0.7.7 + lucide-react: + specifier: ^0.525.0 + version: 0.525.0(react@19.2.7) + pg: + specifier: ^8.13.0 + version: 8.20.0 + react: + specifier: ^19.0.0 + version: 19.2.7 + react-dom: + specifier: ^19.0.0 + version: 19.2.7(react@19.2.7) + ws: + specifier: ^8.18.0 + version: 8.21.0 + devDependencies: + '@tailwindcss/vite': + specifier: ^4.1.0 + version: 4.3.0(vite@6.4.3(@types/node@22.19.3)(jiti@2.7.0)(lightningcss@1.32.0)(tsx@4.21.0)(yaml@2.8.2)) + '@types/express': + specifier: ^5.0.0 + version: 5.0.6 + '@types/node': + specifier: ^22.0.0 + version: 22.19.3 + '@types/pg': + specifier: ^8.11.0 + version: 8.16.0 + '@types/react': + specifier: ^19.0.0 + version: 19.2.17 + '@types/react-dom': + specifier: ^19.0.0 + version: 19.2.3(@types/react@19.2.17) + '@types/ws': + specifier: ^8.5.0 + version: 8.18.1 + '@vitejs/plugin-react': + specifier: ^4.3.0 + version: 4.7.0(vite@6.4.3(@types/node@22.19.3)(jiti@2.7.0)(lightningcss@1.32.0)(tsx@4.21.0)(yaml@2.8.2)) + concurrently: + specifier: ^9.1.0 + version: 9.2.1 + tailwindcss: + specifier: ^4.1.0 + version: 4.3.0 + typescript: + specifier: ^5.7.0 + version: 5.9.3 + vite: + specifier: ^6.0.0 + version: 6.4.3(@types/node@22.19.3)(jiti@2.7.0)(lightningcss@1.32.0)(tsx@4.21.0)(yaml@2.8.2) + packages: 12factor-env@1.6.2: @@ -451,14 +598,14 @@ packages: peerDependencies: '@babel/core': ^7.0.0 - '@babel/helper-plugin-utils@7.27.1': - resolution: {integrity: sha512-1gn1Up5YXka3YYAHGKpbideQ5Yjf1tDa9qYcgysz+cNCXukyLl6DjPXhD3VRwSb8c0J9tA4b2+rHEZtc6R0tlw==} - engines: {node: '>=6.9.0'} - '@babel/helper-plugin-utils@7.28.6': resolution: {integrity: sha512-S9gzZ/bz83GRysI7gAD4wPT/AI3uCnY+9xn+Mx/KPs2JwHJIz1W8PZkg2cqyt3RNOBM8ejcXhV6y8Og7ly/Dug==} engines: {node: '>=6.9.0'} + '@babel/helper-plugin-utils@7.29.7': + resolution: {integrity: sha512-G7sHYigPY17oO5SYWnfD/0MTBwVR781S/JI643e/JhUYgVgWE/61SoW3NH9KWUKyKq5LVh3npif99Wkt6j86Jw==} + engines: {node: '>=6.9.0'} + '@babel/helper-string-parser@7.27.1': resolution: {integrity: sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==} engines: {node: '>=6.9.0'} @@ -571,6 +718,18 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 + '@babel/plugin-transform-react-jsx-self@7.29.7': + resolution: {integrity: sha512-TL0hMc9xzy86VD31nUiwzd5otRAcyEPcsegCxolO0PvcXuH1v0kECe/UIznYFihpkvU5wg/jk4v0TTEFfm53fw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-transform-react-jsx-source@7.29.7': + resolution: {integrity: sha512-06IyK09H3wi4cGbhDBwp5gUGo0IKtnYa8tyTiephirPCK6fbobVGiXMMI5zLQ4aKEYP3wZ3ArU44o+8KMrSG/Q==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + '@babel/runtime@7.28.4': resolution: {integrity: sha512-Q/N6JNWvIvPnLDvjlE1OUBLPQHH6l3CltCEsHIujp45zQUSSh8K+gHnaEX45yAT1nyngnINhvWtzN+Nb9D8RAQ==} engines: {node: '>=6.9.0'} @@ -623,156 +782,312 @@ packages: '@emotion/unitless@0.7.5': resolution: {integrity: sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg==} + '@esbuild/aix-ppc64@0.25.12': + resolution: {integrity: sha512-Hhmwd6CInZ3dwpuGTF8fJG6yoWmsToE+vYgD4nytZVxcu1ulHpUQRAB1UJ8+N1Am3Mz4+xOByoQoSZf4D+CpkA==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [aix] + '@esbuild/aix-ppc64@0.27.5': resolution: {integrity: sha512-nGsF/4C7uzUj+Nj/4J+Zt0bYQ6bz33Phz8Lb2N80Mti1HjGclTJdXZ+9APC4kLvONbjxN1zfvYNd8FEcbBK/MQ==} engines: {node: '>=18'} cpu: [ppc64] os: [aix] + '@esbuild/android-arm64@0.25.12': + resolution: {integrity: sha512-6AAmLG7zwD1Z159jCKPvAxZd4y/VTO0VkprYy+3N2FtJ8+BQWFXU+OxARIwA46c5tdD9SsKGZ/1ocqBS/gAKHg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [android] + '@esbuild/android-arm64@0.27.5': resolution: {integrity: sha512-Oeghq+XFgh1pUGd1YKs4DDoxzxkoUkvko+T/IVKwlghKLvvjbGFB3ek8VEDBmNvqhwuL0CQS3cExdzpmUyIrgA==} engines: {node: '>=18'} cpu: [arm64] os: [android] + '@esbuild/android-arm@0.25.12': + resolution: {integrity: sha512-VJ+sKvNA/GE7Ccacc9Cha7bpS8nyzVv0jdVgwNDaR4gDMC/2TTRc33Ip8qrNYUcpkOHUT5OZ0bUcNNVZQ9RLlg==} + engines: {node: '>=18'} + cpu: [arm] + os: [android] + '@esbuild/android-arm@0.27.5': resolution: {integrity: sha512-Cv781jd0Rfj/paoNrul1/r4G0HLvuFKYh7C9uHZ2Pl8YXstzvCyyeWENTFR9qFnRzNMCjXmsulZuvosDg10Mog==} engines: {node: '>=18'} cpu: [arm] os: [android] + '@esbuild/android-x64@0.25.12': + resolution: {integrity: sha512-5jbb+2hhDHx5phYR2By8GTWEzn6I9UqR11Kwf22iKbNpYrsmRB18aX/9ivc5cabcUiAT/wM+YIZ6SG9QO6a8kg==} + engines: {node: '>=18'} + cpu: [x64] + os: [android] + '@esbuild/android-x64@0.27.5': resolution: {integrity: sha512-nQD7lspbzerlmtNOxYMFAGmhxgzn8Z7m9jgFkh6kpkjsAhZee1w8tJW3ZlW+N9iRePz0oPUDrYrXidCPSImD0Q==} engines: {node: '>=18'} cpu: [x64] os: [android] + '@esbuild/darwin-arm64@0.25.12': + resolution: {integrity: sha512-N3zl+lxHCifgIlcMUP5016ESkeQjLj/959RxxNYIthIg+CQHInujFuXeWbWMgnTo4cp5XVHqFPmpyu9J65C1Yg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [darwin] + '@esbuild/darwin-arm64@0.27.5': resolution: {integrity: sha512-I+Ya/MgC6rr8oRWGRDF3BXDfP8K1BVUggHqN6VI2lUZLdDi1IM1v2cy0e3lCPbP+pVcK3Tv8cgUhHse1kaNZZw==} engines: {node: '>=18'} cpu: [arm64] os: [darwin] + '@esbuild/darwin-x64@0.25.12': + resolution: {integrity: sha512-HQ9ka4Kx21qHXwtlTUVbKJOAnmG1ipXhdWTmNXiPzPfWKpXqASVcWdnf2bnL73wgjNrFXAa3yYvBSd9pzfEIpA==} + engines: {node: '>=18'} + cpu: [x64] + os: [darwin] + '@esbuild/darwin-x64@0.27.5': resolution: {integrity: sha512-MCjQUtC8wWJn/pIPM7vQaO69BFgwPD1jriEdqwTCKzWjGgkMbcg+M5HzrOhPhuYe1AJjXlHmD142KQf+jnYj8A==} engines: {node: '>=18'} cpu: [x64] os: [darwin] + '@esbuild/freebsd-arm64@0.25.12': + resolution: {integrity: sha512-gA0Bx759+7Jve03K1S0vkOu5Lg/85dou3EseOGUes8flVOGxbhDDh/iZaoek11Y8mtyKPGF3vP8XhnkDEAmzeg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [freebsd] + '@esbuild/freebsd-arm64@0.27.5': resolution: {integrity: sha512-X6xVS+goSH0UelYXnuf4GHLwpOdc8rgK/zai+dKzBMnncw7BTQIwquOodE7EKvY2UVUetSqyAfyZC1D+oqLQtg==} engines: {node: '>=18'} cpu: [arm64] os: [freebsd] + '@esbuild/freebsd-x64@0.25.12': + resolution: {integrity: sha512-TGbO26Yw2xsHzxtbVFGEXBFH0FRAP7gtcPE7P5yP7wGy7cXK2oO7RyOhL5NLiqTlBh47XhmIUXuGciXEqYFfBQ==} + engines: {node: '>=18'} + cpu: [x64] + os: [freebsd] + '@esbuild/freebsd-x64@0.27.5': resolution: {integrity: sha512-233X1FGo3a8x1ekLB6XT69LfZ83vqz+9z3TSEQCTYfMNY880A97nr81KbPcAMl9rmOFp11wO0dP+eB18KU/Ucg==} engines: {node: '>=18'} cpu: [x64] os: [freebsd] + '@esbuild/linux-arm64@0.25.12': + resolution: {integrity: sha512-8bwX7a8FghIgrupcxb4aUmYDLp8pX06rGh5HqDT7bB+8Rdells6mHvrFHHW2JAOPZUbnjUpKTLg6ECyzvas2AQ==} + engines: {node: '>=18'} + cpu: [arm64] + os: [linux] + '@esbuild/linux-arm64@0.27.5': resolution: {integrity: sha512-euKkilsNOv7x/M1NKsx5znyprbpsRFIzTV6lWziqJch7yWYayfLtZzDxDTl+LSQDJYAjd9TVb/Kt5UKIrj2e4A==} engines: {node: '>=18'} cpu: [arm64] os: [linux] + '@esbuild/linux-arm@0.25.12': + resolution: {integrity: sha512-lPDGyC1JPDou8kGcywY0YILzWlhhnRjdof3UlcoqYmS9El818LLfJJc3PXXgZHrHCAKs/Z2SeZtDJr5MrkxtOw==} + engines: {node: '>=18'} + cpu: [arm] + os: [linux] + '@esbuild/linux-arm@0.27.5': resolution: {integrity: sha512-0wkVrYHG4sdCCN/bcwQ7yYMXACkaHc3UFeaEOwSVW6e5RycMageYAFv+JS2bKLwHyeKVUvtoVH+5/RHq0fgeFw==} engines: {node: '>=18'} cpu: [arm] os: [linux] + '@esbuild/linux-ia32@0.25.12': + resolution: {integrity: sha512-0y9KrdVnbMM2/vG8KfU0byhUN+EFCny9+8g202gYqSSVMonbsCfLjUO+rCci7pM0WBEtz+oK/PIwHkzxkyharA==} + engines: {node: '>=18'} + cpu: [ia32] + os: [linux] + '@esbuild/linux-ia32@0.27.5': resolution: {integrity: sha512-hVRQX4+P3MS36NxOy24v/Cdsimy/5HYePw+tmPqnNN1fxV0bPrFWR6TMqwXPwoTM2VzbkA+4lbHWUKDd5ZDA/w==} engines: {node: '>=18'} cpu: [ia32] os: [linux] + '@esbuild/linux-loong64@0.25.12': + resolution: {integrity: sha512-h///Lr5a9rib/v1GGqXVGzjL4TMvVTv+s1DPoxQdz7l/AYv6LDSxdIwzxkrPW438oUXiDtwM10o9PmwS/6Z0Ng==} + engines: {node: '>=18'} + cpu: [loong64] + os: [linux] + '@esbuild/linux-loong64@0.27.5': resolution: {integrity: sha512-mKqqRuOPALI8nDzhOBmIS0INvZOOFGGg5n1osGIXAx8oersceEbKd4t1ACNTHM3sJBXGFAlEgqM+svzjPot+ZQ==} engines: {node: '>=18'} cpu: [loong64] os: [linux] + '@esbuild/linux-mips64el@0.25.12': + resolution: {integrity: sha512-iyRrM1Pzy9GFMDLsXn1iHUm18nhKnNMWscjmp4+hpafcZjrr2WbT//d20xaGljXDBYHqRcl8HnxbX6uaA/eGVw==} + engines: {node: '>=18'} + cpu: [mips64el] + os: [linux] + '@esbuild/linux-mips64el@0.27.5': resolution: {integrity: sha512-EE/QXH9IyaAj1qeuIV5+/GZkBTipgGO782Ff7Um3vPS9cvLhJJeATy4Ggxikz2inZ46KByamMn6GqtqyVjhenA==} engines: {node: '>=18'} cpu: [mips64el] os: [linux] + '@esbuild/linux-ppc64@0.25.12': + resolution: {integrity: sha512-9meM/lRXxMi5PSUqEXRCtVjEZBGwB7P/D4yT8UG/mwIdze2aV4Vo6U5gD3+RsoHXKkHCfSxZKzmDssVlRj1QQA==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [linux] + '@esbuild/linux-ppc64@0.27.5': resolution: {integrity: sha512-0V2iF1RGxBf1b7/BjurA5jfkl7PtySjom1r6xOK2q9KWw/XCpAdtB6KNMO+9xx69yYfSCRR9FE0TyKfHA2eQMw==} engines: {node: '>=18'} cpu: [ppc64] os: [linux] + '@esbuild/linux-riscv64@0.25.12': + resolution: {integrity: sha512-Zr7KR4hgKUpWAwb1f3o5ygT04MzqVrGEGXGLnj15YQDJErYu/BGg+wmFlIDOdJp0PmB0lLvxFIOXZgFRrdjR0w==} + engines: {node: '>=18'} + cpu: [riscv64] + os: [linux] + '@esbuild/linux-riscv64@0.27.5': resolution: {integrity: sha512-rYxThBx6G9HN6tFNuvB/vykeLi4VDsm5hE5pVwzqbAjZEARQrWu3noZSfbEnPZ/CRXP3271GyFk/49up2W190g==} engines: {node: '>=18'} cpu: [riscv64] os: [linux] + '@esbuild/linux-s390x@0.25.12': + resolution: {integrity: sha512-MsKncOcgTNvdtiISc/jZs/Zf8d0cl/t3gYWX8J9ubBnVOwlk65UIEEvgBORTiljloIWnBzLs4qhzPkJcitIzIg==} + engines: {node: '>=18'} + cpu: [s390x] + os: [linux] + '@esbuild/linux-s390x@0.27.5': resolution: {integrity: sha512-uEP2q/4qgd8goEUc4QIdU/1P2NmEtZ/zX5u3OpLlCGhJIuBIv0s0wr7TB2nBrd3/A5XIdEkkS5ZLF0ULuvaaYQ==} engines: {node: '>=18'} cpu: [s390x] os: [linux] + '@esbuild/linux-x64@0.25.12': + resolution: {integrity: sha512-uqZMTLr/zR/ed4jIGnwSLkaHmPjOjJvnm6TVVitAa08SLS9Z0VM8wIRx7gWbJB5/J54YuIMInDquWyYvQLZkgw==} + engines: {node: '>=18'} + cpu: [x64] + os: [linux] + '@esbuild/linux-x64@0.27.5': resolution: {integrity: sha512-+Gq47Wqq6PLOOZuBzVSII2//9yyHNKZLuwfzCemqexqOQCSz0zy0O26kIzyp9EMNMK+nZ0tFHBZrCeVUuMs/ew==} engines: {node: '>=18'} cpu: [x64] os: [linux] + '@esbuild/netbsd-arm64@0.25.12': + resolution: {integrity: sha512-xXwcTq4GhRM7J9A8Gv5boanHhRa/Q9KLVmcyXHCTaM4wKfIpWkdXiMog/KsnxzJ0A1+nD+zoecuzqPmCRyBGjg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [netbsd] + '@esbuild/netbsd-arm64@0.27.5': resolution: {integrity: sha512-3F/5EG8VHfN/I+W5cO1/SV2H9Q/5r7vcHabMnBqhHK2lTWOh3F8vixNzo8lqxrlmBtZVFpW8pmITHnq54+Tq4g==} engines: {node: '>=18'} cpu: [arm64] os: [netbsd] + '@esbuild/netbsd-x64@0.25.12': + resolution: {integrity: sha512-Ld5pTlzPy3YwGec4OuHh1aCVCRvOXdH8DgRjfDy/oumVovmuSzWfnSJg+VtakB9Cm0gxNO9BzWkj6mtO1FMXkQ==} + engines: {node: '>=18'} + cpu: [x64] + os: [netbsd] + '@esbuild/netbsd-x64@0.27.5': resolution: {integrity: sha512-28t+Sj3CPN8vkMOlZotOmDgilQwVvxWZl7b8rxpn73Tt/gCnvrHxQUMng4uu3itdFvrtba/1nHejvxqz8xgEMA==} engines: {node: '>=18'} cpu: [x64] os: [netbsd] + '@esbuild/openbsd-arm64@0.25.12': + resolution: {integrity: sha512-fF96T6KsBo/pkQI950FARU9apGNTSlZGsv1jZBAlcLL1MLjLNIWPBkj5NlSz8aAzYKg+eNqknrUJ24QBybeR5A==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openbsd] + '@esbuild/openbsd-arm64@0.27.5': resolution: {integrity: sha512-Doz/hKtiuVAi9hMsBMpwBANhIZc8l238U2Onko3t2xUp8xtM0ZKdDYHMnm/qPFVthY8KtxkXaocwmMh6VolzMA==} engines: {node: '>=18'} cpu: [arm64] os: [openbsd] + '@esbuild/openbsd-x64@0.25.12': + resolution: {integrity: sha512-MZyXUkZHjQxUvzK7rN8DJ3SRmrVrke8ZyRusHlP+kuwqTcfWLyqMOE3sScPPyeIXN/mDJIfGXvcMqCgYKekoQw==} + engines: {node: '>=18'} + cpu: [x64] + os: [openbsd] + '@esbuild/openbsd-x64@0.27.5': resolution: {integrity: sha512-WfGVaa1oz5A7+ZFPkERIbIhKT4olvGl1tyzTRaB5yoZRLqC0KwaO95FeZtOdQj/oKkjW57KcVF944m62/0GYtA==} engines: {node: '>=18'} cpu: [x64] os: [openbsd] + '@esbuild/openharmony-arm64@0.25.12': + resolution: {integrity: sha512-rm0YWsqUSRrjncSXGA7Zv78Nbnw4XL6/dzr20cyrQf7ZmRcsovpcRBdhD43Nuk3y7XIoW2OxMVvwuRvk9XdASg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openharmony] + '@esbuild/openharmony-arm64@0.27.5': resolution: {integrity: sha512-Xh+VRuh6OMh3uJ0JkCjI57l+DVe7VRGBYymen8rFPnTVgATBwA6nmToxM2OwTlSvrnWpPKkrQUj93+K9huYC6A==} engines: {node: '>=18'} cpu: [arm64] os: [openharmony] + '@esbuild/sunos-x64@0.25.12': + resolution: {integrity: sha512-3wGSCDyuTHQUzt0nV7bocDy72r2lI33QL3gkDNGkod22EsYl04sMf0qLb8luNKTOmgF/eDEDP5BFNwoBKH441w==} + engines: {node: '>=18'} + cpu: [x64] + os: [sunos] + '@esbuild/sunos-x64@0.27.5': resolution: {integrity: sha512-aC1gpJkkaUADHuAdQfuVTnqVUTLqqUNhAvEwHwVWcnVVZvNlDPGA0UveZsfXJJ9T6k9Po4eHi3c02gbdwO3g6w==} engines: {node: '>=18'} cpu: [x64] os: [sunos] + '@esbuild/win32-arm64@0.25.12': + resolution: {integrity: sha512-rMmLrur64A7+DKlnSuwqUdRKyd3UE7oPJZmnljqEptesKM8wx9J8gx5u0+9Pq0fQQW8vqeKebwNXdfOyP+8Bsg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [win32] + '@esbuild/win32-arm64@0.27.5': resolution: {integrity: sha512-0UNx2aavV0fk6UpZcwXFLztA2r/k9jTUa7OW7SAea1VYUhkug99MW1uZeXEnPn5+cHOd0n8myQay6TlFnBR07w==} engines: {node: '>=18'} cpu: [arm64] os: [win32] + '@esbuild/win32-ia32@0.25.12': + resolution: {integrity: sha512-HkqnmmBoCbCwxUKKNPBixiWDGCpQGVsrQfJoVGYLPT41XWF8lHuE5N6WhVia2n4o5QK5M4tYr21827fNhi4byQ==} + engines: {node: '>=18'} + cpu: [ia32] + os: [win32] + '@esbuild/win32-ia32@0.27.5': resolution: {integrity: sha512-5nlJ3AeJWCTSzR7AEqVjT/faWyqKU86kCi1lLmxVqmNR+j4HrYdns+eTGjS/vmrzCIe8inGQckUadvS0+JkKdQ==} engines: {node: '>=18'} cpu: [ia32] os: [win32] + '@esbuild/win32-x64@0.25.12': + resolution: {integrity: sha512-alJC0uCZpTFrSL0CCDjcgleBXPnCrEAhTBILpeAp7M/OFgoqtAetfBzX0xM00MUsVVPpVjlPuMbREqnZCXaTnA==} + engines: {node: '>=18'} + cpu: [x64] + os: [win32] + '@esbuild/win32-x64@0.27.5': resolution: {integrity: sha512-PWypQR+d4FLfkhBIV+/kHsUELAnMpx1bRvvsn3p+/sAERbnCzFrtDRG2Xw5n+2zPxBK2+iaP+vetsRl4Ti7WgA==} engines: {node: '>=18'} @@ -1061,6 +1376,134 @@ packages: resolution: {integrity: sha512-QNqXyfVS2wm9hweSYD2O7F0G06uurj9kZ96TRQE5Y9hU7+tgdZwIkbAKc5Ocy1HxEY2kuDQa6cQ1WRs/O5LFKA==} engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} + '@rolldown/pluginutils@1.0.0-beta.27': + resolution: {integrity: sha512-+d0F4MKMCbeVUJwG96uQ4SgAznZNSq93I3V+9NHA4OpvqG8mRCpGdKmK8l/dl02h2CCDHwW2FqilnTyDcAnqjA==} + + '@rollup/rollup-android-arm-eabi@4.61.1': + resolution: {integrity: sha512-JnBB8MdXj45cajvTuO5FmPlvFVJRQgvrz1uSEl3NwqFnReAPGwb8EanbGi4z2nRaqLzjJSv5/JmycoTKlRZxHA==} + cpu: [arm] + os: [android] + + '@rollup/rollup-android-arm64@4.61.1': + resolution: {integrity: sha512-Jx2g7iSjw4AOT0HDPHM9RV3GNjRXwybWtSFZiZAYUTjUwjVrYIwq3kBf+LnhqJlzXFAqTAh2F7IGI+O568exPw==} + cpu: [arm64] + os: [android] + + '@rollup/rollup-darwin-arm64@4.61.1': + resolution: {integrity: sha512-0F1L/Z3Eqv8mT2n3dCpeO8GcTvHvVqkP5/t6DMsn0KzhYVcg+s7Ncl5DS8qjKYEeio6Az0Gt6nyBORay5qIlCA==} + cpu: [arm64] + os: [darwin] + + '@rollup/rollup-darwin-x64@4.61.1': + resolution: {integrity: sha512-qLttcH871ujY4YcVfUSShhOw+CsoTatYz8gRbHO7Bb92QH059/P0y5do1KMs41fY0BpD2x4AJH/gID0zFiqVKQ==} + cpu: [x64] + os: [darwin] + + '@rollup/rollup-freebsd-arm64@4.61.1': + resolution: {integrity: sha512-fUI4RapGE0Oh3mb8mgfvC1O2nU1RpDZUKnDQm3xB1Ipg7C2wTs5Kstz7G2uWK99a8S2yTMq8/P4uycwNa0nJyw==} + cpu: [arm64] + os: [freebsd] + + '@rollup/rollup-freebsd-x64@4.61.1': + resolution: {integrity: sha512-H5YrdvJaDtI/U9/emrD4b++xkvp3y/JvOe4rizHbxvkyMfRS/CiRYdji+Pl8D0brEaNFWUh1drQxgAGIl6Xudw==} + cpu: [x64] + os: [freebsd] + + '@rollup/rollup-linux-arm-gnueabihf@4.61.1': + resolution: {integrity: sha512-Q8CBCCQtDFrYtXoeUXSrnFXKOnyUhx6bz+SkL6A0E7V8kAiCJ5pamq1WtbfpVGhR5TSpXY6ak3avmDc5fHTyJA==} + cpu: [arm] + os: [linux] + + '@rollup/rollup-linux-arm-musleabihf@4.61.1': + resolution: {integrity: sha512-nwnhk1581l0FBVellGcVCAT0Oi06onEA3WB53sf01VO3I0UPBkMH9sXONYME2K0ovXcNayJfNtHfm6mpJElatQ==} + cpu: [arm] + os: [linux] + + '@rollup/rollup-linux-arm64-gnu@4.61.1': + resolution: {integrity: sha512-x5Xr49hwt3hdW75UOZm3395YwwzPyauktslv29KpWL/T+vVAzoT3azLcTWv0eMciBNrx+DYjH4paehHoLpPvpg==} + cpu: [arm64] + os: [linux] + + '@rollup/rollup-linux-arm64-musl@4.61.1': + resolution: {integrity: sha512-unMS3H73DpaoPyyEVPjGKleM/s0mkmsauTENpw4INQY8y4+IuLNjkueQ5QCtC0D3N38Y38yhAU8OoZ20S2Tm6w==} + cpu: [arm64] + os: [linux] + + '@rollup/rollup-linux-loong64-gnu@4.61.1': + resolution: {integrity: sha512-zNZzGRnAhwjFEYmvphJRV5XaQGjs62cCmeYYHUT//NbvEnHauw+I85nGG+SiVg5ld4GX8D1IbKIX+ozITQnhMQ==} + cpu: [loong64] + os: [linux] + + '@rollup/rollup-linux-loong64-musl@4.61.1': + resolution: {integrity: sha512-LdpWGL8X209B2SIvWjqlc8VZgM6PKfontSerGepuldQmHYrAOtnMCXeJkxXGbC+PPZVOuu5czJo7fNV6aeW8rQ==} + cpu: [loong64] + os: [linux] + + '@rollup/rollup-linux-ppc64-gnu@4.61.1': + resolution: {integrity: sha512-EC5kTtNaNGOmbMGqar8dvJy6y/hg99GAwjfBz++pxZhQATXGcRjd6c5en5wcbru0vkRmiMGsQKdMJOOf6sza4g==} + cpu: [ppc64] + os: [linux] + + '@rollup/rollup-linux-ppc64-musl@4.61.1': + resolution: {integrity: sha512-8hiwp6D4acEcNK78I4rP0/XtS1sknWIAMJBPdR4l6zUtyTm5KiTDr5bXmWt4foY7nAN7AThDHgkLIEZOWKbzWw==} + cpu: [ppc64] + os: [linux] + + '@rollup/rollup-linux-riscv64-gnu@4.61.1': + resolution: {integrity: sha512-10dh/h/BqA7DuMPWSxkR8uks18FRwnwOEqr5zOTEl+NOwP/OMzKX8OFR/Of9xxDA7D5qef1Nzar5WDD2kCCr1g==} + cpu: [riscv64] + os: [linux] + + '@rollup/rollup-linux-riscv64-musl@4.61.1': + resolution: {integrity: sha512-YKJ5lg35DP17gcAOggnihe+APw9HLyj1Xn7gsmGumBJAUDa6NGXNixJzmkWLhcK9TOuuyQjdamzvJefkO7qHZQ==} + cpu: [riscv64] + os: [linux] + + '@rollup/rollup-linux-s390x-gnu@4.61.1': + resolution: {integrity: sha512-Mlil5G2Jj6a7B3LWGctg+XPL9vdXYuzCtNXfxOQ0nPjc2m6ueUktocPGH9bnAM0bNRKb/bAWTujUU7IJQdQA+g==} + cpu: [s390x] + os: [linux] + + '@rollup/rollup-linux-x64-gnu@4.61.1': + resolution: {integrity: sha512-bVWIOIk6pV01p4CdUbPP7CJ/434z+OooYjDuFcR+44N35YvKUC66G8MGnvcWx5mWKW3g61J+t74l3Kj15Kwn2Q==} + cpu: [x64] + os: [linux] + + '@rollup/rollup-linux-x64-musl@4.61.1': + resolution: {integrity: sha512-qy5pBvZbqNFheBz61R1rzsezjm0J7O2oNGoWtGoY89SZYLUfxAJTBAqDChqAIdB4rCiIbi9nF7yZ83GnNiLwSw==} + cpu: [x64] + os: [linux] + + '@rollup/rollup-openbsd-x64@4.61.1': + resolution: {integrity: sha512-E83TXjI4zm0+5f2qO+UOudaCYIhYwpJ5jq6YCZNIZ+6CbfhKrkAGezeiASBL9ElxAxFsRS9ZhESv8mfnj6TKeg==} + cpu: [x64] + os: [openbsd] + + '@rollup/rollup-openharmony-arm64@4.61.1': + resolution: {integrity: sha512-fbWnKqVkjrJN38vNe3ahkbk6iejS/3b0Nt7EEtPpE6RBacZcGXNKbzfHN3GUUlXOPghUg0j6XUGrtjX9z1sIvA==} + cpu: [arm64] + os: [openharmony] + + '@rollup/rollup-win32-arm64-msvc@4.61.1': + resolution: {integrity: sha512-ArMl38iVAbk0New1ogihQNY6iphLi4ZaRsa037gUzv5yeKPY8TD3Dmy4x2RNC1VztU/uqm+G+/RwFrSka3Oy2g==} + cpu: [arm64] + os: [win32] + + '@rollup/rollup-win32-ia32-msvc@4.61.1': + resolution: {integrity: sha512-0mYtjHS9ucAbcATycCNK9IGBk/cCe/ma7EmSLGZdsxnOA8cjRIyU04wDpVAD9NiOfLUR9KTxdiO53uOkherqjQ==} + cpu: [ia32] + os: [win32] + + '@rollup/rollup-win32-x64-gnu@4.61.1': + resolution: {integrity: sha512-gK1iCEPfpoSG9wfBihXxvBMi8ZfcWffYkEsC/Eih+iFENTaewvNcrEQ69lIOWYO5pePHKLHHO7nq5AILGO/HQQ==} + cpu: [x64] + os: [win32] + + '@rollup/rollup-win32-x64-msvc@4.61.1': + resolution: {integrity: sha512-X+zaP2x+j4RXGfbp/seSoRHWnPxzApilDszisZxbYH5C/jTxFhCtDNdPGZb9lJyYPs24wGxruPF7Y+sIXt9Gzw==} + cpu: [x64] + os: [win32] + '@sinclair/typebox@0.27.10': resolution: {integrity: sha512-MTBk/3jGLNB2tVxv6uLlFh1iu64iYOQ2PbdOSK3NW8JZsmlaOh2q6sdtKowBhfw8QFLmYNzTW4/oK4uATIi6ZA==} @@ -1115,6 +1558,96 @@ packages: '@styled-system/variant@5.1.5': resolution: {integrity: sha512-Yn8hXAFoWIro8+Q5J8YJd/mP85Teiut3fsGVR9CAxwgNfIAiqlYxsk5iHU7VHJks/0KjL4ATSjmbtCDC/4l1qw==} + '@tailwindcss/node@4.3.0': + resolution: {integrity: sha512-aFb4gUhFOgdh9AXo4IzBEOzBkkAxm9VigwDJnMIYv3lcfXCJVesNfbEaBl4BNgVRyid92AmdviqwBUBRKSeY3g==} + + '@tailwindcss/oxide-android-arm64@4.3.0': + resolution: {integrity: sha512-TJPiq67tKlLuObP6RkwvVGDoxCMBVtDgKkLfa/uyj7/FyxvQwHS+UOnVrXXgbEsfUaMgiVvC4KbJnRr26ho4Ng==} + engines: {node: '>= 20'} + cpu: [arm64] + os: [android] + + '@tailwindcss/oxide-darwin-arm64@4.3.0': + resolution: {integrity: sha512-oMN/WZRb+SO37BmUElEgeEWuU8E/HXRkiODxJxLe1UTHVXLrdVSgfaJV7pSlhRGMSOiXLuxTIjfsF3wYvz8cgQ==} + engines: {node: '>= 20'} + cpu: [arm64] + os: [darwin] + + '@tailwindcss/oxide-darwin-x64@4.3.0': + resolution: {integrity: sha512-N6CUmu4a6bKVADfw77p+iw6Yd9Q3OBhe0veaDX+QazfuVYlQsHfDgxBrsjQ/IW+zywL8mTrNd0SdJT/zgtvMdA==} + engines: {node: '>= 20'} + cpu: [x64] + os: [darwin] + + '@tailwindcss/oxide-freebsd-x64@4.3.0': + resolution: {integrity: sha512-zDL5hBkQdH5C6MpqbK3gQAgP80tsMwSI26vjOzjJtNCMUo0lFgOItzHKBIupOZNQxt3ouPH7RPhvNhiTfCe5CQ==} + engines: {node: '>= 20'} + cpu: [x64] + os: [freebsd] + + '@tailwindcss/oxide-linux-arm-gnueabihf@4.3.0': + resolution: {integrity: sha512-R06HdNi7A7OEoMsf6d4tjZ71RCWnZQPHj2mnotSFURjNLdBC+cIgXQ7l81CqeoiQftjf6OOblxXMInMgN2VzMA==} + engines: {node: '>= 20'} + cpu: [arm] + os: [linux] + + '@tailwindcss/oxide-linux-arm64-gnu@4.3.0': + resolution: {integrity: sha512-qTJHELX8jetjhRQHCLilkVLmybpzNQAtaI/gaoVoidn/ufbNDbAo8KlK2J+yPoc8wQxvDxCmh/5lr8nC1+lTbg==} + engines: {node: '>= 20'} + cpu: [arm64] + os: [linux] + + '@tailwindcss/oxide-linux-arm64-musl@4.3.0': + resolution: {integrity: sha512-Z6sukiQsngnWO+l39X4pPbiWT81IC+PLKF+PHxIlyZbGNb9MODfYlXEVlFvej5BOZInWX01kVyzeLvHsXhfczQ==} + engines: {node: '>= 20'} + cpu: [arm64] + os: [linux] + + '@tailwindcss/oxide-linux-x64-gnu@4.3.0': + resolution: {integrity: sha512-DRNdQRpSGzRGfARVuVkxvM8Q12nh19l4BF/G7zGA1oe+9wcC6saFBHTISrpIcKzhiXtSrlSrluCfvMuledoCTQ==} + engines: {node: '>= 20'} + cpu: [x64] + os: [linux] + + '@tailwindcss/oxide-linux-x64-musl@4.3.0': + resolution: {integrity: sha512-Z0IADbDo8bh6I7h2IQMx601AdXBLfFpEdUotft86evd/8ZPflZe9COPO8Q1vw+pfLWIUo9zN/JGZvwuAJqduqg==} + engines: {node: '>= 20'} + cpu: [x64] + os: [linux] + + '@tailwindcss/oxide-wasm32-wasi@4.3.0': + resolution: {integrity: sha512-HNZGOUxEmElksYR7S6sC5jTeNGpobAsy9u7Gu0AskJ8/20FR9GqebUyB+HBcU/ax6BHuiuJi+Oda4B+YX6H1yA==} + engines: {node: '>=14.0.0'} + cpu: [wasm32] + bundledDependencies: + - '@napi-rs/wasm-runtime' + - '@emnapi/core' + - '@emnapi/runtime' + - '@tybys/wasm-util' + - '@emnapi/wasi-threads' + - tslib + + '@tailwindcss/oxide-win32-arm64-msvc@4.3.0': + resolution: {integrity: sha512-Pe+RPVTi1T+qymuuRpcdvwSVZjnll/f7n8gBxMMh3xLTctMDKqpdfGimbMyioqtLhUYZxdJ9wGNhV7MKHvgZsQ==} + engines: {node: '>= 20'} + cpu: [arm64] + os: [win32] + + '@tailwindcss/oxide-win32-x64-msvc@4.3.0': + resolution: {integrity: sha512-Mvrf2kXW/yeW/OTezZlCGOirXRcUuLIBx/5Y12BaPM7wJoryG6dfS/NJL8aBPqtTEx/Vm4T4vKzFUcKDT+TKUA==} + engines: {node: '>= 20'} + cpu: [x64] + os: [win32] + + '@tailwindcss/oxide@4.3.0': + resolution: {integrity: sha512-F7HZGBeN9I0/AuuJS5PwcD8xayx5ri5GhjYUDBEVYUkexyA/giwbDNjRVrxSezE3T250OU2K/wp/ltWx3UOefg==} + engines: {node: '>= 20'} + + '@tailwindcss/vite@4.3.0': + resolution: {integrity: sha512-t6J3OrB5Fc0ExuhohouH0fWUGMYL6PTLhW+E7zIk/pdbnJARZDCwjBznFnkh5ynRnIRSI4YjtTH0t6USjJISrw==} + peerDependencies: + vite: ^5.2.0 || ^6 || ^7 || ^8 + '@tybys/wasm-util@0.10.1': resolution: {integrity: sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg==} @@ -1142,6 +1675,9 @@ packages: '@types/estree@1.0.8': resolution: {integrity: sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==} + '@types/estree@1.0.9': + resolution: {integrity: sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==} + '@types/express-serve-static-core@5.1.1': resolution: {integrity: sha512-v4zIMr/cX7/d2BpAEX3KNKL/JrT1s43s96lLvvdTmza1oEvDudCqK9aF/djc/SWgy8Yh0h30TZx5VpzqFCxk5A==} @@ -1187,6 +1723,14 @@ packages: '@types/range-parser@1.2.7': resolution: {integrity: sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==} + '@types/react-dom@19.2.3': + resolution: {integrity: sha512-jp2L/eY6fn+KgVVQAOqYItbF0VY/YApe5Mz2F0aykSO8gx31bYCZyvSeYxCHKvzHG5eZjc+zyaS5BrBWya2+kQ==} + peerDependencies: + '@types/react': ^19.2.0 + + '@types/react@19.2.17': + resolution: {integrity: sha512-MXfmqaVPEVgkBT/aY0aGCkRWWtByiYQXo3xdQ8r5RzuFrPiRn8Gar2tQdXSUQ2GKV3bkXckek89V8wQBY2Q/Aw==} + '@types/retry@0.12.5': resolution: {integrity: sha512-3xSjTp3v03X/lSQLkczaN9UIEwJMoMCA1+Nb5HfbJEQWogdeQIyVtTvxPXDQjZ5zws8rFQfVfRdz03ARihPJgw==} @@ -1199,6 +1743,9 @@ packages: '@types/stack-utils@2.0.3': resolution: {integrity: sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==} + '@types/ws@8.18.1': + resolution: {integrity: sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg==} + '@types/yargs-parser@21.0.3': resolution: {integrity: sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==} @@ -1363,10 +1910,28 @@ packages: cpu: [x64] os: [win32] + '@vitejs/plugin-react@4.7.0': + resolution: {integrity: sha512-gUu9hwfWvvEDBBmgtAowQCojwZmJ5mcLn3aufeCsitijs3+f2NsrPtlAWIR6OPiqljl96GVCUbLe0HyqIpVaoA==} + engines: {node: ^14.18.0 || >=16.0.0} + peerDependencies: + vite: ^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 + + '@xterm/addon-fit@0.10.0': + resolution: {integrity: sha512-UFYkDm4HUahf2lnEyHvio51TNGiLK66mqP2JoATy7hRZeXaGMRDr00JiSF7m63vR5WKATF605yEggJKsw0JpMQ==} + peerDependencies: + '@xterm/xterm': ^5.0.0 + + '@xterm/xterm@5.5.0': + resolution: {integrity: sha512-hqJHYaQb5OptNunnyAnkHyM8aCjZ1MEIDTQu1iIbbTD/xops91NB5yq1ZK/dC2JDbVWtF23zUtl9JE2NqwT87A==} + abbrev@2.0.0: resolution: {integrity: sha512-6/mh1E2u2YgEsCHdY0Yx5oW+61gZU+1vXaoiHHrpKeuRNNgFvS+/jrwHiQhB5apAf5oB7UB7E19ol2R2LKH8hQ==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + accepts@1.3.8: + resolution: {integrity: sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==} + engines: {node: '>= 0.6'} + accepts@2.0.0: resolution: {integrity: sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==} engines: {node: '>= 0.6'} @@ -1425,6 +1990,9 @@ packages: argparse@2.0.1: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} + array-flatten@1.1.1: + resolution: {integrity: sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==} + async-retry@1.3.3: resolution: {integrity: sha512-wfr/jstw9xNi/0teMHrRW7dsz3Lt5ARhYNZ2ewpadnhaIp5mbALhOAP+EAdsC7t4Z6wqsDVv9+W6gm1Dk9mEyw==} @@ -1501,6 +2069,10 @@ packages: resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==} engines: {node: '>=8'} + body-parser@1.20.5: + resolution: {integrity: sha512-3grm+/2tUOvu2cjJkvsIxrv/wVpfXQW4PsQHYm7yk4vfpu7Ekl6nEsYBoJUL6qDwZUx8wUhQ8tR2qz+ad9c9OA==} + engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} + body-parser@2.2.1: resolution: {integrity: sha512-nfDwkulwiZYQIGwxdy0RUmowMhKcFVcYXUU7m4QlKYim1rUtg83xm2yjZ40QjDuc291AJjjeSc9b++AWHSgSHw==} engines: {node: '>=18'} @@ -1636,6 +2208,10 @@ packages: resolution: {integrity: sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==} engines: {node: '>=14'} + commander@15.0.0: + resolution: {integrity: sha512-z67u4ZhzCL/Tydu1lJARtEZYWbWaN7oYLHbsuzocr6y4N6WZAagG3RQ4FW61V1/0+jImpj293XfrcYnd1qxtPg==} + engines: {node: '>=22.12.0'} + commander@2.17.1: resolution: {integrity: sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==} @@ -1649,9 +2225,18 @@ packages: concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} + concurrently@9.2.1: + resolution: {integrity: sha512-fsfrO0MxV64Znoy8/l1vVIjjHa29SZyyqPgQBwhiDcaW8wJc2W3XWVOGx4M3oJBnv/zdUZIIp1gDeS98GzP8Ng==} + engines: {node: '>=18'} + hasBin: true + config-chain@1.1.13: resolution: {integrity: sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==} + content-disposition@0.5.4: + resolution: {integrity: sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==} + engines: {node: '>= 0.6'} + content-disposition@1.0.1: resolution: {integrity: sha512-oIXISMynqSqm241k6kcQ5UwttDILMK4BiurCfGEREw6+X9jkkpEe5T9FZaApyLGGOnFuyMWZpdolTXMtvEJ08Q==} engines: {node: '>=18'} @@ -1663,6 +2248,9 @@ packages: convert-source-map@2.0.0: resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} + cookie-signature@1.0.7: + resolution: {integrity: sha512-NXdYc3dLr47pBkpUCHtKSwIOQXLVn8dZEuywboCOJY/osA0wFSLlSawr3KN8qXJEyX66FcONTH8EIlVuK0yyFA==} + cookie-signature@1.2.2: resolution: {integrity: sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==} engines: {node: '>=6.6.0'} @@ -1708,6 +2296,17 @@ packages: resolution: {integrity: sha512-u/O3vwbptzhMs3L1fQE82ZSLHQQfto5gyZzwteVIEyeaY5Fc7R4dapF/BvRoSYFeqfBk4m0V1Vafq5Pjv25wvA==} engines: {node: '>= 6'} + csstype@3.2.3: + resolution: {integrity: sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==} + + debug@2.6.9: + resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + debug@4.4.3: resolution: {integrity: sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==} engines: {node: '>=6.0'} @@ -1744,6 +2343,14 @@ packages: resolution: {integrity: sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==} engines: {node: '>= 0.8'} + destroy@1.2.0: + resolution: {integrity: sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==} + engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} + + detect-libc@2.1.2: + resolution: {integrity: sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==} + engines: {node: '>=8'} + detect-newline@3.1.0: resolution: {integrity: sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==} engines: {node: '>=8'} @@ -1832,6 +2439,10 @@ packages: encoding-sniffer@0.2.1: resolution: {integrity: sha512-5gvq20T6vfpekVtqrYQsSCFZ1wEg5+wW0/QaZMWkFr6BqD3NfKs0rLCx4rrVlSWJeZb5NBJgVLswK/w2MWU+Gw==} + enhanced-resolve@5.23.0: + resolution: {integrity: sha512-yJN/BOOLxcOW2aQgeif9mSnaUB8KtvmMMp56oA1kx1CRfBKbhZm2pJ+NBY+3eOboHxix8lfjWpHE0Ei5U8RbSA==} + engines: {node: '>=10.13.0'} + entities@1.1.2: resolution: {integrity: sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==} @@ -1869,6 +2480,11 @@ packages: resolution: {integrity: sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==} engines: {node: '>= 0.4'} + esbuild@0.25.12: + resolution: {integrity: sha512-bbPBYYrtZbkt6Os6FiTLCTFxvq4tt3JKall1vRwshA3fdVztsLAatFaZobhkBC8/BrPetoa0oksYoKXoG4ryJg==} + engines: {node: '>=18'} + hasBin: true + esbuild@0.27.5: resolution: {integrity: sha512-zdQoHBjuDqKsvV5OPaWansOwfSQ0Js+Uj9J85TBvj3bFW1JjWTSULMRwdQAc8qMeIScbClxeMK0jlrtB9linhA==} engines: {node: '>=18'} @@ -1984,6 +2600,10 @@ packages: resolution: {integrity: sha512-u/feCi0GPsI+988gU2FLcsHyAHTU0MX1Wg68NhAnN7z/+C5wqG+CY8J53N9ioe8RXgaoz0nBR/TYMf3AycUuPw==} engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + express@4.22.2: + resolution: {integrity: sha512-IuL+Elrou2ZvCFHs18/CIzy2Nzvo25nZ1/D2eIZlz7c+QUayAcYoiM2BthCjs+EBHVpjYjcuLDAiCWgeIX3X1Q==} + engines: {node: '>= 0.10.0'} + express@5.2.1: resolution: {integrity: sha512-hIS4idWWai69NezIdRt2xFVofaF4j+6INOpJlVOLDO8zXGpUVEVzIYk12UUi2JzjEzWL3IOAxcTubgz9Po0yXw==} engines: {node: '>= 18'} @@ -2017,6 +2637,10 @@ packages: resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} engines: {node: '>=8'} + finalhandler@1.3.2: + resolution: {integrity: sha512-aA4RyPcd3badbdABGDuTXCMTtOneUCAYH/gxoYRTZlIJdF0YPWuGqiAsIrhNnnqdXGswYk6dGujem4w80UJFhg==} + engines: {node: '>= 0.8'} + finalhandler@2.1.1: resolution: {integrity: sha512-S8KoZgRZN+a5rNwqTxlZZePjT/4cnm0ROV70LedRHZ0p8u9fRID0hJUZQpkKLzro8LfmC8sx23bY6tVNxv8pQA==} engines: {node: '>= 18.0.0'} @@ -2060,6 +2684,10 @@ packages: resolution: {integrity: sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==} engines: {node: '>= 0.6'} + fresh@0.5.2: + resolution: {integrity: sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==} + engines: {node: '>= 0.6'} + fresh@2.0.0: resolution: {integrity: sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==} engines: {node: '>= 0.8'} @@ -2215,6 +2843,10 @@ packages: resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} engines: {node: '>=10.17.0'} + iconv-lite@0.4.24: + resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} + engines: {node: '>=0.10.0'} + iconv-lite@0.6.3: resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==} engines: {node: '>=0.10.0'} @@ -2585,6 +3217,10 @@ packages: node-notifier: optional: true + jiti@2.7.0: + resolution: {integrity: sha512-AC/7JofJvZGrrneWNaEnJeOLUx+JlGt7tNa0wZiRPT4MY1wmfKjt2+6O2p2uz2+skll8OZZmJMNqeke7kKbNgQ==} + hasBin: true + js-beautify@1.15.4: resolution: {integrity: sha512-9/KXeZUKKJwqCXUdBxFJ3vPh467OCckSBmYDwSK/EtV090K+iMJ7zx2S3HLVDIWFQdqMIsZWbnaGiba18aWhaA==} engines: {node: '>=14'} @@ -2639,6 +3275,9 @@ packages: resolution: {integrity: sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==} engines: {node: '>=6'} + kubernetesjs@0.7.7: + resolution: {integrity: sha512-lgPRINWQRnzmZh2DToauk6lLTtFqfZVSBbQ3JcpL3FELmYEPPEiws5HutfhreLFCJUiOH0AL1LpD8h70WL5hAA==} + leven@3.1.0: resolution: {integrity: sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==} engines: {node: '>=6'} @@ -2647,6 +3286,76 @@ packages: resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} engines: {node: '>= 0.8.0'} + lightningcss-android-arm64@1.32.0: + resolution: {integrity: sha512-YK7/ClTt4kAK0vo6w3X+Pnm0D2cf2vPHbhOXdoNti1Ga0al1P4TBZhwjATvjNwLEBCnKvjJc2jQgHXH0NEwlAg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [android] + + lightningcss-darwin-arm64@1.32.0: + resolution: {integrity: sha512-RzeG9Ju5bag2Bv1/lwlVJvBE3q6TtXskdZLLCyfg5pt+HLz9BqlICO7LZM7VHNTTn/5PRhHFBSjk5lc4cmscPQ==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [darwin] + + lightningcss-darwin-x64@1.32.0: + resolution: {integrity: sha512-U+QsBp2m/s2wqpUYT/6wnlagdZbtZdndSmut/NJqlCcMLTWp5muCrID+K5UJ6jqD2BFshejCYXniPDbNh73V8w==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [darwin] + + lightningcss-freebsd-x64@1.32.0: + resolution: {integrity: sha512-JCTigedEksZk3tHTTthnMdVfGf61Fky8Ji2E4YjUTEQX14xiy/lTzXnu1vwiZe3bYe0q+SpsSH/CTeDXK6WHig==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [freebsd] + + lightningcss-linux-arm-gnueabihf@1.32.0: + resolution: {integrity: sha512-x6rnnpRa2GL0zQOkt6rts3YDPzduLpWvwAF6EMhXFVZXD4tPrBkEFqzGowzCsIWsPjqSK+tyNEODUBXeeVHSkw==} + engines: {node: '>= 12.0.0'} + cpu: [arm] + os: [linux] + + lightningcss-linux-arm64-gnu@1.32.0: + resolution: {integrity: sha512-0nnMyoyOLRJXfbMOilaSRcLH3Jw5z9HDNGfT/gwCPgaDjnx0i8w7vBzFLFR1f6CMLKF8gVbebmkUN3fa/kQJpQ==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [linux] + + lightningcss-linux-arm64-musl@1.32.0: + resolution: {integrity: sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [linux] + + lightningcss-linux-x64-gnu@1.32.0: + resolution: {integrity: sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [linux] + + lightningcss-linux-x64-musl@1.32.0: + resolution: {integrity: sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [linux] + + lightningcss-win32-arm64-msvc@1.32.0: + resolution: {integrity: sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [win32] + + lightningcss-win32-x64-msvc@1.32.0: + resolution: {integrity: sha512-Amq9B/SoZYdDi1kFrojnoqPLxYhQ4Wo5XiL8EVJrVsB8ARoC1PWW6VGtT0WKCemjy8aC+louJnjS7U18x3b06Q==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [win32] + + lightningcss@1.32.0: + resolution: {integrity: sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==} + engines: {node: '>= 12.0.0'} + lines-and-columns@1.2.4: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} @@ -2687,10 +3396,18 @@ packages: lru-cache@5.1.1: resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} + lucide-react@0.525.0: + resolution: {integrity: sha512-Tm1txJ2OkymCGkvwoHt33Y2JpN5xucVq1slHcgE6Lk0WjDfjgKWor5CdVER8U6DvcfMwh4M8XxmpTiyzfmfDYQ==} + peerDependencies: + react: ^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0 + luxon@3.7.2: resolution: {integrity: sha512-vtEhXh/gNjI9Yg1u4jX/0YVPMvxzHuGgCm6tC5kZyb08yjGWGnqAjGJvcXbqQR2P3MyMEFnRbpcdFS6PBcLqew==} engines: {node: '>=12'} + magic-string@0.30.21: + resolution: {integrity: sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==} + mailgun.js@10.4.0: resolution: {integrity: sha512-YrdaZEAJwwjXGBTfZTNQ1LM7tmkdUaz2NpZEu7+zULcG4Wrlhd7cWSNZW0bxT3bP48k5N0mZWz8C2f9gc2+Geg==} engines: {node: '>=18.0.0'} @@ -2713,6 +3430,10 @@ packages: resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==} engines: {node: '>= 0.4'} + media-typer@0.3.0: + resolution: {integrity: sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==} + engines: {node: '>= 0.6'} + media-typer@1.1.0: resolution: {integrity: sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==} engines: {node: '>= 0.8'} @@ -2720,6 +3441,9 @@ packages: mensch@0.3.4: resolution: {integrity: sha512-IAeFvcOnV9V0Yk+bFhYR07O3yNina9ANIN5MoXBKYJ/RLYPurd2d0yw14MDhpr9/momp0WofT1bPUh3hkzdi/g==} + merge-descriptors@1.0.3: + resolution: {integrity: sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==} + merge-descriptors@2.0.0: resolution: {integrity: sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g==} engines: {node: '>=18'} @@ -2727,6 +3451,10 @@ packages: merge-stream@2.0.0: resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} + methods@1.1.2: + resolution: {integrity: sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==} + engines: {node: '>= 0.6'} + micromatch@4.0.8: resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==} engines: {node: '>=8.6'} @@ -2747,6 +3475,11 @@ packages: resolution: {integrity: sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==} engines: {node: '>=18'} + mime@1.6.0: + resolution: {integrity: sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==} + engines: {node: '>=4'} + hasBin: true + mime@2.6.0: resolution: {integrity: sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==} engines: {node: '>=4.0.0'} @@ -2881,9 +3614,17 @@ packages: resolution: {integrity: sha512-nwMrmhTI+Aeh9Gav9LHX/i8k8yDi/QpX5h535BlT5oP4NaAUmyxP/UeYUn9yxtPcIzDlM5ullFnRv/71jyHpkQ==} hasBin: true + ms@2.0.0: + resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==} + ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + nanoid@3.3.12: + resolution: {integrity: sha512-ZB9RH/39qpq5Vu6Y+NmUaFhQR6pp+M2Xt76XBnEwDaGcVAqhlvxrl3B2bKS5D3NH3QR76v3aSrKaF/Kiy7lEtQ==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + napi-postinstall@0.3.4: resolution: {integrity: sha512-PHI5f1O0EP5xJ9gQmFGMS6IZcrVvTjpXjz7Na41gTE7eE2hK11lg04CECCYEEjdc17EV4DO+fkGEtt7TpTaTiQ==} engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} @@ -2892,6 +3633,10 @@ packages: natural-compare@1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} + negotiator@0.6.3: + resolution: {integrity: sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==} + engines: {node: '>= 0.6'} + negotiator@1.0.0: resolution: {integrity: sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==} engines: {node: '>= 0.6'} @@ -3040,6 +3785,9 @@ packages: resolution: {integrity: sha512-oWyT4gICAu+kaA7QWk/jvCHWarMKNs6pXOGWKDTr7cw4IGcUbW+PeTfbaQiLGheFRpjo6O9J0PmyMfQPjH71oA==} engines: {node: 20 || >=22} + path-to-regexp@0.1.13: + resolution: {integrity: sha512-A/AGNMFN3c8bOlvV9RreMdrv7jsmF9XIfDeCd87+I8RNg6s78BhJxMu69NEMHBSJFxKidViTEdruRwEk/WIKqA==} + path-to-regexp@8.3.0: resolution: {integrity: sha512-7jdwVIRtsP8MYpdXSwOS0YdD0Du+qOoF/AEPIt88PcCFrZCzx41oxku1jD88hZBwbNUIEfpqvuhjFaMAqMTWnA==} @@ -3064,9 +3812,6 @@ packages: peerDependencies: pg: '>=8.0' - pg-protocol@1.11.0: - resolution: {integrity: sha512-pfsxk2M9M3BuGgDOfuy37VNRRX3jmKgMjcvAcWqNDpZSf4cUmv8HSOl5ViRQFsfARFn0KuUQTgLxVMbNq5NW3g==} - pg-protocol@1.13.0: resolution: {integrity: sha512-zzdvXfS6v89r6v7OcFCHfHlyG/wvry1ALxZo4LqgUoy7W9xhBDMaqOuMiF3qEV45VqsN6rdlcehHrfDtlCPc8w==} @@ -3108,6 +3853,10 @@ packages: postcss-value-parser@4.2.0: resolution: {integrity: sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==} + postcss@8.5.15: + resolution: {integrity: sha512-FfR8sjd4em2T6fb3I2MwAJU7HWVMr9zba+enmQeeWFfCbm+UOC/0X4DS8XtpUTMwWMGbjKYP7xjfNekzyGmB3A==} + engines: {node: ^10 || ^12 || >=14} + postgres-array@2.0.0: resolution: {integrity: sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA==} engines: {node: '>=4'} @@ -3145,9 +3894,6 @@ packages: resolution: {integrity: sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==} engines: {node: '>= 6'} - prop-types@15.8.1: - resolution: {integrity: sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==} - proto-list@1.2.4: resolution: {integrity: sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==} @@ -3172,18 +3918,26 @@ packages: resolution: {integrity: sha512-4EK3+xJl8Ts67nLYNwqw/dsFVnCf+qR7RgXSK9jEEm9unao3njwMDdmsdvoKBKHzxd7tCYz5e5M+SnMjdtXGQQ==} engines: {node: '>=0.6'} + qs@6.15.2: + resolution: {integrity: sha512-Rzq0KEyX/w/tEybncDgdkZrJgVUsUMk3xjh3t5bv3S1HTAtg+uOYt72+ZfwiQwKdysThkTBdL/rTi6HDmX9Ddw==} + engines: {node: '>=0.6'} + range-parser@1.2.1: resolution: {integrity: sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==} engines: {node: '>= 0.6'} + raw-body@2.5.3: + resolution: {integrity: sha512-s4VSOf6yN0rvbRZGxs8Om5CWj6seneMwK3oDb4lWDH0UPhWcxwOWw5+qk24bxq87szX1ydrwylIOp2uG1ojUpA==} + engines: {node: '>= 0.8'} + raw-body@3.0.2: resolution: {integrity: sha512-K5zQjDllxWkf7Z5xJdV0/B0WTNqx6vxG70zJE4N0kBs4LovmEYWJzQGxC9bS9RAKu3bgM40lrd5zoLJ12MQ5BA==} engines: {node: '>= 0.10'} - react-dom@16.14.0: - resolution: {integrity: sha512-1gCeQXDLoIqMgqD3IO2Ah9bnf0w9kzhwN5q4FGnHZ67hBm9yePzB5JJAIQCc8x3pFnNlwFq4RidZggNAAkzWWw==} + react-dom@19.2.7: + resolution: {integrity: sha512-t0BRVXvbiE/o20Hfw669rLbMCDWtYZLvmJigy2f0MxsXF+71pxhR3xOkspmsO8h3ZlNzyibAmtCa3l4lYKk6gQ==} peerDependencies: - react: ^16.14.0 + react: ^19.2.7 react-is@16.13.1: resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==} @@ -3191,8 +3945,12 @@ packages: react-is@18.3.1: resolution: {integrity: sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==} - react@16.14.0: - resolution: {integrity: sha512-0X2CImDkJGApiAlcf0ODKIneSwBPhqJawOa5wCtKbu7ZECrmS26NvtSILynQ66cgkT/RJ4LidJOc3bUESwmU8g==} + react-refresh@0.17.0: + resolution: {integrity: sha512-z6F7K9bV85EfseRCp2bzrpyQ0Gkw1uLoCel9XBVWPg/TjRj94SkJzUTGfOa4bs7iJvBWtQG0Wq7wnI0syw3EBQ==} + engines: {node: '>=0.10.0'} + + react@19.2.7: + resolution: {integrity: sha512-HNe9WslTbXmFK8o8cmwgAeJFSBvt1bPdHCVKtaaV+WlAN36mpT4hcRpwbf3fY56ar2oIXzsBpOAiIRHAdY0OlQ==} engines: {node: '>=0.10.0'} readable-stream@3.6.2: @@ -3249,18 +4007,26 @@ packages: resolution: {integrity: sha512-l0OE8wL34P4nJH/H2ffoaniAokM2qSmrtXHmlpvYr5AVVX8msAyW0l8NVJFDxlSK4u3Uh/f41cQheDVdnYijwQ==} hasBin: true + rollup@4.61.1: + resolution: {integrity: sha512-I4KW6iuRpuu2uHBLraZ1wNZe0DP7lnRha+VJ9tNaYVaVgKhW0aI3h4RYnoRPeql0flHm/Co55b7snEDcOfOJrA==} + engines: {node: '>=18.0.0', npm: '>=8.0.0'} + hasBin: true + router@2.2.0: resolution: {integrity: sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==} engines: {node: '>= 18'} + rxjs@7.8.2: + resolution: {integrity: sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==} + safe-buffer@5.2.1: resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} safer-buffer@2.1.2: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} - scheduler@0.19.1: - resolution: {integrity: sha512-n/zwRWRYSUj0/3g/otKDRPMh6qv2SYMWNq85IEa8iZyAv8od9zDYpGSnpBEjNgcMNq6Scbu5KfIPxNF72R/2EA==} + scheduler@0.27.0: + resolution: {integrity: sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==} semver@6.3.1: resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} @@ -3271,10 +4037,18 @@ packages: engines: {node: '>=10'} hasBin: true + send@0.19.2: + resolution: {integrity: sha512-VMbMxbDeehAxpOtWJXlcUS5E8iXh6QmN+BkRX1GARS3wRaXEEgzCcB10gTQazO42tpNIya8xIyNx8fll1OFPrg==} + engines: {node: '>= 0.8.0'} + send@1.2.1: resolution: {integrity: sha512-1gnZf7DFcoIcajTjTwjwuDjzuz4PPcY2StKPlsGAQ1+YH20IRVrBaXSWmdjowTJ6u8Rc01PoYOGHXfP1mYcZNQ==} engines: {node: '>= 18'} + serve-static@1.16.3: + resolution: {integrity: sha512-x0RTqQel6g5SY7Lg6ZreMmsOzncHFU7nhnRWkKgWuMTu5NN0DR5oruckMqRvacAN9d5w6ARnRBXl9xhDCgfMeA==} + engines: {node: '>= 0.8.0'} + serve-static@2.2.1: resolution: {integrity: sha512-xRXBn0pPqQTVQiC8wyQrKs2MOlX24zQ0POGaj0kultvoOCstBQM5yvOhAVSUwOMjQtTvsPWoNCHfPGwaaQJhTw==} engines: {node: '>= 18'} @@ -3296,6 +4070,10 @@ packages: resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} engines: {node: '>=8'} + shell-quote@1.8.3: + resolution: {integrity: sha512-ObmnIF4hXNg1BqhnHmgbDETF8dLPCggZWBjkQfhZpbszZnYur5DUljTcCHii5LC3J5E0yeO/1LIMyH+UvHQgyw==} + engines: {node: '>= 0.4'} + side-channel-list@1.0.0: resolution: {integrity: sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==} engines: {node: '>= 0.4'} @@ -3335,6 +4113,10 @@ packages: sorted-array-functions@1.3.0: resolution: {integrity: sha512-2sqgzeFlid6N4Z2fUQ1cvFmTOLRi/sEDzSQ0OKYchqgoPmQBVyM3959qYx3fpS6Esef80KjmpgPeEr028dP3OA==} + source-map-js@1.2.1: + resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} + engines: {node: '>=0.10.0'} + source-map-support@0.5.13: resolution: {integrity: sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==} @@ -3423,6 +4205,13 @@ packages: resolution: {integrity: sha512-Bh7QjT8/SuKUIfObSXNHNSK6WHo6J1tHCqJsuaFDP7gP0fkzSfTxI8y85JrppZ0h8l0maIgc2tfuZQ6/t3GtnQ==} engines: {node: ^14.18.0 || >=16.0.0} + tailwindcss@4.3.0: + resolution: {integrity: sha512-y6nxMGB1nMW9R6k96e5gdIFzcfL/gTJRNaqGes1YvkLnPVXzWgbqFF2yLC0T8G774n24cx3Pe8XrKoniCOAH+Q==} + + tapable@2.3.3: + resolution: {integrity: sha512-uxc/zpqFg6x7C8vOE7lh6Lbda8eEL9zmVm/PLeTPBRhh1xCgdWaQ+J1CUieGpIfm2HdtsUpRv+HshiasBMcc6A==} + engines: {node: '>=6'} + test-exclude@6.0.0: resolution: {integrity: sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==} engines: {node: '>=8'} @@ -3445,6 +4234,10 @@ packages: tr46@0.0.3: resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} + tree-kill@1.2.2: + resolution: {integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==} + hasBin: true + ts-api-utils@2.4.0: resolution: {integrity: sha512-3TaVTaAv2gTiMB35i3FiGJaRfwb3Pyn/j3m/bfAvGe8FB7CF6u+LMYqYlDh7reQf7UNvoTvdfAqHGmPGOSsPmA==} engines: {node: '>=18.12'} @@ -3502,6 +4295,10 @@ packages: resolution: {integrity: sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==} engines: {node: '>=16'} + type-is@1.6.18: + resolution: {integrity: sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==} + engines: {node: '>= 0.6'} + type-is@2.0.1: resolution: {integrity: sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw==} engines: {node: '>= 0.6'} @@ -3555,6 +4352,10 @@ packages: util-deprecate@1.0.2: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} + utils-merge@1.0.1: + resolution: {integrity: sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==} + engines: {node: '>= 0.4.0'} + v8-to-istanbul@9.3.0: resolution: {integrity: sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==} engines: {node: '>=10.12.0'} @@ -3567,6 +4368,46 @@ packages: resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==} engines: {node: '>= 0.8'} + vite@6.4.3: + resolution: {integrity: sha512-NTKlcQjlAK7MlQoyb6LgaqHc8sso/pVyUJYWMws3jg21uTJw/LddqIFPcPqP6PzpgbIcZyKI85sFE4HBrQDA8A==} + engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} + hasBin: true + peerDependencies: + '@types/node': ^18.0.0 || ^20.0.0 || >=22.0.0 + jiti: '>=1.21.0' + less: '*' + lightningcss: ^1.21.0 + sass: '*' + sass-embedded: '*' + stylus: '*' + sugarss: '*' + terser: ^5.16.0 + tsx: ^4.8.1 + yaml: ^2.4.2 + peerDependenciesMeta: + '@types/node': + optional: true + jiti: + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + sass-embedded: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + tsx: + optional: true + yaml: + optional: true + walker@1.0.8: resolution: {integrity: sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==} @@ -3630,6 +4471,18 @@ packages: resolution: {integrity: sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + ws@8.21.0: + resolution: {integrity: sha512-Vsp28b7DRcimFQvrqu2Wek3z1iYxDCWqHYB8Qsnk/S4RfaCQzPGPyBNuVjJV3cd6UiKtUtp6sNM77gWvzcCH+g==} + engines: {node: '>=10.0.0'} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: '>=5.0.2' + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + xtend@4.0.2: resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==} engines: {node: '>=0.4'} @@ -3744,10 +4597,10 @@ snapshots: transitivePeerDependencies: - supports-color - '@babel/helper-plugin-utils@7.27.1': {} - '@babel/helper-plugin-utils@7.28.6': {} + '@babel/helper-plugin-utils@7.29.7': {} + '@babel/helper-string-parser@7.27.1': {} '@babel/helper-validator-identifier@7.28.5': {} @@ -3766,22 +4619,22 @@ snapshots: '@babel/plugin-syntax-async-generators@7.8.4(@babel/core@7.28.5)': dependencies: '@babel/core': 7.28.5 - '@babel/helper-plugin-utils': 7.27.1 + '@babel/helper-plugin-utils': 7.28.6 '@babel/plugin-syntax-bigint@7.8.3(@babel/core@7.28.5)': dependencies: '@babel/core': 7.28.5 - '@babel/helper-plugin-utils': 7.27.1 + '@babel/helper-plugin-utils': 7.28.6 '@babel/plugin-syntax-class-properties@7.12.13(@babel/core@7.28.5)': dependencies: '@babel/core': 7.28.5 - '@babel/helper-plugin-utils': 7.27.1 + '@babel/helper-plugin-utils': 7.28.6 '@babel/plugin-syntax-class-static-block@7.14.5(@babel/core@7.28.5)': dependencies: '@babel/core': 7.28.5 - '@babel/helper-plugin-utils': 7.27.1 + '@babel/helper-plugin-utils': 7.28.6 '@babel/plugin-syntax-import-attributes@7.28.6(@babel/core@7.28.5)': dependencies: @@ -3791,63 +4644,73 @@ snapshots: '@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.28.5)': dependencies: '@babel/core': 7.28.5 - '@babel/helper-plugin-utils': 7.27.1 + '@babel/helper-plugin-utils': 7.28.6 '@babel/plugin-syntax-json-strings@7.8.3(@babel/core@7.28.5)': dependencies: '@babel/core': 7.28.5 - '@babel/helper-plugin-utils': 7.27.1 + '@babel/helper-plugin-utils': 7.28.6 '@babel/plugin-syntax-jsx@7.27.1(@babel/core@7.28.5)': dependencies: '@babel/core': 7.28.5 - '@babel/helper-plugin-utils': 7.27.1 + '@babel/helper-plugin-utils': 7.28.6 '@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.28.5)': dependencies: '@babel/core': 7.28.5 - '@babel/helper-plugin-utils': 7.27.1 + '@babel/helper-plugin-utils': 7.28.6 '@babel/plugin-syntax-nullish-coalescing-operator@7.8.3(@babel/core@7.28.5)': dependencies: '@babel/core': 7.28.5 - '@babel/helper-plugin-utils': 7.27.1 + '@babel/helper-plugin-utils': 7.28.6 '@babel/plugin-syntax-numeric-separator@7.10.4(@babel/core@7.28.5)': dependencies: '@babel/core': 7.28.5 - '@babel/helper-plugin-utils': 7.27.1 + '@babel/helper-plugin-utils': 7.28.6 '@babel/plugin-syntax-object-rest-spread@7.8.3(@babel/core@7.28.5)': dependencies: '@babel/core': 7.28.5 - '@babel/helper-plugin-utils': 7.27.1 + '@babel/helper-plugin-utils': 7.28.6 '@babel/plugin-syntax-optional-catch-binding@7.8.3(@babel/core@7.28.5)': dependencies: '@babel/core': 7.28.5 - '@babel/helper-plugin-utils': 7.27.1 + '@babel/helper-plugin-utils': 7.28.6 '@babel/plugin-syntax-optional-chaining@7.8.3(@babel/core@7.28.5)': dependencies: '@babel/core': 7.28.5 - '@babel/helper-plugin-utils': 7.27.1 + '@babel/helper-plugin-utils': 7.28.6 '@babel/plugin-syntax-private-property-in-object@7.14.5(@babel/core@7.28.5)': dependencies: '@babel/core': 7.28.5 - '@babel/helper-plugin-utils': 7.27.1 + '@babel/helper-plugin-utils': 7.28.6 '@babel/plugin-syntax-top-level-await@7.14.5(@babel/core@7.28.5)': dependencies: '@babel/core': 7.28.5 - '@babel/helper-plugin-utils': 7.27.1 + '@babel/helper-plugin-utils': 7.28.6 '@babel/plugin-syntax-typescript@7.28.6(@babel/core@7.28.5)': dependencies: '@babel/core': 7.28.5 '@babel/helper-plugin-utils': 7.28.6 + '@babel/plugin-transform-react-jsx-self@7.29.7(@babel/core@7.28.5)': + dependencies: + '@babel/core': 7.28.5 + '@babel/helper-plugin-utils': 7.29.7 + + '@babel/plugin-transform-react-jsx-source@7.29.7(@babel/core@7.28.5)': + dependencies: + '@babel/core': 7.28.5 + '@babel/helper-plugin-utils': 7.29.7 + '@babel/runtime@7.28.4': {} '@babel/template@7.27.2': @@ -3936,87 +4799,165 @@ snapshots: '@emotion/unitless@0.7.5': {} + '@esbuild/aix-ppc64@0.25.12': + optional: true + '@esbuild/aix-ppc64@0.27.5': optional: true + '@esbuild/android-arm64@0.25.12': + optional: true + '@esbuild/android-arm64@0.27.5': optional: true + '@esbuild/android-arm@0.25.12': + optional: true + '@esbuild/android-arm@0.27.5': optional: true + '@esbuild/android-x64@0.25.12': + optional: true + '@esbuild/android-x64@0.27.5': optional: true + '@esbuild/darwin-arm64@0.25.12': + optional: true + '@esbuild/darwin-arm64@0.27.5': optional: true + '@esbuild/darwin-x64@0.25.12': + optional: true + '@esbuild/darwin-x64@0.27.5': optional: true + '@esbuild/freebsd-arm64@0.25.12': + optional: true + '@esbuild/freebsd-arm64@0.27.5': optional: true + '@esbuild/freebsd-x64@0.25.12': + optional: true + '@esbuild/freebsd-x64@0.27.5': optional: true + '@esbuild/linux-arm64@0.25.12': + optional: true + '@esbuild/linux-arm64@0.27.5': optional: true + '@esbuild/linux-arm@0.25.12': + optional: true + '@esbuild/linux-arm@0.27.5': optional: true + '@esbuild/linux-ia32@0.25.12': + optional: true + '@esbuild/linux-ia32@0.27.5': optional: true + '@esbuild/linux-loong64@0.25.12': + optional: true + '@esbuild/linux-loong64@0.27.5': optional: true + '@esbuild/linux-mips64el@0.25.12': + optional: true + '@esbuild/linux-mips64el@0.27.5': optional: true + '@esbuild/linux-ppc64@0.25.12': + optional: true + '@esbuild/linux-ppc64@0.27.5': optional: true + '@esbuild/linux-riscv64@0.25.12': + optional: true + '@esbuild/linux-riscv64@0.27.5': optional: true + '@esbuild/linux-s390x@0.25.12': + optional: true + '@esbuild/linux-s390x@0.27.5': optional: true + '@esbuild/linux-x64@0.25.12': + optional: true + '@esbuild/linux-x64@0.27.5': optional: true + '@esbuild/netbsd-arm64@0.25.12': + optional: true + '@esbuild/netbsd-arm64@0.27.5': optional: true + '@esbuild/netbsd-x64@0.25.12': + optional: true + '@esbuild/netbsd-x64@0.27.5': optional: true + '@esbuild/openbsd-arm64@0.25.12': + optional: true + '@esbuild/openbsd-arm64@0.27.5': optional: true + '@esbuild/openbsd-x64@0.25.12': + optional: true + '@esbuild/openbsd-x64@0.27.5': optional: true + '@esbuild/openharmony-arm64@0.25.12': + optional: true + '@esbuild/openharmony-arm64@0.27.5': optional: true + '@esbuild/sunos-x64@0.25.12': + optional: true + '@esbuild/sunos-x64@0.27.5': optional: true + '@esbuild/win32-arm64@0.25.12': + optional: true + '@esbuild/win32-arm64@0.27.5': optional: true + '@esbuild/win32-ia32@0.25.12': + optional: true + '@esbuild/win32-ia32@0.27.5': optional: true + '@esbuild/win32-x64@0.25.12': + optional: true + '@esbuild/win32-x64@0.27.5': optional: true - '@eslint-community/eslint-utils@4.9.1(eslint@9.39.2)': + '@eslint-community/eslint-utils@4.9.1(eslint@9.39.2(jiti@2.7.0))': dependencies: - eslint: 9.39.2 + eslint: 9.39.2(jiti@2.7.0) eslint-visitor-keys: 3.4.3 '@eslint-community/regexpp@4.12.2': {} @@ -4462,59 +5403,136 @@ snapshots: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.5.5 - '@launchql/mjml@0.1.1(@babel/core@7.28.5)(react-dom@16.14.0(react@16.14.0))(react-is@18.3.1)(react@16.14.0)': + '@launchql/mjml@0.1.1(@babel/core@7.28.5)(react-dom@19.2.7(react@19.2.7))(react-is@18.3.1)(react@19.2.7)': dependencies: '@babel/runtime': 7.28.4 mjml: 4.7.1 - mjml-react: 1.0.59(mjml@4.7.1)(react-dom@16.14.0(react@16.14.0))(react@16.14.0) - react: 16.14.0 - react-dom: 16.14.0(react@16.14.0) - styled-components: 5.3.11(@babel/core@7.28.5)(react-dom@16.14.0(react@16.14.0))(react-is@18.3.1)(react@16.14.0) + mjml-react: 1.0.59(mjml@4.7.1)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) + react: 19.2.7 + react-dom: 19.2.7(react@19.2.7) + styled-components: 5.3.11(@babel/core@7.28.5)(react-dom@19.2.7(react@19.2.7))(react-is@18.3.1)(react@19.2.7) styled-system: 5.1.5 transitivePeerDependencies: - '@babel/core' - encoding - react-is - '@launchql/styled-email@0.1.0(@babel/core@7.28.5)(react-dom@16.14.0(react@16.14.0))(react-is@18.3.1)(react@16.14.0)': + '@launchql/styled-email@0.1.0(@babel/core@7.28.5)(react-dom@19.2.7(react@19.2.7))(react-is@18.3.1)(react@19.2.7)': dependencies: '@babel/runtime': 7.28.4 juice: 7.0.0 - react: 16.14.0 - react-dom: 16.14.0(react@16.14.0) - styled-components: 5.3.11(@babel/core@7.28.5)(react-dom@16.14.0(react@16.14.0))(react-is@18.3.1)(react@16.14.0) + react: 19.2.7 + react-dom: 19.2.7(react@19.2.7) + styled-components: 5.3.11(@babel/core@7.28.5)(react-dom@19.2.7(react@19.2.7))(react-is@18.3.1)(react@19.2.7) styled-system: 5.1.5 transitivePeerDependencies: - '@babel/core' - encoding - react-is - '@napi-rs/wasm-runtime@0.2.12': - dependencies: - '@emnapi/core': 1.8.1 - '@emnapi/runtime': 1.8.1 - '@tybys/wasm-util': 0.10.1 + '@napi-rs/wasm-runtime@0.2.12': + dependencies: + '@emnapi/core': 1.8.1 + '@emnapi/runtime': 1.8.1 + '@tybys/wasm-util': 0.10.1 + optional: true + + '@one-ini/wasm@0.1.1': {} + + '@pgpmjs/env@2.17.0': + dependencies: + '@pgpmjs/types': 2.21.0 + deepmerge: 4.3.1 + + '@pgpmjs/logger@2.5.2': + dependencies: + yanse: 0.2.1 + + '@pgpmjs/types@2.21.0': + dependencies: + pg-env: 1.8.2 + + '@pkgjs/parseargs@0.11.0': + optional: true + + '@pkgr/core@0.2.9': {} + + '@rolldown/pluginutils@1.0.0-beta.27': {} + + '@rollup/rollup-android-arm-eabi@4.61.1': + optional: true + + '@rollup/rollup-android-arm64@4.61.1': + optional: true + + '@rollup/rollup-darwin-arm64@4.61.1': + optional: true + + '@rollup/rollup-darwin-x64@4.61.1': + optional: true + + '@rollup/rollup-freebsd-arm64@4.61.1': + optional: true + + '@rollup/rollup-freebsd-x64@4.61.1': + optional: true + + '@rollup/rollup-linux-arm-gnueabihf@4.61.1': + optional: true + + '@rollup/rollup-linux-arm-musleabihf@4.61.1': + optional: true + + '@rollup/rollup-linux-arm64-gnu@4.61.1': + optional: true + + '@rollup/rollup-linux-arm64-musl@4.61.1': + optional: true + + '@rollup/rollup-linux-loong64-gnu@4.61.1': + optional: true + + '@rollup/rollup-linux-loong64-musl@4.61.1': + optional: true + + '@rollup/rollup-linux-ppc64-gnu@4.61.1': + optional: true + + '@rollup/rollup-linux-ppc64-musl@4.61.1': + optional: true + + '@rollup/rollup-linux-riscv64-gnu@4.61.1': + optional: true + + '@rollup/rollup-linux-riscv64-musl@4.61.1': + optional: true + + '@rollup/rollup-linux-s390x-gnu@4.61.1': optional: true - '@one-ini/wasm@0.1.1': {} + '@rollup/rollup-linux-x64-gnu@4.61.1': + optional: true - '@pgpmjs/env@2.17.0': - dependencies: - '@pgpmjs/types': 2.21.0 - deepmerge: 4.3.1 + '@rollup/rollup-linux-x64-musl@4.61.1': + optional: true - '@pgpmjs/logger@2.5.2': - dependencies: - yanse: 0.2.1 + '@rollup/rollup-openbsd-x64@4.61.1': + optional: true - '@pgpmjs/types@2.21.0': - dependencies: - pg-env: 1.8.2 + '@rollup/rollup-openharmony-arm64@4.61.1': + optional: true - '@pkgjs/parseargs@0.11.0': + '@rollup/rollup-win32-arm64-msvc@4.61.1': optional: true - '@pkgr/core@0.2.9': {} + '@rollup/rollup-win32-ia32-msvc@4.61.1': + optional: true + + '@rollup/rollup-win32-x64-gnu@4.61.1': + optional: true + + '@rollup/rollup-win32-x64-msvc@4.61.1': + optional: true '@sinclair/typebox@0.27.10': {} @@ -4583,6 +5601,74 @@ snapshots: '@styled-system/core': 5.1.2 '@styled-system/css': 5.1.5 + '@tailwindcss/node@4.3.0': + dependencies: + '@jridgewell/remapping': 2.3.5 + enhanced-resolve: 5.23.0 + jiti: 2.7.0 + lightningcss: 1.32.0 + magic-string: 0.30.21 + source-map-js: 1.2.1 + tailwindcss: 4.3.0 + + '@tailwindcss/oxide-android-arm64@4.3.0': + optional: true + + '@tailwindcss/oxide-darwin-arm64@4.3.0': + optional: true + + '@tailwindcss/oxide-darwin-x64@4.3.0': + optional: true + + '@tailwindcss/oxide-freebsd-x64@4.3.0': + optional: true + + '@tailwindcss/oxide-linux-arm-gnueabihf@4.3.0': + optional: true + + '@tailwindcss/oxide-linux-arm64-gnu@4.3.0': + optional: true + + '@tailwindcss/oxide-linux-arm64-musl@4.3.0': + optional: true + + '@tailwindcss/oxide-linux-x64-gnu@4.3.0': + optional: true + + '@tailwindcss/oxide-linux-x64-musl@4.3.0': + optional: true + + '@tailwindcss/oxide-wasm32-wasi@4.3.0': + optional: true + + '@tailwindcss/oxide-win32-arm64-msvc@4.3.0': + optional: true + + '@tailwindcss/oxide-win32-x64-msvc@4.3.0': + optional: true + + '@tailwindcss/oxide@4.3.0': + optionalDependencies: + '@tailwindcss/oxide-android-arm64': 4.3.0 + '@tailwindcss/oxide-darwin-arm64': 4.3.0 + '@tailwindcss/oxide-darwin-x64': 4.3.0 + '@tailwindcss/oxide-freebsd-x64': 4.3.0 + '@tailwindcss/oxide-linux-arm-gnueabihf': 4.3.0 + '@tailwindcss/oxide-linux-arm64-gnu': 4.3.0 + '@tailwindcss/oxide-linux-arm64-musl': 4.3.0 + '@tailwindcss/oxide-linux-x64-gnu': 4.3.0 + '@tailwindcss/oxide-linux-x64-musl': 4.3.0 + '@tailwindcss/oxide-wasm32-wasi': 4.3.0 + '@tailwindcss/oxide-win32-arm64-msvc': 4.3.0 + '@tailwindcss/oxide-win32-x64-msvc': 4.3.0 + + '@tailwindcss/vite@4.3.0(vite@6.4.3(@types/node@22.19.3)(jiti@2.7.0)(lightningcss@1.32.0)(tsx@4.21.0)(yaml@2.8.2))': + dependencies: + '@tailwindcss/node': 4.3.0 + '@tailwindcss/oxide': 4.3.0 + tailwindcss: 4.3.0 + vite: 6.4.3(@types/node@22.19.3)(jiti@2.7.0)(lightningcss@1.32.0)(tsx@4.21.0)(yaml@2.8.2) + '@tybys/wasm-util@0.10.1': dependencies: tslib: 2.8.1 @@ -4624,6 +5710,8 @@ snapshots: '@types/estree@1.0.8': {} + '@types/estree@1.0.9': {} + '@types/express-serve-static-core@5.1.1': dependencies: '@types/node': 22.19.3 @@ -4674,13 +5762,21 @@ snapshots: '@types/pg@8.16.0': dependencies: '@types/node': 22.19.3 - pg-protocol: 1.11.0 + pg-protocol: 1.13.0 pg-types: 2.2.0 '@types/qs@6.14.0': {} '@types/range-parser@1.2.7': {} + '@types/react-dom@19.2.3(@types/react@19.2.17)': + dependencies: + '@types/react': 19.2.17 + + '@types/react@19.2.17': + dependencies: + csstype: 3.2.3 + '@types/retry@0.12.5': {} '@types/send@1.2.1': @@ -4694,21 +5790,25 @@ snapshots: '@types/stack-utils@2.0.3': {} + '@types/ws@8.18.1': + dependencies: + '@types/node': 22.19.3 + '@types/yargs-parser@21.0.3': {} '@types/yargs@17.0.35': dependencies: '@types/yargs-parser': 21.0.3 - '@typescript-eslint/eslint-plugin@8.55.0(@typescript-eslint/parser@8.55.0(eslint@9.39.2)(typescript@5.9.3))(eslint@9.39.2)(typescript@5.9.3)': + '@typescript-eslint/eslint-plugin@8.55.0(@typescript-eslint/parser@8.55.0(eslint@9.39.2(jiti@2.7.0))(typescript@5.9.3))(eslint@9.39.2(jiti@2.7.0))(typescript@5.9.3)': dependencies: '@eslint-community/regexpp': 4.12.2 - '@typescript-eslint/parser': 8.55.0(eslint@9.39.2)(typescript@5.9.3) + '@typescript-eslint/parser': 8.55.0(eslint@9.39.2(jiti@2.7.0))(typescript@5.9.3) '@typescript-eslint/scope-manager': 8.55.0 - '@typescript-eslint/type-utils': 8.55.0(eslint@9.39.2)(typescript@5.9.3) - '@typescript-eslint/utils': 8.55.0(eslint@9.39.2)(typescript@5.9.3) + '@typescript-eslint/type-utils': 8.55.0(eslint@9.39.2(jiti@2.7.0))(typescript@5.9.3) + '@typescript-eslint/utils': 8.55.0(eslint@9.39.2(jiti@2.7.0))(typescript@5.9.3) '@typescript-eslint/visitor-keys': 8.55.0 - eslint: 9.39.2 + eslint: 9.39.2(jiti@2.7.0) ignore: 7.0.5 natural-compare: 1.4.0 ts-api-utils: 2.4.0(typescript@5.9.3) @@ -4716,14 +5816,14 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.55.0(eslint@9.39.2)(typescript@5.9.3)': + '@typescript-eslint/parser@8.55.0(eslint@9.39.2(jiti@2.7.0))(typescript@5.9.3)': dependencies: '@typescript-eslint/scope-manager': 8.55.0 '@typescript-eslint/types': 8.55.0 '@typescript-eslint/typescript-estree': 8.55.0(typescript@5.9.3) '@typescript-eslint/visitor-keys': 8.55.0 debug: 4.4.3(supports-color@5.5.0) - eslint: 9.39.2 + eslint: 9.39.2(jiti@2.7.0) typescript: 5.9.3 transitivePeerDependencies: - supports-color @@ -4746,13 +5846,13 @@ snapshots: dependencies: typescript: 5.9.3 - '@typescript-eslint/type-utils@8.55.0(eslint@9.39.2)(typescript@5.9.3)': + '@typescript-eslint/type-utils@8.55.0(eslint@9.39.2(jiti@2.7.0))(typescript@5.9.3)': dependencies: '@typescript-eslint/types': 8.55.0 '@typescript-eslint/typescript-estree': 8.55.0(typescript@5.9.3) - '@typescript-eslint/utils': 8.55.0(eslint@9.39.2)(typescript@5.9.3) + '@typescript-eslint/utils': 8.55.0(eslint@9.39.2(jiti@2.7.0))(typescript@5.9.3) debug: 4.4.3(supports-color@5.5.0) - eslint: 9.39.2 + eslint: 9.39.2(jiti@2.7.0) ts-api-utils: 2.4.0(typescript@5.9.3) typescript: 5.9.3 transitivePeerDependencies: @@ -4775,13 +5875,13 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.55.0(eslint@9.39.2)(typescript@5.9.3)': + '@typescript-eslint/utils@8.55.0(eslint@9.39.2(jiti@2.7.0))(typescript@5.9.3)': dependencies: - '@eslint-community/eslint-utils': 4.9.1(eslint@9.39.2) + '@eslint-community/eslint-utils': 4.9.1(eslint@9.39.2(jiti@2.7.0)) '@typescript-eslint/scope-manager': 8.55.0 '@typescript-eslint/types': 8.55.0 '@typescript-eslint/typescript-estree': 8.55.0(typescript@5.9.3) - eslint: 9.39.2 + eslint: 9.39.2(jiti@2.7.0) typescript: 5.9.3 transitivePeerDependencies: - supports-color @@ -4852,8 +5952,31 @@ snapshots: '@unrs/resolver-binding-win32-x64-msvc@1.11.1': optional: true + '@vitejs/plugin-react@4.7.0(vite@6.4.3(@types/node@22.19.3)(jiti@2.7.0)(lightningcss@1.32.0)(tsx@4.21.0)(yaml@2.8.2))': + dependencies: + '@babel/core': 7.28.5 + '@babel/plugin-transform-react-jsx-self': 7.29.7(@babel/core@7.28.5) + '@babel/plugin-transform-react-jsx-source': 7.29.7(@babel/core@7.28.5) + '@rolldown/pluginutils': 1.0.0-beta.27 + '@types/babel__core': 7.20.5 + react-refresh: 0.17.0 + vite: 6.4.3(@types/node@22.19.3)(jiti@2.7.0)(lightningcss@1.32.0)(tsx@4.21.0)(yaml@2.8.2) + transitivePeerDependencies: + - supports-color + + '@xterm/addon-fit@0.10.0(@xterm/xterm@5.5.0)': + dependencies: + '@xterm/xterm': 5.5.0 + + '@xterm/xterm@5.5.0': {} + abbrev@2.0.0: {} + accepts@1.3.8: + dependencies: + mime-types: 2.1.35 + negotiator: 0.6.3 + accepts@2.0.0: dependencies: mime-types: 3.0.2 @@ -4903,6 +6026,8 @@ snapshots: argparse@2.0.1: {} + array-flatten@1.1.1: {} + async-retry@1.3.3: dependencies: retry: 0.13.1 @@ -4955,7 +6080,7 @@ snapshots: babel-plugin-istanbul@7.0.1: dependencies: - '@babel/helper-plugin-utils': 7.27.1 + '@babel/helper-plugin-utils': 7.28.6 '@istanbuljs/load-nyc-config': 1.1.0 '@istanbuljs/schema': 0.1.3 istanbul-lib-instrument: 6.0.3 @@ -4974,14 +6099,14 @@ snapshots: dependencies: '@types/babel__core': 7.20.5 - babel-plugin-styled-components@2.1.4(@babel/core@7.28.5)(styled-components@5.3.11(@babel/core@7.28.5)(react-dom@16.14.0(react@16.14.0))(react-is@18.3.1)(react@16.14.0))(supports-color@5.5.0): + babel-plugin-styled-components@2.1.4(@babel/core@7.28.5)(styled-components@5.3.11(@babel/core@7.28.5)(react-dom@19.2.7(react@19.2.7))(react-is@18.3.1)(react@19.2.7))(supports-color@5.5.0): dependencies: '@babel/helper-annotate-as-pure': 7.27.3 '@babel/helper-module-imports': 7.27.1(supports-color@5.5.0) '@babel/plugin-syntax-jsx': 7.27.1(@babel/core@7.28.5) lodash: 4.17.21 picomatch: 2.3.1 - styled-components: 5.3.11(@babel/core@7.28.5)(react-dom@16.14.0(react@16.14.0))(react-is@18.3.1)(react@16.14.0) + styled-components: 5.3.11(@babel/core@7.28.5)(react-dom@19.2.7(react@19.2.7))(react-is@18.3.1)(react@19.2.7) transitivePeerDependencies: - '@babel/core' - supports-color @@ -5030,6 +6155,23 @@ snapshots: binary-extensions@2.3.0: {} + body-parser@1.20.5: + dependencies: + bytes: 3.1.2 + content-type: 1.0.5 + debug: 2.6.9 + depd: 2.0.0 + destroy: 1.2.0 + http-errors: 2.0.1 + iconv-lite: 0.4.24 + on-finished: 2.4.1 + qs: 6.15.2 + raw-body: 2.5.3 + type-is: 1.6.18 + unpipe: 1.0.0 + transitivePeerDependencies: + - supports-color + body-parser@2.2.1: dependencies: bytes: 3.1.2 @@ -5195,6 +6337,8 @@ snapshots: commander@10.0.1: {} + commander@15.0.0: {} + commander@2.17.1: {} commander@2.19.0: {} @@ -5203,17 +6347,32 @@ snapshots: concat-map@0.0.1: {} + concurrently@9.2.1: + dependencies: + chalk: 4.1.2 + rxjs: 7.8.2 + shell-quote: 1.8.3 + supports-color: 8.1.1 + tree-kill: 1.2.2 + yargs: 17.7.2 + config-chain@1.1.13: dependencies: ini: 1.3.8 proto-list: 1.2.4 + content-disposition@0.5.4: + dependencies: + safe-buffer: 5.2.1 + content-disposition@1.0.1: {} content-type@1.0.5: {} convert-source-map@2.0.0: {} + cookie-signature@1.0.7: {} + cookie-signature@1.2.2: {} cookie@0.7.2: {} @@ -5272,6 +6431,12 @@ snapshots: css-what@6.2.2: {} + csstype@3.2.3: {} + + debug@2.6.9: + dependencies: + ms: 2.0.0 + debug@4.4.3(supports-color@5.5.0): dependencies: ms: 2.1.3 @@ -5290,6 +6455,10 @@ snapshots: depd@2.0.0: {} + destroy@1.2.0: {} + + detect-libc@2.1.2: {} + detect-newline@3.1.0: {} diff-sequences@29.6.3: {} @@ -5390,6 +6559,11 @@ snapshots: iconv-lite: 0.6.3 whatwg-encoding: 3.1.1 + enhanced-resolve@5.23.0: + dependencies: + graceful-fs: 4.2.11 + tapable: 2.3.3 + entities@1.1.2: {} entities@2.2.0: {} @@ -5421,6 +6595,35 @@ snapshots: has-tostringtag: 1.0.2 hasown: 2.0.2 + esbuild@0.25.12: + optionalDependencies: + '@esbuild/aix-ppc64': 0.25.12 + '@esbuild/android-arm': 0.25.12 + '@esbuild/android-arm64': 0.25.12 + '@esbuild/android-x64': 0.25.12 + '@esbuild/darwin-arm64': 0.25.12 + '@esbuild/darwin-x64': 0.25.12 + '@esbuild/freebsd-arm64': 0.25.12 + '@esbuild/freebsd-x64': 0.25.12 + '@esbuild/linux-arm': 0.25.12 + '@esbuild/linux-arm64': 0.25.12 + '@esbuild/linux-ia32': 0.25.12 + '@esbuild/linux-loong64': 0.25.12 + '@esbuild/linux-mips64el': 0.25.12 + '@esbuild/linux-ppc64': 0.25.12 + '@esbuild/linux-riscv64': 0.25.12 + '@esbuild/linux-s390x': 0.25.12 + '@esbuild/linux-x64': 0.25.12 + '@esbuild/netbsd-arm64': 0.25.12 + '@esbuild/netbsd-x64': 0.25.12 + '@esbuild/openbsd-arm64': 0.25.12 + '@esbuild/openbsd-x64': 0.25.12 + '@esbuild/openharmony-arm64': 0.25.12 + '@esbuild/sunos-x64': 0.25.12 + '@esbuild/win32-arm64': 0.25.12 + '@esbuild/win32-ia32': 0.25.12 + '@esbuild/win32-x64': 0.25.12 + esbuild@0.27.5: optionalDependencies: '@esbuild/aix-ppc64': 0.27.5 @@ -5460,19 +6663,19 @@ snapshots: escape-string-regexp@4.0.0: {} - eslint-config-prettier@10.1.8(eslint@9.39.2): + eslint-config-prettier@10.1.8(eslint@9.39.2(jiti@2.7.0)): dependencies: - eslint: 9.39.2 + eslint: 9.39.2(jiti@2.7.0) - eslint-plugin-simple-import-sort@12.1.1(eslint@9.39.2): + eslint-plugin-simple-import-sort@12.1.1(eslint@9.39.2(jiti@2.7.0)): dependencies: - eslint: 9.39.2 + eslint: 9.39.2(jiti@2.7.0) - eslint-plugin-unused-imports@4.3.0(@typescript-eslint/eslint-plugin@8.55.0(@typescript-eslint/parser@8.55.0(eslint@9.39.2)(typescript@5.9.3))(eslint@9.39.2)(typescript@5.9.3))(eslint@9.39.2): + eslint-plugin-unused-imports@4.3.0(@typescript-eslint/eslint-plugin@8.55.0(@typescript-eslint/parser@8.55.0(eslint@9.39.2(jiti@2.7.0))(typescript@5.9.3))(eslint@9.39.2(jiti@2.7.0))(typescript@5.9.3))(eslint@9.39.2(jiti@2.7.0)): dependencies: - eslint: 9.39.2 + eslint: 9.39.2(jiti@2.7.0) optionalDependencies: - '@typescript-eslint/eslint-plugin': 8.55.0(@typescript-eslint/parser@8.55.0(eslint@9.39.2)(typescript@5.9.3))(eslint@9.39.2)(typescript@5.9.3) + '@typescript-eslint/eslint-plugin': 8.55.0(@typescript-eslint/parser@8.55.0(eslint@9.39.2(jiti@2.7.0))(typescript@5.9.3))(eslint@9.39.2(jiti@2.7.0))(typescript@5.9.3) eslint-scope@8.4.0: dependencies: @@ -5483,9 +6686,9 @@ snapshots: eslint-visitor-keys@4.2.1: {} - eslint@9.39.2: + eslint@9.39.2(jiti@2.7.0): dependencies: - '@eslint-community/eslint-utils': 4.9.1(eslint@9.39.2) + '@eslint-community/eslint-utils': 4.9.1(eslint@9.39.2(jiti@2.7.0)) '@eslint-community/regexpp': 4.12.2 '@eslint/config-array': 0.21.1 '@eslint/config-helpers': 0.4.2 @@ -5519,6 +6722,8 @@ snapshots: minimatch: 3.1.2 natural-compare: 1.4.0 optionator: 0.9.4 + optionalDependencies: + jiti: 2.7.0 transitivePeerDependencies: - supports-color @@ -5577,6 +6782,42 @@ snapshots: jest-mock: 30.2.0 jest-util: 30.2.0 + express@4.22.2: + dependencies: + accepts: 1.3.8 + array-flatten: 1.1.1 + body-parser: 1.20.5 + content-disposition: 0.5.4 + content-type: 1.0.5 + cookie: 0.7.2 + cookie-signature: 1.0.7 + debug: 2.6.9 + depd: 2.0.0 + encodeurl: 2.0.0 + escape-html: 1.0.3 + etag: 1.8.1 + finalhandler: 1.3.2 + fresh: 0.5.2 + http-errors: 2.0.1 + merge-descriptors: 1.0.3 + methods: 1.1.2 + on-finished: 2.4.1 + parseurl: 1.3.3 + path-to-regexp: 0.1.13 + proxy-addr: 2.0.7 + qs: 6.15.2 + range-parser: 1.2.1 + safe-buffer: 5.2.1 + send: 0.19.2 + serve-static: 1.16.3 + setprototypeof: 1.2.0 + statuses: 2.0.2 + type-is: 1.6.18 + utils-merge: 1.0.1 + vary: 1.1.2 + transitivePeerDependencies: + - supports-color + express@5.2.1: dependencies: accepts: 2.0.0 @@ -5632,6 +6873,18 @@ snapshots: dependencies: to-regex-range: 5.0.1 + finalhandler@1.3.2: + dependencies: + debug: 2.6.9 + encodeurl: 2.0.0 + escape-html: 1.0.3 + on-finished: 2.4.1 + parseurl: 1.3.3 + statuses: 2.0.2 + unpipe: 1.0.0 + transitivePeerDependencies: + - supports-color + finalhandler@2.1.1: dependencies: debug: 4.4.3(supports-color@5.5.0) @@ -5679,6 +6932,8 @@ snapshots: forwarded@0.2.0: {} + fresh@0.5.2: {} + fresh@2.0.0: {} fs.realpath@1.0.0: {} @@ -5852,6 +7107,10 @@ snapshots: human-signals@2.1.0: {} + iconv-lite@0.4.24: + dependencies: + safer-buffer: 2.1.2 + iconv-lite@0.6.3: dependencies: safer-buffer: 2.1.2 @@ -6600,6 +7859,8 @@ snapshots: - supports-color - ts-node + jiti@2.7.0: {} + js-beautify@1.15.4: dependencies: config-chain: 1.1.13 @@ -6649,6 +7910,8 @@ snapshots: kleur@3.0.3: {} + kubernetesjs@0.7.7: {} + leven@3.1.0: {} levn@0.4.1: @@ -6656,6 +7919,55 @@ snapshots: prelude-ls: 1.2.1 type-check: 0.4.0 + lightningcss-android-arm64@1.32.0: + optional: true + + lightningcss-darwin-arm64@1.32.0: + optional: true + + lightningcss-darwin-x64@1.32.0: + optional: true + + lightningcss-freebsd-x64@1.32.0: + optional: true + + lightningcss-linux-arm-gnueabihf@1.32.0: + optional: true + + lightningcss-linux-arm64-gnu@1.32.0: + optional: true + + lightningcss-linux-arm64-musl@1.32.0: + optional: true + + lightningcss-linux-x64-gnu@1.32.0: + optional: true + + lightningcss-linux-x64-musl@1.32.0: + optional: true + + lightningcss-win32-arm64-msvc@1.32.0: + optional: true + + lightningcss-win32-x64-msvc@1.32.0: + optional: true + + lightningcss@1.32.0: + dependencies: + detect-libc: 2.1.2 + optionalDependencies: + lightningcss-android-arm64: 1.32.0 + lightningcss-darwin-arm64: 1.32.0 + lightningcss-darwin-x64: 1.32.0 + lightningcss-freebsd-x64: 1.32.0 + lightningcss-linux-arm-gnueabihf: 1.32.0 + lightningcss-linux-arm64-gnu: 1.32.0 + lightningcss-linux-arm64-musl: 1.32.0 + lightningcss-linux-x64-gnu: 1.32.0 + lightningcss-linux-x64-musl: 1.32.0 + lightningcss-win32-arm64-msvc: 1.32.0 + lightningcss-win32-x64-msvc: 1.32.0 + lines-and-columns@1.2.4: {} locate-path@5.0.0: @@ -6688,8 +8000,16 @@ snapshots: dependencies: yallist: 3.1.1 + lucide-react@0.525.0(react@19.2.7): + dependencies: + react: 19.2.7 + luxon@3.7.2: {} + magic-string@0.30.21: + dependencies: + '@jridgewell/sourcemap-codec': 1.5.5 + mailgun.js@10.4.0: dependencies: axios: 1.13.5 @@ -6715,14 +8035,20 @@ snapshots: math-intrinsics@1.1.0: {} + media-typer@0.3.0: {} + media-typer@1.1.0: {} mensch@0.3.4: {} + merge-descriptors@1.0.3: {} + merge-descriptors@2.0.0: {} merge-stream@2.0.0: {} + methods@1.1.2: {} + micromatch@4.0.8: dependencies: braces: 3.0.3 @@ -6740,6 +8066,8 @@ snapshots: dependencies: mime-db: 1.54.0 + mime@1.6.0: {} + mime@2.6.0: {} mimic-fn@2.1.0: {} @@ -6961,12 +8289,12 @@ snapshots: transitivePeerDependencies: - encoding - mjml-react@1.0.59(mjml@4.7.1)(react-dom@16.14.0(react@16.14.0))(react@16.14.0): + mjml-react@1.0.59(mjml@4.7.1)(react-dom@19.2.7(react@19.2.7))(react@19.2.7): dependencies: babel-runtime: 6.25.0 mjml: 4.7.1 - react: 16.14.0 - react-dom: 16.14.0(react@16.14.0) + react: 19.2.7 + react-dom: 19.2.7(react@19.2.7) mjml-section@4.7.1: dependencies: @@ -7057,12 +8385,18 @@ snapshots: transitivePeerDependencies: - encoding + ms@2.0.0: {} + ms@2.1.3: {} + nanoid@3.3.12: {} + napi-postinstall@0.3.4: {} natural-compare@1.4.0: {} + negotiator@0.6.3: {} + negotiator@1.0.0: {} neo-async@2.6.2: {} @@ -7202,6 +8536,8 @@ snapshots: lru-cache: 11.3.0 minipass: 7.1.2 + path-to-regexp@0.1.13: {} + path-to-regexp@8.3.0: {} pg-cache@3.4.4: @@ -7227,8 +8563,6 @@ snapshots: dependencies: pg: 8.20.0 - pg-protocol@1.11.0: {} - pg-protocol@1.13.0: {} pg-types@2.2.0: @@ -7267,6 +8601,12 @@ snapshots: postcss-value-parser@4.2.0: {} + postcss@8.5.15: + dependencies: + nanoid: 3.3.12 + picocolors: 1.1.1 + source-map-js: 1.2.1 + postgres-array@2.0.0: {} postgres-bytea@1.0.1: {} @@ -7298,12 +8638,6 @@ snapshots: kleur: 3.0.3 sisteransi: 1.0.5 - prop-types@15.8.1: - dependencies: - loose-envify: 1.4.0 - object-assign: 4.1.1 - react-is: 16.13.1 - proto-list@1.2.4: {} proxy-addr@2.0.7: @@ -7323,8 +8657,19 @@ snapshots: dependencies: side-channel: 1.1.0 + qs@6.15.2: + dependencies: + side-channel: 1.1.0 + range-parser@1.2.1: {} + raw-body@2.5.3: + dependencies: + bytes: 3.1.2 + http-errors: 2.0.1 + iconv-lite: 0.4.24 + unpipe: 1.0.0 + raw-body@3.0.2: dependencies: bytes: 3.1.2 @@ -7332,23 +8677,18 @@ snapshots: iconv-lite: 0.7.1 unpipe: 1.0.0 - react-dom@16.14.0(react@16.14.0): + react-dom@19.2.7(react@19.2.7): dependencies: - loose-envify: 1.4.0 - object-assign: 4.1.1 - prop-types: 15.8.1 - react: 16.14.0 - scheduler: 0.19.1 + react: 19.2.7 + scheduler: 0.27.0 react-is@16.13.1: {} react-is@18.3.1: {} - react@16.14.0: - dependencies: - loose-envify: 1.4.0 - object-assign: 4.1.1 - prop-types: 15.8.1 + react-refresh@0.17.0: {} + + react@19.2.7: {} readable-stream@3.6.2: dependencies: @@ -7393,6 +8733,37 @@ snapshots: dependencies: glob: 10.5.0 + rollup@4.61.1: + dependencies: + '@types/estree': 1.0.9 + optionalDependencies: + '@rollup/rollup-android-arm-eabi': 4.61.1 + '@rollup/rollup-android-arm64': 4.61.1 + '@rollup/rollup-darwin-arm64': 4.61.1 + '@rollup/rollup-darwin-x64': 4.61.1 + '@rollup/rollup-freebsd-arm64': 4.61.1 + '@rollup/rollup-freebsd-x64': 4.61.1 + '@rollup/rollup-linux-arm-gnueabihf': 4.61.1 + '@rollup/rollup-linux-arm-musleabihf': 4.61.1 + '@rollup/rollup-linux-arm64-gnu': 4.61.1 + '@rollup/rollup-linux-arm64-musl': 4.61.1 + '@rollup/rollup-linux-loong64-gnu': 4.61.1 + '@rollup/rollup-linux-loong64-musl': 4.61.1 + '@rollup/rollup-linux-ppc64-gnu': 4.61.1 + '@rollup/rollup-linux-ppc64-musl': 4.61.1 + '@rollup/rollup-linux-riscv64-gnu': 4.61.1 + '@rollup/rollup-linux-riscv64-musl': 4.61.1 + '@rollup/rollup-linux-s390x-gnu': 4.61.1 + '@rollup/rollup-linux-x64-gnu': 4.61.1 + '@rollup/rollup-linux-x64-musl': 4.61.1 + '@rollup/rollup-openbsd-x64': 4.61.1 + '@rollup/rollup-openharmony-arm64': 4.61.1 + '@rollup/rollup-win32-arm64-msvc': 4.61.1 + '@rollup/rollup-win32-ia32-msvc': 4.61.1 + '@rollup/rollup-win32-x64-gnu': 4.61.1 + '@rollup/rollup-win32-x64-msvc': 4.61.1 + fsevents: 2.3.3 + router@2.2.0: dependencies: debug: 4.4.3(supports-color@5.5.0) @@ -7403,19 +8774,38 @@ snapshots: transitivePeerDependencies: - supports-color + rxjs@7.8.2: + dependencies: + tslib: 2.8.1 + safe-buffer@5.2.1: {} safer-buffer@2.1.2: {} - scheduler@0.19.1: - dependencies: - loose-envify: 1.4.0 - object-assign: 4.1.1 + scheduler@0.27.0: {} semver@6.3.1: {} semver@7.7.3: {} + send@0.19.2: + dependencies: + debug: 2.6.9 + depd: 2.0.0 + destroy: 1.2.0 + encodeurl: 2.0.0 + escape-html: 1.0.3 + etag: 1.8.1 + fresh: 0.5.2 + http-errors: 2.0.1 + mime: 1.6.0 + ms: 2.1.3 + on-finished: 2.4.1 + range-parser: 1.2.1 + statuses: 2.0.2 + transitivePeerDependencies: + - supports-color + send@1.2.1: dependencies: debug: 4.4.3(supports-color@5.5.0) @@ -7432,6 +8822,15 @@ snapshots: transitivePeerDependencies: - supports-color + serve-static@1.16.3: + dependencies: + encodeurl: 2.0.0 + escape-html: 1.0.3 + parseurl: 1.3.3 + send: 0.19.2 + transitivePeerDependencies: + - supports-color + serve-static@2.2.1: dependencies: encodeurl: 2.0.0 @@ -7453,6 +8852,8 @@ snapshots: shebang-regex@3.0.0: {} + shell-quote@1.8.3: {} + side-channel-list@1.0.0: dependencies: es-errors: 1.3.0 @@ -7499,6 +8900,8 @@ snapshots: sorted-array-functions@1.3.0: {} + source-map-js@1.2.1: {} + source-map-support@0.5.13: dependencies: buffer-from: 1.1.2 @@ -7551,18 +8954,18 @@ snapshots: strip-json-comments@3.1.1: {} - styled-components@5.3.11(@babel/core@7.28.5)(react-dom@16.14.0(react@16.14.0))(react-is@18.3.1)(react@16.14.0): + styled-components@5.3.11(@babel/core@7.28.5)(react-dom@19.2.7(react@19.2.7))(react-is@18.3.1)(react@19.2.7): dependencies: '@babel/helper-module-imports': 7.27.1(supports-color@5.5.0) '@babel/traverse': 7.28.5(supports-color@5.5.0) '@emotion/is-prop-valid': 1.4.0 '@emotion/stylis': 0.8.5 '@emotion/unitless': 0.7.5 - babel-plugin-styled-components: 2.1.4(@babel/core@7.28.5)(styled-components@5.3.11(@babel/core@7.28.5)(react-dom@16.14.0(react@16.14.0))(react-is@18.3.1)(react@16.14.0))(supports-color@5.5.0) + babel-plugin-styled-components: 2.1.4(@babel/core@7.28.5)(styled-components@5.3.11(@babel/core@7.28.5)(react-dom@19.2.7(react@19.2.7))(react-is@18.3.1)(react@19.2.7))(supports-color@5.5.0) css-to-react-native: 3.2.0 hoist-non-react-statics: 3.3.2 - react: 16.14.0 - react-dom: 16.14.0(react@16.14.0) + react: 19.2.7 + react-dom: 19.2.7(react@19.2.7) react-is: 18.3.1 shallowequal: 1.1.0 supports-color: 5.5.0 @@ -7603,6 +9006,10 @@ snapshots: dependencies: '@pkgr/core': 0.2.9 + tailwindcss@4.3.0: {} + + tapable@2.3.3: {} + test-exclude@6.0.0: dependencies: '@istanbuljs/schema': 0.1.3 @@ -7624,6 +9031,8 @@ snapshots: tr46@0.0.3: {} + tree-kill@1.2.2: {} + ts-api-utils@2.4.0(typescript@5.9.3): dependencies: typescript: 5.9.3 @@ -7687,19 +9096,24 @@ snapshots: type-fest@4.41.0: {} + type-is@1.6.18: + dependencies: + media-typer: 0.3.0 + mime-types: 2.1.35 + type-is@2.0.1: dependencies: content-type: 1.0.5 media-typer: 1.1.0 mime-types: 3.0.2 - typescript-eslint@8.55.0(eslint@9.39.2)(typescript@5.9.3): + typescript-eslint@8.55.0(eslint@9.39.2(jiti@2.7.0))(typescript@5.9.3): dependencies: - '@typescript-eslint/eslint-plugin': 8.55.0(@typescript-eslint/parser@8.55.0(eslint@9.39.2)(typescript@5.9.3))(eslint@9.39.2)(typescript@5.9.3) - '@typescript-eslint/parser': 8.55.0(eslint@9.39.2)(typescript@5.9.3) + '@typescript-eslint/eslint-plugin': 8.55.0(@typescript-eslint/parser@8.55.0(eslint@9.39.2(jiti@2.7.0))(typescript@5.9.3))(eslint@9.39.2(jiti@2.7.0))(typescript@5.9.3) + '@typescript-eslint/parser': 8.55.0(eslint@9.39.2(jiti@2.7.0))(typescript@5.9.3) '@typescript-eslint/typescript-estree': 8.55.0(typescript@5.9.3) - '@typescript-eslint/utils': 8.55.0(eslint@9.39.2)(typescript@5.9.3) - eslint: 9.39.2 + '@typescript-eslint/utils': 8.55.0(eslint@9.39.2(jiti@2.7.0))(typescript@5.9.3) + eslint: 9.39.2(jiti@2.7.0) typescript: 5.9.3 transitivePeerDependencies: - supports-color @@ -7757,6 +9171,8 @@ snapshots: util-deprecate@1.0.2: {} + utils-merge@1.0.1: {} + v8-to-istanbul@9.3.0: dependencies: '@jridgewell/trace-mapping': 0.3.31 @@ -7767,6 +9183,22 @@ snapshots: vary@1.1.2: {} + vite@6.4.3(@types/node@22.19.3)(jiti@2.7.0)(lightningcss@1.32.0)(tsx@4.21.0)(yaml@2.8.2): + dependencies: + esbuild: 0.25.12 + fdir: 6.5.0(picomatch@4.0.3) + picomatch: 4.0.3 + postcss: 8.5.15 + rollup: 4.61.1 + tinyglobby: 0.2.15 + optionalDependencies: + '@types/node': 22.19.3 + fsevents: 2.3.3 + jiti: 2.7.0 + lightningcss: 1.32.0 + tsx: 4.21.0 + yaml: 2.8.2 + walker@1.0.8: dependencies: makeerror: 1.0.12 @@ -7839,6 +9271,8 @@ snapshots: imurmurhash: 0.1.4 signal-exit: 4.1.0 + ws@8.21.0: {} + xtend@4.0.2: {} y18n@4.0.3: {} diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 078ddc1f..3383193b 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -2,3 +2,4 @@ packages: - 'generated/*' - 'packages/*' - 'job/*' + - 'www' diff --git a/scripts/dev-compute.ts b/scripts/dev-compute.ts new file mode 100644 index 00000000..e9cc0ac1 --- /dev/null +++ b/scripts/dev-compute.ts @@ -0,0 +1,435 @@ +// dev-compute: starts functions and compute-service as local Node processes +// with env vars pointing to Docker or pgpm-local infrastructure. +// +// The compute-service discovers functions from the database (platform_function_definitions) +// instead of relying on a static manifest. Functions still run as local Node processes. +// +// Secrets loading pipeline: +// 1. Read .env file +// 2. Query DB for configured values (platform_secrets + platform_config) +// 3. Merge with priority: .env > DB > hardcoded defaults +// 4. Resolve per-function requirements +// 5. Inject ONLY needed env vars into each function's child process +// 6. Fail fast on missing required secrets, warn on optional ones +// +// Usage: +// node --experimental-strip-types scripts/dev-compute.ts +// node --experimental-strip-types scripts/dev-compute.ts --only=send-verification-link + +const fs = require('fs') as typeof import('fs'); +const path = require('path') as typeof import('path'); +const { spawn, execSync } = require('child_process') as typeof import('child_process'); + +const ROOT: string = process.cwd(); + +// --- Load function manifest (produced by pnpm generate) --- + +interface FunctionEntry { + name: string; + dir: string; + port: number; + type?: string; + taskIdentifier?: string; +} + +interface FunctionsManifest { + functions: FunctionEntry[]; +} + +function loadManifest(): FunctionsManifest { + const manifestPath = path.resolve(ROOT, 'generated/functions-manifest.json'); + if (!fs.existsSync(manifestPath)) { + console.error('generated/functions-manifest.json not found. Run `pnpm generate` first.'); + process.exit(1); + } + return JSON.parse(fs.readFileSync(manifestPath, 'utf-8')); +} + +const manifest = loadManifest(); + +// --- Load .env file if present --- + +function loadDotEnv(): Record { + const envVars: Record = {}; + const envPath = path.resolve(ROOT, '.env'); + if (!fs.existsSync(envPath)) return envVars; + + const content = fs.readFileSync(envPath, 'utf-8'); + for (const line of content.split('\n')) { + const trimmed = line.trim(); + if (!trimmed || trimmed.startsWith('#')) continue; + const eqIdx = trimmed.indexOf('='); + if (eqIdx === -1) continue; + const key = trimmed.slice(0, eqIdx).trim(); + let val = trimmed.slice(eqIdx + 1).trim(); + if ((val.startsWith('"') && val.endsWith('"')) || + (val.startsWith("'") && val.endsWith("'"))) { + val = val.slice(1, -1); + } + envVars[key] = val; + } + return envVars; +} + +// --- Query DB for configured secret values --- + +function loadDbSecretValues(dbName: string): Record { + const vars: Record = {}; + const dbId = '00000000-0000-0000-0000-000000000000'; + + // Load secrets from constructive_store_private.platform_secrets + try { + const sql = `SELECT name, convert_from(value, 'UTF8') AS val FROM constructive_store_private.platform_secrets WHERE database_id = '${dbId}' AND value IS NOT NULL`; + const output = execSync( + `psql -d "${dbName}" -t -A -F '|' -c "${sql}"`, + { encoding: 'utf-8', timeout: 5000 } + ).trim(); + if (output) { + for (const line of output.split('\n')) { + const [name, value] = line.split('|'); + if (name && value) vars[name] = value; + } + } + } catch { + console.log(' (platform_secrets not available yet)'); + } + + // Load configs from constructive_store_public.platform_config + try { + const sql = `SELECT name, value FROM constructive_store_public.platform_config WHERE value IS NOT NULL AND value != ''`; + const output = execSync( + `psql -d "${dbName}" -t -A -F '|' -c "${sql}"`, + { encoding: 'utf-8', timeout: 5000 } + ).trim(); + if (output) { + for (const line of output.split('\n')) { + const [name, value] = line.split('|'); + if (name && value) vars[name] = value; + } + } + } catch { + console.log(' (platform_config not available yet)'); + } + + return vars; +} + +// --- Query DB for function secret/config requirements (with required flag) --- + +interface FnRequirement { + fnName: string; + secrets: Array<{ name: string; required: boolean }>; + configs: Array<{ name: string; required: boolean }>; +} + +function loadFunctionRequirements(dbName: string): FnRequirement[] { + try { + const sql = ` + SELECT + name, + COALESCE(array_to_string( + ARRAY(SELECT (r).name || ':' || CASE WHEN (r).required THEN 't' ELSE 'f' END FROM unnest(required_secrets) AS r), ',' + ), '') AS secrets, + COALESCE(array_to_string( + ARRAY(SELECT (r).name || ':' || CASE WHEN (r).required THEN 't' ELSE 'f' END FROM unnest(required_configs) AS r), ',' + ), '') AS configs + FROM constructive_infra_public.platform_function_definitions + WHERE is_invocable = true + ORDER BY name + `; + const output = execSync( + `psql -d "${dbName}" -t -A -F '|' -c "${sql.replace(/"/g, '\\"').replace(/\n/g, ' ')}"`, + { encoding: 'utf-8', timeout: 5000 } + ).trim(); + + if (!output) return []; + return output.split('\n').map((line: string) => { + const [fnName, secretsRaw, configsRaw] = line.split('|'); + const parseReqs = (raw: string): Array<{ name: string; required: boolean }> => { + if (!raw) return []; + return raw.split(',').map((item) => { + const [name, flag] = item.split(':'); + return { name, required: flag === 't' }; + }); + }; + return { + fnName, + secrets: parseReqs(secretsRaw), + configs: parseReqs(configsRaw), + }; + }); + } catch { + return []; + } +} + +const dotEnv = loadDotEnv(); +const dbName = process.env.PGDATABASE || 'constructive-functions-db1'; +const dbSecrets = loadDbSecretValues(dbName); +const fnReqs = loadFunctionRequirements(dbName); + +// --- Merge with priority: .env > DB > hardcoded defaults --- + +const DEFAULTS: Record = { + MAILGUN_API_KEY: 'test-key', + MAILGUN_KEY: 'test-key', + MAILGUN_DOMAIN: 'mg.constructive.io', + MAILGUN_FROM: 'no-reply@mg.constructive.io', + MAILGUN_REPLY: 'info@mg.constructive.io', + LOCAL_APP_PORT: '3000', +}; + +const mergedSecrets: Record = { + ...DEFAULTS, + ...dbSecrets, + ...dotEnv, +}; + +// System env vars (always injected into every process) +const systemEnv: Record = { + NODE_ENV: 'development', + LOG_LEVEL: 'info', + PGHOST: mergedSecrets.PGHOST || process.env.PGHOST || 'localhost', + PGPORT: mergedSecrets.PGPORT || process.env.PGPORT || '5432', + PGUSER: mergedSecrets.PGUSER || process.env.PGUSER || 'postgres', + PGPASSWORD: mergedSecrets.PGPASSWORD || process.env.PGPASSWORD || 'password', + PGDATABASE: mergedSecrets.PGDATABASE || process.env.PGDATABASE || dbName, + GRAPHQL_URL: mergedSecrets.GRAPHQL_URL || process.env.GRAPHQL_URL || 'http://localhost:3002/graphql', + META_GRAPHQL_URL: mergedSecrets.META_GRAPHQL_URL || process.env.META_GRAPHQL_URL || 'http://localhost:3002/graphql', + GRAPHQL_API_NAME: 'private', + DEFAULT_DATABASE_ID: 'dbe', + SMTP_HOST: mergedSecrets.SMTP_HOST || process.env.SMTP_HOST || 'localhost', + SMTP_PORT: mergedSecrets.SMTP_PORT || process.env.SMTP_PORT || '1025', + SMTP_FROM: mergedSecrets.SMTP_FROM || process.env.SMTP_FROM || 'test@localhost', + SEND_VERIFICATION_LINK_DRY_RUN: mergedSecrets.SEND_VERIFICATION_LINK_DRY_RUN || process.env.SEND_VERIFICATION_LINK_DRY_RUN || 'true', + SEND_EMAIL_DRY_RUN: mergedSecrets.SEND_EMAIL_DRY_RUN || process.env.SEND_EMAIL_DRY_RUN || 'true', + EMAIL_SEND_USE_SMTP: mergedSecrets.EMAIL_SEND_USE_SMTP || process.env.EMAIL_SEND_USE_SMTP || '', + PATH: process.env.PATH || '', + HOME: process.env.HOME || '', +}; + +// --- Build per-function env: system + only the needed secrets/configs --- + +function buildFunctionEnv(fnName: string): Record { + const req = fnReqs.find((r) => r.fnName === fnName); + const env: Record = { ...systemEnv }; + + if (!req) return { ...env, ...mergedSecrets }; + + const allReqs = [...req.secrets, ...req.configs]; + for (const { name } of allReqs) { + const val = mergedSecrets[name] || process.env[name] || ''; + if (val) env[name] = val; + } + + return env; +} + +// --- Validate per-function requirements (fail fast on required, warn optional) --- + +function validateRequirements(): boolean { + let hasFatal = false; + + for (const req of fnReqs) { + const allReqs = [...req.secrets, ...req.configs]; + const missingRequired: string[] = []; + const missingOptional: string[] = []; + + for (const { name, required } of allReqs) { + const val = mergedSecrets[name] || process.env[name] || ''; + if (!val) { + if (required) { + missingRequired.push(name); + } else { + missingOptional.push(name); + } + } + } + + if (missingRequired.length > 0) { + console.error(` FATAL: ${req.fnName} missing REQUIRED secrets: ${missingRequired.join(', ')}`); + hasFatal = true; + } + if (missingOptional.length > 0) { + console.log(` WARN: ${req.fnName} missing optional secrets: ${missingOptional.join(', ')}`); + } + } + + return hasFatal; +} + +// --- Process definitions (built from manifest) --- + +interface ProcessDef { + name: string; + script: string; + port: number; + extraEnv?: Record; +} + +// Only start Node-based functions (skip python, etc.) +const nodeFunctions = manifest.functions.filter( + (fn) => !fn.type || fn.type === 'node-graphql' +); + +function buildComputeServiceEnv(): Record { + const taskId = (fn: FunctionEntry): string => fn.taskIdentifier ?? fn.name; + const gatewayMap: Record = {}; + for (const fn of nodeFunctions) { + gatewayMap[taskId(fn)] = `http://localhost:${fn.port}`; + } + + return { + COMPUTE_JOBS_ENABLED: 'true', + JOBS_SCHEMA: 'app_jobs', + JOBS_SUPPORT_ANY: 'true', + HOSTNAME: 'compute-service-local', + INTERNAL_JOBS_CALLBACK_PORT: '8080', + INTERNAL_JOBS_CALLBACK_URL: 'http://localhost:8080/callback', + COMPUTE_CALLBACK_URL: 'http://localhost:8080/callback', + JOBS_CALLBACK_HOST: 'localhost', + COMPUTE_GATEWAY_URL: `http://localhost:${nodeFunctions[0]?.port || 8081}`, + INTERNAL_GATEWAY_DEVELOPMENT_MAP: JSON.stringify(gatewayMap), + INTERNAL_GATEWAY_URL: `http://localhost:${nodeFunctions[0]?.port || 8081}`, + }; +} + +const allProcesses: ProcessDef[] = [ + { + name: 'compute-service', + script: path.resolve(ROOT, 'job/compute-service/dist/run.js'), + port: 8080, + extraEnv: buildComputeServiceEnv(), + }, + ...nodeFunctions.map((fn) => ({ + name: fn.name, + script: path.resolve(ROOT, `generated/${fn.dir}/dist/index.js`), + port: fn.port, + })), +]; + +// --- CLI args --- + +const args = process.argv.slice(2); +const onlyArg = args.find((a: string) => a.startsWith('--only=')); +const onlyName: string | undefined = onlyArg?.split('=')[1]; + +// --- Main --- + +const children: ReturnType[] = []; + +function startProcess(def: ProcessDef): void { + const fnEnv = def.name === 'compute-service' + ? { ...systemEnv, ...mergedSecrets, ...(def.extraEnv || {}), PORT: String(def.port) } + : { ...buildFunctionEnv(def.name), ...(def.extraEnv || {}), PORT: String(def.port) }; + + console.log(`Starting ${def.name} on port ${def.port}...`); + + const child = spawn('node', [def.script], { + env: fnEnv, + stdio: ['ignore', 'pipe', 'pipe'], + cwd: ROOT, + }); + + child.stdout?.on('data', (data: Buffer) => { + for (const line of data.toString().trimEnd().split('\n')) { + console.log(`[${def.name}] ${line}`); + } + }); + + child.stderr?.on('data', (data: Buffer) => { + for (const line of data.toString().trimEnd().split('\n')) { + console.error(`[${def.name}] ${line}`); + } + }); + + child.on('exit', (code: number | null) => { + console.log(`[${def.name}] exited with code ${code}`); + }); + + children.push(child); +} + +function shutdown(): void { + console.log('\nShutting down...'); + for (const child of children) { + child.kill('SIGTERM'); + } + process.exit(0); +} + +process.on('SIGINT', shutdown); +process.on('SIGTERM', shutdown); + +const processes = onlyName + ? allProcesses.filter((p) => p.name === onlyName) + : allProcesses; + +if (processes.length === 0) { + console.error(onlyName ? `Unknown process "${onlyName}".` : 'No processes to start.'); + console.log('Available:', allProcesses.map((p) => p.name).join(', ')); + process.exit(1); +} + +// Print a clear port summary +console.log(''); +console.log('════════════════════════════════════════════════════════════'); +console.log(' Services:'); +for (const p of processes) { + const label = p.name === 'compute-service' ? `${p.name} (job dispatcher)` : p.name; + console.log(` ${label.padEnd(40)} http://localhost:${p.port}`); +} +console.log(''); +console.log(` Database: ${systemEnv.PGDATABASE}`); +if (systemEnv.EMAIL_SEND_USE_SMTP === 'true') { + console.log(` Mailpit UI: http://localhost:8025`); +} + +// Report secret/config coverage with required/optional distinction +if (fnReqs.length > 0) { + console.log(''); + console.log(' Secrets/Configs (priority: .env > DB > defaults):'); + for (const req of fnReqs) { + const allReqs = [...req.secrets, ...req.configs]; + const missing = allReqs.filter((r) => { + const val = mergedSecrets[r.name] || process.env[r.name] || ''; + return !val; + }); + const set = allReqs.length - missing.length; + if (missing.length > 0) { + const requiredMissing = missing.filter((m) => m.required); + const optionalMissing = missing.filter((m) => !m.required); + let detail = `${set}/${allReqs.length} set`; + if (requiredMissing.length > 0) detail += `, ${requiredMissing.length} REQUIRED missing`; + if (optionalMissing.length > 0) detail += `, ${optionalMissing.length} optional missing`; + console.log(` ${requiredMissing.length > 0 ? '✗' : '●'} ${req.fnName}: ${detail}`); + } else { + console.log(` ✓ ${req.fnName}: all ${set} secrets/configs set`); + } + } +} + +const envSources: string[] = []; +if (Object.keys(dotEnv).length > 0) envSources.push(`.env (${Object.keys(dotEnv).length} vars)`); +if (Object.keys(dbSecrets).length > 0) envSources.push(`DB (${Object.keys(dbSecrets).length} vars)`); +envSources.push(`defaults (${Object.keys(DEFAULTS).length} vars)`); +console.log(` Sources: ${envSources.join(' > ')}`); + +console.log('════════════════════════════════════════════════════════════'); +console.log(''); + +// Validate requirements — fail fast on missing required secrets +const hasFatal = validateRequirements(); +if (hasFatal) { + console.error(''); + console.error('Cannot start: required secrets are missing.'); + console.error('Configure them via:'); + console.error(' 1. Add to .env file'); + console.error(' 2. Set in Platform UI → Secrets tab → Sync to DB'); + console.error(" 3. Run 'make check-env' for a full report"); + process.exit(1); +} + +for (const def of processes) { + startProcess(def); +} diff --git a/scripts/down.sh b/scripts/down.sh new file mode 100755 index 00000000..2c5dc25b --- /dev/null +++ b/scripts/down.sh @@ -0,0 +1,58 @@ +#!/usr/bin/env bash +# +# down.sh — Tear down the platform development environment. +# +# Stops PostgreSQL (pgpm docker stop), optionally drops the database. +# +# Usage: +# make down # stop postgres +# make down DB_NAME=mydb # stop postgres + drop mydb +# DROP=1 make down DB_NAME=mydb # explicit drop + +set -euo pipefail + +DB_NAME="${1:-${DB_NAME:-}}" +DROP="${DROP:-}" + +RED='\033[0;31m' +GREEN='\033[0;32m' +BOLD='\033[1m' +NC='\033[0m' + +ok() { echo -e " ${GREEN}✓${NC} $1"; } +fail() { echo -e " ${RED}✗${NC} $1"; } + +echo "" +echo -e "${BOLD}════════════════════════════════════════════════════════════${NC}" +echo -e "${BOLD} Platform Down${NC}" +echo -e "${BOLD}════════════════════════════════════════════════════════════${NC}" +echo "" + +# --- Stop any running docker-compose services (mailpit, etc.) --- +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +ROOT_DIR="$(cd "$SCRIPT_DIR/.." && pwd)" + +if [ -f "$ROOT_DIR/docker-compose.yml" ]; then + echo "Stopping docker-compose services..." + cd "$ROOT_DIR" + docker compose down 2>/dev/null && ok "Docker Compose services stopped" || ok "No compose services running" +fi + +# --- Drop database if requested --- +if [ -n "$DB_NAME" ] && [ -n "$DROP" ]; then + eval "$(pgpm env 2>/dev/null)" || true + echo "Dropping database '$DB_NAME'..." + dropdb "$DB_NAME" 2>/dev/null && ok "Database '$DB_NAME' dropped" || ok "Database '$DB_NAME' does not exist" +fi + +# --- Stop MinIO --- +echo "Stopping MinIO..." +docker stop constructive-functions-minio 2>/dev/null && docker rm constructive-functions-minio 2>/dev/null && ok "MinIO stopped" || ok "MinIO was not running" + +# --- Stop PostgreSQL --- +echo "Stopping PostgreSQL..." +pgpm docker stop 2>/dev/null && ok "PostgreSQL stopped" || ok "PostgreSQL was not running" + +echo "" +echo -e "${GREEN}${BOLD} Platform is down.${NC}" +echo "" diff --git a/scripts/email-job-down.sh b/scripts/email-job-down.sh new file mode 100755 index 00000000..c6e76ff0 --- /dev/null +++ b/scripts/email-job-down.sh @@ -0,0 +1,37 @@ +#!/usr/bin/env bash +# +# email-job-down.sh — Stop mailpit and any running compute-service processes. +# +# Usage: +# make down:email-job + +set -euo pipefail + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +ROOT_DIR="$(cd "$SCRIPT_DIR/.." && pwd)" + +GREEN='\033[0;32m' +BOLD='\033[1m' +NC='\033[0m' + +ok() { echo -e " ${GREEN}✓${NC} $1"; } + +echo "" +echo -e "${BOLD}════════════════════════════════════════════════════════════${NC}" +echo -e "${BOLD} Email Job Down${NC}" +echo -e "${BOLD}════════════════════════════════════════════════════════════${NC}" +echo "" + +# Stop mailpit via docker compose +cd "$ROOT_DIR" +export POSTGRES_PASSWORD="${POSTGRES_PASSWORD:-password}" +docker compose stop mailpit 2>/dev/null && ok "Mailpit stopped" || ok "Mailpit was not running" + +# Kill any running compute-service / dev-compute processes +pkill -f "dev-compute.ts" 2>/dev/null && ok "Compute-service stopped" || ok "Compute-service was not running" +pkill -f "compute-service/dist/run.js" 2>/dev/null || true + +echo "" +echo -e "${GREEN}${BOLD} Email Job is down.${NC}" +echo " PostgreSQL is still running. Use 'make down' to stop everything." +echo "" diff --git a/scripts/email-job-up.sh b/scripts/email-job-up.sh new file mode 100755 index 00000000..e8f7adac --- /dev/null +++ b/scripts/email-job-up.sh @@ -0,0 +1,217 @@ +#!/usr/bin/env bash +# +# email-job-up.sh — Start mailpit + compute-service for local email testing. +# +# Requires the platform to be up first (make up). +# Starts mailpit (SMTP on :1025, web UI on :8025) then launches +# the compute-service + functions with SMTP mode enabled. +# +# Usage: +# make up:email-job # default DB +# make up:email-job DB_NAME=db8 # custom DB + +set -euo pipefail + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +ROOT_DIR="$(cd "$SCRIPT_DIR/.." && pwd)" + +DB_NAME="${1:-${DB_NAME:-constructive-functions-db1}}" + +RED='\033[0;31m' +GREEN='\033[0;32m' +YELLOW='\033[0;33m' +BOLD='\033[1m' +NC='\033[0m' + +step() { echo ""; echo -e "${BOLD}[$1/${TOTAL_STEPS}] $2${NC}"; } +ok() { echo -e " ${GREEN}✓${NC} $1"; } +warn() { echo -e " ${YELLOW}●${NC} $1"; } +fail() { echo -e " ${RED}✗${NC} $1"; } + +TOTAL_STEPS=5 + +echo "" +echo -e "${BOLD}════════════════════════════════════════════════════════════${NC}" +echo -e "${BOLD} Email Job Up — $DB_NAME${NC}" +echo -e "${BOLD}════════════════════════════════════════════════════════════${NC}" + +# ─── Step 1: Verify platform is up ────────────────────────────────────────── + +step 1 "Checking platform" + +eval "$(pgpm env 2>/dev/null)" || true + +if ! psql -d "$DB_NAME" -c "SELECT 1" &>/dev/null; then + fail "Database '$DB_NAME' is not reachable. Run 'make up' first." + exit 1 +fi + +HAS_INFRA=$(psql -d "$DB_NAME" -t -A -c "SELECT 1 FROM information_schema.schemata WHERE schema_name = 'constructive_infra_public'" 2>/dev/null) +if [ "$HAS_INFRA" != "1" ]; then + fail "constructive-infra not deployed to '$DB_NAME'. Run 'make up' first." + exit 1 +fi + +ok "Platform is up ($DB_NAME)" + +# ─── Step 2: Start mailpit ────────────────────────────────────────────────── + +step 2 "Starting mailpit" + +MAILPIT_UP=$(docker ps --filter "name=mailpit" --filter "status=running" --format "{{.Names}}" 2>/dev/null | head -1) + +if [ -n "$MAILPIT_UP" ]; then + ok "Already running ($MAILPIT_UP)" +else + cd "$ROOT_DIR" + # Need POSTGRES_PASSWORD for docker-compose even if we only start mailpit + export POSTGRES_PASSWORD="${POSTGRES_PASSWORD:-password}" + docker compose up -d mailpit 2>&1 | tail -3 + ok "Mailpit started" +fi + +echo " SMTP: localhost:1025" +echo " Web UI: http://localhost:8025" + +# ─── Step 3: Build packages ───────────────────────────────────────────────── + +step 3 "Checking build" + +cd "$ROOT_DIR" +if [ ! -d "job/compute-service/dist" ] || [ ! -d "job/compute-worker/dist" ]; then + echo " Building packages..." + pnpm generate 2>/dev/null || true + pnpm install 2>/dev/null || true + pnpm build 2>&1 | tail -5 + ok "Built" +else + ok "Already built" +fi + +# ─── Step 4: Load .env ────────────────────────────────────────────────────── + +step 4 "Loading environment" + +# Default SMTP/Mailpit env — user's .env overrides these +export EMAIL_SEND_USE_SMTP="${EMAIL_SEND_USE_SMTP:-true}" +export SMTP_HOST="${SMTP_HOST:-localhost}" +export SMTP_PORT="${SMTP_PORT:-1025}" +export SMTP_FROM="${SMTP_FROM:-test@localhost}" +export SEND_EMAIL_DRY_RUN="${SEND_EMAIL_DRY_RUN:-false}" +export SEND_VERIFICATION_LINK_DRY_RUN="${SEND_VERIFICATION_LINK_DRY_RUN:-false}" + +if [ -f "$ROOT_DIR/.env" ]; then + set -a + source "$ROOT_DIR/.env" + set +a + ok "Loaded .env" +else + warn "No .env file — using defaults (SMTP mode, Mailpit on localhost:1025)" +fi + +ok "EMAIL_SEND_USE_SMTP=$EMAIL_SEND_USE_SMTP" +ok "SMTP_HOST=$SMTP_HOST:$SMTP_PORT" +ok "SEND_EMAIL_DRY_RUN=$SEND_EMAIL_DRY_RUN" + +# ─── Step 4b: Check function secret/config coverage ────────────────────────── + +echo "" +echo -e " ${BOLD}Checking secret/config coverage:${NC}" + +# Build a newline-separated list of loaded env var names (bash 3 compatible) +LOADED_VARS="" +for var in EMAIL_SEND_USE_SMTP SMTP_HOST SMTP_PORT SMTP_FROM SEND_EMAIL_DRY_RUN \ + SEND_VERIFICATION_LINK_DRY_RUN MAILGUN_API_KEY MAILGUN_DOMAIN \ + MAILGUN_FROM MAILGUN_REPLY MAILGUN_KEY LOCAL_APP_PORT; do + eval "val=\${$var+x}" + [ -n "$val" ] && LOADED_VARS="$LOADED_VARS +$var" +done +if [ -f "$ROOT_DIR/.env" ]; then + while IFS= read -r line; do + case "$line" in \#*|"") continue ;; esac + key="${line%%=*}" + case "$key" in + [A-Za-z_]*) LOADED_VARS="$LOADED_VARS +$key" ;; + esac + done < "$ROOT_DIR/.env" +fi + +has_var() { + echo "$LOADED_VARS" | grep -qx "$1" +} + +# Query function requirements from DB +FN_REQS=$(psql -d "$DB_NAME" -t -A -F '|' -c " + SELECT + name, + COALESCE(array_to_string( + ARRAY(SELECT (r).name FROM unnest(required_secrets) AS r), ',' + ), '') AS secrets, + COALESCE(array_to_string( + ARRAY(SELECT (r).name FROM unnest(required_configs) AS r), ',' + ), '') AS configs + FROM constructive_infra_public.platform_function_definitions + WHERE is_invocable = true + ORDER BY name +" 2>/dev/null) || true + +TOTAL_MISSING=0 +if [ -n "$FN_REQS" ]; then + while IFS='|' read -r fn_name secrets configs; do + ALL_KEYS="" + [ -n "$secrets" ] && ALL_KEYS="$secrets" + [ -n "$configs" ] && { [ -n "$ALL_KEYS" ] && ALL_KEYS="$ALL_KEYS,$configs" || ALL_KEYS="$configs"; } + + FN_SET=0 + FN_MISS=0 + FN_TOTAL=0 + OLD_IFS="$IFS"; IFS=',' + for key in $ALL_KEYS; do + IFS="$OLD_IFS" + [ -z "$key" ] && continue + FN_TOTAL=$((FN_TOTAL + 1)) + if has_var "$key"; then + FN_SET=$((FN_SET + 1)) + else + FN_MISS=$((FN_MISS + 1)) + TOTAL_MISSING=$((TOTAL_MISSING + 1)) + fi + done + IFS="$OLD_IFS" + if [ "$FN_MISS" -gt 0 ]; then + warn "$fn_name: $FN_SET/$FN_TOTAL secrets/configs set ($FN_MISS missing)" + else + ok "$fn_name: all $FN_SET secrets/configs set" + fi + done <<< "$FN_REQS" +fi + +if [ "$TOTAL_MISSING" -gt 0 ]; then + warn "$TOTAL_MISSING secret(s)/config(s) missing — functions may use defaults" + echo " Run 'make check-env' for details" +fi + +# ─── Step 5: Start compute-service ────────────────────────────────────────── + +step 5 "Starting compute-service + functions" + +echo "" +echo -e "${BOLD}════════════════════════════════════════════════════════════${NC}" +echo -e "${GREEN}${BOLD} Email Job is up${NC}" +echo "" +echo " Mailpit UI: http://localhost:8025" +echo " Database: $DB_NAME" +echo "" +echo " Test: psql -d $DB_NAME -c \\" +echo " \"INSERT INTO app_jobs.jobs (task_identifier, payload)" +echo " VALUES ('send-email'," +echo " '{\\\"to\\\":\\\"test@example.com\\\",\\\"subject\\\":\\\"Hello\\\",\\\"html\\\":\\\"

Test from compute-worker

\\\"}');\"" +echo "" +echo " Ctrl+C to stop compute-service (mailpit keeps running)" +echo -e "${BOLD}════════════════════════════════════════════════════════════${NC}" +echo "" + +export PGDATABASE="$DB_NAME" +exec node --experimental-strip-types "$ROOT_DIR/scripts/dev-compute.ts" diff --git a/scripts/load-platform-env.sh b/scripts/load-platform-env.sh new file mode 100755 index 00000000..865dc3f5 --- /dev/null +++ b/scripts/load-platform-env.sh @@ -0,0 +1,272 @@ +#!/usr/bin/env bash +# +# load-platform-env.sh — load .env values into platform_secrets + platform_config +# +# Reads your .env file, cross-references it against the required_secrets and +# required_configs declared in platform_function_definitions, reports coverage, +# and UPSERTs matching values into the real upstream tables: +# - requiredSecrets → constructive_store_private.platform_secrets (bytea value) +# - requiredConfigs → constructive_store_public.platform_config (text value) +# +# Usage: +# ./scripts/load-platform-env.sh # defaults to .env + constructive-functions-db1 +# ./scripts/load-platform-env.sh .env.local db8 # custom env file + database +# DB_NAME=db8 ./scripts/load-platform-env.sh # via env var + +set -euo pipefail + +ENV_FILE="${1:-.env}" +DB_NAME="${2:-${DB_NAME:-constructive-functions-db1}}" + +DB_ID="00000000-0000-0000-0000-000000000000" + +if [ ! -f "$ENV_FILE" ]; then + echo "Error: $ENV_FILE not found." + echo "" + echo "Create one from the example:" + echo " cp .env.example $ENV_FILE" + echo "" + echo "Required keys for email functions (SMTP/Mailpit):" + echo " POSTGRES_PASSWORD=password" + echo " EMAIL_SEND_USE_SMTP=true" + echo " SMTP_HOST=localhost" + echo " SMTP_PORT=1025" + echo " SMTP_FROM=test@localhost" + echo " SEND_EMAIL_DRY_RUN=false" + echo " SEND_VERIFICATION_LINK_DRY_RUN=false" + exit 1 +fi + +echo "════════════════════════════════════════════════════════════" +echo " Platform Environment Sync" +echo " .env: $ENV_FILE database: $DB_NAME" +echo "════════════════════════════════════════════════════════════" +echo "" + +# Load env file into newline-separated KEY list (bash 3 compatible) +ENV_KEYS="" +ENV_COUNT=0 +while IFS= read -r line; do + case "$line" in \#*|"") continue ;; esac + key="${line%%=*}" + case "$key" in + [A-Za-z_]*) + ENV_KEYS="$ENV_KEYS +$key" + ENV_COUNT=$((ENV_COUNT + 1)) + ;; + esac +done < "$ENV_FILE" + +# Also source the file so we can read values +set -a +. "$ENV_FILE" +set +a + +has_env() { + echo "$ENV_KEYS" | grep -qx "$1" +} + +echo "Loaded $ENV_COUNT variable(s) from $ENV_FILE" +echo "" + +# Resolve the default namespace_id +NS_ID=$(psql -d "$DB_NAME" -t -A -c " + SELECT id FROM constructive_infra_public.platform_namespaces + WHERE name = 'default' AND database_id = '$DB_ID' + LIMIT 1 +" 2>/dev/null) + +if [ -z "$NS_ID" ]; then + echo "Error: default namespace not found in $DB_NAME." + echo " Ensure constructive-infra-seed has been deployed." + exit 1 +fi + +# Query functions and their requirements +FUNCTIONS=$(psql -d "$DB_NAME" -t -A -F '|' -c " + SELECT + name, + COALESCE(array_to_string( + ARRAY(SELECT (r).name FROM unnest(required_secrets) AS r), ',' + ), '') AS secrets, + COALESCE(array_to_string( + ARRAY(SELECT (r).name FROM unnest(required_configs) AS r), ',' + ), '') AS configs, + COALESCE(array_to_string( + ARRAY(SELECT (r).name FROM unnest(required_secrets) AS r WHERE (r).required = true), ',' + ), '') AS required_secrets, + COALESCE(array_to_string( + ARRAY(SELECT (r).name FROM unnest(required_configs) AS r WHERE (r).required = true), ',' + ), '') AS required_configs + FROM constructive_infra_public.platform_function_definitions + WHERE is_invocable = true + ORDER BY name +" 2>/dev/null) + +if [ -z "$FUNCTIONS" ]; then + echo "No invocable functions found in $DB_NAME" + exit 1 +fi + +TOTAL_MISSING=0 +SECRET_KEYS="" +CONFIG_KEYS="" + +while IFS='|' read -r fn_name secrets configs req_secrets req_configs; do + echo "─── $fn_name ───" + + ALL_KEYS="" + [ -n "$secrets" ] && ALL_KEYS="$secrets" + [ -n "$configs" ] && { [ -n "$ALL_KEYS" ] && ALL_KEYS="$ALL_KEYS,$configs" || ALL_KEYS="$configs"; } + + MISSING=0 + SATISFIED=0 + + OLD_IFS="$IFS"; IFS=',' + for key in $ALL_KEYS; do + IFS="$OLD_IFS" + [ -z "$key" ] && continue + IS_REQUIRED=false + case ",$req_secrets,$req_configs," in *",$key,"*) IS_REQUIRED=true ;; esac + + if has_env "$key"; then + eval "val=\${$key:-}" + if [ ${#val} -gt 8 ]; then + display="${val%"${val#????}"}****" + else + display="$val" + fi + echo " ✓ $key = $display" + SATISFIED=$((SATISFIED + 1)) + + # Track for DB sync (deduplicate into secret vs config buckets) + case ",$secrets," in + *",$key,"*) + case ",$SECRET_KEYS," in + *",$key,"*) ;; + *) SECRET_KEYS="${SECRET_KEYS:+$SECRET_KEYS,}$key" ;; + esac + ;; + esac + case ",$configs," in + *",$key,"*) + case ",$CONFIG_KEYS," in + *",$key,"*) ;; + *) CONFIG_KEYS="${CONFIG_KEYS:+$CONFIG_KEYS,}$key" ;; + esac + ;; + esac + else + if $IS_REQUIRED; then + echo " ✗ $key (REQUIRED — missing!)" + MISSING=$((MISSING + 1)) + TOTAL_MISSING=$((TOTAL_MISSING + 1)) + else + echo " · $key (optional — not set)" + fi + fi + done + IFS="$OLD_IFS" + + echo " → $SATISFIED set, $MISSING missing" + echo "" +done <<< "$FUNCTIONS" + +# ─── Sync secrets into constructive_store_private.platform_secrets ─────────── + +SYNCED=0 + +if [ -n "$SECRET_KEYS" ]; then + echo "─── Syncing secrets → platform_secrets ───" + + OLD_IFS="$IFS"; IFS=',' + for key in $SECRET_KEYS; do + IFS="$OLD_IFS" + [ -z "$key" ] && continue + eval "val=\${$key:-}" + [ -z "$val" ] && continue + + escaped_val="${val//\'/\'\'}" + + psql -d "$DB_NAME" -q -c " + INSERT INTO constructive_store_private.platform_secrets + (id, name, value, database_id, namespace_id) + VALUES ( + gen_random_uuid(), + '$key', + convert_to('$escaped_val', 'UTF8'), + '$DB_ID', + '$NS_ID' + ) + ON CONFLICT (database_id, namespace_id, name) + DO UPDATE SET value = convert_to('$escaped_val', 'UTF8'), + updated_at = now(); + " 2>/dev/null && { + SYNCED=$((SYNCED + 1)) + } || { + echo " ⚠ Failed to sync secret $key" + } + done + IFS="$OLD_IFS" + + echo " ✓ Synced $SYNCED secret(s)" + echo "" +fi + +# ─── Sync configs into constructive_store_public.platform_config ───────────── + +CONFIG_SYNCED=0 + +if [ -n "$CONFIG_KEYS" ]; then + echo "─── Syncing configs → platform_config ───" + + OLD_IFS="$IFS"; IFS=',' + for key in $CONFIG_KEYS; do + IFS="$OLD_IFS" + [ -z "$key" ] && continue + eval "val=\${$key:-}" + [ -z "$val" ] && continue + + escaped_val="${val//\'/\'\'}" + + psql -d "$DB_NAME" -q -c " + INSERT INTO constructive_store_public.platform_config + (id, name, value, namespace_id) + VALUES ( + gen_random_uuid(), + '$key', + '$escaped_val', + '$NS_ID' + ) + ON CONFLICT (namespace_id, name) + DO UPDATE SET value = '$escaped_val', + updated_at = now(); + " 2>/dev/null && { + CONFIG_SYNCED=$((CONFIG_SYNCED + 1)) + } || { + echo " ⚠ Failed to sync config $key" + } + done + IFS="$OLD_IFS" + + echo " ✓ Synced $CONFIG_SYNCED config(s)" + echo "" +fi + +# ─── Summary ───────────────────────────────────────────────────────────────── + +TOTAL_SYNCED=$((SYNCED + CONFIG_SYNCED)) + +if [ "$TOTAL_MISSING" -gt 0 ]; then + echo "⚠ $TOTAL_MISSING required secret(s)/config(s) missing." + echo " Add them to $ENV_FILE and re-run." + exit 1 +else + echo "All required secrets and configs are satisfied." + echo "$SYNCED secret(s) + $CONFIG_SYNCED config(s) loaded into DB." + echo "" + echo "Start the compute-service:" + echo " set -a; source $ENV_FILE; set +a" + echo " PGDATABASE=$DB_NAME make dev-compute" +fi diff --git a/scripts/register-functions.ts b/scripts/register-functions.ts new file mode 100644 index 00000000..83551a89 --- /dev/null +++ b/scripts/register-functions.ts @@ -0,0 +1,221 @@ +// register-functions: reads functions//handler.json manifests and generates +// the pgpm seed SQL that registers them in platform_function_definitions. +// +// Usage: +// node --experimental-strip-types scripts/register-functions.ts +// node --experimental-strip-types scripts/register-functions.ts --dry-run +// +// Reads each handler.json for: +// - name, description, port, taskIdentifier (existing fields) +// - scope (default: 'platform') +// - requiredSecrets [{name, required}] +// - requiredConfigs [{name, required}] +// - payloadSchema (JSON Schema — reserved for FBP typed ports) +// +// Outputs: +// pgpm/constructive-infra-seed/deploy/.../seed_built_in_functions.sql + +const fs = require('fs') as typeof import('fs'); +const path = require('path') as typeof import('path'); + +const ROOT: string = process.cwd(); +const FUNCTIONS_DIR: string = path.resolve(ROOT, 'functions'); + +const SEED_PATH = path.resolve( + ROOT, + 'pgpm/constructive-infra-seed/deploy/schemas/constructive_infra_public/tables/platform_function_definitions/fixtures/seed_built_in_functions.sql' +); + +// ── Types ──────────────────────────────────────────────────────────────────── + +interface Requirement { + name: string; + required: boolean; +} + +interface FunctionManifest { + name: string; + version: string; + description?: string; + type?: string; + port?: number; + taskIdentifier?: string; + scope?: string; + requiredSecrets?: Requirement[]; + requiredConfigs?: Requirement[]; + payloadSchema?: Record; + dependencies?: Record; +} + +// ── Discovery ──────────────────────────────────────────────────────────────── + +function findFunctions(): string[] { + if (!fs.existsSync(FUNCTIONS_DIR)) { + console.log('No functions/ directory found.'); + return []; + } + return fs + .readdirSync(FUNCTIONS_DIR) + .filter((name: string) => { + const p = path.join(FUNCTIONS_DIR, name, 'handler.json'); + return fs.existsSync(p); + }) + .sort(); +} + +function readManifest(fnName: string): FunctionManifest { + const p = path.join(FUNCTIONS_DIR, fnName, 'handler.json'); + return JSON.parse(fs.readFileSync(p, 'utf-8')); +} + +// ── SQL Generation ─────────────────────────────────────────────────────────── + +function sqlArray(items: Requirement[] | undefined, typeCast: string): string { + if (!items || items.length === 0) return `ARRAY[]::${typeCast}[]`; + const rows = items.map( + (r) => ` ROW('${r.name}', ${r.required})` + ); + return `ARRAY[\n${rows.join(',\n')}\n ]::${typeCast}[]`; +} + +function sqlJsonb(obj: Record | undefined): string { + if (!obj || Object.keys(obj).length === 0) return 'NULL'; + return `'${JSON.stringify(obj).replace(/'/g, "''")}'::jsonb`; +} + +function generateValueBlock(m: FunctionManifest): string { + const taskId = m.taskIdentifier || m.name; + const scope = m.scope || 'platform'; + const desc = (m.description || '').replace(/'/g, "''"); + const port = m.port || 8080; + const secrets = sqlArray(m.requiredSecrets, 'constructive_infra_public.function_requirement'); + const configs = sqlArray(m.requiredConfigs, 'constructive_infra_public.function_requirement'); + const schema = sqlJsonb(m.payloadSchema); + + return ` ( + '${m.name}', + '${taskId}', + 'http://localhost:${port}', + true, true, '${scope}', + '${desc}', + (SELECT id FROM constructive_infra_public.platform_namespaces WHERE name = 'default' AND database_id = '00000000-0000-0000-0000-000000000000'), + ${secrets}, + ${configs}, + ${schema} + )`; +} + +function generateSeedSQL(manifests: FunctionManifest[]): string { + const header = `-- Deploy: schemas/constructive_infra_public/tables/platform_function_definitions/fixtures/seed_built_in_functions +-- made with <3 @ constructive.io +-- +-- AUTO-GENERATED by scripts/register-functions.ts +-- Do not edit manually — run: make register + +-- requires: schemas/constructive_infra_public/partitions/create_default_partitions +-- requires: schemas/constructive_infra_public/tables/platform_namespaces/fixtures/seed_default_namespace`; + + const values = manifests.map(generateValueBlock).join(',\n'); + + return `${header} + +BEGIN; + +INSERT INTO constructive_infra_public.platform_function_definitions + (name, task_identifier, service_url, is_invocable, is_built_in, scope, description, + namespace_id, required_secrets, required_configs, payload_schema) +VALUES +${values} +ON CONFLICT (scope, name) DO UPDATE SET + task_identifier = EXCLUDED.task_identifier, + service_url = EXCLUDED.service_url, + namespace_id = EXCLUDED.namespace_id, + required_secrets = EXCLUDED.required_secrets, + required_configs = EXCLUDED.required_configs, + description = EXCLUDED.description, + payload_schema = EXCLUDED.payload_schema; + +COMMIT; +`; +} + +function generateRevertSQL(manifests: FunctionManifest[]): string { + const names = manifests.map((m) => `'${m.name}'`).join(', '); + return `-- Revert: schemas/constructive_infra_public/tables/platform_function_definitions/fixtures/seed_built_in_functions +-- made with <3 @ constructive.io +-- AUTO-GENERATED by scripts/register-functions.ts + +BEGIN; + +DELETE FROM constructive_infra_public.platform_function_definitions +WHERE is_built_in = true + AND scope = 'platform' + AND name IN (${names}); + +COMMIT; +`; +} + +function generateVerifySQL(manifests: FunctionManifest[]): string { + const checks = manifests + .map((m) => `SELECT 1 FROM constructive_infra_public.platform_function_definitions\nWHERE name = '${m.name}' AND is_built_in = true;`) + .join('\n\n'); + return `-- Verify: schemas/constructive_infra_public/tables/platform_function_definitions/fixtures/seed_built_in_functions +-- made with <3 @ constructive.io +-- AUTO-GENERATED by scripts/register-functions.ts + +BEGIN; + +${checks} + +ROLLBACK; +`; +} + +// ── Main ───────────────────────────────────────────────────────────────────── + +const REVERT_PATH = SEED_PATH.replace('/deploy/', '/revert/'); +const VERIFY_PATH = SEED_PATH.replace('/deploy/', '/verify/'); + +function main(): void { + const dryRun = process.argv.includes('--dry-run'); + const functions = findFunctions(); + + if (functions.length === 0) { + console.log('No functions found to register.'); + return; + } + + const manifests = functions.map(readManifest); + const deploySql = generateSeedSQL(manifests); + const revertSql = generateRevertSQL(manifests); + const verifySql = generateVerifySQL(manifests); + + console.log(`Found ${manifests.length} function(s):`); + for (const m of manifests) { + const port = m.port || 8080; + const secrets = (m.requiredSecrets || []).length; + const configs = (m.requiredConfigs || []).length; + const hasSchema = m.payloadSchema && Object.keys(m.payloadSchema).length > 0; + console.log(` ${m.name} → :${port} (${secrets} secrets, ${configs} configs${hasSchema ? ', has schema' : ''})`); + } + + if (dryRun) { + console.log('\n--- Generated Functions SQL (dry run) ---\n'); + console.log(deploySql); + return; + } + + const writeSql = (p: string, content: string) => { + fs.mkdirSync(path.dirname(p), { recursive: true }); + fs.writeFileSync(p, content); + console.log(` ${path.relative(ROOT, p)}`); + }; + + console.log('\nWrote:'); + writeSql(SEED_PATH, deploySql); + writeSql(REVERT_PATH, revertSql); + writeSql(VERIFY_PATH, verifySql); +} + +main(); diff --git a/scripts/secrets-sync.sh b/scripts/secrets-sync.sh new file mode 100755 index 00000000..a8673b52 --- /dev/null +++ b/scripts/secrets-sync.sh @@ -0,0 +1,164 @@ +#!/usr/bin/env bash +# +# secrets-sync.sh — bidirectional sync between .env and platform_secrets + platform_config +# +# Reads .env → upserts into real upstream tables, then reads DB → merges into .env. +# Priority on conflict: .env wins (values already in .env are not overwritten by DB). +# +# Usage: +# ./scripts/secrets-sync.sh # defaults +# ./scripts/secrets-sync.sh .env.local db8 # custom env file + database +# DB_NAME=db8 ./scripts/secrets-sync.sh # via env var + +set -euo pipefail + +ENV_FILE="${1:-.env}" +DB_NAME="${2:-${DB_NAME:-constructive-functions-db1}}" + +DB_ID="00000000-0000-0000-0000-000000000000" + +echo "════════════════════════════════════════════════════════════" +echo " Secrets Bidirectional Sync" +echo " .env: $ENV_FILE database: $DB_NAME" +echo "════════════════════════════════════════════════════════════" +echo "" + +# Resolve namespace +NS_ID=$(psql -d "$DB_NAME" -t -A -c " + SELECT id FROM constructive_infra_public.platform_namespaces + WHERE name = 'default' AND database_id = '$DB_ID' + LIMIT 1 +" 2>/dev/null) + +if [ -z "$NS_ID" ]; then + echo "Error: default namespace not found in $DB_NAME." + exit 1 +fi + +# Collect known secret/config names from function definitions +SECRET_NAMES=$(psql -d "$DB_NAME" -t -A -c " + SELECT DISTINCT (r).name FROM constructive_infra_public.platform_function_definitions, + unnest(required_secrets) AS r WHERE is_invocable = true +" 2>/dev/null || echo "") + +CONFIG_NAMES=$(psql -d "$DB_NAME" -t -A -c " + SELECT DISTINCT (r).name FROM constructive_infra_public.platform_function_definitions, + unnest(required_configs) AS r WHERE is_invocable = true +" 2>/dev/null || echo "") + +is_secret() { echo "$SECRET_NAMES" | grep -qx "$1" 2>/dev/null; } +is_config() { echo "$CONFIG_NAMES" | grep -qx "$1" 2>/dev/null; } + +# --- Step 1: .env → DB --- + +declare -A ENV_VARS +SYNCED_TO_DB=0 + +if [ -f "$ENV_FILE" ]; then + while IFS= read -r line; do + [[ "$line" =~ ^[[:space:]]*# ]] && continue + [[ -z "$line" ]] && continue + if [[ "$line" =~ ^([A-Za-z_][A-Za-z0-9_]*)=(.*) ]]; then + key="${BASH_REMATCH[1]}" + val="${BASH_REMATCH[2]}" + val="${val#\"}" + val="${val%\"}" + val="${val#\'}" + val="${val%\'}" + ENV_VARS["$key"]="$val" + fi + done < "$ENV_FILE" + + echo "Loaded ${#ENV_VARS[@]} variable(s) from $ENV_FILE" + + for key in "${!ENV_VARS[@]}"; do + val="${ENV_VARS[$key]}" + [ -z "$val" ] && continue + escaped_val="${val//\'/\'\'}" + + if is_secret "$key"; then + psql -d "$DB_NAME" -q -c " + INSERT INTO constructive_store_private.platform_secrets + (id, name, value, database_id, namespace_id) + VALUES (gen_random_uuid(), '$key', convert_to('$escaped_val', 'UTF8'), '$DB_ID', '$NS_ID') + ON CONFLICT (database_id, namespace_id, name) + DO UPDATE SET value = convert_to('$escaped_val', 'UTF8'), updated_at = now() + " 2>/dev/null && ((SYNCED_TO_DB++)) || true + elif is_config "$key"; then + psql -d "$DB_NAME" -q -c " + INSERT INTO constructive_store_public.platform_config + (id, name, value, namespace_id) + VALUES (gen_random_uuid(), '$key', '$escaped_val', '$NS_ID') + ON CONFLICT (namespace_id, name) + DO UPDATE SET value = '$escaped_val', updated_at = now() + " 2>/dev/null && ((SYNCED_TO_DB++)) || true + fi + done + + echo "→ Synced $SYNCED_TO_DB values from .env → DB" +else + echo "No .env file found at $ENV_FILE (will be created from DB values)" +fi + +# --- Step 2: DB → .env --- + +echo "" +echo "Reading configured values from DB..." + +SYNCED_FROM_DB=0 + +# Read secrets +DB_SECRETS=$(psql -d "$DB_NAME" -t -A -F '|' -c " + SELECT name, convert_from(value, 'UTF8') + FROM constructive_store_private.platform_secrets + WHERE database_id = '$DB_ID' AND value IS NOT NULL + ORDER BY name +" 2>/dev/null || echo "") + +if [ -n "$DB_SECRETS" ]; then + while IFS='|' read -r name value; do + [ -z "$name" ] && continue + if [ -z "${ENV_VARS[$name]+x}" ]; then + ENV_VARS["$name"]="$value" + ((SYNCED_FROM_DB++)) || true + fi + done <<< "$DB_SECRETS" +fi + +# Read configs +DB_CONFIGS=$(psql -d "$DB_NAME" -t -A -F '|' -c " + SELECT name, value + FROM constructive_store_public.platform_config + WHERE value IS NOT NULL AND value != '' + ORDER BY name +" 2>/dev/null || echo "") + +if [ -n "$DB_CONFIGS" ]; then + while IFS='|' read -r name value; do + [ -z "$name" ] && continue + if [ -z "${ENV_VARS[$name]+x}" ]; then + ENV_VARS["$name"]="$value" + ((SYNCED_FROM_DB++)) || true + fi + done <<< "$DB_CONFIGS" +fi + +echo "→ Synced $SYNCED_FROM_DB new values from DB → .env" + +# --- Step 3: Write merged .env --- + +if [ ${#ENV_VARS[@]} -gt 0 ]; then + { + echo "# Auto-generated by secrets-sync — edits here are safe." + echo "# Values can also be edited from http://localhost:5173 → Secrets tab." + echo "" + for key in $(echo "${!ENV_VARS[@]}" | tr ' ' '\n' | sort); do + echo "$key=${ENV_VARS[$key]}" + done + } > "$ENV_FILE" + echo "" + echo "Wrote ${#ENV_VARS[@]} variable(s) to $ENV_FILE" +fi + +echo "" +echo "Done. Total: $SYNCED_TO_DB → DB, $SYNCED_FROM_DB ← DB" diff --git a/scripts/seed-functions.sql b/scripts/seed-functions.sql new file mode 100644 index 00000000..3bdbe9c1 --- /dev/null +++ b/scripts/seed-functions.sql @@ -0,0 +1,44 @@ +-- Seed platform function definitions for local development. +-- Run after deploying the constructive-infra pgpm package. +-- +-- Usage: +-- psql -d constructive-functions-db1 -f scripts/seed-functions.sql + +BEGIN; + +INSERT INTO constructive_infra_public.platform_function_definitions + (id, name, task_identifier, service_url, is_invocable, is_built_in, max_attempts, priority, queue_name, scope, description, created_at, updated_at) +VALUES + ( + gen_random_uuid(), + 'send-email', + 'send-email', + 'http://localhost:8081', + true, + true, + 3, + 0, + 'default', + 'platform', + 'Sends transactional emails via Mailgun or SMTP', + now(), + now() + ), + ( + gen_random_uuid(), + 'send-verification-link', + 'send-verification-link', + 'http://localhost:8082', + true, + true, + 3, + 0, + 'default', + 'platform', + 'Sends invite, password reset, and verification emails', + now(), + now() + ) +ON CONFLICT DO NOTHING; + +COMMIT; diff --git a/scripts/setup-platform-db.sh b/scripts/setup-platform-db.sh new file mode 100755 index 00000000..029283dc --- /dev/null +++ b/scripts/setup-platform-db.sh @@ -0,0 +1,55 @@ +#!/usr/bin/env bash +# +# setup-platform-db.sh — deploy constructive-infra + constructive-infra-seed +# +# Works with both Tier 1 (pgpm-local) and Tier 2 (compose-local). +# Creates the database, bootstraps pgpm roles, deploys the infra schema, +# then deploys the seed package (built-in function definitions). +# +# Usage: +# ./scripts/setup-platform-db.sh # defaults to constructive-functions-db1 +# ./scripts/setup-platform-db.sh my-custom-db-name # custom database name +# DB_NAME=my-db ./scripts/setup-platform-db.sh # via env var + +set -euo pipefail + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +ROOT_DIR="$(cd "$SCRIPT_DIR/.." && pwd)" + +DB_NAME="${1:-${DB_NAME:-constructive-functions-db1}}" + +echo "════════════════════════════════════════════════════════════" +echo " Platform DB Setup: $DB_NAME" +echo "════════════════════════════════════════════════════════════" +echo "" + +# --- Create database --- +echo "→ Creating database '$DB_NAME'..." +createdb "$DB_NAME" 2>/dev/null && echo " Created." || echo " Already exists." + +# --- Bootstrap pgpm admin users --- +echo "→ Bootstrapping pgpm admin users..." +pgpm admin-users bootstrap --yes 2>/dev/null || true + +# --- Deploy constructive-infra (DDL: schemas, tables, triggers) --- +echo "→ Deploying constructive-infra..." +cd "$ROOT_DIR/pgpm" +pgpm deploy --yes --database "$DB_NAME" --package constructive-infra + +# --- Deploy constructive-infra-seed (built-in function definitions) --- +echo "→ Deploying constructive-infra-seed..." +pgpm deploy --yes --database "$DB_NAME" --package constructive-infra-seed + +# --- Verify --- +echo "" +echo "→ Verifying..." +FUNCTION_COUNT=$(psql -d "$DB_NAME" -t -A -c \ + "SELECT count(*) FROM constructive_infra_public.platform_function_definitions WHERE is_invocable = true") +echo " $FUNCTION_COUNT invocable function(s) registered." + +echo "" +echo "════════════════════════════════════════════════════════════" +echo " Done. Database '$DB_NAME' is ready." +echo "" +echo " Next: make dev-compute" +echo "════════════════════════════════════════════════════════════" diff --git a/scripts/status.sh b/scripts/status.sh new file mode 100755 index 00000000..51b8f078 --- /dev/null +++ b/scripts/status.sh @@ -0,0 +1,139 @@ +#!/usr/bin/env bash +# +# status.sh — Show the current state of the development environment. +# +# Usage: +# make status +# ./scripts/status.sh + +set -uo pipefail + +RED='\033[0;31m' +GREEN='\033[0;32m' +YELLOW='\033[0;33m' +BOLD='\033[1m' +NC='\033[0m' + +ok() { echo -e " ${GREEN}✓${NC} $1"; } +warn() { echo -e " ${YELLOW}●${NC} $1"; } +fail() { echo -e " ${RED}✗${NC} $1"; } + +echo "" +echo -e "${BOLD}═══ Environment Status ═══${NC}" +echo "" + +# --- Docker containers --- +echo -e "${BOLD}Docker containers:${NC}" +if command -v docker &>/dev/null; then + POSTGRES_UP=$(docker ps --filter "name=postgres" --filter "status=running" --format "{{.Names}}" 2>/dev/null | head -1) + MINIO_UP=$(docker ps --filter "name=minio" --filter "status=running" --format "{{.Names}}" 2>/dev/null | head -1) + + if [ -n "$POSTGRES_UP" ]; then + ok "PostgreSQL running ($POSTGRES_UP)" + else + fail "PostgreSQL not running" + fi + + if [ -n "$MINIO_UP" ]; then + ok "MinIO running ($MINIO_UP)" + else + warn "MinIO not running (optional)" + fi + + MAILPIT_UP=$(docker ps --filter "name=mailpit" --filter "status=running" --format "{{.Names}}" 2>/dev/null | head -1) + if [ -n "$MAILPIT_UP" ]; then + ok "Mailpit running ($MAILPIT_UP) — SMTP :1025, UI http://localhost:8025" + else + warn "Mailpit not running (start with: make up:email-job)" + fi +else + fail "Docker not available" +fi + +echo "" + +# --- PostgreSQL connection --- +echo -e "${BOLD}PostgreSQL:${NC}" +if command -v psql &>/dev/null; then + PG_VERSION=$(psql -t -A -c "SELECT version()" 2>/dev/null | head -1) + if [ -n "$PG_VERSION" ]; then + ok "Connected — ${PG_VERSION%%,*}" + else + fail "Cannot connect (check PGHOST/PGPORT/PGUSER or run: eval \"\$(pgpm env)\")" + fi +else + fail "psql not found" +fi + +echo "" + +# --- Databases --- +echo -e "${BOLD}Databases with constructive_infra_public:${NC}" +if command -v psql &>/dev/null; then + DBS=$(psql -t -A -c "SELECT datname FROM pg_database WHERE datistemplate = false ORDER BY datname" 2>/dev/null) + FOUND=0 + for db in $DBS; do + HAS_INFRA=$(psql -d "$db" -t -A -c "SELECT 1 FROM information_schema.schemata WHERE schema_name = 'constructive_infra_public'" 2>/dev/null) + if [ "$HAS_INFRA" = "1" ]; then + FN_COUNT=$(psql -d "$db" -t -A -c "SELECT count(*) FROM constructive_infra_public.platform_function_definitions WHERE is_invocable = true" 2>/dev/null || echo "?") + JOBS_SCHEMA=$(psql -d "$db" -t -A -c "SELECT 1 FROM information_schema.schemata WHERE schema_name = 'app_jobs'" 2>/dev/null) + JOBS_STATUS="" + if [ "$JOBS_SCHEMA" = "1" ]; then + JOBS_STATUS="jobs=yes" + else + JOBS_STATUS="jobs=no" + fi + ok "$db — ${FN_COUNT} invocable fn(s), ${JOBS_STATUS}" + FOUND=1 + fi + done + if [ "$FOUND" = "0" ]; then + warn "No databases with constructive_infra_public found" + echo " Run: make setup-platform" + fi +fi + +echo "" + +# --- Node / pnpm --- +echo -e "${BOLD}Node.js:${NC}" +if command -v node &>/dev/null; then + ok "node $(node --version)" +else + fail "node not found" +fi +if command -v pnpm &>/dev/null; then + ok "pnpm $(pnpm --version)" +else + fail "pnpm not found" +fi +if command -v pgpm &>/dev/null; then + ok "pgpm $(pgpm --version 2>/dev/null || echo '?')" +else + fail "pgpm not found (npm install -g pgpm)" +fi + +echo "" + +# --- Build state --- +echo -e "${BOLD}Build:${NC}" +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +ROOT_DIR="$(cd "$SCRIPT_DIR/.." && pwd)" + +if [ -d "$ROOT_DIR/job/compute-worker/dist" ]; then + ok "compute-worker built" +else + warn "compute-worker not built (run: pnpm build)" +fi +if [ -d "$ROOT_DIR/job/compute-service/dist" ]; then + ok "compute-service built" +else + warn "compute-service not built (run: pnpm build)" +fi +if [ -d "$ROOT_DIR/job/service/dist" ]; then + ok "job-service built" +else + warn "job-service not built (run: pnpm build)" +fi + +echo "" diff --git a/scripts/up.sh b/scripts/up.sh new file mode 100755 index 00000000..83148634 --- /dev/null +++ b/scripts/up.sh @@ -0,0 +1,228 @@ +#!/usr/bin/env bash +# +# up.sh — Full procedural setup for the platform development environment. +# +# Steps: +# 1. Check prerequisites (docker, node, pnpm, pgpm) +# 2. Start PostgreSQL via pgpm docker +# 3. Bootstrap pgpm admin users +# 4. Create database + deploy all pgpm modules +# 5. Deploy constructive-infra-seed (function + secret definitions) +# 6. Start MinIO (object storage) +# 7. Verify everything +# 8. Check .env coverage (if .env exists) +# +# Usage: +# make up # defaults to constructive-functions-db1 +# make up DB_NAME=mydb # custom database name +# ./scripts/up.sh [db-name] + +set -euo pipefail + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +ROOT_DIR="$(cd "$SCRIPT_DIR/.." && pwd)" + +DB_NAME="${1:-${DB_NAME:-constructive-functions-db1}}" + +RED='\033[0;31m' +GREEN='\033[0;32m' +YELLOW='\033[0;33m' +BOLD='\033[1m' +NC='\033[0m' + +step() { echo ""; echo -e "${BOLD}[$1/${TOTAL_STEPS}] $2${NC}"; } +ok() { echo -e " ${GREEN}✓${NC} $1"; } +warn() { echo -e " ${YELLOW}●${NC} $1"; } +fail() { echo -e " ${RED}✗${NC} $1"; } + +TOTAL_STEPS=8 + +echo "" +echo -e "${BOLD}════════════════════════════════════════════════════════════${NC}" +echo -e "${BOLD} Platform Up — $DB_NAME${NC}" +echo -e "${BOLD}════════════════════════════════════════════════════════════${NC}" + +# ─── Step 1: Prerequisites ─────────────────────────────────────────────────── + +step 1 "Checking prerequisites" + +MISSING=0 +for cmd in docker node pnpm pgpm psql; do + if command -v "$cmd" &>/dev/null; then + ok "$cmd found" + else + fail "$cmd not found" + MISSING=1 + fi +done + +if [ "$MISSING" = "1" ]; then + echo "" + fail "Missing prerequisites. Install them and re-run." + exit 1 +fi + +# ─── Step 2: PostgreSQL ───────────────────────────────────────────────────── + +step 2 "Starting PostgreSQL" + +POSTGRES_UP=$(docker ps --filter "name=postgres" --filter "status=running" --format "{{.Names}}" 2>/dev/null | head -1) + +if [ -n "$POSTGRES_UP" ]; then + ok "Already running ($POSTGRES_UP)" +else + echo " Starting via pgpm docker..." + pgpm docker start --image docker.io/constructiveio/postgres-plus:18 + ok "PostgreSQL started" +fi + +# Load pgpm env for psql access +eval "$(pgpm env 2>/dev/null)" || true + +# Wait for PG to be ready +echo " Waiting for PostgreSQL to accept connections..." +for i in $(seq 1 30); do + if psql -c "SELECT 1" &>/dev/null; then + ok "PostgreSQL is ready" + break + fi + if [ "$i" = "30" ]; then + fail "PostgreSQL did not become ready in 30s" + exit 1 + fi + sleep 1 +done + +# ─── Step 3: Bootstrap ────────────────────────────────────────────────────── + +step 3 "Bootstrapping pgpm admin users" + +pgpm admin-users bootstrap --yes 2>/dev/null && ok "Roles bootstrapped" || ok "Roles already exist" + +# ─── Step 4: Deploy all pgpm modules ──────────────────────────────────────── + +step 4 "Deploying pgpm modules" + +createdb "$DB_NAME" 2>/dev/null && ok "Database '$DB_NAME' created" || ok "Database '$DB_NAME' already exists" + +cd "$ROOT_DIR/pgpm" + +# Deploy order matters: downstream modules depend on upstream ones. +# +# constructive-infra (standalone — namespaces, function defs, invocations) +# constructive-store (depends on infra — encrypted secrets, config, user state) +# constructive-objects (standalone — content-addressable merkle store) +# constructive-fbp (standalone — flow graphs, graph-specific merkle store) +# constructive-storage (standalone — file uploads, buckets, versioning) + +MODULES=( + constructive-infra + constructive-store + constructive-objects + constructive-fbp + constructive-storage +) + +DEPLOY_LOG="$ROOT_DIR/.deploy-log" + +for mod in "${MODULES[@]}"; do + if [ -d "$mod" ]; then + DEPLOY_RC=0 + pgpm deploy --yes --database "$DB_NAME" --package "$mod" > "$DEPLOY_LOG" 2>&1 || DEPLOY_RC=$? + if [ $DEPLOY_RC -eq 0 ] && grep -q "Deployment complete" "$DEPLOY_LOG"; then + ok "$mod" + elif grep -q "already" "$DEPLOY_LOG" && [ $DEPLOY_RC -eq 0 ]; then + ok "$mod (already deployed)" + else + fail "$mod — deploy output:" + sed 's/^/ /' "$DEPLOY_LOG" + fi + else + warn "$mod (not found, skipping)" + fi +done + +rm -f "$DEPLOY_LOG" + +# ─── Step 5: Deploy constructive-infra-seed ────────────────────────────────── + +step 5 "Deploying constructive-infra-seed (function + secret definitions)" + +SEED_RC=0 +pgpm deploy --yes --database "$DB_NAME" --package constructive-infra-seed > "$DEPLOY_LOG" 2>&1 || SEED_RC=$? +if [ $SEED_RC -eq 0 ]; then + ok "constructive-infra-seed deployed" +else + fail "constructive-infra-seed — deploy output:" + sed 's/^/ /' "$DEPLOY_LOG" +fi +rm -f "$DEPLOY_LOG" + +cd "$ROOT_DIR" + +# ─── Step 6: Start MinIO ──────────────────────────────────────────────────── + +step 6 "Starting MinIO (object storage)" + +MINIO_UP=$(docker ps --filter "name=minio" --filter "status=running" --format "{{.Names}}" 2>/dev/null | head -1) + +if [ -n "$MINIO_UP" ]; then + ok "Already running ($MINIO_UP)" +else + # Start MinIO via docker (detached) + docker run -d \ + --name constructive-functions-minio \ + -p 9000:9000 \ + -p 9001:9001 \ + -e MINIO_ROOT_USER=minioadmin \ + -e MINIO_ROOT_PASSWORD=minioadmin \ + -v minio-data:/data \ + minio/minio:latest server /data --console-address ":9001" \ + 2>/dev/null && ok "MinIO started" || ok "MinIO already exists" +fi + +echo " API: http://localhost:9000" +echo " Console: http://localhost:9001 (minioadmin/minioadmin)" + +# ─── Step 7: Verify ───────────────────────────────────────────────────────── + +step 7 "Verifying platform" + +"$SCRIPT_DIR/verify-platform.sh" "$DB_NAME" + +# ─── Step 8: Check .env ───────────────────────────────────────────────────── + +step 8 "Loading .env into platform" + +if [ -f "$ROOT_DIR/.env" ]; then + "$SCRIPT_DIR/load-platform-env.sh" "$ROOT_DIR/.env" "$DB_NAME" || true +else + warn "No .env file found — secrets/configs not loaded." + echo " cp .env.example .env" + echo " # Then re-run: make up" +fi + +# ─── Done ──────────────────────────────────────────────────────────────────── + +echo "" +echo -e "${BOLD}════════════════════════════════════════════════════════════${NC}" +echo -e "${GREEN}${BOLD} Platform is up. Database: $DB_NAME${NC}" +echo "" +echo -e " ${BOLD}Modules:${NC}" +for mod in "${MODULES[@]}"; do + if [ -d "$ROOT_DIR/pgpm/$mod" ]; then + echo " ✓ $mod" + fi +done +echo "" +echo -e " ${BOLD}Services:${NC}" +echo " PostgreSQL localhost:5432" +echo " MinIO API http://localhost:9000" +echo " MinIO Console http://localhost:9001" +echo "" +echo -e " ${BOLD}Next:${NC}" +echo " make up:email-job # start mailpit + compute-service" +echo " make dev-compute # start compute-service only" +echo " make status # show environment state" +echo -e "${BOLD}════════════════════════════════════════════════════════════${NC}" +echo "" diff --git a/scripts/verify-platform.sh b/scripts/verify-platform.sh new file mode 100755 index 00000000..5c4aa302 --- /dev/null +++ b/scripts/verify-platform.sh @@ -0,0 +1,130 @@ +#!/usr/bin/env bash +# +# verify-platform.sh — Verify the platform DB is correctly set up. +# +# Checks that constructive-infra is deployed, app_jobs schema exists, +# and function definitions are seeded. Exits non-zero if anything is wrong. +# +# Usage: +# make verify-platform # uses default DB +# make verify-platform DB_NAME=my-db # custom DB +# ./scripts/verify-platform.sh [db-name] + +set -uo pipefail + +RED='\033[0;31m' +GREEN='\033[0;32m' +BOLD='\033[1m' +NC='\033[0m' + +DB_NAME="${1:-${DB_NAME:-constructive-functions-db1}}" +ERRORS=0 + +ok() { echo -e " ${GREEN}✓${NC} $1"; } +fail() { echo -e " ${RED}✗${NC} $1"; ERRORS=$((ERRORS + 1)); } + +echo "" +echo -e "${BOLD}═══ Verify Platform: $DB_NAME ═══${NC}" +echo "" + +# --- Database exists --- +if psql -d "$DB_NAME" -c "SELECT 1" &>/dev/null; then + ok "Database '$DB_NAME' exists and is reachable" +else + fail "Database '$DB_NAME' does not exist or is not reachable" + echo "" + echo " Fix: make setup-platform DB_NAME=$DB_NAME" + echo " (or: pgpm docker start --image docker.io/constructiveio/postgres-plus:18)" + exit 1 +fi + +# --- All module schemas --- +SCHEMAS_TO_CHECK=( + constructive_infra_public + constructive_store_public + constructive_store_private + constructive_objects_public + constructive_objects_private + constructive_fbp_public + constructive_fbp_private + constructive_storage_public + constructive_storage_private + constructive_private +) + +for schema in "${SCHEMAS_TO_CHECK[@]}"; do + HAS_SCHEMA=$(psql -d "$DB_NAME" -t -A -c "SELECT 1 FROM information_schema.schemata WHERE schema_name = '$schema'" 2>/dev/null) + if [ "$HAS_SCHEMA" = "1" ]; then + ok "Schema $schema exists" + else + fail "Schema $schema missing" + fi +done + +# --- app_jobs schema --- +HAS_JOBS=$(psql -d "$DB_NAME" -t -A -c "SELECT 1 FROM information_schema.schemata WHERE schema_name = 'app_jobs'" 2>/dev/null) +if [ "$HAS_JOBS" = "1" ]; then + ok "Schema app_jobs exists" +else + fail "Schema app_jobs missing (should be deployed as dependency of constructive-infra)" +fi + +# --- platform_function_definitions table --- +HAS_TABLE=$(psql -d "$DB_NAME" -t -A -c "SELECT 1 FROM information_schema.tables WHERE table_schema = 'constructive_infra_public' AND table_name = 'platform_function_definitions'" 2>/dev/null) +if [ "$HAS_TABLE" = "1" ]; then + ok "Table platform_function_definitions exists" +else + fail "Table platform_function_definitions missing" +fi + +# --- platform_function_invocations table --- +HAS_INV=$(psql -d "$DB_NAME" -t -A -c "SELECT 1 FROM information_schema.tables WHERE table_schema = 'constructive_infra_public' AND table_name = 'platform_function_invocations'" 2>/dev/null) +if [ "$HAS_INV" = "1" ]; then + ok "Table platform_function_invocations exists" +else + fail "Table platform_function_invocations missing" +fi + +# --- Seeded functions --- +if [ "$HAS_TABLE" = "1" ]; then + FN_COUNT=$(psql -d "$DB_NAME" -t -A -c "SELECT count(*) FROM constructive_infra_public.platform_function_definitions WHERE is_invocable = true" 2>/dev/null) + if [ "$FN_COUNT" -gt 0 ] 2>/dev/null; then + ok "$FN_COUNT invocable function(s) registered:" + psql -d "$DB_NAME" -t -A -c "SELECT ' ' || name || ' → ' || COALESCE(service_url, '(no url)') FROM constructive_infra_public.platform_function_definitions WHERE is_invocable = true ORDER BY name" 2>/dev/null + else + fail "No invocable functions seeded (re-deploy to seed)" + echo " Fix: cd pgpm && pgpm deploy --yes --database $DB_NAME --package constructive-infra" + fi +fi + +# --- Secrets loaded (constructive_store_private.platform_secrets) --- +SEC_COUNT=$(psql -d "$DB_NAME" -t -A -c "SELECT count(*) FROM constructive_store_private.platform_secrets WHERE value IS NOT NULL" 2>/dev/null || echo "0") +if [ "$SEC_COUNT" -gt 0 ] 2>/dev/null; then + ok "$SEC_COUNT platform secret(s) loaded from .env" +else + ok "0 platform secrets loaded (run load-platform-env.sh to sync .env)" +fi + +# --- Configs loaded (constructive_store_public.platform_config) --- +CFG_COUNT=$(psql -d "$DB_NAME" -t -A -c "SELECT count(*) FROM constructive_store_public.platform_config WHERE value IS NOT NULL AND value != ''" 2>/dev/null || echo "0") +if [ "$CFG_COUNT" -gt 0 ] 2>/dev/null; then + ok "$CFG_COUNT platform config(s) loaded from .env" +else + ok "0 platform configs loaded (run load-platform-env.sh to sync .env)" +fi + +# --- jobs table --- +if [ "$HAS_JOBS" = "1" ]; then + JOB_COUNT=$(psql -d "$DB_NAME" -t -A -c "SELECT count(*) FROM app_jobs.jobs" 2>/dev/null) + ok "$JOB_COUNT pending job(s) in queue" +fi + +echo "" +if [ "$ERRORS" -gt 0 ]; then + echo -e "${RED}${BOLD}$ERRORS issue(s) found.${NC} See fixes above." + exit 1 +else + echo -e "${GREEN}${BOLD}All checks passed.${NC} Platform is ready." + echo " Next: make dev-compute" +fi +echo "" diff --git a/scripts/www-up.sh b/scripts/www-up.sh new file mode 100755 index 00000000..d7b8e99e --- /dev/null +++ b/scripts/www-up.sh @@ -0,0 +1,65 @@ +#!/usr/bin/env bash +set -euo pipefail + +DB_NAME="${1:-constructive-functions-db1}" + +echo "" +echo "════════════════════════════════════════════════════════════" +echo " Platform UI — $DB_NAME" +echo "════════════════════════════════════════════════════════════" +echo "" + +# ── 1. Check platform ──────────────────────────────────────────────────────── + +echo "[1/3] Checking platform" +eval "$(pgpm env 2>/dev/null || true)" +export PGDATABASE="$DB_NAME" + +if psql -d "$DB_NAME" -c "SELECT 1" &>/dev/null; then + echo " ✓ Platform is up ($DB_NAME)" +else + echo " ✗ Cannot connect to database '$DB_NAME'" + echo " Run: make up DB_NAME=$DB_NAME" + exit 1 +fi + +# ── 2. Install deps if needed ──────────────────────────────────────────────── + +echo "" +echo "[2/3] Checking dependencies" +if [ ! -d "www/node_modules" ]; then + echo " Installing www/ dependencies..." + pnpm install --filter @constructive-io/platform-ui + echo " ✓ Dependencies installed" +else + echo " ✓ Dependencies present" +fi + +# ── 3. Start ───────────────────────────────────────────────────────────────── + +echo "" +echo "[3/3] Starting Platform UI" +echo "" +echo "════════════════════════════════════════════════════════════" +echo " Services:" +echo " Vite (frontend) http://localhost:5173" +echo " Express (API + WebSocket) http://localhost:3456" +echo " Terminal WebSocket ws://localhost:3456/ws/terminal" +echo "" +echo " API Endpoints:" +echo " GET /api/status Platform status" +echo " GET /api/functions Function definitions" +echo " GET /api/secrets Secret definitions" +echo " GET /api/jobs Recent jobs" +echo " POST /api/jobs Create a job" +echo " GET /api/invocations Function invocations" +echo " POST /api/run Execute make commands" +echo "" +echo " Database: $DB_NAME" +echo "════════════════════════════════════════════════════════════" +echo "" +echo " Ctrl+C to stop" +echo "" + +export PROJECT_ROOT="$(pwd)" +cd www && pnpm dev diff --git a/www/index.html b/www/index.html new file mode 100644 index 00000000..9ff5062e --- /dev/null +++ b/www/index.html @@ -0,0 +1,12 @@ + + + + + + Constructive Platform + + +
+ + + diff --git a/www/package.json b/www/package.json new file mode 100644 index 00000000..1eecbe08 --- /dev/null +++ b/www/package.json @@ -0,0 +1,40 @@ +{ + "name": "@constructive-io/platform-ui", + "version": "0.1.0", + "private": true, + "type": "module", + "scripts": { + "dev": "concurrently -n server,vite -c blue,green \"node --experimental-strip-types server/index.ts\" \"vite\"", + "dev:server": "node --experimental-strip-types server/index.ts", + "dev:client": "vite", + "build": "vite build", + "preview": "vite preview" + }, + "dependencies": { + "@xterm/addon-fit": "^0.10.0", + "@xterm/xterm": "^5.5.0", + "@xyflow/react": "^12.11.0", + "commander": "^15.0.0", + "express": "^4.21.0", + "kubernetesjs": "^0.7.7", + "lucide-react": "^0.525.0", + "pg": "^8.13.0", + "react": "^19.0.0", + "react-dom": "^19.0.0", + "ws": "^8.18.0" + }, + "devDependencies": { + "@tailwindcss/vite": "^4.1.0", + "@types/express": "^5.0.0", + "@types/node": "^22.0.0", + "@types/pg": "^8.11.0", + "@types/react": "^19.0.0", + "@types/react-dom": "^19.0.0", + "@types/ws": "^8.5.0", + "@vitejs/plugin-react": "^4.3.0", + "concurrently": "^9.1.0", + "tailwindcss": "^4.1.0", + "typescript": "^5.7.0", + "vite": "^6.0.0" + } +} diff --git a/www/pnpm-lock.yaml b/www/pnpm-lock.yaml new file mode 100644 index 00000000..d7ff3888 --- /dev/null +++ b/www/pnpm-lock.yaml @@ -0,0 +1,2670 @@ +lockfileVersion: '9.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +importers: + + .: + dependencies: + '@xterm/addon-fit': + specifier: ^0.10.0 + version: 0.10.0(@xterm/xterm@5.5.0) + '@xterm/xterm': + specifier: ^5.5.0 + version: 5.5.0 + '@xyflow/react': + specifier: ^12.11.0 + version: 12.11.0(@types/react-dom@19.2.3(@types/react@19.2.17))(@types/react@19.2.17)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) + commander: + specifier: ^15.0.0 + version: 15.0.0 + express: + specifier: ^4.21.0 + version: 4.22.2 + kubernetesjs: + specifier: ^0.7.7 + version: 0.7.7 + lucide-react: + specifier: ^0.525.0 + version: 0.525.0(react@19.2.7) + pg: + specifier: ^8.13.0 + version: 8.21.0 + react: + specifier: ^19.0.0 + version: 19.2.7 + react-dom: + specifier: ^19.0.0 + version: 19.2.7(react@19.2.7) + ws: + specifier: ^8.18.0 + version: 8.21.0 + devDependencies: + '@tailwindcss/vite': + specifier: ^4.1.0 + version: 4.3.0(vite@6.4.3(@types/node@22.19.20)(jiti@2.7.0)(lightningcss@1.32.0)) + '@types/express': + specifier: ^5.0.0 + version: 5.0.6 + '@types/node': + specifier: ^22.0.0 + version: 22.19.20 + '@types/pg': + specifier: ^8.11.0 + version: 8.20.0 + '@types/react': + specifier: ^19.0.0 + version: 19.2.17 + '@types/react-dom': + specifier: ^19.0.0 + version: 19.2.3(@types/react@19.2.17) + '@types/ws': + specifier: ^8.5.0 + version: 8.18.1 + '@vitejs/plugin-react': + specifier: ^4.3.0 + version: 4.7.0(vite@6.4.3(@types/node@22.19.20)(jiti@2.7.0)(lightningcss@1.32.0)) + concurrently: + specifier: ^9.1.0 + version: 9.2.1 + tailwindcss: + specifier: ^4.1.0 + version: 4.3.0 + typescript: + specifier: ^5.7.0 + version: 5.9.3 + vite: + specifier: ^6.0.0 + version: 6.4.3(@types/node@22.19.20)(jiti@2.7.0)(lightningcss@1.32.0) + +packages: + + '@babel/code-frame@7.29.7': + resolution: {integrity: sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw==} + engines: {node: '>=6.9.0'} + + '@babel/compat-data@7.29.7': + resolution: {integrity: sha512-locTkQyKvwIEgBzVrn8693ebc97F2U8ZHjbXwDXJ5Fn2TCpNwTlKcaKLkdHop5c/icOFE7qt7Q9JC5hnKNa6Gg==} + engines: {node: '>=6.9.0'} + + '@babel/core@7.29.7': + resolution: {integrity: sha512-RgHBCvtjbOK2gXSNBNIkNoEc9qoVEtau3hj8gEqKQuL3HZAibKarWFEI3Lfm6EYKkLalOh8eSrj9b+ch9H/VBA==} + engines: {node: '>=6.9.0'} + + '@babel/generator@7.29.7': + resolution: {integrity: sha512-DkXD5OJQaAQIdZ1bt3UZdEnHAn9Imd3IVBdX03UFe+ony9Ojw5pzr9YVKGDY1jt+Gcn/FnGkNf8r+Vj5NOJWtQ==} + engines: {node: '>=6.9.0'} + + '@babel/helper-compilation-targets@7.29.7': + resolution: {integrity: sha512-wem6WaBj4NaVYVdNhLPPVacES6ZJ+KBBfSkTMD3YZxbP3rm3Di85tJU5ljaUNhaOynt+Aj0xruhYuzQBt8n71g==} + engines: {node: '>=6.9.0'} + + '@babel/helper-globals@7.29.7': + resolution: {integrity: sha512-3nQVUAtvkKH9zahfWgw96Jc/uFOmjACE1kQz82E2lqWmHBgjzbNlsC22nuQTfahmWeQtTq5nQ/4Nnd2A1wj4zA==} + engines: {node: '>=6.9.0'} + + '@babel/helper-module-imports@7.29.7': + resolution: {integrity: sha512-ejHwrQQYcm9xnTivShn2IDOlIzInN34AXskvq9QicvCtEzq1Vzclu/tKF8Jq1Cg8JG2GL6/EmjgsCT7lXepE3g==} + engines: {node: '>=6.9.0'} + + '@babel/helper-module-transforms@7.29.7': + resolution: {integrity: sha512-UPUVSyXbOh627KiCIGQSgwWzGeBKLkaJ9PJEdrngIwMSzxLR4jS4+f1f1jb7VzBbg8nFLaYotvVPFCTqdrmTAg==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + + '@babel/helper-plugin-utils@7.29.7': + resolution: {integrity: sha512-G7sHYigPY17oO5SYWnfD/0MTBwVR781S/JI643e/JhUYgVgWE/61SoW3NH9KWUKyKq5LVh3npif99Wkt6j86Jw==} + engines: {node: '>=6.9.0'} + + '@babel/helper-string-parser@7.29.7': + resolution: {integrity: sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw==} + engines: {node: '>=6.9.0'} + + '@babel/helper-validator-identifier@7.29.7': + resolution: {integrity: sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==} + engines: {node: '>=6.9.0'} + + '@babel/helper-validator-option@7.29.7': + resolution: {integrity: sha512-N9ZErrD+yW5geCDtBqnOoxmR8+tNKiGuxKlDpuJxfsqpa2dFcexaziGAE/qoHLiDDreVNMupxGmSoNlyvsA3gw==} + engines: {node: '>=6.9.0'} + + '@babel/helpers@7.29.7': + resolution: {integrity: sha512-1k2lAGRMfHTcwuNYcCNUmaUffmQv8KWMfh2iJUUeRlwlwH4FdNG7mfPI10NPfLHJFThE4Tyr4mv7kTNZOiPuBg==} + engines: {node: '>=6.9.0'} + + '@babel/parser@7.29.7': + resolution: {integrity: sha512-hnORnjP/1P/zFEndoeX+n+t1RwWRJiJpM/jO7FW32Kn9r5+sJB2JWOdYo4L6k78j15eCwY3Gm/7364B1EMwtNg==} + engines: {node: '>=6.0.0'} + hasBin: true + + '@babel/plugin-transform-react-jsx-self@7.29.7': + resolution: {integrity: sha512-TL0hMc9xzy86VD31nUiwzd5otRAcyEPcsegCxolO0PvcXuH1v0kECe/UIznYFihpkvU5wg/jk4v0TTEFfm53fw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-transform-react-jsx-source@7.29.7': + resolution: {integrity: sha512-06IyK09H3wi4cGbhDBwp5gUGo0IKtnYa8tyTiephirPCK6fbobVGiXMMI5zLQ4aKEYP3wZ3ArU44o+8KMrSG/Q==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/template@7.29.7': + resolution: {integrity: sha512-puq+Gf35oI24FeN11LkoUQFqv9uwNeWpxXZi/Ji3rRIoKAzKnxRaZ+Gkj0vKS9ZCiTESfng1N9LyOyXvo+m+Gg==} + engines: {node: '>=6.9.0'} + + '@babel/traverse@7.29.7': + resolution: {integrity: sha512-EhlfNQtZ+NK22w5BM61ciuiq1m58ed33Wr1Xan//ZRTy6hgjnwyCffRYwzsGXdASJSUJ1guZILsErh1eQcl+zw==} + engines: {node: '>=6.9.0'} + + '@babel/types@7.29.7': + resolution: {integrity: sha512-4zBIxpPzowiZpusoFkyGVwakdRJUyuH5PxQ/PrqghfdFWWasvnCdPfQXHrenDai+gyLARulZjZowCOj6fjT4pA==} + engines: {node: '>=6.9.0'} + + '@esbuild/aix-ppc64@0.25.12': + resolution: {integrity: sha512-Hhmwd6CInZ3dwpuGTF8fJG6yoWmsToE+vYgD4nytZVxcu1ulHpUQRAB1UJ8+N1Am3Mz4+xOByoQoSZf4D+CpkA==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [aix] + + '@esbuild/android-arm64@0.25.12': + resolution: {integrity: sha512-6AAmLG7zwD1Z159jCKPvAxZd4y/VTO0VkprYy+3N2FtJ8+BQWFXU+OxARIwA46c5tdD9SsKGZ/1ocqBS/gAKHg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [android] + + '@esbuild/android-arm@0.25.12': + resolution: {integrity: sha512-VJ+sKvNA/GE7Ccacc9Cha7bpS8nyzVv0jdVgwNDaR4gDMC/2TTRc33Ip8qrNYUcpkOHUT5OZ0bUcNNVZQ9RLlg==} + engines: {node: '>=18'} + cpu: [arm] + os: [android] + + '@esbuild/android-x64@0.25.12': + resolution: {integrity: sha512-5jbb+2hhDHx5phYR2By8GTWEzn6I9UqR11Kwf22iKbNpYrsmRB18aX/9ivc5cabcUiAT/wM+YIZ6SG9QO6a8kg==} + engines: {node: '>=18'} + cpu: [x64] + os: [android] + + '@esbuild/darwin-arm64@0.25.12': + resolution: {integrity: sha512-N3zl+lxHCifgIlcMUP5016ESkeQjLj/959RxxNYIthIg+CQHInujFuXeWbWMgnTo4cp5XVHqFPmpyu9J65C1Yg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [darwin] + + '@esbuild/darwin-x64@0.25.12': + resolution: {integrity: sha512-HQ9ka4Kx21qHXwtlTUVbKJOAnmG1ipXhdWTmNXiPzPfWKpXqASVcWdnf2bnL73wgjNrFXAa3yYvBSd9pzfEIpA==} + engines: {node: '>=18'} + cpu: [x64] + os: [darwin] + + '@esbuild/freebsd-arm64@0.25.12': + resolution: {integrity: sha512-gA0Bx759+7Jve03K1S0vkOu5Lg/85dou3EseOGUes8flVOGxbhDDh/iZaoek11Y8mtyKPGF3vP8XhnkDEAmzeg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [freebsd] + + '@esbuild/freebsd-x64@0.25.12': + resolution: {integrity: sha512-TGbO26Yw2xsHzxtbVFGEXBFH0FRAP7gtcPE7P5yP7wGy7cXK2oO7RyOhL5NLiqTlBh47XhmIUXuGciXEqYFfBQ==} + engines: {node: '>=18'} + cpu: [x64] + os: [freebsd] + + '@esbuild/linux-arm64@0.25.12': + resolution: {integrity: sha512-8bwX7a8FghIgrupcxb4aUmYDLp8pX06rGh5HqDT7bB+8Rdells6mHvrFHHW2JAOPZUbnjUpKTLg6ECyzvas2AQ==} + engines: {node: '>=18'} + cpu: [arm64] + os: [linux] + + '@esbuild/linux-arm@0.25.12': + resolution: {integrity: sha512-lPDGyC1JPDou8kGcywY0YILzWlhhnRjdof3UlcoqYmS9El818LLfJJc3PXXgZHrHCAKs/Z2SeZtDJr5MrkxtOw==} + engines: {node: '>=18'} + cpu: [arm] + os: [linux] + + '@esbuild/linux-ia32@0.25.12': + resolution: {integrity: sha512-0y9KrdVnbMM2/vG8KfU0byhUN+EFCny9+8g202gYqSSVMonbsCfLjUO+rCci7pM0WBEtz+oK/PIwHkzxkyharA==} + engines: {node: '>=18'} + cpu: [ia32] + os: [linux] + + '@esbuild/linux-loong64@0.25.12': + resolution: {integrity: sha512-h///Lr5a9rib/v1GGqXVGzjL4TMvVTv+s1DPoxQdz7l/AYv6LDSxdIwzxkrPW438oUXiDtwM10o9PmwS/6Z0Ng==} + engines: {node: '>=18'} + cpu: [loong64] + os: [linux] + + '@esbuild/linux-mips64el@0.25.12': + resolution: {integrity: sha512-iyRrM1Pzy9GFMDLsXn1iHUm18nhKnNMWscjmp4+hpafcZjrr2WbT//d20xaGljXDBYHqRcl8HnxbX6uaA/eGVw==} + engines: {node: '>=18'} + cpu: [mips64el] + os: [linux] + + '@esbuild/linux-ppc64@0.25.12': + resolution: {integrity: sha512-9meM/lRXxMi5PSUqEXRCtVjEZBGwB7P/D4yT8UG/mwIdze2aV4Vo6U5gD3+RsoHXKkHCfSxZKzmDssVlRj1QQA==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [linux] + + '@esbuild/linux-riscv64@0.25.12': + resolution: {integrity: sha512-Zr7KR4hgKUpWAwb1f3o5ygT04MzqVrGEGXGLnj15YQDJErYu/BGg+wmFlIDOdJp0PmB0lLvxFIOXZgFRrdjR0w==} + engines: {node: '>=18'} + cpu: [riscv64] + os: [linux] + + '@esbuild/linux-s390x@0.25.12': + resolution: {integrity: sha512-MsKncOcgTNvdtiISc/jZs/Zf8d0cl/t3gYWX8J9ubBnVOwlk65UIEEvgBORTiljloIWnBzLs4qhzPkJcitIzIg==} + engines: {node: '>=18'} + cpu: [s390x] + os: [linux] + + '@esbuild/linux-x64@0.25.12': + resolution: {integrity: sha512-uqZMTLr/zR/ed4jIGnwSLkaHmPjOjJvnm6TVVitAa08SLS9Z0VM8wIRx7gWbJB5/J54YuIMInDquWyYvQLZkgw==} + engines: {node: '>=18'} + cpu: [x64] + os: [linux] + + '@esbuild/netbsd-arm64@0.25.12': + resolution: {integrity: sha512-xXwcTq4GhRM7J9A8Gv5boanHhRa/Q9KLVmcyXHCTaM4wKfIpWkdXiMog/KsnxzJ0A1+nD+zoecuzqPmCRyBGjg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [netbsd] + + '@esbuild/netbsd-x64@0.25.12': + resolution: {integrity: sha512-Ld5pTlzPy3YwGec4OuHh1aCVCRvOXdH8DgRjfDy/oumVovmuSzWfnSJg+VtakB9Cm0gxNO9BzWkj6mtO1FMXkQ==} + engines: {node: '>=18'} + cpu: [x64] + os: [netbsd] + + '@esbuild/openbsd-arm64@0.25.12': + resolution: {integrity: sha512-fF96T6KsBo/pkQI950FARU9apGNTSlZGsv1jZBAlcLL1MLjLNIWPBkj5NlSz8aAzYKg+eNqknrUJ24QBybeR5A==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openbsd] + + '@esbuild/openbsd-x64@0.25.12': + resolution: {integrity: sha512-MZyXUkZHjQxUvzK7rN8DJ3SRmrVrke8ZyRusHlP+kuwqTcfWLyqMOE3sScPPyeIXN/mDJIfGXvcMqCgYKekoQw==} + engines: {node: '>=18'} + cpu: [x64] + os: [openbsd] + + '@esbuild/openharmony-arm64@0.25.12': + resolution: {integrity: sha512-rm0YWsqUSRrjncSXGA7Zv78Nbnw4XL6/dzr20cyrQf7ZmRcsovpcRBdhD43Nuk3y7XIoW2OxMVvwuRvk9XdASg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openharmony] + + '@esbuild/sunos-x64@0.25.12': + resolution: {integrity: sha512-3wGSCDyuTHQUzt0nV7bocDy72r2lI33QL3gkDNGkod22EsYl04sMf0qLb8luNKTOmgF/eDEDP5BFNwoBKH441w==} + engines: {node: '>=18'} + cpu: [x64] + os: [sunos] + + '@esbuild/win32-arm64@0.25.12': + resolution: {integrity: sha512-rMmLrur64A7+DKlnSuwqUdRKyd3UE7oPJZmnljqEptesKM8wx9J8gx5u0+9Pq0fQQW8vqeKebwNXdfOyP+8Bsg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [win32] + + '@esbuild/win32-ia32@0.25.12': + resolution: {integrity: sha512-HkqnmmBoCbCwxUKKNPBixiWDGCpQGVsrQfJoVGYLPT41XWF8lHuE5N6WhVia2n4o5QK5M4tYr21827fNhi4byQ==} + engines: {node: '>=18'} + cpu: [ia32] + os: [win32] + + '@esbuild/win32-x64@0.25.12': + resolution: {integrity: sha512-alJC0uCZpTFrSL0CCDjcgleBXPnCrEAhTBILpeAp7M/OFgoqtAetfBzX0xM00MUsVVPpVjlPuMbREqnZCXaTnA==} + engines: {node: '>=18'} + cpu: [x64] + os: [win32] + + '@jridgewell/gen-mapping@0.3.13': + resolution: {integrity: sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==} + + '@jridgewell/remapping@2.3.5': + resolution: {integrity: sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==} + + '@jridgewell/resolve-uri@3.1.2': + resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} + engines: {node: '>=6.0.0'} + + '@jridgewell/sourcemap-codec@1.5.5': + resolution: {integrity: sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==} + + '@jridgewell/trace-mapping@0.3.31': + resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==} + + '@rolldown/pluginutils@1.0.0-beta.27': + resolution: {integrity: sha512-+d0F4MKMCbeVUJwG96uQ4SgAznZNSq93I3V+9NHA4OpvqG8mRCpGdKmK8l/dl02h2CCDHwW2FqilnTyDcAnqjA==} + + '@rollup/rollup-android-arm-eabi@4.61.1': + resolution: {integrity: sha512-JnBB8MdXj45cajvTuO5FmPlvFVJRQgvrz1uSEl3NwqFnReAPGwb8EanbGi4z2nRaqLzjJSv5/JmycoTKlRZxHA==} + cpu: [arm] + os: [android] + + '@rollup/rollup-android-arm64@4.61.1': + resolution: {integrity: sha512-Jx2g7iSjw4AOT0HDPHM9RV3GNjRXwybWtSFZiZAYUTjUwjVrYIwq3kBf+LnhqJlzXFAqTAh2F7IGI+O568exPw==} + cpu: [arm64] + os: [android] + + '@rollup/rollup-darwin-arm64@4.61.1': + resolution: {integrity: sha512-0F1L/Z3Eqv8mT2n3dCpeO8GcTvHvVqkP5/t6DMsn0KzhYVcg+s7Ncl5DS8qjKYEeio6Az0Gt6nyBORay5qIlCA==} + cpu: [arm64] + os: [darwin] + + '@rollup/rollup-darwin-x64@4.61.1': + resolution: {integrity: sha512-qLttcH871ujY4YcVfUSShhOw+CsoTatYz8gRbHO7Bb92QH059/P0y5do1KMs41fY0BpD2x4AJH/gID0zFiqVKQ==} + cpu: [x64] + os: [darwin] + + '@rollup/rollup-freebsd-arm64@4.61.1': + resolution: {integrity: sha512-fUI4RapGE0Oh3mb8mgfvC1O2nU1RpDZUKnDQm3xB1Ipg7C2wTs5Kstz7G2uWK99a8S2yTMq8/P4uycwNa0nJyw==} + cpu: [arm64] + os: [freebsd] + + '@rollup/rollup-freebsd-x64@4.61.1': + resolution: {integrity: sha512-H5YrdvJaDtI/U9/emrD4b++xkvp3y/JvOe4rizHbxvkyMfRS/CiRYdji+Pl8D0brEaNFWUh1drQxgAGIl6Xudw==} + cpu: [x64] + os: [freebsd] + + '@rollup/rollup-linux-arm-gnueabihf@4.61.1': + resolution: {integrity: sha512-Q8CBCCQtDFrYtXoeUXSrnFXKOnyUhx6bz+SkL6A0E7V8kAiCJ5pamq1WtbfpVGhR5TSpXY6ak3avmDc5fHTyJA==} + cpu: [arm] + os: [linux] + + '@rollup/rollup-linux-arm-musleabihf@4.61.1': + resolution: {integrity: sha512-nwnhk1581l0FBVellGcVCAT0Oi06onEA3WB53sf01VO3I0UPBkMH9sXONYME2K0ovXcNayJfNtHfm6mpJElatQ==} + cpu: [arm] + os: [linux] + + '@rollup/rollup-linux-arm64-gnu@4.61.1': + resolution: {integrity: sha512-x5Xr49hwt3hdW75UOZm3395YwwzPyauktslv29KpWL/T+vVAzoT3azLcTWv0eMciBNrx+DYjH4paehHoLpPvpg==} + cpu: [arm64] + os: [linux] + + '@rollup/rollup-linux-arm64-musl@4.61.1': + resolution: {integrity: sha512-unMS3H73DpaoPyyEVPjGKleM/s0mkmsauTENpw4INQY8y4+IuLNjkueQ5QCtC0D3N38Y38yhAU8OoZ20S2Tm6w==} + cpu: [arm64] + os: [linux] + + '@rollup/rollup-linux-loong64-gnu@4.61.1': + resolution: {integrity: sha512-zNZzGRnAhwjFEYmvphJRV5XaQGjs62cCmeYYHUT//NbvEnHauw+I85nGG+SiVg5ld4GX8D1IbKIX+ozITQnhMQ==} + cpu: [loong64] + os: [linux] + + '@rollup/rollup-linux-loong64-musl@4.61.1': + resolution: {integrity: sha512-LdpWGL8X209B2SIvWjqlc8VZgM6PKfontSerGepuldQmHYrAOtnMCXeJkxXGbC+PPZVOuu5czJo7fNV6aeW8rQ==} + cpu: [loong64] + os: [linux] + + '@rollup/rollup-linux-ppc64-gnu@4.61.1': + resolution: {integrity: sha512-EC5kTtNaNGOmbMGqar8dvJy6y/hg99GAwjfBz++pxZhQATXGcRjd6c5en5wcbru0vkRmiMGsQKdMJOOf6sza4g==} + cpu: [ppc64] + os: [linux] + + '@rollup/rollup-linux-ppc64-musl@4.61.1': + resolution: {integrity: sha512-8hiwp6D4acEcNK78I4rP0/XtS1sknWIAMJBPdR4l6zUtyTm5KiTDr5bXmWt4foY7nAN7AThDHgkLIEZOWKbzWw==} + cpu: [ppc64] + os: [linux] + + '@rollup/rollup-linux-riscv64-gnu@4.61.1': + resolution: {integrity: sha512-10dh/h/BqA7DuMPWSxkR8uks18FRwnwOEqr5zOTEl+NOwP/OMzKX8OFR/Of9xxDA7D5qef1Nzar5WDD2kCCr1g==} + cpu: [riscv64] + os: [linux] + + '@rollup/rollup-linux-riscv64-musl@4.61.1': + resolution: {integrity: sha512-YKJ5lg35DP17gcAOggnihe+APw9HLyj1Xn7gsmGumBJAUDa6NGXNixJzmkWLhcK9TOuuyQjdamzvJefkO7qHZQ==} + cpu: [riscv64] + os: [linux] + + '@rollup/rollup-linux-s390x-gnu@4.61.1': + resolution: {integrity: sha512-Mlil5G2Jj6a7B3LWGctg+XPL9vdXYuzCtNXfxOQ0nPjc2m6ueUktocPGH9bnAM0bNRKb/bAWTujUU7IJQdQA+g==} + cpu: [s390x] + os: [linux] + + '@rollup/rollup-linux-x64-gnu@4.61.1': + resolution: {integrity: sha512-bVWIOIk6pV01p4CdUbPP7CJ/434z+OooYjDuFcR+44N35YvKUC66G8MGnvcWx5mWKW3g61J+t74l3Kj15Kwn2Q==} + cpu: [x64] + os: [linux] + + '@rollup/rollup-linux-x64-musl@4.61.1': + resolution: {integrity: sha512-qy5pBvZbqNFheBz61R1rzsezjm0J7O2oNGoWtGoY89SZYLUfxAJTBAqDChqAIdB4rCiIbi9nF7yZ83GnNiLwSw==} + cpu: [x64] + os: [linux] + + '@rollup/rollup-openbsd-x64@4.61.1': + resolution: {integrity: sha512-E83TXjI4zm0+5f2qO+UOudaCYIhYwpJ5jq6YCZNIZ+6CbfhKrkAGezeiASBL9ElxAxFsRS9ZhESv8mfnj6TKeg==} + cpu: [x64] + os: [openbsd] + + '@rollup/rollup-openharmony-arm64@4.61.1': + resolution: {integrity: sha512-fbWnKqVkjrJN38vNe3ahkbk6iejS/3b0Nt7EEtPpE6RBacZcGXNKbzfHN3GUUlXOPghUg0j6XUGrtjX9z1sIvA==} + cpu: [arm64] + os: [openharmony] + + '@rollup/rollup-win32-arm64-msvc@4.61.1': + resolution: {integrity: sha512-ArMl38iVAbk0New1ogihQNY6iphLi4ZaRsa037gUzv5yeKPY8TD3Dmy4x2RNC1VztU/uqm+G+/RwFrSka3Oy2g==} + cpu: [arm64] + os: [win32] + + '@rollup/rollup-win32-ia32-msvc@4.61.1': + resolution: {integrity: sha512-0mYtjHS9ucAbcATycCNK9IGBk/cCe/ma7EmSLGZdsxnOA8cjRIyU04wDpVAD9NiOfLUR9KTxdiO53uOkherqjQ==} + cpu: [ia32] + os: [win32] + + '@rollup/rollup-win32-x64-gnu@4.61.1': + resolution: {integrity: sha512-gK1iCEPfpoSG9wfBihXxvBMi8ZfcWffYkEsC/Eih+iFENTaewvNcrEQ69lIOWYO5pePHKLHHO7nq5AILGO/HQQ==} + cpu: [x64] + os: [win32] + + '@rollup/rollup-win32-x64-msvc@4.61.1': + resolution: {integrity: sha512-X+zaP2x+j4RXGfbp/seSoRHWnPxzApilDszisZxbYH5C/jTxFhCtDNdPGZb9lJyYPs24wGxruPF7Y+sIXt9Gzw==} + cpu: [x64] + os: [win32] + + '@tailwindcss/node@4.3.0': + resolution: {integrity: sha512-aFb4gUhFOgdh9AXo4IzBEOzBkkAxm9VigwDJnMIYv3lcfXCJVesNfbEaBl4BNgVRyid92AmdviqwBUBRKSeY3g==} + + '@tailwindcss/oxide-android-arm64@4.3.0': + resolution: {integrity: sha512-TJPiq67tKlLuObP6RkwvVGDoxCMBVtDgKkLfa/uyj7/FyxvQwHS+UOnVrXXgbEsfUaMgiVvC4KbJnRr26ho4Ng==} + engines: {node: '>= 20'} + cpu: [arm64] + os: [android] + + '@tailwindcss/oxide-darwin-arm64@4.3.0': + resolution: {integrity: sha512-oMN/WZRb+SO37BmUElEgeEWuU8E/HXRkiODxJxLe1UTHVXLrdVSgfaJV7pSlhRGMSOiXLuxTIjfsF3wYvz8cgQ==} + engines: {node: '>= 20'} + cpu: [arm64] + os: [darwin] + + '@tailwindcss/oxide-darwin-x64@4.3.0': + resolution: {integrity: sha512-N6CUmu4a6bKVADfw77p+iw6Yd9Q3OBhe0veaDX+QazfuVYlQsHfDgxBrsjQ/IW+zywL8mTrNd0SdJT/zgtvMdA==} + engines: {node: '>= 20'} + cpu: [x64] + os: [darwin] + + '@tailwindcss/oxide-freebsd-x64@4.3.0': + resolution: {integrity: sha512-zDL5hBkQdH5C6MpqbK3gQAgP80tsMwSI26vjOzjJtNCMUo0lFgOItzHKBIupOZNQxt3ouPH7RPhvNhiTfCe5CQ==} + engines: {node: '>= 20'} + cpu: [x64] + os: [freebsd] + + '@tailwindcss/oxide-linux-arm-gnueabihf@4.3.0': + resolution: {integrity: sha512-R06HdNi7A7OEoMsf6d4tjZ71RCWnZQPHj2mnotSFURjNLdBC+cIgXQ7l81CqeoiQftjf6OOblxXMInMgN2VzMA==} + engines: {node: '>= 20'} + cpu: [arm] + os: [linux] + + '@tailwindcss/oxide-linux-arm64-gnu@4.3.0': + resolution: {integrity: sha512-qTJHELX8jetjhRQHCLilkVLmybpzNQAtaI/gaoVoidn/ufbNDbAo8KlK2J+yPoc8wQxvDxCmh/5lr8nC1+lTbg==} + engines: {node: '>= 20'} + cpu: [arm64] + os: [linux] + + '@tailwindcss/oxide-linux-arm64-musl@4.3.0': + resolution: {integrity: sha512-Z6sukiQsngnWO+l39X4pPbiWT81IC+PLKF+PHxIlyZbGNb9MODfYlXEVlFvej5BOZInWX01kVyzeLvHsXhfczQ==} + engines: {node: '>= 20'} + cpu: [arm64] + os: [linux] + + '@tailwindcss/oxide-linux-x64-gnu@4.3.0': + resolution: {integrity: sha512-DRNdQRpSGzRGfARVuVkxvM8Q12nh19l4BF/G7zGA1oe+9wcC6saFBHTISrpIcKzhiXtSrlSrluCfvMuledoCTQ==} + engines: {node: '>= 20'} + cpu: [x64] + os: [linux] + + '@tailwindcss/oxide-linux-x64-musl@4.3.0': + resolution: {integrity: sha512-Z0IADbDo8bh6I7h2IQMx601AdXBLfFpEdUotft86evd/8ZPflZe9COPO8Q1vw+pfLWIUo9zN/JGZvwuAJqduqg==} + engines: {node: '>= 20'} + cpu: [x64] + os: [linux] + + '@tailwindcss/oxide-wasm32-wasi@4.3.0': + resolution: {integrity: sha512-HNZGOUxEmElksYR7S6sC5jTeNGpobAsy9u7Gu0AskJ8/20FR9GqebUyB+HBcU/ax6BHuiuJi+Oda4B+YX6H1yA==} + engines: {node: '>=14.0.0'} + cpu: [wasm32] + bundledDependencies: + - '@napi-rs/wasm-runtime' + - '@emnapi/core' + - '@emnapi/runtime' + - '@tybys/wasm-util' + - '@emnapi/wasi-threads' + - tslib + + '@tailwindcss/oxide-win32-arm64-msvc@4.3.0': + resolution: {integrity: sha512-Pe+RPVTi1T+qymuuRpcdvwSVZjnll/f7n8gBxMMh3xLTctMDKqpdfGimbMyioqtLhUYZxdJ9wGNhV7MKHvgZsQ==} + engines: {node: '>= 20'} + cpu: [arm64] + os: [win32] + + '@tailwindcss/oxide-win32-x64-msvc@4.3.0': + resolution: {integrity: sha512-Mvrf2kXW/yeW/OTezZlCGOirXRcUuLIBx/5Y12BaPM7wJoryG6dfS/NJL8aBPqtTEx/Vm4T4vKzFUcKDT+TKUA==} + engines: {node: '>= 20'} + cpu: [x64] + os: [win32] + + '@tailwindcss/oxide@4.3.0': + resolution: {integrity: sha512-F7HZGBeN9I0/AuuJS5PwcD8xayx5ri5GhjYUDBEVYUkexyA/giwbDNjRVrxSezE3T250OU2K/wp/ltWx3UOefg==} + engines: {node: '>= 20'} + + '@tailwindcss/vite@4.3.0': + resolution: {integrity: sha512-t6J3OrB5Fc0ExuhohouH0fWUGMYL6PTLhW+E7zIk/pdbnJARZDCwjBznFnkh5ynRnIRSI4YjtTH0t6USjJISrw==} + peerDependencies: + vite: ^5.2.0 || ^6 || ^7 || ^8 + + '@types/babel__core@7.20.5': + resolution: {integrity: sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==} + + '@types/babel__generator@7.27.0': + resolution: {integrity: sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg==} + + '@types/babel__template@7.4.4': + resolution: {integrity: sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==} + + '@types/babel__traverse@7.28.0': + resolution: {integrity: sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q==} + + '@types/body-parser@1.19.6': + resolution: {integrity: sha512-HLFeCYgz89uk22N5Qg3dvGvsv46B8GLvKKo1zKG4NybA8U2DiEO3w9lqGg29t/tfLRJpJ6iQxnVw4OnB7MoM9g==} + + '@types/connect@3.4.38': + resolution: {integrity: sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==} + + '@types/d3-color@3.1.3': + resolution: {integrity: sha512-iO90scth9WAbmgv7ogoq57O9YpKmFBbmoEoCHDB2xMBY0+/KVrqAaCDyCE16dUspeOvIxFFRI+0sEtqDqy2b4A==} + + '@types/d3-drag@3.0.7': + resolution: {integrity: sha512-HE3jVKlzU9AaMazNufooRJ5ZpWmLIoc90A37WU2JMmeq28w1FQqCZswHZ3xR+SuxYftzHq6WU6KJHvqxKzTxxQ==} + + '@types/d3-interpolate@3.0.4': + resolution: {integrity: sha512-mgLPETlrpVV1YRJIglr4Ez47g7Yxjl1lj7YKsiMCb27VJH9W8NVM6Bb9d8kkpG/uAQS5AmbA48q2IAolKKo1MA==} + + '@types/d3-selection@3.0.11': + resolution: {integrity: sha512-bhAXu23DJWsrI45xafYpkQ4NtcKMwWnAC/vKrd2l+nxMFuvOT3XMYTIj2opv8vq8AO5Yh7Qac/nSeP/3zjTK0w==} + + '@types/d3-transition@3.0.9': + resolution: {integrity: sha512-uZS5shfxzO3rGlu0cC3bjmMFKsXv+SmZZcgp0KD22ts4uGXp5EVYGzu/0YdwZeKmddhcAccYtREJKkPfXkZuCg==} + + '@types/d3-zoom@3.0.8': + resolution: {integrity: sha512-iqMC4/YlFCSlO8+2Ii1GGGliCAY4XdeG748w5vQUbevlbDu0zSjH/+jojorQVBK/se0j6DUFNPBGSqD3YWYnDw==} + + '@types/estree@1.0.9': + resolution: {integrity: sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==} + + '@types/express-serve-static-core@5.1.1': + resolution: {integrity: sha512-v4zIMr/cX7/d2BpAEX3KNKL/JrT1s43s96lLvvdTmza1oEvDudCqK9aF/djc/SWgy8Yh0h30TZx5VpzqFCxk5A==} + + '@types/express@5.0.6': + resolution: {integrity: sha512-sKYVuV7Sv9fbPIt/442koC7+IIwK5olP1KWeD88e/idgoJqDm3JV/YUiPwkoKK92ylff2MGxSz1CSjsXelx0YA==} + + '@types/http-errors@2.0.5': + resolution: {integrity: sha512-r8Tayk8HJnX0FztbZN7oVqGccWgw98T/0neJphO91KkmOzug1KkofZURD4UaD5uH8AqcFLfdPErnBod0u71/qg==} + + '@types/node@22.19.20': + resolution: {integrity: sha512-6tELRwSDYWW9EdZhbeZmYGZ1/7Djkt+Ah3/ScEYT9cDord7UJzasR/4D3VONg9tQI5CDp+/CZC1AXj2pCFOvpw==} + + '@types/pg@8.20.0': + resolution: {integrity: sha512-bEPFOaMAHTEP1EzpvHTbmwR8UsFyHSKsRisLIHVMXnpNefSbGA1bD6CVy+qKjGSqmZqNqBDV2azOBo8TgkcVow==} + + '@types/qs@6.15.1': + resolution: {integrity: sha512-GZHUBZR9hckSUhrxmp1nG6NwdpM9fCunJwyThLW1X3AyHgd9IlHb6VANpQQqDr2o/qQp6McZ3y/IA2rVzKzSbw==} + + '@types/range-parser@1.2.7': + resolution: {integrity: sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==} + + '@types/react-dom@19.2.3': + resolution: {integrity: sha512-jp2L/eY6fn+KgVVQAOqYItbF0VY/YApe5Mz2F0aykSO8gx31bYCZyvSeYxCHKvzHG5eZjc+zyaS5BrBWya2+kQ==} + peerDependencies: + '@types/react': ^19.2.0 + + '@types/react@19.2.17': + resolution: {integrity: sha512-MXfmqaVPEVgkBT/aY0aGCkRWWtByiYQXo3xdQ8r5RzuFrPiRn8Gar2tQdXSUQ2GKV3bkXckek89V8wQBY2Q/Aw==} + + '@types/send@1.2.1': + resolution: {integrity: sha512-arsCikDvlU99zl1g69TcAB3mzZPpxgw0UQnaHeC1Nwb015xp8bknZv5rIfri9xTOcMuaVgvabfIRA7PSZVuZIQ==} + + '@types/serve-static@2.2.0': + resolution: {integrity: sha512-8mam4H1NHLtu7nmtalF7eyBH14QyOASmcxHhSfEoRyr0nP/YdoesEtU+uSRvMe96TW/HPTtkoKqQLl53N7UXMQ==} + + '@types/ws@8.18.1': + resolution: {integrity: sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg==} + + '@vitejs/plugin-react@4.7.0': + resolution: {integrity: sha512-gUu9hwfWvvEDBBmgtAowQCojwZmJ5mcLn3aufeCsitijs3+f2NsrPtlAWIR6OPiqljl96GVCUbLe0HyqIpVaoA==} + engines: {node: ^14.18.0 || >=16.0.0} + peerDependencies: + vite: ^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 + + '@xterm/addon-fit@0.10.0': + resolution: {integrity: sha512-UFYkDm4HUahf2lnEyHvio51TNGiLK66mqP2JoATy7hRZeXaGMRDr00JiSF7m63vR5WKATF605yEggJKsw0JpMQ==} + peerDependencies: + '@xterm/xterm': ^5.0.0 + + '@xterm/xterm@5.5.0': + resolution: {integrity: sha512-hqJHYaQb5OptNunnyAnkHyM8aCjZ1MEIDTQu1iIbbTD/xops91NB5yq1ZK/dC2JDbVWtF23zUtl9JE2NqwT87A==} + + '@xyflow/react@12.11.0': + resolution: {integrity: sha512-na4IO33FSs2OS72hASgZDmTYwFAkef7Z74uBUVrong3ARmQQHfnRUVaCFn1kTt5LbS6pK03TbYjCPGLjLFfziA==} + peerDependencies: + '@types/react': '>=17' + '@types/react-dom': '>=17' + react: '>=17' + react-dom: '>=17' + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@xyflow/system@0.0.77': + resolution: {integrity: sha512-qCDCMCQAAgUu8yHnhloHG9F5mwPX5E+Wl8McpYIOPSSXfzFJJoZcwOcsDiAjitVKIg2de1WmJbCHfpcvxprsgg==} + + accepts@1.3.8: + resolution: {integrity: sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==} + engines: {node: '>= 0.6'} + + ansi-regex@5.0.1: + resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} + engines: {node: '>=8'} + + ansi-styles@4.3.0: + resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} + engines: {node: '>=8'} + + array-flatten@1.1.1: + resolution: {integrity: sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==} + + baseline-browser-mapping@2.10.34: + resolution: {integrity: sha512-IMDedajPifLnHNY0X9n8hKxRTQ6/eTHwr5bDo04WnuqxyKw6LYtQywCuuqPZwhl3aBXMvQpJov42GLCwRRdQzw==} + engines: {node: '>=6.0.0'} + hasBin: true + + body-parser@1.20.5: + resolution: {integrity: sha512-3grm+/2tUOvu2cjJkvsIxrv/wVpfXQW4PsQHYm7yk4vfpu7Ekl6nEsYBoJUL6qDwZUx8wUhQ8tR2qz+ad9c9OA==} + engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} + + browserslist@4.28.2: + resolution: {integrity: sha512-48xSriZYYg+8qXna9kwqjIVzuQxi+KYWp2+5nCYnYKPTr0LvD89Jqk2Or5ogxz0NUMfIjhh2lIUX/LyX9B4oIg==} + engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} + hasBin: true + + bytes@3.1.2: + resolution: {integrity: sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==} + engines: {node: '>= 0.8'} + + call-bind-apply-helpers@1.0.2: + resolution: {integrity: sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==} + engines: {node: '>= 0.4'} + + call-bound@1.0.4: + resolution: {integrity: sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==} + engines: {node: '>= 0.4'} + + caniuse-lite@1.0.30001797: + resolution: {integrity: sha512-l8xKG+gwAIExZGl9FrF7KUwuOmk6wbEPC9Xoy/RtnWv1XG0Q4LFlagaLpUv3Kiza3W/wm27zy0yWJEieYKAP6w==} + + chalk@4.1.2: + resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} + engines: {node: '>=10'} + + classcat@5.0.5: + resolution: {integrity: sha512-JhZUT7JFcQy/EzW605k/ktHtncoo9vnyW/2GspNYwFlN1C/WmjuV/xtS04e9SOkL2sTdw0VAZ2UGCcQ9lR6p6w==} + + cliui@8.0.1: + resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} + engines: {node: '>=12'} + + color-convert@2.0.1: + resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} + engines: {node: '>=7.0.0'} + + color-name@1.1.4: + resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + + commander@15.0.0: + resolution: {integrity: sha512-z67u4ZhzCL/Tydu1lJARtEZYWbWaN7oYLHbsuzocr6y4N6WZAagG3RQ4FW61V1/0+jImpj293XfrcYnd1qxtPg==} + engines: {node: '>=22.12.0'} + + concurrently@9.2.1: + resolution: {integrity: sha512-fsfrO0MxV64Znoy8/l1vVIjjHa29SZyyqPgQBwhiDcaW8wJc2W3XWVOGx4M3oJBnv/zdUZIIp1gDeS98GzP8Ng==} + engines: {node: '>=18'} + hasBin: true + + content-disposition@0.5.4: + resolution: {integrity: sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==} + engines: {node: '>= 0.6'} + + content-type@1.0.5: + resolution: {integrity: sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==} + engines: {node: '>= 0.6'} + + convert-source-map@2.0.0: + resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} + + cookie-signature@1.0.7: + resolution: {integrity: sha512-NXdYc3dLr47pBkpUCHtKSwIOQXLVn8dZEuywboCOJY/osA0wFSLlSawr3KN8qXJEyX66FcONTH8EIlVuK0yyFA==} + + cookie@0.7.2: + resolution: {integrity: sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==} + engines: {node: '>= 0.6'} + + csstype@3.2.3: + resolution: {integrity: sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==} + + d3-color@3.1.0: + resolution: {integrity: sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA==} + engines: {node: '>=12'} + + d3-dispatch@3.0.1: + resolution: {integrity: sha512-rzUyPU/S7rwUflMyLc1ETDeBj0NRuHKKAcvukozwhshr6g6c5d8zh4c2gQjY2bZ0dXeGLWc1PF174P2tVvKhfg==} + engines: {node: '>=12'} + + d3-drag@3.0.0: + resolution: {integrity: sha512-pWbUJLdETVA8lQNJecMxoXfH6x+mO2UQo8rSmZ+QqxcbyA3hfeprFgIT//HW2nlHChWeIIMwS2Fq+gEARkhTkg==} + engines: {node: '>=12'} + + d3-ease@3.0.1: + resolution: {integrity: sha512-wR/XK3D3XcLIZwpbvQwQ5fK+8Ykds1ip7A2Txe0yxncXSdq1L9skcG7blcedkOX+ZcgxGAmLX1FrRGbADwzi0w==} + engines: {node: '>=12'} + + d3-interpolate@3.0.1: + resolution: {integrity: sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g==} + engines: {node: '>=12'} + + d3-selection@3.0.0: + resolution: {integrity: sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ==} + engines: {node: '>=12'} + + d3-timer@3.0.1: + resolution: {integrity: sha512-ndfJ/JxxMd3nw31uyKoY2naivF+r29V+Lc0svZxe1JvvIRmi8hUsrMvdOwgS1o6uBHmiz91geQ0ylPP0aj1VUA==} + engines: {node: '>=12'} + + d3-transition@3.0.1: + resolution: {integrity: sha512-ApKvfjsSR6tg06xrL434C0WydLr7JewBB3V+/39RMHsaXTOG0zmt/OAXeng5M5LBm0ojmxJrpomQVZ1aPvBL4w==} + engines: {node: '>=12'} + peerDependencies: + d3-selection: 2 - 3 + + d3-zoom@3.0.0: + resolution: {integrity: sha512-b8AmV3kfQaqWAuacbPuNbL6vahnOJflOhexLzMMNLga62+/nh0JzvJ0aO/5a5MVgUFGS7Hu1P9P03o3fJkDCyw==} + engines: {node: '>=12'} + + debug@2.6.9: + resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + + debug@4.4.3: + resolution: {integrity: sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + + depd@2.0.0: + resolution: {integrity: sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==} + engines: {node: '>= 0.8'} + + destroy@1.2.0: + resolution: {integrity: sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==} + engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} + + detect-libc@2.1.2: + resolution: {integrity: sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==} + engines: {node: '>=8'} + + dunder-proto@1.0.1: + resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==} + engines: {node: '>= 0.4'} + + ee-first@1.1.1: + resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} + + electron-to-chromium@1.5.368: + resolution: {integrity: sha512-7RckJJK4uESJF9PxvfMWd3TGqIiieUTG4HxnKaKuIpGbcr+r2ZEB3g2gAhCP3Fqm42vJSzLfgab9eva/C4/XVw==} + + emoji-regex@8.0.0: + resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + + encodeurl@2.0.0: + resolution: {integrity: sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==} + engines: {node: '>= 0.8'} + + enhanced-resolve@5.23.0: + resolution: {integrity: sha512-yJN/BOOLxcOW2aQgeif9mSnaUB8KtvmMMp56oA1kx1CRfBKbhZm2pJ+NBY+3eOboHxix8lfjWpHE0Ei5U8RbSA==} + engines: {node: '>=10.13.0'} + + es-define-property@1.0.1: + resolution: {integrity: sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==} + engines: {node: '>= 0.4'} + + es-errors@1.3.0: + resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} + engines: {node: '>= 0.4'} + + es-object-atoms@1.1.2: + resolution: {integrity: sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==} + engines: {node: '>= 0.4'} + + esbuild@0.25.12: + resolution: {integrity: sha512-bbPBYYrtZbkt6Os6FiTLCTFxvq4tt3JKall1vRwshA3fdVztsLAatFaZobhkBC8/BrPetoa0oksYoKXoG4ryJg==} + engines: {node: '>=18'} + hasBin: true + + escalade@3.2.0: + resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} + engines: {node: '>=6'} + + escape-html@1.0.3: + resolution: {integrity: sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==} + + etag@1.8.1: + resolution: {integrity: sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==} + engines: {node: '>= 0.6'} + + express@4.22.2: + resolution: {integrity: sha512-IuL+Elrou2ZvCFHs18/CIzy2Nzvo25nZ1/D2eIZlz7c+QUayAcYoiM2BthCjs+EBHVpjYjcuLDAiCWgeIX3X1Q==} + engines: {node: '>= 0.10.0'} + + fdir@6.5.0: + resolution: {integrity: sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==} + engines: {node: '>=12.0.0'} + peerDependencies: + picomatch: ^3 || ^4 + peerDependenciesMeta: + picomatch: + optional: true + + finalhandler@1.3.2: + resolution: {integrity: sha512-aA4RyPcd3badbdABGDuTXCMTtOneUCAYH/gxoYRTZlIJdF0YPWuGqiAsIrhNnnqdXGswYk6dGujem4w80UJFhg==} + engines: {node: '>= 0.8'} + + forwarded@0.2.0: + resolution: {integrity: sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==} + engines: {node: '>= 0.6'} + + fresh@0.5.2: + resolution: {integrity: sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==} + engines: {node: '>= 0.6'} + + fsevents@2.3.3: + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + + function-bind@1.1.2: + resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} + + gensync@1.0.0-beta.2: + resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} + engines: {node: '>=6.9.0'} + + get-caller-file@2.0.5: + resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} + engines: {node: 6.* || 8.* || >= 10.*} + + get-intrinsic@1.3.0: + resolution: {integrity: sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==} + engines: {node: '>= 0.4'} + + get-proto@1.0.1: + resolution: {integrity: sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==} + engines: {node: '>= 0.4'} + + gopd@1.2.0: + resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==} + engines: {node: '>= 0.4'} + + graceful-fs@4.2.11: + resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} + + has-flag@4.0.0: + resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} + engines: {node: '>=8'} + + has-symbols@1.1.0: + resolution: {integrity: sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==} + engines: {node: '>= 0.4'} + + hasown@2.0.4: + resolution: {integrity: sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==} + engines: {node: '>= 0.4'} + + http-errors@2.0.1: + resolution: {integrity: sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==} + engines: {node: '>= 0.8'} + + iconv-lite@0.4.24: + resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} + engines: {node: '>=0.10.0'} + + inherits@2.0.4: + resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} + + ipaddr.js@1.9.1: + resolution: {integrity: sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==} + engines: {node: '>= 0.10'} + + is-fullwidth-code-point@3.0.0: + resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} + engines: {node: '>=8'} + + jiti@2.7.0: + resolution: {integrity: sha512-AC/7JofJvZGrrneWNaEnJeOLUx+JlGt7tNa0wZiRPT4MY1wmfKjt2+6O2p2uz2+skll8OZZmJMNqeke7kKbNgQ==} + hasBin: true + + js-tokens@4.0.0: + resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} + + jsesc@3.1.0: + resolution: {integrity: sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==} + engines: {node: '>=6'} + hasBin: true + + json5@2.2.3: + resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} + engines: {node: '>=6'} + hasBin: true + + kubernetesjs@0.7.7: + resolution: {integrity: sha512-lgPRINWQRnzmZh2DToauk6lLTtFqfZVSBbQ3JcpL3FELmYEPPEiws5HutfhreLFCJUiOH0AL1LpD8h70WL5hAA==} + + lightningcss-android-arm64@1.32.0: + resolution: {integrity: sha512-YK7/ClTt4kAK0vo6w3X+Pnm0D2cf2vPHbhOXdoNti1Ga0al1P4TBZhwjATvjNwLEBCnKvjJc2jQgHXH0NEwlAg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [android] + + lightningcss-darwin-arm64@1.32.0: + resolution: {integrity: sha512-RzeG9Ju5bag2Bv1/lwlVJvBE3q6TtXskdZLLCyfg5pt+HLz9BqlICO7LZM7VHNTTn/5PRhHFBSjk5lc4cmscPQ==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [darwin] + + lightningcss-darwin-x64@1.32.0: + resolution: {integrity: sha512-U+QsBp2m/s2wqpUYT/6wnlagdZbtZdndSmut/NJqlCcMLTWp5muCrID+K5UJ6jqD2BFshejCYXniPDbNh73V8w==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [darwin] + + lightningcss-freebsd-x64@1.32.0: + resolution: {integrity: sha512-JCTigedEksZk3tHTTthnMdVfGf61Fky8Ji2E4YjUTEQX14xiy/lTzXnu1vwiZe3bYe0q+SpsSH/CTeDXK6WHig==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [freebsd] + + lightningcss-linux-arm-gnueabihf@1.32.0: + resolution: {integrity: sha512-x6rnnpRa2GL0zQOkt6rts3YDPzduLpWvwAF6EMhXFVZXD4tPrBkEFqzGowzCsIWsPjqSK+tyNEODUBXeeVHSkw==} + engines: {node: '>= 12.0.0'} + cpu: [arm] + os: [linux] + + lightningcss-linux-arm64-gnu@1.32.0: + resolution: {integrity: sha512-0nnMyoyOLRJXfbMOilaSRcLH3Jw5z9HDNGfT/gwCPgaDjnx0i8w7vBzFLFR1f6CMLKF8gVbebmkUN3fa/kQJpQ==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [linux] + + lightningcss-linux-arm64-musl@1.32.0: + resolution: {integrity: sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [linux] + + lightningcss-linux-x64-gnu@1.32.0: + resolution: {integrity: sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [linux] + + lightningcss-linux-x64-musl@1.32.0: + resolution: {integrity: sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [linux] + + lightningcss-win32-arm64-msvc@1.32.0: + resolution: {integrity: sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [win32] + + lightningcss-win32-x64-msvc@1.32.0: + resolution: {integrity: sha512-Amq9B/SoZYdDi1kFrojnoqPLxYhQ4Wo5XiL8EVJrVsB8ARoC1PWW6VGtT0WKCemjy8aC+louJnjS7U18x3b06Q==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [win32] + + lightningcss@1.32.0: + resolution: {integrity: sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==} + engines: {node: '>= 12.0.0'} + + lru-cache@5.1.1: + resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} + + lucide-react@0.525.0: + resolution: {integrity: sha512-Tm1txJ2OkymCGkvwoHt33Y2JpN5xucVq1slHcgE6Lk0WjDfjgKWor5CdVER8U6DvcfMwh4M8XxmpTiyzfmfDYQ==} + peerDependencies: + react: ^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0 + + magic-string@0.30.21: + resolution: {integrity: sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==} + + math-intrinsics@1.1.0: + resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==} + engines: {node: '>= 0.4'} + + media-typer@0.3.0: + resolution: {integrity: sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==} + engines: {node: '>= 0.6'} + + merge-descriptors@1.0.3: + resolution: {integrity: sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==} + + methods@1.1.2: + resolution: {integrity: sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==} + engines: {node: '>= 0.6'} + + mime-db@1.52.0: + resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} + engines: {node: '>= 0.6'} + + mime-types@2.1.35: + resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==} + engines: {node: '>= 0.6'} + + mime@1.6.0: + resolution: {integrity: sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==} + engines: {node: '>=4'} + hasBin: true + + ms@2.0.0: + resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==} + + ms@2.1.3: + resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + + nanoid@3.3.12: + resolution: {integrity: sha512-ZB9RH/39qpq5Vu6Y+NmUaFhQR6pp+M2Xt76XBnEwDaGcVAqhlvxrl3B2bKS5D3NH3QR76v3aSrKaF/Kiy7lEtQ==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + + negotiator@0.6.3: + resolution: {integrity: sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==} + engines: {node: '>= 0.6'} + + node-releases@2.0.47: + resolution: {integrity: sha512-Uzmd6LXpouKo8EUK68IjH4+E01w/hXyV3R3g/geCJo+rXLNfh1xucB+LOzYEOQPSiUK3h/xZf0cQGcSsmyL2Og==} + engines: {node: '>=18'} + + object-inspect@1.13.4: + resolution: {integrity: sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==} + engines: {node: '>= 0.4'} + + on-finished@2.4.1: + resolution: {integrity: sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==} + engines: {node: '>= 0.8'} + + parseurl@1.3.3: + resolution: {integrity: sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==} + engines: {node: '>= 0.8'} + + path-to-regexp@0.1.13: + resolution: {integrity: sha512-A/AGNMFN3c8bOlvV9RreMdrv7jsmF9XIfDeCd87+I8RNg6s78BhJxMu69NEMHBSJFxKidViTEdruRwEk/WIKqA==} + + pg-cloudflare@1.4.0: + resolution: {integrity: sha512-Vo7z/6rrQYxpNRylp4Tlob2elzbh+N/MOQbxFVWCxS7oEx6jF53GTJFxK2WWpKuBRkmiin4Mt+xofFDjx09R0A==} + + pg-connection-string@2.13.0: + resolution: {integrity: sha512-EMnU9E2fSULdsbErBbMaXJvFeD9B4+nPcM3f+4lsiCR0BHLPrLVjv3DbyM2hgQQviKJaTWIRRTjKjWlHg3p2ig==} + + pg-int8@1.0.1: + resolution: {integrity: sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==} + engines: {node: '>=4.0.0'} + + pg-pool@3.14.0: + resolution: {integrity: sha512-gKtPkFdQPU3DksooVLi9LsjZxrsBUZIpa+7aVx+LV5pNh0KzP4Zleud2po+ConrxbuXGBJ6Hfer6hdgpIBpBaw==} + peerDependencies: + pg: '>=8.0' + + pg-protocol@1.14.0: + resolution: {integrity: sha512-n5taZ1kO3s9ngDTVxsEznOqCyToTgz0FLuPq0B33COy5pPpuWJpY3/2oRBVETuOgzdqRXfWpM9HIhp2LBBT1BA==} + + pg-types@2.2.0: + resolution: {integrity: sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA==} + engines: {node: '>=4'} + + pg@8.21.0: + resolution: {integrity: sha512-AUP1EYJuHraQGsVoCQVIcM7TEJVGtDzxWtGFZd8rds9d+CCXlU5Js1rYgfLNvxy9iJrpHjGrRjoi/3BT9fRyiA==} + engines: {node: '>= 16.0.0'} + peerDependencies: + pg-native: '>=3.0.1' + peerDependenciesMeta: + pg-native: + optional: true + + pgpass@1.0.5: + resolution: {integrity: sha512-FdW9r/jQZhSeohs1Z3sI1yxFQNFvMcnmfuj4WBMUTxOrAyLMaTcE1aAMBiTlbMNaXvBCQuVi0R7hd8udDSP7ug==} + + picocolors@1.1.1: + resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} + + picomatch@4.0.4: + resolution: {integrity: sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==} + engines: {node: '>=12'} + + postcss@8.5.15: + resolution: {integrity: sha512-FfR8sjd4em2T6fb3I2MwAJU7HWVMr9zba+enmQeeWFfCbm+UOC/0X4DS8XtpUTMwWMGbjKYP7xjfNekzyGmB3A==} + engines: {node: ^10 || ^12 || >=14} + + postgres-array@2.0.0: + resolution: {integrity: sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA==} + engines: {node: '>=4'} + + postgres-bytea@1.0.1: + resolution: {integrity: sha512-5+5HqXnsZPE65IJZSMkZtURARZelel2oXUEO8rH83VS/hxH5vv1uHquPg5wZs8yMAfdv971IU+kcPUczi7NVBQ==} + engines: {node: '>=0.10.0'} + + postgres-date@1.0.7: + resolution: {integrity: sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q==} + engines: {node: '>=0.10.0'} + + postgres-interval@1.2.0: + resolution: {integrity: sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ==} + engines: {node: '>=0.10.0'} + + proxy-addr@2.0.7: + resolution: {integrity: sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==} + engines: {node: '>= 0.10'} + + qs@6.15.2: + resolution: {integrity: sha512-Rzq0KEyX/w/tEybncDgdkZrJgVUsUMk3xjh3t5bv3S1HTAtg+uOYt72+ZfwiQwKdysThkTBdL/rTi6HDmX9Ddw==} + engines: {node: '>=0.6'} + + range-parser@1.2.1: + resolution: {integrity: sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==} + engines: {node: '>= 0.6'} + + raw-body@2.5.3: + resolution: {integrity: sha512-s4VSOf6yN0rvbRZGxs8Om5CWj6seneMwK3oDb4lWDH0UPhWcxwOWw5+qk24bxq87szX1ydrwylIOp2uG1ojUpA==} + engines: {node: '>= 0.8'} + + react-dom@19.2.7: + resolution: {integrity: sha512-t0BRVXvbiE/o20Hfw669rLbMCDWtYZLvmJigy2f0MxsXF+71pxhR3xOkspmsO8h3ZlNzyibAmtCa3l4lYKk6gQ==} + peerDependencies: + react: ^19.2.7 + + react-refresh@0.17.0: + resolution: {integrity: sha512-z6F7K9bV85EfseRCp2bzrpyQ0Gkw1uLoCel9XBVWPg/TjRj94SkJzUTGfOa4bs7iJvBWtQG0Wq7wnI0syw3EBQ==} + engines: {node: '>=0.10.0'} + + react@19.2.7: + resolution: {integrity: sha512-HNe9WslTbXmFK8o8cmwgAeJFSBvt1bPdHCVKtaaV+WlAN36mpT4hcRpwbf3fY56ar2oIXzsBpOAiIRHAdY0OlQ==} + engines: {node: '>=0.10.0'} + + require-directory@2.1.1: + resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} + engines: {node: '>=0.10.0'} + + rollup@4.61.1: + resolution: {integrity: sha512-I4KW6iuRpuu2uHBLraZ1wNZe0DP7lnRha+VJ9tNaYVaVgKhW0aI3h4RYnoRPeql0flHm/Co55b7snEDcOfOJrA==} + engines: {node: '>=18.0.0', npm: '>=8.0.0'} + hasBin: true + + rxjs@7.8.2: + resolution: {integrity: sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==} + + safe-buffer@5.2.1: + resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} + + safer-buffer@2.1.2: + resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} + + scheduler@0.27.0: + resolution: {integrity: sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==} + + semver@6.3.1: + resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} + hasBin: true + + send@0.19.2: + resolution: {integrity: sha512-VMbMxbDeehAxpOtWJXlcUS5E8iXh6QmN+BkRX1GARS3wRaXEEgzCcB10gTQazO42tpNIya8xIyNx8fll1OFPrg==} + engines: {node: '>= 0.8.0'} + + serve-static@1.16.3: + resolution: {integrity: sha512-x0RTqQel6g5SY7Lg6ZreMmsOzncHFU7nhnRWkKgWuMTu5NN0DR5oruckMqRvacAN9d5w6ARnRBXl9xhDCgfMeA==} + engines: {node: '>= 0.8.0'} + + setprototypeof@1.2.0: + resolution: {integrity: sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==} + + shell-quote@1.8.3: + resolution: {integrity: sha512-ObmnIF4hXNg1BqhnHmgbDETF8dLPCggZWBjkQfhZpbszZnYur5DUljTcCHii5LC3J5E0yeO/1LIMyH+UvHQgyw==} + engines: {node: '>= 0.4'} + + side-channel-list@1.0.1: + resolution: {integrity: sha512-mjn/0bi/oUURjc5Xl7IaWi/OJJJumuoJFQJfDDyO46+hBWsfaVM65TBHq2eoZBhzl9EchxOijpkbRC8SVBQU0w==} + engines: {node: '>= 0.4'} + + side-channel-map@1.0.1: + resolution: {integrity: sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==} + engines: {node: '>= 0.4'} + + side-channel-weakmap@1.0.2: + resolution: {integrity: sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==} + engines: {node: '>= 0.4'} + + side-channel@1.1.0: + resolution: {integrity: sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==} + engines: {node: '>= 0.4'} + + source-map-js@1.2.1: + resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} + engines: {node: '>=0.10.0'} + + split2@4.2.0: + resolution: {integrity: sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==} + engines: {node: '>= 10.x'} + + statuses@2.0.2: + resolution: {integrity: sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==} + engines: {node: '>= 0.8'} + + string-width@4.2.3: + resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} + engines: {node: '>=8'} + + strip-ansi@6.0.1: + resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} + engines: {node: '>=8'} + + supports-color@7.2.0: + resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} + engines: {node: '>=8'} + + supports-color@8.1.1: + resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==} + engines: {node: '>=10'} + + tailwindcss@4.3.0: + resolution: {integrity: sha512-y6nxMGB1nMW9R6k96e5gdIFzcfL/gTJRNaqGes1YvkLnPVXzWgbqFF2yLC0T8G774n24cx3Pe8XrKoniCOAH+Q==} + + tapable@2.3.3: + resolution: {integrity: sha512-uxc/zpqFg6x7C8vOE7lh6Lbda8eEL9zmVm/PLeTPBRhh1xCgdWaQ+J1CUieGpIfm2HdtsUpRv+HshiasBMcc6A==} + engines: {node: '>=6'} + + tinyglobby@0.2.17: + resolution: {integrity: sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==} + engines: {node: '>=12.0.0'} + + toidentifier@1.0.1: + resolution: {integrity: sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==} + engines: {node: '>=0.6'} + + tree-kill@1.2.2: + resolution: {integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==} + hasBin: true + + tslib@2.8.1: + resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} + + type-is@1.6.18: + resolution: {integrity: sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==} + engines: {node: '>= 0.6'} + + typescript@5.9.3: + resolution: {integrity: sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==} + engines: {node: '>=14.17'} + hasBin: true + + undici-types@6.21.0: + resolution: {integrity: sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==} + + unpipe@1.0.0: + resolution: {integrity: sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==} + engines: {node: '>= 0.8'} + + update-browserslist-db@1.2.3: + resolution: {integrity: sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w==} + hasBin: true + peerDependencies: + browserslist: '>= 4.21.0' + + use-sync-external-store@1.6.0: + resolution: {integrity: sha512-Pp6GSwGP/NrPIrxVFAIkOQeyw8lFenOHijQWkUTrDvrF4ALqylP2C/KCkeS9dpUM3KvYRQhna5vt7IL95+ZQ9w==} + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 + + utils-merge@1.0.1: + resolution: {integrity: sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==} + engines: {node: '>= 0.4.0'} + + vary@1.1.2: + resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==} + engines: {node: '>= 0.8'} + + vite@6.4.3: + resolution: {integrity: sha512-NTKlcQjlAK7MlQoyb6LgaqHc8sso/pVyUJYWMws3jg21uTJw/LddqIFPcPqP6PzpgbIcZyKI85sFE4HBrQDA8A==} + engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} + hasBin: true + peerDependencies: + '@types/node': ^18.0.0 || ^20.0.0 || >=22.0.0 + jiti: '>=1.21.0' + less: '*' + lightningcss: ^1.21.0 + sass: '*' + sass-embedded: '*' + stylus: '*' + sugarss: '*' + terser: ^5.16.0 + tsx: ^4.8.1 + yaml: ^2.4.2 + peerDependenciesMeta: + '@types/node': + optional: true + jiti: + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + sass-embedded: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + tsx: + optional: true + yaml: + optional: true + + wrap-ansi@7.0.0: + resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} + engines: {node: '>=10'} + + ws@8.21.0: + resolution: {integrity: sha512-Vsp28b7DRcimFQvrqu2Wek3z1iYxDCWqHYB8Qsnk/S4RfaCQzPGPyBNuVjJV3cd6UiKtUtp6sNM77gWvzcCH+g==} + engines: {node: '>=10.0.0'} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: '>=5.0.2' + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + + xtend@4.0.2: + resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==} + engines: {node: '>=0.4'} + + y18n@5.0.8: + resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} + engines: {node: '>=10'} + + yallist@3.1.1: + resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} + + yargs-parser@21.1.1: + resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} + engines: {node: '>=12'} + + yargs@17.7.2: + resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} + engines: {node: '>=12'} + + zustand@4.5.7: + resolution: {integrity: sha512-CHOUy7mu3lbD6o6LJLfllpjkzhHXSBlX8B9+qPddUsIfeF5S/UZ5q0kmCsnRqT1UHFQZchNFDDzMbQsuesHWlw==} + engines: {node: '>=12.7.0'} + peerDependencies: + '@types/react': '>=16.8' + immer: '>=9.0.6' + react: '>=16.8' + peerDependenciesMeta: + '@types/react': + optional: true + immer: + optional: true + react: + optional: true + +snapshots: + + '@babel/code-frame@7.29.7': + dependencies: + '@babel/helper-validator-identifier': 7.29.7 + js-tokens: 4.0.0 + picocolors: 1.1.1 + + '@babel/compat-data@7.29.7': {} + + '@babel/core@7.29.7': + dependencies: + '@babel/code-frame': 7.29.7 + '@babel/generator': 7.29.7 + '@babel/helper-compilation-targets': 7.29.7 + '@babel/helper-module-transforms': 7.29.7(@babel/core@7.29.7) + '@babel/helpers': 7.29.7 + '@babel/parser': 7.29.7 + '@babel/template': 7.29.7 + '@babel/traverse': 7.29.7 + '@babel/types': 7.29.7 + '@jridgewell/remapping': 2.3.5 + convert-source-map: 2.0.0 + debug: 4.4.3 + gensync: 1.0.0-beta.2 + json5: 2.2.3 + semver: 6.3.1 + transitivePeerDependencies: + - supports-color + + '@babel/generator@7.29.7': + dependencies: + '@babel/parser': 7.29.7 + '@babel/types': 7.29.7 + '@jridgewell/gen-mapping': 0.3.13 + '@jridgewell/trace-mapping': 0.3.31 + jsesc: 3.1.0 + + '@babel/helper-compilation-targets@7.29.7': + dependencies: + '@babel/compat-data': 7.29.7 + '@babel/helper-validator-option': 7.29.7 + browserslist: 4.28.2 + lru-cache: 5.1.1 + semver: 6.3.1 + + '@babel/helper-globals@7.29.7': {} + + '@babel/helper-module-imports@7.29.7': + dependencies: + '@babel/traverse': 7.29.7 + '@babel/types': 7.29.7 + transitivePeerDependencies: + - supports-color + + '@babel/helper-module-transforms@7.29.7(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-module-imports': 7.29.7 + '@babel/helper-validator-identifier': 7.29.7 + '@babel/traverse': 7.29.7 + transitivePeerDependencies: + - supports-color + + '@babel/helper-plugin-utils@7.29.7': {} + + '@babel/helper-string-parser@7.29.7': {} + + '@babel/helper-validator-identifier@7.29.7': {} + + '@babel/helper-validator-option@7.29.7': {} + + '@babel/helpers@7.29.7': + dependencies: + '@babel/template': 7.29.7 + '@babel/types': 7.29.7 + + '@babel/parser@7.29.7': + dependencies: + '@babel/types': 7.29.7 + + '@babel/plugin-transform-react-jsx-self@7.29.7(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-plugin-utils': 7.29.7 + + '@babel/plugin-transform-react-jsx-source@7.29.7(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-plugin-utils': 7.29.7 + + '@babel/template@7.29.7': + dependencies: + '@babel/code-frame': 7.29.7 + '@babel/parser': 7.29.7 + '@babel/types': 7.29.7 + + '@babel/traverse@7.29.7': + dependencies: + '@babel/code-frame': 7.29.7 + '@babel/generator': 7.29.7 + '@babel/helper-globals': 7.29.7 + '@babel/parser': 7.29.7 + '@babel/template': 7.29.7 + '@babel/types': 7.29.7 + debug: 4.4.3 + transitivePeerDependencies: + - supports-color + + '@babel/types@7.29.7': + dependencies: + '@babel/helper-string-parser': 7.29.7 + '@babel/helper-validator-identifier': 7.29.7 + + '@esbuild/aix-ppc64@0.25.12': + optional: true + + '@esbuild/android-arm64@0.25.12': + optional: true + + '@esbuild/android-arm@0.25.12': + optional: true + + '@esbuild/android-x64@0.25.12': + optional: true + + '@esbuild/darwin-arm64@0.25.12': + optional: true + + '@esbuild/darwin-x64@0.25.12': + optional: true + + '@esbuild/freebsd-arm64@0.25.12': + optional: true + + '@esbuild/freebsd-x64@0.25.12': + optional: true + + '@esbuild/linux-arm64@0.25.12': + optional: true + + '@esbuild/linux-arm@0.25.12': + optional: true + + '@esbuild/linux-ia32@0.25.12': + optional: true + + '@esbuild/linux-loong64@0.25.12': + optional: true + + '@esbuild/linux-mips64el@0.25.12': + optional: true + + '@esbuild/linux-ppc64@0.25.12': + optional: true + + '@esbuild/linux-riscv64@0.25.12': + optional: true + + '@esbuild/linux-s390x@0.25.12': + optional: true + + '@esbuild/linux-x64@0.25.12': + optional: true + + '@esbuild/netbsd-arm64@0.25.12': + optional: true + + '@esbuild/netbsd-x64@0.25.12': + optional: true + + '@esbuild/openbsd-arm64@0.25.12': + optional: true + + '@esbuild/openbsd-x64@0.25.12': + optional: true + + '@esbuild/openharmony-arm64@0.25.12': + optional: true + + '@esbuild/sunos-x64@0.25.12': + optional: true + + '@esbuild/win32-arm64@0.25.12': + optional: true + + '@esbuild/win32-ia32@0.25.12': + optional: true + + '@esbuild/win32-x64@0.25.12': + optional: true + + '@jridgewell/gen-mapping@0.3.13': + dependencies: + '@jridgewell/sourcemap-codec': 1.5.5 + '@jridgewell/trace-mapping': 0.3.31 + + '@jridgewell/remapping@2.3.5': + dependencies: + '@jridgewell/gen-mapping': 0.3.13 + '@jridgewell/trace-mapping': 0.3.31 + + '@jridgewell/resolve-uri@3.1.2': {} + + '@jridgewell/sourcemap-codec@1.5.5': {} + + '@jridgewell/trace-mapping@0.3.31': + dependencies: + '@jridgewell/resolve-uri': 3.1.2 + '@jridgewell/sourcemap-codec': 1.5.5 + + '@rolldown/pluginutils@1.0.0-beta.27': {} + + '@rollup/rollup-android-arm-eabi@4.61.1': + optional: true + + '@rollup/rollup-android-arm64@4.61.1': + optional: true + + '@rollup/rollup-darwin-arm64@4.61.1': + optional: true + + '@rollup/rollup-darwin-x64@4.61.1': + optional: true + + '@rollup/rollup-freebsd-arm64@4.61.1': + optional: true + + '@rollup/rollup-freebsd-x64@4.61.1': + optional: true + + '@rollup/rollup-linux-arm-gnueabihf@4.61.1': + optional: true + + '@rollup/rollup-linux-arm-musleabihf@4.61.1': + optional: true + + '@rollup/rollup-linux-arm64-gnu@4.61.1': + optional: true + + '@rollup/rollup-linux-arm64-musl@4.61.1': + optional: true + + '@rollup/rollup-linux-loong64-gnu@4.61.1': + optional: true + + '@rollup/rollup-linux-loong64-musl@4.61.1': + optional: true + + '@rollup/rollup-linux-ppc64-gnu@4.61.1': + optional: true + + '@rollup/rollup-linux-ppc64-musl@4.61.1': + optional: true + + '@rollup/rollup-linux-riscv64-gnu@4.61.1': + optional: true + + '@rollup/rollup-linux-riscv64-musl@4.61.1': + optional: true + + '@rollup/rollup-linux-s390x-gnu@4.61.1': + optional: true + + '@rollup/rollup-linux-x64-gnu@4.61.1': + optional: true + + '@rollup/rollup-linux-x64-musl@4.61.1': + optional: true + + '@rollup/rollup-openbsd-x64@4.61.1': + optional: true + + '@rollup/rollup-openharmony-arm64@4.61.1': + optional: true + + '@rollup/rollup-win32-arm64-msvc@4.61.1': + optional: true + + '@rollup/rollup-win32-ia32-msvc@4.61.1': + optional: true + + '@rollup/rollup-win32-x64-gnu@4.61.1': + optional: true + + '@rollup/rollup-win32-x64-msvc@4.61.1': + optional: true + + '@tailwindcss/node@4.3.0': + dependencies: + '@jridgewell/remapping': 2.3.5 + enhanced-resolve: 5.23.0 + jiti: 2.7.0 + lightningcss: 1.32.0 + magic-string: 0.30.21 + source-map-js: 1.2.1 + tailwindcss: 4.3.0 + + '@tailwindcss/oxide-android-arm64@4.3.0': + optional: true + + '@tailwindcss/oxide-darwin-arm64@4.3.0': + optional: true + + '@tailwindcss/oxide-darwin-x64@4.3.0': + optional: true + + '@tailwindcss/oxide-freebsd-x64@4.3.0': + optional: true + + '@tailwindcss/oxide-linux-arm-gnueabihf@4.3.0': + optional: true + + '@tailwindcss/oxide-linux-arm64-gnu@4.3.0': + optional: true + + '@tailwindcss/oxide-linux-arm64-musl@4.3.0': + optional: true + + '@tailwindcss/oxide-linux-x64-gnu@4.3.0': + optional: true + + '@tailwindcss/oxide-linux-x64-musl@4.3.0': + optional: true + + '@tailwindcss/oxide-wasm32-wasi@4.3.0': + optional: true + + '@tailwindcss/oxide-win32-arm64-msvc@4.3.0': + optional: true + + '@tailwindcss/oxide-win32-x64-msvc@4.3.0': + optional: true + + '@tailwindcss/oxide@4.3.0': + optionalDependencies: + '@tailwindcss/oxide-android-arm64': 4.3.0 + '@tailwindcss/oxide-darwin-arm64': 4.3.0 + '@tailwindcss/oxide-darwin-x64': 4.3.0 + '@tailwindcss/oxide-freebsd-x64': 4.3.0 + '@tailwindcss/oxide-linux-arm-gnueabihf': 4.3.0 + '@tailwindcss/oxide-linux-arm64-gnu': 4.3.0 + '@tailwindcss/oxide-linux-arm64-musl': 4.3.0 + '@tailwindcss/oxide-linux-x64-gnu': 4.3.0 + '@tailwindcss/oxide-linux-x64-musl': 4.3.0 + '@tailwindcss/oxide-wasm32-wasi': 4.3.0 + '@tailwindcss/oxide-win32-arm64-msvc': 4.3.0 + '@tailwindcss/oxide-win32-x64-msvc': 4.3.0 + + '@tailwindcss/vite@4.3.0(vite@6.4.3(@types/node@22.19.20)(jiti@2.7.0)(lightningcss@1.32.0))': + dependencies: + '@tailwindcss/node': 4.3.0 + '@tailwindcss/oxide': 4.3.0 + tailwindcss: 4.3.0 + vite: 6.4.3(@types/node@22.19.20)(jiti@2.7.0)(lightningcss@1.32.0) + + '@types/babel__core@7.20.5': + dependencies: + '@babel/parser': 7.29.7 + '@babel/types': 7.29.7 + '@types/babel__generator': 7.27.0 + '@types/babel__template': 7.4.4 + '@types/babel__traverse': 7.28.0 + + '@types/babel__generator@7.27.0': + dependencies: + '@babel/types': 7.29.7 + + '@types/babel__template@7.4.4': + dependencies: + '@babel/parser': 7.29.7 + '@babel/types': 7.29.7 + + '@types/babel__traverse@7.28.0': + dependencies: + '@babel/types': 7.29.7 + + '@types/body-parser@1.19.6': + dependencies: + '@types/connect': 3.4.38 + '@types/node': 22.19.20 + + '@types/connect@3.4.38': + dependencies: + '@types/node': 22.19.20 + + '@types/d3-color@3.1.3': {} + + '@types/d3-drag@3.0.7': + dependencies: + '@types/d3-selection': 3.0.11 + + '@types/d3-interpolate@3.0.4': + dependencies: + '@types/d3-color': 3.1.3 + + '@types/d3-selection@3.0.11': {} + + '@types/d3-transition@3.0.9': + dependencies: + '@types/d3-selection': 3.0.11 + + '@types/d3-zoom@3.0.8': + dependencies: + '@types/d3-interpolate': 3.0.4 + '@types/d3-selection': 3.0.11 + + '@types/estree@1.0.9': {} + + '@types/express-serve-static-core@5.1.1': + dependencies: + '@types/node': 22.19.20 + '@types/qs': 6.15.1 + '@types/range-parser': 1.2.7 + '@types/send': 1.2.1 + + '@types/express@5.0.6': + dependencies: + '@types/body-parser': 1.19.6 + '@types/express-serve-static-core': 5.1.1 + '@types/serve-static': 2.2.0 + + '@types/http-errors@2.0.5': {} + + '@types/node@22.19.20': + dependencies: + undici-types: 6.21.0 + + '@types/pg@8.20.0': + dependencies: + '@types/node': 22.19.20 + pg-protocol: 1.14.0 + pg-types: 2.2.0 + + '@types/qs@6.15.1': {} + + '@types/range-parser@1.2.7': {} + + '@types/react-dom@19.2.3(@types/react@19.2.17)': + dependencies: + '@types/react': 19.2.17 + + '@types/react@19.2.17': + dependencies: + csstype: 3.2.3 + + '@types/send@1.2.1': + dependencies: + '@types/node': 22.19.20 + + '@types/serve-static@2.2.0': + dependencies: + '@types/http-errors': 2.0.5 + '@types/node': 22.19.20 + + '@types/ws@8.18.1': + dependencies: + '@types/node': 22.19.20 + + '@vitejs/plugin-react@4.7.0(vite@6.4.3(@types/node@22.19.20)(jiti@2.7.0)(lightningcss@1.32.0))': + dependencies: + '@babel/core': 7.29.7 + '@babel/plugin-transform-react-jsx-self': 7.29.7(@babel/core@7.29.7) + '@babel/plugin-transform-react-jsx-source': 7.29.7(@babel/core@7.29.7) + '@rolldown/pluginutils': 1.0.0-beta.27 + '@types/babel__core': 7.20.5 + react-refresh: 0.17.0 + vite: 6.4.3(@types/node@22.19.20)(jiti@2.7.0)(lightningcss@1.32.0) + transitivePeerDependencies: + - supports-color + + '@xterm/addon-fit@0.10.0(@xterm/xterm@5.5.0)': + dependencies: + '@xterm/xterm': 5.5.0 + + '@xterm/xterm@5.5.0': {} + + '@xyflow/react@12.11.0(@types/react-dom@19.2.3(@types/react@19.2.17))(@types/react@19.2.17)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)': + dependencies: + '@xyflow/system': 0.0.77 + classcat: 5.0.5 + react: 19.2.7 + react-dom: 19.2.7(react@19.2.7) + zustand: 4.5.7(@types/react@19.2.17)(react@19.2.7) + optionalDependencies: + '@types/react': 19.2.17 + '@types/react-dom': 19.2.3(@types/react@19.2.17) + transitivePeerDependencies: + - immer + + '@xyflow/system@0.0.77': + dependencies: + '@types/d3-drag': 3.0.7 + '@types/d3-interpolate': 3.0.4 + '@types/d3-selection': 3.0.11 + '@types/d3-transition': 3.0.9 + '@types/d3-zoom': 3.0.8 + d3-drag: 3.0.0 + d3-interpolate: 3.0.1 + d3-selection: 3.0.0 + d3-zoom: 3.0.0 + + accepts@1.3.8: + dependencies: + mime-types: 2.1.35 + negotiator: 0.6.3 + + ansi-regex@5.0.1: {} + + ansi-styles@4.3.0: + dependencies: + color-convert: 2.0.1 + + array-flatten@1.1.1: {} + + baseline-browser-mapping@2.10.34: {} + + body-parser@1.20.5: + dependencies: + bytes: 3.1.2 + content-type: 1.0.5 + debug: 2.6.9 + depd: 2.0.0 + destroy: 1.2.0 + http-errors: 2.0.1 + iconv-lite: 0.4.24 + on-finished: 2.4.1 + qs: 6.15.2 + raw-body: 2.5.3 + type-is: 1.6.18 + unpipe: 1.0.0 + transitivePeerDependencies: + - supports-color + + browserslist@4.28.2: + dependencies: + baseline-browser-mapping: 2.10.34 + caniuse-lite: 1.0.30001797 + electron-to-chromium: 1.5.368 + node-releases: 2.0.47 + update-browserslist-db: 1.2.3(browserslist@4.28.2) + + bytes@3.1.2: {} + + call-bind-apply-helpers@1.0.2: + dependencies: + es-errors: 1.3.0 + function-bind: 1.1.2 + + call-bound@1.0.4: + dependencies: + call-bind-apply-helpers: 1.0.2 + get-intrinsic: 1.3.0 + + caniuse-lite@1.0.30001797: {} + + chalk@4.1.2: + dependencies: + ansi-styles: 4.3.0 + supports-color: 7.2.0 + + classcat@5.0.5: {} + + cliui@8.0.1: + dependencies: + string-width: 4.2.3 + strip-ansi: 6.0.1 + wrap-ansi: 7.0.0 + + color-convert@2.0.1: + dependencies: + color-name: 1.1.4 + + color-name@1.1.4: {} + + commander@15.0.0: {} + + concurrently@9.2.1: + dependencies: + chalk: 4.1.2 + rxjs: 7.8.2 + shell-quote: 1.8.3 + supports-color: 8.1.1 + tree-kill: 1.2.2 + yargs: 17.7.2 + + content-disposition@0.5.4: + dependencies: + safe-buffer: 5.2.1 + + content-type@1.0.5: {} + + convert-source-map@2.0.0: {} + + cookie-signature@1.0.7: {} + + cookie@0.7.2: {} + + csstype@3.2.3: {} + + d3-color@3.1.0: {} + + d3-dispatch@3.0.1: {} + + d3-drag@3.0.0: + dependencies: + d3-dispatch: 3.0.1 + d3-selection: 3.0.0 + + d3-ease@3.0.1: {} + + d3-interpolate@3.0.1: + dependencies: + d3-color: 3.1.0 + + d3-selection@3.0.0: {} + + d3-timer@3.0.1: {} + + d3-transition@3.0.1(d3-selection@3.0.0): + dependencies: + d3-color: 3.1.0 + d3-dispatch: 3.0.1 + d3-ease: 3.0.1 + d3-interpolate: 3.0.1 + d3-selection: 3.0.0 + d3-timer: 3.0.1 + + d3-zoom@3.0.0: + dependencies: + d3-dispatch: 3.0.1 + d3-drag: 3.0.0 + d3-interpolate: 3.0.1 + d3-selection: 3.0.0 + d3-transition: 3.0.1(d3-selection@3.0.0) + + debug@2.6.9: + dependencies: + ms: 2.0.0 + + debug@4.4.3: + dependencies: + ms: 2.1.3 + + depd@2.0.0: {} + + destroy@1.2.0: {} + + detect-libc@2.1.2: {} + + dunder-proto@1.0.1: + dependencies: + call-bind-apply-helpers: 1.0.2 + es-errors: 1.3.0 + gopd: 1.2.0 + + ee-first@1.1.1: {} + + electron-to-chromium@1.5.368: {} + + emoji-regex@8.0.0: {} + + encodeurl@2.0.0: {} + + enhanced-resolve@5.23.0: + dependencies: + graceful-fs: 4.2.11 + tapable: 2.3.3 + + es-define-property@1.0.1: {} + + es-errors@1.3.0: {} + + es-object-atoms@1.1.2: + dependencies: + es-errors: 1.3.0 + + esbuild@0.25.12: + optionalDependencies: + '@esbuild/aix-ppc64': 0.25.12 + '@esbuild/android-arm': 0.25.12 + '@esbuild/android-arm64': 0.25.12 + '@esbuild/android-x64': 0.25.12 + '@esbuild/darwin-arm64': 0.25.12 + '@esbuild/darwin-x64': 0.25.12 + '@esbuild/freebsd-arm64': 0.25.12 + '@esbuild/freebsd-x64': 0.25.12 + '@esbuild/linux-arm': 0.25.12 + '@esbuild/linux-arm64': 0.25.12 + '@esbuild/linux-ia32': 0.25.12 + '@esbuild/linux-loong64': 0.25.12 + '@esbuild/linux-mips64el': 0.25.12 + '@esbuild/linux-ppc64': 0.25.12 + '@esbuild/linux-riscv64': 0.25.12 + '@esbuild/linux-s390x': 0.25.12 + '@esbuild/linux-x64': 0.25.12 + '@esbuild/netbsd-arm64': 0.25.12 + '@esbuild/netbsd-x64': 0.25.12 + '@esbuild/openbsd-arm64': 0.25.12 + '@esbuild/openbsd-x64': 0.25.12 + '@esbuild/openharmony-arm64': 0.25.12 + '@esbuild/sunos-x64': 0.25.12 + '@esbuild/win32-arm64': 0.25.12 + '@esbuild/win32-ia32': 0.25.12 + '@esbuild/win32-x64': 0.25.12 + + escalade@3.2.0: {} + + escape-html@1.0.3: {} + + etag@1.8.1: {} + + express@4.22.2: + dependencies: + accepts: 1.3.8 + array-flatten: 1.1.1 + body-parser: 1.20.5 + content-disposition: 0.5.4 + content-type: 1.0.5 + cookie: 0.7.2 + cookie-signature: 1.0.7 + debug: 2.6.9 + depd: 2.0.0 + encodeurl: 2.0.0 + escape-html: 1.0.3 + etag: 1.8.1 + finalhandler: 1.3.2 + fresh: 0.5.2 + http-errors: 2.0.1 + merge-descriptors: 1.0.3 + methods: 1.1.2 + on-finished: 2.4.1 + parseurl: 1.3.3 + path-to-regexp: 0.1.13 + proxy-addr: 2.0.7 + qs: 6.15.2 + range-parser: 1.2.1 + safe-buffer: 5.2.1 + send: 0.19.2 + serve-static: 1.16.3 + setprototypeof: 1.2.0 + statuses: 2.0.2 + type-is: 1.6.18 + utils-merge: 1.0.1 + vary: 1.1.2 + transitivePeerDependencies: + - supports-color + + fdir@6.5.0(picomatch@4.0.4): + optionalDependencies: + picomatch: 4.0.4 + + finalhandler@1.3.2: + dependencies: + debug: 2.6.9 + encodeurl: 2.0.0 + escape-html: 1.0.3 + on-finished: 2.4.1 + parseurl: 1.3.3 + statuses: 2.0.2 + unpipe: 1.0.0 + transitivePeerDependencies: + - supports-color + + forwarded@0.2.0: {} + + fresh@0.5.2: {} + + fsevents@2.3.3: + optional: true + + function-bind@1.1.2: {} + + gensync@1.0.0-beta.2: {} + + get-caller-file@2.0.5: {} + + get-intrinsic@1.3.0: + dependencies: + call-bind-apply-helpers: 1.0.2 + es-define-property: 1.0.1 + es-errors: 1.3.0 + es-object-atoms: 1.1.2 + function-bind: 1.1.2 + get-proto: 1.0.1 + gopd: 1.2.0 + has-symbols: 1.1.0 + hasown: 2.0.4 + math-intrinsics: 1.1.0 + + get-proto@1.0.1: + dependencies: + dunder-proto: 1.0.1 + es-object-atoms: 1.1.2 + + gopd@1.2.0: {} + + graceful-fs@4.2.11: {} + + has-flag@4.0.0: {} + + has-symbols@1.1.0: {} + + hasown@2.0.4: + dependencies: + function-bind: 1.1.2 + + http-errors@2.0.1: + dependencies: + depd: 2.0.0 + inherits: 2.0.4 + setprototypeof: 1.2.0 + statuses: 2.0.2 + toidentifier: 1.0.1 + + iconv-lite@0.4.24: + dependencies: + safer-buffer: 2.1.2 + + inherits@2.0.4: {} + + ipaddr.js@1.9.1: {} + + is-fullwidth-code-point@3.0.0: {} + + jiti@2.7.0: {} + + js-tokens@4.0.0: {} + + jsesc@3.1.0: {} + + json5@2.2.3: {} + + kubernetesjs@0.7.7: {} + + lightningcss-android-arm64@1.32.0: + optional: true + + lightningcss-darwin-arm64@1.32.0: + optional: true + + lightningcss-darwin-x64@1.32.0: + optional: true + + lightningcss-freebsd-x64@1.32.0: + optional: true + + lightningcss-linux-arm-gnueabihf@1.32.0: + optional: true + + lightningcss-linux-arm64-gnu@1.32.0: + optional: true + + lightningcss-linux-arm64-musl@1.32.0: + optional: true + + lightningcss-linux-x64-gnu@1.32.0: + optional: true + + lightningcss-linux-x64-musl@1.32.0: + optional: true + + lightningcss-win32-arm64-msvc@1.32.0: + optional: true + + lightningcss-win32-x64-msvc@1.32.0: + optional: true + + lightningcss@1.32.0: + dependencies: + detect-libc: 2.1.2 + optionalDependencies: + lightningcss-android-arm64: 1.32.0 + lightningcss-darwin-arm64: 1.32.0 + lightningcss-darwin-x64: 1.32.0 + lightningcss-freebsd-x64: 1.32.0 + lightningcss-linux-arm-gnueabihf: 1.32.0 + lightningcss-linux-arm64-gnu: 1.32.0 + lightningcss-linux-arm64-musl: 1.32.0 + lightningcss-linux-x64-gnu: 1.32.0 + lightningcss-linux-x64-musl: 1.32.0 + lightningcss-win32-arm64-msvc: 1.32.0 + lightningcss-win32-x64-msvc: 1.32.0 + + lru-cache@5.1.1: + dependencies: + yallist: 3.1.1 + + lucide-react@0.525.0(react@19.2.7): + dependencies: + react: 19.2.7 + + magic-string@0.30.21: + dependencies: + '@jridgewell/sourcemap-codec': 1.5.5 + + math-intrinsics@1.1.0: {} + + media-typer@0.3.0: {} + + merge-descriptors@1.0.3: {} + + methods@1.1.2: {} + + mime-db@1.52.0: {} + + mime-types@2.1.35: + dependencies: + mime-db: 1.52.0 + + mime@1.6.0: {} + + ms@2.0.0: {} + + ms@2.1.3: {} + + nanoid@3.3.12: {} + + negotiator@0.6.3: {} + + node-releases@2.0.47: {} + + object-inspect@1.13.4: {} + + on-finished@2.4.1: + dependencies: + ee-first: 1.1.1 + + parseurl@1.3.3: {} + + path-to-regexp@0.1.13: {} + + pg-cloudflare@1.4.0: + optional: true + + pg-connection-string@2.13.0: {} + + pg-int8@1.0.1: {} + + pg-pool@3.14.0(pg@8.21.0): + dependencies: + pg: 8.21.0 + + pg-protocol@1.14.0: {} + + pg-types@2.2.0: + dependencies: + pg-int8: 1.0.1 + postgres-array: 2.0.0 + postgres-bytea: 1.0.1 + postgres-date: 1.0.7 + postgres-interval: 1.2.0 + + pg@8.21.0: + dependencies: + pg-connection-string: 2.13.0 + pg-pool: 3.14.0(pg@8.21.0) + pg-protocol: 1.14.0 + pg-types: 2.2.0 + pgpass: 1.0.5 + optionalDependencies: + pg-cloudflare: 1.4.0 + + pgpass@1.0.5: + dependencies: + split2: 4.2.0 + + picocolors@1.1.1: {} + + picomatch@4.0.4: {} + + postcss@8.5.15: + dependencies: + nanoid: 3.3.12 + picocolors: 1.1.1 + source-map-js: 1.2.1 + + postgres-array@2.0.0: {} + + postgres-bytea@1.0.1: {} + + postgres-date@1.0.7: {} + + postgres-interval@1.2.0: + dependencies: + xtend: 4.0.2 + + proxy-addr@2.0.7: + dependencies: + forwarded: 0.2.0 + ipaddr.js: 1.9.1 + + qs@6.15.2: + dependencies: + side-channel: 1.1.0 + + range-parser@1.2.1: {} + + raw-body@2.5.3: + dependencies: + bytes: 3.1.2 + http-errors: 2.0.1 + iconv-lite: 0.4.24 + unpipe: 1.0.0 + + react-dom@19.2.7(react@19.2.7): + dependencies: + react: 19.2.7 + scheduler: 0.27.0 + + react-refresh@0.17.0: {} + + react@19.2.7: {} + + require-directory@2.1.1: {} + + rollup@4.61.1: + dependencies: + '@types/estree': 1.0.9 + optionalDependencies: + '@rollup/rollup-android-arm-eabi': 4.61.1 + '@rollup/rollup-android-arm64': 4.61.1 + '@rollup/rollup-darwin-arm64': 4.61.1 + '@rollup/rollup-darwin-x64': 4.61.1 + '@rollup/rollup-freebsd-arm64': 4.61.1 + '@rollup/rollup-freebsd-x64': 4.61.1 + '@rollup/rollup-linux-arm-gnueabihf': 4.61.1 + '@rollup/rollup-linux-arm-musleabihf': 4.61.1 + '@rollup/rollup-linux-arm64-gnu': 4.61.1 + '@rollup/rollup-linux-arm64-musl': 4.61.1 + '@rollup/rollup-linux-loong64-gnu': 4.61.1 + '@rollup/rollup-linux-loong64-musl': 4.61.1 + '@rollup/rollup-linux-ppc64-gnu': 4.61.1 + '@rollup/rollup-linux-ppc64-musl': 4.61.1 + '@rollup/rollup-linux-riscv64-gnu': 4.61.1 + '@rollup/rollup-linux-riscv64-musl': 4.61.1 + '@rollup/rollup-linux-s390x-gnu': 4.61.1 + '@rollup/rollup-linux-x64-gnu': 4.61.1 + '@rollup/rollup-linux-x64-musl': 4.61.1 + '@rollup/rollup-openbsd-x64': 4.61.1 + '@rollup/rollup-openharmony-arm64': 4.61.1 + '@rollup/rollup-win32-arm64-msvc': 4.61.1 + '@rollup/rollup-win32-ia32-msvc': 4.61.1 + '@rollup/rollup-win32-x64-gnu': 4.61.1 + '@rollup/rollup-win32-x64-msvc': 4.61.1 + fsevents: 2.3.3 + + rxjs@7.8.2: + dependencies: + tslib: 2.8.1 + + safe-buffer@5.2.1: {} + + safer-buffer@2.1.2: {} + + scheduler@0.27.0: {} + + semver@6.3.1: {} + + send@0.19.2: + dependencies: + debug: 2.6.9 + depd: 2.0.0 + destroy: 1.2.0 + encodeurl: 2.0.0 + escape-html: 1.0.3 + etag: 1.8.1 + fresh: 0.5.2 + http-errors: 2.0.1 + mime: 1.6.0 + ms: 2.1.3 + on-finished: 2.4.1 + range-parser: 1.2.1 + statuses: 2.0.2 + transitivePeerDependencies: + - supports-color + + serve-static@1.16.3: + dependencies: + encodeurl: 2.0.0 + escape-html: 1.0.3 + parseurl: 1.3.3 + send: 0.19.2 + transitivePeerDependencies: + - supports-color + + setprototypeof@1.2.0: {} + + shell-quote@1.8.3: {} + + side-channel-list@1.0.1: + dependencies: + es-errors: 1.3.0 + object-inspect: 1.13.4 + + side-channel-map@1.0.1: + dependencies: + call-bound: 1.0.4 + es-errors: 1.3.0 + get-intrinsic: 1.3.0 + object-inspect: 1.13.4 + + side-channel-weakmap@1.0.2: + dependencies: + call-bound: 1.0.4 + es-errors: 1.3.0 + get-intrinsic: 1.3.0 + object-inspect: 1.13.4 + side-channel-map: 1.0.1 + + side-channel@1.1.0: + dependencies: + es-errors: 1.3.0 + object-inspect: 1.13.4 + side-channel-list: 1.0.1 + side-channel-map: 1.0.1 + side-channel-weakmap: 1.0.2 + + source-map-js@1.2.1: {} + + split2@4.2.0: {} + + statuses@2.0.2: {} + + string-width@4.2.3: + dependencies: + emoji-regex: 8.0.0 + is-fullwidth-code-point: 3.0.0 + strip-ansi: 6.0.1 + + strip-ansi@6.0.1: + dependencies: + ansi-regex: 5.0.1 + + supports-color@7.2.0: + dependencies: + has-flag: 4.0.0 + + supports-color@8.1.1: + dependencies: + has-flag: 4.0.0 + + tailwindcss@4.3.0: {} + + tapable@2.3.3: {} + + tinyglobby@0.2.17: + dependencies: + fdir: 6.5.0(picomatch@4.0.4) + picomatch: 4.0.4 + + toidentifier@1.0.1: {} + + tree-kill@1.2.2: {} + + tslib@2.8.1: {} + + type-is@1.6.18: + dependencies: + media-typer: 0.3.0 + mime-types: 2.1.35 + + typescript@5.9.3: {} + + undici-types@6.21.0: {} + + unpipe@1.0.0: {} + + update-browserslist-db@1.2.3(browserslist@4.28.2): + dependencies: + browserslist: 4.28.2 + escalade: 3.2.0 + picocolors: 1.1.1 + + use-sync-external-store@1.6.0(react@19.2.7): + dependencies: + react: 19.2.7 + + utils-merge@1.0.1: {} + + vary@1.1.2: {} + + vite@6.4.3(@types/node@22.19.20)(jiti@2.7.0)(lightningcss@1.32.0): + dependencies: + esbuild: 0.25.12 + fdir: 6.5.0(picomatch@4.0.4) + picomatch: 4.0.4 + postcss: 8.5.15 + rollup: 4.61.1 + tinyglobby: 0.2.17 + optionalDependencies: + '@types/node': 22.19.20 + fsevents: 2.3.3 + jiti: 2.7.0 + lightningcss: 1.32.0 + + wrap-ansi@7.0.0: + dependencies: + ansi-styles: 4.3.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 + + ws@8.21.0: {} + + xtend@4.0.2: {} + + y18n@5.0.8: {} + + yallist@3.1.1: {} + + yargs-parser@21.1.1: {} + + yargs@17.7.2: + dependencies: + cliui: 8.0.1 + escalade: 3.2.0 + get-caller-file: 2.0.5 + require-directory: 2.1.1 + string-width: 4.2.3 + y18n: 5.0.8 + yargs-parser: 21.1.1 + + zustand@4.5.7(@types/react@19.2.17)(react@19.2.7): + dependencies: + use-sync-external-store: 1.6.0(react@19.2.7) + optionalDependencies: + '@types/react': 19.2.17 + react: 19.2.7 diff --git a/www/screenshots/secrets-editor.png b/www/screenshots/secrets-editor.png new file mode 100644 index 00000000..bdb1b9aa Binary files /dev/null and b/www/screenshots/secrets-editor.png differ diff --git a/www/server/index.ts b/www/server/index.ts new file mode 100644 index 00000000..77a1f5fd --- /dev/null +++ b/www/server/index.ts @@ -0,0 +1,655 @@ +import express from 'express'; +import { createServer } from 'http'; +import { WebSocketServer, WebSocket } from 'ws'; +import { Pool } from 'pg'; +import { spawn } from 'child_process'; +import { readFileSync, writeFileSync, existsSync } from 'fs'; +import { resolve } from 'path'; + +const PORT = parseInt(process.env.PLATFORM_UI_PORT || '3456', 10); +const app = express(); +const server = createServer(app); + +app.use(express.json()); + +// ─── Postgres pool ────────────────────────────────────────────────────────── + +const pool = new Pool({ + host: process.env.PGHOST || 'localhost', + port: parseInt(process.env.PGPORT || '5432', 10), + user: process.env.PGUSER || 'postgres', + password: process.env.PGPASSWORD || 'password', + database: process.env.PGDATABASE || 'constructive-functions-db1', +}); + +// ─── Helpers ──────────────────────────────────────────────────────────────── + +function parseRequirements(raw: string): Array<{ name: string; required: boolean }> { + if (!raw || raw === '{}') return []; + const inner = raw.slice(1, -1); + const items: Array<{ name: string; required: boolean }> = []; + for (const match of inner.matchAll(/"?\(([^,]+),(t|f)\)"?/g)) { + items.push({ name: match[1], required: match[2] === 't' }); + } + return items; +} + +// ─── REST API — Functions ─────────────────────────────────────────────────── + +app.get('/api/functions', async (_req, res) => { + try { + const result = await pool.query(` + SELECT name, task_identifier, service_url, is_invocable, is_built_in, + scope, description, required_secrets, required_configs, + payload_schema, namespace_id, + (SELECT n.name FROM constructive_infra_public.platform_namespaces n WHERE n.id = f.namespace_id) as namespace, + created_at, updated_at + FROM constructive_infra_public.platform_function_definitions f + ORDER BY name + `); + const rows = result.rows.map((r: any) => ({ + ...r, + required_secrets: parseRequirements(r.required_secrets), + required_configs: parseRequirements(r.required_configs), + })); + res.json(rows); + } catch (err: any) { + res.status(500).json({ error: err.message }); + } +}); + +// ─── REST API — FBP Node Definitions ──────────────────────────────────────── + +app.get('/api/definitions', async (_req, res) => { + try { + const result = await pool.query(` + SELECT name, task_identifier, service_url, is_invocable, + scope, description, required_secrets, required_configs, + payload_schema + FROM constructive_infra_public.platform_function_definitions + ORDER BY name + `); + + const definitions = result.rows.map((r: any) => { + const secrets = parseRequirements(r.required_secrets); + const configs = parseRequirements(r.required_configs); + const schema = r.payload_schema; + + const props = [ + ...secrets.map((s: { name: string; required: boolean }) => ({ + name: s.name, + type: 'secret', + required: s.required, + description: `Secret: ${s.name}`, + })), + ...configs.map((c: { name: string; required: boolean }) => ({ + name: c.name, + type: 'config', + required: c.required, + description: `Config: ${c.name}`, + })), + ]; + + const inputs = [{ + name: 'payload', + type: 'json', + description: 'Job payload object', + ...(schema ? { schema } : {}), + }]; + + return { + context: r.task_identifier, + name: r.name, + category: r.scope || 'default', + description: r.description, + inputs, + outputs: [{ name: 'result', type: 'json', description: 'Handler return value' }], + props: props.length > 0 ? props : undefined, + }; + }); + + res.json(definitions); + } catch (err: any) { + res.status(500).json({ error: err.message }); + } +}); + +// ─── REST API — Secrets ───────────────────────────────────────────────────── + +app.get('/api/secrets', async (_req, res) => { + try { + // Derive secret/config definitions from function definitions (inlined arrays) + const result = await pool.query(` + SELECT DISTINCT (r).name, (r).required, 'secret' AS kind + FROM constructive_infra_public.platform_function_definitions, + unnest(required_secrets) AS r + WHERE is_invocable = true + UNION + SELECT DISTINCT (r).name, (r).required, 'config' AS kind + FROM constructive_infra_public.platform_function_definitions, + unnest(required_configs) AS r + WHERE is_invocable = true + ORDER BY name + `); + res.json(result.rows); + } catch (err: any) { + res.status(500).json({ error: err.message }); + } +}); + +// ─── .env helpers (must be declared before Secret Values endpoints) ──────── + +const PROJECT_ROOT = process.env.PROJECT_ROOT || resolve(process.cwd(), '..'); +const ENV_PATH = resolve(PROJECT_ROOT, '.env'); + +function parseDotEnv(filePath: string): Record { + if (!existsSync(filePath)) return {}; + const vars: Record = {}; + for (const line of readFileSync(filePath, 'utf-8').split('\n')) { + const trimmed = line.trim(); + if (!trimmed || trimmed.startsWith('#')) continue; + const eqIdx = trimmed.indexOf('='); + if (eqIdx === -1) continue; + const key = trimmed.slice(0, eqIdx).trim(); + let val = trimmed.slice(eqIdx + 1).trim(); + if ((val.startsWith('"') && val.endsWith('"')) || + (val.startsWith("'") && val.endsWith("'"))) { + val = val.slice(1, -1); + } + vars[key] = val; + } + return vars; +} + +function writeDotEnv(filePath: string, vars: Record): void { + const lines: string[] = [ + '# Auto-generated by Platform UI — edits here are safe.', + '# Values can also be edited from http://localhost:5173 → Secrets tab.', + '', + ]; + const groups: Record = { + postgres: ['POSTGRES_PASSWORD', 'PGADMIN_DEFAULT_PASSWORD', 'PGHOST', 'PGPORT', 'PGUSER', 'PGPASSWORD', 'PGDATABASE'], + email_mailgun: ['MAILGUN_API_KEY', 'MAILGUN_KEY', 'MAILGUN_DOMAIN', 'MAILGUN_FROM', 'MAILGUN_REPLY'], + email_smtp: ['EMAIL_SEND_USE_SMTP', 'SMTP_HOST', 'SMTP_PORT', 'SMTP_FROM'], + dryrun: ['SEND_EMAIL_DRY_RUN', 'SEND_VERIFICATION_LINK_DRY_RUN'], + minio: ['MINIO_ROOT_USER', 'MINIO_ROOT_PASSWORD'], + aws: ['ROUTE53_ACCESS_KEY_ID', 'ROUTE53_HOSTED_ZONE_ID'], + }; + const groupLabels: Record = { + postgres: '# --- PostgreSQL ---', + email_mailgun: '# --- Email: Mailgun ---', + email_smtp: '# --- Email: SMTP / Mailpit ---', + dryrun: '# --- Function dry-run toggles ---', + minio: '# --- MinIO ---', + aws: '# --- AWS ---', + }; + + const written = new Set(); + for (const [group, keys] of Object.entries(groups)) { + const groupVars = keys.filter((k) => k in vars); + if (groupVars.length === 0) continue; + lines.push(groupLabels[group] || `# --- ${group} ---`); + for (const key of groupVars) { + lines.push(`${key}=${vars[key]}`); + written.add(key); + } + lines.push(''); + } + // Write remaining keys not in any group + const remaining = Object.entries(vars).filter(([k]) => !written.has(k)); + if (remaining.length > 0) { + lines.push('# --- Other ---'); + for (const [key, val] of remaining) { + lines.push(`${key}=${val}`); + } + lines.push(''); + } + + writeFileSync(filePath, lines.join('\n'), 'utf-8'); +} + +// ─── REST API — Secret/Config Values (real upstream tables) ───────────────── + +const DB_ID = '00000000-0000-0000-0000-000000000000'; + +async function getDefaultNamespaceId(): Promise { + const result = await pool.query( + `SELECT id FROM constructive_infra_public.platform_namespaces + WHERE name = 'default' AND database_id = $1 LIMIT 1`, + [DB_ID] + ); + if (result.rows.length > 0) return result.rows[0].id; + throw new Error('Default namespace not found — deploy constructive-infra-seed first'); +} + +async function getSecretNames(): Promise> { + const result = await pool.query(` + SELECT DISTINCT (r).name AS secret_name + FROM constructive_infra_public.platform_function_definitions, + unnest(required_secrets) AS r + WHERE is_invocable = true + `); + return new Set(result.rows.map((r: any) => r.secret_name)); +} + +async function getConfigNames(): Promise> { + const result = await pool.query(` + SELECT DISTINCT (r).name AS config_name + FROM constructive_infra_public.platform_function_definitions, + unnest(required_configs) AS r + WHERE is_invocable = true + `); + return new Set(result.rows.map((r: any) => r.config_name)); +} + +app.get('/api/secret-values', async (_req, res) => { + try { + const secrets = await pool.query(` + SELECT name, convert_from(value, 'UTF8') AS configured_value, + database_id, created_at, updated_at + FROM constructive_store_private.platform_secrets + WHERE database_id = $1 + ORDER BY name + `, [DB_ID]); + const configs = await pool.query(` + SELECT name, value AS configured_value, + created_at, updated_at + FROM constructive_store_public.platform_config + ORDER BY name + `); + const vars: Record = {}; + const rows: any[] = []; + for (const row of secrets.rows) { + if (row.configured_value != null) vars[row.name] = row.configured_value; + rows.push({ secret_name: row.name, configured_value: row.configured_value, kind: 'secret', ...row }); + } + for (const row of configs.rows) { + if (row.configured_value != null) vars[row.name] = row.configured_value; + rows.push({ secret_name: row.name, configured_value: row.configured_value, kind: 'config', ...row }); + } + res.json({ vars, rows }); + } catch (err: any) { + res.status(500).json({ error: err.message }); + } +}); + +app.post('/api/secret-values', async (req, res) => { + try { + const { vars } = req.body as { vars: Record }; + if (!vars || typeof vars !== 'object') { + res.status(400).json({ error: 'Body must contain { vars: { KEY: "value", ... } }' }); + return; + } + const nsId = await getDefaultNamespaceId(); + const secretNames = await getSecretNames(); + const configNames = await getConfigNames(); + let upserted = 0; + for (const [name, value] of Object.entries(vars)) { + if (value === '') continue; + if (secretNames.has(name)) { + await pool.query( + `INSERT INTO constructive_store_private.platform_secrets + (id, name, value, database_id, namespace_id) + VALUES (gen_random_uuid(), $1, convert_to($2, 'UTF8'), $3, $4) + ON CONFLICT (database_id, namespace_id, name) + DO UPDATE SET value = convert_to($2, 'UTF8'), updated_at = now()`, + [name, value, DB_ID, nsId] + ); + upserted++; + } else if (configNames.has(name)) { + await pool.query( + `INSERT INTO constructive_store_public.platform_config + (id, name, value, namespace_id) + VALUES (gen_random_uuid(), $1, $2, $3) + ON CONFLICT (namespace_id, name) + DO UPDATE SET value = $2, updated_at = now()`, + [name, value, nsId] + ); + upserted++; + } + } + res.json({ ok: true, upserted }); + } catch (err: any) { + res.status(500).json({ error: err.message }); + } +}); + +app.post('/api/secrets/sync-from-db', async (_req, res) => { + try { + const secrets = await pool.query(` + SELECT name, convert_from(value, 'UTF8') AS val + FROM constructive_store_private.platform_secrets + WHERE database_id = $1 AND value IS NOT NULL + `, [DB_ID]); + const configs = await pool.query(` + SELECT name, value AS val + FROM constructive_store_public.platform_config + WHERE value IS NOT NULL AND value != '' + `); + const dbVars: Record = {}; + for (const row of [...secrets.rows, ...configs.rows]) { + dbVars[row.name] = row.val; + } + const existing = parseDotEnv(ENV_PATH); + const merged = { ...existing, ...dbVars }; + writeDotEnv(ENV_PATH, merged); + res.json({ ok: true, synced: Object.keys(dbVars).length, total: Object.keys(merged).length }); + } catch (err: any) { + res.status(500).json({ error: err.message }); + } +}); + +app.post('/api/secrets/sync-to-db', async (_req, res) => { + try { + const envVars = parseDotEnv(ENV_PATH); + const nsId = await getDefaultNamespaceId(); + const secretNames = await getSecretNames(); + const configNames = await getConfigNames(); + let upserted = 0; + for (const [name, value] of Object.entries(envVars)) { + if (value === '') continue; + if (secretNames.has(name)) { + await pool.query( + `INSERT INTO constructive_store_private.platform_secrets + (id, name, value, database_id, namespace_id) + VALUES (gen_random_uuid(), $1, convert_to($2, 'UTF8'), $3, $4) + ON CONFLICT (database_id, namespace_id, name) + DO UPDATE SET value = convert_to($2, 'UTF8'), updated_at = now()`, + [name, value, DB_ID, nsId] + ); + upserted++; + } else if (configNames.has(name)) { + await pool.query( + `INSERT INTO constructive_store_public.platform_config + (id, name, value, namespace_id) + VALUES (gen_random_uuid(), $1, $2, $3) + ON CONFLICT (namespace_id, name) + DO UPDATE SET value = $2, updated_at = now()`, + [name, value, nsId] + ); + upserted++; + } + } + res.json({ ok: true, synced: upserted }); + } catch (err: any) { + res.status(500).json({ error: err.message }); + } +}); + +// ─── REST API — .env file (read / write) ───────────────────────────────────── + +app.get('/api/env', (_req, res) => { + try { + const vars = parseDotEnv(ENV_PATH); + res.json({ path: ENV_PATH, exists: existsSync(ENV_PATH), vars }); + } catch (err: any) { + res.status(500).json({ error: err.message }); + } +}); + +app.post('/api/env', async (req, res) => { + try { + const { vars } = req.body as { vars: Record }; + if (!vars || typeof vars !== 'object') { + res.status(400).json({ error: 'Body must contain { vars: { KEY: "value", ... } }' }); + return; + } + // Merge with existing .env so we don't lose keys not in the request + const existing = parseDotEnv(ENV_PATH); + const merged = { ...existing, ...vars }; + // Remove keys explicitly set to empty string if they didn't exist before + for (const [k, v] of Object.entries(merged)) { + if (v === '' && !(k in existing)) delete merged[k]; + } + writeDotEnv(ENV_PATH, merged); + + // Also sync non-empty values to DB (best-effort) + try { + const nsId = await getDefaultNamespaceId(); + const secretNames = await getSecretNames(); + const configNames = await getConfigNames(); + for (const [name, value] of Object.entries(merged)) { + if (value === '') continue; + if (secretNames.has(name)) { + await pool.query( + `INSERT INTO constructive_store_private.platform_secrets + (id, name, value, database_id, namespace_id) + VALUES (gen_random_uuid(), $1, convert_to($2, 'UTF8'), $3, $4) + ON CONFLICT (database_id, namespace_id, name) + DO UPDATE SET value = convert_to($2, 'UTF8'), updated_at = now()`, + [name, value, DB_ID, nsId] + ); + } else if (configNames.has(name)) { + await pool.query( + `INSERT INTO constructive_store_public.platform_config + (id, name, value, namespace_id) + VALUES (gen_random_uuid(), $1, $2, $3) + ON CONFLICT (namespace_id, name) + DO UPDATE SET value = $2, updated_at = now()`, + [name, value, nsId] + ); + } + } + } catch { + // DB sync is best-effort; .env write already succeeded + } + + res.json({ ok: true, path: ENV_PATH, count: Object.keys(merged).length }); + } catch (err: any) { + res.status(500).json({ error: err.message }); + } +}); + +// ─── REST API — Namespaces ────────────────────────────────────────────────── + +app.get('/api/namespaces', async (_req, res) => { + try { + const result = await pool.query(` + SELECT id, name, namespace_name, description, is_active, + created_at, updated_at + FROM constructive_infra_public.platform_namespaces + ORDER BY name + `); + res.json(result.rows); + } catch (err: any) { + res.status(500).json({ error: err.message }); + } +}); + +// ─── REST API — Jobs ──────────────────────────────────────────────────────── + +app.get('/api/jobs', async (_req, res) => { + try { + const result = await pool.query(` + SELECT id, task_identifier, payload, priority, attempts, max_attempts, + locked_by, locked_at, last_error, created_at, updated_at + FROM app_jobs.jobs + ORDER BY id DESC + LIMIT 50 + `); + res.json(result.rows); + } catch (err: any) { + res.status(500).json({ error: err.message }); + } +}); + +app.post('/api/jobs', async (req, res) => { + try { + const { task_identifier, payload } = req.body; + const result = await pool.query( + `INSERT INTO app_jobs.jobs (task_identifier, payload) + VALUES ($1, $2::json) + RETURNING id, task_identifier, payload, created_at`, + [task_identifier, JSON.stringify(payload)] + ); + res.json(result.rows[0]); + } catch (err: any) { + res.status(500).json({ error: err.message }); + } +}); + +// ─── REST API — Invocations ───────────────────────────────────────────────── + +app.get('/api/invocations', async (_req, res) => { + try { + const result = await pool.query(` + SELECT id, function_name, job_id, worker_id, status, + started_at, completed_at, duration_ms, error_message, + created_at + FROM constructive_infra_public.platform_function_invocations + ORDER BY created_at DESC + LIMIT 50 + `); + res.json(result.rows); + } catch (err: any) { + res.status(500).json({ error: err.message }); + } +}); + +// ─── REST API — Status ────────────────────────────────────────────────────── + +app.get('/api/status', async (_req, res) => { + try { + const pgVersion = await pool.query('SELECT version()'); + const dbName = await pool.query('SELECT current_database()'); + const fnCount = await pool.query( + `SELECT count(*) as count FROM constructive_infra_public.platform_function_definitions WHERE is_invocable = true` + ); + const jobCount = await pool.query( + `SELECT count(*) as count FROM app_jobs.jobs` + ); + const invocationCount = await pool.query( + `SELECT count(*) as count FROM constructive_infra_public.platform_function_invocations` + ); + + res.json({ + database: dbName.rows[0].current_database, + postgres: pgVersion.rows[0].version.split(' ').slice(0, 2).join(' '), + functions: parseInt(fnCount.rows[0].count, 10), + jobs: parseInt(jobCount.rows[0].count, 10), + invocations: parseInt(invocationCount.rows[0].count, 10), + }); + } catch (err: any) { + res.status(500).json({ error: err.message }); + } +}); + +// ─── REST API — Run make commands ─────────────────────────────────────────── + +app.post('/api/run', (req, res) => { + const { command } = req.body; + const allowedCommands = [ + 'make status', + 'make verify-platform', + 'make up', + 'make down', + 'make up:email-job', + 'make down:email-job', + 'make check-env', + ]; + + if (!allowedCommands.some(c => command.startsWith(c))) { + res.status(400).json({ error: `Command not allowed. Allowed: ${allowedCommands.join(', ')}` }); + return; + } + + const proc = spawn('bash', ['-c', command], { + cwd: process.env.PROJECT_ROOT || process.cwd(), + env: process.env as Record, + }); + + let output = ''; + proc.stdout.on('data', (data: Buffer) => { output += data.toString(); }); + proc.stderr.on('data', (data: Buffer) => { output += data.toString(); }); + proc.on('close', (exitCode: number | null) => { + res.json({ output, exitCode: exitCode ?? 1 }); + }); +}); + +// ─── REST API — K8s proxy ──────────────────────────────────────────────────── + +const K8S_API = process.env.KUBERNETES_API_URL || 'http://127.0.0.1:8001'; + +app.all('/api/k8s/*', async (req, res) => { + const k8sPath = '/' + (req.params as any)[0]; + const url = `${K8S_API}${k8sPath}${req.url.includes('?') ? req.url.slice(req.url.indexOf('?')) : ''}`; + + try { + const headers: Record = { 'Accept': 'application/json' }; + if (req.headers['content-type']) { + headers['Content-Type'] = req.headers['content-type'] as string; + } + + const init: RequestInit = { + method: req.method, + headers, + }; + if (req.method !== 'GET' && req.method !== 'HEAD' && req.body) { + init.body = JSON.stringify(req.body); + } + + const k8sRes = await fetch(url, init); + const body = await k8sRes.text(); + + res.status(k8sRes.status); + for (const [key, value] of k8sRes.headers.entries()) { + if (key.toLowerCase() !== 'transfer-encoding') { + res.setHeader(key, value); + } + } + res.send(body); + } catch (err: any) { + res.status(502).json({ error: `K8s proxy error: ${err.message}`, target: url }); + } +}); + +// ─── WebSocket — Shell Terminal ───────────────────────────────────────────── + +const wss = new WebSocketServer({ server, path: '/ws/terminal' }); + +wss.on('connection', (ws: WebSocket) => { + const shell = spawn('bash', ['-i'], { + cwd: process.env.PROJECT_ROOT || process.cwd(), + env: { ...process.env, TERM: 'xterm-256color' } as Record, + stdio: ['pipe', 'pipe', 'pipe'], + }); + + shell.stdout.on('data', (data: Buffer) => { + if (ws.readyState === WebSocket.OPEN) { + ws.send(data.toString()); + } + }); + + shell.stderr.on('data', (data: Buffer) => { + if (ws.readyState === WebSocket.OPEN) { + ws.send(data.toString()); + } + }); + + ws.on('message', (msg: Buffer | string) => { + const str = msg.toString(); + if (shell.stdin.writable) { + shell.stdin.write(str); + } + }); + + ws.on('close', () => { + shell.kill(); + }); + + shell.on('exit', () => { + if (ws.readyState === WebSocket.OPEN) { + ws.close(); + } + }); +}); + +// ─── Start ────────────────────────────────────────────────────────────────── + +server.listen(PORT, () => { + console.log(`\n Platform UI server: http://localhost:${PORT}`); + console.log(` Terminal WebSocket: ws://localhost:${PORT}/ws/terminal`); + console.log(` API endpoints: http://localhost:${PORT}/api/{status,functions,jobs,invocations,secrets,secret-values,namespaces}`); + console.log(` K8s proxy: http://localhost:${PORT}/api/k8s/* → ${K8S_API}`); + console.log(` Database: ${process.env.PGDATABASE || 'constructive-functions-db1'}\n`); +}); diff --git a/www/src/App.tsx b/www/src/App.tsx new file mode 100644 index 00000000..c676ebaa --- /dev/null +++ b/www/src/App.tsx @@ -0,0 +1,76 @@ +import { useState } from 'react'; +import { StatusBar } from './components/StatusBar'; +import { FunctionsPanel } from './components/FunctionsPanel'; +import { SecretsPanel } from './components/SecretsPanel'; +import { JobsPanel } from './components/JobsPanel'; +import { InvocationsPanel } from './components/InvocationsPanel'; +import { K8sPanel } from './components/K8sPanel'; +import { FlowsPanel } from './components/FlowsPanel'; +import { Terminal } from './components/Terminal'; +import { CommandBar } from './components/CommandBar'; +import { TerminalSquare, Cpu, Key, Briefcase, Activity, Wrench, Container, Workflow } from 'lucide-react'; + +type Tab = 'functions' | 'flows' | 'secrets' | 'jobs' | 'invocations' | 'k8s' | 'commands' | 'terminal'; + +const TABS: { id: Tab; label: string; icon: typeof Cpu }[] = [ + { id: 'functions', label: 'Functions', icon: Cpu }, + { id: 'flows', label: 'Flows', icon: Workflow }, + { id: 'secrets', label: 'Secrets', icon: Key }, + { id: 'jobs', label: 'Jobs', icon: Briefcase }, + { id: 'invocations', label: 'Invocations', icon: Activity }, + { id: 'k8s', label: 'K8s', icon: Container }, + { id: 'commands', label: 'Commands', icon: Wrench }, + { id: 'terminal', label: 'Terminal', icon: TerminalSquare }, +]; + +export function App() { + const [activeTab, setActiveTab] = useState('functions'); + + const navigateToTab = (tab: Tab) => setActiveTab(tab); + + return ( +
+
+
+
+

+ Constructive Platform +

+
+ +
+ + + +
+ {activeTab === 'functions' && } + {activeTab === 'flows' && } + {activeTab === 'secrets' && } + {activeTab === 'jobs' && } + {activeTab === 'invocations' && } + {activeTab === 'k8s' && } + {activeTab === 'commands' && ( +
+ +
+ )} + {activeTab === 'terminal' && } +
+
+ ); +} diff --git a/www/src/app.css b/www/src/app.css new file mode 100644 index 00000000..d0c58380 --- /dev/null +++ b/www/src/app.css @@ -0,0 +1,6 @@ +@import "tailwindcss"; +@import "@xterm/xterm/css/xterm.css"; + +:root { + --color-brand: #3b82f6; +} diff --git a/www/src/components/CommandBar.tsx b/www/src/components/CommandBar.tsx new file mode 100644 index 00000000..6a742a32 --- /dev/null +++ b/www/src/components/CommandBar.tsx @@ -0,0 +1,111 @@ +import { useState, useMemo } from 'react'; +import { api } from '../lib/api'; +import { Play, Loader } from 'lucide-react'; + +const COMMANDS = [ + { label: 'Status', command: 'make status' }, + { label: 'Verify Platform', command: 'make verify-platform' }, + { label: 'Check Env', command: 'make check-env' }, + { label: 'Up', command: 'make up' }, + { label: 'Down', command: 'make down' }, + { label: 'Email Job Up', command: 'make up:email-job' }, + { label: 'Email Job Down', command: 'make down:email-job' }, +]; + +const ANSI_COLORS: Record = { + '30': '#6b7280', '31': '#ef4444', '32': '#22c55e', '33': '#eab308', + '34': '#3b82f6', '35': '#a855f7', '36': '#06b6d4', '37': '#d4d4d8', + '39': '#a1a1aa', '90': '#71717a', '91': '#f87171', '92': '#4ade80', + '93': '#facc15', '94': '#60a5fa', '95': '#c084fc', '96': '#22d3ee', '97': '#fafafa', +}; + +function ansiToHtml(text: string): string { + let html = text + .replace(/&/g, '&') + .replace(//g, '>'); + + html = html.replace(/\x1b\[([0-9;]+)m/g, (_match, codes: string) => { + const parts = codes.split(';'); + const spans: string[] = []; + for (const code of parts) { + if (code === '0') { + spans.push(''); + } else if (code === '1') { + spans.push(''); + } else if (code === '22') { + spans.push(''); + } else if (ANSI_COLORS[code]) { + spans.push(``); + } + } + return spans.join(''); + }); + + // Strip any remaining escape sequences + html = html.replace(/\x1b\[[0-9;]*[A-Za-z]/g, ''); + + return html; +} + +export function CommandBar() { + const [running, setRunning] = useState(null); + const [result, setResult] = useState<{ output: string; exitCode: number } | null>(null); + + const run = async (command: string) => { + setRunning(command); + setResult(null); + try { + const res = await api.runCommand(command); + setResult(res); + } catch (err: any) { + setResult({ output: err.message, exitCode: 1 }); + } finally { + setRunning(null); + } + }; + + const outputHtml = useMemo(() => { + if (!result) return ''; + return ansiToHtml(result.output || '(no output)'); + }, [result]); + + return ( +
+
+ {COMMANDS.map(({ label, command }) => ( + + ))} +
+ {result && ( +
+
+          
+ exit: {result.exitCode} +
+
+ )} +
+ ); +} diff --git a/www/src/components/FlowsPanel.tsx b/www/src/components/FlowsPanel.tsx new file mode 100644 index 00000000..5512318d --- /dev/null +++ b/www/src/components/FlowsPanel.tsx @@ -0,0 +1,370 @@ +import { useEffect, useState, useCallback, useMemo, DragEvent } from 'react'; +import { + ReactFlow, + Background, + Controls, + MiniMap, + addEdge, + useNodesState, + useEdgesState, + Handle, + Position, + type Connection, + type Node as RFNode, + type Edge as RFEdge, + type NodeProps, + type NodeTypes, +} from '@xyflow/react'; +import '@xyflow/react/dist/style.css'; +import { api, type PlatformFunction } from '../lib/api'; +import { RefreshCw, Save, Trash2, Zap, Lock, Settings } from 'lucide-react'; + +const STORAGE_KEY = 'constructive-flows'; + +interface FlowData { + name: string; + nodes: RFNode[]; + edges: RFEdge[]; +} + +// ─── Custom Node ───────────────────────────────────────────────────────────── + +interface FunctionNodeData { + label: string; + description: string; + taskIdentifier: string; + scope: string; + isInvocable: boolean; + secretsCount: number; + configsCount: number; + [key: string]: unknown; +} + +function FunctionNode({ data }: NodeProps>) { + return ( +
+ +
+ + {data.label} +
+
+ {data.description && ( +

{data.description}

+ )} +
+ {data.taskIdentifier} +
+
+ {data.secretsCount > 0 && ( + + + {data.secretsCount} + + )} + {data.configsCount > 0 && ( + + + {data.configsCount} + + )} + {data.scope} +
+
+ +
+ ); +} + +const nodeTypes: NodeTypes = { + functionNode: FunctionNode, +}; + +// ─── Helpers ───────────────────────────────────────────────────────────────── + +function functionToNode(fn: PlatformFunction, position: { x: number; y: number }): RFNode { + return { + id: `${fn.name}-${Date.now()}`, + type: 'functionNode', + position, + data: { + label: fn.name, + description: fn.description || '', + taskIdentifier: fn.task_identifier, + scope: fn.scope || 'default', + isInvocable: fn.is_invocable, + secretsCount: fn.required_secrets?.length || 0, + configsCount: fn.required_configs?.length || 0, + }, + }; +} + +function loadFlows(): FlowData[] { + try { + const raw = localStorage.getItem(STORAGE_KEY); + return raw ? JSON.parse(raw) : []; + } catch { + return []; + } +} + +function saveFlows(flows: FlowData[]) { + localStorage.setItem(STORAGE_KEY, JSON.stringify(flows)); +} + +// ─── Component ─────────────────────────────────────────────────────────────── + +export function FlowsPanel() { + const [functions, setFunctions] = useState([]); + const [loading, setLoading] = useState(true); + const [flows, setFlowsList] = useState(loadFlows); + const [activeFlowIdx, setActiveFlowIdx] = useState( + loadFlows().length > 0 ? 0 : null + ); + const [flowName, setFlowName] = useState(''); + + const [nodes, setNodes, onNodesChange] = useNodesState>([]); + const [edges, setEdges, onEdgesChange] = useEdgesState([]); + + // Load functions from API + useEffect(() => { + setLoading(true); + api.getFunctions() + .then(setFunctions) + .catch(() => {}) + .finally(() => setLoading(false)); + }, []); + + // Load active flow into canvas + useEffect(() => { + if (activeFlowIdx !== null && flows[activeFlowIdx]) { + const flow = flows[activeFlowIdx]; + setNodes(flow.nodes); + setEdges(flow.edges); + setFlowName(flow.name); + } + }, [activeFlowIdx, flows, setNodes, setEdges]); + + const onConnect = useCallback( + (connection: Connection) => { + setEdges((eds) => addEdge({ ...connection, animated: true, style: { stroke: '#10b981' } }, eds)); + }, + [setEdges] + ); + + // Drag & drop from sidebar + const onDragOver = useCallback((event: DragEvent) => { + event.preventDefault(); + event.dataTransfer.dropEffect = 'move'; + }, []); + + const onDrop = useCallback( + (event: DragEvent) => { + event.preventDefault(); + const fnName = event.dataTransfer.getData('application/constructive-function'); + if (!fnName) return; + + const fn = functions.find((f) => f.name === fnName); + if (!fn) return; + + const bounds = (event.target as HTMLElement).closest('.react-flow')?.getBoundingClientRect(); + if (!bounds) return; + + const position = { + x: event.clientX - bounds.left - 100, + y: event.clientY - bounds.top - 30, + }; + + setNodes((nds) => [...nds, functionToNode(fn, position)]); + }, + [functions, setNodes] + ); + + // Save current flow + const handleSave = useCallback(() => { + const name = flowName.trim() || `Flow ${flows.length + 1}`; + const flowData: FlowData = { name, nodes, edges }; + + const updated = [...flows]; + if (activeFlowIdx !== null) { + updated[activeFlowIdx] = flowData; + } else { + updated.push(flowData); + setActiveFlowIdx(updated.length - 1); + } + setFlowsList(updated); + saveFlows(updated); + setFlowName(name); + }, [flowName, nodes, edges, flows, activeFlowIdx]); + + // New flow + const handleNew = useCallback(() => { + setNodes([]); + setEdges([]); + setFlowName(''); + setActiveFlowIdx(null); + }, [setNodes, setEdges]); + + // Delete flow + const handleDelete = useCallback(() => { + if (activeFlowIdx === null) return; + const updated = flows.filter((_, i) => i !== activeFlowIdx); + setFlowsList(updated); + saveFlows(updated); + if (updated.length > 0) { + setActiveFlowIdx(0); + } else { + handleNew(); + } + }, [activeFlowIdx, flows, handleNew]); + + // Populate canvas with all functions as unconnected nodes + const handleLoadAll = useCallback(() => { + const newNodes = functions.map((fn, i) => + functionToNode(fn, { x: 50 + (i % 3) * 280, y: 50 + Math.floor(i / 3) * 180 }) + ); + setNodes(newNodes); + setEdges([]); + }, [functions, setNodes, setEdges]); + + const defaultEdgeOptions = useMemo( + () => ({ animated: true, style: { stroke: '#10b981' } }), + [] + ); + + return ( +
+ {/* Sidebar: function palette + flow list */} +
+ {/* Flow list */} +
+

Flows

+
+ {flows.map((f, i) => ( + + ))} +
+ +
+ + {/* Function palette */} +
+
+

Functions

+ {loading && } +
+

Drag onto canvas

+ {functions.map((fn) => ( +
{ + e.dataTransfer.setData('application/constructive-function', fn.name); + e.dataTransfer.effectAllowed = 'move'; + }} + className="rounded border border-zinc-800 bg-zinc-900/50 px-2 py-1.5 cursor-grab hover:border-zinc-700 transition-colors" + > +
+ + {fn.name} +
+ {fn.description && ( +

{fn.description}

+ )} +
+ ))} + {!loading && functions.length > 0 && ( + + )} +
+
+ + {/* Canvas */} +
+ {/* Toolbar */} +
+ setFlowName(e.target.value)} + placeholder="Flow name…" + className="bg-zinc-900 border border-zinc-700 rounded px-2 py-1 text-xs text-zinc-200 placeholder-zinc-600 focus:outline-none focus:border-blue-600 w-48" + /> + + {activeFlowIdx !== null && ( + + )} + + {nodes.length} node{nodes.length !== 1 ? 's' : ''} · {edges.length} edge{edges.length !== 1 ? 's' : ''} + +
+ + {/* React Flow Canvas */} +
+ + + + + +
+
+
+ ); +} diff --git a/www/src/components/FunctionsPanel.tsx b/www/src/components/FunctionsPanel.tsx new file mode 100644 index 00000000..35edd2a6 --- /dev/null +++ b/www/src/components/FunctionsPanel.tsx @@ -0,0 +1,225 @@ +import { useEffect, useState, useCallback } from 'react'; +import { api, type PlatformFunction } from '../lib/api'; +import { RefreshCw, Zap, Lock, Settings, Play, X, CheckCircle, AlertCircle, Loader, ExternalLink } from 'lucide-react'; + +type Tab = 'functions' | 'flows' | 'secrets' | 'jobs' | 'invocations' | 'k8s' | 'commands' | 'terminal'; + +export function FunctionsPanel({ onNavigate }: { onNavigate?: (tab: Tab) => void }) { + const [functions, setFunctions] = useState([]); + const [loading, setLoading] = useState(true); + + const refresh = useCallback(() => { + setLoading(true); + api.getFunctions().then(setFunctions).catch(() => {}).finally(() => setLoading(false)); + }, []); + + useEffect(() => { refresh(); }, [refresh]); + + return ( +
+
+

Functions

+ +
+
+ {functions.map((fn) => ( + + ))} + {!loading && functions.length === 0 && ( +

No functions found. Run make up to deploy.

+ )} +
+
+ ); +} + +const DEFAULT_PAYLOADS: Record> = { + 'send-email': { + to: 'test@example.com', + subject: 'Hello from Platform UI', + html: '

Test email sent via compute-worker

', + }, + 'send-verification-link': { + email_type: 'email_verification', + email: 'test@example.com', + email_id: '00000000-0000-0000-0000-000000000001', + verification_token: 'test-token-123', + }, +}; + +interface TriggerResult { + status: 'idle' | 'sending' | 'success' | 'error'; + message?: string; + jobId?: string; +} + +function FunctionCard({ fn, onNavigate }: { fn: PlatformFunction; onNavigate?: (tab: Tab) => void }) { + const [showTrigger, setShowTrigger] = useState(false); + const [payload, setPayload] = useState(''); + const [result, setResult] = useState({ status: 'idle' }); + + const openTrigger = () => { + const defaultPayload = DEFAULT_PAYLOADS[fn.task_identifier] || { key: 'value' }; + setPayload(JSON.stringify(defaultPayload, null, 2)); + setResult({ status: 'idle' }); + setShowTrigger(true); + }; + + const closeTrigger = () => { + setShowTrigger(false); + setResult({ status: 'idle' }); + }; + + const handleTrigger = async () => { + setResult({ status: 'sending' }); + try { + const parsed = JSON.parse(payload); + const job = await api.createJob(fn.task_identifier, parsed); + setResult({ + status: 'success', + message: `Job #${job.id.slice(0, 8)} created`, + jobId: job.id, + }); + } catch (err: any) { + setResult({ + status: 'error', + message: err.message || 'Failed to create job', + }); + } + }; + + return ( +
+
+
+ + {fn.name} +
+
+ {fn.is_invocable && !showTrigger && ( + + )} + + {fn.scope} + +
+
+ {fn.description && ( +

{fn.description}

+ )} +
+ {fn.task_identifier} + {fn.required_secrets?.length > 0 && ( + + + {fn.required_secrets.length} secret{fn.required_secrets.length !== 1 ? 's' : ''} + + )} + {fn.required_configs?.length > 0 && ( + + + {fn.required_configs.length} config{fn.required_configs.length !== 1 ? 's' : ''} + + )} +
+ + {/* Payload schema (FBP port definition) */} + {fn.payload_schema && (fn.payload_schema as any).properties && ( +
+
Payload Schema
+
+ {Object.entries((fn.payload_schema as any).properties).map(([key, def]: [string, any]) => { + const required = ((fn.payload_schema as any).required || []).includes(key); + return ( +
+ + {key}{required && *} + + + {def.enum ? def.enum.join(' | ') : Array.isArray(def.type) ? def.type.join(' | ') : def.type || 'any'} + {def.format && ({def.format})} + {def.description && — {def.description}} + +
+ ); + })} +
+
+ )} + + {/* Inline trigger form */} + {showTrigger && ( +
+
+ Trigger Job + +
+
+ +