Skip to content

Document Re-running Schema Tool after modifying db tables #26

Description

@rotexdegba

The Cli tool generates a table meta-data array into a file that ends in FieldsMetadata.php for each Model if the store_table_col_metadata_array_in_file option in the cli tool's config is set to a value of true. This leads to the Model class loading its table_cols property with the array returned from the file that ends in FieldsMetadata.php, which eliminates the need for an extra query to fetch table col meta-data from the information schema at runtime.

Because of this optimization, developers have to remember to always re-run the cli tool every time any change is made to any of the tables associated with the Models in their application so that the file that ends in FieldsMetadata.php will be updated with the new schema changes. Failure to do so will lead to new fields added to a table not being recognized as table columns by the corresponding LeanOrm Model and fields that were deleted from a table not being removed from the Model.

Make sure this caveat is well documented.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationIssues related to improvement of documentation

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions