You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 13, 2022. It is now read-only.
It could be very useful to support specifying arbitrary per-table and/or per-column metadata as part of a migration, in a manner that will be queryable and included in the dump.
The schema_associations and schema_validations gems could make use of such a capability, to be able to specify additional parameters or options (or suppression of) associations and validations that are generated based on the db, to avoid needing to do that in the model definition, in the name of keeping things more DRY.
This could perhaps be implemented via a JSON-encoded string in a postgresql or mysql COMMENT, but that could run up against string length limits. Another option would be to maintain a "schema_metadata" table (analogous to the schema_migrations table that rails maintains) with columns table_name, column_name (optional), and data (JSON).
The text was updated successfully, but these errors were encountered:
It could be very useful to support specifying arbitrary per-table and/or per-column metadata as part of a migration, in a manner that will be queryable and included in the dump.
The schema_associations and schema_validations gems could make use of such a capability, to be able to specify additional parameters or options (or suppression of) associations and validations that are generated based on the db, to avoid needing to do that in the model definition, in the name of keeping things more DRY.
This could perhaps be implemented via a JSON-encoded string in a postgresql or mysql
COMMENT
, but that could run up against string length limits. Another option would be to maintain a "schema_metadata
" table (analogous to theschema_migrations
table that rails maintains) with columnstable_name
,column_name
(optional), anddata
(JSON).The text was updated successfully, but these errors were encountered: