1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-27 09:12:41 +01:00
phorge-phorge/resources/sql/patches/20131208.phragmentsnapshot.sql

22 lines
988 B
MySQL
Raw Normal View History

CREATE TABLE {$NAMESPACE}_phragment.phragment_snapshot (
id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
phid VARCHAR(64) NOT NULL COLLATE utf8_bin,
primaryFragmentPHID VARCHAR(64) NOT NULL COLLATE utf8_bin,
name VARCHAR(192) NOT NULL COLLATE utf8_bin,
description LONGTEXT NULL COLLATE utf8_bin,
dateCreated INT UNSIGNED NOT NULL,
dateModified INT UNSIGNED NOT NULL,
UNIQUE KEY `key_phid` (phid),
UNIQUE KEY `key_name` (primaryFragmentPHID, name)
) ENGINE=InnoDB, COLLATE utf8_general_ci;
CREATE TABLE {$NAMESPACE}_phragment.phragment_snapshotchild (
id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
snapshotPHID VARCHAR(64) NOT NULL COLLATE utf8_bin,
fragmentPHID VARCHAR(64) NOT NULL COLLATE utf8_bin,
fragmentVersionPHID VARCHAR(64) NULL COLLATE utf8_bin,
dateCreated INT UNSIGNED NOT NULL,
dateModified INT UNSIGNED NOT NULL,
UNIQUE KEY `key_child` (snapshotPHID, fragmentPHID, fragmentVersionPHID)
) ENGINE=InnoDB, COLLATE utf8_general_ci;