Skip to content
This repository was archived by the owner on May 13, 2022. It is now read-only.
This repository was 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

@ronen

Description

@ronen

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions