bmc_hub/migrations/221_locations_cross_field_start_number.sql
Christian be68148448 feat(email): add RETURNING id to email activity log insert
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
2026-07-18 10:10:31 +02:00

10 lines
454 B
SQL

-- A physical patch panel may continue the labelling from the preceding panel.
ALTER TABLE locations_cross_fields
ADD COLUMN IF NOT EXISTS start_port_number INTEGER NOT NULL DEFAULT 1;
ALTER TABLE locations_cross_fields
DROP CONSTRAINT IF EXISTS locations_cross_fields_start_port_number_check;
ALTER TABLE locations_cross_fields
ADD CONSTRAINT locations_cross_fields_start_port_number_check
CHECK (start_port_number BETWEEN 1 AND 9999);