Opened 4 years ago

Last modified 4 years ago

#2748 accepted enhancement

Add parent_test field to inventory_viability

Reported by: Cullen McGovern Owned by: Benjamin Haag
Priority: medium Milestone: Next Release - Server
Component: Database, Schema Changes Version: N/A
Severity: Keywords:
Cc: Database Engine: N/A
Operating System: N/A

Description

ALTER TABLE inventory_viability
ADD parent_test INT NULL FOREIGN KEY
REFERENCES inventory_viability (inventory_viability_id)

This allows linking tests i.e., an experimental test paired with a control, a monitor test paired with an external test, etc.

Change History (3)

comment:1 by Benjamin Haag, 4 years ago

On DEV:

  1. Column added to inventory_viability table.
  2. Adding the column to the get_inventory_viability dataview requires first creating and then linking a new dataview, inventory_viability_lookup. What is the data needed in that lookup's display field?

comment:2 by Benjamin Haag, 4 years ago

Status: new → accepted

comment:3 by Cullen McGovern, 4 years ago

viability_data links to viability using just the primary key, so I guess that's the precedent. Looking at the table, there really aren't any candidate keys -- only the date and inventory are non-nullable (excluding .*_date and .*_by).

Note: See TracTickets for help on using tickets.