luckyframework / authentic

An authentication library for Lucky projects
MIT License
14 stars 13 forks source link

Alters email column to citext type #51

Closed rmarronnier closed 3 years ago

rmarronnier commented 3 years ago

Fixes #9

Inspired by : http://shuber.io/case-insensitive-unique-constraints-in-postgres/

Do not merge this as it is :

Edit : https://www.postgresql.org/docs/current/citext.html

jwoertink commented 3 years ago

We now have support for citext https://github.com/luckyframework/avram/pull/608 This migration, however, is actually for the specs for Authentic. Generated apps would use this migration. So we'd need to update both spots as well as I'd like to see a spec on this shard to just ensure that having a citext email will actually work with different case emails.

Thanks for the suggestion on this!

rmarronnier commented 3 years ago

Thanks for the migration pointer ! I'll take care of this in the next days.

Right off the bat, the two specs to be added I can think of are :

jwoertink commented 3 years ago

Yup! Those two specs would be great! Thanks

rmarronnier commented 3 years ago

While trying to write the specs, I realized :

We have nevertheless some decisions to make :

rmarronnier commented 3 years ago

Also, copy-pasting code from the lucky-cli repo to test seems to me it could bite us later if we forget to update both repo. Is there any way to move all Authentic specific code from lucky-cli to the Authentic repo and make lucky-cli rely on Authentic shard for code generation ?