Skip to content
This repository has been archived by the owner on May 13, 2022. It is now read-only.

New gem request: Support arbitrary per-table and/or per-column metadata in schema #232

Open
ronen opened this issue Apr 25, 2016 · 0 comments

Comments

@ronen
Copy link
Member

ronen commented Apr 25, 2016

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).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant