You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[NFR]: make:model: views, sequences and partitions #88
make:model and make:model --all do not handle the database objects that are not usual tables in the same way on each database:
SQLite views: crest make:model <view> stops with table '<view>' was not found in the database of the 'db' service, because Phalcon tableExists() reads only type='table'. On MySQL, MariaDB and PostgreSQL, it writes a model with no relations.
--all skips the views. No option includes them.
--all writes a model for each MariaDB sequence (SHOW TABLES lists them) and for each PostgreSQL partition (information_schema.tables lists each one as a BASE TABLE). A PostgreSQL table with 24 monthly partitions gives 25 models. Not checked on a server yet.
Scope
make:model <view> works on SQLite as on the other databases.
An option for --all that includes the views.
--all writes no model for a MariaDB sequence, and writes one model for a PostgreSQL table with partitions.
Docs.
Open
The SQLite view fix: in crest, or in Phalcon tableExists().
Check the sequences and the partitions on a MariaDB server and a PostgreSQL server first.
The name of the option for the views.
Done when
On SQLite, crest make:model <view> writes a model with no relations.
On MariaDB, crest make:model --all writes no model for a sequence.
On PostgreSQL, crest make:model --all writes one model for a table with partitions.
With the new option, crest make:model --all also writes a model for each view.
Activity
niden commentedon Nov 22, 2026
Resolved in #91