[nycphp-talk] DB Schema for storing revision history?
Steve Francia
steve.francia at gmail.com
Wed Jun 27 18:47:07 EDT 2007
If it is just for a single document you can do it pretty easily with just
sql (mysql).
Make a document table and a version table.
The document table would have the shell of what a document was (title, etc).
The version table would have the document_id, content and the mod_date and
author_id.
To get a document just do a join on the most recent version. All the other
solutions would require support outside of the application, which could
cause scalability problems down the road.
On 6/27/07, Jon Baer <jonbaer at jonbaer.com> wrote:
>
> Subversion and WebSVN :-)
>
> http://websvn.tigris.org/
>
> On Jun 27, 2007, at 12:43 PM, David Krings wrote:
>
> Jake McGraw wrote:
>
> Hi All, this is my first post, so if this is in the wrong section
> please let me know.
> I'd like to know if anyone has developed a database schema for storing
> the revision history for a plain text document by multiple users.
> Basically, I'm talking about a wiki, but something much more simple.
> Any suggestions on methods of organizing the information using SQL
> (specifically MySQL) would be much appreciated.
> Thanks!
> - jake
>
>
> I'd just keep individual copies of the text files in the file system and
> then use a db table to keep track of the file location and their
> chronological sequence using a UNIX time stamp. Can't think of any easier
> way to do it.
>
> David
>
> _______________________________________________
> New York PHP Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> NYPHPCon 2006 Presentations Online
> http://www.nyphpcon.com
>
> Show Your Participation in New York PHP
> http://www.nyphp.org/show_participation.php
>
>
>
> _______________________________________________
> New York PHP Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> NYPHPCon 2006 Presentations Online
> http://www.nyphpcon.com
>
> Show Your Participation in New York PHP
> http://www.nyphp.org/show_participation.php
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20070627/7d9d5db3/attachment.html>
More information about the talk
mailing list