Ticket Change Details
Not logged in
Overview

Artifact ID: 7e78a17f6d8ab93a72a8616b9eddb2833e306fc2
Ticket: 1b33d171d1dea88cd14da738bdf429b423707005
AddGeometryColumn missing SRID trigger
User & Date: anonymous 2019-07-26 20:54:51
Changes

  1. foundin changed to: "4.30a"
  2. icomment:
    The schema results should be the same when using AddGeometryColumn vs RecoverGeometryColumn
    
    The schema resulting from AddGeometryColumn will be missing triggers
    
    The following triggers will be missing. all other parts of the `.schema` output are the same:
    
    <pre>
    CREATE TRIGGER "ggi_geotable_LOCATION" BEFORE INSERT ON "geotable"
    FOR EACH ROW BEGIN
    SELECT RAISE(ROLLBACK, 'geotable.LOCATION violates Geometry constraint [geom-type or SRID not allowed]')
    WHERE (SELECT geometry_type FROM geometry_columns
    WHERE Lower(f_table_name) = Lower('geotable') AND Lower(f_geometry_column) = Lower('LOCATION')
    AND GeometryConstraints(NEW."LOCATION", geometry_type, srid) = 1) IS NULL;
    END;
    CREATE TRIGGER "ggu_geotable_LOCATION" BEFORE UPDATE OF "LOCATION" ON "geotable"
    FOR EACH ROW BEGIN
    SELECT RAISE(ROLLBACK, 'geotable.LOCATION violates Geometry constraint [geom-type or SRID not allowed]')
    WHERE (SELECT geometry_type FROM geometry_columns
    WHERE Lower(f_table_name) = Lower('geotable') AND Lower(f_geometry_column) = Lower('LOCATION')
    AND GeometryConstraints(NEW."LOCATION", geometry_type, srid) = 1) IS NULL;
    END;
    CREATE TRIGGER "tmd_geotable_LOCATION" AFTER DELETE ON "geotable"
    FOR EACH ROW BEGIN
    UPDATE geometry_columns_time SET last_delete = strftime('%Y-%m-%dT%H:%M:%fZ', 'now')
    WHERE Lower(f_table_name) = Lower('geotable') AND Lower(f_geometry_column) = Lower('LOCATION');
    END;
    CREATE TRIGGER "tmi_geotable_LOCATION" AFTER INSERT ON "geotable"
    FOR EACH ROW BEGIN
    UPDATE geometry_columns_time SET last_insert = strftime('%Y-%m-%dT%H:%M:%fZ', 'now')
    WHERE Lower(f_table_name) = Lower('geotable') AND Lower(f_geometry_column) = Lower('LOCATION');
    END;
    CREATE TRIGGER "tmu_geotable_LOCATION" AFTER UPDATE ON "geotable"
    FOR EACH ROW BEGIN
    UPDATE geometry_columns_time SET last_update = strftime('%Y-%m-%dT%H:%M:%fZ', 'now')
    WHERE Lower(f_table_name) = Lower('geotable') AND Lower(f_geometry_column) = Lower('LOCATION');
    END;</pre>
    
  3. login: "anonymous"
  4. mimetype: "text/x-fossil-wiki"
  5. private_contact changed to: "7a2f5437d87f2e69c2ff6f309142b24fb6e56321"
  6. severity changed to: "Important"
  7. status changed to: "Open"
  8. title changed to: "AddGeometryColumn missing SRID trigger"
  9. type changed to: "Code_Defect"