VI-DB vi-db-update-v2.4: Difference between revisions

From vwiki
Jump to navigation Jump to search
(Initial creation)
 
(Updated category)
 
Line 11: Line 11:
</source>
</source>


[[Category:MySQL]]
[[Category:MySQL Examples]]

Latest revision as of 22:13, 16 March 2014

CREATE TABLE vm_attrib (vmid INT UNSIGNED, name VARCHAR(256), data VARCHAR(1024), stamp TIMESTAMP DEFAULT current_timestamp ON UPDATE current_timestamp, 

PRIMARY KEY (vmid, name));

CREATE TABLE vapp (vappid TINYINT UNSIGNED AUTO_INCREMENT, vcid TINYINT UNSIGNED, vappvcid SMALLINT UNSIGNED, name VARCHAR(32), vc_path VARCHAR(512), status VARCHAR(16), exist BOOL, clid TINYINT UNSIGNED, prod_name VARCHAR(256), prod_ver VARCHAR(16), prod_fver VARCHAR(128), prod_vend VARCHAR(128), stamp TIMESTAMP DEFAULT current_timestamp ON UPDATE current_timestamp, PRIMARY KEY (vappid), UNIQUE KEY (vcid, name));

CREATE TABLE vapp_vm (vappid TINYINT UNSIGNED, vmid INT UNSIGNED, vmvcid SMALLINT UNSIGNED, ord TINYINT UNSIGNED, start_dly TINYINT UNSIGNED, start_wait BOOL, stop_dly TINYINT UNSIGNED, stop_act VARCHAR(16), stamp TIMESTAMP DEFAULT current_timestamp ON UPDATE current_timestamp, PRIMARY KEY (vappid, vmid));

ALTER TABLE vm ADD COLUMN vappid TINYINT UNSIGNED AFTER esxid;