Skip to content

feat(db): commit initial migration SQL for production deployment - #10

Merged
diskhacker merged 1 commit into
mainfrom
release/commit-migrations
Apr 17, 2026
Merged

feat(db): commit initial migration SQL for production deployment#10
diskhacker merged 1 commit into
mainfrom
release/commit-migrations

Conversation

@diskhacker

@diskhacker diskhacker commented Apr 17, 2026

Copy link
Copy Markdown
Owner

Summary

  • server/src/db/migrations/0000_bizarre_the_hunter.sql (5.9 KB, 9 tables) — generated via pnpm db:generate. Required for db:migrate to work in production.
  • server/src/db/migrations/meta/ — drizzle journal + schema snapshot.

Tables covered: signals, signal_rules, workflows, workflow_schedules, executions, execution_steps, agents, agent_tools, tool_registry.

Verification

  • cd server && pnpm install && pnpm db:generate reproduces the SQL.

Test plan

  • docker compose exec sigops-server pnpm db:migrate applies cleanly
  • Re-running is a no-op

https://claude.ai/code/session_01VZPc4xQECHmaTddwaq6zf2

Summary by CodeRabbit

Release Notes

  • Chores
    • Database schema updated with new tables supporting workflow execution, agent management, signal processing, and tool registry functionality. Added status enums and database indexes to optimize common query patterns.

Generated via drizzle-kit generate from current 9-table schema (signals,
signal_rules, workflows, workflow_schedules, executions, execution_steps,
agents, agent_tools, tool_registry).
These files are required for db:migrate to work in production containers.
NEVER use db:push in production \xe2\x80\x94 see migrations/README.md in cluster-deploy.

https://claude.ai/code/session_01VZPc4xQECHmaTddwaq6zf2
@diskhacker
diskhacker merged commit a5967c6 into main Apr 17, 2026
2 of 3 checks passed
@coderabbitai

coderabbitai Bot commented Apr 17, 2026

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 0bfd3f70-96b3-4000-af90-590198d04a7c

📥 Commits

Reviewing files that changed from the base of the PR and between 4f3dde8 and 5e8f410.

📒 Files selected for processing (3)
  • server/src/db/migrations/0000_bizarre_the_hunter.sql
  • server/src/db/migrations/meta/0000_snapshot.json
  • server/src/db/migrations/meta/_journal.json

📝 Walkthrough

Walkthrough

This PR adds the initial database migration for an event-driven workflow execution system in PostgreSQL. It defines five ENUM types for status tracking and creates eight tables to manage agents, tools, executions, signals, scheduling, and workflows, along with B-tree indexes for query optimization and migration metadata snapshots.

Changes

Cohort / File(s) Summary
Database Migration Schema
server/src/db/migrations/0000_bizarre_the_hunter.sql
Creates initial PostgreSQL schema with ENUM types (agent_status, exec_status, severity, signal_status, step_status), eight tables (agents, agent_tools, executions, execution_steps, signals, signal_rules, tool_registry, workflow_schedules, workflows), and multiple B-tree indexes for tenant scoping, status filtering, and composite lookups. Includes JSON columns for capabilities, conditions, schemas, and metadata.
Migration Metadata
server/src/db/migrations/meta/0000_snapshot.json, server/src/db/migrations/meta/_journal.json
Adds generated migration snapshot defining full schema structure with column types, defaults, and enum values; includes migration journal entry tracking version 7 and tag 0000_bizarre_the_hunter.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 A schema springs to life, so neat and bright,
With agents, tools, and signals taking flight,
Nine tables strong with indexes gleaming gold,
Our workflow engine now has roots to hold!
Enums stand guard where statuses reside—
The bunny's database, prepared with pride! 🌟

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch release/commit-migrations

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@diskhacker
diskhacker deleted the release/commit-migrations branch April 17, 2026 03:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants