DROP TABLE changes;

CREATE TABLE `changes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `fileid` int(11) NOT NULL,
  `change` varchar(255) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `fileid` (`fileid`),
  CONSTRAINT `changes_ibfk_1` FOREIGN KEY (`fileid`) REFERENCES `files` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;

INSERT INTO changes VALUES("1","1","%%DBNAME%%##$$DBNAME$$");
INSERT INTO changes VALUES("2","1","%%DBUSER%%##$$DBUSER$$");
INSERT INTO changes VALUES("3","1","%%DBPASSWORD%%##$$DBPASSWORD$$");



DROP TABLE files;

CREATE TABLE `files` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `scriptid` int(11) NOT NULL,
  `filename` varchar(255) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `scriptid` (`scriptid`),
  CONSTRAINT `files_ibfk_1` FOREIGN KEY (`scriptid`) REFERENCES `scripts` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;

INSERT INTO files VALUES("1","1","Settings.php");



DROP TABLE scripts;

CREATE TABLE `scripts` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL DEFAULT '0',
  `filename` varchar(255) NOT NULL DEFAULT '0',
  `enabled` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;

INSERT INTO scripts VALUES("1","SMF 2.0.2","smf_2-0-2_install.zip","1");
INSERT INTO scripts VALUES("3","phpBB 3.0.10","phpBB-3.0.10.zip","1");



DROP TABLE sites;

CREATE TABLE `sites` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `type` int(11) NOT NULL,
  `owner` int(11) NOT NULL,
  `path` varchar(255) NOT NULL,
  `url` varchar(255) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `owner` (`owner`),
  CONSTRAINT `sites_ibfk_1` FOREIGN KEY (`owner`) REFERENCES `owners` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=latin1;

INSERT INTO sites VALUES("4","Test Forum","1","1","dbt","http://127.0.0.1/ffh/scripts/live/dbt/");
INSERT INTO sites VALUES("7","Test Forum","1","1","smf_forum","http://127.0.0.1/ffh/scripts/live/smf_forum/");
INSERT INTO sites VALUES("8","Test Forum","1","1","smfforum","http://127.0.0.1/ffh/scripts/live/smfforum/");
INSERT INTO sites VALUES("9","Test Forum","3","1","phpbb","http://127.0.0.1/ffh/scripts/live/phpbb/");
INSERT INTO sites VALUES("10","File Changes","1","1","filechanges","http://127.0.0.1/ffh/scripts/live/filechanges/");
INSERT INTO sites VALUES("11","File Changes","1","1","filechanges2","http://127.0.0.1/ffh/scripts/live/filechanges2/");
INSERT INTO sites VALUES("12","File Changes","1","1","filechanges3","http://127.0.0.1/ffh/scripts/live/filechanges3/");
INSERT INTO sites VALUES("13","File Changes","1","1","filechanges4","http://127.0.0.1/ffh/scripts/live/filechanges4/");
INSERT INTO sites VALUES("14","Installed","1","1","installed","http://127.0.0.1/ffh/scripts/live/installed/");
INSERT INTO sites VALUES("15","Installed","1","1","speed","http://127.0.0.1/ffh/scripts/live/speed/");
INSERT INTO sites VALUES("16","Installed","1","1","speedy","http://127.0.0.1/ffh/scripts/live/speedy/");
INSERT INTO sites VALUES("17","Installed","1","1","speedy123","http://127.0.0.1/ffh/scripts/live/speedy123/");
INSERT INTO sites VALUES("18","Installed","1","1","test123","http://127.0.0.1/ffh/scripts/live/test123/");
INSERT INTO sites VALUES("19","Installed","1","1","test1234","http://127.0.0.1/ffh/scripts/live/test1234/");
INSERT INTO sites VALUES("20","Installed","1","1","changesfromdb","http://127.0.0.1/ffh/scripts/live/changesfromdb/");
INSERT INTO sites VALUES("21","Installed","1","1","changesfromdb2","http://127.0.0.1/ffh/scripts/live/changesfromdb2/");
INSERT INTO sites VALUES("22","Installed","1","1","changesfromdb3","http://127.0.0.1/ffh/scripts/live/changesfromdb3/");
INSERT INTO sites VALUES("23","Installed","1","1","changesfromdb4","http://127.0.0.1/ffh/scripts/live/changesfromdb4/");
INSERT INTO sites VALUES("24","Installed","1","1","changesfromdb5","http://127.0.0.1/ffh/scripts/live/changesfromdb5/");
INSERT INTO sites VALUES("25","Installed","1","1","changesfromdb6","http://127.0.0.1/ffh/scripts/live/changesfromdb6/");



