I am redesigning a database and I need to add a foreign field to a table.
I have used this line after the definition of all the models, and it works well:
As the changes to the database are increasing, I would like to move the migration up in the code, before the definition of the models. The previous line fails because InventorySheet is not defined yet, so I tried with this:
Hi All,
I am redesigning a database and I need to add a foreign field to a table. I have used this line after the definition of all the models, and it works well:
As the changes to the database are increasing, I would like to move the migration up in the code, before the definition of the models. The previous line fails because
InventorySheet
is not defined yet, so I tried with this:I thought the two lines were equivalent, but I am getting this error message:
Why am I getting this error? Is my approach completely wrong?