Files
netdisco/share/schema_versions/App-Netdisco-DB-76-77-PostgreSQL.sql
Oliver Gorwits 1c7c749f0e custom fields on devices and ports in the web from config (#945)
* custom device field web display and edit

* make display work; relies on T::T calling dict slot or method with same syntax

* add storing port custom fields

* use resultset method instead, use cf_ prefix

* update Pg min ver for jsonb

* allow override of position and default for port custom fields

* support hidden for custom fields

* update description of Objects API class

* allow left and mid position for custom fields

* add custom fields in csv

* change port control sidebar label

* fix default missing bug on backend jobs
2022-12-09 10:20:26 +00:00

12 lines
242 B
PL/PgSQL

BEGIN;
ALTER TABLE device ADD COLUMN "custom_fields" jsonb DEFAULT '{}';
UPDATE device SET custom_fields = '{}';
ALTER TABLE device_port ADD COLUMN "custom_fields" jsonb DEFAULT '{}';
UPDATE device_port SET custom_fields = '{}';
COMMIT;