mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-18 21:02:41 +01:00
19 lines
729 B
MySQL
19 lines
729 B
MySQL
|
CREATE TABLE {$NAMESPACE}_almanac.almanac_device (
|
||
|
id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||
|
phid VARBINARY(64) NOT NULL,
|
||
|
name VARCHAR(255) NOT NULL COLLATE {$COLLATE_TEXT},
|
||
|
dateCreated INT UNSIGNED NOT NULL,
|
||
|
dateModified INT UNSIGNED NOT NULL,
|
||
|
UNIQUE KEY `key_phid` (phid)
|
||
|
) ENGINE=InnoDB, COLLATE {$COLLATE_TEXT};
|
||
|
|
||
|
CREATE TABLE {$NAMESPACE}_almanac.almanac_deviceproperty (
|
||
|
id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||
|
devicePHID VARBINARY(64) NOT NULL,
|
||
|
`key` VARCHAR(128) NOT NULL COLLATE {$COLLATE_TEXT},
|
||
|
value LONGTEXT NOT NULL,
|
||
|
dateCreated INT UNSIGNED NOT NULL,
|
||
|
dateModified INT UNSIGNED NOT NULL,
|
||
|
KEY `key_device` (devicePHID, `key`)
|
||
|
) ENGINE=InnoDB, COLLATE {$COLLATE_TEXT};
|