Skip to content

Refactor organization association #713

@CraigJZ

Description

@CraigJZ

Currently, individual models are scoped to an organization.

Organization

has_many :users
has_many :cohorts
has_many :enclosures
has_many :measurements
has_many :measurement_events
has_many :operations
has_many :facilities
has_many :animals

An alternative would be to key organization off of a single source, likely facilities.

has_many :users
has_many :facilities

Organizations would likely be determined by the current user's organization.

Some additional considerations are:

  • The Blazer rake task looks for an organziation_id on a model when determining how to set the row level security. We would need to consider this.
  • This may complicate the SQL Queries a bit

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions