2011-07-11 21:34:53 +02:00
|
|
|
/* Patch 060 neglected to make this an AUTO_INCREMENT PRIMARY KEY */
|
2012-04-30 16:53:53 +02:00
|
|
|
ALTER TABLE {$NAMESPACE}_phriction.phriction_document
|
2011-07-11 21:34:53 +02:00
|
|
|
CHANGE id id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY;
|
|
|
|
|
|
|
|
/* Needs to be initially nullable for insert when documents are created. */
|
2012-04-30 16:53:53 +02:00
|
|
|
ALTER TABLE {$NAMESPACE}_phriction.phriction_document
|
2011-07-11 21:34:53 +02:00
|
|
|
CHANGE contentID contentID INT UNSIGNED;
|
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
CREATE TABLE {$NAMESPACE}_phriction.phriction_content (
|
2011-07-11 21:34:53 +02:00
|
|
|
id INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
|
|
|
documentID INT UNSIGNED NOT NULL,
|
|
|
|
version INT UNSIGNED NOT NULL,
|
|
|
|
UNIQUE KEY (documentID, version),
|
|
|
|
authorPHID VARCHAR(64) BINARY NOT NULL,
|
|
|
|
KEY (authorPHID),
|
|
|
|
title VARCHAR(512) NOT NULL,
|
|
|
|
slug VARCHAR(512) NOT NULL,
|
2015-01-23 01:10:26 +01:00
|
|
|
KEY (slug(128)),
|
2011-07-11 21:34:53 +02:00
|
|
|
content LONGBLOB NOT NULL,
|
|
|
|
dateCreated INT UNSIGNED NOT NULL,
|
|
|
|
dateModified INT UNSIGNED NOT NULL
|
2014-02-26 21:44:58 +01:00
|
|
|
) ENGINE=InnoDB;
|