2014-10-03 22:52:41 +10:00
|
|
|
CREATE TABLE {$NAMESPACE}_almanac.almanac_device (
|
|
|
|
id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
|
|
|
phid VARBINARY(64) NOT NULL,
|
2014-10-06 10:26:48 -07:00
|
|
|
name VARCHAR(255) NOT NULL COLLATE utf8_bin,
|
2014-10-03 22:52:41 +10:00
|
|
|
dateCreated INT UNSIGNED NOT NULL,
|
|
|
|
dateModified INT UNSIGNED NOT NULL,
|
|
|
|
UNIQUE KEY `key_phid` (phid)
|
2014-10-06 10:26:48 -07:00
|
|
|
) ENGINE=InnoDB, COLLATE utf8_bin;
|
2014-10-03 22:52:41 +10:00
|
|
|
|
|
|
|
CREATE TABLE {$NAMESPACE}_almanac.almanac_deviceproperty (
|
|
|
|
id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
|
|
|
devicePHID VARBINARY(64) NOT NULL,
|
2014-10-06 10:26:48 -07:00
|
|
|
`key` VARCHAR(128) NOT NULL COLLATE utf8_bin,
|
2014-10-03 22:52:41 +10:00
|
|
|
value LONGTEXT NOT NULL,
|
|
|
|
dateCreated INT UNSIGNED NOT NULL,
|
|
|
|
dateModified INT UNSIGNED NOT NULL,
|
|
|
|
KEY `key_device` (devicePHID, `key`)
|
2014-10-06 10:26:48 -07:00
|
|
|
) ENGINE=InnoDB, COLLATE utf8_bin;
|