- How do I install graviton/mongodb-migrations in a Laravel app?
- Install it with Composer using composer require graviton/mongodb-migrations, then make sure the package service provider is registered if your Laravel version does not auto-discover it. You also need a working MongoDB connection and the MongoDB PHP extension available to PHP. Because the package is old, check its composer.json constraints before installing to confirm it accepts your Laravel and PHP versions.
- Does graviton/mongodb-migrations work with mongodb/laravel-mongodb or jenssegers/mongodb?
- That is the first thing to verify, because a package of this vintage may still assume the older jenssegers/mongodb connection and collection abstractions. Modern Laravel MongoDB projects typically use mongodb/laravel-mongodb, which now includes its own migration support. If the package does not explicitly support your driver layer, expect integration work or choose the maintained alternative.
- Which Laravel and PHP versions does graviton/mongodb-migrations support?
- The safe answer is to read the package's composer.json rather than assume, because old packages often have open-ended or outdated constraints. There is no evidence of recent maintenance, so support for current Laravel and PHP releases is not guaranteed. Test installation in a throwaway branch before committing to it.
- How does graviton/mongodb-migrations track applied migrations?
- It uses a MongoDB-backed migration repository instead of Laravel's SQL migrations table, so applied and pending migrations are recorded in a Mongo collection. That gives you an ordered, reviewable history of what ran in each environment. Confirm the collection name and batch behaviour in the README or source before relying on it in deployment automation.
- Can I roll back MongoDB migrations with this package?
- The package advertises rollback support, and migrations are expected to define reversible up and down logic. In practice, rollback quality depends on how each migration is written, especially for data backfills that cannot be automatically undone. Test rollback and reset against a staging database, and keep a manual repair plan for failed migrations.
- Can I create collections and indexes in a graviton/mongodb-migrations migration?
- Yes. The package is designed for MongoDB collection and index lifecycle changes rather than relational schema DDL. That makes it useful for creating collections, adding indexes, and managing validators or TTL settings. Be careful with index builds on large collections because a foreground build can affect write availability.
- Is there a lock to stop two deployments running MongoDB migrations at the same time?
- There is no evidence in the package assessment of a distributed lock or advisory mechanism. That matters in multi-replica or blue/green deploys where two containers could start migrations concurrently. Run migrations as a single deployment step and, if needed, wrap them in your own external lock.
- Does graviton/mongodb-migrations support --pretend or a dry run?
- A --pretend or dry-run mode is not listed among the package features, so assume you cannot preview index operations through Artisan. Review migration code and test against a staging copy before running against production. For index-heavy changes, inspect the generated operations manually or use MongoDB tooling.
- Is graviton/mongodb-migrations maintained and safe for production?
- The repository shows no community traction, and the assessment flags lifecycle risk rather than an obvious code defect. The main concerns are old driver assumptions, missing concurrency protection, and unclear support for current Laravel and MongoDB versions. Treat it as a small, auditable utility and only adopt it after verifying your specific dependency stack.
- What are alternatives to graviton/mongodb-migrations for Laravel MongoDB migrations?
- The strongest alternative is mongodb/laravel-mongodb's built-in migration support if you already use that driver package. Other options include custom Artisan commands around MongoDB index management, deployment scripts, or dedicated MongoDB migration tools outside PHP. Compare them on locking, rollback guarantees, and whether they duplicate another source of truth.