Closed GiuseppeVarriale closed 7 months ago
@GiuseppeVarriale hey, I couldn't reproduce it locally. Could you please provide a simple application that reproduces it?
@GiuseppeVarriale thank you! Looks like you're on pretty old Rails that is not supported anymore. If I try to upgrade to 6.1 in your example app then it works. If you still need to use that old version Rails and Enumerize to fix that issue you can just comment out enumerize
call and uncomment it afterwards.
When setting up a project, a migration is run that creates an object. Later in the model, an enumerize attribute with a default value is added for a column that does not yet exist (it will be created in a future migration). This sequence of events raises the following error:
model line:
This issue occurs when the tipo_de_menu column does not exist at the time the enumerize attribute is defined.
steps to reproduce
1 -create a model with some columns, the migration, etc.
2 - create another migration that create an object and persisting in the database
3 - create the migration by creating the column that will store integer value
end 4 - add enumerize to the model with the custom values format and default value
5- run the migrations