update trigger and sqlpatch for schema