Add 'om migrate stamp' command to mark migrations as applied
Open
Nobody has claimed this yet.
enhancement
- Dominant language
- Python
- Stars
- 1.3k
- Forks
- 128
- PR merge metrics
- No merged PRs in 30d
Description
Summary
Add om migrate stamp command to mark migrations as applied without actually running them.
Use Cases
- Importing existing schema: When adopting Redis OM on an existing database where indexes already exist
- Manual migrations: When you've manually applied schema changes and need to update tracking
- CI/CD workflows: Mark specific migration states for testing or deployment
Proposed Interface
# Mark all pending migrations as applied
om migrate stamp --all
# Mark specific migration as applied
om migrate stamp <migration_id>
# Mark up to a specific migration
om migrate stamp --target <migration_id>
Implementation Notes
- Add
stampmethod toSchemaMigratorthat callsmark_applied()without runningup() - Add CLI command with appropriate options
- Similar to Alembic's
stampcommand
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating SchemaMigrator and the existing migration CLI commands. Trace how migrations are marked applied and how CLI options are defined. Done means supporting stamp for all pending migrations, a specific migration, and a target without running up().
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, redis
- Domain
- cli, databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100