/*
SQLyog Trial v12.2.1 (32 bit)
MySQL - 5.5.25 : Database - failure
*********************************************************************
*/


/*!40101 SET NAMES utf8 */;

/*!40101 SET SQL_MODE=''*/;

/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
CREATE DATABASE /*!32312 IF NOT EXISTS*/`failure` /*!40100 DEFAULT CHARACTER SET utf8 */;

USE `failure`;

/*Table structure for table `fail` */

DROP TABLE IF EXISTS `fail`;

CREATE TABLE `fail` (
  `fail_id` int(6) NOT NULL AUTO_INCREMENT,
  `customer_type` varchar(20) NOT NULL,
  `shot_name` varchar(70) NOT NULL,
  `pin_bin` int(25) DEFAULT NULL,
  `opening_date` date NOT NULL,
  `failure_date` date NOT NULL,
  `full_name` varchar(50) NOT NULL,
  `registration_address` text NOT NULL,
  `location_address` text NOT NULL,
  `inn` int(20) DEFAULT '0',
  `okcm_kod` varchar(50) NOT NULL,
  `citizenship_kod` varchar(50) NOT NULL,
  `setofdocuments` text NOT NULL,
  `dul_doc` varchar(200) NOT NULL,
  `dateofbirth` date NOT NULL,
  `placeofbirth` text NOT NULL,
  `series_dul` int(20) NOT NULL,
  `number_dul` int(20) NOT NULL,
  `data_dul` date NOT NULL,
  `issuedby_dul` text NOT NULL,
  `dup_doc` varchar(200) DEFAULT NULL,
  `series_dup` int(20) DEFAULT NULL,
  `number_dup` int(20) DEFAULT NULL,
  `date_dup` date DEFAULT NULL,
  `issuedby_dup` text,
  `start_dup` date DEFAULT NULL,
  `finish_dup` date DEFAULT NULL,
  `number_card` int(50) DEFAULT NULL,
  `start_card` date DEFAULT NULL,
  `finish_card` date DEFAULT NULL,
  `grounds_fail` int(11) NOT NULL,
  `underthebase` text,
  `fail_criterion` int(11) NOT NULL,
  `additional_criteria` text,
  PRIMARY KEY (`fail_id`),
  UNIQUE KEY `shot_name` (`shot_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Data for the table `fail` */

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
