mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-15 18:10:53 +01:00
fc9ad37b26
Summary: I'm not going to land this until it's a bit more fleshed out since it would just confuse users, but this is probably more reviewable as a few diffs adding a couple features than one ULTRA-diff adding everything. Implement application basics for Pholio. This does more or less nothing, but adds storage, subscribe, flag, markup, indexing, query basics, PHIDs, handle loads, a couple of realy really basic controllers, etc. Basic hierarchy is: - **Moleskine**: Top-level object like a Differential Revision, like "Ponder Feed Ideas". - **Image**: Each Moleskine has one or more images, like the unexpanded / expanded / mobile / empty states of feed. - **Transaction**: Comment or edit, like Maniphest. I generally want to move most apps to a transaction model so we can log edits. - **PixelComment**: Equivalent of an inline comment. Test Plan: Created a fake object and viewed it. Reviewers: btrahan, chad Reviewed By: btrahan CC: aran, davidreuss Maniphest Tasks: T2097 Differential Revision: https://secure.phabricator.com/D3817
74 lines
2.9 KiB
SQL
74 lines
2.9 KiB
SQL
CREATE TABLE {$NAMESPACE}_pholio.pholio_mock (
|
|
id INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
|
phid VARCHAR(64) NOT NULL COLLATE utf8_bin,
|
|
name VARCHAR(128) NOT NULL COLLATE utf8_general_ci,
|
|
originalName VARCHAR(128) NOT NULL COLLATE utf8_general_ci,
|
|
description LONGTEXT NOT NULL COLLATE utf8_general_ci,
|
|
authorPHID VARCHAR(64) NOT NULL COLLATE utf8_bin,
|
|
viewPolicy VARCHAR(64) NOT NULL COLLATE utf8_bin,
|
|
coverPHID VARCHAR(64) NOT NULL COLLATE utf8_bin,
|
|
mailKey VARCHAR(20) NOT NULL COLLATE utf8_bin,
|
|
dateCreated INT UNSIGNED NOT NULL,
|
|
dateModified INT UNSIGNED NOT NULL,
|
|
UNIQUE KEY (phid),
|
|
KEY (authorPHID)
|
|
) ENGINE=InnoDB, COLLATE utf8_general_ci;
|
|
|
|
CREATE TABLE {$NAMESPACE}_pholio.edge (
|
|
src VARCHAR(64) NOT NULL COLLATE utf8_bin,
|
|
type VARCHAR(64) NOT NULL COLLATE utf8_bin,
|
|
dst VARCHAR(64) NOT NULL COLLATE utf8_bin,
|
|
dateCreated INT UNSIGNED NOT NULL,
|
|
seq INT UNSIGNED NOT NULL,
|
|
dataID INT UNSIGNED,
|
|
PRIMARY KEY (src, type, dst),
|
|
KEY (src, type, dateCreated, seq)
|
|
) ENGINE=InnoDB, COLLATE utf8_general_ci;
|
|
|
|
CREATE TABLE {$NAMESPACE}_pholio.edgedata (
|
|
id INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
|
data LONGTEXT NOT NULL COLLATE utf8_bin
|
|
) ENGINE=InnoDB, COLLATE utf8_general_ci;
|
|
|
|
CREATE TABLE {$NAMESPACE}_pholio.pholio_transaction (
|
|
id INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
|
authorPHID VARCHAR(64) NOT NULL COLLATE utf8_bin,
|
|
mockID INT UNSIGNED NOT NULL,
|
|
transactionType VARCHAR(32) NOT NULL COLLATE utf8_bin,
|
|
oldValue LONGTEXT NOT NULL COLLATE utf8_bin,
|
|
newValue LONGTEXT NOT NULL COLLATE utf8_bin,
|
|
comment LONGTEXT NOT NULL COLLATE utf8_general_ci,
|
|
metadata LONGTEXT NOT NULL COLLATE utf8_bin,
|
|
contentSource LONGTEXT NOT NULL COLLATE utf8_bin,
|
|
dateCreated INT UNSIGNED NOT NULL,
|
|
dateModified INT UNSIGNED NOT NULL
|
|
) ENGINE=InnoDB, COLLATE utf8_general_ci;
|
|
|
|
CREATE TABLE {$NAMESPACE}_pholio.pholio_image (
|
|
id INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
|
mockID INT UNSIGNED NOT NULL,
|
|
filePHID VARCHAR(64) NOT NULL COLLATE utf8_bin,
|
|
name VARCHAR(128) NOT NULL COLLATE utf8_general_ci,
|
|
description LONGTEXT NOT NULL COLLATE utf8_general_ci,
|
|
sequence INT UNSIGNED NOT NULL,
|
|
dateCreated INT UNSIGNED NOT NULL,
|
|
dateModified INT UNSIGNED NOT NULL,
|
|
KEY (mockID, sequence)
|
|
) ENGINE=InnoDB, COLLATE utf8_general_ci;
|
|
|
|
CREATE TABLE {$NAMESPACE}_pholio.pholio_pixelcomment (
|
|
id INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
|
mockID INT UNSIGNED NOT NULL,
|
|
imageID INT UNSIGNED NOT NULL,
|
|
transactionID INT UNSIGNED,
|
|
authorPHID VARCHAR(64) NOT NULL COLLATE utf8_bin,
|
|
x INT UNSIGNED NOT NULL,
|
|
y INT UNSIGNED NOT NULL,
|
|
width INT UNSIGNED NOT NULL,
|
|
height INT UNSIGNED NOT NULL,
|
|
comment LONGTEXT NOT NULL COLLATE utf8_general_ci,
|
|
dateCreated INT UNSIGNED NOT NULL,
|
|
dateModified INT UNSIGNED NOT NULL,
|
|
KEY (mockID),
|
|
KEY (authorPHID, transactionID)
|
|
) ENGINE=InnoDB, COLLATE utf8_general_ci;
|