-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jul 05, 2017 at 01:59 PM
-- Server version: 10.1.16-MariaDB
-- PHP Version: 5.6.24

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: `payrollnew`
--

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

--
-- Table structure for table `companies_worker_ordered`
--

CREATE TABLE `companies_worker_ordered` (
  `id` int(10) UNSIGNED NOT NULL,
  `company_id` int(10) UNSIGNED NOT NULL,
  `work_date` date NOT NULL,
  `day_shift` tinyint(1) NOT NULL DEFAULT '0',
  `day_worker_ordered` int(11) NOT NULL,
  `afternoon_shift` tinyint(1) NOT NULL DEFAULT '0',
  `afternoon_worker_ordered` int(11) NOT NULL,
  `night_shift` tinyint(1) NOT NULL DEFAULT '0',
  `night_worker_ordered` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `companies_worker_ordered`
--

INSERT INTO `companies_worker_ordered` (`id`, `company_id`, `work_date`, `day_shift`, `day_worker_ordered`, `afternoon_shift`, `afternoon_worker_ordered`, `night_shift`, `night_worker_ordered`) VALUES
(2, 2, '2017-07-24', 1, 2, 1, 3, 1, 4);

--
-- Indexes for dumped tables
--

--
-- Indexes for table `companies_worker_ordered`
--
ALTER TABLE `companies_worker_ordered`
  ADD PRIMARY KEY (`id`),
  ADD KEY `companies_worker_ordered_company_id_foreign` (`company_id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `companies_worker_ordered`
--
ALTER TABLE `companies_worker_ordered`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- Constraints for dumped tables
--

--
-- Constraints for table `companies_worker_ordered`
--
ALTER TABLE `companies_worker_ordered`
  ADD CONSTRAINT `companies_worker_ordered_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE;

/*!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 */;
