westonganger/rails_i18n_manager

Migration installation is awkward, undocumented.

dhnaranjo opened this issue · 4 comments

Hey, hi! The need to add your db tables is not included in the docs. When I went looking for a generator I found a rake task called rails_i18n_manager:install:migrations which looked promising, so I ran it. I migrated and got hit with an error about two migrations with the same name, which was a new one for me. Eventually I figured out you were running it from the migration without copying it, and it works, but it's opaque and honestly kinda weird. I would prefer you to provide a generator that copies the migration to my own migrations folder. That is what I think folks are used to.

Dang I really liked the auto-migration thing. Since this is an engine (seperate app with no ties to main app). I really felt it was nicer to have everything automatically loaded without getting super involved in setup/installation.

What are the downfalls with the automatic migration approach? Probably its difficult to revert the migration? Or maybe without documentation about the auto-migrations, its just not obvious that database tables exist or what tables they are.

I think you might be right, It might be better to specifically have this migration thing as an installation step. Rather than hoping the user will read whatever documentation is provided about the automatic migrations.

Im quite used to gems having large install instructions with DB migrations but Rails engines are a somewhat new thing for me (OSS wise). I guess I felt a desire for it to be gem-like but with higher-level abstraction and less developer burden/overhead. Maybe I can attempt to keep that mantra but change stance on the migrations part.

This totally is a nicer experience if presented to someone not used to the convention, but for Rails-acquainted folks it's more of an expectation violation.

A middle ground could be a better error experience, the error I got was about a missing table rather than a pending migration, which would be an immediate cue to migrate. But even with that and documentation I think the safest bet is to do what people already understand.

The inability to preview the migration also makes it harder to adjust for individual cases. I have, in apps running UUID ids, often needed to modify gem migrations to be compatible.

This is now resolved. Migration install is no longer automatic (#3)