Skip to content

CLI: Add database migration command (taskflow migrate) #6

Description

@mjunaidca

Summary

Add a CLI command for database migrations that supports multiple database backends, particularly useful for migrating between SQLite (local development) and PostgreSQL/Neon (production).

Proposed Command

taskflow migrate --to neon
taskflow migrate --to postgres --url "postgresql://..."
taskflow migrate --to sqlite --path "./local.db"

Context

This emerged from Phase 2 backend API development. The team needs a way to:

  1. Migrate local SQLite development databases to production Neon/PostgreSQL
  2. Support the development → staging → production workflow
  3. Export/import data between environments

Acceptance Criteria

  • taskflow migrate command with --to target option
  • Support SQLite, PostgreSQL, and Neon backends
  • Data validation during migration
  • Rollback capability on failure
  • Progress reporting for large datasets
  • Audit log entries for migration operations

Technical Notes

  • Should leverage existing SQLModel/SQLAlchemy models
  • Consider using Alembic for schema migrations
  • Data migration separate from schema migration

Priority

Future enhancement - not blocking current phase work

Labels

  • enhancement
  • cli
  • future

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions