Ticket Change Details
Not logged in
Overview

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

  1. Change foundin to "4.30a"
  2. Change icomment to:

    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:

    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;
  3. Change login to "anonymous"
  4. Change mimetype to "text/x-fossil-wiki"
  5. Change private_contact to "7a2f5437d87f2e69c2ff6f309142b24fb6e56321"
  6. Change severity to "Important"
  7. Change status to "Open"
  8. Change title to "AddGeometryColumn missing SRID trigger"
  9. Change type to "Code_Defect"