To give an example:
Create a table that has a spatial column
CREATE TABLE "test1" (
"PK_UID" INTEGER PRIMARY KEY AUTOINCREMENT,
"Geometry" MULTIPOLYGON)
Recover the geometry
SELECT RecoverGeometryColumn('test1', 'Geometry', 2, 'MULTIPOLYGON',2);
Look at the triggers that were created
select * from sqlite_master where type='trigger' and lower(tbl_name)='test1'
Results:
CREATE TRIGGER "ggi_test1_Geometry" BEFORE INSERT ON "test1"
FOR EACH ROW BEGIN
SELECT RAISE(ROLLBACK, 'test1.Geometry violates Geometry constraint [geom-type or SRID not allowed]')
WHERE (SELECT type FROM geometry_columns
WHERE f_table_name = 'test1' AND f_geometry_column = 'Geometry'
AND GeometryConstraints(NEW."Geometry", type, srid, 'XY') = 1) IS NULL;
END
CREATE TRIGGER "ggu_test1_Geometry" BEFORE UPDATE ON "test1"
FOR EACH ROW BEGIN
SELECT RAISE(ROLLBACK, 'test1.Geometry violates Geometry constraint [geom-type or SRID not allowed]')
WHERE (SELECT type FROM geometry_columns
WHERE f_table_name = 'test1' AND f_geometry_column = 'Geometry'
AND GeometryConstraints(NEW."Geometry", type, srid, 'XY') = 1) IS NULL;
END
Compare with what is in the geometry_columns table
select * from geometry_columns
Results:
f_table_name f_geometry_column type coord_dimension srid spaitial_index_enabled
test1 geometry MULTIPOLYGON XY 2 0
Conclusion:
Note that the geometry_columns table the f_geometry_column is specified as 'geometry' but the trigger is looking for 'Geometry'. This causes the 'Geometry constraint [geom-type or SRID not allowed]' issue. So the fix is keep you spatial column names lower case.