perseas / Pyrseas

Provides utilities for Postgres database schema versioning.
https://perseas.github.io/
BSD 3-Clause "New" or "Revised" License
395 stars 67 forks source link

Tsvector triggers are not updated or recreated when columns are added #179

Closed jmafc closed 6 years ago

jmafc commented 6 years ago

Given a table with a tsvector trigger as follows:

CREATE TABLE t1 (
    c1 integer,
    c2 text,
    c3 text,
    tsidx tsvector);
CREATE TRIGGER t1_tsidx_update
    BEFORE INSERT OR UPDATE ON t1
    FOR EACH ROW
    EXECUTE PROCEDURE tsvector_update_trigger('tsidx', 'pg_catalog.english', 'c2');

If a YAML map change is made to add column c3 as an additional argument to the tsvector_update_trigger procedure, yamltodb produces no corresponding SQL.