一键导入
database-migration
Create and apply database migrations for the MINDEX PostgreSQL database. Use when modifying database schema, adding tables, or changing columns.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Create and apply database migrations for the MINDEX PostgreSQL database. Use when modifying database schema, adding tables, or changing columns.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Deploy or restart the MINDEX API service on VM 192.168.0.189. Use when updating MINDEX, restarting the database API, or deploying MINDEX changes.
Execute non-trivial work using plan-first, verify-first, and lessons-fed defaults. Use when running 3+ step tasks, architectural work, or anything that may require re-planning.
Deploy the Mycosoft website to the Sandbox VM (192.168.0.187). Use when the user asks to deploy, push to sandbox, rebuild the website container, or update the live site.
Integrate neuromorphic UI into a page. Use when converting Shadcn pages to neuromorphic design or adding neuromorphic styling.
Deploy or restart the MAS orchestrator service on VM 192.168.0.188. Use when updating the Multi-Agent System, restarting the orchestrator, or deploying MAS changes.
Start the Mycosoft website dev server on port 3010. Use when the user wants to run the dev server, start development, or test the website locally.
基于 SOC 职业分类
| name | database-migration |
| description | Create and apply database migrations for the MINDEX PostgreSQL database. Use when modifying database schema, adding tables, or changing columns. |
All Mycosoft data is stored in MINDEX on VM 192.168.0.189.
Connection: postgresql://mycosoft:mycosoft@192.168.0.189:5432/mindex
Migration Progress:
- [ ] Step 1: Create migration file
- [ ] Step 2: Review the SQL
- [ ] Step 3: Apply to MINDEX VM
- [ ] Step 4: Verify schema
Create a numbered migration in migrations/:
-- migrations/NNNN_description.sql
-- Migration: Brief description
-- Date: YYYY-MM-DD
-- Author: [name]
BEGIN;
CREATE TABLE IF NOT EXISTS new_table (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
name TEXT NOT NULL,
data JSONB DEFAULT '{}',
created_at TIMESTAMPTZ DEFAULT NOW(),
updated_at TIMESTAMPTZ DEFAULT NOW()
);
CREATE INDEX IF NOT EXISTS idx_new_table_name ON new_table(name);
COMMIT;
IF NOT EXISTS for all CREATE statementsIF EXISTS for all DROP statementsssh mycosoft@192.168.0.189
# Apply migration
psql -U mycosoft -d mindex -f /path/to/migration.sql
# Or from local machine
psql "postgresql://mycosoft:mycosoft@192.168.0.189:5432/mindex" -f migrations/NNNN_description.sql
# Check table exists
psql -U mycosoft -d mindex -c "\dt new_table"
# Check columns
psql -U mycosoft -d mindex -c "\d new_table"
IF NOT EXISTS / IF EXISTSssh mycosoft@192.168.0.189
pg_dump -U mycosoft mindex > /tmp/mindex_backup_$(date +%Y%m%d).sql