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