luckyframework / luckyframework/avram
Add a change_belongs_to Migrator method
Open
feature request
- Dominant language
- Crystal
- Stars
- 183
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
We currently have `rename_belongs_to` and `remove_belongs_to`, but say you originally set your `on_delete: :do_nothing`, but wanted to update that to `on_delete: :cascade`. It would be great to have a `change_belongs_to` macro to handle doing that.
Contributor guide
Research direction
Locate the existing `rename_belongs_to` and `remove_belongs_to` migrator methods and read how their behavior is tested. Add the requested `change_belongs_to` capability for updating `on_delete`, including the transition from `:do_nothing` to `:cascade`, and verify that the relevant migration tests cover the new behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- crystal, postgres
- Domain
- database
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100