1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-27 07:50:57 +01:00
phorge-phorge/resources/sql/patches/20130519.diviner.sql

37 lines
1.4 KiB
MySQL
Raw Normal View History

CREATE TABLE {$NAMESPACE}_diviner.diviner_livebook (
id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
phid VARCHAR(64) NOT NULL COLLATE utf8_bin,
name VARCHAR(64) NOT NULL COLLATE utf8_bin,
viewPolicy VARCHAR(64) NOT NULL COLLATE utf8_bin,
dateCreated INT UNSIGNED NOT NULL,
dateModified INT UNSIGNED NOT NULL,
UNIQUE KEY (name),
UNIQUE KEY (phid)
) ENGINE=InnoDB, DEFAULT CHARSET = utf8;
CREATE TABLE {$NAMESPACE}_diviner.diviner_livesymbol (
id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
phid VARCHAR(64) NOT NULL COLLATE utf8_bin,
bookPHID VARCHAR(64) NOT NULL COLLATE utf8_bin,
context VARCHAR(255) COLLATE utf8_bin,
type VARCHAR (32) NOT NULL COLLATE utf8_bin,
name VARCHAR (255) NOT NULL COLLATE utf8_bin,
atomIndex INT UNSIGNED NOT NULL,
identityHash VARCHAR(12) NOT NULL COLLATE utf8_bin,
graphHash VARCHAR(33) COLLATE utf8_bin,
KEY (bookPHID, type, name(64), context(64), atomIndex),
KEY (name),
UNIQUE KEY (graphHash),
UNIQUE KEY (identityHash),
UNIQUE KEY (phid)
) ENGINE=InnoDB, DEFAULT CHARSET = utf8;
CREATE TABLE {$NAMESPACE}_diviner.diviner_liveatom (
id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
symbolPHID VARCHAR(64) NOT NULL COLLATE utf8_bin,
content LONGTEXT NOT NULL COLLATE utf8_bin,
atomData LONGTEXT NOT NULL COLLATE utf8_bin,
UNIQUE KEY (symbolPHID)
) ENGINE=InnoDB, DEFAULT CHARSET = utf8;