Skip to content

[NFR]: make:model for a table in another schema #69

Closed

Description

@niden

make:model reads only the default schema of the connection. devtools had --schema: it read a table from another schema (a PostgreSQL schema, or another database on the MySQL server) and wrote setSchema() in initialize().

Scope

  • A schema for make:model and make:model --all: an option, a models.schema key in crest.php, or both.
  • ModelProperties, ForeignKeys, ModelTables and ModelRelations read the tables, columns and keys of that schema (the Phalcon adapters take a $schema argument).
  • The base gets setSchema() in initialize().
  • A rule for a foreign key to a table in another schema.
  • SQLite has no schemas: crest stops with a message.
  • config:show shows the setting, if it is a models key.
  • Tests on PostgreSQL, MySQL and MariaDB, on v5 and v6.

Open

  • An option, a models.schema key, or both.
  • The rule for a key to another schema: skip it with a reason, or follow it.

Done when

crest make:model invoices for the schema billing writes a model with setSchema('billing'), and Phalcon reads a row and its related rows through it, on PostgreSQL and MySQL.

Part of #11. Depends on #50, #51, #52, #53.

Activity

  1. self-assigned this
    on Oct 19, 2026
  2. added theissue type on Oct 19, 2026
  3. added
    enhancement
    on Oct 19, 2026
  4. moved this from Backlog to Active Sprint in Phalcon v5on Oct 19, 2026
  5. niden commented on Nov 10, 2026

    @niden
    SponsorMemberAuthor

    Resolved in #76

  6. moved this from Active Sprint to Implemented in Phalcon v5on Nov 10, 2026
  7. 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