pennylane-hq / activerecord-adapter-redshift

Other
6 stars 27 forks source link

Fix limit on int8 columns #8

Closed leonid-shevtsov closed 11 months ago

leonid-shevtsov commented 1 year ago

Hi, thanks for maintaining this gem!

I've encountered an issue that the int8 columns do not have the proper width in ActiveRecord (they have a default width of 32 bits instead.) The cause is that register_class_with_limit expects a SQL type like int(8), and doesn't know what to do with int8.

This PR fixes that by properly specifying the limit.

quentindemetz commented 11 months ago

Hi @leonid-shevtsov, I'd be more than happy to merge this, can you please add some specs 🙏🏻 ?

leonid-shevtsov commented 11 months ago

I'm sorry I don't see any spec setup in this gem.

Also to properly test this code you'd need to run it against Redshift. On our project we do that on CI and on my word, our specs related to these columns were fixed. :)