Re: let users 'edit' database

2010-07-22 Thread cricket
On Wed, Jul 21, 2010 at 5:17 PM, Kirk wrote: > > The fields could be something like: > id (auto-increment) > change_data (serialized array) > url (original url change was submitted to, eg - "posts/save/24") Instead of the URL, it might be better to have model & foreign_key fields. It's less impor

Re: let users 'edit' database

2010-07-22 Thread Kirk
it could be implemented as a behavior. beforeSave callback would be used for changes that need approval. afterSave callback would be used for revision history. for revisions, it would work really well if everything had a uuid instead of auto-inc id, but it could also work with auto-inc id like the

Re: let users 'edit' database

2010-07-22 Thread mattmoy...@gmail.com
great idea kirk, that would be a great start to a revisions component in cake On Jul 21, 5:17 pm, Kirk wrote: > Some guy submitted a "multiple undo" type thing to the bakery. I thought it > was kinda clunky, but it gave me an idea for an improvement, which could > also be applied to your situatio

Re: let users 'edit' database

2010-07-21 Thread Kirk
Some guy submitted a "multiple undo" type thing to the bakery. I thought it was kinda clunky, but it gave me an idea for an improvement, which could also be applied to your situation. Create a table for pending changes, and save all submitted changes to that table in serialized form. Then you can j

Re: let users 'edit' database

2010-07-21 Thread Jay
so a database revision/version control module is not available for cakephp? =( On Jul 20, 10:54 am, "mattmoy...@gmail.com" wrote: > Drupal does something like this called revisions.  You could implement > a much simpler version of this in your application by adding 2 columns > to your database ca

Re: let users 'edit' database

2010-07-20 Thread mattmoy...@gmail.com
Drupal does something like this called revisions. You could implement a much simpler version of this in your application by adding 2 columns to your database called revision and display. Revision would just be a revision number and you could use a timestamp as the field so it would be unique and

let users 'edit' database

2010-07-19 Thread Jay
ok guys, so here is the situation: - we have built up a website using cakephp and it contains several models. - we want some users to be able to "make changes" to the database via webpage - but we want to audit the changes before they are actual made to the database Our problem is, how do we know