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

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


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

Latest revision as of 22:13, 16 March 2014

ALTER TABLE vmdk ADD COLUMN used INT UNSIGNED AFTER size, ADD COLUMN rdm BOOL AFTER thin; 
CREATE TABLE vm_res (vmid INT UNSIGNED, cpu_resrv MEDIUMINT, cpu_limit MEDIUMINT, cpu_level VARCHAR(16), cpu_shares SMALLINT UNSIGNED, mem_resrv MEDIUMINT, mem_limit MEDIUMINT, 

mem_level VARCHAR(16), mem_shares SMALLINT UNSIGNED, stamp TIMESTAMP DEFAULT current_timestamp ON UPDATE current_timestamp, PRIMARY KEY (vmid));
ALTER TABLE nw DROP KEY vcid;
ALTER TABLE nw ADD UNIQUE KEY (name, vcid, is_dv);
ALTER TABLE nw ADD COLUMN vkey VARCHAR(64) AFTER name;
ALTER TABLE nw ADD UNIQUE KEY (vkey, vcid);