IT255 Practice files - 2016-17
The contents of it255 folder should be placed on PHP server root folder like htdocs (in XAMPP) or www in Apache server.
To run Angular Front end part of application. Run npm install in angular folder and then run
npm start from bash.
Also you will need to import Database from this SQL. Database name and configuration is placed in it255/config.php file.
CREATE TABLE IF NOT EXISTS `rooms` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`roomname` varchar(50) COLLATE utf8_bin DEFAULT NULL,
`tv` int(11) DEFAULT NULL,
`beds` int(11) DEFAULT NULL,
`room_type_id` int(11) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `FK_rooms_room_type` (`room_type_id`),
CONSTRAINT `FK_rooms_room_type` FOREIGN KEY (`room_type_id`) REFERENCES `room_type` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
CREATE TABLE IF NOT EXISTS `room_type` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(50) COLLATE utf8_bin NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
CREATE TABLE IF NOT EXISTS `users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`firstname` varchar(50) COLLATE utf8_bin DEFAULT NULL,
`lastname` varchar(50) COLLATE utf8_bin DEFAULT NULL,
`username` varchar(50) COLLATE utf8_bin DEFAULT NULL,
`password` varchar(128) COLLATE utf8_bin DEFAULT NULL,
`token` varchar(128) COLLATE utf8_bin DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;