PHPackages                             nachopitt/db-commands - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. nachopitt/db-commands

ActiveLibrary[Database &amp; ORM](/categories/database)

nachopitt/db-commands
=====================

Artisan commands for managing databases.

v0.6.0(1mo ago)0489MITPHPPHP ^8.2CI passing

Since Dec 7Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/nachopitt/db-commands)[ Packagist](https://packagist.org/packages/nachopitt/db-commands)[ Docs](https://github.com/nachopitt/db-commands)[ RSS](/packages/nachopitt-db-commands/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (9)Dependencies (14)Versions (10)Used By (0)

DB Commands
===========

[](#db-commands)

A set of Laravel Artisan commands for database management.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require nachopitt/db-commands
```

Usage
-----

[](#usage)

### `db:create`

[](#dbcreate)

Create a new MySQL database.

```
php artisan db:create {name?} {--c|connection=}
```

Argument / OptionDescription`name`The name of the MySQL database to create. If not provided, the command will use the database name from your configuration.`--connection`The database connection to use (e.g. `mysql`). Defaults to the active default connection.### `db:drop`

[](#dbdrop)

Drop an existing MySQL database.

```
php artisan db:drop {name?} {--c|connection=} {--force}
```

Argument / OptionDescription`name`The name of the MySQL database to drop. If not provided, the command will use the database name from your configuration.`--connection`The database connection to use. Defaults to the active default connection.`--force`Force the operation to run without prompting for confirmation.### `db:export`

[](#dbexport)

Export an existing MySQL database into SQL statements.

```
php artisan db:export {schema?} {--c|connection=} {--skip-ssl}
```

Argument / OptionDescription`schema`The name of the MySQL database to export. If not provided, the command will use the database name from your configuration.`--connection`The database connection to use. Defaults to the active default connection.`--skip-ssl`Bypass SSL certificate verification for the `mysqldump` command.### `db:import`

[](#dbimport)

Import a SQL file into an existing MySQL database.

```
php artisan db:import {file?} {--s|schema=} {--i|ignore-foreign-key-checks} {--c|connection=}
```

Argument / OptionDescription`file`The path to the SQL file to import. If not provided, the command will use `database_model/{database}.sql`.`--schema`The name of the MySQL database to import into. If not provided, the command will use the database name from your configuration.`--ignore-foreign-key-checks`Ignore foreign key checks while importing.`--connection`The database connection to use. Defaults to the active default connection.### `db:truncate`

[](#dbtruncate)

Truncate tables from a MySQL database.

```
php artisan db:truncate {tables?} {--s|schema=} {--i|ignore-foreign-key-checks} {--c|connection=}
```

Argument / OptionDescription`tables`A comma-separated list of tables to truncate. If not provided, the command will truncate all tables in the database.`--schema`The name of the MySQL database to truncate tables from. If not provided, the command will use the database name from your configuration.`--ignore-foreign-key-checks`Ignore foreign key checks while truncating.`--connection`The database connection to use. Defaults to the active default connection.Testing
-------

[](#testing)

You can run the automated tests via:

```
composer test
```

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

46

—

FairBetter than 92% of packages

Maintenance93

Actively maintained with recent releases

Popularity18

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~164 days

Recently: every ~2 days

Total

9

Last Release

34d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/12923928?v=4)[nachopitt](/maintainers/nachopitt)[@nachopitt](https://github.com/nachopitt)

---

Top Contributors

[![nachopitt](https://avatars.githubusercontent.com/u/12923928?v=4)](https://github.com/nachopitt "nachopitt (20 commits)")

---

Tags

laravelschemadatabaseexportmysqlsqlimportcreatedrop

###  Code Quality

TestsPHPUnit

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/nachopitt-db-commands/health.svg)

```
[![Health](https://phpackages.com/badges/nachopitt-db-commands/health.svg)](https://phpackages.com/packages/nachopitt-db-commands)
```

###  Alternatives

[codewithdennis/larament

Larament is a time-saving starter kit to quickly launch Laravel 13.x projects. It includes FilamentPHP 5.x pre-installed and configured, along with additional tools and features to streamline your development workflow.

4041.8k](/packages/codewithdennis-larament)[rah/danpu

Zero-dependency MySQL dump library for easily exporting and importing databases

62416.0k12](/packages/rah-danpu)[ramadan/custom-fresh

A Laravel package to specify the tables that you do not want to drop while refreshing the database.

613.1k](/packages/ramadan-custom-fresh)[ramadan/easy-model

A Laravel package for enjoyably managing database queries.

111.6k](/packages/ramadan-easy-model)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
