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
I would love to be able to customize a few more things about the annotations.
Instead of adding another line for # Schema version: 20240510213625, what if it could be displayed as below?
Since the table name normally is predictable based on the model name, and is already explicitly in the code when it diverges from the convention, it would be nice to be able to remove it and condense the annotations by 2 lines.
It would be very useful if foreign keys could be added along with constraints & indices, instead of requiring an extra section below the column information.
So instead of this:
# == Schema Information# Schema version: 20240510213625## Table name: app_gem_versions## id :integer not null, primary key# current_version :string not null# latest_version :string not null# newer_major_version :string# newer_minor_version :string# newer_patch_version :string# created_at :datetime not null# updated_at :datetime not null# app_gem_id :integer not null, indexed, foreign key# app_id :integer not null, indexed, foreign key## Foreign Keys## app_gem_id (app_gem_id => app_gems.id)# app_id (app_id => apps.id)
it would be possible to have this:
# == Schema Information (20240510213625) ==## id :integer not null, primary key# current_version :string not null# latest_version :string not null# newer_major_version :string# newer_minor_version :string# newer_patch_version :string# created_at :datetime not null# updated_at :datetime not null# app_gem_id :integer not null, indexed, foreign key# app_id :integer not null, indexed, foreign key
If any of these things are already possible, I wasn't able to figure out how to do them.
The text was updated successfully, but these errors were encountered:
@brandondrew hi there -- thanks for using the gem and adding an issue!
The things you're asking for make sense, although I'm not if it's currently possible to make it configurable as you'd want it. We'd need to add additional options, see [1] for an example, or add templating-esque functionality so we don't break the current existing behavior used by many. If you have any ideas there that would be great, or if you want to start on a PR, I'd be more than happy to assist there.
For the 3rd ask about separate foreign keys, just to clarify, is the first output (has , foreign key) taken from your Rails app?
For starters I'm hacking the results I want by monkey-patching in my app with an initializer. Hopefully (if I find the time) that will work its way into my fork, and result in a PR. I've added the first two features so far through monkey-patching.
I would love to be able to customize a few more things about the annotations.
# Schema version: 20240510213625
, what if it could be displayed as below?So instead of this:
it would be possible to have this:
If any of these things are already possible, I wasn't able to figure out how to do them.
The text was updated successfully, but these errors were encountered: