- How do I install grafite/database in a Laravel application?
- Install it with Composer, ideally as a dev dependency and pinned to an exact version rather than a caret range given the package's low maintenance activity: composer require --dev grafite/database:1.x.x. The service provider is auto-discovered, so no manual registration is usually required. Read the command source on GitHub before installing, since the package is small enough that a direct audit is faster than any formal due diligence. Afterwards, run php artisan list to confirm which commands were registered.
- What Artisan commands does grafite/database provide?
- The package is a thin Artisan command layer over MySQL administration tasks, typically dump, restore, and import-style utilities. Because the package is unvetted and lightly documented, confirm the exact command inventory and flags by reading the source on GitHub rather than relying on the README. Identify which commands are destructive, such as drop, truncate, or reset operations, before running anything against a real database.
- Which Laravel and PHP versions does grafite/database support?
- Check the declared constraints on PHP and illuminate/* in the package's composer.json, as that file is the only authoritative compatibility statement. Given four stars, zero dependents, and no observable ecosystem pressure, there is no de facto guarantee that it works with current Laravel or PHP releases. Test the commands on your exact Laravel and PHP version before adopting it in any shared environment.
- Is grafite/database safe to run in production?
- Treat it cautiously, because packages of this class often include destructive commands without a confirmation gate or environment guard. Before trusting it in production, verify that destructive commands prompt for confirmation, refuse to run when APP_ENV is production, and fail loudly on non-zero exit codes. Exercise every command against a disposable database first and inspect whether any of them write credentials to a world-readable path.
- Does grafite/database work with PostgreSQL or SQLite?
- It is described as a set of commands for MySQL databases and, like most packages in this category, it shells out to the mysqldump and mysql client binaries. That makes it MySQL-specific rather than a portable database abstraction, so do not expect Postgres or SQLite support. If you need multi-driver coverage, a backup package with driver-aware dumping is a better fit.
- Does grafite/database work on Laravel Vapor or serverless hosting?
- It generally does not. The commands rely on the mysqldump or mysql binaries being present and on shelling out from the running container, which fails outright on Laravel Vapor and on container images without the MySQL client installed. Managed database environments that restrict outbound shell access to the database will also break. Feasibility here depends entirely on your hosting topology, so validate it in a staging environment that mirrors production.
- How does grafite/database handle database credentials?
- Any command that builds a shell command line risks leaking the database password into process listings, shell history, or application logs, and this is the single most common defect in packages of this class. Credentials are typically read from your Laravel connection config at runtime rather than stored by the package itself. Before adopting it, confirm that passwords are not echoed to console output and are redacted from any logs or exception messages.
- Can grafite/database replace spatie/laravel-backup for backups?
- No. It provides convenience commands for dumping and restoring MySQL data, but it does not handle scheduling, retention policies, offsite storage, encryption, or restore verification. Use it as a replacement for ad-hoc mysqldump scripts during development, not as a disaster recovery solution. For production backups, pair a dedicated package such as spatie/laravel-backup with tested restore procedures.
- How should I test grafite/database before committing to it?
- Create a throwaway branch, require the package pinned to an exact version, and run every command against a disposable local database. Include deliberate failure cases such as a missing mysqldump binary or an incorrect password, and observe whether the command exits non-zero instead of silently succeeding. Also test restore, not just dump, since a dump you cannot restore is worthless.
- Is grafite/database still maintained, and what are the alternatives?
- Maintenance signals are weak: four stars, zero dependents, and a composite score of roughly 0.02 indicate the package is effectively unvetted by the ecosystem, so check the date of the last commit and release before relying on it. Comparable options include barryvdh/laravel-db-snapshots for snapshot-style dumps, spatie/laravel-backup for full backup and retention workflows, or a small hand-rolled mysqldump wrapper you fully control. Adoption is low cost and fully reversible, so a bounded spike is a reasonable way to evaluate it.