PHPackages                             sigmaphp/sigmaphp-db - 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. [Framework](/categories/framework)
4. /
5. sigmaphp/sigmaphp-db

ActiveLibrary[Framework](/categories/framework)

sigmaphp/sigmaphp-db
====================

PHP Database Tools

0.1.15(3w ago)029↓100%1MITPHPCI passing

Since Jan 31Pushed 3d ago1 watchersCompare

[ Source](https://github.com/SigmaPHP/SigmaPHP-DB)[ Packagist](https://packagist.org/packages/sigmaphp/sigmaphp-db)[ RSS](/packages/sigmaphp-sigmaphp-db/feed)WikiDiscussions master Synced today

READMEChangelog (10)Dependencies (2)Versions (17)Used By (1)

SigmaPHP-DB
===========

[](#sigmaphp-db)

SigmaPHP-DB is a collection of PHP Database Tools. That support primarily MySQL RDBMS (Other RDBMS support will be added in future). Including migrations with rollback , seeding , query builder , ORM and much more , all these features can be used through an elegant CLI script in your terminal.

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

[](#installation)

```
composer require agashe/sigmaphp-db

```

Configurations
--------------

[](#configurations)

After installation , you should create a new config file , to include your database connection parameters , and also edit other options like migrations / seeders paths.

To generate new config file , run the following command :

```
php ./vendor/bin/sigma-db create:config

```

A new config file with name **database.php** wil be created in the root of your project's directory.

You can simply change the name and the location of the config file , but this will require you , to pass the config file path , when use the CLI script :

```
php ./vendor/bin/sigma-db migrate --config=/path/to/my-config.php

```

Documentation
-------------

[](#documentation)

- [Migrations](https://github.com/agashe/SigmaPHP-DB/blob/master/docs/Migrations.md)
- [Seeders](https://github.com/agashe/SigmaPHP-DB/blob/master/docs/Seeders.md)
- [Query Builder](https://github.com/agashe/SigmaPHP-DB/blob/master/docs/QueryBuilder.md)
- [ORM](https://github.com/agashe/SigmaPHP-DB/blob/master/docs/ORM.md)

CLI Usage
---------

[](#cli-usage)

In the table below , you can find all available commands :

   Command Description     create:config {path}  Create new config file, if no path was provided , a default config file (database.php) will be created in the root of the project's folder.    create:migration {migration name}  Create new migration file. It's recommended for the migration file to follow class naming rules , like using only nouns and PascalCase .. etc. Also no need to add .php extension , "Migration.php". will be appended automatically to the file name.    create:model {model name}  Create new model class. In addition this command will generate a migration file for creating the corresponding table.    create:seeder {seeder name}  Create new seeder file. Please note that , the same rules for naming the migration file is also applied to the seeder.    drop  Drop all tables in the database. A confirmation message will ask you to confirm before executing this command.    fresh  Drop all tables in the database. then will run all migrations and seed the database. (will ask for confirmation)    help  Print a list by all available commands.    migrate {migration name}  Run all migrations files. Optionally you can pass migration file name , to run specific migration.    rollback {date}  Rollback latest migration. or choose specific date to rollback to.    seed {seeder name}  Run seeders. or run specific seeder.    version  Print the current version of SigmaPHP-DB Package.    truncate  Delete the data in all tables. (will ask for confirmation)   And here few examples on how to use the commands:

```
php ./vendor/bin/sigma-db create:migration UsersTable
// will create UsersTableMigration.php file into /path/to/migrations

php ./vendor/bin/sigma-db create:seed UsersRolesSeeder
// run seeder UsersRolesSeeder.php

php ./vendor/bin/sigma-db rollback 2023-1-20
// rollback all migrations up to 2023-1-20 , the migrations running dates all saved into the migrations logs table (default name is db_logs). And of course you can change it in the config file

php ./vendor/bin/sigma-db drop
// to drop all tables

php ./vendor/bin/sigma-db fresh --config=/path/to/db-testing-config.php
// to drop all tables then migrate and seed , and in this example we assume that you have put the config in your path of choice

```

License
-------

[](#license)

(SigmaPHP-DB) released under the terms of the MIT license.

###  Health Score

42

—

FairBetter than 89% of packages

Maintenance97

Actively maintained with recent releases

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity43

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 ~75 days

Recently: every ~8 days

Total

16

Last Release

24d ago

### Community

Maintainers

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

---

Top Contributors

[![agashe](https://avatars.githubusercontent.com/u/12908115?v=4)](https://github.com/agashe "agashe (110 commits)")

---

Tags

frameworkSigmaPHP

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[laravel/framework

The Laravel Framework.

34.6k509.9M16.8k](/packages/laravel-framework)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[wpstarter/framework

The WpStarter Framework - Laravel Framework for WordPress

1810.1k4](/packages/wpstarter-framework)

PHPackages © 2026

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