add auto create trigger code