 --
 ALTER TABLE `credit`
   ADD CONSTRAINT `credit_ibfk_1` FOREIGN KEY (`user`) REFERENCES `user` (`id`);
+
+--
+-- Constraints der Tabelle `food_order`
+--
+ALTER TABLE `food_order`
+  ADD CONSTRAINT `food_order_ibfk_1` FOREIGN KEY (`admin`) REFERENCES `user` (`id`);
 
 --
 -- Constraints der Tabelle `product_line`

) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Daten für Tabelle `product_line`
--

INSERT INTO `product_line` (`id`, `user`, `food_order`, `product`, `quantity`, `added`, `paid`, `pay_type`) VALUES
(4, 1, 1, 2, 1, '2016-05-02 19:06:35', 0, 'admin'),
(5, 1, 2, 2, 1, '2016-05-02 20:27:14', 0, 'admin'),
(6, 1, 2, 2, 3, '2016-05-02 20:27:15', 0, 'admin'),
(7, 1, 3, 4, 1, '2016-05-02 20:34:05', 0, 'admin'),
(8, 1, 3, 3, 3, '2016-05-02 20:34:05', 0, 'admin');

--
-- Trigger `product_line`
--
DELIMITER $$

--

INSERT INTO `food_order` (`id`, `time`, `created`, `admin`, `closed`, `closed_time`) VALUES
(4, '2016-05-05 13:15:00', '2016-05-04 08:21:48', 1, 0, '0000-00-00 00:00:00');

--
-- Trigger `food_order`
