SHARE
TWEET

Untitled

a guest Sep 22nd, 2016 81 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- phpMyAdmin SQL Dump
  2. -- version 4.1.14
  3. -- http://www.phpmyadmin.net
  4. --
  5. -- Host: 127.0.0.1
  6. -- Generation Time: Sep 22, 2016 at 06:04 PM
  7. -- Server version: 5.6.17
  8. -- PHP Version: 5.5.12
  9.  
  10. SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
  11. SET time_zone = "+00:00";
  12.  
  13.  
  14. /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
  15. /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
  16. /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
  17. /*!40101 SET NAMES utf8 */;
  18.  
  19. --
  20. -- Database: `prehrana`
  21. --
  22.  
  23. -- --------------------------------------------------------
  24.  
  25. --
  26. -- Table structure for table `feedback`
  27. --
  28.  
  29. CREATE TABLE IF NOT EXISTS `feedback` (
  30.   `id` int(11) NOT NULL AUTO_INCREMENT,
  31.   `text` text CHARACTER SET latin1 NOT NULL,
  32.   `fk_uporabnik_id` bigint(20) DEFAULT NULL,
  33.   `fk_lokal_id` bigint(20) DEFAULT NULL,
  34.   `datum` datetime NOT NULL,
  35.   PRIMARY KEY (`id`),
  36.   KEY `fk_uporabnik_id` (`fk_uporabnik_id`),
  37.   KEY `fk_lokal_id` (`fk_lokal_id`)
  38. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_slovenian_ci AUTO_INCREMENT=22 ;
  39.  
  40. --
  41. -- Dumping data for table `feedback`
  42. --
  43.  
  44. INSERT INTO `feedback` (`id`, `text`, `fk_uporabnik_id`, `fk_lokal_id`, `datum`) VALUES
  45. (1, 'ertert', NULL, NULL, '2016-09-20 16:32:00'),
  46. (2, 'ertert', NULL, NULL, '2016-09-20 16:32:00'),
  47. (3, 'ertert', NULL, NULL, '2016-09-20 16:32:00'),
  48. (4, 'ertert', NULL, NULL, '2016-09-20 16:32:00'),
  49. (5, 'ertert', NULL, NULL, '2016-09-20 16:32:00'),
  50. (6, 'ertert', NULL, NULL, '2016-09-20 16:32:00'),
  51. (7, 'ertert', NULL, NULL, '2016-09-20 16:32:00'),
  52. (8, 'ertert', NULL, NULL, '2016-09-20 16:32:00'),
  53. (9, 'ertert', NULL, NULL, '2016-09-20 16:32:00'),
  54. (10, 'ertert', NULL, NULL, '2016-09-20 16:32:00'),
  55. (11, 'ertert', NULL, NULL, '2016-09-20 16:32:00'),
  56. (12, 'ertert', NULL, NULL, '2016-09-20 16:32:00'),
  57. (13, 'zrtzr', NULL, 82386710868, '2016-09-20 16:33:00'),
  58. (14, 'werwer', 86891762479, NULL, '2016-09-20 16:34:00'),
  59. (15, 'rtzertz', 86891762479, NULL, '2016-09-20 16:37:00'),
  60. (16, 'rtzertz', 86891762479, NULL, '2016-09-20 16:37:00'),
  61. (17, 'rtzertz', 86891762479, NULL, '2016-09-20 16:37:00'),
  62. (18, 'rtzertz', 86891762479, NULL, '2016-09-20 16:37:00'),
  63. (19, 'rtuzrtz', 86891762479, NULL, '2016-09-20 16:38:00'),
  64. (20, '78', NULL, 82386710868, '2016-09-20 17:14:00'),
  65. (21, 'iopsdjt', 86891762479, NULL, '2016-09-20 23:58:00');
  66.  
  67. -- --------------------------------------------------------
  68.  
  69. --
  70. -- Table structure for table `jedilnik`
  71. --
  72.  
  73. CREATE TABLE IF NOT EXISTS `jedilnik` (
  74.   `id` bigint(20) NOT NULL,
  75.   `fk_lokal_id` bigint(20) NOT NULL,
  76.   `memo` varchar(64) COLLATE utf8_slovenian_ci NOT NULL,
  77.   `datum_vnosa` datetime NOT NULL,
  78.   `nazadnje_uporabljeno` datetime NOT NULL,
  79.   `active` tinyint(1) NOT NULL DEFAULT '0',
  80.   PRIMARY KEY (`id`),
  81.   KEY `fk_lokal_id` (`fk_lokal_id`)
  82. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_slovenian_ci;
  83.  
  84. --
  85. -- Dumping data for table `jedilnik`
  86. --
  87.  
  88. INSERT INTO `jedilnik` (`id`, `fk_lokal_id`, `memo`, `datum_vnosa`, `nazadnje_uporabljeno`, `active`) VALUES
  89. (7588134078, 82045867280, '123', '2016-09-17 14:44:00', '2016-09-17 14:44:00', 0),
  90. (8649271841, 82045867280, 'wewe', '2016-09-17 20:29:00', '2016-09-17 20:29:00', 0),
  91. (11204853268, 82045867280, 'jedilnik', '2016-09-17 20:34:00', '2016-09-17 20:34:00', 1),
  92. (15310941807, 82045867280, '1', '2016-09-17 20:31:00', '2016-09-17 20:31:00', 0),
  93. (20829631860, 82045867280, '33', '2016-09-17 20:28:00', '2016-09-17 20:28:00', 0),
  94. (26249310923, 82386710868, 'ttz', '2016-09-19 12:00:00', '2016-09-19 12:00:00', 0),
  95. (28383515488, 82045867280, '333333', '2016-09-17 20:26:00', '2016-09-17 20:26:00', 0),
  96. (33798324768, 82045867280, '123', '2016-09-17 14:45:00', '2016-09-17 14:45:00', 0),
  97. (33824648320, 82045867280, '1', '2016-09-17 20:31:00', '2016-09-17 20:31:00', 0),
  98. (48058712889, 82045867280, '123', '2016-09-17 21:12:00', '2016-09-17 21:12:00', 0),
  99. (52878884339, 82045867280, '1', '2016-09-17 20:31:00', '2016-09-17 20:31:00', 0),
  100. (59663741564, 82045867280, 'tilen1', '2016-09-17 20:26:00', '2016-09-17 20:26:00', 0),
  101. (63831642153, 82045867280, 'asd', '2016-09-17 20:29:00', '2016-09-17 20:29:00', 0),
  102. (68163308184, 82045867280, '5', '2016-09-17 20:32:00', '2016-09-17 20:32:00', 0),
  103. (68380364088, 82386710868, 'Vikend meni', '2016-09-20 22:45:00', '2016-09-20 22:45:00', 1),
  104. (82911641268, 82386710868, 'Teden meni', '2016-09-11 18:34:00', '2016-09-11 18:34:00', 0),
  105. (89038977489, 82045867280, '33', '2016-09-17 20:26:00', '2016-09-17 20:26:00', 0);
  106.  
  107. -- --------------------------------------------------------
  108.  
  109. --
  110. -- Table structure for table `jedilnik_meni`
  111. --
  112.  
  113. CREATE TABLE IF NOT EXISTS `jedilnik_meni` (
  114.   `id` int(11) NOT NULL AUTO_INCREMENT,
  115.   `naziv` varchar(64) COLLATE utf8_slovenian_ci DEFAULT NULL,
  116.   `fk_jedilnik_id` bigint(20) NOT NULL,
  117.   `fk_jedilnik_tip` int(11) DEFAULT NULL,
  118.   `jedilnik` mediumtext COLLATE utf8_slovenian_ci NOT NULL,
  119.   `cena` double DEFAULT '-1',
  120.   PRIMARY KEY (`id`),
  121.   KEY `fk_meni_id` (`fk_jedilnik_id`),
  122.   KEY `fk_jedilnik_tip` (`fk_jedilnik_tip`),
  123.   KEY `fk_meni_id_2` (`fk_jedilnik_id`),
  124.   KEY `fk_jedilnik_tip_2` (`fk_jedilnik_tip`),
  125.   KEY `fk_jedilnik_id` (`fk_jedilnik_id`)
  126. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_slovenian_ci AUTO_INCREMENT=95 ;
  127.  
  128. -- --------------------------------------------------------
  129.  
  130. --
  131. -- Table structure for table `jedilnik_tip`
  132. --
  133.  
  134. CREATE TABLE IF NOT EXISTS `jedilnik_tip` (
  135.   `id` int(11) NOT NULL,
  136.   `naziv` varchar(32) NOT NULL,
  137.   PRIMARY KEY (`id`)
  138. ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  139.  
  140. --
  141. -- Dumping data for table `jedilnik_tip`
  142. --
  143.  
  144. INSERT INTO `jedilnik_tip` (`id`, `naziv`) VALUES
  145. (1, 'Mesni'),
  146. (2, 'Vege'),
  147. (3, 'Ribe'),
  148. (4, 'Hitra hrana'),
  149. (5, 'Pizza'),
  150. (6, 'Testenine');
  151.  
  152. -- --------------------------------------------------------
  153.  
  154. --
  155. -- Table structure for table `lokal`
  156. --
  157.  
  158. CREATE TABLE IF NOT EXISTS `lokal` (
  159.   `id` bigint(11) NOT NULL,
  160.   `active` tinyint(1) NOT NULL DEFAULT '1',
  161.   `naziv` varchar(32) COLLATE utf16_slovenian_ci NOT NULL,
  162.   `lastnik` varchar(32) COLLATE utf16_slovenian_ci NOT NULL,
  163.   `naslov` varchar(48) COLLATE utf16_slovenian_ci NOT NULL,
  164.   `kraj` varchar(20) COLLATE utf16_slovenian_ci NOT NULL,
  165.   `telefon` varchar(14) CHARACTER SET latin1 NOT NULL,
  166.   `email` varchar(32) CHARACTER SET latin1 DEFAULT NULL,
  167.   `geslo` text CHARACTER SET utf32 COLLATE utf32_slovenian_ci NOT NULL,
  168.   `salt` text CHARACTER SET latin1 NOT NULL,
  169.   `odprto_teden_zacetek` varchar(8) CHARACTER SET latin1 NOT NULL,
  170.   `odprto_teden_konec` varchar(8) CHARACTER SET latin1 NOT NULL,
  171.   `odprto_sobota_zacetek` varchar(8) CHARACTER SET latin1 NOT NULL,
  172.   `odprto_sobota_konec` varchar(8) CHARACTER SET latin1 NOT NULL,
  173.   `odprto_nedelja_zacetek` varchar(8) CHARACTER SET latin1 NOT NULL,
  174.   `odprto_nedelja_konec` varchar(8) CHARACTER SET latin1 NOT NULL,
  175.   `datum_registracije` datetime NOT NULL,
  176.   `dostava` tinyint(1) NOT NULL,
  177.   `boni` tinyint(1) NOT NULL,
  178.   `dostava_vikend` tinyint(1) NOT NULL,
  179.   `vege` tinyint(1) NOT NULL,
  180.   `kosila` tinyint(1) NOT NULL,
  181.   `img` varchar(128) COLLATE utf16_slovenian_ci DEFAULT NULL,
  182.   `placilo_gotovina` tinyint(1) NOT NULL,
  183.   `placilo_kartica` tinyint(1) NOT NULL,
  184.   `placilo_moneta` tinyint(1) NOT NULL,
  185.   PRIMARY KEY (`id`)
  186. ) ENGINE=InnoDB DEFAULT CHARSET=utf16 COLLATE=utf16_slovenian_ci;
  187.  
  188. --
  189. -- Dumping data for table `lokal`
  190. --
  191.  
  192. INSERT INTO `lokal` (`id`, `active`, `naziv`, `lastnik`, `naslov`, `kraj`, `telefon`, `email`, `geslo`, `salt`, `odprto_teden_zacetek`, `odprto_teden_konec`, `odprto_sobota_zacetek`, `odprto_sobota_konec`, `odprto_nedelja_zacetek`, `odprto_nedelja_konec`, `datum_registracije`, `dostava`, `boni`, `dostava_vikend`, `vege`, `kosila`, `img`, `placilo_gotovina`, `placilo_kartica`, `placilo_moneta`) VALUES
  193. (1893643639, 1, 'Back Werk', 'null', 'Slovenska cesta 52', 'Ljubljana', '031000000', 'null@gmail.com', 'adba5a82a61eb402dd3c7f939f6344f0021d78a54e553a2cba0d74f0845a4404', '27096876959727515', '00:00', '00:00', '00:00', '00:00', '00:00', '00:00', '2016-09-08 23:24:49', 0, 0, 1, 0, 0, NULL, 0, 0, 0),
  194. (6934453239, 1, 'Back Werk', 'null', 'Slovenska cesta 52', 'Ljubljana', '031000000', 'null@gmail.com', 'adba5a82a61eb402dd3c7f939f6344f0021d78a54e553a2cba0d74f0845a4404', '27096876959727515', '00:00', '00:00', '00:00', '00:00', '00:00', '00:00', '2016-09-08 23:24:49', 0, 0, 1, 0, 0, NULL, 0, 0, 0),
  195. (6934455239, 1, 'Back Werk', 'null', 'Slovenska cesta 52', 'Ljubljana', '031000000', 'null@gmail.com', 'adba5a82a61eb402dd3c7f939f6344f0021d78a54e553a2cba0d74f0845a4404', '27096876959727515', '00:00', '00:00', '00:00', '00:00', '00:00', '00:00', '2016-09-08 23:24:49', 0, 0, 1, 0, 0, NULL, 0, 0, 0),
  196. (6936453239, 1, 'Back Werk', 'null', 'Slovenska cesta 52', 'Ljubljana', '031000000', 'null@gmail.com', 'adba5a82a61eb402dd3c7f939f6344f0021d78a54e553a2cba0d74f0845a4404', '27096876959727515', '00:00', '00:00', '00:00', '00:00', '00:00', '00:00', '2016-09-08 23:24:49', 0, 0, 1, 0, 0, NULL, 0, 0, 0),
  197. (6936453639, 1, 'Back Werk', 'null', 'Slovenska cesta 52', 'Ljubljana', '031000000', 'null@gmail.com', 'adba5a82a61eb402dd3c7f939f6344f0021d78a54e553a2cba0d74f0845a4404', '27096876959727515', '00:00', '00:00', '00:00', '00:00', '00:00', '00:00', '2016-09-08 23:24:49', 0, 0, 1, 0, 0, NULL, 0, 0, 0),
  198. (6964455239, 1, 'Back Werk', 'null', 'Slovenska cesta 52', 'Ljubljana', '031000000', 'null@gmail.com', 'adba5a82a61eb402dd3c7f939f6344f0021d78a54e553a2cba0d74f0845a4404', '27096876959727515', '00:00', '00:00', '00:00', '00:00', '00:00', '00:00', '2016-09-08 23:24:49', 0, 0, 1, 0, 0, NULL, 0, 0, 0),
  199. (10936114618, 1, 'Back Werk', 'null', 'Slovenska cesta 52', 'Ljubljana', '031000000', 'null@gmail.com', 'adba5a82a61eb402dd3c7f939f6344f0021d78a54e553a2cba0d74f0845a4404', '27096876959727515', '00:00', '00:00', '00:00', '00:00', '00:00', '00:00', '2016-09-08 23:24:49', 0, 0, 1, 0, 0, NULL, 0, 0, 0),
  200. (10936114619, 1, 'Back Werk', 'null', 'Slovenska cesta 52', 'Ljubljana', '031000000', 'null@gmail.com', 'adba5a82a61eb402dd3c7f939f6344f0021d78a54e553a2cba0d74f0845a4404', '27096876959727515', '00:00', '00:00', '00:00', '00:00', '00:00', '00:00', '2016-09-08 23:24:49', 0, 0, 1, 0, 0, NULL, 0, 0, 0),
  201. (10936114639, 1, 'Back Werk', 'null', 'Slovenska cesta 52', 'Ljubljana', '031000000', 'null@gmail.com', 'adba5a82a61eb402dd3c7f939f6344f0021d78a54e553a2cba0d74f0845a4404', '27096876959727515', '00:00', '00:00', '00:00', '00:00', '00:00', '00:00', '2016-09-08 23:24:49', 0, 0, 1, 0, 0, NULL, 0, 0, 0),
  202. (10936414639, 1, 'Back Werk', 'null', 'Slovenska cesta 52', 'Ljubljana', '031000000', 'null@gmail.com', 'adba5a82a61eb402dd3c7f939f6344f0021d78a54e553a2cba0d74f0845a4404', '27096876959727515', '00:00', '00:00', '00:00', '00:00', '00:00', '00:00', '2016-09-08 23:24:49', 0, 0, 1, 0, 0, NULL, 0, 0, 0),
  203. (10936454639, 1, 'Back Werk', 'null', 'Slovenska cesta 52', 'Ljubljana', '031000000', 'null@gmail.com', 'adba5a82a61eb402dd3c7f939f6344f0021d78a54e553a2cba0d74f0845a4404', '27096876959727515', '00:00', '00:00', '00:00', '00:00', '00:00', '00:00', '2016-09-08 23:24:49', 0, 0, 1, 0, 0, NULL, 0, 0, 0),
  204. (12936454639, 1, 'Back Werk', 'null', 'Slovenska cesta 52', 'Ljubljana', '031000000', 'null@gmail.com', 'adba5a82a61eb402dd3c7f939f6344f0021d78a54e553a2cba0d74f0845a4404', '27096876959727515', '00:00', '00:00', '00:00', '00:00', '00:00', '00:00', '2016-09-08 23:24:49', 0, 0, 1, 0, 0, NULL, 0, 0, 0),
  205. (13936454639, 1, 'Back Werk', 'null', 'Slovenska cesta 52', 'Ljubljana', '031000000', 'null@gmail.com', 'adba5a82a61eb402dd3c7f939f6344f0021d78a54e553a2cba0d74f0845a4404', '27096876959727515', '00:00', '00:00', '00:00', '00:00', '00:00', '00:00', '2016-09-08 23:24:49', 0, 0, 1, 0, 0, NULL, 0, 0, 0),
  206. (16936454639, 1, 'Back Werk', 'null', 'Slovenska cesta 52', 'Ljubljana', '031000000', 'null@gmail.com', 'adba5a82a61eb402dd3c7f939f6344f0021d78a54e553a2cba0d74f0845a4404', '27096876959727515', '00:00', '00:00', '00:00', '00:00', '00:00', '00:00', '2016-09-08 23:24:49', 0, 0, 1, 0, 0, NULL, 0, 0, 0),
  207. (18936414639, 1, 'Back Werk', 'null', 'Slovenska cesta 52', 'Ljubljana', '031000000', 'null@gmail.com', 'adba5a82a61eb402dd3c7f939f6344f0021d78a54e553a2cba0d74f0845a4404', '27096876959727515', '00:00', '00:00', '00:00', '00:00', '00:00', '00:00', '2016-09-08 23:24:49', 0, 0, 1, 0, 0, NULL, 0, 0, 0),
  208. (18936424639, 1, 'Back Werk', 'null', 'Slovenska cesta 52', 'Ljubljana', '031000000', 'null@gmail.com', 'adba5a82a61eb402dd3c7f939f6344f0021d78a54e553a2cba0d74f0845a4404', '27096876959727515', '00:00', '00:00', '00:00', '00:00', '00:00', '00:00', '2016-09-08 23:24:49', 0, 0, 1, 0, 0, NULL, 0, 0, 0),
  209. (18936453639, 1, 'Back Werk', 'null', 'Slovenska cesta 52', 'Ljubljana', '031000000', 'null@gmail.com', 'adba5a82a61eb402dd3c7f939f6344f0021d78a54e553a2cba0d74f0845a4404', '27096876959727515', '00:00', '00:00', '00:00', '00:00', '00:00', '00:00', '2016-09-08 23:24:49', 0, 0, 1, 0, 0, NULL, 0, 0, 0),
  210. (18936454639, 1, 'Back Werk', 'null', 'Slovenska cesta 52', 'Ljubljana', '031000000', 'null@gmail.com', 'adba5a82a61eb402dd3c7f939f6344f0021d78a54e553a2cba0d74f0845a4404', '27096876959727515', '00:00', '00:00', '00:00', '00:00', '00:00', '00:00', '2016-09-08 23:24:49', 0, 0, 1, 0, 0, NULL, 0, 0, 0),
  211. (20934442485, 1, 'Astoria City Cusine', 'null', 'Slovenska ulica 2', 'Maribor', '026211700', 'null@gmail.com', '9f02abb69b0cc1386c3c42e914d003ecea548d690d8a1cbaeabc24f3b29c3943', '79788284005675642', '00:00', '00:00', '00:00', '00:00', '00:00', '00:00', '2016-09-08 23:23:21', 0, 1, 1, 1, 0, NULL, 0, 0, 0),
  212. (52927503148, 1, 'Apači', 'Apači', 'Pohorska cesta 17b', 'Slovenj Gradec', '028831784', 'apaci@gmail.com', '923b10184d21542f7a487f9300df1acab272269c9e41edf80d49934e73f0a370', '88528993183838781', '09:00', '23:00', '12:00', '01:00', '12:00', '22:00', '2016-09-08 14:29:57', 0, 1, 0, 1, 0, NULL, 0, 0, 0),
  213. (66328866021, 1, 'AROMA, restavracija in pizzerija', 'null', 'Ribji trg 2', 'Ljubljana', '031000000', 'noemail@gmail.com', '7ad3ed8d42f79c9e03a11102c3ca33c517d4ec0f923e99043982019f0c1daea4', '82067569399867435', '00:00', '00:00', '00:00', '00:00', '00:00', '00:00', '2016-09-08 23:21:48', 0, 0, 1, 1, 0, NULL, 0, 0, 0),
  214. (82045867280, 1, 'tilen', 'tilen', 'tilen', 'tilen', '031000000', 'tilen@gmail.com', '58dfa4991ba96e60caaad2728dc89ab89552a107e714d54c0dbe8b2103c5e60e', '78306335072898800', '00:00', '00:00', '00:00', '00:00', '00:00', '00:00', '2016-09-10 15:44:00', 1, 1, 1, 1, 1, NULL, 0, 0, 0),
  215. (82386710868, 1, 'AL Pachino', 'AL Pachino', 'Gosposvetska cesta 87', 'Maribor', '041566373', 'alpachino@gmail.com', '58dfa4991ba96e60caaad2728dc89ab89552a107e714d54c0dbe8b2103c5e60e', '78306335072898800', '10:00', '20:00', '00:00', '00:00', '00:00', '00:00', '2016-09-08 14:27:24', 1, 1, 1, 0, 0, NULL, 0, 0, 0),
  216. (84189335439, 1, 'Bohor d.o.o.', 'Bohor d.o.o.', 'Kidričeva ulica 23', 'Rogaška Slatina', '031000000', 'null@gmail.com', '5dba49c1fc147a6cc814fae84bc3f29405c222f4dc9ddafc547cd3b0e862d66c', '33987949451383398', '00:00', '00:00', '00:00', '00:00', '00:00', '00:00', '2016-09-08 23:27:47', 0, 0, 1, 1, 0, NULL, 0, 0, 0);
  217.  
  218. -- --------------------------------------------------------
  219.  
  220. --
  221. -- Table structure for table `nacin_placila`
  222. --
  223.  
  224. CREATE TABLE IF NOT EXISTS `nacin_placila` (
  225.   `id` int(11) NOT NULL AUTO_INCREMENT,
  226.   `naziv` varchar(32) NOT NULL,
  227.   PRIMARY KEY (`id`)
  228. ) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ;
  229.  
  230. --
  231. -- Dumping data for table `nacin_placila`
  232. --
  233.  
  234. INSERT INTO `nacin_placila` (`id`, `naziv`) VALUES
  235. (1, 'Gotovina'),
  236. (2, 'Kartica'),
  237. (3, 'Moneta');
  238.  
  239. -- --------------------------------------------------------
  240.  
  241. --
  242. -- Table structure for table `narocilo`
  243. --
  244.  
  245. CREATE TABLE IF NOT EXISTS `narocilo` (
  246.   `id` bigint(20) NOT NULL,
  247.   `fk_uporabnik_id` bigint(20) NOT NULL,
  248.   `fk_jedilnik_meni_id` int(11) DEFAULT NULL,
  249.   `fk_lokal_id` bigint(20) NOT NULL,
  250.   `bon` tinyint(1) NOT NULL,
  251.   `naslov` varchar(64) CHARACTER SET utf8 COLLATE utf8_slovenian_ci NOT NULL,
  252.   `kraj` varchar(64) CHARACTER SET utf8 COLLATE utf8_slovenian_ci NOT NULL,
  253.   `telefon` varchar(64) NOT NULL,
  254.   `cena` double NOT NULL,
  255.   `komentar` text CHARACTER SET utf8 COLLATE utf8_slovenian_ci NOT NULL,
  256.   `datum_narocila` datetime NOT NULL,
  257.   `datum_sprejema` datetime DEFAULT NULL,
  258.   `koncano` tinyint(1) NOT NULL DEFAULT '0',
  259.   `predviden_cas_dostave` int(11) DEFAULT NULL,
  260.   `fk_nacin_placila` int(11) DEFAULT '1',
  261.   `zavrnjeno` tinyint(1) NOT NULL DEFAULT '0',
  262.   PRIMARY KEY (`id`),
  263.   KEY `fk_uporabnik_id` (`fk_uporabnik_id`),
  264.   KEY `fk_lokal_id` (`fk_lokal_id`),
  265.   KEY `fk_jedilnik_meni_id` (`fk_jedilnik_meni_id`),
  266.   KEY `fk_nacin_placila` (`fk_nacin_placila`)
  267. ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  268.  
  269. --
  270. -- Dumping data for table `narocilo`
  271. --
  272.  
  273. INSERT INTO `narocilo` (`id`, `fk_uporabnik_id`, `fk_jedilnik_meni_id`, `fk_lokal_id`, `bon`, `naslov`, `kraj`, `telefon`, `cena`, `komentar`, `datum_narocila`, `datum_sprejema`, `koncano`, `predviden_cas_dostave`, `fk_nacin_placila`, `zavrnjeno`) VALUES
  274. (9373848290, 86891762479, NULL, 82386710868, 1, 'qweqwe', 'qweqwe', '031000000', 3.18, '123', '2016-09-22 15:22:00', NULL, 0, NULL, 1, 0),
  275. (17093856403, 86891762479, NULL, 82386710868, 1, '123123', '123123', '031000000', 3.18, '132', '2016-09-22 13:12:00', NULL, 0, NULL, 1, 0),
  276. (18868420336, 86891762479, NULL, 82386710868, 1, '123123', '123123', '031000000', 3.18, '132', '2016-09-22 13:12:00', NULL, 0, NULL, 1, 0),
  277. (54532842888, 86891762479, NULL, 82386710868, 1, 'qweqwe', 'qweqwe', '031000000', 3.18, '123', '2016-09-22 15:22:00', NULL, 0, NULL, 1, 0),
  278. (62273868549, 86891762479, NULL, 82386710868, 1, 'qweqwe', 'qweqwe', '031000000', 3.18, '123', '2016-09-22 15:22:00', '2016-09-22 17:44:00', 1, NULL, 1, 0),
  279. (98865609855, 86891762479, NULL, 82386710868, 1, '123123', '123123', '031000000', 3.18, '132', '2016-09-22 13:12:00', NULL, 0, NULL, 1, 0);
  280.  
  281. -- --------------------------------------------------------
  282.  
  283. --
  284. -- Table structure for table `ocena`
  285. --
  286.  
  287. CREATE TABLE IF NOT EXISTS `ocena` (
  288.   `id` int(11) NOT NULL AUTO_INCREMENT,
  289.   `fk_lokal_id` bigint(11) NOT NULL,
  290.   `fk_uporabnik_id` bigint(11) NOT NULL,
  291.   `ocena` int(11) NOT NULL,
  292.   PRIMARY KEY (`id`),
  293.   KEY `fk_uporabnik_id` (`fk_uporabnik_id`),
  294.   KEY `fk_lokal_id` (`fk_lokal_id`)
  295. ) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=15 ;
  296.  
  297. --
  298. -- Dumping data for table `ocena`
  299. --
  300.  
  301. INSERT INTO `ocena` (`id`, `fk_lokal_id`, `fk_uporabnik_id`, `ocena`) VALUES
  302. (12, 82386710868, 86891762479, 5),
  303. (13, 52927503148, 86891762479, 3),
  304. (14, 82045867280, 86891762479, 5);
  305.  
  306. -- --------------------------------------------------------
  307.  
  308. --
  309. -- Table structure for table `priljubljeno`
  310. --
  311.  
  312. CREATE TABLE IF NOT EXISTS `priljubljeno` (
  313.   `id` int(11) NOT NULL AUTO_INCREMENT,
  314.   `fk_uporabnik_id` bigint(20) NOT NULL,
  315.   `fk_lokal_id` bigint(20) NOT NULL,
  316.   PRIMARY KEY (`id`),
  317.   KEY `fk_uporabnik_id` (`fk_uporabnik_id`,`fk_lokal_id`),
  318.   KEY `fk_lokal_id` (`fk_lokal_id`)
  319. ) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=18 ;
  320.  
  321. --
  322. -- Dumping data for table `priljubljeno`
  323. --
  324.  
  325. INSERT INTO `priljubljeno` (`id`, `fk_uporabnik_id`, `fk_lokal_id`) VALUES
  326. (14, 86891762479, 82045867280),
  327. (17, 86891762479, 82386710868);
  328.  
  329. -- --------------------------------------------------------
  330.  
  331. --
  332. -- Table structure for table `uporabnik`
  333. --
  334.  
  335. CREATE TABLE IF NOT EXISTS `uporabnik` (
  336.   `id` bigint(11) NOT NULL,
  337.   `email` varchar(32) NOT NULL,
  338.   `ime` varchar(14) CHARACTER SET utf8 COLLATE utf8_slovenian_ci NOT NULL,
  339.   `priimek` varchar(20) CHARACTER SET utf8 COLLATE utf8_slovenian_ci NOT NULL,
  340.   `telefon` varchar(14) NOT NULL,
  341.   `naslov` varchar(40) CHARACTER SET utf8 COLLATE utf8_slovenian_ci NOT NULL,
  342.   `kraj` varchar(20) CHARACTER SET utf8 COLLATE utf8_slovenian_ci NOT NULL,
  343.   `geslo` text CHARACTER SET utf8 COLLATE utf8_slovenian_ci NOT NULL,
  344.   `salt` text NOT NULL,
  345.   `ip` varchar(20) NOT NULL,
  346.   `datum_registracije` datetime NOT NULL,
  347.   `bon` tinyint(1) NOT NULL,
  348.   `last_login` datetime NOT NULL,
  349.   `narocilo_default_naslov` tinyint(1) NOT NULL DEFAULT '0',
  350.   PRIMARY KEY (`id`)
  351. ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  352.  
  353. --
  354. -- Dumping data for table `uporabnik`
  355. --
  356.  
  357. INSERT INTO `uporabnik` (`id`, `email`, `ime`, `priimek`, `telefon`, `naslov`, `kraj`, `geslo`, `salt`, `ip`, `datum_registracije`, `bon`, `last_login`, `narocilo_default_naslov`) VALUES
  358. (39419784779, 'poqwek@gmail.com', 'qpwoek', 'qwpoek', '031000000', 'qpwoek', 'qwepok', '984c063ea00984de73129ef5f21aae8ee8b6cc6ea84e1f870b48cb2c09026756', '99688739803629536', '::1', '2016-09-10 12:26:00', 1, '2016-09-10 12:26:00', 0),
  359. (86891762479, 'tilen1@gmail.com', 'tilen', 'priimek', '031000000', 'naslov 12', 'maribor', '2bac383336519df7129ca77575dad272bfe86ff8547a6841dc1f8e648086654c', '80509632030640054', '::1', '2016-09-10 14:18:00', 1, '2016-09-22 15:21:00', 0);
  360.  
  361. --
  362. -- Constraints for dumped tables
  363. --
  364.  
  365. --
  366. -- Constraints for table `feedback`
  367. --
  368. ALTER TABLE `feedback`
  369.   ADD CONSTRAINT `feedback_ibfk_1` FOREIGN KEY (`fk_uporabnik_id`) REFERENCES `uporabnik` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  370.   ADD CONSTRAINT `feedback_ibfk_2` FOREIGN KEY (`fk_lokal_id`) REFERENCES `lokal` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
  371.  
  372. --
  373. -- Constraints for table `jedilnik`
  374. --
  375. ALTER TABLE `jedilnik`
  376.   ADD CONSTRAINT `jedilnik_ibfk_1` FOREIGN KEY (`fk_lokal_id`) REFERENCES `lokal` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
  377.  
  378. --
  379. -- Constraints for table `jedilnik_meni`
  380. --
  381. ALTER TABLE `jedilnik_meni`
  382.   ADD CONSTRAINT `jedilnik_meni_ibfk_1` FOREIGN KEY (`fk_jedilnik_id`) REFERENCES `jedilnik` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  383.   ADD CONSTRAINT `jedilnik_meni_ibfk_2` FOREIGN KEY (`fk_jedilnik_tip`) REFERENCES `jedilnik_tip` (`id`) ON DELETE SET NULL ON UPDATE SET NULL;
  384.  
  385. --
  386. -- Constraints for table `narocilo`
  387. --
  388. ALTER TABLE `narocilo`
  389.   ADD CONSTRAINT `narocilo_ibfk_1` FOREIGN KEY (`fk_lokal_id`) REFERENCES `lokal` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  390.   ADD CONSTRAINT `narocilo_ibfk_2` FOREIGN KEY (`fk_uporabnik_id`) REFERENCES `uporabnik` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  391.   ADD CONSTRAINT `narocilo_ibfk_3` FOREIGN KEY (`fk_jedilnik_meni_id`) REFERENCES `jedilnik_meni` (`id`) ON DELETE SET NULL ON UPDATE SET NULL,
  392.   ADD CONSTRAINT `narocilo_ibfk_4` FOREIGN KEY (`fk_nacin_placila`) REFERENCES `nacin_placila` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
  393.  
  394. --
  395. -- Constraints for table `ocena`
  396. --
  397. ALTER TABLE `ocena`
  398.   ADD CONSTRAINT `ocena_ibfk_1` FOREIGN KEY (`fk_lokal_id`) REFERENCES `lokal` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  399.   ADD CONSTRAINT `ocena_ibfk_2` FOREIGN KEY (`fk_uporabnik_id`) REFERENCES `uporabnik` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
  400.  
  401. --
  402. -- Constraints for table `priljubljeno`
  403. --
  404. ALTER TABLE `priljubljeno`
  405.   ADD CONSTRAINT `priljubljeno_ibfk_1` FOREIGN KEY (`fk_uporabnik_id`) REFERENCES `uporabnik` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  406.   ADD CONSTRAINT `priljubljeno_ibfk_2` FOREIGN KEY (`fk_lokal_id`) REFERENCES `lokal` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
  407.  
  408. /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
  409. /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
  410. /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top