text: -- phpMyAdmin SQL Dump
  -- version 4.6.5.2
  -- https://www.phpmyadmin.net/
  --
  -- Host: 127.0.0.1
  -- Generation Time: Jun 03, 2017 at 10:10 PM
  -- Server version: 10.1.21-MariaDB
  -- PHP Version: 5.6.30
  
  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 utf8mb4 */;
  
  --
  -- Database: `apetit`
  --
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `adress`
  --
  
  CREATE TABLE `adress` (
    `adress_id` int(11) NOT NULL,
    `user_id` int(11) NOT NULL,
    `adress` varchar(50) NOT NULL,
    `apartment` int(11) NOT NULL,
    `floor` int(11) NOT NULL,
    `phone` varchar(11) NOT NULL,
    `city` varchar(20) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `category_lku`
  --
  
  CREATE TABLE `category_lku` (
    `category_id` int(11) NOT NULL,
    `category_name` varchar(20) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `orderitem`
  --
  
  CREATE TABLE `orderitem` (
    `order_item_id` int(11) NOT NULL,
    `order_id` int(11) NOT NULL,
    `specialty_id` int(11) NOT NULL,
    `quantity` int(11) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `orders`
  --
  
  CREATE TABLE `orders` (
    `order_id` int(11) NOT NULL,
    `user_id` int(11) NOT NULL,
    `amount` int(11) NOT NULL,
    `status` varchar(20) NOT NULL,
    `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `specialty`
  --
  
  CREATE TABLE `specialty` (
    `specialty_id` int(11) NOT NULL,
    `category_id` int(11) NOT NULL,
    `name` varchar(20) NOT NULL,
    `price` int(11) NOT NULL,
    `description` text NOT NULL,
    `picture` varchar(100) NOT NULL DEFAULT 'http://localhost/apetit/img/foodholder.png'
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `users`
  --
  
  CREATE TABLE `users` (
    `id` int(11) NOT NULL,
    `username` char(30) NOT NULL,
    `password` varchar(20) NOT NULL,
    `email` varchar(50) DEFAULT NULL,
    `type` int(1) DEFAULT '1'
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  --
  -- Dumping data for table `users`
  --
  
  INSERT INTO `users` (`id`, `username`, `password`, `email`, `type`) VALUES
  (1, 'Dusan Pantic', '123', 'd@gmail.com', 1);
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `user_type_lku`
  --
  
  CREATE TABLE `user_type_lku` (
    `type_id` int(1) NOT NULL,
    `name` varchar(10) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  --
  -- Dumping data for table `user_type_lku`
  --
  
  INSERT INTO `user_type_lku` (`type_id`, `name`) VALUES
  (1, 'Customer'),
  (2, 'Employee'),
  (3, 'Admin');
  
  --
  -- Indexes for dumped tables
  --
  
  --
  -- Indexes for table `adress`
  --
  ALTER TABLE `adress`
    ADD PRIMARY KEY (`adress_id`);
  
  --
  -- Indexes for table `category_lku`
  --
  ALTER TABLE `category_lku`
    ADD PRIMARY KEY (`category_id`);
  
  --
  -- Indexes for table `orderitem`
  --
  ALTER TABLE `orderitem`
    ADD PRIMARY KEY (`order_item_id`);
  
  --
  -- Indexes for table `orders`
  --
  ALTER TABLE `orders`
    ADD PRIMARY KEY (`order_id`),
    ADD UNIQUE KEY `date` (`date`);
  
  --
  -- Indexes for table `specialty`
  --
  ALTER TABLE `specialty`
    ADD PRIMARY KEY (`specialty_id`);
  
  --
  -- Indexes for table `users`
  --
  ALTER TABLE `users`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `user_type_lku`
  --
  ALTER TABLE `user_type_lku`
    ADD PRIMARY KEY (`type_id`);
  
  --
  -- AUTO_INCREMENT for dumped tables
  --
  
  --
  -- AUTO_INCREMENT for table `adress`
  --
  ALTER TABLE `adress`
    MODIFY `adress_id` int(11) NOT NULL AUTO_INCREMENT;
  --
  -- AUTO_INCREMENT for table `category_lku`
  --
  ALTER TABLE `category_lku`
    MODIFY `category_id` int(11) NOT NULL AUTO_INCREMENT;
  --
  -- AUTO_INCREMENT for table `orderitem`
  --
  ALTER TABLE `orderitem`
    MODIFY `order_item_id` int(11) NOT NULL AUTO_INCREMENT;
  --
  -- AUTO_INCREMENT for table `orders`
  --
  ALTER TABLE `orders`
    MODIFY `order_id` int(11) NOT NULL AUTO_INCREMENT;
  --
  -- AUTO_INCREMENT for table `specialty`
  --
  ALTER TABLE `specialty`
    MODIFY `specialty_id` int(11) NOT NULL AUTO_INCREMENT;
  --
  -- AUTO_INCREMENT for table `users`
  --
  ALTER TABLE `users`
    MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
  --
  -- AUTO_INCREMENT for table `user_type_lku`
  --
  ALTER TABLE `user_type_lku`
    MODIFY `type_id` int(1) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
  /*!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 */;
  