link overrides table structure#
This table includes information on the fields of the network that happen to diverge from their base value (contained in the link table) for any arbitrary period. This feature has not been implemented in POLARIS
Field |
Type |
NULL allowed |
Default Value |
Foreign key |
Description |
---|---|---|---|---|---|
link_change_id* |
INTEGER |
NO |
override identifier |
||
link |
INTEGER |
YES |
Link(link) |
bi-directional link that it refers to |
|
field |
TEXT |
NO |
‘’ |
direction (0 for A to B, 1 for B to a) |
|
data_value |
TEXT |
NO |
which value to be set for the period |
||
from_time |
INTEGER |
NO |
0 |
initial time (in seconds from midnight) in which the override applies |
|
notes |
TEXT |
YES |
any note (not read/used by POLARIS) |
(* - Primary key)
The SQL statement for table and index creation is below.
CREATE TABLE IF NOT EXISTS "Link_Overrides" (
"link_change_id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
"link" INTEGER,
"field" TEXT NOT NULL DEFAULT '',
"data_value" TEXT NOT NULL,
"from_time" INTEGER NOT NULL DEFAULT 0,
"notes" TEXT,
CONSTRAINT "link_fk" FOREIGN KEY("link") REFERENCES "Link"("link") ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED
);
create INDEX IF NOT EXISTS "idx_lnk_over_link" ON "link_overrides" ("link");