Dropped number from revision table. Also dropped timestamp. We will rely on autoincremented ID for sorting, and will for now store the time of last edit of the revision in revised_at. Later we will refactor content into a separate table (so as not to load the whole 300 kb of text and cached HTML every time we need page.revisions in code). Rake tests all pass, but watir tests indicate that some revision traversing links are still broken

This commit is contained in:
Alexey Verkhovsky 2005-08-14 22:26:54 +00:00
parent 476d7810f6
commit 052754b068
18 changed files with 116 additions and 112 deletions

View file

@ -3,10 +3,14 @@ CREATE TABLE revisions (
created_at <%= @datetime %> NOT NULL,
updated_at <%= @datetime %> NOT NULL,
timestamp CHAR(13) NOT NULL,
-- note that continuous edits change the existing last revision, instead of creating one
-- revised_at is the timestamp of last edit of this revision
-- unlike updated_at is can be set explicitly in a call to Revision.create
-- besides, it should not be updated when Revision row changes for any other reason than
-- changing content
revised_at <%= @datetime %> NOT NULL,
page_id INTEGER NOT NULL,
content TEXT NOT NULL,
author VARCHAR(60),
ip VARCHAR(60),
number INTEGER
ip VARCHAR(60)
) <%= create_options %>;