一键导入
03-run-local-schema-migration
This skill will guide you through running the PostgreSQL schema migration for Pronghorn development.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
This skill will guide you through running the PostgreSQL schema migration for Pronghorn development.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
This skill will guide you through the process of setting up PostgreSQL on your local machine.
This skill will guide you through setting up the local API server for Pronghorn development, including installing dependencies, configuring environment variables, and starting the server.
This skill will guide you through setting up the local frontend for Pronghorn development, including installing dependencies, configuring .env.local, and starting the Vite development server.
This skill verifies the local Pronghorn stack by checking frontend, API health endpoint, and local PostgreSQL readiness.
Automates Docker Compose full-stack workflows for local Pronghorn development, including build prerequisites, startup, verification, logs, stop, and reset operations.
This skill will guide you through verifying that your deployed AI models are accessible and functioning correctly.
| name | 03.run-local-schema-migration |
| description | This skill will guide you through running the PostgreSQL schema migration for Pronghorn development. |
| argument-hint | Please follow the instructions to apply the schema migration to your PostgreSQL database. |
| compatibility | ["linux","macos","windows"] |
| license | MIT |
| user-invokable | true |
This skill will guide you through the process of applying the Pronghorn database schema migration to your PostgreSQL instance using Docker.
pronghorn-db is running and accepting connections.docker exec pronghorn-db pg_isready -U pronghorn_admin -d pronghorn/var/run/postgresql:5432 - accepting connectionsThe full database schema is defined in infra/migrations/001_full_schema.sql. This creates all tables, functions, RPC handlers, Row Level Security (RLS) policies, and triggers.
Run the following command from the repository root:
Get-Content "infra/migrations/001_full_schema.sql" | docker exec -i pronghorn-db psql -U pronghorn_admin -d pronghorn
This command:
pronghorn-db Docker container via docker execpsql to execute SQL commandspronghorn_admin userpronghorn databaseinfra/migrations/001_full_schema.sqlAfter the migration completes, verify that all tables were created:
docker exec pronghorn-db psql -U pronghorn_admin -d pronghorn -c "\dt" | head -20
This displays the first 20 tables. You should see tables like:
projectsartifactsrequirementsstandardsdeploymentsai_agentsuserspublic schema)To confirm all 62 public-schema tables were created:
docker exec pronghorn-db psql -U pronghorn_admin -d pronghorn -c "SELECT count(*) FROM information_schema.tables WHERE table_schema = 'public';"
Expected output: 62 (this counts only public schema tables; the migration also creates tables in auth, storage, _realtime, and cron schemas)
If \dt returns "Did not find any relations", the migration hasn't been applied. This commonly happens when:
docker start instead of docker rundocker-entrypoint-initdb.d init scripts didn't runSolution: Re-run the migration command above. The schema will be applied to the empty database.
The database user was not created. Run the PostgreSQL setup skill first to create the user and database.
The database was not created. Run the PostgreSQL setup skill first.
Verify the correct credentials:
pronghorn_adminpronghornThe migration creates:
auth, storage, _realtime, and cron schemas) with primary keys, foreign keys, and indexesuuid-ossp (UUID generation), pgcrypto (cryptographic functions)This ensures your local database matches the production schema exactly.
After successful schema migration: