Skip to content

Project model should require organization

Eventually the Project object should be instantiated with an explicit Organization and we should not default to the default organization. The issue is to add a requirement that Project only save when organization has been defined.

Related to Namespace model should require organization (#411832 - closed)

Implementation steps

  1. Set project organization from its namespace in code
  2. Remove default 1 for organization_id on the projects table.
  3. Monitor the organization_id column if it's being set to null through some code path.
  4. If it's being set to null then we need to find and fix that code path.
  5. Perform a backfill.
  6. Monitor the organization_id column again. If no nulls are found add the validation and then add the not null constraint.
Edited by Bojan Marjanovic