PHPackages                             micheljonkman/declarative-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. micheljonkman/declarative-schema

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

micheljonkman/declarative-schema
================================

1.5.0(1y ago)020011MITPHPPHP ^8.2

Since Jan 30Pushed 1y ago1 watchersCompare

[ Source](https://github.com/MichelJonkman/declarative-schema)[ Packagist](https://packagist.org/packages/micheljonkman/declarative-schema)[ Docs](https://github.com/micheljonkman/declarative-schema)[ RSS](/packages/micheljonkman-declarative-schema/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (8)Dependencies (4)Versions (10)Used By (1)

Declarative Schema
==================

[](#declarative-schema)

Uses doctrine/dbal to manage a declarative schema approach.

Usage
-----

[](#usage)

This package has only been tested on MySQL but might work for other databases too.

Create a `schema.config.php` file in the directory where your `vendor` folder is. Go to [examples](examples/schema.config.php) to find an example of this file.

To create a migration use:

```
php vendor/bin/schema make:schema table_name
```

The [DBAL docs](https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/schema-representation.html#column) provide documentation on how to create new columns and indexes. Some Laravel like methods have also been added for ease of use.

For an example schema file go to [examples](examples/example_schema.php).

Then you can call the following command to run the changes on the database.

```
php vendor/bin/schema migrate:schema
```

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance42

Moderate activity, may be stable

Popularity11

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity60

Established project with proven stability

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

Recently: every ~84 days

Total

8

Last Release

476d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/254ff7ffd237524151a0ed5607b6dec6cd1aeb03419d69545f2deffb68018267?d=identicon)[micheljonkman](/maintainers/micheljonkman)

---

Top Contributors

[![MichelJonkman](https://avatars.githubusercontent.com/u/24224847?v=4)](https://github.com/MichelJonkman "MichelJonkman (29 commits)")

---

Tags

MichelJonkmandbal-schema

### Embed Badge

![Health badge](/badges/micheljonkman-declarative-schema/health.svg)

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

###  Alternatives

[elgg/elgg

Elgg is an award-winning social networking engine, delivering the building blocks that enable businesses, schools, universities and associations to create their own fully-featured social networks and applications.

1.7k15.7k5](/packages/elgg-elgg)[webfactory/slimdump

slimdump is a little tool to help you creating dumps of large MySQL-databases.

188124.8k1](/packages/webfactory-slimdump)[worksome/foggy

Foggy is a tool for making database dumps with some data removed/changed.

26571.7k1](/packages/worksome-foggy)[bacula-web/bacula-web

The open source web based reporting and monitoring tool for Bacula

1537.5k](/packages/bacula-web-bacula-web)[psx/sql

Generate type-safe PHP classes from your database

1773.4k4](/packages/psx-sql)[bartlett/php-compatinfo-db

Reference Database of all functions, constants, classes, interfaces on PHP standard distribution and about 110 extensions

1183.0k1](/packages/bartlett-php-compatinfo-db)

PHPackages © 2026

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