views:

21

answers:

2

Hey, I'm learning an ecommerce package (Spree).

The problem arises after I delete a product thru the GUI. I try to manually undo the delete by changing/adding rows back in, but I fail.

My question is this: is there any way I can add application or dbms code/config/software to log transactions?

Preferably, this will work with sqlite3, but I can switch to mysql, or even postgres.

+1  A: 

I'm not sure about sqlite, but if you do switch to mysql, there's always the query log, which has the advantage of being on the database size, so you can ignore any application stuff, secure in the knowledge that mysql is logging every operation for your later inspection.

timdev
A: 

In mysql if you enable replication logging (log-bin=true) you will get a log file that contains every data altering query. This log can be examined using mysqlbinlog. You'll probably have to set a server-id to enable binary logging, but you can just set it to 1. You will also have to manage the logs, because they won't be deleted automatically. You should use the "purge master logs" command from the mysql shell and not delete them from the hard drive.

brunson