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
Hi, in my current project I'm trying to add this gem and work very well. I just found something annoying that in our parent_id column (that in this project is parent_widget_id) is a required integer
create_table"widgets",id: :serial,force: :cascadedo |t|
t.integer"parent_widget_id",default: 0
...
end
So, I was wondering if it is possible to set the root node with 0 value instead of nil?
Just some extra information, this is a really huge project and it's a little hard to find all parent_widget_id logic where is treating the root as 0 then, update the table to convert it to a nullable value to accept nil can lead to some headaches. 😓
The text was updated successfully, but these errors were encountered:
Hi, in my current project I'm trying to add this gem and work very well. I just found something annoying that in our
parent_id
column (that in this project isparent_widget_id
) is a required integerSo, I was wondering if it is possible to set the root node with
0
value instead ofnil
?Just some extra information, this is a really huge project and it's a little hard to find all
parent_widget_id
logic where is treating the root as0
then, update the table to convert it to a nullable value to acceptnil
can lead to some headaches. 😓The text was updated successfully, but these errors were encountered: