behavior
Column |
Type |
PK |
Required |
Default |
behavior_id |
VARCHAR |
Yes |
Yes |
|
device_id |
VARCHAR |
No |
Yes |
|
behavior_name |
TEXT |
No |
Yes |
|
behavior_conf_json |
TEXT |
No |
Yes |
|
assurance_schema_id |
VARCHAR |
No |
No |
|
governance |
TEXT |
No |
No |
|
created_at |
TIMESTAMPTZ |
No |
No |
CURRENT_TIMESTAMP |
created_by |
TEXT |
No |
No |
'UNKNOWN' |
updated_at |
TIMESTAMPTZ |
No |
No |
|
updated_by |
TEXT |
No |
No |
|
deleted_at |
TIMESTAMPTZ |
No |
No |
|
deleted_by |
TEXT |
No |
No |
|
activity_log |
TEXT |
No |
No |
|
Foreign Keys
Column Name |
Foreign Key |
assurance_schema_id |
assurance_schema_id references assurance_schema.assurance_schema_id |
device_id |
device_id references device.device_id |
Indexes
Column Name |
Index Name |
device_id |
sqlite_autoindex_behavior_2 |
behavior_name |
sqlite_autoindex_behavior_2 |
behavior_id |
sqlite_autoindex_behavior_1 |
SQL DDL
CREATE TABLE "behavior" (
"behavior_id" VARCHAR PRIMARY KEY NOT NULL,
"device_id" VARCHAR NOT NULL,
"behavior_name" TEXT NOT NULL,
"behavior_conf_json" TEXT CHECK(json_valid(behavior_conf_json)) NOT NULL,
"assurance_schema_id" VARCHAR,
"governance" TEXT CHECK(json_valid(governance) OR governance IS NULL),
"created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP,
"created_by" TEXT DEFAULT 'UNKNOWN',
"updated_at" TIMESTAMPTZ,
"updated_by" TEXT,
"deleted_at" TIMESTAMPTZ,
"deleted_by" TEXT,
"activity_log" TEXT,
FOREIGN KEY("device_id") REFERENCES "device"("device_id"),
FOREIGN KEY("assurance_schema_id") REFERENCES "assurance_schema"("assurance_schema_id"),
UNIQUE("device_id", "behavior_name")
)