PHPackages                             dq042000/mysql-workbench-schema-exporter - 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. dq042000/mysql-workbench-schema-exporter

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

dq042000/mysql-workbench-schema-exporter
========================================

MySQL Workbench Schema Exporter

v4.0.3(1y ago)01111MITPHPPHP &gt;=7.2

Since Nov 4Pushed 1y agoCompare

[ Source](https://github.com/dq042000/mysql-workbench-schema-exporter)[ Packagist](https://packagist.org/packages/dq042000/mysql-workbench-schema-exporter)[ Docs](https://github.com/dq042000/mysql-workbench-schema-exporter)[ RSS](/packages/dq042000-mysql-workbench-schema-exporter/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (1)Versions (6)Used By (1)

[![Build Status](https://github.com/mysql-workbench-schema-exporter/mysql-workbench-schema-exporter/actions/workflows/continuous-integration.yml/badge.svg)](https://github.com/mysql-workbench-schema-exporter/mysql-workbench-schema-exporter/actions/workflows/continuous-integration.yml/badge.svg)[![Latest Stable Version](https://camo.githubusercontent.com/97a7c1a517aaf5a8525544979cfd81c03a44848bf184efead2bfae6cc65026e6/68747470733a2f2f706f7365722e707567782e6f72672f6d7973716c2d776f726b62656e63682d736368656d612d6578706f727465722f6d7973716c2d776f726b62656e63682d736368656d612d6578706f727465722f762f737461626c652e737667)](https://packagist.org/packages/mysql-workbench-schema-exporter/mysql-workbench-schema-exporter)[![Total Downloads](https://camo.githubusercontent.com/a4ee6674ca6b1f5388f50005d1d2ee04bbcb4c98a9c528f3f4d177f4b38a0445/68747470733a2f2f706f7365722e707567782e6f72672f6d7973716c2d776f726b62656e63682d736368656d612d6578706f727465722f6d7973716c2d776f726b62656e63682d736368656d612d6578706f727465722f646f776e6c6f6164732e737667)](https://packagist.org/packages/mysql-workbench-schema-exporter/mysql-workbench-schema-exporter)[![License](https://camo.githubusercontent.com/a5083a9616d71a80f0a45b71625734b1a483ca0e4585ad8156d091f609e6530e/68747470733a2f2f706f7365722e707567782e6f72672f6d7973716c2d776f726b62656e63682d736368656d612d6578706f727465722f6d7973716c2d776f726b62656e63682d736368656d612d6578706f727465722f6c6963656e73652e737667)](https://packagist.org/packages/mysql-workbench-schema-exporter/mysql-workbench-schema-exporter)

README
======

[](#readme)

fix PHP Deprecated.

What is MySQL Workbench Schema Exporter?
----------------------------------------

[](#what-is-mysql-workbench-schema-exporter)

[MySQL Workbench](http://www.mysql.com/products/workbench/) Schema Exporter is a library to transform the MySQL Workbench model (`*.mwb`) to useful another schemas.

It is inspired by [mysql-workbench-doctrine-plugin](http://code.google.com/p/mysql-workbench-doctrine-plugin/).

Currently, MySQL Workbench Schema Exporter can export the model to various schemas using a formatter plugin:

- Doctrine 1.0 [YAML Schema](http://docs.doctrine-project.org/projects/doctrine1/en/latest/en/manual/yaml-schema-files.html).
- Doctrine 2.0 [YAML Schema](http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/yaml-mapping.html), [Annotation Classes](http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/annotations-reference.html)or Annotation Classes with [Zend Framework 2](http://framework.zend.com/)[Input Filter support](http://framework.zend.com/manual/2.1/en/modules/zend.input-filter.intro.html).
- [Sequelize](https://sequelize.org).
- Propel [XML Schema](http://www.propelorm.org/reference/schema) and YAML Schema.
- Sencha ExtJS3 Model and Sencha [ExtJS4 Model](http://www.sencha.com/products/extjs/).
- [Zend DbTable](http://framework.zend.com/manual/1.12/en/zend.db.table.html) and Zend Rest Controller.

The actual conversion to another schema is done using an exporter. These plugins are available in subprojects:

- [Doctrine1 Exporter](https://github.com/mysql-workbench-schema-exporter/doctrine1-exporter)
- [Doctrine2 Exporter](https://github.com/mysql-workbench-schema-exporter/doctrine2-exporter)
- [Propel1 Exporter](https://github.com/mysql-workbench-schema-exporter/propel1-exporter)
- [Sencha ExtJS Exporter](https://github.com/mysql-workbench-schema-exporter/sencha-exporter)
- [Sequelize Exporter](https://github.com/mysql-workbench-schema-exporter/sequelize-exporter)
- [Zend Framework 1 Exporter](https://github.com/mysql-workbench-schema-exporter/zend1-exporter)

Prerequisites
-------------

[](#prerequisites)

- PHP 7.2+
- Composer to install the dependencies

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

[](#installation)

1. In your project directory issue:

```
composer require --dev mysql-workbench-schema-exporter/mysql-workbench-schema-exporter

```

2. You then can invoke the CLI script using `vendor/bin/mysql-workbench-schema-export`.
3. You can directly require an exporter for your project:

```
composer require --dev mysql-workbench-schema-exporter/doctrine2-exporter

```

Command Line Interface (CLI)
----------------------------

[](#command-line-interface-cli)

The `mysql-workbench-schema-export` command helps export a workbench schema model directly from command line. It has feature to customize export configuration before exporting. By default, it will use config file `export.json` located in the current directory to supply the parameter if it find it.

Command usage:

```
vendor/bin/mysql-workbench-schema-export [options] FILE [DEST]

```

Where:

- `FILE`

    The MySQL Workbench model file to export.
- `DEST`

    The destination directory (optional), if not specified current directory assumed.

Options:

- `--export=type`

Choose the result of the export, supported type can be obtained using `--list-exporter`. If this option is omitted and no config file found, the CLI will prompt to choose which exporter to use.

- `--config=file`

Read export parameters from file (in JSON format).

- `--save-config`

Save export parameters to file `export.json`, later can be used as value for `--config=file`.

- `--list-exporter`

Show all available exporter.

- `--no-auto-config`

Disable automatic config file lookup.

- `--zip`

Compress the result.

- `--help`

Show the usage (or suppress any parameters).

Sample usage:

```
vendor/bin/mysql-workbench-schema-export --export=doctrine1-yaml example/data/test.mwb ./generated
vendor/bin/mysql-workbench-schema-export --zip example/data/test.mwb

```

Configuring MySQL Workbench Schema Exporter
-------------------------------------------

[](#configuring-mysql-workbench-schema-exporter)

MySQL Workbench Schema Exporter can be configured at runtime using methods:

- Configuration files.
- Model comment, either applied to table, column, or foreign key object.

Refers to exporter project to show detailed information.

- [Doctrine1 Exporter](https://github.com/mysql-workbench-schema-exporter/doctrine1-exporter#readme)
- [Doctrine2 Exporter](https://github.com/mysql-workbench-schema-exporter/doctrine2-exporter#readme)
- [Propel1 Exporter](https://github.com/mysql-workbench-schema-exporter/propel1-exporter#readme)
- [Sencha ExtJS Exporter](https://github.com/mysql-workbench-schema-exporter/sencha-exporter#readme)
- [Sequelize Exporter](https://github.com/mysql-workbench-schema-exporter/sequelize-exporter#readme)
- [Zend Framework 1 Exporter](https://github.com/mysql-workbench-schema-exporter/zend1-exporter#readme)

Common Model Comment Behavior
-----------------------------

[](#common-model-comment-behavior)

- `{MwbExporter:external}true{/MwbExporter:external}` (applied to Table, View)

    Mark table/view as external to skip table/view code generation. For Doctrine use `{d:external}true{/d:external}` instead.
- `{MwbExporter:category}mycategory{/MwbExporter:category}` (applied to Table)

    Table category used to groups the table for sorting. This way, generated table output can be sorted as you need such as in Propel YAML schema (obviously useful for exporter which results in single file output).

Using MySQL Workbench Schema Exporter as Library
------------------------------------------------

[](#using-mysql-workbench-schema-exporter-as-library)

If you want to use MySQL Workbench Schema Exporter as a library for other project. See the included usage in the `example` folder.

Test Database
-------------

[](#test-database)

- [Sakila Sample Database documentation](http://dev.mysql.com/doc/sakila/en/index.html).
- [Sakila Sample Database download](http://dev.mysql.com/doc/index-other.html).

Links
-----

[](#links)

- [MySQL Workbench](http://wb.mysql.com/)

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance40

Moderate activity, may be stable

Popularity10

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 52% 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 ~195 days

Total

5

Last Release

503d ago

Major Versions

v3.1.4.2 → v4.0.12023-04-27

PHP version history (2 changes)v3.1.4.1PHP &gt;=5.4.0

v4.0.1PHP &gt;=7.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/87dae7c0cd300708765fa203a65dce69ba42aee46bfe4aba67fbd7f5f8c7f5de?d=identicon)[dq042000](/maintainers/dq042000)

---

Top Contributors

[![tohenk](https://avatars.githubusercontent.com/u/350747?v=4)](https://github.com/tohenk "tohenk (286 commits)")[![johmue](https://avatars.githubusercontent.com/u/281784?v=4)](https://github.com/johmue "johmue (135 commits)")[![rvock](https://avatars.githubusercontent.com/u/209159?v=4)](https://github.com/rvock "rvock (31 commits)")[![meven](https://avatars.githubusercontent.com/u/620941?v=4)](https://github.com/meven "meven (20 commits)")[![armandabric](https://avatars.githubusercontent.com/u/95120?v=4)](https://github.com/armandabric "armandabric (14 commits)")[![DamienHarper](https://avatars.githubusercontent.com/u/2448660?v=4)](https://github.com/DamienHarper "DamienHarper (11 commits)")[![allansun](https://avatars.githubusercontent.com/u/20531?v=4)](https://github.com/allansun "allansun (10 commits)")[![fgaudin](https://avatars.githubusercontent.com/u/118230?v=4)](https://github.com/fgaudin "fgaudin (6 commits)")[![dq042000](https://avatars.githubusercontent.com/u/7939291?v=4)](https://github.com/dq042000 "dq042000 (5 commits)")[![cesaric](https://avatars.githubusercontent.com/u/261590?v=4)](https://github.com/cesaric "cesaric (5 commits)")[![Easen](https://avatars.githubusercontent.com/u/111948?v=4)](https://github.com/Easen "Easen (5 commits)")[![Yoda-BZH](https://avatars.githubusercontent.com/u/751889?v=4)](https://github.com/Yoda-BZH "Yoda-BZH (4 commits)")[![verticka](https://avatars.githubusercontent.com/u/391828?v=4)](https://github.com/verticka "verticka (3 commits)")[![drowe](https://avatars.githubusercontent.com/u/234503?v=4)](https://github.com/drowe "drowe (2 commits)")[![molaux](https://avatars.githubusercontent.com/u/9612549?v=4)](https://github.com/molaux "molaux (2 commits)")[![drymek](https://avatars.githubusercontent.com/u/492240?v=4)](https://github.com/drymek "drymek (2 commits)")[![adrianbardan](https://avatars.githubusercontent.com/u/2693350?v=4)](https://github.com/adrianbardan "adrianbardan (2 commits)")[![doncem](https://avatars.githubusercontent.com/u/1420191?v=4)](https://github.com/doncem "doncem (1 commits)")[![sdenev](https://avatars.githubusercontent.com/u/1447657?v=4)](https://github.com/sdenev "sdenev (1 commits)")[![slknijnenburg](https://avatars.githubusercontent.com/u/1593444?v=4)](https://github.com/slknijnenburg "slknijnenburg (1 commits)")

---

Tags

clidatabasemysqldoctrinezendextjspropelsequelizejsmysql workbench

### Embed Badge

![Health badge](/badges/dq042000-mysql-workbench-schema-exporter/health.svg)

```
[![Health](https://phpackages.com/badges/dq042000-mysql-workbench-schema-exporter/health.svg)](https://phpackages.com/packages/dq042000-mysql-workbench-schema-exporter)
```

###  Alternatives

[mysql-workbench-schema-exporter/mysql-workbench-schema-exporter

MySQL Workbench Schema Exporter

488188.5k10](/packages/mysql-workbench-schema-exporter-mysql-workbench-schema-exporter)[scienta/doctrine-json-functions

A set of extensions to Doctrine that add support for json query functions.

58523.9M36](/packages/scienta-doctrine-json-functions)[mysql-workbench-schema-exporter/doctrine2-exporter

MySQL Workbench Schema Exporter for Doctrine 2

25143.3k2](/packages/mysql-workbench-schema-exporter-doctrine2-exporter)

PHPackages © 2026

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