-- https://www.phpmyadmin.net/
--

START TRANSACTION;



--
-- Database: `arbormobilelight`
--

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

--
-- Table structure for table `distribution`
--

CREATE TABLE IF NOT EXISTS `distribution` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `address` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `lat` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `lang` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `phone_number` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `website` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `migration_versions`
--

CREATE TABLE IF NOT EXISTS `migration_versions` (
  `version` varchar(14) COLLATE utf8mb4_unicode_ci NOT NULL,
  `executed_at` datetime NOT NULL COMMENT '(DC2Type:datetime_immutable)',
  PRIMARY KEY (`version`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `migration_versions`
--

INSERT INTO `migration_versions` (`version`, `executed_at`) VALUES
('20191223143606', '2019-12-23 14:36:54'),
('20191224114926', '2019-12-24 11:49:51'),
('20191225105723', '2019-12-25 10:57:54'),
('20191225110420', '2019-12-25 11:04:37');

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

--
-- Table structure for table `pests`
--

CREATE TABLE IF NOT EXISTS `pests` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `pest_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `pest_description` mediumtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `image_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `pests`
--

INSERT INTO `pests` (`id`, `pest_name`, `pest_description`, `image_name`, `updated_at`) VALUES
(1, 'Bronze Birch Borer', '<div>The Bronze Birch Borer is a wood boring beetle, common across the northern half of the United States, which attacks all birch species.</div><div>The adult is a copper/bronze colored slender beetle. The larvae, which does the damage, are unseen, feeding on the vascular tissue under the bark. The Bronze Birch Borer typically attacks trees which are already stressed or in decline. A birch infested with Bronze Birch Borer will start showing dieback in the crown, increasing in severity as the infestation continues, often leading to death of the tree. In later stages of infestation, the trunk will show D-shaped, rust-stained exit holes and may also have swollen extrusions under the bark where the tree tried to grow over larval galleries.<br><br></div><div><a href=\"https://eby7n1h4sjq282yqc3re0451-wpengine.netdna-ssl.com/wp-content/uploads/2019/09/BronzeBirchBorer-PS-2019.pdf\"><strong>Download Pest Sheet</strong></a>&nbsp;<br><br></div>', 'crop_bronze-birch-borer_whitney-cranshaw-csu_bugwood.jpg', '2020-01-06 10:51:00'),
(2, 'Apple Scab', '<div>Apple Scab is a fungal disease which can affect the leaves, fruit, and twigs of apple, crabapple, hawthorn, and pear. It is a common occurrence after a particularly wet and cool spring. The evidence of Apple Scab is brownish-green spots on the leaves or fruit. As the infection progresses, the spots will become darker and more prominent and take on a somewhat fuzzy texture. When infection is severe, leaves will drop off and fruit will be deformed and/or drop off prior to ripening.&nbsp;<br><br></div><div>Trees Affected by Apple Scab<br><br></div><ul><li>Ash tree</li><li>Apple tree</li><li>Crab Apple tree</li><li>Hawthorn tree</li><li>Pear tree</li></ul><div>&nbsp;</div>', 'Apple-Scab.jpg', '2020-01-06 10:51:00'),
(3, 'Aphids', '<div>Aphids are piercing-sucking insects which include a vast number of species. They have various shapes, colors, and sizes, but are usually small, soft-bodied and pear-shaped with long, thin legs. Aphids are often found feeding in large groups and are slow-moving. They excrete a sticky substance called \"honeydew\" which will often cover objects below an aphid-infested tree. Aphids do damage when populations become very high, at which point leaves will become curled, distorted, and/or yellow. Growth will be stunted and honeydew will be excreted on objects below the tree. </div><div><br></div><div><strong>Trees Affected by Aphids</strong></div><ul><li>Ash tree</li><li>Maple tree</li><li>Palm tree</li><li>Sycamore tree</li><li>Tulip Tree tree</li><li>Walnut tree</li></ul><div>&nbsp;</div>', 'aphids-eggs.jpg', '2020-01-06 10:51:00');

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

--
-- Table structure for table `pests_trees`
--

CREATE TABLE IF NOT EXISTS `pests_trees` (
  `pests_id` int(11) NOT NULL,
  `trees_id` int(11) NOT NULL,
  PRIMARY KEY (`pests_id`,`trees_id`),
  KEY `IDX_31F9A4727192078B` (`pests_id`),
  KEY `IDX_31F9A472DFAEF485` (`trees_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `pests_trees`
--

INSERT INTO `pests_trees` (`pests_id`, `trees_id`) VALUES
(1, 1),
(1, 2),
(1, 3),
(2, 1),
(2, 2),
(3, 1),
(3, 2);

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

--
-- Table structure for table `pesttretment`
--

CREATE TABLE IF NOT EXISTS `pesttretment` (
  `id_pest` int(11) NOT NULL,
  `id_tretment` int(11) NOT NULL,
  PRIMARY KEY (`id_pest`,`id_tretment`),
  KEY `IDX_3AA3B9ADC3DF559` (`id_pest`),
  KEY `IDX_3AA3B9A1939606B` (`id_tretment`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `pesttretment`
--

INSERT INTO `pesttretment` (`id_pest`, `id_tretment`) VALUES
(1, 1),
(2, 1),
(3, 1);

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

--
-- Table structure for table `regenerate`
--

CREATE TABLE IF NOT EXISTS `regenerate` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `treepest`
--

CREATE TABLE IF NOT EXISTS `treepest` (
  `id_tree` int(11) NOT NULL,
  `id_pest` int(11) NOT NULL,
  PRIMARY KEY (`id_tree`,`id_pest`),
  KEY `IDX_10391CFA3C1E42DE` (`id_tree`),
  KEY `IDX_10391CFADC3DF559` (`id_pest`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `treepest`
--

INSERT INTO `treepest` (`id_tree`, `id_pest`) VALUES
(1, 1),
(2, 1),
(3, 1);

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

--
-- Table structure for table `trees`
--

CREATE TABLE IF NOT EXISTS `trees` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `tree_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` mediumtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `image_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `trees`
--

INSERT INTO `trees` (`id`, `tree_name`, `description`, `image_name`, `updated_at`) VALUES
(1, 'Apple', '<div>Apple trees are deciduous fruit-bearing trees found throughout much of the United States.&nbsp;</div>', 'How-to-Grow-Apple-Trees-at-Home.jpg', '2020-01-06 10:50:00'),
(2, 'Ash', '<div>Ash trees are extremely common in the urban forest in the U.S. Leaves are found in compound groupings and bark frequently has a diamond pattern.&nbsp;</div>', '5445354.jpg', '2020-01-06 10:50:00'),
(3, 'Beech', '<div>The Beech tree is a deciduous tree that is native of North America, Europe, and Asia.&nbsp;</div>', 'beach.jpg', '2020-01-06 10:50:00');

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

--
-- Table structure for table `treetag`
--

CREATE TABLE IF NOT EXISTS `treetag` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `userapp_id` int(11) NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `species` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `address` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `lat` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `lang` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `size` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `date` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `note` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `image_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `tretment`
--

CREATE TABLE IF NOT EXISTS `tretment` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` mediumtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `image_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `tretment`
--

INSERT INTO `tretment` (`id`, `name`, `description`, `image_name`, `updated_at`) VALUES
(1, 'TREE-äge', '<div><strong>Backed by more than a decade of real-world data, TREE-äge® insecticide has been proven in independent studies to be very effective against Emerald Ash Borer. Accept no imitations when your reputation is on the line. </strong></div><div><br></div><div><strong>Ingredients:</strong><br>Active Ingredient: Emamectin Benzoate: 4.0%<br>Other Ingredients: 96.0%<br><br></div><div><strong>TREE-äge 1-Liter</strong> – (040-4100)<br><strong>TREE-äge Case of 8</strong> – (040-4105)<br>*1 liter treats 33 trees (10″ DBH) <br><br> <a href=\"https://eby7n1h4sjq282yqc3re0451-wpengine.netdna-ssl.com/wp-content/uploads/2016/03/TREEageInsert8.5x112_24.pdf\"><strong>TREE-äge Label</strong></a><br><a href=\"https://eby7n1h4sjq282yqc3re0451-wpengine.netdna-ssl.com/wp-content/uploads/2016/02/TREEage2eeInsert8.5x11_ALLSTATES.pdf\"><strong>TREE-äge 2(ee) Label Recommendation</strong></a><br><a href=\"https://eby7n1h4sjq282yqc3re0451-wpengine.netdna-ssl.com/wp-content/uploads/2016/02/TREEage_2ee_Rec_for_NY.pdf\"><strong>TREE-äge 2(ee) Label Recommendation for New York</strong></a><br><a href=\"https://eby7n1h4sjq282yqc3re0451-wpengine.netdna-ssl.com/wp-content/uploads/2016/02/TREE-%C3%A4ge2eeTX.pdf\"><strong>TREE-äge 2(ee) Label Recommendation for Texas</strong></a><br><a href=\"https://eby7n1h4sjq282yqc3re0451-wpengine.netdna-ssl.com/wp-content/uploads/2016/02/TREE-%C3%A4ge_SDS_20Feb2015.pdf\"><strong>TREE-äge SDS</strong></a><br><a href=\"https://eby7n1h4sjq282yqc3re0451-wpengine.netdna-ssl.com/wp-content/uploads/2019/01/TREE-%C3%A4ge_SS_2017_WEB.pdf\"><strong>TREE-äge Sales Sheet</strong></a>&nbsp;<br><br></div>', 'TREE-age-1-ltr-040-4100.jpg', '2020-01-06 00:00:00');

--
-- Constraints for dumped tables
--

--
-- Constraints for table `pests_trees`
--
ALTER TABLE `pests_trees`
  ADD CONSTRAINT `FK_31F9A4727192078B` FOREIGN KEY (`pests_id`) REFERENCES `pests` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `FK_31F9A472DFAEF485` FOREIGN KEY (`trees_id`) REFERENCES `trees` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `pesttretment`
--
ALTER TABLE `pesttretment`
  ADD CONSTRAINT `FK_3AA3B9A1939606B` FOREIGN KEY (`id_tretment`) REFERENCES `tretment` (`id`),
  ADD CONSTRAINT `FK_3AA3B9ADC3DF559` FOREIGN KEY (`id_pest`) REFERENCES `pests` (`id`);

--
-- Constraints for table `treepest`
--
ALTER TABLE `treepest`
  ADD CONSTRAINT `FK_10391CFA3C1E42DE` FOREIGN KEY (`id_tree`) REFERENCES `trees` (`id`),
  ADD CONSTRAINT `FK_10391CFADC3DF559` FOREIGN KEY (`id_pest`) REFERENCES `pests` (`id`);
COMMIT;

