Closed drewroberts closed 3 years ago
@jasonmccreary Here was the article we referenced in the previous solution:
As we discussed in the other PR (#38), I would like to find a better approach to making this migration without the workarounds.
@pdbreen also discussed it in PR #34
@jasonmccreary Whenever you have time, feel free to push a commit to this PR with another solution. Thank you!
@drewroberts, will do. Should have time this evening.
@drewroberts, simply allowing them to be nullable
is the easiest, and most pragmatic, solution considering this package could be added to an existing application with user records. As such, either defaulting the new columns or allowing them to be null
are the only choices.
...either defaulting the new columns or allowing them to be null are the only choices.
That makes sense. I was hoping I wouldn't have to allow Null
values, but I guess I can add application logic to handle that and throw an exception. Thank you, @jasonmccreary
@drewroberts, I hear you. You could make a secondary migration/seeder which audited the existing records and removed the nullable
. However, that becomes a slippery slope. Many packages just make all new columns nullable. Cashier itself is an example.
PR to find a better solution for previous sqlite workarounds.