# These are the database scheme changes between different HaCi versions. New tables were created by HaCi automatically.
# Also those changes where automatically performed by HaCi. 
# Since version 0.9.7 there's a config option 'autoUpgradeDatabase', which gives you the opportunity to enable resp. disable the automatic upgrade function.


0.7.5 -> 0.8:
ALTER TABLE network DROP INDEX network;
ALTER TABLE network ADD COLUMN ipv6ID varchar(22) NOT NULL DEFAULT '';
ALTER TABLE network ADD UNIQUE  (network, rootID, ipv6ID);

ALTER TABLE root ADD COLUMN ipv6 tinyint(1) NOT NULL DEFAULT '0';

ALTER TABLE networkAC DROP INDEX rootID;
ALTER TABLE networkAC ADD COLUMN netID integer(11) NOT NULL DEFAULT '0';
ALTER TABLE networkAC ADD UNIQUE  (netID, groupID);


0.8 -> 0.9.1
ALTER TABLE plugin DROP COLUMN date;
ALTER TABLE plugin ADD COLUMN runTime integer(11) NOT NULL DEFAULT '0';
ALTER TABLE plugin ADD COLUMN lastError varchar(255) NOT NULL DEFAULT '';

ALTER TABLE networkPlugin ADD COLUMN sequence integer(11) NOT NULL DEFAULT '0';
ALTER TABLE networkPlugin ADD COLUMN newLine tinyint(4) NOT NULL DEFAULT '0';


0.9.1 -> 0.9.5
ALTER TABLE plugin ADD COLUMN filename varchar(255) NOT NULL DEFAULT '';

ALTER TABLE network ADD COLUMN defSubnetSize TINYINT(4) unsigned NOT NULL DEFAULT '0';
ALTER TABLE network ADD INDEX  (network);


0.9.5 -> 0.9.6
ALTER TABLE network CHANGE COLUMN ipv6ID ipv6ID varbinary(22) NOT NULL DEFAULT '';

ALTER TABLE networkV6 CHANGE COLUMN ID ID varbinary(22) NOT NULL DEFAULT '';

0.9.6 -> 0.9.7
ALTER TABLE networkV6 CHANGE COLUMN networkPrefix networkPrefix bigint(20) unsigned NOT NULL DEFAULT '0';
ALTER TABLE networkV6 CHANGE COLUMN hostPart hostPart bigint(20) unsigned NOT NULL DEFAULT '0';
