Skip to content

Persist MCP assets with Drizzle migrations - #49

Closed
eliteprox wants to merge 1 commit into
mainfrom
feat/mcp-assets-drizzle
Closed

Persist MCP assets with Drizzle migrations#49
eliteprox wants to merge 1 commit into
mainfrom
feat/mcp-assets-drizzle

Conversation

@eliteprox

Copy link
Copy Markdown
Collaborator

Summary

  • Replace the in-memory MCP asset list (capped at 50, process-local) with Neon Postgres.
  • Schema lives in Drizzle (db/schema.ts) and is applied with pnpm db:migrate — the app no longer runs CREATE/ALTER on first request.
  • Queries stay parameterized and scoped by principal_id. forget_assets requires ids or all: true.

Land this before #47 so history can join stored outputs without depending on runtime DDL.

Test plan

  • pnpm db:migrate against the console Neon database (empty or existing mcp_assets from the old ensureSchema path)
  • run_capability with a media URL persists a row; get_recent_assets returns it after a process restart
  • forget_assets without ids/all errors; all: true deletes only that principal
  • pnpm typecheck / pnpm lint

Move mcp_assets DDL out of request-time ensureSchema into drizzle-kit
migrations so a shared DATABASE_URL cannot be altered on first traffic.
@vercel

vercel Bot commented Sep 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
console Ready Ready Preview Sep 5, 2026 2:50am UTC

Request Review

@eliteprox

Copy link
Copy Markdown
Collaborator Author

Closing in favor of #50 — schema and migration only, so other PRs do not have to take the store/MCP rewrite with the table.

The store rewrite stays on #47.

@eliteprox

Copy link
Copy Markdown
Collaborator Author

Superseded by #50 (schema-only).

@eliteprox eliteprox closed this Sep 5, 2026
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.

1 participant