PHPackages                             eiriksm/site-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. eiriksm/site-schema

ActiveDrupal-drush[Utility &amp; Helpers](/categories/utility)

eiriksm/site-schema
===================

Allows you to get the complete picture of a site schema, to use for CI for example

1.5.0(1y ago)121.5M↓28.7%1[1 issues](https://github.com/eiriksm/drush-site-schema/issues)GPL-2.0-or-laterPHPCI failing

Since May 23Pushed 1y ago1 watchersCompare

[ Source](https://github.com/eiriksm/drush-site-schema)[ Packagist](https://packagist.org/packages/eiriksm/site-schema)[ RSS](/packages/eiriksm-site-schema/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (7)Dependencies (2)Versions (8)Used By (0)

drush site-schema
=================

[](#drush-site-schema)

[![Test](https://github.com/eiriksm/drush-site-schema/actions/workflows/test.yml/badge.svg)](https://github.com/eiriksm/drush-site-schema/actions/workflows/test.yml)[![Packagist](https://camo.githubusercontent.com/ede247c7bfae10135c4c0931e96a72c97eb583bebaaef79d3e66cac35faaf135/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f656972696b736d2f736974652d736368656d612e737667)](https://packagist.org/packages/eiriksm/site-schema)

Get the complete picture of a Drupal site schema (updates and post updates).

This can be useful to always check in the database update schema for your site, so you have a conscious relationship to what effect an update will have on your site.

As an example, if you are getting automated updates to contributed modules, maybe you want to not auto-merge and deploy the ones that contain database updates.

This command outputs a complete picture of your site, meaning the database schema version of all modules, and the post\_update hooks for all modules. This way you can commit a complete picture of your site, and fail your CI if there is a difference in the file.

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

[](#installation)

Install with composer.

```
composer require eiriksm/site-schema

```

Usage
-----

[](#usage)

```
$ drush site-schema --help
Get the site schema for the current site.

Examples:
  site:schema Get the complete schema in text

Options:
  --format[=FORMAT] The format to output. [default: "table"]
  --fields=FIELDS   Limit output to only the listed elements. Name top-level elements by key, e.g. "--fields=name,date", or use dot notation to select a nested element, e.g.
                    "--fields=a.b.c as example".
  --field=FIELD     Select just one field, and force format to 'string'.

Aliases: site-schema

```

Examples
--------

[](#examples)

Output the entire schema

```
$ drush site-schema
 ------------- -------------------------------- ---------------------------------------------------------------------------
  Type          Module                           Value
 ------------- -------------------------------- ---------------------------------------------------------------------------
  schema        admin_toolbar                    8001
  schema        admin_toolbar_tools              8000
  ... shortened here for convenience ...
  schema        views_ui                         8000
  post_update                                    block_content_post_update_add_views_reusable_filter
  post_update                                    block_post_update_disable_blocks_with_missing_contexts
  post_update                                    block_post_update_disabled_region_update
  post_update                                    block_post_update_fix_negate_in_conditions
  post_update                                    comment_post_update_add_ip_address_setting
  post_update                                    comment_post_update_enable_comment_admin_view
  ... and so on

```

Output the entire schema in json

```
$ drush site-schema --format=json
[
    {
        "type": "schema",
        "module": "admin_toolbar",
        "value": "8001"
    },
    {
        "type": "schema",
        "module": "admin_toolbar_tools",
        "value": "8000"
    },
    ... And so on.

```

...or in yaml

```
$ drush site-schema --format=yaml
-
  type: schema
  module: admin_toolbar
  value: '8001'
-
  type: schema
  module: admin_toolbar_tools
  value: '8000'
-
# And so on.

```

And then you probably want to output it to a file? Just do that!

```
$ drush site-schema --format=json > site-schema.json

```

And then you can commit that file, and track your site schema with version control.

Licence
-------

[](#licence)

GPL-2.0+

###  Health Score

43

—

FairBetter than 89% of packages

Maintenance36

Infrequent updates — may be unmaintained

Popularity46

Moderate usage in the ecosystem

Community11

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 92.9% 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 ~280 days

Recently: every ~224 days

Total

7

Last Release

551d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/012259317b9e5a3b6cc2b03681d852940e11ac05f37bfbda7360d6524b1c9085?d=identicon)[eiriksm](/maintainers/eiriksm)

---

Top Contributors

[![eiriksm](https://avatars.githubusercontent.com/u/865153?v=4)](https://github.com/eiriksm "eiriksm (26 commits)")[![ChaseOnTheWeb](https://avatars.githubusercontent.com/u/783851?v=4)](https://github.com/ChaseOnTheWeb "ChaseOnTheWeb (1 commits)")[![geekygnr](https://avatars.githubusercontent.com/u/5747760?v=4)](https://github.com/geekygnr "geekygnr (1 commits)")

---

Tags

composerdrupal-8drush-commands

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/eiriksm-site-schema/health.svg)

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

###  Alternatives

[farmos/farmos

A web-based farm record keeping application.

1.3k7.1k1](/packages/farmos-farmos)[lullabot/drainpipe

An automated build tool to allow projects to have a set standardized operations scripts.

43785.5k4](/packages/lullabot-drainpipe)[acquia/cohesion

Site Studio

271.7M10](/packages/acquia-cohesion)[ec-europa/toolkit

Toolkit packaged for Drupal projects based on Robo.

40252.8k34](/packages/ec-europa-toolkit)[vardot/varbase-project

Project template for Varbase distribution.

5362.5k](/packages/vardot-varbase-project)[acquia/drupal-recommended-settings

The composer plugin for adding drupal-recommended-settings for Acquia Cloud.

111.3M6](/packages/acquia-drupal-recommended-settings)

PHPackages © 2026

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