janko / rodauth-rails

Rails integration for Rodauth authentication framework
https://github.com/jeremyevans/rodauth
MIT License
571 stars 40 forks source link

Fix that the sequel migration was made irreversible by my previous change #118

Closed Empact closed 2 years ago

Empact commented 2 years ago

Follow-up to https://github.com/janko/rodauth-rails/pull/117

Empact commented 2 years ago

This needs work as sequel migration doesn't implement reversible.

Empact commented 2 years ago

Options include:

janko commented 2 years ago

At this time I would go with the 3rd option, adding a comment to enable citext.

I'm preparing to add support for database functions soonish, and that will probably require splitting change to up & down, so I can incorporate enabling the citext extension after those changes.

janko commented 2 years ago

I figured out a workaround where we get to keep the change block, by rescuing NoMethodError when reverting the migration. It's a bit of a hack, but at least it will work until we add explicit down blocks.