1BEGIN; 2 3-- Netdisco 4-- Database Schema Modifications 5-- UPGRADE from 0.93 to 0.94 6 7ALTER TABLE device_port ADD COLUMN lastchange bigint; 8 9ALTER TABLE log ADD COLUMN logfile text; 10 11CREATE TABLE user_log ( 12 entry serial, 13 username varchar(50), 14 userip inet, 15 event text, 16 details text, 17 creation TIMESTAMP DEFAULT now() 18 ); 19 20CREATE TABLE node_nbt ( 21 mac macaddr PRIMARY KEY, 22 ip inet, 23 nbname text, 24 domain text, 25 server boolean, 26 nbuser text, 27 active boolean, 28 time_first timestamp default now(), 29 time_last timestamp default now() 30); 31 32-- Indexing speed ups. 33CREATE INDEX idx_node_nbt_mac ON node_nbt(mac); 34CREATE INDEX idx_node_nbt_nbname ON node_nbt(nbname); 35CREATE INDEX idx_node_nbt_domain ON node_nbt(domain); 36CREATE INDEX idx_node_nbt_mac_active ON node_nbt(mac,active); 37 38COMMIT; 39