Skip to content

[NFR]: make:model: views, sequences and partitions #88

Closed

Description

@niden

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.

From #52.

Activity

  1. self-assigned this
    on Nov 21, 2026
  2. added
    enhancement
    on Nov 21, 2026
  3. added theissue type on Nov 21, 2026
  4. niden commented on Nov 22, 2026

    @niden
    SponsorMemberAuthor

    Resolved in #91

  5. moved this from Backlog to Implemented in Phalcon v5on Nov 22, 2026
  6. moved this from Implemented to Released in Phalcon v5on Nov 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancement

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions