IP : 3.128.200.90Hostname : host45.registrar-servers.comKernel : Linux host45.registrar-servers.com 4.18.0-513.18.1.lve.2.el8.x86_64 #1 SMP Sat Mar 30 15:36:11 UTC 2024 x86_64Disable Function : None :) OS : Linux
PATH:
/
home/
jackpotjunglegam/
../
../
var/
softaculous/
./
yui/
../
mw19/
../
pluxml/
../
helpdezk/
helpdezk.sql/
/
-- MySQL dump 10.13 Distrib 5.6.46, for Linux (x86_64) -- -- Host: localhost Database: helpdezk1110 -- ------------------------------------------------------ -- Server version 5.6.46
/*!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 utf8 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!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 */;
-- -- Table structure for table `bbd_tbmessage` --
DROP TABLE IF EXISTS `bbd_tbmessage`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `bbd_tbmessage` ( `idmessage` int(11) NOT NULL AUTO_INCREMENT, `idtopic` int(11) NOT NULL, `idperson` int(11) NOT NULL, `title` varchar(100) DEFAULT NULL, `description` text, `dtcreate` datetime DEFAULT NULL, `dtstart` datetime DEFAULT NULL, `dtend` datetime DEFAULT NULL, `sendemail` varchar(1) NOT NULL, `showin` varchar(1) NOT NULL, `emailsent` int(1) DEFAULT '0', PRIMARY KEY (`idmessage`), KEY `fk_bbd_tbmessage_bbd_topic1` (`idtopic`), KEY `fk_bbd_tbmessage_tbperson1` (`idperson`), CONSTRAINT `fk_bbd_tbmessage_bbd_topic1` FOREIGN KEY (`idtopic`) REFERENCES `bbd_topic` (`idtopic`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_bbd_tbmessage_tbperson1` FOREIGN KEY (`idperson`) REFERENCES `tbperson` (`idperson`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `bbd_tbmessage` --
LOCK TABLES `bbd_tbmessage` WRITE; /*!40000 ALTER TABLE `bbd_tbmessage` DISABLE KEYS */; INSERT INTO `bbd_tbmessage` VALUES (1,1,1,'Email sending issue .','The email service (SMTP) has problems when sending emails. But receiving emails (POP / IMAP) is working normally.Our infrastructure team is working to resolve the issue as quickly as possible.','2016-02-25 19:48:56','2019-12-26 19:48:00','2046-10-12 01:00:00','N','3',0); /*!40000 ALTER TABLE `bbd_tbmessage` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `bbd_tbread` --
DROP TABLE IF EXISTS `bbd_tbread`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `bbd_tbread` ( `idread` int(11) NOT NULL AUTO_INCREMENT, `dtread` datetime NOT NULL, `idperson` int(11) NOT NULL, `idmessage` int(11) NOT NULL, PRIMARY KEY (`idread`), KEY `fk_bbd_tbread_tbperson1` (`idperson`), CONSTRAINT `fk_bbd_tbread_tbperson1` FOREIGN KEY (`idperson`) REFERENCES `tbperson` (`idperson`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `bbd_tbread` --
LOCK TABLES `bbd_tbread` WRITE; /*!40000 ALTER TABLE `bbd_tbread` DISABLE KEYS */; /*!40000 ALTER TABLE `bbd_tbread` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `bbd_topic` --
DROP TABLE IF EXISTS `bbd_topic`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `bbd_topic` ( `idtopic` int(11) NOT NULL AUTO_INCREMENT, `title` varchar(100) NOT NULL, `default_display` varchar(10) DEFAULT NULL, `fl_emailsent` varchar(1) DEFAULT 'N', PRIMARY KEY (`idtopic`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `bbd_topic` --
LOCK TABLES `bbd_topic` WRITE; /*!40000 ALTER TABLE `bbd_topic` DISABLE KEYS */; INSERT INTO `bbd_topic` VALUES (1,'Servers','','N'); /*!40000 ALTER TABLE `bbd_topic` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `bbd_topic_company` --
DROP TABLE IF EXISTS `bbd_topic_company`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `bbd_topic_company` ( `idtopiccompany` int(11) NOT NULL AUTO_INCREMENT, `idtopic` int(11) NOT NULL, `idcompany` int(11) NOT NULL, PRIMARY KEY (`idtopiccompany`), KEY `idtopic` (`idtopic`), KEY `idcompany` (`idcompany`), CONSTRAINT `bbd_topic_company_ibfk_1` FOREIGN KEY (`idtopic`) REFERENCES `bbd_topic` (`idtopic`), CONSTRAINT `bbd_topic_company_ibfk_2` FOREIGN KEY (`idcompany`) REFERENCES `tbperson` (`idperson`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `bbd_topic_company` --
LOCK TABLES `bbd_topic_company` WRITE; /*!40000 ALTER TABLE `bbd_topic_company` DISABLE KEYS */; /*!40000 ALTER TABLE `bbd_topic_company` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `bbd_topic_group` --
DROP TABLE IF EXISTS `bbd_topic_group`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `bbd_topic_group` ( `idtopicgroup` int(11) NOT NULL AUTO_INCREMENT, `idtopic` int(11) NOT NULL, `idgroup` int(11) NOT NULL, PRIMARY KEY (`idtopicgroup`), KEY `idtopic` (`idtopic`), KEY `idgroup` (`idgroup`), CONSTRAINT `bbd_topic_group_ibfk_1` FOREIGN KEY (`idtopic`) REFERENCES `bbd_topic` (`idtopic`), CONSTRAINT `bbd_topic_group_ibfk_2` FOREIGN KEY (`idgroup`) REFERENCES `hdk_tbgroup` (`idgroup`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `bbd_topic_group` --
LOCK TABLES `bbd_topic_group` WRITE; /*!40000 ALTER TABLE `bbd_topic_group` DISABLE KEYS */; /*!40000 ALTER TABLE `bbd_topic_group` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `bbd_topiccustomer` --
DROP TABLE IF EXISTS `bbd_topiccustomer`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `bbd_topiccustomer` ( `idtopiccustomer` int(11) NOT NULL, `idperson` int(11) NOT NULL, `idtopic` int(11) NOT NULL, PRIMARY KEY (`idtopiccustomer`), KEY `fk_bbd_topiccustomer_tbperson1` (`idperson`), KEY `fk_bbd_topiccustomer_bbd_topic1` (`idtopic`), CONSTRAINT `fk_bbd_topiccustomer_bbd_topic1` FOREIGN KEY (`idtopic`) REFERENCES `bbd_topic` (`idtopic`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_bbd_topiccustomer_tbperson1` FOREIGN KEY (`idperson`) REFERENCES `tbperson` (`idperson`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `bbd_topiccustomer` --
LOCK TABLES `bbd_topiccustomer` WRITE; /*!40000 ALTER TABLE `bbd_topiccustomer` DISABLE KEYS */; /*!40000 ALTER TABLE `bbd_topiccustomer` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `dsh_tbcategory` --
DROP TABLE IF EXISTS `dsh_tbcategory`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `dsh_tbcategory` ( `idcategory` int(11) NOT NULL AUTO_INCREMENT, `title` varchar(100) DEFAULT NULL, `index` int(11) DEFAULT NULL, `status` char(1) DEFAULT 'A', PRIMARY KEY (`idcategory`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `dsh_tbcategory` --
LOCK TABLES `dsh_tbcategory` WRITE; /*!40000 ALTER TABLE `dsh_tbcategory` DISABLE KEYS */; INSERT INTO `dsh_tbcategory` VALUES (1,'Helpdezk',0,'A'); /*!40000 ALTER TABLE `dsh_tbcategory` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `dsh_tbcategory_has_widget` --
DROP TABLE IF EXISTS `dsh_tbcategory_has_widget`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `dsh_tbcategory_has_widget` ( `idcategory` int(11) DEFAULT NULL, `idwidget` int(11) DEFAULT NULL, KEY `FK_dsh_tbcategory_has_widget` (`idwidget`), KEY `FK1_dsh_tbcategory_has_widget` (`idcategory`), CONSTRAINT `FK1_dsh_tbcategory_has_widget` FOREIGN KEY (`idcategory`) REFERENCES `dsh_tbcategory` (`idcategory`) ON DELETE CASCADE, CONSTRAINT `FK_dsh_tbcategory_has_widget` FOREIGN KEY (`idwidget`) REFERENCES `dsh_tbwidget` (`idwidget`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `dsh_tbcategory_has_widget` --
LOCK TABLES `dsh_tbcategory_has_widget` WRITE; /*!40000 ALTER TABLE `dsh_tbcategory_has_widget` DISABLE KEYS */; INSERT INTO `dsh_tbcategory_has_widget` VALUES (1,1),(1,3),(1,3); /*!40000 ALTER TABLE `dsh_tbcategory_has_widget` ENABLE KEYS */; UNLOCK TABLES;
LOCK TABLES `dsh_tbwidget` WRITE; /*!40000 ALTER TABLE `dsh_tbwidget` DISABLE KEYS */; INSERT INTO `dsh_tbwidget` VALUES (1,'Hard Users','','','','','2013','6','','','','Most active users','Rogerio Albandes','hdk_harduser','hard user.jpg',0,'A'),(2,'Requests in Stock','','','','','1800000','12','','','','Requests in stock , in the last 30 days','Rogerio Albandes','hdk_requestassets','Estoque de Solicitacoes.jpg',0,'A'),(3,'Service Level Agreement','','','','','','','','','','Service Level Agreement','Rogerio Albandes','hdk_sla','sla.jpg',0,'A'); /*!40000 ALTER TABLE `dsh_tbwidget` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `dsh_tbwidgetusuario` --
DROP TABLE IF EXISTS `dsh_tbwidgetusuario`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `dsh_tbwidgetusuario` ( `idwidgetusuario` int(11) NOT NULL AUTO_INCREMENT, `idusuario` int(10) unsigned NOT NULL, `widgets` blob, PRIMARY KEY (`idwidgetusuario`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `dsh_tbwidgetusuario` --
LOCK TABLES `dsh_tbwidgetusuario` WRITE; /*!40000 ALTER TABLE `dsh_tbwidgetusuario` DISABLE KEYS */; /*!40000 ALTER TABLE `dsh_tbwidgetusuario` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `hdk_base_attachment` --
DROP TABLE IF EXISTS `hdk_base_attachment`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `hdk_base_attachment` ( `idattachment` int(11) NOT NULL AUTO_INCREMENT, `filename` varchar(200) NOT NULL, `idbase` int(11) NOT NULL, `real_filename` varchar(200) NOT NULL, PRIMARY KEY (`idattachment`), KEY `fk_idbase_tbperson` (`idbase`), CONSTRAINT `fk_idbase_tbperson` FOREIGN KEY (`idbase`) REFERENCES `hdk_base_knowledge` (`idbase`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `hdk_base_attachment` --
LOCK TABLES `hdk_base_attachment` WRITE; /*!40000 ALTER TABLE `hdk_base_attachment` DISABLE KEYS */; /*!40000 ALTER TABLE `hdk_base_attachment` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `hdk_base_category` --
DROP TABLE IF EXISTS `hdk_base_category`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `hdk_base_category` ( `idcategory` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(100) NOT NULL, `idcategory_reference` int(11) DEFAULT NULL, PRIMARY KEY (`idcategory`) ) ENGINE=InnoDB AUTO_INCREMENT=113 DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `hdk_base_category` --
LOCK TABLES `hdk_base_category` WRITE; /*!40000 ALTER TABLE `hdk_base_category` DISABLE KEYS */; INSERT INTO `hdk_base_category` VALUES (1,'Definir Categoria',0),(17,'ccc',0),(94,'Siare',0),(95,'CRM - Syonet',0),(96,'WEON',0),(97,'Hardware',0),(98,'Windows',111),(99,'QlikView',0),(100,'Windows XP',98),(101,'Windows Vista',98),(102,'Windows 7',98),(103,'AntiVirus',0),(106,'SENHAS',0),(107,'Internet',0),(110,'PROGRAMAS',0),(111,'“Esta operação foi cancelada devido às re',98),(112,'Senha Desp Adriano',106); /*!40000 ALTER TABLE `hdk_base_category` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `hdk_base_knowledge` --
DROP TABLE IF EXISTS `hdk_base_knowledge`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `hdk_base_knowledge` ( `idbase` int(11) NOT NULL AUTO_INCREMENT, `idcategory` int(11) NOT NULL, `name` varchar(150) NOT NULL, `problem` blob NOT NULL, `solution` blob NOT NULL, `date_register` datetime NOT NULL, `idperson` int(11) NOT NULL, `date_edit` datetime DEFAULT NULL, `idperson_edit` int(11) DEFAULT NULL, `faq` int(1) DEFAULT '0', PRIMARY KEY (`idbase`), KEY `fk_idcategory_hdk_base_category` (`idcategory`), KEY `fk_idperson_edit_tbperson` (`idperson_edit`), KEY `fk_idperson_tbperson` (`idperson`), KEY `idx_1` (`idbase`,`idcategory`,`idperson`,`idperson_edit`,`name`), CONSTRAINT `fk_idcategory_hdk_base_category` FOREIGN KEY (`idcategory`) REFERENCES `hdk_base_category` (`idcategory`) ON DELETE CASCADE, CONSTRAINT `fk_idperson_edit_tbperson` FOREIGN KEY (`idperson_edit`) REFERENCES `tbperson` (`idperson`), CONSTRAINT `fk_idperson_tbperson` FOREIGN KEY (`idperson`) REFERENCES `tbperson` (`idperson`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `hdk_base_knowledge` --
LOCK TABLES `hdk_base_knowledge` WRITE; /*!40000 ALTER TABLE `hdk_base_knowledge` DISABLE KEYS */; /*!40000 ALTER TABLE `hdk_base_knowledge` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `hdk_tbaddinfo` --
DROP TABLE IF EXISTS `hdk_tbaddinfo`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `hdk_tbaddinfo` ( `idaddinfo` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(200) NOT NULL, PRIMARY KEY (`idaddinfo`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `hdk_tbaddinfo` --
LOCK TABLES `hdk_tbaddinfo` WRITE; /*!40000 ALTER TABLE `hdk_tbaddinfo` DISABLE KEYS */; INSERT INTO `hdk_tbaddinfo` VALUES (1,'Erro no Sistema'),(2,'Erro do Usuário'); /*!40000 ALTER TABLE `hdk_tbaddinfo` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `hdk_tbapproval_rule` --
DROP TABLE IF EXISTS `hdk_tbapproval_rule`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `hdk_tbapproval_rule` ( `idapproval` int(10) NOT NULL AUTO_INCREMENT, `iditem` int(3) DEFAULT NULL, `idservice` int(3) DEFAULT NULL, `idperson` int(10) DEFAULT NULL, `order` int(10) DEFAULT '1', `fl_recalculate` int(1) DEFAULT '0', PRIMARY KEY (`idapproval`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `hdk_tbapproval_rule` --
LOCK TABLES `hdk_tbapproval_rule` WRITE; /*!40000 ALTER TABLE `hdk_tbapproval_rule` DISABLE KEYS */; /*!40000 ALTER TABLE `hdk_tbapproval_rule` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `hdk_tbattendance_way` --
DROP TABLE IF EXISTS `hdk_tbattendance_way`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `hdk_tbattendance_way` ( `idattendanceway` int(4) unsigned NOT NULL AUTO_INCREMENT, `way` varchar(100) NOT NULL, PRIMARY KEY (`idattendanceway`) ) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `hdk_tbattendance_way` --
LOCK TABLES `hdk_tbattendance_way` WRITE; /*!40000 ALTER TABLE `hdk_tbattendance_way` DISABLE KEYS */; INSERT INTO `hdk_tbattendance_way` VALUES (1,'Internal'),(2,'External'),(3,'Remote Controll'); /*!40000 ALTER TABLE `hdk_tbattendance_way` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `hdk_tbconfig_category` --
DROP TABLE IF EXISTS `hdk_tbconfig_category`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `hdk_tbconfig_category` ( `idconfigcategory` int(10) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(250) DEFAULT NULL, `smarty` varchar(250) DEFAULT NULL, `flgsetup` enum('Y','N') NOT NULL DEFAULT 'N', PRIMARY KEY (`idconfigcategory`), KEY `COD_CATEGORIA` (`idconfigcategory`) ) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `hdk_tbconfig_category` --
LOCK TABLES `hdk_tbconfig_category` WRITE; /*!40000 ALTER TABLE `hdk_tbconfig_category` DISABLE KEYS */; INSERT INTO `hdk_tbconfig_category` VALUES (1,'Funcionalidades do Sistema','System_features','Y'),(2,'Permiss�es para Analista','','N'),(3,'Notifica��es de E-mail','','N'),(4,'Usu�rios','','N'),(5,'Geral','','N'),(6,'Patrim�nio','','N'),(7,'Integra��o com SMTP/LDAP/MS Active Directory','','Y'),(8,'Invent�rio','','N'),(9,'Inventario','','N'),(10,'Outros itens','Other_items','Y'),(11,'Email Templates','','N'),(12,'POP Server','','N'),(13,'Integration with LDAP/MS Active Directory','Integration_ldap','N'),(14,'Integration with LDAP/MS Active Directory','Integration_ldap','N'); /*!40000 ALTER TABLE `hdk_tbconfig_category` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `hdk_tbconfig_has_template` --
DROP TABLE IF EXISTS `hdk_tbconfig_has_template`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `hdk_tbconfig_has_template` ( `idconfig` int(4) NOT NULL, `idtemplate` int(4) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `hdk_tbconfig_has_template` --
LOCK TABLES `hdk_tbconfig_has_template` WRITE; /*!40000 ALTER TABLE `hdk_tbconfig_has_template` DISABLE KEYS */; INSERT INTO `hdk_tbconfig_has_template` VALUES (1,1),(2,2),(3,3),(4,4),(13,13),(16,16),(43,43),(86,7),(82,21),(62,8); /*!40000 ALTER TABLE `hdk_tbconfig_has_template` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `hdk_tbconfig_user` --
-- -- Dumping data for table `hdk_tbconfig_user` --
LOCK TABLES `hdk_tbconfig_user` WRITE; /*!40000 ALTER TABLE `hdk_tbconfig_user` DISABLE KEYS */; INSERT INTO `hdk_tbconfig_user` VALUES (260,1,'','','[0,0,0,0,0,0,0,0,0,0,0,0,0,0]','[22,8,85,105,70,115,90,90,80,130,80,80,55,100]','[0,0,0,0,0,0,0,0]','[26,75,100,240,200,100,130,145]'),(261,1061,'','','[0,0,0,0,0,0,0,0,0,0,0,0,0,0]','[22,8,85,105,70,115,90,90,80,130,80,80,55,100]','[0,0,0,0,0,0,0,0]','[26,75,100,240,200,100,130,145]'),(273,1078,'','','[0,0,0,0,0,0,0,0,0,0,0,0,0,0]','[22,8,85,105,70,115,90,90,80,130,80,80,55,100]','[0,0,0,0,0,0,0,0]','[26,75,100,240,200,100,130,145]'); /*!40000 ALTER TABLE `hdk_tbconfig_user` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `hdk_tbcore_area` --
DROP TABLE IF EXISTS `hdk_tbcore_area`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `hdk_tbcore_area` ( `idarea` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(100) NOT NULL, `status` char(1) NOT NULL DEFAULT 'A', `default` int(1) DEFAULT '0', PRIMARY KEY (`idarea`) ) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=latin1 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `hdk_tbcore_area` --
LOCK TABLES `hdk_tbcore_area` WRITE; /*!40000 ALTER TABLE `hdk_tbcore_area` DISABLE KEYS */; INSERT INTO `hdk_tbcore_area` VALUES (10,'IT','A',1),(11,'Internal Communication','A',0); /*!40000 ALTER TABLE `hdk_tbcore_area` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `hdk_tbcore_default` --
DROP TABLE IF EXISTS `hdk_tbcore_default`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `hdk_tbcore_default` ( `idcoredefault` int(11) NOT NULL AUTO_INCREMENT, `table` char(50) NOT NULL DEFAULT '', `default` int(11) DEFAULT '0', PRIMARY KEY (`idcoredefault`), KEY `table` (`table`) ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1 AVG_ROW_LENGTH=2730; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `hdk_tbcore_default` --
LOCK TABLES `hdk_tbcore_default` WRITE; /*!40000 ALTER TABLE `hdk_tbcore_default` DISABLE KEYS */; INSERT INTO `hdk_tbcore_default` VALUES (1,'area',1),(2,'type',14),(3,'item',132),(4,'service',269),(5,'type',6),(6,'type',33); /*!40000 ALTER TABLE `hdk_tbcore_default` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `hdk_tbcore_item` --
DROP TABLE IF EXISTS `hdk_tbcore_item`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `hdk_tbcore_item` ( `iditem` int(11) NOT NULL AUTO_INCREMENT, `idtype` int(11) NOT NULL, `name` varchar(100) NOT NULL, `status` char(1) NOT NULL DEFAULT 'A', `selected` int(11) NOT NULL DEFAULT '0', `classify` int(11) NOT NULL DEFAULT '1', PRIMARY KEY (`iditem`), KEY `FK_hdk_tbcore_item` (`idtype`), CONSTRAINT `FK_hdk_tbcore_item` FOREIGN KEY (`idtype`) REFERENCES `hdk_tbcore_type` (`idtype`) ) ENGINE=InnoDB AUTO_INCREMENT=68 DEFAULT CHARSET=latin1 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `hdk_tbcore_item` --
LOCK TABLES `hdk_tbcore_item` WRITE; /*!40000 ALTER TABLE `hdk_tbcore_item` DISABLE KEYS */; INSERT INTO `hdk_tbcore_item` VALUES (50,28,'Office Domain','A',0,0),(55,29,'Advertising Poster','A',0,0),(56,29,'Company Signage','A',0,0),(57,32,'Pictures','A',0,0),(58,33,'SCM - Supply Chain Management','A',0,0),(59,33,'CRM - Customer Relationship Management','A',0,0),(60,34,'IoT Dashboard','A',0,0),(61,35,'System Access','A',0,0),(62,36,'Laser printer','A',0,0),(63,37,'There is no Internet Access','A',0,0),(64,37,'DNS Server Problems','A',0,0),(65,37,'Modem & Router Issues','A',0,0),(66,37,'IP Address Exhaustion','A',0,0),(67,37,'Other connectivity issues','A',0,0); /*!40000 ALTER TABLE `hdk_tbcore_item` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `hdk_tbcore_reason` --
DROP TABLE IF EXISTS `hdk_tbcore_reason`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `hdk_tbcore_reason` ( `idreason` int(11) unsigned NOT NULL AUTO_INCREMENT, `idservice` int(11) NOT NULL, `name` varchar(100) NOT NULL, `status` char(1) NOT NULL DEFAULT 'A', PRIMARY KEY (`idreason`), KEY `idservice` (`idservice`), CONSTRAINT `hdk_tbcore_reason_ibfk_1` FOREIGN KEY (`idservice`) REFERENCES `hdk_tbcore_service` (`idservice`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AVG_ROW_LENGTH=16384 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `hdk_tbcore_reason` --
LOCK TABLES `hdk_tbcore_reason` WRITE; /*!40000 ALTER TABLE `hdk_tbcore_reason` DISABLE KEYS */; /*!40000 ALTER TABLE `hdk_tbcore_reason` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `hdk_tbcore_service` --
DROP TABLE IF EXISTS `hdk_tbcore_service`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `hdk_tbcore_service` ( `idservice` int(11) NOT NULL AUTO_INCREMENT, `iditem` int(11) NOT NULL, `idpriority` int(11) NOT NULL, `name` varchar(100) NOT NULL, `status` char(1) NOT NULL DEFAULT 'A', `selected` int(11) NOT NULL DEFAULT '0', `classify` int(11) NOT NULL DEFAULT '1', `time_attendance` int(11) NOT NULL DEFAULT '0', `hours_attendance` int(11) NOT NULL DEFAULT '0', `days_attendance` int(11) NOT NULL DEFAULT '0', `ind_hours_minutes` char(1) NOT NULL DEFAULT 'H', PRIMARY KEY (`idservice`), KEY `FK_hdk_tbcore_service` (`iditem`), CONSTRAINT `FK_hdk_tbcore_service` FOREIGN KEY (`iditem`) REFERENCES `hdk_tbcore_item` (`iditem`) ) ENGINE=InnoDB AUTO_INCREMENT=118 DEFAULT CHARSET=latin1 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `hdk_tbcore_service` --
LOCK TABLES `hdk_tbcore_service` WRITE; /*!40000 ALTER TABLE `hdk_tbcore_service` DISABLE KEYS */; INSERT INTO `hdk_tbcore_service` VALUES (85,50,3,'Add client computers to domain','A',0,0,0,0,1,'H'),(86,50,2,'Add user to domain','A',0,0,0,2,0,'H'),(87,50,3,'Map Drive on Server','A',0,0,0,0,1,'H'),(88,50,1,'Change user password','A',0,0,0,30,0,'M'),(89,55,5,'Create a new','A',0,0,0,0,12,'H'),(90,55,3,'Print Out','A',0,0,0,3,0,'H'),(91,56,3,'Print Out','A',0,0,0,6,0,'H'),(92,57,3,'Take pictures','A',0,0,0,2,0,'H'),(93,57,2,'Print pictures','A',0,0,0,1,0,'H'),(94,57,5,'Store pictures in the cloud','A',0,0,0,0,20,'H'),(95,58,2,'Go live ','A',0,0,0,1,0,'H'),(96,58,2,'Restore ','A',0,0,0,1,0,'H'),(97,59,2,'Go live','A',0,0,0,1,0,'H'),(98,59,2,'Restore','A',0,0,0,1,0,'H'),(99,60,3,'Create widget','A',0,0,0,0,2,'H'),(100,60,3,'Change widget','A',0,0,0,0,1,'H'),(101,60,1,'Delete widget','A',0,0,0,1,0,'H'),(102,61,2,'Change password','A',0,0,0,1,0,'H'),(103,61,2,'Change access profile','A',0,0,0,1,0,'H'),(104,61,2,'Create login','A',0,0,0,1,0,'H'),(105,61,2,'Password unlock ','A',0,0,0,1,0,'H'),(106,61,2,'Error accessing system','A',0,0,0,1,0,'H'),(107,61,2,'Connection failed / Time out','A',0,0,0,1,0,'H'),(108,62,1,'Knead paper','A',0,0,0,1,0,'H'),(109,62,2,'To set up','A',0,0,0,1,0,'H'),(110,62,2,'Uninstall','A',0,0,0,1,0,'H'),(111,62,2,'Poor/smudged/flawed printing','A',0,0,0,1,0,'H'),(112,62,2,'Install','A',0,0,0,1,0,'H'),(113,63,1,'Fix the problem','A',0,0,0,1,0,'H'),(114,64,1,'Fix the problem','A',0,0,0,1,0,'H'),(115,65,1,'Fix the problem','A',0,0,0,30,0,'M'),(116,66,1,'Fix the problem','A',0,0,0,30,0,'M'),(117,67,1,'Fix the problem','A',0,0,0,30,0,'M'); /*!40000 ALTER TABLE `hdk_tbcore_service` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `hdk_tbcore_type` --
DROP TABLE IF EXISTS `hdk_tbcore_type`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `hdk_tbcore_type` ( `idtype` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(100) NOT NULL, `status` char(1) NOT NULL DEFAULT 'A', `selected` char(1) NOT NULL DEFAULT '0', `classify` char(1) NOT NULL DEFAULT '1', `idarea` int(11) NOT NULL, PRIMARY KEY (`idtype`), KEY `FK_hdk_tbcore_type` (`idarea`), CONSTRAINT `FK_hdk_tbcore_type` FOREIGN KEY (`idarea`) REFERENCES `hdk_tbcore_area` (`idarea`) ) ENGINE=InnoDB AUTO_INCREMENT=38 DEFAULT CHARSET=latin1 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `hdk_tbcore_type` --
LOCK TABLES `hdk_tbcore_type` WRITE; /*!40000 ALTER TABLE `hdk_tbcore_type` DISABLE KEYS */; INSERT INTO `hdk_tbcore_type` VALUES (28,'Network','A','0','0',10),(29,'Visual Programming','A','0','0',11),(32,'Photographic Collection','A','0','0',11),(33,'Change','A','0','0',10),(34,'Dashboards','A','0','0',10),(35,'BI - QlikView','A','0','0',10),(36,'Hardware','A','0','0',10),(37,'Internet Access','A','0','0',10); /*!40000 ALTER TABLE `hdk_tbcore_type` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `hdk_tbcostcenter` --
DROP TABLE IF EXISTS `hdk_tbcostcenter`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `hdk_tbcostcenter` ( `idcostcenter` int(11) NOT NULL AUTO_INCREMENT, `idperson` int(11) NOT NULL, `cod_costcenter` int(11) NOT NULL, `name` varchar(100) NOT NULL, `status` char(1) NOT NULL DEFAULT 'A', PRIMARY KEY (`idcostcenter`), KEY `FK_hdk_tbcostcenter` (`idperson`), CONSTRAINT `FK_hdk_tbcostcenter` FOREIGN KEY (`idperson`) REFERENCES `tbperson` (`idperson`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `hdk_tbcostcenter` --
LOCK TABLES `hdk_tbcostcenter` WRITE; /*!40000 ALTER TABLE `hdk_tbcostcenter` DISABLE KEYS */; /*!40000 ALTER TABLE `hdk_tbcostcenter` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `hdk_tbdepartment` --
DROP TABLE IF EXISTS `hdk_tbdepartment`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `hdk_tbdepartment` ( `iddepartment` int(11) NOT NULL AUTO_INCREMENT, `idperson` int(11) NOT NULL, `cod_area` int(11) DEFAULT NULL, `name` varchar(100) NOT NULL, `status` char(1) NOT NULL DEFAULT 'A', PRIMARY KEY (`iddepartment`), KEY `FK_hdk_tbdepartment` (`idperson`) ) ENGINE=InnoDB AUTO_INCREMENT=79 DEFAULT CHARSET=latin1 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `hdk_tbdepartment` --
LOCK TABLES `hdk_tbdepartment` WRITE; /*!40000 ALTER TABLE `hdk_tbdepartment` DISABLE KEYS */; INSERT INTO `hdk_tbdepartment` VALUES (76,1038,0,'Infrastructure','A'),(77,1038,0,'Internal Communication','A'),(78,1038,0,'Advertising and Marketing','A'); /*!40000 ALTER TABLE `hdk_tbdepartment` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `hdk_tbdepartment_has_person` --
DROP TABLE IF EXISTS `hdk_tbdepartment_has_person`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `hdk_tbdepartment_has_person` ( `idperson` int(4) NOT NULL, `iddepartment` int(4) NOT NULL, KEY `FK_tbperson_has_juridical` (`idperson`), KEY `FK_tbdepartmet_has_person` (`iddepartment`), CONSTRAINT `FK_tbdepartmet_has_person` FOREIGN KEY (`iddepartment`) REFERENCES `hdk_tbdepartment` (`iddepartment`), CONSTRAINT `FK_tbperson_has_juridical` FOREIGN KEY (`idperson`) REFERENCES `tbperson` (`idperson`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `hdk_tbdepartment_has_person` --
LOCK TABLES `hdk_tbdepartment_has_person` WRITE; /*!40000 ALTER TABLE `hdk_tbdepartment_has_person` DISABLE KEYS */; INSERT INTO `hdk_tbdepartment_has_person` VALUES (1061,76),(1078,78); /*!40000 ALTER TABLE `hdk_tbdepartment_has_person` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `hdk_tbdownload` --
DROP TABLE IF EXISTS `hdk_tbdownload`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `hdk_tbdownload` ( `iddownload` int(4) NOT NULL AUTO_INCREMENT, `iddownloadcategory` int(4) NOT NULL, `name` varchar(25) NOT NULL, `description` blob NOT NULL, `file_name` varchar(250) NOT NULL, `date` date NOT NULL, `download_file_name` varchar(250) NOT NULL, `file_url` varchar(250) DEFAULT NULL, `version_description` varchar(100) NOT NULL, `restricted` char(1) NOT NULL DEFAULT 'N', `instruction` blob, `status` char(1) NOT NULL DEFAULT 'A', PRIMARY KEY (`iddownload`), KEY `FK_hdk_tbdownload` (`iddownloadcategory`), CONSTRAINT `FK_hdk_tbdownload` FOREIGN KEY (`iddownloadcategory`) REFERENCES `hdk_tbdownload_category` (`iddownloadcategory`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `hdk_tbdownload` --
LOCK TABLES `hdk_tbdownload` WRITE; /*!40000 ALTER TABLE `hdk_tbdownload` DISABLE KEYS */; /*!40000 ALTER TABLE `hdk_tbdownload` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `hdk_tbdownload_category` --
DROP TABLE IF EXISTS `hdk_tbdownload_category`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `hdk_tbdownload_category` ( `iddownloadcategory` int(4) NOT NULL AUTO_INCREMENT, `category` varchar(200) NOT NULL, PRIMARY KEY (`iddownloadcategory`) ) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=latin1 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `hdk_tbdownload_category` --
LOCK TABLES `hdk_tbdownload_category` WRITE; /*!40000 ALTER TABLE `hdk_tbdownload_category` DISABLE KEYS */; INSERT INTO `hdk_tbdownload_category` VALUES (1,'General Files'),(2,'Text Files'),(3,'Image Files'),(4,'Music'),(5,'PDF'),(6,'PHP'),(7,'HTML'),(8,'Overall Instructions'),(9,'Rules'); /*!40000 ALTER TABLE `hdk_tbdownload_category` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `hdk_tbevaluation` --
DROP TABLE IF EXISTS `hdk_tbevaluation`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `hdk_tbevaluation` ( `idevaluation` int(11) NOT NULL AUTO_INCREMENT, `idquestion` int(11) NOT NULL, `name` varchar(50) NOT NULL, `status` char(1) NOT NULL DEFAULT 'A', `icon_name` varchar(25) NOT NULL, `checked` int(1) DEFAULT '0', PRIMARY KEY (`idevaluation`), KEY `FK_hdk_tbevaluation` (`idquestion`), CONSTRAINT `FK_hdk_tbevaluation` FOREIGN KEY (`idquestion`) REFERENCES `hdk_tbevaluationquestion` (`idquestion`) ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `hdk_tbevaluation` --
LOCK TABLES `hdk_tbproperty` WRITE; /*!40000 ALTER TABLE `hdk_tbproperty` DISABLE KEYS */; /*!40000 ALTER TABLE `hdk_tbproperty` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `hdk_tbproperty_category` --
DROP TABLE IF EXISTS `hdk_tbproperty_category`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `hdk_tbproperty_category` ( `idcategory` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(100) NOT NULL, PRIMARY KEY (`idcategory`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `hdk_tbproperty_category` --
LOCK TABLES `hdk_tbproperty_category` WRITE; /*!40000 ALTER TABLE `hdk_tbproperty_category` DISABLE KEYS */; /*!40000 ALTER TABLE `hdk_tbproperty_category` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `hdk_tbproperty_manufacturer` --
DROP TABLE IF EXISTS `hdk_tbproperty_manufacturer`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `hdk_tbproperty_manufacturer` ( `idmanufacturer` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(100) NOT NULL, PRIMARY KEY (`idmanufacturer`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `hdk_tbproperty_manufacturer` --
LOCK TABLES `hdk_tbproperty_manufacturer` WRITE; /*!40000 ALTER TABLE `hdk_tbproperty_manufacturer` DISABLE KEYS */; /*!40000 ALTER TABLE `hdk_tbproperty_manufacturer` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `hdk_tbproperty_provider` --
DROP TABLE IF EXISTS `hdk_tbproperty_provider`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `hdk_tbproperty_provider` ( `idprovider` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(100) NOT NULL, PRIMARY KEY (`idprovider`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `hdk_tbproperty_provider` --
LOCK TABLES `hdk_tbproperty_provider` WRITE; /*!40000 ALTER TABLE `hdk_tbproperty_provider` DISABLE KEYS */; /*!40000 ALTER TABLE `hdk_tbproperty_provider` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `hdk_tbreason` --
DROP TABLE IF EXISTS `hdk_tbreason`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `hdk_tbreason` ( `idreason` int(11) unsigned NOT NULL AUTO_INCREMENT, `idservice` int(11) NOT NULL, `reason` varchar(100) NOT NULL, `status` char(1) NOT NULL DEFAULT 'A', PRIMARY KEY (`idreason`), KEY `FK_hdk_tbreason` (`idservice`), CONSTRAINT `FK_hdk_tbreason` FOREIGN KEY (`idservice`) REFERENCES `hdk_tbcore_service` (`idservice`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `hdk_tbreason` --
LOCK TABLES `hdk_tbreason` WRITE; /*!40000 ALTER TABLE `hdk_tbreason` DISABLE KEYS */; /*!40000 ALTER TABLE `hdk_tbreason` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `hdk_tbrequest` --
DROP TABLE IF EXISTS `hdk_tbrequest`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `hdk_tbrequest` ( `idrequest` int(11) NOT NULL AUTO_INCREMENT, `code_request` varchar(20) NOT NULL, `subject` blob NOT NULL, `description` blob NOT NULL, `idtype` int(11) NOT NULL, `iditem` int(11) NOT NULL, `idservice` int(11) NOT NULL, `idreason` int(11) unsigned DEFAULT NULL, `idpriority` int(11) NOT NULL, `idsource` int(11) NOT NULL, `idperson_creator` int(11) DEFAULT NULL COMMENT 'id da pessoa que abriu a solicitacao em nome de outra, s� � preenchido nesse tipo de situa��o', `entry_date` datetime NOT NULL COMMENT 'data em que foi registrada no sistema', `service_value` float DEFAULT NULL, `os_number` varchar(20) DEFAULT NULL, `label` varchar(20) DEFAULT NULL, `extensions_number` varchar(2) DEFAULT '0' COMMENT 'numero de vezes que foi prorrogada', `idperson_juridical` mediumint(5) DEFAULT NULL COMMENT 'id da empresa do usuario', `serial_number` varchar(20) DEFAULT NULL, `idattendance_way` smallint(6) unsigned DEFAULT NULL COMMENT 'forma de atendimento', `expire_date` datetime DEFAULT NULL, `code_group` mediumint(9) DEFAULT NULL COMMENT 'esta coluna � para dizer para qual grupo que sera designado o atendimento', `code_email` varchar(240) DEFAULT NULL, `idperson_owner` mediumint(9) NOT NULL COMMENT 'esta coluna o id de quem necessita do servi�o, que pode nao ser o mesmo que abriu', `idstatus` tinyint(2) DEFAULT NULL COMMENT 'aqui ficara o id do status atual da solicitacao', `flag_opened` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'essa coluna mostra se o atendente ja viu a solicitacao nova sem assumir', PRIMARY KEY (`idrequest`,`code_request`), UNIQUE KEY `request_code` (`code_request`), UNIQUE KEY `IDX_CODE_EMAIL` (`code_email`), KEY `FK_idtype` (`idtype`), KEY `FK_iditem` (`iditem`), KEY `FK_idservice` (`idservice`), KEY `FK_idreason` (`idreason`), KEY `FK_idpriority` (`idpriority`), KEY `FK_idsource` (`idsource`), KEY `FK_idperson_creator` (`idperson_creator`), KEY `idx_1` (`code_request`,`idperson_owner`,`idstatus`), KEY `idx_2` (`code_request`,`idstatus`), CONSTRAINT `FK_iditem` FOREIGN KEY (`iditem`) REFERENCES `hdk_tbcore_item` (`iditem`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `FK_idperson_creator` FOREIGN KEY (`idperson_creator`) REFERENCES `tbperson` (`idperson`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `FK_idpriority` FOREIGN KEY (`idpriority`) REFERENCES `hdk_tbpriority` (`idpriority`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `FK_idreason` FOREIGN KEY (`idreason`) REFERENCES `hdk_tbcore_reason` (`idreason`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `FK_idservice` FOREIGN KEY (`idservice`) REFERENCES `hdk_tbcore_service` (`idservice`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `FK_idsource` FOREIGN KEY (`idsource`) REFERENCES `hdk_tbsource` (`idsource`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `FK_idtype` FOREIGN KEY (`idtype`) REFERENCES `hdk_tbcore_type` (`idtype`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=63 DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `hdk_tbrequest` --
LOCK TABLES `hdk_tbrequest` WRITE; /*!40000 ALTER TABLE `hdk_tbrequest` DISABLE KEYS */; /*!40000 ALTER TABLE `hdk_tbrequest` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `hdk_tbrequest_addinfo` --
DROP TABLE IF EXISTS `hdk_tbrequest_addinfo`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `hdk_tbrequest_addinfo` ( `idrequest_addinfo` int(11) NOT NULL AUTO_INCREMENT, `idaddinfo` int(11) NOT NULL, `code_request` varchar(20) NOT NULL, PRIMARY KEY (`idrequest_addinfo`), KEY `fk_addinfo_idaddinfo_hdk_tbaddinfo` (`idaddinfo`), KEY `fk_addinfo_code_request_hdk_tbrequest` (`code_request`), CONSTRAINT `fk_addinfo_code_request_hdk_tbrequest` FOREIGN KEY (`code_request`) REFERENCES `hdk_tbrequest` (`code_request`), CONSTRAINT `fk_addinfo_idaddinfo_hdk_tbaddinfo` FOREIGN KEY (`idaddinfo`) REFERENCES `hdk_tbaddinfo` (`idaddinfo`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `hdk_tbrequest_addinfo` --
LOCK TABLES `hdk_tbrequest_addinfo` WRITE; /*!40000 ALTER TABLE `hdk_tbrequest_addinfo` DISABLE KEYS */; /*!40000 ALTER TABLE `hdk_tbrequest_addinfo` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `hdk_tbrequest_approval` --
DROP TABLE IF EXISTS `hdk_tbrequest_approval`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `hdk_tbrequest_approval` ( `request_code` bigint(16) NOT NULL, `idapproval` int(10) DEFAULT NULL, `idnote` int(10) DEFAULT NULL, `idperson` int(10) NOT NULL DEFAULT '0', `order` int(2) NOT NULL DEFAULT '0', `fl_rejected` int(1) NOT NULL DEFAULT '0', `fl_recalculate` int(1) NOT NULL DEFAULT '0', `idrequestapproval` int(4) NOT NULL AUTO_INCREMENT, PRIMARY KEY (`idrequestapproval`), KEY `FK_hdk_tbrequest_approval` (`idapproval`), CONSTRAINT `FK_hdk_tbrequest_approval` FOREIGN KEY (`idapproval`) REFERENCES `hdk_tbapproval_rule` (`idapproval`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `hdk_tbrequest_approval` --
LOCK TABLES `hdk_tbrequest_approval` WRITE; /*!40000 ALTER TABLE `hdk_tbrequest_approval` DISABLE KEYS */; /*!40000 ALTER TABLE `hdk_tbrequest_approval` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `hdk_tbrequest_attachment` --
DROP TABLE IF EXISTS `hdk_tbrequest_attachment`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `hdk_tbrequest_attachment` ( `idrequest_attachment` int(11) NOT NULL AUTO_INCREMENT, `code_request` varchar(20) DEFAULT NULL, `file_name` varchar(200) DEFAULT NULL, PRIMARY KEY (`idrequest_attachment`), KEY `FK_id_request_attachment` (`code_request`), CONSTRAINT `FK_hdk_tbrequest_attachment` FOREIGN KEY (`code_request`) REFERENCES `hdk_tbrequest` (`code_request`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=latin1 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `hdk_tbrequest_attachment` --
LOCK TABLES `hdk_tbrequest_attachment` WRITE; /*!40000 ALTER TABLE `hdk_tbrequest_attachment` DISABLE KEYS */; /*!40000 ALTER TABLE `hdk_tbrequest_attachment` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `hdk_tbrequest_change_expire` --
DROP TABLE IF EXISTS `hdk_tbrequest_change_expire`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `hdk_tbrequest_change_expire` ( `idchangeexpire` int(11) NOT NULL AUTO_INCREMENT, `code_request` varchar(20) NOT NULL, `reason` blob, `idperson` int(11) NOT NULL, `changedate` date NOT NULL, PRIMARY KEY (`idchangeexpire`), KEY `FK_chexpire_code_request` (`code_request`), KEY `FK_chexpire_idperson` (`idperson`), CONSTRAINT `FK_chexpire_code_request` FOREIGN KEY (`code_request`) REFERENCES `hdk_tbrequest` (`code_request`), CONSTRAINT `FK_chexpire_idperson` FOREIGN KEY (`idperson`) REFERENCES `tbperson` (`idperson`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `hdk_tbrequest_change_expire` --
LOCK TABLES `hdk_tbrequest_change_expire` WRITE; /*!40000 ALTER TABLE `hdk_tbrequest_change_expire` DISABLE KEYS */; /*!40000 ALTER TABLE `hdk_tbrequest_change_expire` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `hdk_tbrequest_code` --
DROP TABLE IF EXISTS `hdk_tbrequest_code`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `hdk_tbrequest_code` ( `cod_request` varchar(20) NOT NULL, `cod_month` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `hdk_tbrequest_code` --
LOCK TABLES `hdk_tbrequest_code` WRITE; /*!40000 ALTER TABLE `hdk_tbrequest_code` DISABLE KEYS */; INSERT INTO `hdk_tbrequest_code` VALUES ('7',201208),('109',201209),('72',201210),('27',201211),('4',201301),('2',201405),('265',201406),('412',201407),('367',201408),('360',201409),('358',201410),('315',201411),('269',201412),('326',201501),('326',201502),('352',201503),('157',201504),('20',201602),('3',201905),('4',201906),('2',201907),('2',201908),('12',201909),('9',201911),('62',201912); /*!40000 ALTER TABLE `hdk_tbrequest_code` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `hdk_tbrequest_dates` --
-- -- Dumping data for table `hdk_tbrequest_emailcron` --
LOCK TABLES `hdk_tbrequest_emailcron` WRITE; /*!40000 ALTER TABLE `hdk_tbrequest_emailcron` DISABLE KEYS */; /*!40000 ALTER TABLE `hdk_tbrequest_emailcron` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `hdk_tbrequest_evaluation` --
DROP TABLE IF EXISTS `hdk_tbrequest_evaluation`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `hdk_tbrequest_evaluation` ( `idrequestevaluation` int(11) NOT NULL AUTO_INCREMENT, `idevaluation` int(11) NOT NULL, `code_request` varchar(20) NOT NULL, `date` datetime DEFAULT NULL, PRIMARY KEY (`idrequestevaluation`), KEY `FK_hdk_tbrequest_evaluation` (`idevaluation`), KEY `CODE_REQUEST_IDX` (`code_request`), CONSTRAINT `FK_hdk_tbrequest_evaluation` FOREIGN KEY (`idevaluation`) REFERENCES `hdk_tbevaluation` (`idevaluation`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=3124 DEFAULT CHARSET=utf8 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `hdk_tbrequest_evaluation` --
LOCK TABLES `hdk_tbrequest_evaluation` WRITE; /*!40000 ALTER TABLE `hdk_tbrequest_evaluation` DISABLE KEYS */; INSERT INTO `hdk_tbrequest_evaluation` VALUES (3123,4,'201909000001','2019-09-18 13:31:44'); /*!40000 ALTER TABLE `hdk_tbrequest_evaluation` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `hdk_tbrequest_has_tbproperty` --
DROP TABLE IF EXISTS `hdk_tbrequest_has_tbproperty`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `hdk_tbrequest_has_tbproperty` ( `idrequest` int(11) DEFAULT NULL, `idproperty` int(11) DEFAULT NULL, `label` varchar(20) DEFAULT NULL, `serial_number` varchar(20) DEFAULT NULL, KEY `FK_idrequest_property` (`idrequest`), KEY `FK_idproperty_request` (`idproperty`), CONSTRAINT `FK_idproperty_request` FOREIGN KEY (`idproperty`) REFERENCES `hdk_tbproperty` (`idproperty`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `FK_idrequest_property` FOREIGN KEY (`idrequest`) REFERENCES `hdk_tbrequest` (`idrequest`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `hdk_tbrequest_has_tbproperty` --
LOCK TABLES `hdk_tbrequest_has_tbproperty` WRITE; /*!40000 ALTER TABLE `hdk_tbrequest_has_tbproperty` DISABLE KEYS */; /*!40000 ALTER TABLE `hdk_tbrequest_has_tbproperty` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `hdk_tbrequest_in_charge` --
DROP TABLE IF EXISTS `hdk_tbrequest_in_charge`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `hdk_tbrequest_in_charge` ( `idrequest_in_charge` int(11) NOT NULL AUTO_INCREMENT, `code_request` varchar(20) NOT NULL, `id_in_charge` int(11) NOT NULL, `type` varchar(1) NOT NULL COMMENT 'aqui sera o tipo de respons�vel, analista ou grupo de atendimento, definido por O(operator) ou G(group)', `ind_in_charge` varchar(1) DEFAULT NULL, `ind_repass` varchar(1) NOT NULL DEFAULT 'N', `ind_track` smallint(1) DEFAULT '0' COMMENT 'Aqui vai ficar marcado se o grupo continua vizualizando ap�s algu�m assumir', `ind_operator_aux` smallint(1) DEFAULT '0', PRIMARY KEY (`idrequest_in_charge`), KEY `FK_idrequest` (`code_request`), KEY `FK_id_person_in_charge` (`id_in_charge`), KEY `idx_1` (`code_request`,`id_in_charge`,`ind_in_charge`), KEY `idx_2` (`id_in_charge`,`ind_in_charge`), KEY `idx_3` (`ind_in_charge`) ) ENGINE=InnoDB AUTO_INCREMENT=183 DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `hdk_tbrequest_in_charge` --
LOCK TABLES `hdk_tbrequest_in_charge` WRITE; /*!40000 ALTER TABLE `hdk_tbrequest_in_charge` DISABLE KEYS */; /*!40000 ALTER TABLE `hdk_tbrequest_in_charge` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `hdk_tbrequest_log` --
DROP TABLE IF EXISTS `hdk_tbrequest_log`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `hdk_tbrequest_log` ( `id` int(11) NOT NULL AUTO_INCREMENT, `cod_request` varchar(20) NOT NULL, `date` datetime NOT NULL, `idstatus` mediumint(9) NOT NULL, `idperson` mediumint(9) NOT NULL, `reopened` char(1) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `NewIndex1` (`cod_request`), KEY `idx_1` (`cod_request`,`idperson`), CONSTRAINT `FK_hdk_tbrequest_log` FOREIGN KEY (`cod_request`) REFERENCES `hdk_tbrequest` (`code_request`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=189 DEFAULT CHARSET=latin1 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `hdk_tbrequest_log` --
LOCK TABLES `hdk_tbrequest_log` WRITE; /*!40000 ALTER TABLE `hdk_tbrequest_log` DISABLE KEYS */; /*!40000 ALTER TABLE `hdk_tbrequest_log` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `hdk_tbrequest_repassed` --
DROP TABLE IF EXISTS `hdk_tbrequest_repassed`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `hdk_tbrequest_repassed` ( `date` datetime NOT NULL, `idnote` int(10) NOT NULL, `code_request` varchar(20) NOT NULL, KEY `FK_hdk_tbrequest_repassed` (`code_request`), KEY `FK_hdk_tbrequest_repassed2` (`idnote`), CONSTRAINT `FK_hdk_tbrequest_repassed` FOREIGN KEY (`code_request`) REFERENCES `hdk_tbrequest` (`code_request`), CONSTRAINT `idnote_fk_idnote` FOREIGN KEY (`idnote`) REFERENCES `hdk_tbnote` (`idnote`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=latin1 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `hdk_tbrequest_repassed` --
LOCK TABLES `hdk_tbrequest_repassed` WRITE; /*!40000 ALTER TABLE `hdk_tbrequest_repassed` DISABLE KEYS */; /*!40000 ALTER TABLE `hdk_tbrequest_repassed` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `hdk_tbrequest_times` --
DROP TABLE IF EXISTS `hdk_tbrequest_times`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `hdk_tbrequest_times` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `CODE_REQUEST` varchar(20) NOT NULL, `MIN_OPENING_TIME` float NOT NULL, `MIN_ATTENDANCE_TIME` float NOT NULL, `MIN_EXPENDED_TIME` float NOT NULL, `MIN_TELEPHONE_TIME` float NOT NULL, `MIN_CLOSURE_TIME` float NOT NULL, PRIMARY KEY (`ID`,`CODE_REQUEST`), KEY `FK_hdk_tbrequest_times` (`CODE_REQUEST`), CONSTRAINT `FK_hdk_tbrequest_times` FOREIGN KEY (`CODE_REQUEST`) REFERENCES `hdk_tbrequest` (`code_request`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=59 DEFAULT CHARSET=latin1 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `hdk_tbrequest_times` --
LOCK TABLES `hdk_tbrequest_times` WRITE; /*!40000 ALTER TABLE `hdk_tbrequest_times` DISABLE KEYS */; /*!40000 ALTER TABLE `hdk_tbrequest_times` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `hdk_tbsource` --
DROP TABLE IF EXISTS `hdk_tbsource`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `hdk_tbsource` ( `idsource` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(100) NOT NULL, `icon` varchar(100) NOT NULL, PRIMARY KEY (`idsource`) ) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=latin1 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `hdk_tbsource` --
LOCK TABLES `hdk_tbsource` WRITE; /*!40000 ALTER TABLE `hdk_tbsource` DISABLE KEYS */; INSERT INTO `hdk_tbsource` VALUES (1,'Helpdezk','hpdx.ico'),(2,'Telephone','fone.ico'),(3,'Email','mail.ico'),(8,'Webservice','web.ico'); /*!40000 ALTER TABLE `hdk_tbsource` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `hdk_tbstatus` --
DROP TABLE IF EXISTS `hdk_tbstatus`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `hdk_tbstatus` ( `idstatus` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(40) NOT NULL, `user_view` varchar(40) NOT NULL, `color` varchar(8) NOT NULL, `status` char(1) NOT NULL DEFAULT 'A', `idstatus_source` int(2) NOT NULL DEFAULT '3', PRIMARY KEY (`idstatus`), KEY `idx_1` (`idstatus_source`) ) ENGINE=InnoDB AUTO_INCREMENT=53 DEFAULT CHARSET=latin1 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `hdk_tbstatus` --
LOCK TABLES `hdk_tbstatus` WRITE; /*!40000 ALTER TABLE `hdk_tbstatus` DISABLE KEYS */; INSERT INTO `hdk_tbstatus` VALUES (1,'1 - New','1 - Awaiting Service','#ff0033','A',1),(2,'2 - Repassed','2 - Passed on to another Attendant','#0033ff','A',1),(3,'3 - On Attendance','3 - In attendance','#0033ff','A',3),(4,'6 - Waiting for Approval','6 - Waiting my approval','#6600cc','A',4),(5,'7 - Finished','7 - Ticket completed','#339900','A',5),(6,'8 - Rejected','8 - Unable to fulfill ','#339900','A',6),(11,'9 - Canceled by user','9 - Canceled','#339900','A',3),(50,'4 - Waiting for customer','4 - Awaiting Your Opinion','#ffcc66','A',3),(51,'5 - Waiting for supplier','5 - In attendance','#ffcc66','A',3); /*!40000 ALTER TABLE `hdk_tbstatus` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `hdk_tbtemplate_email` --
DROP TABLE IF EXISTS `hdk_tbtemplate_email`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `hdk_tbtemplate_email` ( `idtemplate` int(3) unsigned NOT NULL DEFAULT '0', `name` varchar(100) DEFAULT NULL, `description` blob, PRIMARY KEY (`idtemplate`), KEY `IX_TEMPLATE_EMAIL_CD_TEMPL` (`idtemplate`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `hdk_tbtemplate_email` --
LOCK TABLES `hdk_tbviewbyurl` WRITE; /*!40000 ALTER TABLE `hdk_tbviewbyurl` DISABLE KEYS */; /*!40000 ALTER TABLE `hdk_tbviewbyurl` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `hdk_tbwork_calendar` --
DROP TABLE IF EXISTS `hdk_tbwork_calendar`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `hdk_tbwork_calendar` ( `num_day_week` int(1) unsigned NOT NULL, `business_day` int(1) unsigned DEFAULT '0', `begin_morning` varchar(4) DEFAULT '0800', `end_morning` varchar(4) DEFAULT '1200', `begin_afternoon` varchar(4) DEFAULT '1300', `end_afternoon` varchar(4) DEFAULT '1800', PRIMARY KEY (`num_day_week`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `hdk_tbwork_calendar` --
LOCK TABLES `hdk_tbwork_calendar` WRITE; /*!40000 ALTER TABLE `hdk_tbwork_calendar` DISABLE KEYS */; INSERT INTO `hdk_tbwork_calendar` VALUES (0,0,'0800','1200','1300','1800'),(1,1,'0800','1200','1300','1800'),(2,1,'0800','1200','1300','1800'),(3,1,'0800','1200','1300','1800'),(4,1,'0800','1200','1300','1800'),(5,1,'0800','1200','1300','1700'),(6,0,'0800','1200','1300','1800'); /*!40000 ALTER TABLE `hdk_tbwork_calendar` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `hdk_tbwork_calendar_new` --
DROP TABLE IF EXISTS `hdk_tbwork_calendar_new`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `hdk_tbwork_calendar_new` ( `num_day_week` int(1) unsigned NOT NULL, `business_day` int(1) unsigned DEFAULT '0', `begin_morning` time NOT NULL, `end_morning` time NOT NULL, `begin_afternoon` time NOT NULL, `end_afternoon` time NOT NULL, PRIMARY KEY (`num_day_week`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `hdk_tbwork_calendar_new` --
LOCK TABLES `hdk_tbwork_calendar_new` WRITE; /*!40000 ALTER TABLE `hdk_tbwork_calendar_new` DISABLE KEYS */; INSERT INTO `hdk_tbwork_calendar_new` VALUES (0,0,'07:30:00','12:00:00','13:00:00','17:30:00'),(1,1,'07:30:00','12:00:00','13:00:00','17:30:00'),(2,1,'07:30:00','12:00:00','13:00:00','17:30:00'),(3,1,'07:30:00','12:00:00','13:00:00','17:30:00'),(4,1,'07:30:00','12:00:00','13:00:00','17:30:00'),(5,1,'07:30:00','12:00:00','13:00:00','16:30:00'),(6,0,'07:30:00','12:00:00','13:00:00','17:30:00'); /*!40000 ALTER TABLE `hdk_tbwork_calendar_new` ENABLE KEYS */; UNLOCK TABLES;
-- -- Temporary table structure for view `hdk_viewnotesdata` --
DROP TABLE IF EXISTS `hdk_viewnotesdata`; /*!50001 DROP VIEW IF EXISTS `hdk_viewnotesdata`*/; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE VIEW `hdk_viewnotesdata` AS SELECT 1 AS `idnote`, 1 AS `code_request`, 1 AS `idperson`, 1 AS `name`, 1 AS `entry_date`, 1 AS `execution_date`, 1 AS `start_hour`, 1 AS `finish_hour`, 1 AS `minutes`, 1 AS `idtype`, 1 AS `IND_CHAMADO`, 1 AS `ip_adress`, 1 AS `public`, 1 AS `hour_type`, 1 AS `service_value`, 1 AS `callback`, 1 AS `description`*/; SET character_set_client = @saved_cs_client;
-- -- Temporary table structure for view `hdk_viewrequestdata` --
DROP TABLE IF EXISTS `hdk_viewrequestdata`; /*!50001 DROP VIEW IF EXISTS `hdk_viewrequestdata`*/; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE VIEW `hdk_viewrequestdata` AS SELECT 1 AS `code_request`, 1 AS `expire_date`, 1 AS `entry_date`, 1 AS `flag_opened`, 1 AS `subject`, 1 AS `idperson_owner`, 1 AS `idperson_creator`, 1 AS `name_creator`, 1 AS `phone_number`, 1 AS `cel_phone`, 1 AS `branch_number`, 1 AS `idcompany`, 1 AS `idsource`, 1 AS `extensions_number`, 1 AS `source`, 1 AS `idstatus`, 1 AS `idattendance_way`, 1 AS `os_number`, 1 AS `serial_number`, 1 AS `label`, 1 AS `description`, 1 AS `company`, 1 AS `status`, 1 AS `type`, 1 AS `idtype`, 1 AS `iditem`, 1 AS `item`, 1 AS `idservice`, 1 AS `service`, 1 AS `priority`, 1 AS `idpriority`, 1 AS `ind_in_charge`, 1 AS `id_in_charge`, 1 AS `in_charge`, 1 AS `color`, 1 AS `personname`, 1 AS `email`, 1 AS `phone`, 1 AS `branch`, 1 AS `typeincharge`, 1 AS `department`, 1 AS `iddepartment`, 1 AS `source_name`, 1 AS `idarea`, 1 AS `AREA`, 1 AS `reason`, 1 AS `idreason`, 1 AS `way_name`*/; SET character_set_client = @saved_cs_client;
-- -- Table structure for table `tbaccesstype` --
DROP TABLE IF EXISTS `tbaccesstype`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `tbaccesstype` ( `idaccesstype` int(4) NOT NULL AUTO_INCREMENT, `type` varchar(20) NOT NULL, PRIMARY KEY (`idaccesstype`) ) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=latin1 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `tbaccesstype` --
LOCK TABLES `tbaccesstype` WRITE; /*!40000 ALTER TABLE `tbaccesstype` DISABLE KEYS */; INSERT INTO `tbaccesstype` VALUES (1,'access'),(2,'new'),(3,'edit'),(4,'delete'),(5,'export'),(6,'email'),(7,'sms'); /*!40000 ALTER TABLE `tbaccesstype` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `tbaddress` --
DROP TABLE IF EXISTS `tbaddress`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `tbaddress` ( `idaddress` int(11) NOT NULL AUTO_INCREMENT, `idperson` int(11) NOT NULL, `idcity` int(11) NOT NULL, `idneighborhood` int(11) NOT NULL, `idstreet` int(11) NOT NULL, `idtypeaddress` int(11) NOT NULL, `number` varchar(9) DEFAULT NULL, `complement` varchar(45) DEFAULT NULL, `zipcode` varchar(11) DEFAULT NULL, PRIMARY KEY (`idaddress`), KEY `fk_tbaddress_tbperson1` (`idperson`), KEY `fk_tbaddress_tbcity1` (`idcity`), KEY `fk_tbaddress_tbneighborhood1` (`idneighborhood`), KEY `fk_tbaddress_tbstreet1` (`idstreet`), KEY `fk_tbaddress_tbtypeaddress1` (`idtypeaddress`), CONSTRAINT `fk_tbaddress_tbcity1` FOREIGN KEY (`idcity`) REFERENCES `tbcity` (`idcity`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_tbaddress_tbneighborhood1` FOREIGN KEY (`idneighborhood`) REFERENCES `tbneighborhood` (`idneighborhood`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_tbaddress_tbperson1` FOREIGN KEY (`idperson`) REFERENCES `tbperson` (`idperson`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_tbaddress_tbstreet1` FOREIGN KEY (`idstreet`) REFERENCES `tbstreet` (`idstreet`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_tbaddress_tbtypeaddress1` FOREIGN KEY (`idtypeaddress`) REFERENCES `tbtypeaddress` (`idtypeaddress`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=960 DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `tbaddress` --
LOCK TABLES `tbaddress` WRITE; /*!40000 ALTER TABLE `tbaddress` DISABLE KEYS */; INSERT INTO `tbaddress` VALUES (937,1038,1,1,1,3,'','',''),(945,1061,1,1,1,2,'','',''),(959,1078,1,1,1,2,'','',''); /*!40000 ALTER TABLE `tbaddress` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `tbcity` --
DROP TABLE IF EXISTS `tbcity`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `tbcity` ( `idcity` int(11) NOT NULL AUTO_INCREMENT, `idstate` int(11) NOT NULL, `name` varchar(60) DEFAULT NULL, PRIMARY KEY (`idcity`), UNIQUE KEY `idstate` (`idstate`,`name`), KEY `idx_tbcity_name` (`name`), KEY `fk_tbcity_tbstate1` (`idstate`), CONSTRAINT `fk_tbcity_tbstate1` FOREIGN KEY (`idstate`) REFERENCES `tbstate` (`idstate`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=21556 DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `tbcity` --
LOCK TABLES `tbcity` WRITE; /*!40000 ALTER TABLE `tbcity` DISABLE KEYS */; INSERT INTO `tbcity` VALUES (1,1,'Choose'),(21555,1098,'Alabaster'); /*!40000 ALTER TABLE `tbcity` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `tbcompany` --
DROP TABLE IF EXISTS `tbcompany`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `tbcompany` ( `idcompany` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(45) DEFAULT NULL, PRIMARY KEY (`idcompany`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `tbcompany` --
LOCK TABLES `tbcompany` WRITE; /*!40000 ALTER TABLE `tbcompany` DISABLE KEYS */; INSERT INTO `tbcompany` VALUES (1,'Demo Company'); /*!40000 ALTER TABLE `tbcompany` ENABLE KEYS */; UNLOCK TABLES;
LOCK TABLES `tbconfig` WRITE; /*!40000 ALTER TABLE `tbconfig` DISABLE KEYS */; INSERT INTO `tbconfig` VALUES (5,'Email Title','',5,'EM_TITLE','','A','em_title','[DEMO SERVICEDESK]'),(65,'Email Host','',5,'EM_HOSTNAME','','A','em_hostname','smtp.gmail.com'),(66,'Domain','',5,'EM_DOMAIN','','A','em_domain','foo.in'),(67,'Email user','',5,'EM_USER','','A','em_user','noreply@foo.in'),(68,'User password','',5,'EM_PASSWORD','','A','em_password','PassworDemo'),(69,'Sender email','',5,'EM_SENDER','','A','em_sender','noreply@foo.in'),(70,'Requires authentication','',5,'EM_AUTH','','A','em_auth','1'),(71,'Email Header','<p><br></p>',11,'EM_HEADER','','A','em_header',''),(72,'Email Footer','<p><br></p>',11,'EM_FOOTER','','A','em_footer',''),(73,'POP Host','',12,'POP_HOST','','A','pop_host','imap.google.com'),(74,'POP Port','',12,'POP_PORT','','A','pop_port','993'),(75,'POP Type','',12,'POP_TYPE','','A','pop_type','GMAIL'),(76,'Success Log','',5,'EM_SUCCESS_LOG','','A','em_success_log','1'),(77,'Failure Log','',5,'EM_FAILURE_LOG','','A','em_failure_log','1'),(80,'Enable maintenance mode','',5,'SES_MAINTENANCE','checkbox','A','ses_maintenance','0'),(81,'Maintenance message','',5,'SES_MAINTENANCE_MSG','','A','ses_maintenance_msg','\n We are undergoing maintenance, we will be back soon !\n'),(85,'Define session time','',1,'SES_TIME_SESSION','input','A','sys_time_session','3720'),(86,'LDAP/AD Server','',13,'SES_LDAP_SERVER','input','A','ldap_server','ldap.testathon.net'),(87,'LDAP Distinguished Names','',13,'SES_LDAP_DN','input','A','ldap_dn','OU=users,DC=testathon,DC=net'),(90,'LDAP Domain','',13,'SES_LDAP_DOMAIN','','A','ldap_domain',''),(91,'LDAP Field ID','',13,'SES_LDAP_FIELD','','A','ldap_field','uid'),(92,'LDAP or AD','',13,'SES_LDAP_AD','','A','Type','1'),(98,'Google two factor authentication','',1,'SES_GOOGLE_2FA','checkbox','A','sys_2FAuthentication','0'),(99,'POP Domain','',12,'POP_DOMAIN','','A','pop_domain','foo.in'),(102,'Email By Cron','',5,'EM_BY_CRON','checkbox','A','em_email_by_cron','0'),(103,'Email PORT','',5,'EM_PORT','NULL','A','em_port','587'),(104,'General Log','',5,'LOG_GENERAL','','A','log_general','1'),(105,'Email Log','',5,'LOG_EMAIL','','A','log_email','1'),(106,'Host Log','',5,'LOG_HOST','','A','log_host','local'),(107,'Remote Server Log','',5,'LOG_REMOTE_SERVER','input','A','log_remote_server','10.42.44.203'),(108,'Log Level','',5,'LOG_LEVEL','input','A','log_level','7'),(112,'Tracker Status','',5,'TRACKER_STATUS','checkbox','A','tracker_status','1'),(113,'Country default','',5,'COUNTRY_DEFAULT','input','A','country_default','227'),(114,'Email Secure','Use TLS',5,'EM_TLS','checkbox','A','email_tls','1'); /*!40000 ALTER TABLE `tbconfig` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `tbconfig_category` --
DROP TABLE IF EXISTS `tbconfig_category`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `tbconfig_category` ( `idconfigcategory` int(10) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(250) DEFAULT NULL, `smarty` varchar(250) DEFAULT NULL, PRIMARY KEY (`idconfigcategory`), KEY `idx_category` (`idconfigcategory`) ) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=latin1 AVG_ROW_LENGTH=1260; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `tbconfig_category` --
LOCK TABLES `tbconfig_category` WRITE; /*!40000 ALTER TABLE `tbconfig_category` DISABLE KEYS */; INSERT INTO `tbconfig_category` VALUES (1,'Funcionalidades do Sistema','System_features'),(2,'Permiss�es para Analista',''),(3,'Notificaçôes de E-mail',''),(4,'Usuários',''),(5,'Geral',''),(6,'Patrimônioio',''),(7,'Integração com SMTP/LDAP/MS Active Directory',''),(8,'Inventário',''),(9,'Inventario',''),(10,'Outros itens','Other_items'),(11,'Email Templates',''),(12,'POP Server',''),(13,'Integration with LDAP/MS Active Directory','Integration_ldap'); /*!40000 ALTER TABLE `tbconfig_category` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `tbcountry` --
DROP TABLE IF EXISTS `tbcountry`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `tbcountry` ( `idcountry` int(11) NOT NULL AUTO_INCREMENT, `iso` varchar(2) DEFAULT NULL, `name` varchar(80) DEFAULT NULL, `iso3` varchar(3) DEFAULT NULL, `printablename` varchar(80) DEFAULT NULL, PRIMARY KEY (`idcountry`), UNIQUE KEY `code_UNIQUE` (`iso`) ) ENGINE=InnoDB AUTO_INCREMENT=241 DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `tbcountry` --
LOCK TABLES `tbcountry` WRITE; /*!40000 ALTER TABLE `tbcountry` DISABLE KEYS */; INSERT INTO `tbcountry` VALUES (1,'AA','Choose','AAA','Choose'),(2,'AF','AFGHANISTAN','AFG','Afghanistan'),(3,'AL','ALBANIA','ALB','Albania'),(4,'DZ','ALGERIA','DZA','Algeria'),(5,'AS','AMERICAN SAMOA','ASM','American Samoa'),(6,'AD','ANDORRA','AND','Andorra'),(7,'AO','ANGOLA','AGO','Angola'),(8,'AI','ANGUILLA','AIA','Anguilla'),(9,'AQ','ANTARCTICA','','Antarctica'),(10,'AG','ANTIGUA AND BARBUDA','ATG','Antigua and Barbuda'),(11,'AR','ARGENTINA','ARG','Argentina'),(12,'AM','ARMENIA','ARM','Armenia'),(13,'AW','ARUBA','ABW','Aruba'),(14,'AU','AUSTRALIA','AUS','Australia'),(15,'AT','AUSTRIA','AUT','Austria'),(16,'AZ','AZERBAIJAN','AZE','Azerbaijan'),(17,'BS','BAHAMAS','BHS','Bahamas'),(18,'BH','BAHRAIN','BHR','Bahrain'),(19,'BD','BANGLADESH','BGD','Bangladesh'),(20,'BB','BARBADOS','BRB','Barbados'),(21,'BY','BELARUS','BLR','Belarus'),(22,'BE','BELGIUM','BEL','Belgium'),(23,'BZ','BELIZE','BLZ','Belize'),(24,'BJ','BENIN','BEN','Benin'),(25,'BM','BERMUDA','BMU','Bermuda'),(26,'BT','BHUTAN','BTN','Bhutan'),(27,'BO','BOLIVIA','BOL','Bolivia'),(28,'BA','BOSNIA AND HERZEGOVINA','BIH','Bosnia and Herzegovina'),(29,'BW','BOTSWANA','BWA','Botswana'),(30,'BV','BOUVET ISLAND','','Bouvet Island'),(31,'BR','BRAZIL','BRA','Brazil'),(32,'IO','BRITISH INDIAN OCEAN TERRITORY','','British Indian Ocean Territory'),(33,'BN','BRUNEI DARUSSALAM','BRN','Brunei Darussalam'),(34,'BG','BULGARIA','BGR','Bulgaria'),(35,'BF','BURKINA FASO','BFA','Burkina Faso'),(36,'BI','BURUNDI','BDI','Burundi'),(37,'KH','CAMBODIA','KHM','Cambodia'),(38,'CM','CAMEROON','CMR','Cameroon'),(39,'CA','CANADA','CAN','Canada'),(40,'CV','CAPE VERDE','CPV','Cape Verde'),(41,'KY','CAYMAN ISLANDS','CYM','Cayman Islands'),(42,'CF','CENTRAL AFRICAN REPUBLIC','CAF','Central African Republic'),(43,'TD','CHAD','TCD','Chad'),(44,'CL','CHILE','CHL','Chile'),(45,'CN','CHINA','CHN','China'),(46,'CX','CHRISTMAS ISLAND','','Christmas Island'),(47,'CC','COCOS (KEELING) ISLANDS','','Cocos (Keeling) Islands'),(48,'CO','COLOMBIA','COL','Colombia'),(49,'KM','COMOROS','COM','Comoros'),(50,'CG','CONGO','COG','Congo'),(51,'CD','CONGO, THE DEMOCRATIC REPUBLIC OF THE','COD','Congo, the Democratic Republic of the'),(52,'CK','COOK ISLANDS','COK','Cook Islands'),(53,'CR','COSTA RICA','CRI','Costa Rica'),(54,'CI','COTE D\'IVOIRE','CIV','Cote D\'Ivoire'),(55,'HR','CROATIA','HRV','Croatia'),(56,'CU','CUBA','CUB','Cuba'),(57,'CY','CYPRUS','CYP','Cyprus'),(58,'CZ','CZECH REPUBLIC','CZE','Czech Republic'),(59,'DK','DENMARK','DNK','Denmark'),(60,'DJ','DJIBOUTI','DJI','Djibouti'),(61,'DM','DOMINICA','DMA','Dominica'),(62,'DO','DOMINICAN REPUBLIC','DOM','Dominican Republic'),(63,'EC','ECUADOR','ECU','Ecuador'),(64,'EG','EGYPT','EGY','Egypt'),(65,'SV','EL SALVADOR','SLV','El Salvador'),(66,'GQ','EQUATORIAL GUINEA','GNQ','Equatorial Guinea'),(67,'ER','ERITREA','ERI','Eritrea'),(68,'EE','ESTONIA','EST','Estonia'),(69,'ET','ETHIOPIA','ETH','Ethiopia'),(70,'FK','FALKLAND ISLANDS (MALVINAS)','FLK','Falkland Islands (Malvinas)'),(71,'FO','FAROE ISLANDS','FRO','Faroe Islands'),(72,'FJ','FIJI','FJI','Fiji'),(73,'FI','FINLAND','FIN','Finland'),(74,'FR','FRANCE','FRA','France'),(75,'GF','FRENCH GUIANA','GUF','French Guiana'),(76,'PF','FRENCH POLYNESIA','PYF','French Polynesia'),(77,'TF','FRENCH SOUTHERN TERRITORIES','','French Southern Territories'),(78,'GA','GABON','GAB','Gabon'),(79,'GM','GAMBIA','GMB','Gambia'),(80,'GE','GEORGIA','GEO','Georgia'),(81,'DE','GERMANY','DEU','Germany'),(82,'GH','GHANA','GHA','Ghana'),(83,'GI','GIBRALTAR','GIB','Gibraltar'),(84,'GR','GREECE','GRC','Greece'),(85,'GL','GREENLAND','GRL','Greenland'),(86,'GD','GRENADA','GRD','Grenada'),(87,'GP','GUADELOUPE','GLP','Guadeloupe'),(88,'GU','GUAM','GUM','Guam'),(89,'GT','GUATEMALA','GTM','Guatemala'),(90,'GN','GUINEA','GIN','Guinea'),(91,'GW','GUINEA-BISSAU','GNB','Guinea-Bissau'),(92,'GY','GUYANA','GUY','Guyana'),(93,'HT','HAITI','HTI','Haiti'),(94,'HM','HEARD ISLAND AND MCDONALD ISLANDS','','Heard Island and Mcdonald Islands'),(95,'VA','HOLY SEE (VATICAN CITY STATE)','VAT','Holy See (Vatican City State)'),(96,'HN','HONDURAS','HND','Honduras'),(97,'HK','HONG KONG','HKG','Hong Kong'),(98,'HU','HUNGARY','HUN','Hungary'),(99,'IS','ICELAND','ISL','Iceland'),(100,'IN','INDIA','IND','India'),(101,'ID','INDONESIA','IDN','Indonesia'),(102,'IR','IRAN, ISLAMIC REPUBLIC OF','IRN','Iran, Islamic Republic of'),(103,'IQ','IRAQ','IRQ','Iraq'),(104,'IE','IRELAND','IRL','Ireland'),(105,'IL','ISRAEL','ISR','Israel'),(106,'IT','ITALY','ITA','Italy'),(107,'JM','JAMAICA','JAM','Jamaica'),(108,'JP','JAPAN','JPN','Japan'),(109,'JO','JORDAN','JOR','Jordan'),(110,'KZ','KAZAKHSTAN','KAZ','Kazakhstan'),(111,'KE','KENYA','KEN','Kenya'),(112,'KI','KIRIBATI','KIR','Kiribati'),(113,'KP','KOREA, DEMOCRATIC PEOPLE\'S REPUBLIC OF','PRK','Korea, Democratic People\'s Republic of'),(114,'KR','KOREA, REPUBLIC OF','KOR','Korea, Republic of'),(115,'KW','KUWAIT','KWT','Kuwait'),(116,'KG','KYRGYZSTAN','KGZ','Kyrgyzstan'),(117,'LA','LAO PEOPLE\'S DEMOCRATIC REPUBLIC','LAO','Lao People\'s Democratic Republic'),(118,'LV','LATVIA','LVA','Latvia'),(119,'LB','LEBANON','LBN','Lebanon'),(120,'LS','LESOTHO','LSO','Lesotho'),(121,'LR','LIBERIA','LBR','Liberia'),(122,'LY','LIBYAN ARAB JAMAHIRIYA','LBY','Libyan Arab Jamahiriya'),(123,'LI','LIECHTENSTEIN','LIE','Liechtenstein'),(124,'LT','LITHUANIA','LTU','Lithuania'),(125,'LU','LUXEMBOURG','LUX','Luxembourg'),(126,'MO','MACAO','MAC','Macao'),(127,'MK','MACEDONIA, THE FORMER YUGOSLAV REPUBLIC OF','MKD','Macedonia, the Former Yugoslav Republic of'),(128,'MG','MADAGASCAR','MDG','Madagascar'),(129,'MW','MALAWI','MWI','Malawi'),(130,'MY','MALAYSIA','MYS','Malaysia'),(131,'MV','MALDIVES','MDV','Maldives'),(132,'ML','MALI','MLI','Mali'),(133,'MT','MALTA','MLT','Malta'),(134,'MH','MARSHALL ISLANDS','MHL','Marshall Islands'),(135,'MQ','MARTINIQUE','MTQ','Martinique'),(136,'MR','MAURITANIA','MRT','Mauritania'),(137,'MU','MAURITIUS','MUS','Mauritius'),(138,'YT','MAYOTTE','','Mayotte'),(139,'MX','MEXICO','MEX','Mexico'),(140,'FM','MICRONESIA, FEDERATED STATES OF','FSM','Micronesia, Federated States of'),(141,'MD','MOLDOVA, REPUBLIC OF','MDA','Moldova, Republic of'),(142,'MC','MONACO','MCO','Monaco'),(143,'MN','MONGOLIA','MNG','Mongolia'),(144,'MS','MONTSERRAT','MSR','Montserrat'),(145,'MA','MOROCCO','MAR','Morocco'),(146,'MZ','MOZAMBIQUE','MOZ','Mozambique'),(147,'MM','MYANMAR','MMR','Myanmar'),(148,'NA','NAMIBIA','NAM','Namibia'),(149,'NR','NAURU','NRU','Nauru'),(150,'NP','NEPAL','NPL','Nepal'),(151,'NL','NETHERLANDS','NLD','Netherlands'),(152,'AN','NETHERLANDS ANTILLES','ANT','Netherlands Antilles'),(153,'NC','NEW CALEDONIA','NCL','New Caledonia'),(154,'NZ','NEW ZEALAND','NZL','New Zealand'),(155,'NI','NICARAGUA','NIC','Nicaragua'),(156,'NE','NIGER','NER','Niger'),(157,'NG','NIGERIA','NGA','Nigeria'),(158,'NU','NIUE','NIU','Niue'),(159,'NF','NORFOLK ISLAND','NFK','Norfolk Island'),(160,'MP','NORTHERN MARIANA ISLANDS','MNP','Northern Mariana Islands'),(161,'NO','NORWAY','NOR','Norway'),(162,'OM','OMAN','OMN','Oman'),(163,'PK','PAKISTAN','PAK','Pakistan'),(164,'PW','PALAU','PLW','Palau'),(165,'PS','PALESTINIAN TERRITORY, OCCUPIED','','Palestinian Territory, Occupied'),(166,'PA','PANAMA','PAN','Panama'),(167,'PG','PAPUA NEW GUINEA','PNG','Papua New Guinea'),(168,'PY','PARAGUAY','PRY','Paraguay'),(169,'PE','PERU','PER','Peru'),(170,'PH','PHILIPPINES','PHL','Philippines'),(171,'PN','PITCAIRN','PCN','Pitcairn'),(172,'PL','POLAND','POL','Poland'),(173,'PT','PORTUGAL','PRT','Portugal'),(174,'PR','PUERTO RICO','PRI','Puerto Rico'),(175,'QA','QATAR','QAT','Qatar'),(176,'RE','REUNION','REU','Reunion'),(177,'RO','ROMANIA','ROM','Romania'),(178,'RU','RUSSIAN FEDERATION','RUS','Russian Federation'),(179,'RW','RWANDA','RWA','Rwanda'),(180,'SH','SAINT HELENA','SHN','Saint Helena'),(181,'KN','SAINT KITTS AND NEVIS','KNA','Saint Kitts and Nevis'),(182,'LC','SAINT LUCIA','LCA','Saint Lucia'),(183,'PM','SAINT PIERRE AND MIQUELON','SPM','Saint Pierre and Miquelon'),(184,'VC','SAINT VINCENT AND THE GRENADINES','VCT','Saint Vincent and the Grenadines'),(185,'WS','SAMOA','WSM','Samoa'),(186,'SM','SAN MARINO','SMR','San Marino'),(187,'ST','SAO TOME AND PRINCIPE','STP','Sao Tome and Principe'),(188,'SA','SAUDI ARABIA','SAU','Saudi Arabia'),(189,'SN','SENEGAL','SEN','Senegal'),(190,'CS','SERBIA AND MONTENEGRO','','Serbia and Montenegro'),(191,'SC','SEYCHELLES','SYC','Seychelles'),(192,'SL','SIERRA LEONE','SLE','Sierra Leone'),(193,'SG','SINGAPORE','SGP','Singapore'),(194,'SK','SLOVAKIA','SVK','Slovakia'),(195,'SI','SLOVENIA','SVN','Slovenia'),(196,'SB','SOLOMON ISLANDS','SLB','Solomon Islands'),(197,'SO','SOMALIA','SOM','Somalia'),(198,'ZA','SOUTH AFRICA','ZAF','South Africa'),(199,'GS','SOUTH GEORGIA AND THE SOUTH SANDWICH ISLANDS','','South Georgia and the South Sandwich Islands'),(200,'ES','SPAIN','ESP','Spain'),(201,'LK','SRI LANKA','LKA','Sri Lanka'),(202,'SD','SUDAN','SDN','Sudan'),(203,'SR','SURINAME','SUR','Suriname'),(204,'SJ','SVALBARD AND JAN MAYEN','SJM','Svalbard and Jan Mayen'),(205,'SZ','SWAZILAND','SWZ','Swaziland'),(206,'SE','SWEDEN','SWE','Sweden'),(207,'CH','SWITZERLAND','CHE','Switzerland'),(208,'SY','SYRIAN ARAB REPUBLIC','SYR','Syrian Arab Republic'),(209,'TW','TAIWAN, PROVINCE OF CHINA','TWN','Taiwan, Province of China'),(210,'TJ','TAJIKISTAN','TJK','Tajikistan'),(211,'TZ','TANZANIA, UNITED REPUBLIC OF','TZA','Tanzania, United Republic of'),(212,'TH','THAILAND','THA','Thailand'),(213,'TL','TIMOR-LESTE','','Timor-Leste'),(214,'TG','TOGO','TGO','Togo'),(215,'TK','TOKELAU','TKL','Tokelau'),(216,'TO','TONGA','TON','Tonga'),(217,'TT','TRINIDAD AND TOBAGO','TTO','Trinidad and Tobago'),(218,'TN','TUNISIA','TUN','Tunisia'),(219,'TR','TURKEY','TUR','Turkey'),(220,'TM','TURKMENISTAN','TKM','Turkmenistan'),(221,'TC','TURKS AND CAICOS ISLANDS','TCA','Turks and Caicos Islands'),(222,'TV','TUVALU','TUV','Tuvalu'),(223,'UG','UGANDA','UGA','Uganda'),(224,'UA','UKRAINE','UKR','Ukraine'),(225,'AE','UNITED ARAB EMIRATES','ARE','United Arab Emirates'),(226,'GB','UNITED KINGDOM','GBR','United Kingdom'),(227,'US','UNITED STATES','USA','United States'),(228,'UM','UNITED STATES MINOR OUTLYING ISLANDS','','United States Minor Outlying Islands'),(229,'UY','URUGUAY','URY','Uruguay'),(230,'UZ','UZBEKISTAN','UZB','Uzbekistan'),(231,'VU','VANUATU','VUT','Vanuatu'),(232,'VE','VENEZUELA','VEN','Venezuela'),(233,'VN','VIET NAM','VNM','Viet Nam'),(234,'VG','VIRGIN ISLANDS, BRITISH','VGB','Virgin Islands, British'),(235,'VI','VIRGIN ISLANDS, U.S.','VIR','Virgin Islands, U.s.'),(236,'WF','WALLIS AND FUTUNA','WLF','Wallis and Futuna'),(237,'EH','WESTERN SAHARA','ESH','Western Sahara'),(238,'YE','YEMEN','YEM','Yemen'),(239,'ZM','ZAMBIA','ZMB','Zambia'),(240,'ZW','ZIMBABWE','ZWE','Zimbabwe'); /*!40000 ALTER TABLE `tbcountry` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `tbdefaultpermission` --
DROP TABLE IF EXISTS `tbdefaultpermission`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `tbdefaultpermission` ( `iddefaultpermission` int(4) NOT NULL AUTO_INCREMENT, `idaccesstype` int(4) NOT NULL, `idprogram` int(4) NOT NULL, `allow` char(4) NOT NULL DEFAULT 'Y', PRIMARY KEY (`iddefaultpermission`), KEY `FK_tbdefaultpermission` (`idaccesstype`), KEY `FK_tbdefaultpermission2` (`idprogram`), CONSTRAINT `FK_tbdefaultpermission` FOREIGN KEY (`idaccesstype`) REFERENCES `tbaccesstype` (`idaccesstype`), CONSTRAINT `FK_tbdefaultpermission2` FOREIGN KEY (`idprogram`) REFERENCES `tbprogram` (`idprogram`) ) ENGINE=InnoDB AUTO_INCREMENT=264 DEFAULT CHARSET=latin1 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `tbdefaultpermission` --
LOCK TABLES `tbdefaultpermission` WRITE; /*!40000 ALTER TABLE `tbdefaultpermission` DISABLE KEYS */; INSERT INTO `tbdefaultpermission` VALUES (1,1,1,'Y'),(2,2,1,'Y'),(3,3,1,'Y'),(4,4,1,'Y'),(5,1,2,'Y'),(6,2,2,'Y'),(7,3,2,'Y'),(8,4,2,'Y'),(9,1,3,'Y'),(10,2,3,'Y'),(11,3,3,'Y'),(12,4,3,'Y'),(13,1,4,'Y'),(14,2,4,'Y'),(15,3,4,'Y'),(16,4,4,'Y'),(25,1,7,'Y'),(26,2,7,'Y'),(27,3,7,'Y'),(28,4,7,'Y'),(33,1,9,'Y'),(34,2,9,'Y'),(35,3,9,'Y'),(36,4,9,'Y'),(45,1,12,'Y'),(46,2,12,'Y'),(47,3,12,'Y'),(48,4,12,'Y'),(57,1,16,'Y'),(58,2,16,'Y'),(59,3,16,'Y'),(60,4,16,'Y'),(69,1,23,'Y'),(70,2,23,'Y'),(71,3,23,'Y'),(72,4,23,'Y'),(77,5,2,'Y'),(85,1,32,'Y'),(86,2,32,'Y'),(87,3,32,'Y'),(182,1,61,'Y'),(183,2,61,'Y'),(184,3,61,'Y'),(185,4,61,'Y'),(224,1,73,'Y'),(225,2,73,'Y'),(226,5,73,'Y'),(227,1,74,'Y'),(228,2,74,'Y'),(229,3,74,'Y'),(230,4,74,'Y'),(231,5,74,'Y'),(245,1,79,'Y'),(246,2,79,'Y'),(247,3,79,'Y'),(248,4,79,'Y'),(254,1,81,'Y'),(255,2,81,'Y'),(256,3,81,'Y'),(257,4,81,'Y'),(258,5,81,'Y'),(259,6,81,'Y'),(260,1,82,'Y'),(261,2,82,'Y'),(262,3,82,'Y'),(263,4,82,'Y'); /*!40000 ALTER TABLE `tbdefaultpermission` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `tbdepartment` --
DROP TABLE IF EXISTS `tbdepartment`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `tbdepartment` ( `iddepartment` int(11) NOT NULL AUTO_INCREMENT, `idcompany` int(11) NOT NULL, `name` varchar(45) DEFAULT NULL, PRIMARY KEY (`iddepartment`), KEY `fk_tbdepartment_tbcompany1` (`idcompany`), CONSTRAINT `fk_tbdepartment_tbcompany1` FOREIGN KEY (`idcompany`) REFERENCES `tbcompany` (`idcompany`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `tbdepartment` --
LOCK TABLES `tbdepartment` WRITE; /*!40000 ALTER TABLE `tbdepartment` DISABLE KEYS */; INSERT INTO `tbdepartment` VALUES (1,1,'IT'); /*!40000 ALTER TABLE `tbdepartment` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `tbdeploy` --
DROP TABLE IF EXISTS `tbdeploy`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `tbdeploy` ( `iddeploy` int(11) NOT NULL AUTO_INCREMENT, `gitserver` char(100) DEFAULT NULL, `dttrigger` datetime DEFAULT NULL, `dtdone` datetime DEFAULT NULL, PRIMARY KEY (`iddeploy`), KEY `dtdone` (`dtdone`), KEY `dttrigger` (`dttrigger`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `tbdeploy` --
LOCK TABLES `tbdeploy` WRITE; /*!40000 ALTER TABLE `tbdeploy` DISABLE KEYS */; /*!40000 ALTER TABLE `tbdeploy` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `tbemail` --
DROP TABLE IF EXISTS `tbemail`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `tbemail` ( `idemail` int(11) NOT NULL AUTO_INCREMENT, `idmodule` int(11) NOT NULL, `from` varchar(255) DEFAULT NULL COMMENT 'According to RFC 5321', `to` varchar(255) DEFAULT NULL COMMENT 'According to RFC 5321', `subject` varchar(255) DEFAULT NULL, `body` blob, PRIMARY KEY (`idemail`), KEY `IDX_tbemail_from` (`from`), KEY `IDX_tbemail_idmodule` (`idmodule`), KEY `IDX_tbemail_subject` (`subject`), KEY `IDX_tbemail_to` (`to`), CONSTRAINT `FK_tbemail_tbmodule_idmodule` FOREIGN KEY (`idmodule`) REFERENCES `tbmodule` (`idmodule`) ) ENGINE=InnoDB AUTO_INCREMENT=1913 DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `tbemail` --
LOCK TABLES `tbemail` WRITE; /*!40000 ALTER TABLE `tbemail` DISABLE KEYS */; /*!40000 ALTER TABLE `tbemail` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `tbholiday` --
DROP TABLE IF EXISTS `tbholiday`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `tbholiday` ( `idholiday` int(4) NOT NULL AUTO_INCREMENT, `holiday_date` date NOT NULL, `holiday_description` varchar(50) NOT NULL, PRIMARY KEY (`idholiday`) ) ENGINE=InnoDB AUTO_INCREMENT=160 DEFAULT CHARSET=latin1 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `tbholiday` --
LOCK TABLES `tbholiday` WRITE; /*!40000 ALTER TABLE `tbholiday` DISABLE KEYS */; INSERT INTO `tbholiday` VALUES (16,'2020-01-01','First day of the year'),(20,'2020-04-07','Independence Day'),(32,'2020-12-25','Christmas'),(152,'2020-01-20','Martin Luther King\'s birthday'),(153,'2020-01-16','Washington\'s Birthday'),(154,'2020-05-25','Memorial Day'),(155,'2020-09-07','Labor Day'),(156,'2020-10-12','Columbu\'s Day'),(157,'2020-11-11','Veterans Day'),(158,'2020-11-26','Thanksgiving Day'),(159,'2020-02-17','President\'s Day'); /*!40000 ALTER TABLE `tbholiday` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `tbholiday_has_company` --
DROP TABLE IF EXISTS `tbholiday_has_company`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `tbholiday_has_company` ( `idholiday` int(4) NOT NULL, `idperson` int(11) NOT NULL, KEY `fk_idholiday_tbholiday_has_company` (`idholiday`), KEY `fk_idperson_tbholiday_has_company` (`idperson`), CONSTRAINT `fk_idholiday_tbholiday_has_company` FOREIGN KEY (`idholiday`) REFERENCES `tbholiday` (`idholiday`), CONSTRAINT `fk_idperson_tbholiday_has_company` FOREIGN KEY (`idperson`) REFERENCES `tbperson` (`idperson`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `tbholiday_has_company` --
LOCK TABLES `tbholiday_has_company` WRITE; /*!40000 ALTER TABLE `tbholiday_has_company` DISABLE KEYS */; INSERT INTO `tbholiday_has_company` VALUES (159,1038); /*!40000 ALTER TABLE `tbholiday_has_company` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `tbjuridicalperson` --
DROP TABLE IF EXISTS `tbjuridicalperson`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `tbjuridicalperson` ( `idjuridicalperson` int(11) NOT NULL AUTO_INCREMENT, `idperson` int(11) NOT NULL, `ein_cnpj` varchar(18) DEFAULT NULL, `iestadual` varchar(20) DEFAULT NULL, `contact_person` varchar(80) DEFAULT NULL, `observation` blob, PRIMARY KEY (`idjuridicalperson`), KEY `fk_tbjuridicalperson_tbperson1` (`idperson`), CONSTRAINT `fk_tbjuridicalperson_tbperson1` FOREIGN KEY (`idperson`) REFERENCES `tbperson` (`idperson`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `tbjuridicalperson` --
LOCK TABLES `tbjuridicalperson` WRITE; /*!40000 ALTER TABLE `tbjuridicalperson` DISABLE KEYS */; INSERT INTO `tbjuridicalperson` VALUES (6,1038,'07452272/000171','','Gustavo Silveira',''); /*!40000 ALTER TABLE `tbjuridicalperson` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `tblocale` --
DROP TABLE IF EXISTS `tblocale`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `tblocale` ( `idlocale` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(20) DEFAULT NULL, `value` varchar(255) DEFAULT NULL, PRIMARY KEY (`idlocale`), UNIQUE KEY `UK_tblocale_name` (`name`) ) ENGINE=InnoDB AUTO_INCREMENT=611 DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Table structure for table `tbperson_plus` --
DROP TABLE IF EXISTS `tbperson_plus`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `tbperson_plus` ( `idpersonplus` int(11) NOT NULL AUTO_INCREMENT, `idtypepersonplus` int(11) DEFAULT NULL, `idperson` int(11) DEFAULT NULL, `login` varchar(100) DEFAULT NULL, `password` varchar(50) DEFAULT NULL, PRIMARY KEY (`idpersonplus`), UNIQUE KEY `NewIndex1` (`idtypepersonplus`,`idperson`), KEY `FK_tbperson_plus_person_FK` (`idperson`), CONSTRAINT `FK_tbperson_plus` FOREIGN KEY (`idtypepersonplus`) REFERENCES `tbtypeperson_plus` (`idtypepersonplus`) ON DELETE CASCADE, CONSTRAINT `FK_tbperson_plus_person_FK` FOREIGN KEY (`idperson`) REFERENCES `tbperson` (`idperson`) ON DELETE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=latin1 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `tbperson_plus` --
LOCK TABLES `tbperson_plus` WRITE; /*!40000 ALTER TABLE `tbperson_plus` DISABLE KEYS */; /*!40000 ALTER TABLE `tbperson_plus` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `tbpersontypes` --
DROP TABLE IF EXISTS `tbpersontypes`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `tbpersontypes` ( `idperson` int(11) NOT NULL, `idtypeperson` int(11) NOT NULL, PRIMARY KEY (`idperson`,`idtypeperson`), KEY `idtypeperson` (`idtypeperson`), CONSTRAINT `tbpersontypes_ibfk_1` FOREIGN KEY (`idperson`) REFERENCES `tbperson` (`idperson`), CONSTRAINT `tbpersontypes_ibfk_2` FOREIGN KEY (`idtypeperson`) REFERENCES `tbtypeperson` (`idtypeperson`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `tbpersontypes` --
LOCK TABLES `tbpersontypes` WRITE; /*!40000 ALTER TABLE `tbpersontypes` DISABLE KEYS */; /*!40000 ALTER TABLE `tbpersontypes` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `tbprogram` --
DROP TABLE IF EXISTS `tbprogram`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `tbprogram` ( `idprogram` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(50) NOT NULL, `controller` varchar(20) NOT NULL, `idprogramcategory` int(11) NOT NULL, `index` int(11) DEFAULT NULL, `status` char(1) NOT NULL, `smarty` varchar(30) DEFAULT NULL, PRIMARY KEY (`idprogram`), KEY `fk_tbprogramcategory` (`idprogramcategory`), CONSTRAINT `FK_tbprogramct` FOREIGN KEY (`idprogramcategory`) REFERENCES `tbprogramcategory` (`idprogramcategory`) ) ENGINE=InnoDB AUTO_INCREMENT=83 DEFAULT CHARSET=latin1 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `tbprogram` --
LOCK TABLES `tbprogram` WRITE; /*!40000 ALTER TABLE `tbprogram` DISABLE KEYS */; INSERT INTO `tbprogram` VALUES (1,'People & Companies','person/',1,0,'A','pgr_people'),(2,'Holidays','holidays/',1,0,'A','pgr_holidays'),(3,'Programs','program/',1,0,'A','pgr_programs'),(4,'Modules','modules/',1,0,'A','pgr_modules'),(7,'Groups','hdkGroup',2,0,'A','pgr_groups'),(9,'Departments','hdkDepartment',2,0,'A','pgr_departments'),(12,'Services','hdkService',2,0,'A','pgr_services'),(16,'Request Reason','hdkReason',2,0,'A','pgr_req_reason'),(23,'Email Configuration','hdkEmailConfig',2,0,'A','pgr_email_config'),(32,'Type Person Permission','typepersonpermission',1,0,'A','pgr_type_permission'),(61,'Logos','logos/',17,0,'A','pgr_logos'),(73,'Warnings','hdkWarning/',2,0,'A','pgr_warnings'),(74,'Widgets','widget/',19,0,'A','pgr_dash_widgets'),(79,'Requests by email','hdkRequestEmail/',2,0,'A','pgr_email_request'),(81,'Vocabulary ','vocabulary',1,0,'A','pgr_vocabulary'),(82,'System Features','features',17,0,'A','pgr_sys_features'); /*!40000 ALTER TABLE `tbprogram` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `tbprogramcategory` --
DROP TABLE IF EXISTS `tbprogramcategory`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `tbprogramcategory` ( `idprogramcategory` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(20) NOT NULL, `idmodule` int(11) NOT NULL, `smarty` varchar(30) DEFAULT NULL, PRIMARY KEY (`idprogramcategory`), KEY `FK_tbprogramcategory` (`idmodule`), CONSTRAINT `FK_tbprogramcategory` FOREIGN KEY (`idmodule`) REFERENCES `tbmodule` (`idmodule`) ) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=latin1 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `tbprogramcategory` --
LOCK TABLES `tbprogramcategory` WRITE; /*!40000 ALTER TABLE `tbprogramcategory` DISABLE KEYS */; INSERT INTO `tbprogramcategory` VALUES (1,'Records',1,'cat_records'),(2,'Records',2,'cat_records'),(13,'Reports',2,'cat_reports'),(17,'Config',1,'cat_config'),(18,'Database',2,'cat_database'),(19,'Records',3,'cat_records'); /*!40000 ALTER TABLE `tbprogramcategory` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `tbscreen` --
DROP TABLE IF EXISTS `tbscreen`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `tbscreen` ( `idscreen` int(11) NOT NULL AUTO_INCREMENT, `idmodule` int(11) DEFAULT NULL, `formid` varchar(50) DEFAULT NULL, `description` text, PRIMARY KEY (`idscreen`), UNIQUE KEY `UK_tbscreen` (`idmodule`,`formid`), CONSTRAINT `FK_tbscreen_tbmodule_idmodule` FOREIGN KEY (`idmodule`) REFERENCES `tbmodule` (`idmodule`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 AVG_ROW_LENGTH=16384; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `tbscreen` --
LOCK TABLES `tbscreen` WRITE; /*!40000 ALTER TABLE `tbscreen` DISABLE KEYS */; INSERT INTO `tbscreen` VALUES (1,2,'persondata_form','Scrren used to update person data by user'); /*!40000 ALTER TABLE `tbscreen` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `tbscreen_permission` --
DROP TABLE IF EXISTS `tbscreen_permission`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `tbscreen_permission` ( `idscreenpermission` int(11) NOT NULL AUTO_INCREMENT, `idscreen` int(11) DEFAULT NULL, `idtypeperson` int(11) DEFAULT NULL, `fieldid` varchar(50) NOT NULL, `enable` char(1) NOT NULL DEFAULT 'Y', PRIMARY KEY (`idscreenpermission`), KEY `FK_tbscreen_permission_tbscreen_idscreen` (`idscreen`), KEY `FK_tbscreen_permission_tbtypeperson_idtypeperson` (`idtypeperson`), CONSTRAINT `FK_tbscreen_permission_tbscreen_idscreen` FOREIGN KEY (`idscreen`) REFERENCES `tbscreen` (`idscreen`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `FK_tbscreen_permission_tbtypeperson_idtypeperson` FOREIGN KEY (`idtypeperson`) REFERENCES `tbtypeperson` (`idtypeperson`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1 AVG_ROW_LENGTH=5461; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `tbscreen_permission` --
LOCK TABLES `tbscreen_permission` WRITE; /*!40000 ALTER TABLE `tbscreen_permission` DISABLE KEYS */; INSERT INTO `tbscreen_permission` VALUES (1,1,2,'person_name','N'),(2,1,2,'ssn_cpf','Y'),(3,1,2,'person_cellphone','Y'); /*!40000 ALTER TABLE `tbscreen_permission` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `tbstate` --
DROP TABLE IF EXISTS `tbstate`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `tbstate` ( `idstate` int(11) NOT NULL AUTO_INCREMENT, `idcountry` int(11) NOT NULL, `abbr` varchar(15) DEFAULT NULL, `name` varchar(60) DEFAULT NULL, PRIMARY KEY (`idstate`), KEY `fk_tbstate_tbcountry1` (`idcountry`), CONSTRAINT `fk_tbstate_tbcountry1` FOREIGN KEY (`idcountry`) REFERENCES `tbcountry` (`idcountry`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=1099 DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `tbstate` --
LOCK TABLES `tbstate` WRITE; /*!40000 ALTER TABLE `tbstate` DISABLE KEYS */; INSERT INTO `tbstate` VALUES (1,1,'AA','Choose'),(1098,227,'AL','Alabama'); /*!40000 ALTER TABLE `tbstate` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `tbstreet` --
DROP TABLE IF EXISTS `tbstreet`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `tbstreet` ( `idstreet` int(11) NOT NULL AUTO_INCREMENT, `idtypestreet` int(11) NOT NULL, `name` varchar(100) DEFAULT NULL, PRIMARY KEY (`idstreet`), KEY `fk_tbstreet_tbtypestreet1` (`idtypestreet`), CONSTRAINT `fk_tbstreet_tbtypestreet1` FOREIGN KEY (`idtypestreet`) REFERENCES `tbtypestreet` (`idtypestreet`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=61 DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `tbstreet` --
LOCK TABLES `tbstreet` WRITE; /*!40000 ALTER TABLE `tbstreet` DISABLE KEYS */; INSERT INTO `tbstreet` VALUES (1,1,'Choose'),(60,309,'Bennett Dr'); /*!40000 ALTER TABLE `tbstreet` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `tbteste` --
DROP TABLE IF EXISTS `tbteste`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `tbteste` ( `idex` int(4) NOT NULL AUTO_INCREMENT, `name` varchar(100) NOT NULL, `age` int(3) NOT NULL, PRIMARY KEY (`idex`) ) ENGINE=MyISAM AUTO_INCREMENT=13 DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `tbteste` --
LOCK TABLES `tbteste` WRITE; /*!40000 ALTER TABLE `tbteste` DISABLE KEYS */; INSERT INTO `tbteste` VALUES (1,'teste 2',123),(2,'Alejandro',20),(3,'Deivisson',26),(5,'Fulano 5',54); /*!40000 ALTER TABLE `tbteste` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `tbtheme` --
DROP TABLE IF EXISTS `tbtheme`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `tbtheme` ( `idtheme` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(45) DEFAULT NULL, PRIMARY KEY (`idtheme`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `tbtheme` --
LOCK TABLES `tbtheme` WRITE; /*!40000 ALTER TABLE `tbtheme` DISABLE KEYS */; INSERT INTO `tbtheme` VALUES (1,'Mq Theme'),(2,'Usbs Theme'); /*!40000 ALTER TABLE `tbtheme` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `tbtracker` --
DROP TABLE IF EXISTS `tbtracker`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `tbtracker` ( `idtracker` int(11) NOT NULL AUTO_INCREMENT, `idemail` int(11) NOT NULL, `campaign` varchar(255) DEFAULT NULL, `ipaddress` varchar(39) DEFAULT NULL, `php_self` varchar(255) DEFAULT NULL COMMENT 'The filename of the currently executing script, relative to the document root', `http_user_agent` varchar(255) DEFAULT NULL COMMENT 'This is a string denoting the user agent being which is accessing the page', `http_referer` varchar(255) DEFAULT NULL COMMENT 'The address of the page (if any) which referred the user agent to the current page.', `request_uri` varchar(255) DEFAULT NULL COMMENT 'The URI which was given in order to access this page', `request_time` int(11) DEFAULT NULL COMMENT 'The timestamp of the start of the request', `date` datetime DEFAULT NULL, PRIMARY KEY (`idtracker`), KEY `IDX_tbtracker_date` (`date`), KEY `IDX_tbtracker_campaign` (`campaign`), KEY `FK_tbtracker` (`idemail`), CONSTRAINT `FK_tbtracker` FOREIGN KEY (`idemail`) REFERENCES `tbemail` (`idemail`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `tbtracker` --
LOCK TABLES `tbtracker` WRITE; /*!40000 ALTER TABLE `tbtracker` DISABLE KEYS */; /*!40000 ALTER TABLE `tbtracker` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `tbtypeaddress` --
DROP TABLE IF EXISTS `tbtypeaddress`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `tbtypeaddress` ( `idtypeaddress` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(45) DEFAULT NULL, PRIMARY KEY (`idtypeaddress`) ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `tbtypeaddress` --
LOCK TABLES `tbtypeaddress` WRITE; /*!40000 ALTER TABLE `tbtypeaddress` DISABLE KEYS */; INSERT INTO `tbtypeaddress` VALUES (1,'Choose'),(2,'residential'),(3,'commercial'); /*!40000 ALTER TABLE `tbtypeaddress` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `tbtypelogin` --
DROP TABLE IF EXISTS `tbtypelogin`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `tbtypelogin` ( `idtypelogin` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(45) DEFAULT NULL, PRIMARY KEY (`idtypelogin`) ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `tbtypelogin` --
LOCK TABLES `tbtypelogin` WRITE; /*!40000 ALTER TABLE `tbtypelogin` DISABLE KEYS */; INSERT INTO `tbtypelogin` VALUES (1,'POP'),(2,'AD'),(3,'HD'),(4,'REQUEST'); /*!40000 ALTER TABLE `tbtypelogin` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `tbtypeperson` --
DROP TABLE IF EXISTS `tbtypeperson`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `tbtypeperson` ( `idtypeperson` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(45) DEFAULT NULL, `permissiongroup` char(1) DEFAULT 'N', PRIMARY KEY (`idtypeperson`) ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `tbtypeperson` --
LOCK TABLES `tbtypeperson` WRITE; /*!40000 ALTER TABLE `tbtypeperson` DISABLE KEYS */; INSERT INTO `tbtypeperson` VALUES (1,'admin','N'),(2,'user','N'),(3,'operator','N'),(4,'costumer','N'),(5,'partner','N'),(6,'group','N'); /*!40000 ALTER TABLE `tbtypeperson` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `tbtypeperson_plus` --
DROP TABLE IF EXISTS `tbtypeperson_plus`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `tbtypeperson_plus` ( `idtypepersonplus` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(45) DEFAULT NULL, PRIMARY KEY (`idtypepersonplus`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `tbtypeperson_plus` --
LOCK TABLES `tbtypeperson_plus` WRITE; /*!40000 ALTER TABLE `tbtypeperson_plus` DISABLE KEYS */; INSERT INTO `tbtypeperson_plus` VALUES (1,'Google'),(2,'Facebook'); /*!40000 ALTER TABLE `tbtypeperson_plus` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `tbtypepersonpermission` --
DROP TABLE IF EXISTS `tbtypepersonpermission`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `tbtypepersonpermission` ( `idpermissiongroup` int(4) NOT NULL AUTO_INCREMENT, `idprogram` int(4) NOT NULL, `idtypeperson` int(4) NOT NULL, `idaccesstype` int(4) NOT NULL, `allow` char(1) NOT NULL DEFAULT 'Y', PRIMARY KEY (`idpermissiongroup`), KEY `FK_tbpermissiongroup` (`idprogram`), KEY `FK_tbpermissiongroup2` (`idtypeperson`), KEY `FK_tbpermissiongroup3` (`idaccesstype`), CONSTRAINT `FK_tbpermissiongroup` FOREIGN KEY (`idprogram`) REFERENCES `tbprogram` (`idprogram`), CONSTRAINT `FK_tbpermissiongroup2` FOREIGN KEY (`idtypeperson`) REFERENCES `tbtypeperson` (`idtypeperson`), CONSTRAINT `FK_tbpermissiongroup3` FOREIGN KEY (`idaccesstype`) REFERENCES `tbaccesstype` (`idaccesstype`) ) ENGINE=InnoDB AUTO_INCREMENT=1055 DEFAULT CHARSET=latin1 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `tbtypepersonpermission` --
LOCK TABLES `tbtypepersonpermission` WRITE; /*!40000 ALTER TABLE `tbtypepersonpermission` DISABLE KEYS */; INSERT INTO `tbtypepersonpermission` VALUES (1,1,1,1,'Y'),(2,1,2,1,'N'),(3,1,3,1,'Y'),(4,1,4,1,'N'),(5,1,5,1,'N'),(6,1,1,2,'Y'),(7,1,2,2,'N'),(8,1,3,2,'Y'),(9,1,4,2,'N'),(10,1,5,2,'N'),(11,1,1,3,'Y'),(12,1,2,3,'N'),(13,1,3,3,'Y'),(14,1,4,3,'N'),(15,1,5,3,'N'),(16,1,1,4,'Y'),(17,1,2,4,'N'),(18,1,3,4,'N'),(19,1,4,4,'N'),(20,1,5,4,'N'),(21,2,1,1,'Y'),(22,2,2,1,'N'),(23,2,3,1,'N'),(24,2,4,1,'N'),(25,2,5,1,'N'),(26,2,1,2,'Y'),(27,2,2,2,'N'),(28,2,3,2,'N'),(29,2,4,2,'N'),(30,2,5,2,'N'),(31,2,1,3,'Y'),(32,2,2,3,'N'),(33,2,3,3,'N'),(34,2,4,3,'N'),(35,2,5,3,'N'),(36,2,1,4,'Y'),(37,2,2,4,'N'),(38,2,3,4,'N'),(39,2,4,4,'N'),(40,2,5,4,'N'),(41,3,1,1,'Y'),(42,3,2,1,'N'),(43,3,3,1,'N'),(44,3,4,1,'N'),(45,3,5,1,'N'),(46,3,1,2,'Y'),(47,3,2,2,'N'),(48,3,3,2,'N'),(49,3,4,2,'N'),(50,3,5,2,'N'),(51,3,1,3,'Y'),(52,3,2,3,'N'),(53,3,3,3,'N'),(54,3,4,3,'N'),(55,3,5,3,'N'),(56,3,1,4,'Y'),(57,3,2,4,'N'),(58,3,3,4,'N'),(59,3,4,4,'N'),(60,3,5,4,'N'),(61,4,1,1,'Y'),(62,4,2,1,'N'),(63,4,3,1,'N'),(64,4,4,1,'N'),(65,4,5,1,'N'),(66,4,1,2,'Y'),(67,4,2,2,'N'),(68,4,3,2,'N'),(69,4,4,2,'N'),(70,4,5,2,'N'),(71,4,1,3,'Y'),(72,4,2,3,'N'),(73,4,3,3,'N'),(74,4,4,3,'N'),(75,4,5,3,'N'),(76,4,1,4,'Y'),(77,4,2,4,'N'),(78,4,3,4,'N'),(79,4,4,4,'N'),(80,4,5,4,'N'),(121,7,1,1,'Y'),(122,7,2,1,'N'),(123,7,3,1,'N'),(124,7,4,1,'N'),(125,7,5,1,'N'),(126,7,1,2,'Y'),(127,7,2,2,'N'),(128,7,3,2,'N'),(129,7,4,2,'N'),(130,7,5,2,'N'),(131,7,1,3,'Y'),(132,7,2,3,'N'),(133,7,3,3,'N'),(134,7,4,3,'N'),(135,7,5,3,'N'),(136,7,1,4,'Y'),(137,7,2,4,'N'),(138,7,3,4,'N'),(139,7,4,4,'N'),(140,7,5,4,'N'),(161,9,1,1,'Y'),(162,9,2,1,'N'),(163,9,3,1,'N'),(164,9,4,1,'N'),(165,9,5,1,'N'),(166,9,1,2,'Y'),(167,9,2,2,'N'),(168,9,3,2,'N'),(169,9,4,2,'N'),(170,9,5,2,'N'),(171,9,1,3,'Y'),(172,9,2,3,'N'),(173,9,3,3,'N'),(174,9,4,3,'N'),(175,9,5,3,'N'),(176,9,1,4,'Y'),(177,9,2,4,'N'),(178,9,3,4,'N'),(179,9,4,4,'N'),(180,9,5,4,'N'),(221,12,1,1,'Y'),(222,12,2,1,'N'),(223,12,3,1,'N'),(224,12,4,1,'N'),(225,12,5,1,'N'),(226,12,1,2,'Y'),(227,12,2,2,'N'),(228,12,3,2,'N'),(229,12,4,2,'N'),(230,12,5,2,'N'),(231,12,1,3,'Y'),(232,12,2,3,'N'),(233,12,3,3,'N'),(234,12,4,3,'N'),(235,12,5,3,'N'),(236,12,1,4,'Y'),(237,12,2,4,'N'),(238,12,3,4,'N'),(239,12,4,4,'N'),(240,12,5,4,'N'),(281,16,1,1,'Y'),(282,16,2,1,'N'),(283,16,3,1,'N'),(284,16,4,1,'N'),(285,16,5,1,'N'),(286,16,1,2,'Y'),(287,16,2,2,'N'),(288,16,3,2,'N'),(289,16,4,2,'N'),(290,16,5,2,'N'),(291,16,1,3,'Y'),(292,16,2,3,'N'),(293,16,3,3,'N'),(294,16,4,3,'N'),(295,16,5,3,'N'),(296,16,1,4,'Y'),(297,16,2,4,'N'),(298,16,3,4,'N'),(299,16,4,4,'N'),(300,16,5,4,'N'),(341,23,1,1,'Y'),(342,23,2,1,'N'),(343,23,3,1,'N'),(344,23,4,1,'N'),(345,23,5,1,'N'),(346,23,1,2,'Y'),(347,23,2,2,'N'),(348,23,3,2,'N'),(349,23,4,2,'N'),(350,23,5,2,'N'),(351,23,1,3,'Y'),(352,23,2,3,'N'),(353,23,3,3,'N'),(354,23,4,3,'N'),(355,23,5,3,'N'),(356,23,1,4,'Y'),(357,23,2,4,'N'),(358,23,3,4,'N'),(359,23,4,4,'N'),(360,23,5,4,'N'),(381,2,1,5,'Y'),(382,2,2,5,'N'),(383,2,3,5,'N'),(384,2,4,5,'N'),(385,2,5,5,'N'),(386,32,1,1,'Y'),(387,32,1,2,'Y'),(388,32,1,3,'Y'),(592,61,1,1,'Y'),(593,61,2,1,'N'),(594,61,3,1,'N'),(595,61,4,1,'N'),(596,61,5,1,'N'),(597,61,1,2,'Y'),(598,61,2,2,'N'),(599,61,3,2,'N'),(600,61,4,2,'N'),(601,61,5,2,'N'),(602,61,1,3,'Y'),(603,61,2,3,'N'),(604,61,3,3,'N'),(605,61,4,3,'N'),(606,61,5,3,'N'),(607,61,1,4,'N'),(608,61,2,4,'N'),(609,61,3,4,'N'),(610,61,4,4,'N'),(611,61,5,4,'N'),(840,73,1,1,'Y'),(841,73,2,1,'N'),(842,73,3,1,'N'),(843,73,4,1,'N'),(844,73,5,1,'N'),(845,73,6,1,'N'),(846,73,1,2,'Y'),(847,73,2,2,'N'),(848,73,3,2,'N'),(849,73,4,2,'N'),(850,73,5,2,'N'),(851,73,6,2,'N'),(852,73,1,5,'Y'),(853,73,2,5,'N'),(854,73,3,5,'N'),(855,73,4,5,'N'),(856,73,5,5,'N'),(857,73,6,5,'N'),(858,74,1,1,'Y'),(859,74,1,2,'Y'),(860,74,1,3,'Y'),(861,74,1,4,'Y'),(862,74,1,5,'N'),(941,79,1,1,'Y'),(942,79,2,1,'N'),(943,79,3,1,'N'),(944,79,4,1,'N'),(945,79,5,1,'N'),(946,79,6,1,'N'),(947,79,1,2,'Y'),(948,79,2,2,'N'),(949,79,3,2,'N'),(950,79,4,2,'N'),(951,79,5,2,'N'),(952,79,6,2,'N'),(953,79,1,3,'Y'),(954,79,2,3,'N'),(955,79,3,3,'N'),(956,79,4,3,'N'),(957,79,5,3,'N'),(958,79,6,3,'N'),(959,79,1,4,'Y'),(960,79,2,4,'N'),(961,79,3,4,'N'),(962,79,4,4,'N'),(963,79,5,4,'N'),(964,79,6,4,'N'),(995,81,1,1,'Y'),(996,81,2,1,'N'),(997,81,3,1,'N'),(998,81,4,1,'N'),(999,81,5,1,'N'),(1000,81,6,1,'N'),(1001,81,1,2,'Y'),(1002,81,2,2,'N'),(1003,81,3,2,'N'),(1004,81,4,2,'N'),(1005,81,5,2,'N'),(1006,81,6,2,'N'),(1007,81,1,3,'Y'),(1008,81,2,3,'N'),(1009,81,3,3,'N'),(1010,81,4,3,'N'),(1011,81,5,3,'N'),(1012,81,6,3,'N'),(1013,81,1,4,'Y'),(1014,81,2,4,'N'),(1015,81,3,4,'N'),(1016,81,4,4,'N'),(1017,81,5,4,'N'),(1018,81,6,4,'N'),(1019,81,1,5,'N'),(1020,81,2,5,'N'),(1021,81,3,5,'N'),(1022,81,4,5,'N'),(1023,81,5,5,'N'),(1024,81,6,5,'N'),(1025,81,1,6,'N'),(1026,81,2,6,'N'),(1027,81,3,6,'N'),(1028,81,4,6,'N'),(1029,81,5,6,'N'),(1030,81,6,6,'N'),(1031,82,1,1,'Y'),(1032,82,2,1,'N'),(1033,82,3,1,'N'),(1034,82,4,1,'N'),(1035,82,5,1,'N'),(1036,82,6,1,'N'),(1037,82,1,2,'Y'),(1038,82,2,2,'N'),(1039,82,3,2,'N'),(1040,82,4,2,'N'),(1041,82,5,2,'N'),(1042,82,6,2,'N'),(1043,82,1,3,'Y'),(1044,82,2,3,'N'),(1045,82,3,3,'N'),(1046,82,4,3,'N'),(1047,82,5,3,'N'),(1048,82,6,3,'N'),(1049,82,1,4,'Y'),(1050,82,2,4,'N'),(1051,82,3,4,'N'),(1052,82,4,4,'N'),(1053,82,5,4,'N'),(1054,82,6,4,'N'); /*!40000 ALTER TABLE `tbtypepersonpermission` ENABLE KEYS */; UNLOCK TABLES;
-- -- Table structure for table `tbtypestreet` --
DROP TABLE IF EXISTS `tbtypestreet`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `tbtypestreet` ( `idtypestreet` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(45) DEFAULT NULL, `abbr` varchar(15) DEFAULT NULL, `location` char(20) DEFAULT NULL, PRIMARY KEY (`idtypestreet`) ) ENGINE=InnoDB AUTO_INCREMENT=340 DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */;
-- -- Dumping data for table `tbtypestreet` --
LOCK TABLES `tbtypestreet` WRITE; /*!40000 ALTER TABLE `tbtypestreet` DISABLE KEYS */; INSERT INTO `tbtypestreet` VALUES (1,'Choose','AAA','pt_BR'),(2,'Avenue','AVE','pt_BR'),(4,'Street','ST','pt_BR'),(5,'Alameda','AL','pt_BR'),(6,'Acesso','AC','pt_BR'),(7,'Adro','AD','pt_BR'),(8,'Aeroporto','ERA','pt_BR'),(9,'Alameda','AL','pt_BR'),(10,'Alto','AT','pt_BR'),(11,'�rea','A','pt_BR'),(12,'�rea Especial','AE','pt_BR'),(13,'Art�ria','ART','pt_BR'),(14,'Atalho','ATL','pt_BR'),(15,'Avenida','AV','pt_BR'),(16,'Avenida Contorno','AV-CONT','pt_BR'),(17,'Baixa','BX','pt_BR'),(18,'Bal�o','BLO','pt_BR'),(19,'Balne�rio','BAL','pt_BR'),(20,'Beco','BC','pt_BR'),(21,'Belvedere','BELV','pt_BR'),(22,'Bloco','BL','pt_BR'),(23,'Bosque','BSQ','pt_BR'),(24,'Boulevard','BVD','pt_BR'),(25,'Buraco','BCO','pt_BR'),(26,'Cais','C','pt_BR'),(27,'Cal�ada','CALC','pt_BR'),(28,'Caminho','CAM','pt_BR'),(29,'Campo','CPO','pt_BR'),(30,'Canal','CAN','pt_BR'),(31,'Ch�cara','CH','pt_BR'),(32,'Chapad�o','CHAP','pt_BR'),(33,'Circular','CIRC','pt_BR'),(34,'Col�nia','COL','pt_BR'),(35,'Complexo Vi�rio','CMP-VR','pt_BR'),(36,'Condom�nio','COND','pt_BR'),(37,'Conjunto','CJ','pt_BR'),(38,'Corredor','COR','pt_BR'),(39,'C�rrego','CRG','pt_BR'),(40,'Descida','DSC','pt_BR'),(41,'Desvio','DSV','pt_BR'),(42,'Distrito','DT','pt_BR'),(43,'Elevada','EVD','pt_BR'),(44,'Entrada Particular','ENT-PART','pt_BR'),(45,'Entre Quadra','EQ','pt_BR'),(46,'Escada','ESC','pt_BR'),(47,'Esplanada','ESP','pt_BR'),(48,'Esta��o','ETC','pt_BR'),(49,'Estacionamento','ESTC','pt_BR'),(50,'Est�dio','ETD','pt_BR'),(51,'Est�ncia','ETN','pt_BR'),(52,'Estrada','EST','pt_BR'),(53,'Estrada Municipal','EST-MUN','pt_BR'),(54,'Favela','FAV','pt_BR'),(55,'Fazenda','FAZ','pt_BR'),(56,'Feira','FRA','pt_BR'),(57,'Ferrovia','FER','pt_BR'),(58,'Fonte','FNT','pt_BR'),(59,'Forte','FTE','pt_BR'),(60,'Galeria','GAL','pt_BR'),(61,'Granja','GJA','pt_BR'),(62,'Habitacional','HAB','pt_BR'),(63,'Ilha','IA','pt_BR'),(64,'Jardim','JD','pt_BR'),(65,'Jardinete','JDE','pt_BR'),(66,'Ladeira','LD','pt_BR'),(67,'Lago','LG','pt_BR'),(68,'Lagoa','LGA','pt_BR'),(69,'Largo','LRG','pt_BR'),(70,'Loteamento','LOT','pt_BR'),(71,'Marina','MNA','pt_BR'),(72,'M�dulo','MOD','pt_BR'),(73,'Monte','TEM','pt_BR'),(74,'Morro','MRO','pt_BR'),(75,'N�cleo','NUC','pt_BR'),(76,'Parada','PDA','pt_BR'),(77,'Paradouro','PDO','pt_BR'),(78,'Paralela','PAR','pt_BR'),(79,'Parque','PRQ','pt_BR'),(80,'Passagem','PSG','pt_BR'),(81,'Passagem Subterr�nea','PSC-SUB','pt_BR'),(82,'Passarela','PSA','pt_BR'),(83,'Passeio','PAS','pt_BR'),(84,'P�tio','PAT','pt_BR'),(85,'Ponta','PNT','pt_BR'),(86,'Ponte','PTE','pt_BR'),(87,'Porto','PTO','pt_BR'),(88,'Pra�a','PC','pt_BR'),(89,'Pra�a de Esportes','PC-ESP','pt_BR'),(90,'Praia','PR','pt_BR'),(91,'Prolongamento','PRL','pt_BR'),(92,'Quadra','Q','pt_BR'),(93,'Quinta','QTA','pt_BR'),(94,'Ane Quintas','QTASRodo','pt_BR'),(95,'Ramal','RAM','pt_BR'),(96,'Rampa','RMP','pt_BR'),(97,'Recanto','REC','pt_BR'),(98,'Residencial','RES','pt_BR'),(99,'Reta','RET','pt_BR'),(100,'Retiro','RER','pt_BR'),(101,'Retorno','RTN','pt_BR'),(102,'Rodo Anel','ROD-AN','pt_BR'),(103,'Rodovia','ROD','pt_BR'),(104,'Rotat�ria','RTT','pt_BR'),(105,'R�tula','ROT','pt_BR'),(106,'Rua','R','pt_BR'),(107,'Rua de Liga��o','R-LIG','pt_BR'),(108,'Rua de Pedestre','R-PED','pt_BR'),(109,'Servid�o','SRV','pt_BR'),(110,'Setor','ST','pt_BR'),(111,'S�tio','SIT','pt_BR'),(112,'Subida','SUB','pt_BR'),(113,'Terminal','TER','pt_BR'),(114,'Travessa','TV','pt_BR'),(115,'Travessa Particular','TV-PART','pt_BR'),(116,'Trecho','TRC','pt_BR'),(117,'Trevo','TRV','pt_BR'),(118,'Trincheira','TCH','pt_BR'),(119,'T�nel','TUN','pt_BR'),(120,'Unidade','UNID','pt_BR'),(121,'Vala','VAL','pt_BR'),(122,'Vale','VLE','pt_BR'),(123,'Variante','VRTE','pt_BR'),(124,'Vereda','VER','pt_BR'),(125,'Via','V','pt_BR'),(126,'Via de Acesso','V-AC','pt_BR'),(127,'Via de Pedestre','V-PED','pt_BR'),(128,'Via Elevado','V-EVD','pt_BR'),(129,'Via Expressa','V-EXP','pt_BR'),(130,'Viaduto','VD','pt_BR'),(131,'Viela','VLA','pt_BR'),(132,'Vila','VL','pt_BR'),(133,'Zigue-Zague','ZIG-ZAG','pt_BR'),(134,'ALLEY','ALY','en_US'),(135,'ANEX','ANX','en_US'),(136,'ARCADE','ARC','en_US'),(137,'AVENUE','AVE','en_US'),(138,'BAYOU','BYU','en_US'),(139,'BEACH','BCH','en_US'),(140,'BEND','BND','en_US'),(141,'BLUFF','BLF','en_US'),(142,'BLUFFS','BLFS','en_US'),(143,'BOTTOM','BTM','en_US'),(144,'BOULEVARD','BLVD','en_US'),(145,'BRANCH','BR','en_US'),(146,'BRIDGE','BRG','en_US'),(147,'BROOK','BRK','en_US'),(148,'BROOKS','BRKS','en_US'),(149,'BURG','BG','en_US'),(150,'BURGS','BGS','en_US'),(151,'BYPASS','BYP','en_US'),(152,'CAMP','CP','en_US'),(153,'CANYON','CYN','en_US'),(154,'CAPE','CPE','en_US'),(155,'CAUSEWAY','CSWY','en_US'),(156,'CENTER','CTR','en_US'),(157,'CENTERS','CTRS','en_US'),(158,'CIRCLE','CIR','en_US'),(159,'CIRCLES','CIRS','en_US'),(160,'CLIFF','CLF','en_US'),(161,'CLIFFS','CLFS','en_US'),(162,'CLUB','CLB','en_US'),(163,'COMMON','CMN','en_US'),(164,'COMMONS','CMNS','en_US'),(165,'CORNER','COR','en_US'),(166,'CORNERS','CORS','en_US'),(167,'COURSE','CRSE','en_US'),(168,'COURT','CT','en_US'),(169,'COURTS','CTS','en_US'),(170,'COVE','CV','en_US'),(171,'COVES','CVS','en_US'),(172,'CREEK','CRK','en_US'),(173,'CRESCENT','CRES','en_US'),(174,'CREST','CRST','en_US'),(175,'CROSSING','XING','en_US'),(176,'CROSSROAD','XRD','en_US'),(177,'CROSSROADS','XRDS','en_US'),(178,'CURVE ','CURV','en_US'),(179,'DALE','DL','en_US'),(180,'DAM','DM','en_US'),(181,'DIVIDE','DV','en_US'),(182,'DRIVE','DR','en_US'),(183,'DRIVES','DRS','en_US'),(184,'ESTATE','EST','en_US'),(185,'ESTATES','ESTS','en_US'),(186,'EXPRESSWAY','EXPY','en_US'),(187,'EXTENSION','EXT','en_US'),(188,'EXTENSIONS','EXTS','en_US'),(189,'FALL','FALL','en_US'),(190,'FALLS','FLS','en_US'),(191,'FERRY','FRY','en_US'),(192,'FIELD','FLD','en_US'),(193,'FIELDS','FLDS','en_US'),(194,'FLAT','FLT','en_US'),(195,'FLATS','FLTS','en_US'),(196,'FORD','FRD','en_US'),(197,'FORDS','FRDS','en_US'),(198,'FOREST','FRST','en_US'),(199,'FORGE','FRG','en_US'),(200,'FORGES','FRGS','en_US'),(201,'FORK','FRK','en_US'),(202,'FORKS','FRKS','en_US'),(203,'FORT','FT','en_US'),(204,'FREEWAY','FWY','en_US'),(205,'GARDEN','GDN','en_US'),(206,'GARDENS','GDNS','en_US'),(207,'GATEWAY','GTWY','en_US'),(208,'GLEN','GLN','en_US'),(209,'GLENS','GLNS','en_US'),(210,'GREEN','GRN','en_US'),(211,'GREENS','GRNS','en_US'),(212,'GROVE','GRV','en_US'),(213,'GROVES','GRVS','en_US'),(214,'HARBOR','HBR','en_US'),(215,'HARBORS','HBRS','en_US'),(216,'HAVEN','HVN','en_US'),(217,'HEIGHTS','HTS','en_US'),(218,'HIGHWAY','HWY','en_US'),(219,'HILL','HL','en_US'),(220,'HILLS','HLS','en_US'),(221,'HOLLOW','HOLW','en_US'),(222,'INLET','INLT','en_US'),(223,'ISLAND','IS','en_US'),(224,'ISLANDS','ISS','en_US'),(225,'ISLE','ISLE','en_US'),(226,'JUNCTION','JCT','en_US'),(227,'JUNCTIONS','JCTS','en_US'),(228,'KEY','KY','en_US'),(229,'KEYS','KYS','en_US'),(230,'KNOLL','KNL ','en_US'),(231,'KNOLLS','KNLS','en_US'),(232,'LAKE','LK','en_US'),(233,'LAKES','LKS','en_US'),(234,'LAND','LAND','en_US'),(235,'LANDING','LNDG','en_US'),(236,'LANE','LN','en_US'),(237,'LIGHT','LGT','en_US'),(238,'LIGHTS','LGTS','en_US'),(239,'LOAF','LF','en_US'),(240,'LOCK','LCK','en_US'),(241,'LOCKS','LCKS','en_US'),(242,'LODGE','LDG','en_US'),(243,'LOOP','LOOP','en_US'),(244,'MALL','MALL','en_US'),(245,'MANOR','MNR','en_US'),(246,'MANORS','MNRS','en_US'),(247,'MEADOW','MDW','en_US'),(248,'MEADOWS','MDWS','en_US'),(249,'MEWS','MEWS','en_US'),(250,'MILL','ML','en_US'),(251,'MILLS','MLS','en_US'),(252,'MISSION','MSN','en_US'),(253,'MOTORWAY','MTWY','en_US'),(254,'MOUNT','MT','en_US'),(255,'MOUNTAIN','MTN','en_US'),(256,'MOUNTAINS','MTNS','en_US'),(257,'NECK','NCK','en_US'),(258,'ORCHARD','ORCH','en_US'),(259,'OVAL','OVAL','en_US'),(260,'OVERPASS','OPAS','en_US'),(261,'PARK','PARK','en_US'),(262,'PARKS','PARK','en_US'),(263,'PARKWAY','PKWY','en_US'),(264,'PARKWAYS','PKWY','en_US'),(265,'PASS','PASS','en_US'),(266,'PASSAGE','PSGE','en_US'),(267,'PATH','PATH','en_US'),(268,'PIKE','PIKE','en_US'),(269,'PINE','PNE ','en_US'),(270,'PINES','PNES','en_US'),(271,'PLACE','PL','en_US'),(272,'PLAIN','PLN','en_US'),(273,'PLAINS','PLNS','en_US'),(274,'PLAZA','PLZ','en_US'),(275,'POINT','PT','en_US'),(276,'POINTS','PTS','en_US'),(277,'PORT','PRT','en_US'),(278,'PORTS','PRTS','en_US'),(279,'PRAIRIE','PR','en_US'),(280,'RADIAL','RADL','en_US'),(281,'RAMP','RAMP','en_US'),(282,'RANCH','RNCH','en_US'),(283,'RAPID','RPD','en_US'),(284,'RAPIDS','RPDS','en_US'),(285,'REST','RST','en_US'),(286,'RIDGE','RDG','en_US'),(287,'RIDGES','RDGS','en_US'),(288,'RIVER','RIV','en_US'),(289,'ROAD','RD','en_US'),(290,'ROADS','RDS','en_US'),(291,'ROUTE','RTE','en_US'),(292,'ROW','ROW','en_US'),(293,'RUE','RUE','en_US'),(294,'RUN','RUN','en_US'),(295,'SHOAL','SHL','en_US'),(296,'SHOALS','SHLS','en_US'),(297,'SHORE','SHR','en_US'),(298,'SHORES','SHRS','en_US'),(299,'SKYWAY','SKWY','en_US'),(300,'SPRING','SPG','en_US'),(301,'SPRINGS','SPGS','en_US'),(302,'SPUR','SPUR','en_US'),(303,'SPURS','SPUR','en_US'),(304,'SQUARE','SQ','en_US'),(305,'SQUARES','SQS','en_US'),(306,'STATION','STA','en_US'),(307,'STRAVENUE','STRA','en_US'),(308,'STREAM','STRM','en_US'),(309,'STREET','ST','en_US'),(310,'STREETS','STS','en_US'),(311,'SUMMIT','SMT','en_US'),(312,'TERRACE','TER','en_US'),(313,'THROUGHWAY','TRWY','en_US'),(314,'TRACE','TRCE','en_US'),(315,'TRACK','TRAK','en_US'),(316,'TRAFFICWAY','TRFY','en_US'),(317,'TRAIL','TRL','en_US'),(318,'TRAILER','TRLR','en_US'),(319,'TUNNEL','TUNL','en_US'),(320,'TURNPIKE','TPKE','en_US'),(321,'UNDERPASS','UPAS','en_US'),(322,'UNION','UN','en_US'),(323,'UNIONS','UNS','en_US'),(324,'VALLEY','VLY','en_US'),(325,'VALLEYS','VLYS','en_US'),(326,'VIADUCT','VIA','en_US'),(327,'VIEW','VW','en_US'),(328,'VIEWS','VWS','en_US'),(329,'VILLAGE','VLG','en_US'),(330,'VILLAGES','VLGS','en_US'),(331,'VILLE','VL','en_US'),(332,'VISTA','VIS','en_US'),(333,'WALK','WALK','en_US'),(334,'WALKS','WALK','en_US'),(335,'WALL','WALL','en_US'),(336,'WAY','WAY','en_US'),(337,'WAYS','WAYS','en_US'),(338,'WELL','WL','en_US'),(339,'WELLS','WLS','en_US'); /*!40000 ALTER TABLE `tbtypestreet` ENABLE KEYS */; UNLOCK TABLES;
-- -- Dumping routines for database 'helpdezk1110' -- /*!50003 DROP FUNCTION IF EXISTS `pipeFormatCnpj` */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; /*!50003 SET @saved_col_connection = @@collation_connection */ ; /*!50003 SET character_set_client = latin1 */ ; /*!50003 SET character_set_results = latin1 */ ; /*!50003 SET collation_connection = latin1_swedish_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; CREATE FUNCTION `pipeFormatCnpj`( cnpj varchar(20)) RETURNS varchar(18) CHARSET utf8 BEGIN DECLARE l_ret VARCHAR(18); SET cnpj = REPLACE(cnpj,'.',''); SET cnpj = REPLACE(cnpj,'-',''); SET cnpj = REPLACE(cnpj,' ',''); SET cnpj = TRIM(cnpj); SET l_ret = cnpj; SET l_ret = CONCAT(MID(l_ret,1,2),'.',MID(l_ret,3,3),'.',MID(l_ret,6,3),'/',MID(l_ret,9,4),'-',MID(l_ret,13,2)); RETURN l_ret; END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; /*!50003 SET character_set_client = @saved_cs_client */ ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ; /*!50003 DROP FUNCTION IF EXISTS `pipeFormatCpf` */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; /*!50003 SET @saved_col_connection = @@collation_connection */ ; /*!50003 SET character_set_client = latin1 */ ; /*!50003 SET character_set_results = latin1 */ ; /*!50003 SET collation_connection = latin1_swedish_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; CREATE FUNCTION `pipeFormatCpf`( cpf varchar(20)) RETURNS varchar(14) CHARSET utf8 BEGIN DECLARE l_ret VARCHAR(14); SET cpf = REPLACE(cpf,'.',''); SET cpf = REPLACE(cpf,'-',''); SET cpf = REPLACE(cpf,' ',''); SET cpf = TRIM(cpf); SET l_ret = cpf; SET l_ret = CONCAT(MID(l_ret,1,3),'.',MID(l_ret,4,3),'.',MID(l_ret,7,3),'-',MID(l_ret,10,2)); RETURN l_ret; END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; /*!50003 SET character_set_client = @saved_cs_client */ ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ; /*!50003 DROP FUNCTION IF EXISTS `pipeFormatCurrency` */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; /*!50003 SET @saved_col_connection = @@collation_connection */ ; /*!50003 SET character_set_client = latin1 */ ; /*!50003 SET character_set_results = latin1 */ ; /*!50003 SET collation_connection = latin1_swedish_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; CREATE FUNCTION `pipeFormatCurrency`( timezone varchar(255), val varchar(255)) RETURNS varchar(100) CHARSET latin1 BEGIN DECLARE RET VARCHAR(100); IF (timezone = 'pt_BR' ) THEN SET RET = ( SELECT REPLACE (REPLACE (REPLACE (FORMAT(val, 2), '.', '|'),',','.' ),'|',',' ) ); ELSEIF (timezone = 'en_US' ) THEN SET RET = ( SELECT FORMAT (val,2) ); END IF; RETURN RET; END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; /*!50003 SET character_set_client = @saved_cs_client */ ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ; /*!50003 DROP FUNCTION IF EXISTS `pipeFormatDate` */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; /*!50003 SET @saved_col_connection = @@collation_connection */ ; /*!50003 SET character_set_client = latin1 */ ; /*!50003 SET character_set_results = latin1 */ ; /*!50003 SET collation_connection = latin1_swedish_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; CREATE FUNCTION `pipeFormatDate`( timezone varchar(255), val varchar(255)) RETURNS varchar(100) CHARSET latin1 BEGIN DECLARE RET VARCHAR(100); IF (timezone = 'pt_BR' ) THEN SET RET = ( SELECT DATE_FORMAT(val, '%d/%m/%Y') ); ELSEIF (timezone = 'en_US' ) THEN SET RET = ( SELECT DATE_FORMAT(val, '%m/%d/%Y') ); END IF; RETURN RET; END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; /*!50003 SET character_set_client = @saved_cs_client */ ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ; /*!50003 DROP FUNCTION IF EXISTS `pipeFormatDateTime` */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; /*!50003 SET @saved_col_connection = @@collation_connection */ ; /*!50003 SET character_set_client = latin1 */ ; /*!50003 SET character_set_results = latin1 */ ; /*!50003 SET collation_connection = latin1_swedish_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; CREATE FUNCTION `pipeFormatDateTime`( timezone varchar(255), val varchar(255)) RETURNS varchar(100) CHARSET latin1 BEGIN DECLARE RET VARCHAR(100); IF (timezone = 'pt_BR' ) THEN SET RET = ( SELECT DATE_FORMAT(val, '%d/%m/%Y %H:%i:%S') ); ELSEIF (timezone = 'en_US' ) THEN SET RET = ( SELECT DATE_FORMAT(val, '%m/%d/%Y %H:%i:%S' ) ); END IF; RETURN RET; END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; /*!50003 SET character_set_client = @saved_cs_client */ ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ; /*!50003 DROP FUNCTION IF EXISTS `pipeGetAge` */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; /*!50003 SET @saved_col_connection = @@collation_connection */ ; /*!50003 SET character_set_client = latin1 */ ; /*!50003 SET character_set_results = latin1 */ ; /*!50003 SET collation_connection = latin1_swedish_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; CREATE FUNCTION `pipeGetAge`( data_nascimento datetime) RETURNS int(11) BEGIN DECLARE idade INT; DECLARE ano_atual INT; DECLARE mes_atual INT; DECLARE dia_atual INT; DECLARE ano INT; DECLARE mes INT; DECLARE dia INT; SET ano_atual = YEAR(CURDATE()); SET mes_atual = MONTH( CURDATE()); SET dia_atual = DAY( CURDATE()); SET ano = YEAR( data_nascimento ); SET mes = MONTH( data_nascimento ); SET dia = DAY( data_nascimento ); SET idade = ano_atual - ano; IF( mes > mes_atual ) THEN SET idade = idade - 1; END IF; IF( mes = mes_atual AND dia > dia_atual ) THEN SET idade = idade - 1; END IF; RETURN idade; END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; /*!50003 SET character_set_client = @saved_cs_client */ ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ; /*!50003 DROP FUNCTION IF EXISTS `pipeIsAddressOk` */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; /*!50003 SET @saved_col_connection = @@collation_connection */ ; /*!50003 SET character_set_client = latin1 */ ; /*!50003 SET character_set_results = latin1 */ ; /*!50003 SET collation_connection = latin1_swedish_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; CREATE FUNCTION `pipeIsAddressOk`( id_person int(11)) RETURNS binary(1) BEGIN IF (SELECT count(idaddress) FROM tbaddress WHERE idperson = id_person AND (idcity=1 OR idneighborhood=1 OR idstreet=1)) > 0 THEN return FALSE; else return TRUE; end if; END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; /*!50003 SET character_set_client = @saved_cs_client */ ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ; /*!50003 DROP FUNCTION IF EXISTS `pipeLatinToUtf8` */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; /*!50003 SET @saved_col_connection = @@collation_connection */ ; /*!50003 SET character_set_client = latin1 */ ; /*!50003 SET character_set_results = latin1 */ ; /*!50003 SET collation_connection = latin1_swedish_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; CREATE FUNCTION `pipeLatinToUtf8`( texto char(255)) RETURNS char(255) CHARSET latin1 RETURN CONVERT(CAST(CONVERT(texto USING latin1) AS BINARY) USING utf8) ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; /*!50003 SET character_set_client = @saved_cs_client */ ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ; /*!50003 DROP FUNCTION IF EXISTS `pipeMask` */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; /*!50003 SET @saved_col_connection = @@collation_connection */ ; /*!50003 SET character_set_client = latin1 */ ; /*!50003 SET character_set_results = latin1 */ ; /*!50003 SET collation_connection = latin1_swedish_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; CREATE FUNCTION `pipeMask`( unformatted_value bigint(20), format_string char(32)) RETURNS char(32) CHARSET latin1 BEGIN DECLARE input_len TINYINT; DECLARE output_len TINYINT; DECLARE temp_char CHAR; SET input_len = LENGTH(unformatted_value); SET output_len = LENGTH(format_string); WHILE ( output_len > 0 ) DO SET temp_char = SUBSTR(format_string, output_len, 1); IF ( temp_char = '#' ) THEN IF ( input_len > 0 ) THEN SET format_string = INSERT(format_string, output_len, 1, SUBSTR(unformatted_value, input_len, 1)); SET input_len = input_len - 1; ELSE SET format_string = INSERT(format_string, output_len, 1, '0'); END IF; END IF; SET output_len = output_len - 1; END WHILE; RETURN format_string; END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; /*!50003 SET character_set_client = @saved_cs_client */ ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ; /*!50003 DROP FUNCTION IF EXISTS `pipeTableExists` */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; /*!50003 SET @saved_col_connection = @@collation_connection */ ; /*!50003 SET character_set_client = latin1 */ ; /*!50003 SET character_set_results = latin1 */ ; /*!50003 SET collation_connection = latin1_swedish_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; CREATE FUNCTION `pipeTableExists`( tablename varchar(45)) RETURNS tinyint(1) BEGIN DECLARE existe TINYINT(1) DEFAULT 0; SELECT COUNT(*) INTO existe FROM information_schema.tables WHERE table_schema = DATABASE() AND table_name = tablename; RETURN existe; END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; /*!50003 SET character_set_client = @saved_cs_client */ ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ; /*!50003 DROP PROCEDURE IF EXISTS `adm_createConfigTables` */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; /*!50003 SET @saved_col_connection = @@collation_connection */ ; /*!50003 SET character_set_client = latin1 */ ; /*!50003 SET character_set_results = latin1 */ ; /*!50003 SET collation_connection = latin1_swedish_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; CREATE PROCEDURE `adm_createConfigTables`(IN prefix varchar(5)) BEGIN SET @tableCatName = CONCAT(prefix,'_tbconfig_category'); SET @tableConfigName = CONCAT(prefix,'_tbconfig'); SET @drop1 = CONCAT('DROP TABLE IF EXISTS ', @tableCatName); PREPARE stmt FROM @drop1; EXECUTE stmt; DEALLOCATE PREPARE stmt; SET @qry1 = CONCAT('CREATE TABLE ', @tableCatName, '(idconfigcategory INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,\n\t\t\t\t\t`name` VARCHAR(250) DEFAULT NULL,\n\t\t\t\t\tsmarty VARCHAR(250) DEFAULT NULL,\n\t\t\t\t\tPRIMARY KEY (idconfigcategory),\n\t\t\t\t\tINDEX COD_CATEGORIA (idconfigcategory))' ); PREPARE stmt1 FROM @qry1; EXECUTE stmt1; DEALLOCATE PREPARE stmt1; SET @drop2 = CONCAT('DROP TABLE IF EXISTS ', @tableConfigName); PREPARE stmt2 FROM @drop2; EXECUTE stmt2; DEALLOCATE PREPARE stmt2; SET @qry2 = CONCAT("CREATE TABLE ", @tableConfigName, "(idconfig INT(3) UNSIGNED NOT NULL AUTO_INCREMENT,\n\t\t\t\t `name` VARCHAR(250) DEFAULT NULL,\n\t\t\t\t description BLOB DEFAULT NULL,\n\t\t\t\t idconfigcategory INT(10) UNSIGNED DEFAULT NULL,\n\t\t\t\t session_name VARCHAR(50) DEFAULT NULL,\n\t\t\t\t field_type VARCHAR(200) DEFAULT NULL,\n\t\t\t\t `status` CHAR(1) DEFAULT 'A',\n\t\t\t\t smarty VARCHAR(120) NOT NULL,\n\t\t\t\t `value` VARCHAR(200) DEFAULT NULL,\n\t\t\t\t PRIMARY KEY (idconfig),\n\t\t\t\t UNIQUE INDEX ",@tableConfigName,"_session_idx (session_name),\n\t\t\t\t CONSTRAINT FK_",@tableConfigName," FOREIGN KEY (idconfigcategory)\n\t\t\t\t REFERENCES ",@tableCatName," (idconfigcategory) ON DELETE RESTRICT ON UPDATE RESTRICT\n\t\t\t\t\t)" ); PREPARE stmt3 FROM @qry2; EXECUTE stmt3; DEALLOCATE PREPARE stmt3; END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; /*!50003 SET character_set_client = @saved_cs_client */ ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ; /*!50003 DROP PROCEDURE IF EXISTS `delete_all_requests` */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; /*!50003 SET @saved_col_connection = @@collation_connection */ ; /*!50003 SET character_set_client = latin1 */ ; /*!50003 SET character_set_results = latin1 */ ; /*!50003 SET collation_connection = latin1_swedish_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; CREATE PROCEDURE `delete_all_requests`() delete_request:BEGIN DELETE FROM hdk_tbrequest_dates ; DELETE FROM hdk_tbevaluation_token; DELETE FROM hdk_tbrequest_times ; DELETE FROM hdk_tbrequest_log ; DELETE FROM hdk_tbrequest_repassed ; DELETE FROM hdk_tbrequest_in_charge; DELETE FROM hdk_tbrequest_attachment ; DELETE FROM hdk_tbrequest_change_expire ; DELETE FROM hdk_tbrequest ; END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; /*!50003 SET character_set_client = @saved_cs_client */ ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ; /*!50003 DROP PROCEDURE IF EXISTS `delete_request` */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; /*!50003 SET @saved_col_connection = @@collation_connection */ ; /*!50003 SET character_set_client = latin1 */ ; /*!50003 SET character_set_results = latin1 */ ; /*!50003 SET collation_connection = latin1_swedish_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; CREATE PROCEDURE `delete_request`(IN code_ID varchar(20), OUT msg varchar(100)) delete_request:BEGIN DECLARE num_requests INT; SELECT COUNT(idrequest) INTO num_requests FROM hdk_tbrequest WHERE code_request = code_ID; IF ( num_requests = 0 ) THEN SET msg = "Request doesn´t exist !!!" ; LEAVE delete_request ; ELSE DELETE FROM hdk_tbrequest_dates WHERE code_request = code_ID ; DELETE FROM hdk_tbevaluation_token WHERE code_request = code_ID ; DELETE FROM hdk_tbrequest_times WHERE code_request = code_ID ; DELETE FROM hdk_tbrequest_log WHERE cod_request = code_ID ; DELETE FROM hdk_tbrequest_repassed WHERE code_request = code_ID ; DELETE FROM hdk_tbrequest_attachment WHERE code_request = code_ID ; DELETE FROM hdk_tbrequest_change_expire WHERE code_request = code_ID ; DELETE FROM hdk_tbrequest WHERE code_request = code_ID ; SET msg = "Request deleted !!!" ; END IF; END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; /*!50003 SET character_set_client = @saved_cs_client */ ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ; /*!50003 DROP PROCEDURE IF EXISTS `delete_requests_for_user` */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; /*!50003 SET @saved_col_connection = @@collation_connection */ ; /*!50003 SET character_set_client = latin1 */ ; /*!50003 SET character_set_results = latin1 */ ; /*!50003 SET collation_connection = latin1_swedish_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; CREATE PROCEDURE `delete_requests_for_user`(IN person_ID int(11)) delete_request:begin DECLARE code_ID VARCHAR(20); DECLARE no_more_rows BOOLEAN; DECLARE loop_cntr INT DEFAULT 0; DECLARE num_rows INT DEFAULT 0; DECLARE requests_cur CURSOR FOR SELECT code_request FROM hdk_tbrequest WHERE idperson_creator = person_ID ; DECLARE CONTINUE HANDLER FOR NOT FOUND SET no_more_rows = TRUE; OPEN requests_cur; select FOUND_ROWS() into num_rows; the_loop: LOOP fetch requests_cur into code_ID; IF no_more_rows THEN CLOSE requests_cur; LEAVE the_loop; END IF; call delete_request(code_ID,@msg); SET loop_cntr = loop_cntr + 1; END LOOP the_loop; select loop_cntr as messsage; END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; /*!50003 SET character_set_client = @saved_cs_client */ ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ; /*!50003 DROP PROCEDURE IF EXISTS `delete_user_without_requests` */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; /*!50003 SET @saved_col_connection = @@collation_connection */ ; /*!50003 SET character_set_client = latin1 */ ; /*!50003 SET character_set_results = latin1 */ ; /*!50003 SET collation_connection = latin1_swedish_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; CREATE PROCEDURE `delete_user_without_requests`(IN person_ID int(11), OUT msg varchar(100)) delete_user:BEGIN DECLARE num_requests INT; DECLARE num_user INT; SELECT COUNT(*) INTO num_user FROM tbperson WHERE idperson = person_ID ; IF ( num_user = 0 ) THEN SET msg = "User not exists !!!" ; LEAVE delete_user ; END IF; IF NOT EXISTS (SELECT * FROM tbperson WHERE idperson = person_ID AND idtypeperson = 2) THEN SET msg = "Person exists, but is not a user !!!" ; LEAVE delete_user ; END IF; SELECT COUNT(idrequest) INTO num_requests FROM hdk_tbrequest WHERE idperson_creator = person_ID; IF ( num_requests = 0 ) THEN DELETE FROM tbaddress WHERE idperson = person_ID ; DELETE FROM tbnaturalperson WHERE idperson = person_ID ; DELETE FROM tbjuridicalperson WHERE idperson = person_ID ; DELETE FROM hdk_tbdepartment_has_person WHERE idperson = person_ID ; DELETE FROM hdk_tbconfig_user WHERE idperson = person_ID ; DELETE FROM tbperson WHERE idperson = person_ID ; SET msg = "User deleted !!!" ; ELSE SET msg = "User have requests - Not deleted !!!" ; END IF; END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; /*!50003 SET character_set_client = @saved_cs_client */ ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ; /*!50003 DROP PROCEDURE IF EXISTS `hdk_deleteAllAreaTypeItemService` */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; /*!50003 SET @saved_col_connection = @@collation_connection */ ; /*!50003 SET character_set_client = latin1 */ ; /*!50003 SET character_set_results = latin1 */ ; /*!50003 SET collation_connection = latin1_swedish_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; CREATE PROCEDURE `hdk_deleteAllAreaTypeItemService`() BEGIN DELETE FROM hdk_tbrequest_dates ; DELETE FROM hdk_tbevaluation_token; DELETE FROM hdk_tbrequest_times ; DELETE FROM hdk_tbrequest_log ; DELETE FROM hdk_tbrequest_repassed ; DELETE FROM hdk_tbrequest_in_charge; DELETE FROM hdk_tbrequest_attachment ; DELETE FROM hdk_tbrequest_change_expire ; DELETE FROM hdk_tbrequest_emailcron; DELETE FROM hdk_tbrequest ; END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; /*!50003 SET character_set_client = @saved_cs_client */ ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ; /*!50003 DROP PROCEDURE IF EXISTS `hdk_deleteAllRequests` */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; /*!50003 SET @saved_col_connection = @@collation_connection */ ; /*!50003 SET character_set_client = latin1 */ ; /*!50003 SET character_set_results = latin1 */ ; /*!50003 SET collation_connection = latin1_swedish_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; CREATE PROCEDURE `hdk_deleteAllRequests`() BEGIN DELETE FROM hdk_tbrequest_dates ; DELETE FROM hdk_tbevaluation_token; DELETE FROM hdk_tbrequest_times ; DELETE FROM hdk_tbrequest_log ; DELETE FROM hdk_tbrequest_repassed ; DELETE FROM hdk_tbrequest_in_charge; DELETE FROM hdk_tbrequest_attachment ; DELETE FROM hdk_tbrequest_change_expire ; DELETE FROM hdk_tbrequest_emailcron; DELETE FROM hdk_tbrequest ; END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; /*!50003 SET character_set_client = @saved_cs_client */ ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ; /*!50003 DROP PROCEDURE IF EXISTS `hdk_deleteAreaTypeItemService` */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; /*!50003 SET @saved_col_connection = @@collation_connection */ ; /*!50003 SET character_set_client = latin1 */ ; /*!50003 SET character_set_results = latin1 */ ; /*!50003 SET collation_connection = latin1_swedish_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; CREATE PROCEDURE `hdk_deleteAreaTypeItemService`(IN lista varchar(200)) BEGIN SET @LIST=lista; DELETE FROM hdk_tbreason WHERE idservice IN (SELECT idservice FROM `hdk_tbcore_service` WHERE iditem IN (SELECT iditem FROM `hdk_tbcore_item` WHERE idtype IN (SELECT idtype FROM `hdk_tbcore_type` WHERE FIND_IN_SET(idarea,@LIST)))) ; DELETE FROM hdk_tbgroup_has_service WHERE idservice IN (SELECT idservice FROM `hdk_tbcore_service` WHERE iditem IN (SELECT iditem FROM `hdk_tbcore_item` WHERE idtype IN (SELECT idtype FROM `hdk_tbcore_type` WHERE FIND_IN_SET(idarea,@LIST)))) ; DELETE FROM hdk_tbgetemaildepartment WHERE idgetemail IN (SELECT idgetemail FROM hdk_tbgetemail WHERE idservice IN (SELECT idservice FROM `hdk_tbcore_service` WHERE iditem IN (SELECT iditem FROM `hdk_tbcore_item` WHERE idtype IN (SELECT idtype FROM `hdk_tbcore_type` WHERE FIND_IN_SET(idarea,@LIST))))) ; DELETE FROM hdk_tbgetemail WHERE idservice IN (SELECT idservice FROM `hdk_tbcore_service` WHERE iditem IN (SELECT iditem FROM `hdk_tbcore_item` WHERE idtype IN (SELECT idtype FROM `hdk_tbcore_type` WHERE FIND_IN_SET(idarea,@LIST)))) ; DELETE FROM hdk_tbcore_service WHERE iditem IN (SELECT iditem FROM `hdk_tbcore_item` WHERE idtype IN (SELECT idtype FROM `hdk_tbcore_type` WHERE FIND_IN_SET(idarea,@LIST))); DELETE FROM hdk_tbcore_item WHERE idtype IN (SELECT idtype FROM `hdk_tbcore_type` WHERE FIND_IN_SET(idarea,@LIST)); DELETE FROM hdk_tbcore_type WHERE FIND_IN_SET(idarea,@LIST); DELETE FROM hdk_tbcore_area WHERE FIND_IN_SET(idarea,@LIST); END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; /*!50003 SET character_set_client = @saved_cs_client */ ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ; /*!50003 DROP PROCEDURE IF EXISTS `hdk_deleteModule` */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; /*!50003 SET @saved_col_connection = @@collation_connection */ ; /*!50003 SET character_set_client = latin1 */ ; /*!50003 SET character_set_results = latin1 */ ; /*!50003 SET collation_connection = latin1_swedish_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; CREATE PROCEDURE `hdk_deleteModule`(IN moduleID int(11)) hdk_deleteModule:BEGIN DECLARE num_modules INT; SELECT COUNT(idmodule) INTO num_modules FROM tbmodule WHERE idmodule = moduleID; IF ( num_modules = 0 ) THEN LEAVE hdk_deleteModule ; ELSE DELETE FROM `tbdefaultpermission` WHERE idprogram IN (SELECT idprogram FROM tbprogram WHERE idprogramcategory IN (SELECT idprogramcategory FROM tbprogramcategory WHERE idmodule = moduleID)); DELETE FROM `tbpermission` WHERE idprogram IN (SELECT idprogram FROM tbprogram WHERE idprogramcategory IN (SELECT idprogramcategory FROM tbprogramcategory WHERE idmodule = moduleID)); DELETE FROM `tbtypepersonpermission` WHERE idprogram IN (SELECT idprogram FROM tbprogram WHERE idprogramcategory IN (SELECT idprogramcategory FROM tbprogramcategory WHERE idmodule = moduleID)); DELETE FROM tbprogram WHERE idprogramcategory IN (SELECT idprogramcategory FROM tbprogramcategory WHERE idmodule = moduleID); DELETE FROM `tbprogramcategory` WHERE idmodule = moduleID; DELETE FROM `tbemail` WHERE `idmodule` = moduleID; DELETE FROM `tbmodule` WHERE `idmodule` = moduleID; END IF; END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; /*!50003 SET character_set_client = @saved_cs_client */ ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ; /*!50003 DROP PROCEDURE IF EXISTS `hdk_deleteNatureperson` */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; /*!50003 SET @saved_col_connection = @@collation_connection */ ; /*!50003 SET character_set_client = latin1 */ ; /*!50003 SET character_set_results = latin1 */ ; /*!50003 SET collation_connection = latin1_swedish_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; CREATE PROCEDURE `hdk_deleteNatureperson`(IN personID int(11), IN flag int(11)) BEGIN IF (flag = 1) THEN DELETE FROM tbjuridicalperson WHERE idperson = personID; ELSE DELETE FROM tbnaturalperson WHERE idperson = personID; END IF; END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; /*!50003 SET character_set_client = @saved_cs_client */ ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ; /*!50003 DROP PROCEDURE IF EXISTS `hdk_deleteNote` */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; /*!50003 SET @saved_col_connection = @@collation_connection */ ; /*!50003 SET character_set_client = latin1 */ ; /*!50003 SET character_set_results = latin1 */ ; /*!50003 SET collation_connection = latin1_swedish_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; CREATE PROCEDURE `hdk_deleteNote`(IN note_ID int(11)) hdk_deleteNote:BEGIN DECLARE attach_ID VARCHAR(20); DECLARE no_more_rows BOOLEAN; DECLARE loop_cntr INT DEFAULT 0; DECLARE num_rows INT DEFAULT 0; DECLARE note_cur CURSOR FOR SELECT idnote_attachments FROM hdk_tbnote_has_attachments WHERE idnote = note_ID ; DECLARE CONTINUE HANDLER FOR NOT FOUND SET no_more_rows = TRUE; OPEN note_cur; SELECT FOUND_ROWS() INTO num_rows; the_loop: LOOP FETCH note_cur INTO attach_ID; IF no_more_rows THEN CLOSE note_cur; LEAVE the_loop; END IF; DELETE FROM hdk_tbnote_has_attachments WHERE idnote_attachments = attach_ID; DELETE FROM hdk_tbnote_attachments WHERE idnote_attachments = attach_ID; SET loop_cntr = loop_cntr + 1; END LOOP the_loop; DELETE FROM hdk_tbnote WHERE idnote = note_ID ; END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; /*!50003 SET character_set_client = @saved_cs_client */ ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ; /*!50003 DROP PROCEDURE IF EXISTS `hdk_insertAddress` */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; /*!50003 SET @saved_col_connection = @@collation_connection */ ; /*!50003 SET character_set_client = latin1 */ ; /*!50003 SET character_set_results = latin1 */ ; /*!50003 SET collation_connection = latin1_swedish_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; CREATE PROCEDURE `hdk_insertAddress`(IN idPerson int(11), IN idCity int(11), IN idNeighborhood int(11), IN idTypeaddress int(11), IN number char(9), IN complement varchar(45), IN zipcode varchar(11), IN idTypeStreet int(11), IN nameStreet varchar(100), OUT insertId int(11)) BEGIN CALL hdk_updateStreet(idTypeStreet,nameStreet,@output); SET @idStreet = (SELECT @output AS idperson); INSERT INTO tbaddress ( idperson ,idcity ,idneighborhood ,idstreet ,idtypeaddress ,number ,complement ,zipcode ) VALUES ( idPerson ,idCity ,idNeighborhood ,@idStreet ,idTypeaddress ,number ,complement ,zipcode ); SET insertId := LAST_INSERT_ID(); END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; /*!50003 SET character_set_client = @saved_cs_client */ ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ; /*!50003 DROP PROCEDURE IF EXISTS `hdk_insertNoteAttachments` */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; /*!50003 SET @saved_col_connection = @@collation_connection */ ; /*!50003 SET character_set_client = latin1 */ ; /*!50003 SET character_set_results = latin1 */ ; /*!50003 SET collation_connection = latin1_swedish_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; CREATE PROCEDURE `hdk_insertNoteAttachments`(IN note_ID int(11), IN file_NAME varchar(255), OUT noteatt_ID int(11)) BEGIN START TRANSACTION; INSERT INTO hdk_tbnote_attachments (filename) VALUES (file_NAME) ; set noteatt_ID := LAST_INSERT_ID(); INSERT INTO hdk_tbnote_has_attachments (idnote,idnote_attachments) VALUES (note_ID,noteatt_ID); COMMIT; END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; /*!50003 SET character_set_client = @saved_cs_client */ ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ; /*!50003 DROP PROCEDURE IF EXISTS `hdk_insertPersonPermission` */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; /*!50003 SET @saved_col_connection = @@collation_connection */ ; /*!50003 SET character_set_client = latin1 */ ; /*!50003 SET character_set_results = latin1 */ ; /*!50003 SET collation_connection = latin1_swedish_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; CREATE PROCEDURE `hdk_insertPersonPermission`(IN program_ID int(11), IN person_ID int(11), IN accesstype_ID int(11), IN perm char(1)) BEGIN IF EXISTS (SELECT idpermission FROM tbpermission WHERE idprogram = program_ID AND idperson = person_ID AND idaccesstype = accesstype_ID) THEN UPDATE tbpermission SET allow = perm WHERE idprogram = program_ID AND idperson = person_ID AND idaccesstype = accesstype_ID ; ELSE INSERT INTO tbpermission (idaccesstype, idprogram, idperson, allow) VALUES ( accesstype_ID, program_ID, person_ID, perm ) ; END IF; END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; /*!50003 SET character_set_client = @saved_cs_client */ ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ; /*!50003 DROP PROCEDURE IF EXISTS `hdk_insertTypePersonPermission` */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; /*!50003 SET @saved_col_connection = @@collation_connection */ ; /*!50003 SET character_set_client = latin1 */ ; /*!50003 SET character_set_results = latin1 */ ; /*!50003 SET collation_connection = latin1_swedish_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; CREATE PROCEDURE `hdk_insertTypePersonPermission`(IN program_ID int(11), IN typeperson_ID int(11), IN accesstype_ID int(11), IN perm char(1)) BEGIN IF EXISTS (SELECT idpermissiongroup FROM tbtypepersonpermission WHERE idprogram = program_ID AND idtypeperson = typeperson_ID AND idaccesstype = accesstype_ID) THEN UPDATE tbtypepersonpermission SET allow = perm WHERE idprogram = program_ID AND idtypeperson = typeperson_ID AND idaccesstype = accesstype_ID ; ELSE INSERT INTO tbtypepersonpermission (idprogram, idtypeperson, idaccesstype,allow) VALUES ( program_ID, typeperson_ID, accesstype_ID, perm ) ; END IF; END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; /*!50003 SET character_set_client = @saved_cs_client */ ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ; /*!50003 DROP PROCEDURE IF EXISTS `hdk_insUpdJuridicalPerson` */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; /*!50003 SET @saved_col_connection = @@collation_connection */ ; /*!50003 SET character_set_client = latin1 */ ; /*!50003 SET character_set_results = latin1 */ ; /*!50003 SET collation_connection = latin1_swedish_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; CREATE PROCEDURE `hdk_insUpdJuridicalPerson`(IN personID int(11), IN nameIN varchar(80), IN ein_cnpjIN varchar(18), IN iestadualIN varchar(20), IN contactIN varchar(80), IN observationIN blob) BEGIN DECLARE juridicalpersonIDTmp INT; IF EXISTS (SELECT idjuridicalperson FROM tbjuridicalperson WHERE idperson = personID) THEN SELECT idjuridicalperson INTO juridicalpersonIDTmp FROM tbjuridicalperson WHERE idperson = personID; UPDATE tbjuridicalperson SET `name` = nameIN, ein_cnpj = ein_cnpjIN, iestadual = iestadualIN, contact_person = contactIN, observation = observationIN WHERE idjuridicalperson = juridicalpersonIDTmp; ELSE INSERT INTO tbjuridicalperson (idperson, `name`, ein_cnpj, iestadual, contact_person, observation) VALUES(personID, nameIN, ein_cnpjIN, iestadualIN, contactIN, observationIN); END IF; END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; /*!50003 SET character_set_client = @saved_cs_client */ ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ; /*!50003 DROP PROCEDURE IF EXISTS `hdk_insUpdNaturalPerson` */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; /*!50003 SET @saved_col_connection = @@collation_connection */ ; /*!50003 SET character_set_client = latin1 */ ; /*!50003 SET character_set_results = latin1 */ ; /*!50003 SET collation_connection = latin1_swedish_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; CREATE PROCEDURE `hdk_insUpdNaturalPerson`(IN personID int(11), IN nameIN varchar(80), IN ssn_cpfIN varchar(15), IN rgIN varchar(20), IN rgoexpIN varchar(15), IN dtbirthIN date, IN motherIN varchar(80), IN fatherIN varchar(80), IN genderIN varchar(1)) BEGIN DECLARE naturalpersonIDTmp INT; IF EXISTS (SELECT idnaturalperson FROM tbnaturalperson WHERE idperson = personID) THEN SELECT idnaturalperson INTO naturalpersonIDTmp FROM tbnaturalperson WHERE idperson = personID; UPDATE tbnaturalperson SET `name` = nameIN, ssn_cpf = ssn_cpfIN, rg = rgIN, rgoexp = rgoexpIN, dtbirth = dtbirthIN, mother = motherIN, father = fatherIN, gender = genderIN WHERE idnaturalperson = naturalpersonIDTmp; ELSE INSERT INTO tbnaturalperson (idperson, `name`, ssn_cpf, rg, rgoexp, dtbirth, mother, father, gender) VALUES(personID, nameIN, ssn_cpfIN, rgIN, rgoexpIN, dtbirthIN, motherIN, fatherIN, genderIN); END IF; END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; /*!50003 SET character_set_client = @saved_cs_client */ ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ; /*!50003 DROP PROCEDURE IF EXISTS `hdk_insUpdPerson` */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; /*!50003 SET @saved_col_connection = @@collation_connection */ ; /*!50003 SET character_set_client = latin1 */ ; /*!50003 SET character_set_results = latin1 */ ; /*!50003 SET collation_connection = latin1_swedish_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; CREATE PROCEDURE `hdk_insUpdPerson`(IN idtypeloginIN int(11), IN idtypepersonIN int(11), IN idnaturepersonIN int(11), IN idthemeIN int(11), IN person_name varchar(60), IN loginIN varchar(45), IN passwordIN varchar(45), IN emailIN varchar(45), IN dtcreateIN datetime, IN statusIN char(1), IN user_vipIN char(1), IN telephoneIN varchar(30), IN cellphoneIN varchar(30), IN branch_numberIN varchar(10), IN time_valueIN float, IN overtimeIN float, IN idcityIN int(11), IN idneighborhoodIN int(11), IN idstreetIN int(11), IN idtypestreetIN int(11), IN numberIN varchar(9), IN complementIN varchar(45), IN zipcodeIN varchar(11), IN ssn_cpfIN varchar(15), IN dtbirthIN date, IN genderIN varchar(1), IN iddepartmentIN int(11)) BEGIN DECLARE person_IDTmp INT; DECLARE naturalperson_IDTmp INT; DECLARE address_IDTmp INT; DECLARE idtmp INT; IF EXISTS (SELECT idperson FROM tbperson WHERE login = login) THEN SELECT idperson INTO person_IDTmp FROM tbperson WHERE login = loginIN; UPDATE tbperson SET idtypelogin = idtypeloginIN, idtypeperson = idtypepersonIN, idnatureperson = idnatureIN, idtheme = idthemeIN, `name` = person_name, login = loginIN, `password` = MD5(passwordIN), email = emailIN, dtcreate = dtcreateIN, `status` = statusIN, user_vip = user_vipIN, phone_number = telephoneIN, cel_phone = cellphoneIN, branch_number = branch_numberIN, time_value = time_valueIN, overtime = overtimeIN WHERE idperson = person_IDTmp; IF EXISTS (SELECT idnaturalperson FROM tbnaturalperson WHERE idperson = person_IDTmp) THEN SELECT idnaturalperson INTO naturalperson_IDTmp FROM tbnaturalperson WHERE idperson = person_IDTmp; UPDATE tbnaturalperson SET ssn_cpf = ssn_cpfIN, dtbirth = dtbirthIN, gender = genderIN WHERE idnaturalperson = naturalperson_IDTmp; ELSE INSERT INTO tbnaturalperson (idperson,ssn_cpf,dtbirth,gender) VALUES (person_IDTmp,ssn_cpfIN,dtbirthIN,genderIN); END IF; IF EXISTS (SELECT idaddress FROM tbaddress WHERE idperson = person_IDTmp) THEN SELECT idaddress INTO address_IDTmp FROM tbaddress WHERE idperson = person_IDTmp; UPDATE tbaddress SET idcity = idcityIN, idneighborhood = idneighborhoodIN, idstreet = idstreetIN, idtypeaddress = idtypestreetIN, number = numberIN, complement = complementIN, zipcode = zipcodeIN WHERE idaddress = address_IDTmp; ELSE INSERT INTO tbaddress (idperson,idcity,idneighborhood,idstreet,idtypeaddress,number,complement,zipcode) VALUES (person_IDTmp,idcityIN,idneighborhoodIN,idstreetIN,idtypestreetIN,numberIN,complementIN,zipcodeIN); END IF; IF EXISTS (SELECT idperson FROM hdk_tbdepartment_has_person WHERE idperson = person_IDTmp) THEN UPDATE hdk_tbdepartment_has_person SET iddepartment = iddepartmentIN WHERE idperson = person_IDTmp; ELSE INSERT INTO hdk_tbdepartment_has_person (idperson,iddepartment) VALUES (person_IDTmp,iddepartmentIN); END IF; ELSE INSERT INTO tbperson (idtypelogin,idtypeperson,idnatureperson,idtheme,`name`,login, `password`,email,dtcreate,`status`,user_vip,phone_number,cel_phone, branch_number,time_value,overtime) VALUES (idtypeloginIN,idtypepersonIN,idnatureIN,idthemeIN,person_name,loginIN, MD5(passwordIN),emailIN,dtcreateIN,statusIN,user_vipIN,telephoneIN,cellphoneIN, branch_numberIN,time_valueIN,overtimeIN); SET idtmp = LAST_INSERT_ID(); INSERT INTO tbnaturalperson (idperson,ssn_cpf,dtbirth,gender) VALUES (idtmp,ssn_cpfIN,dtbirthIN,genderIN); INSERT INTO tbaddress (idperson,idcity,idneighborhood,idstreet,idtypeaddress,number,complement,zipcode) VALUES (idtmp,idcityIN,idneighborhoodIN,idstreetIN,idtypestreetIN,numberIN,complementIN,zipcodeIN); INSERT INTO hdk_tbdepartment_has_person (idperson,iddepartment) VALUES (idtmp,iddepartmentIN); END IF; END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; /*!50003 SET character_set_client = @saved_cs_client */ ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ; /*!50003 DROP PROCEDURE IF EXISTS `hdk_updateAddress` */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; /*!50003 SET @saved_col_connection = @@collation_connection */ ; /*!50003 SET character_set_client = latin1 */ ; /*!50003 SET character_set_results = latin1 */ ; /*!50003 SET collation_connection = latin1_swedish_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; CREATE PROCEDURE `hdk_updateAddress`(IN id_person int(11), IN id_city int(11), IN id_neighborhood int(11), IN number char(9), IN complement varchar(45), IN zipcode varchar(11), IN id_typeStreet int(11), IN name_street varchar(100)) BEGIN CALL hdk_updateStreet(id_typeStreet,name_street,@output); SET @id_street = (SELECT @output AS idperson); UPDATE tbaddress SET idcity = id_city ,idneighborhood = id_neighborhood ,idstreet = @id_street ,number = number ,complement = complement ,zipcode = zipcode WHERE idperson = id_person ; END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; /*!50003 SET character_set_client = @saved_cs_client */ ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ; /*!50003 DROP PROCEDURE IF EXISTS `hdk_updateCity` */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; /*!50003 SET @saved_col_connection = @@collation_connection */ ; /*!50003 SET character_set_client = latin1 */ ; /*!50003 SET character_set_results = latin1 */ ; /*!50003 SET collation_connection = latin1_swedish_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; CREATE PROCEDURE `hdk_updateCity`(IN stateId int(11), IN nameCity varchar(60), OUT insertId int(11)) BEGIN SET @id = (SELECT tbcity.idcity FROM tbcity WHERE tbcity.name = nameCity AND tbcity.idstate = stateId); IF @id IS NULL THEN INSERT INTO tbcity (idstate,`name`) VALUES (stateId, nameCity); SET insertId := LAST_INSERT_ID(); ELSE SET insertId := @id; END IF; END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; /*!50003 SET character_set_client = @saved_cs_client */ ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ; /*!50003 DROP PROCEDURE IF EXISTS `hdk_updateNeighborhood` */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; /*!50003 SET @saved_col_connection = @@collation_connection */ ; /*!50003 SET character_set_client = latin1 */ ; /*!50003 SET character_set_results = latin1 */ ; /*!50003 SET collation_connection = latin1_swedish_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; CREATE PROCEDURE `hdk_updateNeighborhood`(IN cityId int(11), IN nameNeighborhood varchar(100), OUT insertId int(11)) BEGIN set @id = (select tbneighborhood.idneighborhood from tbneighborhood where tbneighborhood.name = nameNeighborhood AND tbneighborhood.idcity = cityId); IF @id IS NULL THEN INSERT INTO tbneighborhood (idcity,name) VALUES (cityId, nameNeighborhood); SET insertId := LAST_INSERT_ID(); ELSE SET insertId := @id; END IF; END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; /*!50003 SET character_set_client = @saved_cs_client */ ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ; /*!50003 DROP PROCEDURE IF EXISTS `hdk_updateStreet` */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; /*!50003 SET @saved_col_connection = @@collation_connection */ ; /*!50003 SET character_set_client = latin1 */ ; /*!50003 SET character_set_results = latin1 */ ; /*!50003 SET collation_connection = latin1_swedish_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; CREATE PROCEDURE `hdk_updateStreet`(IN idTypeStreet int(11), IN nameStreet varchar(100), OUT insertId int(11)) BEGIN SET @id = (SELECT tbstreet.idstreet FROM tbstreet WHERE tbstreet.idtypestreet = idTypeStreet AND tbstreet.name = nameStreet ); IF @id IS NULL THEN INSERT INTO tbstreet (`name`, idtypestreet) VALUES (nameStreet, idTypeStreet); SET insertId := LAST_INSERT_ID(); ELSE SET insertId := @id; END IF; END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; /*!50003 SET character_set_client = @saved_cs_client */ ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ; /*!50003 DROP PROCEDURE IF EXISTS `hkd_deleteRequestsForUser` */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; /*!50003 SET @saved_col_connection = @@collation_connection */ ; /*!50003 SET character_set_client = latin1 */ ; /*!50003 SET character_set_results = latin1 */ ; /*!50003 SET collation_connection = latin1_swedish_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; CREATE PROCEDURE `hkd_deleteRequestsForUser`(IN person_ID int(11)) delete_request:BEGIN DECLARE code_ID VARCHAR(20); DECLARE no_more_rows BOOLEAN; DECLARE loop_cntr INT DEFAULT 0; DECLARE num_rows INT DEFAULT 0; DECLARE requests_cur CURSOR FOR SELECT code_request FROM hdk_tbrequest WHERE idperson_creator = person_ID ; DECLARE CONTINUE HANDLER FOR NOT FOUND SET no_more_rows = TRUE; OPEN requests_cur; SELECT FOUND_ROWS() INTO num_rows; the_loop: LOOP FETCH requests_cur INTO code_ID; IF no_more_rows THEN CLOSE requests_cur; LEAVE the_loop; END IF; CALL delete_request(code_ID,@msg); SET loop_cntr = loop_cntr + 1; END LOOP the_loop; SELECT loop_cntr AS messsage; END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; /*!50003 SET character_set_client = @saved_cs_client */ ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ; /*!50003 DROP PROCEDURE IF EXISTS `hkd_deleteUserWithoutRequests` */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; /*!50003 SET @saved_col_connection = @@collation_connection */ ; /*!50003 SET character_set_client = latin1 */ ; /*!50003 SET character_set_results = latin1 */ ; /*!50003 SET collation_connection = latin1_swedish_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; CREATE PROCEDURE `hkd_deleteUserWithoutRequests`(IN person_ID int(11), OUT msg varchar(100)) delete_user:BEGIN DECLARE num_requests INT; DECLARE num_user INT; SELECT COUNT(*) INTO num_user FROM tbperson WHERE idperson = person_ID ; IF ( num_user = 0 ) THEN SET msg = "User not exists !!!" ; LEAVE delete_user ; END IF; IF NOT EXISTS (SELECT * FROM tbperson WHERE idperson = person_ID AND idtypeperson = 2) THEN SET msg = "Person exists, but is not a user !!!" ; LEAVE delete_user ; END IF; SELECT COUNT(idrequest) INTO num_requests FROM hdk_tbrequest WHERE idperson_creator = person_ID; IF ( num_requests = 0 ) THEN DELETE FROM tbaddress WHERE idperson = person_ID ; DELETE FROM tbnaturalperson WHERE idperson = person_ID ; DELETE FROM tbjuridicalperson WHERE idperson = person_ID ; DELETE FROM hdk_tbdepartment_has_person WHERE idperson = person_ID ; DELETE FROM hdk_tbconfig_user WHERE idperson = person_ID ; DELETE FROM tbperson WHERE idperson = person_ID ; SET msg = "User deleted !!!" ; ELSE SET msg = "User have requests - Not deleted !!!" ; END IF; END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; /*!50003 SET character_set_client = @saved_cs_client */ ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ;
-- -- Final view structure for view `hdk_viewnotesdata` --
/*!50001 DROP VIEW IF EXISTS `hdk_viewnotesdata`*/; /*!50001 SET @saved_cs_client = @@character_set_client */; /*!50001 SET @saved_cs_results = @@character_set_results */; /*!50001 SET @saved_col_connection = @@collation_connection */; /*!50001 SET character_set_client = latin1 */; /*!50001 SET character_set_results = latin1 */; /*!50001 SET collation_connection = latin1_swedish_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 SQL SECURITY DEFINER */ /*!50001 VIEW `hdk_viewnotesdata` AS (select `n`.`idnote` AS `idnote`,`n`.`code_request` AS `code_request`,`n`.`idperson` AS `idperson`,`p`.`name` AS `name`,`n`.`entry_date` AS `entry_date`,`n`.`execution_date` AS `execution_date`,`n`.`start_hour` AS `start_hour`,`n`.`finish_hour` AS `finish_hour`,`n`.`minutes` AS `minutes`,`n`.`idtype` AS `idtype`,`n`.`IND_CHAMADO` AS `IND_CHAMADO`,`n`.`ip_adress` AS `ip_adress`,`n`.`public` AS `public`,`n`.`hour_type` AS `hour_type`,`n`.`service_value` AS `service_value`,`n`.`callback` AS `callback`,`n`.`description` AS `description` from (`hdk_tbnote` `n` join `tbperson` `p`) where (`p`.`idperson` = `n`.`idperson`)) */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */;
-- -- Final view structure for view `hdk_viewrequestdata` --
/*!50001 DROP VIEW IF EXISTS `hdk_viewrequestdata`*/; /*!50001 SET @saved_cs_client = @@character_set_client */; /*!50001 SET @saved_cs_results = @@character_set_results */; /*!50001 SET @saved_col_connection = @@collation_connection */; /*!50001 SET character_set_client = latin1 */; /*!50001 SET character_set_results = latin1 */; /*!50001 SET collation_connection = latin1_swedish_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 SQL SECURITY DEFINER */ /*!50001 VIEW `hdk_viewrequestdata` AS (select `req`.`code_request` AS `code_request`,`req`.`expire_date` AS `expire_date`,`req`.`entry_date` AS `entry_date`,`req`.`flag_opened` AS `flag_opened`,`req`.`subject` AS `subject`,`req`.`idperson_owner` AS `idperson_owner`,`req`.`idperson_creator` AS `idperson_creator`,`cre`.`name` AS `name_creator`,`cre`.`phone_number` AS `phone_number`,`cre`.`cel_phone` AS `cel_phone`,`cre`.`branch_number` AS `branch_number`,`req`.`idperson_juridical` AS `idcompany`,`req`.`idsource` AS `idsource`,`req`.`extensions_number` AS `extensions_number`,`source`.`name` AS `source`,`req`.`idstatus` AS `idstatus`,`req`.`idattendance_way` AS `idattendance_way`,`req`.`os_number` AS `os_number`,`req`.`serial_number` AS `serial_number`,`req`.`label` AS `label`,`req`.`description` AS `description`,`comp`.`name` AS `company`,`stat`.`user_view` AS `status`,`rtype`.`name` AS `type`,`rtype`.`idtype` AS `idtype`,`item`.`iditem` AS `iditem`,`item`.`name` AS `item`,`serv`.`idservice` AS `idservice`,`serv`.`name` AS `service`,`prio`.`name` AS `priority`,`prio`.`idpriority` AS `idpriority`,`inch`.`ind_in_charge` AS `ind_in_charge`,`inch`.`id_in_charge` AS `id_in_charge`,`resp`.`name` AS `in_charge`,`prio`.`color` AS `color`,`pers`.`name` AS `personname`,`pers`.`email` AS `email`,`pers`.`phone_number` AS `phone`,`pers`.`branch_number` AS `branch`,`inch`.`type` AS `typeincharge`,`dep`.`name` AS `department`,`dep`.`iddepartment` AS `iddepartment`,`source`.`name` AS `source_name`,`are`.`idarea` AS `idarea`,`are`.`name` AS `AREA`,(select `reason`.`reason` from `hdk_tbcore_reason` where (`hdk_tbcore_reason`.`idreason` = `req`.`idreason`)) AS `reason`,`req`.`idreason` AS `idreason`,(select `hdk_tbattendance_way`.`way` from `hdk_tbattendance_way` where (`hdk_tbattendance_way`.`idattendanceway` = `req`.`idattendance_way`)) AS `way_name` from ((((((((((((((((`hdk_tbrequest` `req` join `tbperson` `pers`) join `tbperson` `comp`) join `tbperson` `resp`) join `tbperson` `cre`) join `hdk_tbdepartment` `dep`) join `hdk_tbcore_type` `rtype`) join `hdk_tbcore_service` `serv`) join `hdk_tbcore_area` `are`) join `hdk_tbpriority` `prio`) join `hdk_tbcore_item` `item`) join `hdk_tbstatus` `stat`) join `hdk_tbsource` `source`) join `hdk_tbdepartment_has_person` `dep_pers`) join `hdk_tbrequest_in_charge` `inch`) left join `hdk_tbreason` `reason` on((`req`.`idreason` = `reason`.`idreason`))) left join `hdk_tbgroup` `grp` on((`resp`.`idperson` = `grp`.`idperson`))) where ((`req`.`idperson_owner` = `pers`.`idperson`) and (`req`.`idperson_creator` = `cre`.`idperson`) and (`req`.`idstatus` = `stat`.`idstatus`) and (`req`.`idperson_juridical` = `comp`.`idperson`) and (`req`.`idtype` = `rtype`.`idtype`) and (`req`.`idservice` = `serv`.`idservice`) and (`req`.`idpriority` = `prio`.`idpriority`) and (`req`.`idsource` = `source`.`idsource`) and (`req`.`code_request` = `inch`.`code_request`) and (`req`.`iditem` = `item`.`iditem`) and (`dep`.`iddepartment` = `dep_pers`.`iddepartment`) and (`pers`.`idperson` = `dep_pers`.`idperson`) and (`are`.`idarea` = `rtype`.`idarea`) and (`inch`.`id_in_charge` = `resp`.`idperson`) and (`inch`.`ind_in_charge` = 1))) */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; /*!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 */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;