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 8mo 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 2w 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 13% of packages

Maintenance42

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

[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k117.2M114](/packages/jdorn-sql-formatter)[propel/propel1

Propel is an open-source Object-Relational Mapping (ORM) for PHP5.

8351.6M87](/packages/propel-propel1)[jfelder/oracledb

Oracle DB driver for Laravel

11518.4k](/packages/jfelder-oracledb)

PHPackages © 2026

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