feat(ollama): implement case creation rewrite with strict rules fix(sync): include phone number in economic customer sync fix(migrations): clean up orphan links before enforcing foreign keys in email threading schema feat(migrations): add support for physical patch-panel layouts and update related constraints feat(migrations): add start port number for physical patch panels feat(migrations): introduce display order for physical panels feat(migrations): link wall outlets to switch hardware feat(migrations): allow optional label and customer for wall outlets feat(migrations): create hardware network links table feat(migrations): add location display order for hardware assets feat(migrations): create UISP devices and link to hardware assets
12 lines
425 B
SQL
12 lines
425 B
SQL
-- A patch/switch port can be registered before the wall-outlet label is known.
|
|
ALTER TABLE locations_wall_outlets
|
|
ALTER COLUMN outlet_number DROP NOT NULL;
|
|
|
|
ALTER TABLE locations_wall_outlets
|
|
ADD COLUMN IF NOT EXISTS customer_id INTEGER
|
|
REFERENCES customers(id) ON DELETE SET NULL;
|
|
|
|
CREATE INDEX IF NOT EXISTS idx_wall_outlets_customer_id
|
|
ON locations_wall_outlets(customer_id)
|
|
WHERE deleted_at IS NULL;
|