Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
rotexdegba opened this issue Mar 3, 2023 · 0 comments
Open

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

rotexdegba opened this issue Mar 3, 2023 · 0 comments
Labels
documentation Issues related to improvement of documentation

Comments

@rotexdegba
Copy link
Member

rotexdegba commented Mar 3, 2023

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.

@rotexdegba rotexdegba added the documentation Issues related to improvement of documentation label Mar 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Issues related to improvement of documentation
Projects
None yet
Development

No branches or pull requests

1 participant