Skip to content

fix: run migrations and sync when starting mcp#88

Merged
phernandez merged 6 commits intomainfrom
fix/migrations-not-run-cli-entrypoint
Apr 7, 2025
Merged

fix: run migrations and sync when starting mcp#88
phernandez merged 6 commits intomainfrom
fix/migrations-not-run-cli-entrypoint

Conversation

@phernandez
Copy link
Copy Markdown
Member

Summary

  • Add ensure_migrations function to safely run migrations on startup
  • Make CLI callback run migrations for every command execution
  • Add tests to verify migration behavior
  • Fixes issue [BUG] cannot write into note #87 where entity table wasn't created when using pip-installed CLI

Test plan

  • Manual verification by installing from this branch and verifying migrations run
  • Added unit tests to verify the ensure_migrations function behavior
  • All CLI tests passing

🤖 Generated with Claude Code

@phernandez phernandez force-pushed the fix/migrations-not-run-cli-entrypoint branch from 6c77a68 to 81d1c45 Compare April 7, 2025 15:33
phernandez and others added 6 commits April 7, 2025 17:20
Signed-off-by: phernandez <paul@basicmachines.co>
- Add ensure_migrations function to run migrations on startup
- Make CLI callback run migrations for every command
- Add tests to verify migration behavior
- Fixes issue #87 where migrations weren't run when using pip-installed CLI

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: phernandez <paul@basicmachines.co>
Signed-off-by: phernandez <paul@basicmachines.co>
Signed-off-by: phernandez <paul@basicmachines.co>
- Created shared initialization service for database migrations and file sync
- Refactored CLI, API, and MCP server to use the shared service
- Added tests for the initialization service
- Improves logging and error handling for startup processes

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: phernandez <paul@basicmachines.co>
Signed-off-by: phernandez <paul@basicmachines.co>
@phernandez phernandez force-pushed the fix/migrations-not-run-cli-entrypoint branch from 458b2df to b9247ed Compare April 7, 2025 22:20
@phernandez phernandez changed the title fix: run migrations when using CLI entry point fix: run migrations and sync when starting mcp Apr 7, 2025
@phernandez phernandez merged commit 78a3412 into main Apr 7, 2025
9 checks passed
@phernandez phernandez deleted the fix/migrations-not-run-cli-entrypoint branch April 7, 2025 22:45
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