/*
SQLyog Community v8.61 
MySQL - 5.7.17 : Database - FIAS
*********************************************************************
*/


/*!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*/`FIAS` /*!40100 DEFAULT CHARACTER SET utf8 */;

USE `FIAS`;

/*Table structure for table `ADDROBJ` */

DROP TABLE IF EXISTS `ADDROBJ`;

CREATE TABLE `ADDROBJ` (
  `AOGUID` char(36) DEFAULT NULL,
  `ENDDATE` date DEFAULT NULL,
  `PARENTGUID` char(36) DEFAULT NULL,
  `FORMALNAME` varchar(512) DEFAULT NULL,
  `REGIONCODE` varchar(512) DEFAULT NULL,
  `NEXTID` varchar(512) DEFAULT NULL,
  `TERRIFNSFL` varchar(512) DEFAULT NULL,
  `OPERSTATUS` mediumtext,
  `CTARCODE` varchar(512) DEFAULT NULL,
  `STREETCODE` varchar(512) DEFAULT NULL,
  `STARTDATE` date DEFAULT NULL,
  `PLACECODE` varchar(512) DEFAULT NULL,
  `NORMDOC` varchar(512) DEFAULT NULL,
  `OFFNAME` varchar(512) DEFAULT NULL,
  `AOLEVEL` mediumtext,
  `SHORTNAME` varchar(512) DEFAULT NULL,
  `IFNSUL` varchar(512) DEFAULT NULL,
  `AUTOCODE` varchar(512) DEFAULT NULL,
  `OKATO` varchar(512) DEFAULT NULL,
  `CITYCODE` varchar(512) DEFAULT NULL,
  `TERRIFNSUL` varchar(512) DEFAULT NULL,
  `AREACODE` varchar(512) DEFAULT NULL,
  `UPDATEDATE` date DEFAULT NULL,
  `CADNUM` varchar(512) DEFAULT NULL,
  `PLAINCODE` varchar(512) DEFAULT NULL,
  `EXTRCODE` varchar(512) DEFAULT NULL,
  `SEXTCODE` varchar(512) DEFAULT NULL,
  `IFNSFL` varchar(512) DEFAULT NULL,
  `OKTMO` varchar(512) DEFAULT NULL,
  `POSTALCODE` varchar(512) DEFAULT NULL,
  `LIVESTATUS` mediumtext,
  `CODE` varchar(512) DEFAULT NULL,
  `ACTSTATUS` mediumtext,
  `DIVTYPE` mediumtext,
  `PREVID` varchar(512) DEFAULT NULL,
  `PLANCODE` varchar(512) DEFAULT NULL,
  `CURRSTATUS` mediumtext,
  `CENTSTATUS` mediumtext,
  `AOID` char(36) DEFAULT NULL,
  KEY `ADDROBJ_AOGUID_index` (`AOGUID`),
  KEY `ADDROBJ_PARENTGUID_index` (`PARENTGUID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Table structure for table `DEL_ADDROBJ` */

DROP TABLE IF EXISTS `DEL_ADDROBJ`;

CREATE TABLE `DEL_ADDROBJ` (
  `AOGUID` varchar(512) DEFAULT NULL,
  `ENDDATE` date DEFAULT NULL,
  `PARENTGUID` varchar(512) DEFAULT NULL,
  `FORMALNAME` varchar(512) DEFAULT NULL,
  `REGIONCODE` varchar(512) DEFAULT NULL,
  `NEXTID` varchar(512) DEFAULT NULL,
  `TERRIFNSFL` varchar(512) DEFAULT NULL,
  `OPERSTATUS` mediumtext,
  `CTARCODE` varchar(512) DEFAULT NULL,
  `STREETCODE` varchar(512) DEFAULT NULL,
  `STARTDATE` date DEFAULT NULL,
  `PLACECODE` varchar(512) DEFAULT NULL,
  `NORMDOC` varchar(512) DEFAULT NULL,
  `OFFNAME` varchar(512) DEFAULT NULL,
  `AOLEVEL` mediumtext,
  `SHORTNAME` varchar(512) DEFAULT NULL,
  `IFNSUL` varchar(512) DEFAULT NULL,
  `AUTOCODE` varchar(512) DEFAULT NULL,
  `OKATO` varchar(512) DEFAULT NULL,
  `CITYCODE` varchar(512) DEFAULT NULL,
  `TERRIFNSUL` varchar(512) DEFAULT NULL,
  `AREACODE` varchar(512) DEFAULT NULL,
  `UPDATEDATE` date DEFAULT NULL,
  `PLAINCODE` varchar(512) DEFAULT NULL,
  `EXTRCODE` varchar(512) DEFAULT NULL,
  `SEXTCODE` varchar(512) DEFAULT NULL,
  `IFNSFL` varchar(512) DEFAULT NULL,
  `OKTMO` varchar(512) DEFAULT NULL,
  `POSTALCODE` varchar(512) DEFAULT NULL,
  `LIVESTATUS` mediumtext,
  `CODE` varchar(512) DEFAULT NULL,
  `ACTSTATUS` mediumtext,
  `PREVID` varchar(512) DEFAULT NULL,
  `PLANCODE` varchar(512) DEFAULT NULL,
  `CURRSTATUS` mediumtext,
  `CENTSTATUS` mediumtext,
  `AOID` varchar(512) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Table structure for table `DEL_HOUSE` */

DROP TABLE IF EXISTS `DEL_HOUSE`;

CREATE TABLE `DEL_HOUSE` (
  `TERRIFNSUL` varchar(512) DEFAULT NULL,
  `BUILDNUM` varchar(512) DEFAULT NULL,
  `AOGUID` varchar(512) DEFAULT NULL,
  `ENDDATE` date DEFAULT NULL,
  `UPDATEDATE` date DEFAULT NULL,
  `CADNUM` varchar(512) DEFAULT NULL,
  `IFNSFL` varchar(512) DEFAULT NULL,
  `TERRIFNSFL` varchar(512) DEFAULT NULL,
  `OKTMO` varchar(512) DEFAULT NULL,
  `POSTALCODE` varchar(512) DEFAULT NULL,
  `STARTDATE` date DEFAULT NULL,
  `HOUSEGUID` varchar(512) DEFAULT NULL,
  `COUNTER` mediumtext,
  `HOUSEID` varchar(512) DEFAULT NULL,
  `HOUSENUM` varchar(512) DEFAULT NULL,
  `STATSTATUS` mediumtext,
  `NORMDOC` varchar(512) DEFAULT NULL,
  `ESTSTATUS` mediumtext,
  `STRUCNUM` varchar(512) DEFAULT NULL,
  `DIVTYPE` mediumtext,
  `IFNSUL` varchar(512) DEFAULT NULL,
  `OKATO` varchar(512) DEFAULT NULL,
  `STRSTATUS` mediumtext
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Table structure for table `DEL_HOUSEINT` */

DROP TABLE IF EXISTS `DEL_HOUSEINT`;

CREATE TABLE `DEL_HOUSEINT` (
  `INTSTATUS` mediumtext,
  `TERRIFNSUL` varchar(512) DEFAULT NULL,
  `INTEND` mediumtext,
  `AOGUID` varchar(512) DEFAULT NULL,
  `ENDDATE` date DEFAULT NULL,
  `UPDATEDATE` date DEFAULT NULL,
  `IFNSFL` varchar(512) DEFAULT NULL,
  `TERRIFNSFL` varchar(512) DEFAULT NULL,
  `OKTMO` varchar(512) DEFAULT NULL,
  `POSTALCODE` varchar(512) DEFAULT NULL,
  `STARTDATE` date DEFAULT NULL,
  `COUNTER` mediumtext,
  `NORMDOC` varchar(512) DEFAULT NULL,
  `INTSTART` mediumtext,
  `IFNSUL` varchar(512) DEFAULT NULL,
  `HOUSEINTID` varchar(512) DEFAULT NULL,
  `INTGUID` varchar(512) DEFAULT NULL,
  `OKATO` varchar(512) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Table structure for table `DEL_LANDMARK` */

DROP TABLE IF EXISTS `DEL_LANDMARK`;

CREATE TABLE `DEL_LANDMARK` (
  `TERRIFNSUL` varchar(512) DEFAULT NULL,
  `AOGUID` varchar(512) DEFAULT NULL,
  `ENDDATE` date DEFAULT NULL,
  `UPDATEDATE` date DEFAULT NULL,
  `IFNSFL` varchar(512) DEFAULT NULL,
  `TERRIFNSFL` varchar(512) DEFAULT NULL,
  `OKTMO` varchar(512) DEFAULT NULL,
  `POSTALCODE` varchar(512) DEFAULT NULL,
  `STARTDATE` date DEFAULT NULL,
  `NORMDOC` varchar(512) DEFAULT NULL,
  `LOCATION` varchar(512) DEFAULT NULL,
  `LANDGUID` varchar(512) DEFAULT NULL,
  `IFNSUL` varchar(512) DEFAULT NULL,
  `LANDID` varchar(512) DEFAULT NULL,
  `OKATO` varchar(512) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Table structure for table `DEL_NORMDOC` */

DROP TABLE IF EXISTS `DEL_NORMDOC`;

CREATE TABLE `DEL_NORMDOC` (
  `DOCIMGID` mediumtext,
  `DOCNAME` varchar(512) DEFAULT NULL,
  `DOCNUM` varchar(512) DEFAULT NULL,
  `NORMDOCID` varchar(512) DEFAULT NULL,
  `DOCTYPE` mediumtext,
  `DOCDATE` date DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Table structure for table `HOUSE` */

DROP TABLE IF EXISTS `HOUSE`;

CREATE TABLE `HOUSE` (
  `TERRIFNSUL` varchar(512) DEFAULT NULL,
  `BUILDNUM` varchar(512) DEFAULT NULL,
  `AOGUID` varchar(512) DEFAULT NULL,
  `ENDDATE` date DEFAULT NULL,
  `UPDATEDATE` date DEFAULT NULL,
  `CADNUM` varchar(512) DEFAULT NULL,
  `REGIONCODE` varchar(512) DEFAULT NULL,
  `IFNSFL` varchar(512) DEFAULT NULL,
  `TERRIFNSFL` varchar(512) DEFAULT NULL,
  `OKTMO` varchar(512) DEFAULT NULL,
  `POSTALCODE` varchar(512) DEFAULT NULL,
  `STARTDATE` date DEFAULT NULL,
  `HOUSEGUID` varchar(512) DEFAULT NULL,
  `COUNTER` mediumtext,
  `HOUSEID` varchar(512) DEFAULT NULL,
  `HOUSENUM` varchar(512) DEFAULT NULL,
  `STATSTATUS` mediumtext,
  `NORMDOC` varchar(512) DEFAULT NULL,
  `ESTSTATUS` mediumtext,
  `STRUCNUM` varchar(512) DEFAULT NULL,
  `DIVTYPE` mediumtext,
  `IFNSUL` varchar(512) DEFAULT NULL,
  `OKATO` varchar(512) DEFAULT NULL,
  `STRSTATUS` mediumtext
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Table structure for table `HOUSEINT` */

DROP TABLE IF EXISTS `HOUSEINT`;

CREATE TABLE `HOUSEINT` (
  `INTSTATUS` mediumtext,
  `TERRIFNSUL` varchar(512) DEFAULT NULL,
  `INTEND` mediumtext,
  `AOGUID` varchar(512) DEFAULT NULL,
  `ENDDATE` date DEFAULT NULL,
  `UPDATEDATE` date DEFAULT NULL,
  `IFNSFL` varchar(512) DEFAULT NULL,
  `TERRIFNSFL` varchar(512) DEFAULT NULL,
  `OKTMO` varchar(512) DEFAULT NULL,
  `POSTALCODE` varchar(512) DEFAULT NULL,
  `STARTDATE` date DEFAULT NULL,
  `COUNTER` mediumtext,
  `NORMDOC` varchar(512) DEFAULT NULL,
  `INTSTART` mediumtext,
  `IFNSUL` varchar(512) DEFAULT NULL,
  `HOUSEINTID` varchar(512) DEFAULT NULL,
  `INTGUID` varchar(512) DEFAULT NULL,
  `OKATO` varchar(512) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Table structure for table `LANDMARK` */

DROP TABLE IF EXISTS `LANDMARK`;

CREATE TABLE `LANDMARK` (
  `TERRIFNSUL` varchar(512) DEFAULT NULL,
  `AOGUID` varchar(512) DEFAULT NULL,
  `ENDDATE` date DEFAULT NULL,
  `UPDATEDATE` date DEFAULT NULL,
  `CADNUM` varchar(512) DEFAULT NULL,
  `REGIONCODE` varchar(512) DEFAULT NULL,
  `IFNSFL` varchar(512) DEFAULT NULL,
  `TERRIFNSFL` varchar(512) DEFAULT NULL,
  `OKTMO` varchar(512) DEFAULT NULL,
  `POSTALCODE` varchar(512) DEFAULT NULL,
  `STARTDATE` date DEFAULT NULL,
  `NORMDOC` varchar(512) DEFAULT NULL,
  `LOCATION` varchar(512) DEFAULT NULL,
  `LANDGUID` varchar(512) DEFAULT NULL,
  `IFNSUL` varchar(512) DEFAULT NULL,
  `LANDID` varchar(512) DEFAULT NULL,
  `OKATO` varchar(512) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Table structure for table `NORMDOC` */

DROP TABLE IF EXISTS `NORMDOC`;

CREATE TABLE `NORMDOC` (
  `DOCIMGID` mediumtext,
  `DOCNAME` varchar(1024) DEFAULT NULL,
  `DOCNUM` varchar(1024) DEFAULT NULL,
  `NORMDOCID` varchar(1024) DEFAULT NULL,
  `DOCTYPE` mediumtext,
  `DOCDATE` date DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Table structure for table `ROOM` */

DROP TABLE IF EXISTS `ROOM`;

CREATE TABLE `ROOM` (
  `ROOMID` varchar(512) DEFAULT NULL,
  `ENDDATE` date DEFAULT NULL,
  `ROOMGUID` varchar(512) DEFAULT NULL,
  `ROOMCADNUM` varchar(512) DEFAULT NULL,
  `UPDATEDATE` date DEFAULT NULL,
  `CADNUM` varchar(512) DEFAULT NULL,
  `FLATNUMBER` varchar(512) DEFAULT NULL,
  `REGIONCODE` varchar(512) DEFAULT NULL,
  `NEXTID` varchar(512) DEFAULT NULL,
  `OPERSTATUS` mediumtext,
  `POSTALCODE` varchar(512) DEFAULT NULL,
  `STARTDATE` date DEFAULT NULL,
  `LIVESTATUS` mediumtext,
  `HOUSEGUID` varchar(512) DEFAULT NULL,
  `NORMDOC` varchar(512) DEFAULT NULL,
  `FLATTYPE` mediumtext,
  `ROOMTYPE` mediumtext,
  `PREVID` varchar(512) DEFAULT NULL,
  `ROOMNUMBER` varchar(512) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Table structure for table `STEAD` */

DROP TABLE IF EXISTS `STEAD`;

CREATE TABLE `STEAD` (
  `TERRIFNSUL` varchar(512) DEFAULT NULL,
  `ENDDATE` date DEFAULT NULL,
  `PARENTGUID` varchar(512) DEFAULT NULL,
  `UPDATEDATE` date DEFAULT NULL,
  `CADNUM` varchar(512) DEFAULT NULL,
  `STEADID` varchar(512) DEFAULT NULL,
  `REGIONCODE` varchar(512) DEFAULT NULL,
  `NEXTID` varchar(512) DEFAULT NULL,
  `IFNSFL` varchar(512) DEFAULT NULL,
  `TERRIFNSFL` varchar(512) DEFAULT NULL,
  `OKTMO` varchar(512) DEFAULT NULL,
  `OPERSTATUS` mediumtext,
  `POSTALCODE` varchar(512) DEFAULT NULL,
  `STARTDATE` date DEFAULT NULL,
  `LIVESTATUS` mediumtext,
  `STEADGUID` varchar(512) DEFAULT NULL,
  `NUMBER` varchar(512) DEFAULT NULL,
  `NORMDOC` varchar(512) DEFAULT NULL,
  `DIVTYPE` mediumtext,
  `PREVID` varchar(512) DEFAULT NULL,
  `IFNSUL` varchar(512) DEFAULT NULL,
  `OKATO` varchar(512) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Table structure for table `Z_ACTSTAT` */

DROP TABLE IF EXISTS `Z_ACTSTAT`;

CREATE TABLE `Z_ACTSTAT` (
  `NAME` varchar(512) DEFAULT NULL,
  `ACTSTATID` mediumtext
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Table structure for table `Z_CENTERST` */

DROP TABLE IF EXISTS `Z_CENTERST`;

CREATE TABLE `Z_CENTERST` (
  `CENTERSTID` mediumtext,
  `NAME` varchar(512) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Table structure for table `Z_CURENTST` */

DROP TABLE IF EXISTS `Z_CURENTST`;

CREATE TABLE `Z_CURENTST` (
  `CURENTSTID` mediumtext,
  `NAME` varchar(512) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Table structure for table `Z_ESTSTAT` */

DROP TABLE IF EXISTS `Z_ESTSTAT`;

CREATE TABLE `Z_ESTSTAT` (
  `ESTSTATID` mediumtext,
  `NAME` varchar(512) DEFAULT NULL,
  `SHORTNAME` varchar(512) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Table structure for table `Z_HSTSTAT` */

DROP TABLE IF EXISTS `Z_HSTSTAT`;

CREATE TABLE `Z_HSTSTAT` (
  `NAME` varchar(512) DEFAULT NULL,
  `HOUSESTID` mediumtext
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Table structure for table `Z_INTVSTAT` */

DROP TABLE IF EXISTS `Z_INTVSTAT`;

CREATE TABLE `Z_INTVSTAT` (
  `NAME` varchar(512) DEFAULT NULL,
  `INTVSTATID` mediumtext
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Table structure for table `Z_NDOCTYPE` */

DROP TABLE IF EXISTS `Z_NDOCTYPE`;

CREATE TABLE `Z_NDOCTYPE` (
  `NAME` varchar(512) DEFAULT NULL,
  `NDTYPEID` mediumtext
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Table structure for table `Z_OPERSTAT` */

DROP TABLE IF EXISTS `Z_OPERSTAT`;

CREATE TABLE `Z_OPERSTAT` (
  `NAME` varchar(512) DEFAULT NULL,
  `OPERSTATID` mediumtext
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Table structure for table `Z_SOCRBASE` */

DROP TABLE IF EXISTS `Z_SOCRBASE`;

CREATE TABLE `Z_SOCRBASE` (
  `LEVEL` mediumtext,
  `SCNAME` varchar(512) DEFAULT NULL,
  `SOCRNAME` varchar(512) DEFAULT NULL,
  `KOD_T_ST` varchar(512) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Table structure for table `Z_STRSTAT` */

DROP TABLE IF EXISTS `Z_STRSTAT`;

CREATE TABLE `Z_STRSTAT` (
  `STRSTATID` mediumtext,
  `NAME` varchar(512) DEFAULT NULL,
  `SHORTNAME` varchar(512) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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