Skip to content

[NFR]: make:model from a database table #50

Closed

Description

@niden

crest make:model <table> reads a table from the database of the project and writes a model class (devtools model). A model belongs to no flavor, so the command works in MVC and in ADR projects.

Scope

  • A property for each column.
  • initialize() with setSource().
  • The default path model.
  • An existing file stops the command, unless --force is given.
  • Clear errors for no connection and for a table that does not exist.
  • The tests use SQLite.

Open

  • Where crest gets the connection: a database key in crest.php, the .env file, or the db service of the project.
  • Typed properties, or docblock types only.
  • The default folder for each flavor.
  • The databases: MySQL, PostgreSQL, SQLite.

Done when

crest make:model users writes a Users model with a property for each column, and the model reads a row from the table.

Part of #11. Depends on #44.

Activity

  1. self-assigned this
    on Oct 13, 2026
  2. added
    enhancement
    on Oct 13, 2026
  3. added theissue type on Oct 13, 2026
  4. niden commented on Oct 15, 2026

    @niden
    SponsorMemberAuthor

    Resolved in #63

  5. moved this from Backlog to Implemented in Phalcon v5on Oct 15, 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