-- http://www.phpmyadmin.net
--




--
-- Database: `dastavej`
--
CREATE DATABASE IF NOT EXISTS `dastavej` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
USE `dastavej`;

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

--
-- Table structure for table `dastavej_master`
--

CREATE TABLE IF NOT EXISTS `dastavej_master` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `d_name` varchar(50) NOT NULL,
  `status` int(11) NOT NULL,
  `f_tahsile` int(11) NOT NULL,
  `f_village` int(11) NOT NULL,
  `f_mamla_no` int(11) NOT NULL,
  `f_mad` int(11) NOT NULL,
  `f_patwari_hno` int(11) NOT NULL,
  `f_year` int(11) NOT NULL,
  `f_rack` int(11) NOT NULL,
  `f_self` int(11) NOT NULL,
  `f_status` int(11) NOT NULL,
  `active` int(11) NOT NULL,
  `date` date NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;

--
-- Dumping data for table `dastavej_master`
--

INSERT INTO `dastavej_master` (`id`, `d_name`, `status`, `f_tahsile`, `f_village`, `f_mamla_no`, `f_mad`, `f_patwari_hno`, `f_year`, `f_rack`, `f_self`, `f_status`, `active`, `date`) VALUES
(1, 'Prakaran', 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, '2016-01-12'),
(2, 'Misal', 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, '2016-01-12'),
(3, 'Namantaran', 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, '2016-01-13');

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

--
-- Table structure for table `file_entry`
--

CREATE TABLE IF NOT EXISTS `file_entry` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `barcode` varchar(100) NOT NULL,
  `d_id` int(11) NOT NULL,
  `t_id` int(11) NOT NULL,
  `v_id` int(11) NOT NULL,
  `mamla_no` varchar(100) NOT NULL,
  `mad` varchar(100) NOT NULL,
  `patwari_hno` varchar(100) NOT NULL,
  `year` varchar(100) NOT NULL,
  `rack` varchar(100) NOT NULL,
  `self` varchar(100) NOT NULL,
  `status` varchar(100) NOT NULL,
  `active` int(11) NOT NULL,
  `date` date NOT NULL,
  `datetime` datetime NOT NULL,
  `user_id` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=21 ;

--
-- Dumping data for table `file_entry`
--

INSERT INTO `file_entry` (`id`, `barcode`, `d_id`, `t_id`, `v_id`, `mamla_no`, `mad`, `patwari_hno`, `year`, `rack`, `self`, `status`, `active`, `date`, `datetime`, `user_id`) VALUES
(8, '1003', 1, 0, 1, '345', '435', '', '3453', '345', '345', '1', 0, '0000-00-00', '0000-00-00 00:00:00', 1),
(9, '1004', 2, 0, 1, '456456', '546', '4564', '456', '45645', '456', '456456', 0, '0000-00-00', '0000-00-00 00:00:00', 1),
(10, '1005', 1, 0, 2, 'dk', '768768', '', '678', '67678', '678', '67', 0, '0000-00-00', '0000-00-00 00:00:00', 1),
(11, '1006', 1, 0, 2, 'hh', '567', '', '57567', '567', '567', '567', 0, '0000-00-00', '0000-00-00 00:00:00', 1),
(12, '1007', 1, 0, 1, '1225', 'aka', '', '2012', '01', '12', 'ok', 0, '0000-00-00', '0000-00-00 00:00:00', 1),
(13, '1008', 1, 0, 1, '65756', '567', '', '567567567', '56756', '56756', '1', 0, '0000-00-00', '0000-00-00 00:00:00', 1),
(14, '1009', 1, 0, 2, '546', '7567', '', '657', '5675567', '5675', '56', 0, '0000-00-00', '0000-00-00 00:00:00', 1),
(15, '1010', 1, 0, 2, '22', '2', '', '2', '2', '2', '2', 0, '0000-00-00', '0000-00-00 00:00:00', 1),
(16, '1011', 1, 0, 2, '44', '4354', '', '4', '4564', '4', '4', 0, '0000-00-00', '0000-00-00 00:00:00', 1),
(17, '1012', 1, 0, 1, '456456', '45645', '', ' 456', '456456', '4564', '456', 0, '0000-00-00', '0000-00-00 00:00:00', 1),
(18, '1013', 1, 0, 2, '23423', '4234', '', '23423', '2342', '2342', '3234', 0, '0000-00-00', '0000-00-00 00:00:00', 1),
(19, '1014', 1, 0, 2, '4564', '45', '', '4', '45645', '45', '', 0, '0000-00-00', '0000-00-00 00:00:00', 1),
(20, '1015', 1, 0, 1, '567', '756', '', '567', '567567', '567567', '567', 0, '0000-00-00', '0000-00-00 00:00:00', 1);

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

--
-- Table structure for table `file_process`
--

CREATE TABLE IF NOT EXISTS `file_process` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `process_type` varchar(100) NOT NULL,
  `f_id` int(11) NOT NULL,
  `d_id` int(11) NOT NULL,
  `collected_by` varchar(100) NOT NULL,
  `demand_note` varchar(100) NOT NULL,
  `date` date NOT NULL,
  `remark` int(11) NOT NULL,
  `active` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `add_date` date NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `migration`
--

CREATE TABLE IF NOT EXISTS `migration` (
  `version` varchar(180) NOT NULL,
  `apply_time` int(11) DEFAULT NULL,
  PRIMARY KEY (`version`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `migration`
--

INSERT INTO `migration` (`version`, `apply_time`) VALUES
('m000000_000000_base', 1452596132),
('m130524_201442_init', 1452596136);

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

--
-- Table structure for table `tahsile_master`
--

CREATE TABLE IF NOT EXISTS `tahsile_master` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `t_name` varchar(50) NOT NULL,
  `status` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;

--
-- Dumping data for table `tahsile_master`
--

INSERT INTO `tahsile_master` (`id`, `t_name`, `status`) VALUES
(22, 'Arang', 1),
(444, 'Raipur', 1);

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

--
-- Table structure for table `village_master`
--

CREATE TABLE IF NOT EXISTS `village_master` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `v_name` varchar(50) NOT NULL,
  `t_id` int(11) NOT NULL,
  `status` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `t_id` (`t_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;

--
-- Dumping data for table `village_master`
--

INSERT INTO `village_master` (`id`, `v_name`, `t_id`, `status`) VALUES
(1, 'Sunder Goan', 444, 1),
(2, 'Aamapara', 22, 1);

--
-- Constraints for dumped tables
--

--
-- Constraints for table `village_master`
--
ALTER TABLE `village_master`
  ADD CONSTRAINT `teh_id` FOREIGN KEY (`t_id`) REFERENCES `tahsile_master` (`id`) ON UPDATE CASCADE;

