Draft: Project model should require organization
What does this MR do and why?
As per #443857 (closed), we're:
- removing the default organization on the
Project
level, - adding
NOT NULL
constraint on theorganization_id
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Before
> project = Project.new
=> #<Project id: >>
> project.organization
=> #<Organizations::Organization:0x000000029971e5d0 id: 1, ..., name: "Default", path: "default", visibility_level: 20>
After
> project = Project.new
=> #<Project id: >>
> project.organization
=> nil
> project.valid?
=> false
How to set up and validate locally
- Checkout the branch
- Run migrations
- Verify that
- project doesn't have default organization, and
- project requires organization to be explicitly defined!
🎉
Related to #443857 (closed)
Edited by Bojan Marjanovic