2005-08-02 09:58:22 +02:00
|
|
|
CREATE TABLE revisions (
|
2005-08-09 04:20:28 +02:00
|
|
|
id <%= @pk %>,
|
|
|
|
created_at <%= @datetime %> NOT NULL,
|
|
|
|
updated_at <%= @datetime %> NOT NULL,
|
2005-08-14 20:58:36 +02:00
|
|
|
|
2005-08-15 00:26:54 +02:00
|
|
|
-- 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,
|
2005-08-09 04:20:28 +02:00
|
|
|
page_id INTEGER NOT NULL,
|
|
|
|
content TEXT NOT NULL,
|
|
|
|
author VARCHAR(60),
|
2005-08-15 00:26:54 +02:00
|
|
|
ip VARCHAR(60)
|
2005-08-09 04:20:28 +02:00
|
|
|
) <%= create_options %>;
|