editing table table structure#
This table holds a list of database changes that have been made and that need to have consequences executed It will be deprecated, or its relevance greatly reduced, as spatial relationships between tables get enforced through spatial triggers leveraging Spatialite’s KNN2
Field |
Type |
NULL allowed |
Default Value |
Foreign key |
Description |
---|---|---|---|---|---|
issue* |
INTEGER |
NO |
unique identifier |
||
table_name |
TEXT |
YES |
The name of the table that this editing record refers to |
||
id_field |
TEXT |
YES |
The field that holds the primary key for the table that this editing record refers to |
||
id_value |
TEXT |
YES |
The value of the primary key for the table that this editing record refers to |
||
field |
TEXT |
YES |
The field that has been edited |
||
field_value |
TEXT |
YES |
The value that the field has been changed to |
||
operator |
TEXT |
YES |
Whether the editing was an addition, deletion or editing |
||
checked |
INTEGER |
YES |
1 if the change has been made consistent, 0 if it is still open |
||
recorded_change |
TEXT |
YES |
(* - Primary key)
The SQL statement for table and index creation is below.
CREATE TABLE IF NOT EXISTS "Editing_Table" (
issue INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
table_name TEXT,
id_field TEXT,
id_value TEXT,
field TEXT,
field_value TEXT,
"operator" TEXT,
checked INTEGER,
recorded_change TEXT
);
create INDEX IF NOT EXISTS editing_table_idx ON editing_table (issue);
create INDEX IF NOT EXISTS editing_table_tname_idx ON editing_table (table_name);
create INDEX IF NOT EXISTS editing_checked_idx ON editing_table (checked);