PHPackages                             ivybridge/model-mgr - 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. ivybridge/model-mgr

ActiveLibrary

ivybridge/model-mgr
===================

Simple command-line model manager for Phalcon. It generates models from certain schemas. It can update their properties only, keep the suffixes of tables, etc.

1.0.3(6y ago)111PHPPHP &gt;=5.5 &lt; 7.3.2 || &gt;7.3.3

Since Jul 28Pushed 6y ago2 watchersCompare

[ Source](https://github.com/BrayanIribe/ModelMgr)[ Packagist](https://packagist.org/packages/ivybridge/model-mgr)[ RSS](/packages/ivybridge-model-mgr/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (5)Used By (0)

ModelMgr
========

[](#modelmgr)

 [![ModelMgr](https://user-images.githubusercontent.com/520683/62002257-10dd0480-b0b5-11e9-8e17-cd22fcc6ac57.png)](https://user-images.githubusercontent.com/520683/62002257-10dd0480-b0b5-11e9-8e17-cd22fcc6ac57.png)

Model manager (ModelMgr) is a tool for Phalcon (at this moment). It generates models from a certain schemas. **It can update their properties only**, remove the suffixes of models, etc.

This application was developed by Brayan Iribe. It was made in order to reduce the hassle of type every table and model name in the command line.

**This tool requires [Phalcon Devtools](https://github.com/phalcon/phalcon-devtools) in order to work.**

**Only works with MySQL**

**¿Español? Desliza hacia abajo.**

### INSTALLATION

[](#installation)

In bash run:

```
> composer global require ivybridge/model-mgr
#now modelmgr will be available
> modelmgr
```

### COMMANDS

[](#commands)

 [![ModelMgr](https://user-images.githubusercontent.com/520683/62002137-10dc0500-b0b3-11e9-8088-8ae2d4f384da.png)](https://user-images.githubusercontent.com/520683/62002137-10dc0500-b0b3-11e9-8088-8ae2d4f384da.png)

If I have a table with the suffix for example: **sat\_impuestos**, where *sat* is the suffix, ModelMgr can or not keep it.

If I don't use the argument **--keep-suffix=sat**, the suffix will be deleted and the final model will be called **Impuestos**.

You can update only one model by passing its table name to ModelMgr, for example:

```
> modelmgr sat_impuestos
```

By doing this, if the model exists in the project and the table name is correct, the model **will be updated only**. The namespace is not required in this case, because you have provided the model already.

If you don't provide a model to update, **all existant models will be updated, and the non-existant will be created**.

 [![ModelMgr](https://user-images.githubusercontent.com/520683/62002098-7976b200-b0b2-11e9-9643-60ecfd6daa4e.png)](https://user-images.githubusercontent.com/520683/62002098-7976b200-b0b2-11e9-9643-60ecfd6daa4e.png)

**GREEN:** You can put whatever you want in those lines, ModelMgr can handle it and if the model is updated, it will keep it.

**RED:** You **CANNOT** put comments, functions or newlines in that block. **ModelMgr cannot handle it and will result in broken model**.

**YELLOW:** You can put whatever you want, as long as you don't use ModelMgr code injection. If you do so, the model can likely result broken with duplicated code.

**ModelMgr cannot detect if you added a comment, functions or new lines in the model props. Please dont do so. Keep the model as Phalcon generates it originally. If you add them, the model will likely result broken. You can comment an do whatever you want in the functions.**

**ModelMgr will use the database settings of config.php**

At this moment, ModelMgr works only for Phalcon Project. However, I'm interested porting it to other frameworks, like Laravel.

Español
=======

[](#español)

Model manager (ModelMgr) es una herramienta desarrollada para Phalcon. Genera modelos a partir de esquemas, puede actualizar las propiedades de los modelos solamente (conservando sus funciones originales), remover sufijos de tablas, etcétera.

Esta aplicación fue desarrollada por Brayan Iribe con el fin de reducir las molestias de escribir en la línea de comandos modelo por modelo y actualizar su contenido uno por uno.

**Esta herramienta requiere de las [Phalcon Devtools](https://github.com/phalcon/phalcon-devtools) para funcionar.**

**Solo trabaja con MySQL**

### INSTALACIÓN

[](#instalación)

En tu proyecto de Phalcon ejecuta:

```
> composer global require ivybridge/model-mgr
#ahora modelmgr debe estar disponible
> modelmgr
```

### COMANDOS

[](#comandos)

 [![ModelMgr](https://user-images.githubusercontent.com/520683/62002137-10dc0500-b0b3-11e9-8088-8ae2d4f384da.png)](https://user-images.githubusercontent.com/520683/62002137-10dc0500-b0b3-11e9-8088-8ae2d4f384da.png)

Si tengo una tabla con un sufijo por ejemplo: **sat\_impuestos**, donde *sat* es el sufijo, ModelMgr puede o no conservar el mismo.

Si no se utiliza el comando **--keep-sufix=sat**, el sufijo se eliminará y el modelo terminará llamandose **Impuestos**.

Puedes actualizar las propiedades de un modelo simplemente pasando su nombre a ModelMgr, por ejemplo:

```
> modelmgr sat_impuestos
```

Al hacer esto, si el modelo existe en el proyecto y el nombre de la tabla es el correcto, se actualizará **solamente** dicho modelo. No es necesario pasar el **namespace**, ya que al tratarse de un solo modelo, se obtiene el namespace del mismo.

Si no se proporciona un modelo a actualizar, entonces **se crearán aquellos modelos que no existan en el momento, y se actualizarán aquellos que si existan**.

 [![ModelMgr](https://user-images.githubusercontent.com/520683/62002098-7976b200-b0b2-11e9-9643-60ecfd6daa4e.png)](https://user-images.githubusercontent.com/520683/62002098-7976b200-b0b2-11e9-9643-60ecfd6daa4e.png)

**VERDE:** Puedes poner lo que quieras en esas líneas, ModelMgr puede controlarlo. Si el modelo es actualizado, lo mantendrá ahí mismo.

**ROJO:** **NO PUEDES** poner comentarios, funciones o nuevas líneas en ese bloque. **ModelMgr no podrá controlarlo y devolverá un modelo probablemente roto**.

**AMARILLO:** Puedes poner lo que quieras, siempre y cuando no utilices la inyección de código de ModelMgr. Si lo haces, el modelo puede resultar roto o con código duplicado.

**ModelMgr no puede detectar que agregaste un comentario, funciones o nuevas líneas en las propiedades del modelo. Mantén el modelo como Phalcon lo genera originalmente. Si haces esto, el modelo puede terminar probablemente roto**.

En este momento, ModelMgr solo funciona para proyectos Phalcon. Sin embargo, estoy interesado en poder portar esta herramienta a otros frameworks, como Laravel.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

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

Total

4

Last Release

2464d ago

### Community

Maintainers

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

---

Top Contributors

[![BrayanIribe](https://avatars.githubusercontent.com/u/520683?v=4)](https://github.com/BrayanIribe "BrayanIribe (16 commits)")

---

Tags

modelmanagerphalcon

### Embed Badge

![Health badge](/badges/ivybridge-model-mgr/health.svg)

```
[![Health](https://phpackages.com/badges/ivybridge-model-mgr/health.svg)](https://phpackages.com/packages/ivybridge-model-mgr)
```

###  Alternatives

[spatie/laravel-translatable

A trait to make an Eloquent model hold translations

2.4k23.0M411](/packages/spatie-laravel-translatable)[spatie/eloquent-sortable

Sortable behaviour for eloquent models

1.5k22.9M266](/packages/spatie-eloquent-sortable)[socialiteproviders/manager

Easily add new or override built-in providers in Laravel Socialite.

42442.0M542](/packages/socialiteproviders-manager)[graham-campbell/manager

Manager Provides Some Manager Functionality For Laravel

39221.1M134](/packages/graham-campbell-manager)[pestphp/pest-plugin

The Pest plugin manager

4458.2M107](/packages/pestphp-pest-plugin)[cleverage/eav-manager

Blazing fast data modeling and enrichment

2319.0k1](/packages/cleverage-eav-manager)

PHPackages © 2026

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