Skip to content
  • Abdul Wadood's avatar
    Set project organization from its root namespace · 1afc2596
    Abdul Wadood authored
    This is the first installment to make sure every project is instantiated
    with an organization. Here we have introduced a `before_validation`
    that sets the project's `organization_id` to the project's root
    ancestor's `organization_id`.
    
    The next steps are:
    
    1. Remove default 1 for the `projects.organization_id` column.
    2. Check the organization_id column if it's being set to null through
    some code path.
    3. Fix the above code path and do a backfill.
    4. If no nulls are found then add a validation and a null check
       constraint for Project#organization.
    1afc2596