|Reported by:||aronrubin||Owned by:||Even Rouault|
Spatialite triggers are not preserved across CreateField. Triggers are automatically dropped when the depended table is dropped. BTW is ALTER TABLE ADD COLUMN not used to support Sqlite <= 3.1.3?
One other method to preserve the triggers would be to save the following aside (in a OGR side buffer): SELECT sql FROM sqlite_master WHERE type IN ('trigger','index') AND tbl_name='%s' Then execute the saved statements after manually altering the table.
Of course with both methods any column constraints in the original table would still be lost but that is less of an issue if we assume CreateField will only be called on OGR managed layers. Again I assume you did not use the ALTER or sqlite3_table_column_metadata for maximum compatibility.