{"repo":"vielhuber/dbhelper","free":true,"listed":false,"github":"https://github.com/vielhuber/dbhelper","clone":"git clone https://github.com/vielhuber/dbhelper.git","description":"🍗 Small php wrapper for mysql/postgres/sqlite databases. 🍗","language":"PHP","stars":34,"topics":["php","sql","mysql","postgresql","sqlite"],"license":"MIT","category":"databases-storage","readme_excerpt":"🍗 dbhelper 🍗 dbhelper is a small php wrapper for mysql/postgres/sqlite databases. installation install once with composer: then add this to your project: configuration options: usage logging dbhelper can support setting up a mature logging system on mysql/postgres databases. setup logging() does four things: - it creates a logging table (if not exists) - it appends a single column updated by to every table in the database (if not exists) - it creates triggers for all insert/update/delete events (if not exists) - it creates an index on (updated at, id) when delete older is configured - it deletes old logging entries based on the delete older option you should run this method after a schema change (e.g. in your migrations). it is recommended to exclude blob/bytea columns. to delete old logging entries without rebuilding all triggers, run the dedicated purge on a schedule: the purge uses the positive integer in the delete older option and supports mysql and postgres. its batch size must also be a positive integer. setup logging() creates the required (updated at, id) index automatically; on postgres it is partial and created concurrently when no transaction is active. the logging table has the following schema: - id : unique identifier of that single change - log event : insert/update/delete - log table : name of the table of the modified row - log key : key of the modified row - log column : column of the modified row - log value : value of the modified row - log uuid : uniqu","default_branch":null,"files":null,"tree":[],"storefront":"/r/vielhuber","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/vielhuber/dbhelper/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}