-- phpMyAdmin SQL Dump
-- version 3.4.0-beta3
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Apr 19, 2011 at 03:06 AM
-- Server version: 5.5.8
-- PHP Version: 5.3.5

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;

--
-- Database: `smartforms`
--

-- --------------------------------------------------------

--
-- Table structure for table `si_audit_types`
--

CREATE TABLE IF NOT EXISTS `si_audit_types` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(32) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `si_audit_types`
--


-- --------------------------------------------------------

--
-- Table structure for table `si_contract_types`
--

CREATE TABLE IF NOT EXISTS `si_contract_types` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `si_contract_types`
--


-- --------------------------------------------------------

--
-- Table structure for table `si_contractors`
--

CREATE TABLE IF NOT EXISTS `si_contractors` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `si_contractors`
--


-- --------------------------------------------------------

--
-- Table structure for table `si_employees`
--

CREATE TABLE IF NOT EXISTS `si_employees` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `email_addr` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `si_employees`
--


-- --------------------------------------------------------

--
-- Table structure for table `si_inspections`
--

CREATE TABLE IF NOT EXISTS `si_inspections` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `inspection_id` varchar(64) DEFAULT NULL,
  `site_id` int(11) NOT NULL,
  `contract_type_id` int(11) NOT NULL,
  `audit_type_id` int(11) NOT NULL,
  `contractor_id` int(11) NOT NULL,
  `subcontractor_id` int(11) NOT NULL,
  `when_date` date DEFAULT NULL,
  `site_inspector_id` int(11) NOT NULL,
  `site_supervisor_id` int(11) NOT NULL,
  `contract_officer_id` int(11) NOT NULL,
  `is_active` bit(1) NOT NULL,
  `control_officer_recomm` text,
  `remedial_action_plan` text,
  `preventative_action_plan` text,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `si_inspections`
--


-- --------------------------------------------------------

--
-- Table structure for table `si_inspection_personnel`
--

CREATE TABLE IF NOT EXISTS `si_inspection_personnel` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `inspection_id` int(11) NOT NULL,
  `name` varchar(128) NOT NULL,
  `num` int(11) DEFAULT NULL,
  `position_id` int(11) NOT NULL,
  `training_comments` text,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `si_inspection_personnel`
--


-- --------------------------------------------------------

--
-- Table structure for table `si_inspection_personnel_trainings`
--

CREATE TABLE IF NOT EXISTS `si_inspection_personnel_trainings` (
  `personnel_id` int(11) NOT NULL,
  `training_id` int(11) NOT NULL,
  `has` bit(1) DEFAULT NULL,
  PRIMARY KEY (`personnel_id`,`training_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `si_inspection_personnel_trainings`
--


-- --------------------------------------------------------

--
-- Table structure for table `si_inspection_queries`
--

CREATE TABLE IF NOT EXISTS `si_inspection_queries` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `display_id` varchar(16) DEFAULT NULL,
  `inspection_id` int(11) NOT NULL,
  `query_id` int(11) NOT NULL,
  `value` tinyint(4) DEFAULT NULL,
  `action_required` bit(1) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `si_inspection_queries`
--


-- --------------------------------------------------------

--
-- Table structure for table `si_inspection_query_add_info`
--

CREATE TABLE IF NOT EXISTS `si_inspection_query_add_info` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `inspection_id` int(11) NOT NULL,
  `inspection_query_id` int(11) DEFAULT NULL,
  `comment` text,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `si_inspection_query_add_info`
--


-- --------------------------------------------------------

--
-- Table structure for table `si_positions`
--

CREATE TABLE IF NOT EXISTS `si_positions` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `inspection_id` int(11) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `si_positions`
--


-- --------------------------------------------------------

--
-- Table structure for table `si_position_trainings`
--

CREATE TABLE IF NOT EXISTS `si_position_trainings` (
  `position_id` int(11) NOT NULL,
  `training_id` int(11) NOT NULL,
  `position_training_req_type` int(11) NOT NULL,
  PRIMARY KEY (`position_id`,`training_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `si_position_trainings`
--


-- --------------------------------------------------------

--
-- Table structure for table `si_position_training_req_types`
--

CREATE TABLE IF NOT EXISTS `si_position_training_req_types` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(32) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `si_position_training_req_types`
--


-- --------------------------------------------------------

--
-- Table structure for table `si_queries`
--

CREATE TABLE IF NOT EXISTS `si_queries` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `description` varchar(255) DEFAULT NULL,
  `query_type_id` int(11) DEFAULT NULL,
  `query_category_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=112 ;

--
-- Dumping data for table `si_queries`
--

INSERT INTO `si_queries` (`id`, `name`, `description`, `query_type_id`, `query_category_id`) VALUES
(1, 'All hazards have not been identified', NULL, NULL, 1),
(2, 'Appropriate control measures are not in place', NULL, NULL, 1),
(3, 'Audible reversing alarm not operational', NULL, NULL, 1),
(4, 'Base controls and transfer lever are not operational', NULL, NULL, 1),
(5, 'Basket controls do not function correctly', NULL, NULL, 1),
(6, 'Boom relief valve not identifiable or operational', NULL, NULL, 1),
(7, 'Burns Kit not complete and or in date', NULL, NULL, 1),
(8, 'CDD not in working order or has a karabiner and sufficient rope', NULL, NULL, 1),
(9, 'Chipper emergency stop not operational', NULL, NULL, 1),
(10, 'Control measures have not been reviewed when conditions have changed', NULL, NULL, 1),
(11, 'Crew is unable to access communication from site (i.e. mobile phone)', NULL, NULL, 1),
(12, 'Dead Man Switch is not operational (can be by-passed)', NULL, NULL, 1),
(13, 'Earthing chain is not fitted', NULL, NULL, 1),
(14, 'Electrical leads not tagged and or out of date', NULL, NULL, 1),
(15, 'Emergency hydraulic shut off valve not fitted or operational', NULL, NULL, 1),
(16, 'Emergency rescue pump not identifiable or operational', NULL, NULL, 1),
(17, 'Emergency stops not fitted at both stations', NULL, NULL, 1),
(18, 'Emergency stops not operational at both stations', NULL, NULL, 1),
(19, 'EWP bleed points and auxiliary pump are not operational', NULL, NULL, 1),
(20, 'EWP deck is not clear of obstructions', NULL, NULL, 1),
(21, 'Excavations not properly covered or fenced', NULL, NULL, 1),
(22, 'Eye protection not being worn', NULL, NULL, 1),
(23, 'Fire Extinguisher not tested and or tagged', NULL, NULL, 1),
(24, 'Full face shield not being worn', NULL, NULL, 1),
(25, 'Hand Protection not being worn', NULL, NULL, 1),
(26, 'Hearing protection not being worn', NULL, NULL, 1),
(27, 'Hi Vis clothing not being worn', NULL, NULL, 1),
(28, 'Insufficient Traffic Control Devices', NULL, NULL, 1),
(29, 'Insufficient Traffic Control devices on site', NULL, NULL, 1),
(30, 'Insufficient Wheel Chocks (min 2)', NULL, NULL, 1),
(31, 'Insulating gloves with over glovesnot being worn', NULL, NULL, 1),
(32, 'Lifting slings and chains are out of date and or in poor condition', NULL, NULL, 1),
(33, 'Long pants & or long sleeves (rolled down) not being worn', NULL, NULL, 1),
(34, 'Low voltage Rescue Kit not onsite / complete and or in date', NULL, NULL, 1),
(35, 'Manual Slew not fitted', NULL, NULL, 1),
(36, 'Manual Slew not operational', NULL, NULL, 1),
(37, 'Noise is not adequately managed', NULL, NULL, 1),
(38, 'One man emergency recovery not possible', NULL, NULL, 1),
(39, 'Pedestrians are not managed adequately', NULL, NULL, 1),
(40, 'Potentially Hazardous work practice observed', NULL, NULL, 1),
(41, 'Public safety is compromised', NULL, NULL, 1),
(42, 'Road plates not secured, non-slip coated or edged.', NULL, NULL, 1),
(43, 'Safety Barriers are not in accordance with installation specifications', NULL, NULL, 1),
(44, 'Safety footwear not being worn', NULL, NULL, 1),
(45, 'Safety Harness not in date and or good condition', NULL, NULL, 1),
(46, 'Safety Helmet not being worn or has expired.', NULL, NULL, 1),
(47, 'Staff appear not to be working in accordance with SWMS / procedures', NULL, NULL, 1),
(48, 'There is not sufficient space around controls to recover in emergency', NULL, NULL, 1),
(49, 'Traffic Control is not in accordance with TCP', NULL, NULL, 1),
(50, 'Traffic Control Plan is not suited to the conditions', NULL, NULL, 1),
(51, 'Traffic Controllers do not have the necessesary qualifications', NULL, NULL, 1),
(52, 'Type B First Aid Kit not complete and or in date', NULL, NULL, 1),
(53, 'Unsafe work practice observed', NULL, NULL, 1),
(54, 'Vehicle stabilisers are not operational and or without leaks', NULL, NULL, 1),
(55, 'Work compounds not secure or in an unsafe or untidy state', NULL, NULL, 1),
(56, 'Work is not in accordance with SWMS', NULL, NULL, 1),
(57, 'Worksite SWMS have not been identified', NULL, NULL, 1),
(58, 'Cutting not in accordance with contract and AS 4373 requirements', NULL, NULL, 2),
(59, 'Inappropriate Control of fallout (wind direction / ground sheets)', NULL, NULL, 2),
(60, 'Inappropriate management of chemicals', NULL, NULL, 2),
(61, 'Inappropriate management of chemicals / paints', NULL, NULL, 2),
(62, 'Inappropriate management of sediment', NULL, NULL, 2),
(63, 'Inappropriate Management of soil', NULL, NULL, 2),
(64, 'Inappropriate management of trimmings', NULL, NULL, 2),
(65, 'Loads not covered', NULL, NULL, 2),
(66, 'Personnel are not aware of relevant environmental, heritage and cultural issues.', NULL, NULL, 2),
(67, 'Protection of Vegetation not in accordance with NUS 174c', NULL, NULL, 2),
(68, 'Site cleanup is not in accordance with the contract (within 48 hrs)', NULL, NULL, 2),
(69, 'Site not properly cleaned up', NULL, NULL, 2),
(70, 'Spill Kit not on plant', NULL, NULL, 2),
(71, 'Access permit (where required) not on site', NULL, NULL, 3),
(72, 'Access to private property is hindered', NULL, NULL, 3),
(73, 'Contract Signage correct and or not visible at 25m (rear + Kerb)', NULL, NULL, 3),
(74, 'Contractor ID card/s not on site', NULL, NULL, 3),
(75, 'Electrical insulation test certificates for plant and equip. (6 mths) out of date or not on site', NULL, NULL, 3),
(76, 'Electrical Safety Rules out of date or not on site', NULL, NULL, 3),
(77, 'Energy Industry Network Passport/s not on site', NULL, NULL, 3),
(78, 'Environmental Procedures NUS 174C not on site', NULL, NULL, 3),
(79, 'EWP / Crane operators manual not on site', NULL, NULL, 3),
(80, 'EWP does not comply with AS 1418.10 (interim) 2004', NULL, NULL, 3),
(81, 'EWP WorkCover certificate/s  (WP/C2) (each operator) not on site', NULL, NULL, 3),
(82, 'Flashing Light not as per RTA requirements', NULL, NULL, 3),
(83, 'HAC form has not been completed correctly', NULL, NULL, 3),
(84, 'HAC forms and Matrix incorrectly completed or not on site', NULL, NULL, 3),
(85, 'Harness and lanyard does not compy AS 1891 < 10 yrs from DOM', NULL, NULL, 3),
(86, 'Hydraulic systems have leaks and or in poor condition', NULL, NULL, 3),
(87, 'Insulated hand / hydraulic tools not tagged', NULL, NULL, 3),
(88, 'Insulated hand / hydraulic tools not tested', NULL, NULL, 3),
(89, 'Insulation Test Certificate out of date', NULL, NULL, 3),
(90, 'Load covers not in use or in poor condition', NULL, NULL, 3),
(91, 'MSDS for each hazardous substance not on site', NULL, NULL, 3),
(92, 'Network Standard NS-209 Operate in proximity to power lines not on site', NULL, NULL, 3),
(93, 'NS 209 ', NULL, NULL, 3),
(94, 'OHS incident / injury report form (1 x Blank accident report form) not on site', NULL, NULL, 3),
(95, 'Overall condition of vehicle is below standard', NULL, NULL, 3),
(96, 'Pinning Plant not in Current Conditional Registration', NULL, NULL, 3),
(97, 'Pinning Plant not in good condition', NULL, NULL, 3),
(98, 'Pre-work discussion has not been carried out', NULL, NULL, 3),
(99, 'Registration label not applied and or current', NULL, NULL, 3),
(100, 'Required Notifications have not been issued within the required timeframe', NULL, NULL, 3),
(101, 'RTA Stand and Operate Permit not on site', NULL, NULL, 3),
(102, 'Safe Work Method Statement(s) not on site', NULL, NULL, 3),
(103, 'Traffic Control Plans (TS520, RTA or company specific) not on site', NULL, NULL, 3),
(104, 'Tyres / tracks are not in good condition', NULL, NULL, 3),
(105, 'Tyres are not in good condition', NULL, NULL, 3),
(106, 'Unauthorised plant on site', NULL, NULL, 3),
(107, 'Vehicle  /  EWP / Crane-Borer Log Book not completed or not on site', NULL, NULL, 3),
(108, 'Vehicle has a closed circuit hydraulic system', NULL, NULL, 3),
(109, 'Vehicle Loading Crane is not in accordance with AS 1418.11 - 2007', NULL, NULL, 3),
(110, 'Warning signs on chipper are not clear and/or legible', NULL, NULL, 3),
(111, 'Work Procedures (Quality, safety and environmental plan) not on site', NULL, NULL, 3);

-- --------------------------------------------------------

--
-- Table structure for table `si_query_categories`
--

CREATE TABLE IF NOT EXISTS `si_query_categories` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ;

--
-- Dumping data for table `si_query_categories`
--

INSERT INTO `si_query_categories` (`id`, `name`) VALUES
(1, 'Safety'),
(2, 'Environmental'),
(3, 'Miscellaneous');

-- --------------------------------------------------------

--
-- Table structure for table `si_query_types`
--

CREATE TABLE IF NOT EXISTS `si_query_types` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=9 ;

--
-- Dumping data for table `si_query_types`
--

INSERT INTO `si_query_types` (`id`, `name`) VALUES
(1, 'SiteRiskAssessment'),
(2, 'Safety'),
(3, 'Environment'),
(4, 'Documentation'),
(5, 'PublicImpact'),
(6, 'TrafficControl'),
(7, 'PlantMachinery'),
(8, 'ElevatedPlatforms');

-- --------------------------------------------------------

--
-- Table structure for table `si_sites`
--

CREATE TABLE IF NOT EXISTS `si_sites` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `address` varchar(255) DEFAULT NULL,
  `suburb` varchar(64) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `si_sites`
--


-- --------------------------------------------------------

--
-- Table structure for table `si_trainings`
--

CREATE TABLE IF NOT EXISTS `si_trainings` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `si_trainings`
--


/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
