Skip to content

Commit

Permalink
update testDatabase info
Browse files Browse the repository at this point in the history
  • Loading branch information
magnusandy committed Mar 7, 2015
1 parent 611249f commit 8d98c33
Showing 1 changed file with 14 additions and 62 deletions.
76 changes: 14 additions & 62 deletions database/test/testDatabase.sql
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
-- EatSafe_test
-- This file will populate the database
-- Before running this file, run CreateTables.sql first
INSERT INTO violation_type (id, description, name, priority)
VALUES (1, 'Potentially hazardous foods and perishable foods must be stored at 4°C/40°F or below. Hazardous foods must be thawed in a refrigerator or under cold, running water.', 'Refrigeration/Cooling/Thawing (must be 4°C/40°F or lower)', 'Critical Item'),
(2, 'Cook foods to an internal temperature of: a) 63°C (145°F) or above for: eggs (if prepared for immediate service); medium rare beef and veal steaks and roasts; b) 68°C (155°F) or above for: game farm meat products; c) 70°C (158°F) for: fish; d) 71°C (160°F) or above for: ground beef/pork/veal; food made with ground beef/pork/veal, e.g. sausages, meatballs; pork chops, ribs and roasts; e) 74°C (165°F) or above for: ground chicken/turkey; food made with ground chicken/turkey or mixtures containing poultry, meat, fish, or eggs; chicken and turkey breasts, legs, thighs and wings; stuffing (inside a carcass); stuffed pasta; hot dogs; leftovers; egg dishes (if not prepared as specified in 2a); and stuffed fish; f) 85°C (185°C) or above for: chicken and turkey, whole bird. Reheat foods rapidly to an internal temperature of 74°C (165°F) prior to serving. Hot Holding must maintain an internal temperature of 60°C (140°F) or higher.', 'Cooking/Reheating/Hot Holding (must be 60°C/140°F or higher)', 'Critical Item'),
Expand All @@ -18,18 +15,9 @@ VALUES (1, 'Potentially hazardous foods and perishable foods must be stored at 4
(14, 'All restaurants are to be free of vermin.', 'Insect/Rodent Control', 'General Item'),
(15, 'Floors, walls and ceilings of all rooms in which food is stored, prepared or served or in which dishes, utensils and equipment are washed or stored should be kept clean and in good repair.', 'Construction/Maintenance and/or Cleaning of Premises', 'General Item'),
(16, 'Approved plumbing must be installed and properly maintained to prevent food contamination. Light shields or shatterproof bulbs are to be provided in every room in which food is prepared or stored. Unless otherwise approved, every restaurant is to have a ventilation system that prevents the accumulation of odours, smoke, grease/oils and condensation.', 'Plumbing/Lighting/Ventilation', 'General Item');
--7 total locations
--20 total inspections
--20 total violations

--Location 1
/*
Location Summary
3 inspections
0 violations
*/
INSERT INTO location(id, name, address, postcode, city, rha)
VALUES (1, 'Andrews Kitchen', 'My Place', 'S0N 0H0', 'Town A', 'A Health Authority');
INSERT INTO location(id, name, address, postcode, city, rha, latitude, longitude)
VALUES (1, 'Andrews Kitchen', 'My Place', 'S0N 0H0', 'Town A', 'A Health Authority', 1.0, 1.0);

INSERT INTO inspection(id, location_id, inspection_date, inspection_type, reinspection_priority)
VALUES (1, 1, '2014-12-17', 'Routine', 'Low');
Expand All @@ -40,14 +28,8 @@ INSERT INTO inspection(id, location_id, inspection_date, inspection_type, reinsp
INSERT INTO inspection(id, location_id, inspection_date, inspection_type, reinspection_priority)
VALUES (3, 1, '2012-12-17', 'Routine', 'Low');

-- Location 2
/*
Location Summary
3 inspections
5 violations
*/
INSERT INTO location(id, name, address, postcode, city, rha)
VALUES (2, 'Andrews Bathroom', 'My Place', 'S0N 0J0', 'Town A', 'A Health Authority');
INSERT INTO location(id, name, address, postcode, city, rha, latitude, longitude)
VALUES (2, 'Andrews Bathroom', 'My Place', 'S0N 0J0', 'Town A', 'A Health Authority' , 1.0, 1.0);

INSERT INTO inspection(id, location_id, inspection_date, inspection_type, reinspection_priority)
VALUES (4, 2, '2012-07-12', 'Routine', 'Moderate');
Expand All @@ -73,14 +55,8 @@ INSERT INTO violation(inspection_id, violation_id)
INSERT INTO violation(inspection_id, violation_id)
VALUES (6, 12);

--Location 3
/*
Location Summary
2 inspections
2 violations
*/
INSERT INTO location(id, name, address, postcode, city, rha)
VALUES (3, 'Ten Forward', 'Starship Enterprise', 'S0N 0P0', 'Space', 'Space Health Authority');
INSERT INTO location(id, name, address, postcode, city, rha, latitude, longitude)
VALUES (3, 'Ten Forward', 'Starship Enterprise', 'S0N 0P0', 'Space', 'Space Health Authority', 1.0, 1.0);

INSERT INTO inspection(id, location_id, inspection_date, inspection_type, reinspection_priority)
VALUES (7, 3, '2013-08-12', 'Routine', 'Low');
Expand All @@ -94,14 +70,8 @@ INSERT INTO inspection(id, location_id, inspection_date, inspection_type, reinsp
INSERT INTO violation(inspection_id, violation_id)
VALUES (8, 15);

--Location 4
/*
Location Summary
3 inspections
3 violations
*/
INSERT INTO location(id, name, address, postcode, city, rha)
VALUES (4, 'Monks Cafe', 'Seinfeld Place', 'S0N 0W0', 'New York', 'York Health Authority');
INSERT INTO location(id, name, address, postcode, city, rha, latitude, longitude)
VALUES (4, 'Monks Cafe', 'Seinfeld Place', 'S0N 0W0', 'New York', 'York Health Authority', 1.0, 1.0);

INSERT INTO inspection(id, location_id, inspection_date, inspection_type, reinspection_priority)
VALUES (9, 4, '2012-11-15', 'Routine', 'Low');
Expand All @@ -121,14 +91,8 @@ INSERT INTO violation(inspection_id, violation_id)
INSERT INTO violation(inspection_id, violation_id)
VALUES (11, 16);

--location 5
/*
Location Summary
3 inspections
4 violations
*/
INSERT INTO location(id, name, address, postcode, city, rha)
VALUES (5, 'Panda Express', 'South Park Ave', 'S0N 0W0', 'South Park', 'SP Health Authority');
INSERT INTO location(id, name, address, postcode, city, rha, latitude, longitude)
VALUES (5, 'Panda Express', 'South Park Ave', 'S0N 0W0', 'South Park', 'SP Health Authority', 1.0, 1.0);

INSERT INTO inspection(id, location_id, inspection_date, inspection_type, reinspection_priority)
VALUES (12, 5, '2011-08-08', 'Routine', 'Low');
Expand All @@ -151,14 +115,8 @@ INSERT INTO violation(inspection_id, violation_id)
INSERT INTO violation(inspection_id, violation_id)
VALUES (14, 15);

--Location 6
/*
Location Summary
3 inspections
1 violations
*/
INSERT INTO location(id, name, address, postcode, city, rha)
VALUES (6, 'Insert TV Reference', '9001 place', 'H0H 0H0', 'Caprica City', 'Caprica Health Authority');
INSERT INTO location(id, name, address, postcode, city, rha, latitude, longitude)
VALUES (6, 'Insert TV Reference', '9001 place', 'H0H 0H0', 'Caprica City', 'Caprica Health Authority', 1.0, 1.0);

INSERT INTO inspection(id, location_id, inspection_date, inspection_type, reinspection_priority)
VALUES (15, 6, '2014-12-19', 'Routine', 'Low');
Expand All @@ -172,14 +130,8 @@ INSERT INTO violation(inspection_id, violation_id)
INSERT INTO inspection(id, location_id, inspection_date, inspection_type, reinspection_priority)
VALUES (17, 6, '2012-12-17', 'Routine', 'Low');

--Location 7
/*
Location Summary
3 inspections
5 violations
*/
INSERT INTO location(id, name, address, postcode, city, rha)
VALUES (7, 'Hogwarts Dining Hall', 'Hogwarts Place', 'S0G 2J0', 'Hogwarts', 'Wizard Health Authority');
INSERT INTO location(id, name, address, postcode, city, rha, latitude, longitude)
VALUES (7, 'Hogwarts Dining Hall', 'Hogwarts Place', 'S0G 2J0', 'Hogwarts', 'Wizard Health Authority', 1.0, 1.0);

INSERT INTO inspection(id, location_id, inspection_date, inspection_type, reinspection_priority)
VALUES (18, 7, '2014-12-17', 'Follow-up', 'Moderate');
Expand Down

0 comments on commit 8d98c33

Please sign in to comment.