PHPackages                             degami/sql-schema - 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. degami/sql-schema

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

degami/sql-schema
=================

Library for describe of the database schema.

1294PHP

Since Oct 12Pushed 7mo agoCompare

[ Source](https://github.com/degami/sql-schema)[ Packagist](https://packagist.org/packages/degami/sql-schema)[ RSS](/packages/degami-sql-schema/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Degami\\SqlSchema
=================

[](#degamisqlschema)

Library for describe of the database schema.

forked from :

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

[](#installation)

```
composer require degami/sql-schema

```

Degami\\SqlSchema requires PHP 7.2 or later.

Usage
-----

[](#usage)

```
use Degami\SqlSchema\Index;
$schema = new Degami\SqlSchema\Schema;

$table = $schema->addTable('book');
$table->addColumn('id', 'INT', NULL, array('UNSIGNED'));
      ->addColumn('name', 'VARCHAR', array(200));
      ->addColumn('author_id', 'INT', NULL, array('UNSIGNED'));
      ->addIndex(NULL, 'id', Index::TYPE_PRIMARY);
      ->addIndex('name_author_id', array('name', 'author_id'), Index::TYPE_UNIQUE);

foreach( $schema->getTables() as $table ) {
    echo $table->showCreate()."\n";
}
```

---

License: [New BSD License](license.md)

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance45

Moderate activity, may be stable

Popularity13

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity13

Early-stage or recently created project

 Bus Factor1

Top contributor holds 77.8% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/d03aa1b019b2ce33fea444b22e12336dc3128d9638493ddd3861328239bfff01?d=identicon)[degami](/maintainers/degami)

---

Top Contributors

[![degami](https://avatars.githubusercontent.com/u/2931478?v=4)](https://github.com/degami "degami (42 commits)")[![janpecha](https://avatars.githubusercontent.com/u/637719?v=4)](https://github.com/janpecha "janpecha (12 commits)")

### Embed Badge

![Health badge](/badges/degami-sql-schema/health.svg)

```
[![Health](https://phpackages.com/badges/degami-sql-schema/health.svg)](https://phpackages.com/packages/degami-sql-schema)
```

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[mongodb/mongodb

MongoDB driver library

1.6k64.0M546](/packages/mongodb-mongodb)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90340.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)

PHPackages © 2026

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