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
The operational challenge of adding a default is it requires a 2-stage deploy (add a nil column, then come back and add a default)... at least until PG 11 maybe, so maybe I'm out of date on what's a safe migration.
Also, that column is a shim until the next major release of GoodJob (which is probably due about now given the number of shims).
Lastly, I can't guarantee there won't be a reasonable need for trinary columns in GoodJob in the future, so you may need to Rubocop ignore them if you are using this rule.
The operational challenge of adding a default is it requires a 2-stage deploy (add a nil column, then come back and add a default)... at least until PG 11 maybe, so maybe I'm out of date on what's a safe migration.
Also, that column is a shim until the next major release of GoodJob (which is probably due about now given the number of shims).
Lastly, I can't guarantee there won't be a reasonable need for trinary columns in GoodJob in the future, so you may need to Rubocop ignore them if you are using this rule.
Hi,
Thanks for the quick reply. I gave some testing to what you said about the 2-stage deploy.
I went ahead and spawned a Postgres 10 DB and ran the migration and it worked just fine and in a single stage the default is properly applied. (I replaced the line with t.boolean :is_discrete, null: false, default: false)
Lastly, I can't guarantee there won't be a reasonable need for trinary columns in GoodJob in the future, so you may need to Rubocop ignore them if you are using this rule.
Does it mean that right now the NULL is value is not currently used? Maybe avoiding to use a third state should be the right thing to do also in the future? :)
Hi,
I just discovered your library and I have been using Sidekiq for years. I'm pretty excited about what I see for now.
However, I would like to flag a Rubocop warning that I believe should be addressed.
I actually do agree that boolean values should always be either FALSE or TRUE but not NULL as well.
I will be adding
null: false, default: false
however i'm not sure if this will be causing me troubles.Thank you
The text was updated successfully, but these errors were encountered: