CodeIgniter Forums
database trigger - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28)
+--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30)
+--- Thread: database trigger (/showthread.php?tid=87711)



database trigger - ijurisic - 05-23-2023

I check Database Forge Class but don't see functions for create triggers in database.
What is the best best practice to add triggers? (I love php spark migrate)


RE: database trigger - kenjis - 05-23-2023

Use query() method in the migration files.
https://codeigniter4.github.io/CodeIgniter4/database/queries.html#regular-queries


RE: database trigger - ijurisic - 05-25-2023

Thanks , I really love support for migration. No need to touch direct datbase.