-- phpMyAdmin SQL Dump
-- version 4.7.8
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Oct 23, 2018 at 04:37 PM
-- Server version: 10.1.35-MariaDB
-- PHP Version: 5.6.38

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Database: `re_ga`
--

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

--
-- Table structure for table `accountabilities`
--

CREATE TABLE `accountabilities` (
  `id` int(11) NOT NULL,
  `accountable_id` int(11) DEFAULT NULL,
  `accountable_type` varchar(255) DEFAULT NULL,
  `event_day` date DEFAULT NULL,
  `event_hour` varchar(255) DEFAULT NULL,
  `address` text,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `api_key_logs`
--

CREATE TABLE `api_key_logs` (
  `id` int(11) NOT NULL,
  `status` varchar(255) DEFAULT NULL,
  `api_key_id` int(11) DEFAULT NULL,
  `parameters` text,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `app_complaints`
--

CREATE TABLE `app_complaints` (
  `id` int(11) NOT NULL,
  `company_id` int(11) NOT NULL,
  `phone` varchar(255) NOT NULL DEFAULT '',
  `place` varchar(255) NOT NULL DEFAULT '',
  `wanted` decimal(9,3) DEFAULT NULL,
  `charged` decimal(9,3) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `ar_internal_metadata`
--

CREATE TABLE `ar_internal_metadata` (
  `key` varchar(255) NOT NULL,
  `value` varchar(255) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `attachments`
--

CREATE TABLE `attachments` (
  `id` int(11) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `content` text,
  `downloads` int(11) NOT NULL DEFAULT '0',
  `attachable_type` varchar(255) DEFAULT NULL,
  `attachable_id` int(11) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  `thumbnail_file_name` varchar(255) DEFAULT NULL,
  `thumbnail_content_type` varchar(255) DEFAULT NULL,
  `thumbnail_file_size` int(11) DEFAULT NULL,
  `thumbnail_updated_at` datetime DEFAULT NULL,
  `datafile_file_name` varchar(255) DEFAULT NULL,
  `datafile_content_type` varchar(255) DEFAULT NULL,
  `datafile_file_size` int(11) DEFAULT NULL,
  `datafile_updated_at` datetime DEFAULT NULL,
  `attachment_category_id` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `attachment_categories`
--

CREATE TABLE `attachment_categories` (
  `id` int(11) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `backups`
--

CREATE TABLE `backups` (
  `id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `calendar_events`
--

CREATE TABLE `calendar_events` (
  `id` int(11) NOT NULL,
  `institution_calendar_id` int(11) DEFAULT NULL,
  `kind` varchar(255) DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `description` text,
  `start_at` datetime DEFAULT NULL,
  `end_at` datetime DEFAULT NULL,
  `repetitive` tinyint(1) DEFAULT '0',
  `user_id` int(11) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `categories`
--

CREATE TABLE `categories` (
  `id` int(11) NOT NULL,
  `active` tinyint(1) NOT NULL DEFAULT '0',
  `category_id` int(11) DEFAULT '0',
  `priority` int(11) NOT NULL DEFAULT '0',
  `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `description` text COLLATE utf8_unicode_ci NOT NULL,
  `content` text COLLATE utf8_unicode_ci NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  `parameters` text COLLATE utf8_unicode_ci
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

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

--
-- Table structure for table `cities`
--

CREATE TABLE `cities` (
  `id` int(11) NOT NULL,
  `state_id` int(11) DEFAULT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

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

--
-- Table structure for table `comments`
--

CREATE TABLE `comments` (
  `id` int(11) NOT NULL,
  `commentable_id` int(11) DEFAULT NULL,
  `commentable_type` varchar(255) DEFAULT NULL,
  `comment_id` int(11) DEFAULT NULL,
  `user_id` int(11) DEFAULT NULL,
  `message` text,
  `priority` int(11) DEFAULT '0',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  `is_requirement` tinyint(1) DEFAULT '0',
  `collected` tinyint(1) DEFAULT '0',
  `justification` text,
  `state` varchar(255) DEFAULT 'new'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `comment_users`
--

CREATE TABLE `comment_users` (
  `comment_id` int(11) DEFAULT NULL,
  `user_id` int(11) DEFAULT NULL,
  `id` int(11) NOT NULL,
  `kind` varchar(255) DEFAULT 'assigned'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `companies`
--

CREATE TABLE `companies` (
  `id` int(11) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `state_id` int(11) DEFAULT NULL,
  `legal_representative` varchar(255) NOT NULL DEFAULT '',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  `slug` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `complaints`
--

CREATE TABLE `complaints` (
  `id` int(11) NOT NULL,
  `firstname` varchar(255) DEFAULT NULL,
  `lastname` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `content` text,
  `occurred_place` varchar(255) DEFAULT NULL,
  `occurred_date` date DEFAULT NULL,
  `occurred_city_id` int(11) DEFAULT NULL,
  `institution_id` int(11) DEFAULT NULL,
  `position` varchar(255) DEFAULT NULL,
  `employee_name` varchar(255) DEFAULT NULL,
  `age` int(11) DEFAULT NULL,
  `gender` varchar(255) DEFAULT NULL,
  `educational_level` varchar(255) DEFAULT NULL,
  `occupation_id` int(11) DEFAULT NULL,
  `city_id` int(11) DEFAULT NULL,
  `nationality` varchar(255) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  `confirmed` tinyint(1) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `contact_messages`
--

CREATE TABLE `contact_messages` (
  `id` int(11) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `phone` varchar(255) DEFAULT NULL,
  `message` text,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `countries`
--

CREATE TABLE `countries` (
  `id` int(11) NOT NULL,
  `name` text,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `course_participants`
--

CREATE TABLE `course_participants` (
  `id` int(11) NOT NULL,
  `code` varchar(255) DEFAULT NULL,
  `first_name` varchar(255) DEFAULT NULL,
  `last_name` varchar(255) DEFAULT NULL,
  `gender` varchar(255) DEFAULT NULL,
  `institution` varchar(255) DEFAULT NULL,
  `institution_type` varchar(255) DEFAULT NULL,
  `state_id` int(11) DEFAULT NULL,
  `city_id` int(11) DEFAULT NULL,
  `charge` varchar(255) DEFAULT NULL,
  `activities` text,
  `educational_level` varchar(255) DEFAULT NULL,
  `specialty` varchar(255) DEFAULT NULL,
  `phone` varchar(255) DEFAULT NULL,
  `institutional_phone` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `institutional_email` varchar(255) DEFAULT NULL,
  `comment` text,
  `approved` tinyint(1) DEFAULT '0',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `credit_divisions`
--

CREATE TABLE `credit_divisions` (
  `id` int(11) NOT NULL,
  `name` text,
  `credit_kind_id` int(11) NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `credit_kinds`
--

CREATE TABLE `credit_kinds` (
  `id` int(11) NOT NULL,
  `name` text,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `csv_imports`
--

CREATE TABLE `csv_imports` (
  `id` int(11) NOT NULL,
  `user_id` int(11) DEFAULT NULL,
  `subject_class` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `csv_file_name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `csv_content_type` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `csv_file_size` int(11) DEFAULT NULL,
  `csv_updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

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

--
-- Table structure for table `delation_infos`
--

CREATE TABLE `delation_infos` (
  `id` int(11) NOT NULL,
  `delation_institution_id` int(11) DEFAULT NULL,
  `kind` varchar(255) DEFAULT NULL,
  `phone` varchar(255) NOT NULL DEFAULT '',
  `email` varchar(255) NOT NULL DEFAULT '',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `delation_institutions`
--

CREATE TABLE `delation_institutions` (
  `id` int(11) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  `slug` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `delayed_jobs`
--

CREATE TABLE `delayed_jobs` (
  `id` int(11) NOT NULL,
  `priority` int(11) NOT NULL DEFAULT '0',
  `attempts` int(11) NOT NULL DEFAULT '0',
  `handler` text NOT NULL,
  `last_error` text,
  `run_at` datetime DEFAULT NULL,
  `locked_at` datetime DEFAULT NULL,
  `failed_at` datetime DEFAULT NULL,
  `locked_by` varchar(255) DEFAULT NULL,
  `queue` varchar(255) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `denouncements`
--

CREATE TABLE `denouncements` (
  `id` int(11) NOT NULL,
  `plate` varchar(255) DEFAULT NULL,
  `place` varchar(255) DEFAULT NULL,
  `comment` text,
  `complaint_date` datetime DEFAULT NULL,
  `picture_file_name` varchar(255) DEFAULT NULL,
  `picture_content_type` varchar(255) DEFAULT NULL,
  `picture_file_size` int(11) DEFAULT NULL,
  `picture_updated_at` datetime DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `denouncement_trackings`
--

CREATE TABLE `denouncement_trackings` (
  `id` int(11) NOT NULL,
  `denouncement_id` int(11) DEFAULT NULL,
  `informer_name` varchar(255) DEFAULT NULL,
  `informer_email` varchar(255) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `denounce_cars`
--

CREATE TABLE `denounce_cars` (
  `id` int(11) NOT NULL,
  `plate` varchar(255) DEFAULT NULL,
  `place` varchar(255) DEFAULT NULL,
  `viewed_at` datetime DEFAULT NULL,
  `comments` text,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  `image_file_name` varchar(255) DEFAULT NULL,
  `image_content_type` varchar(255) DEFAULT NULL,
  `image_file_size` int(11) DEFAULT NULL,
  `image_updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `denounce_codes`
--

CREATE TABLE `denounce_codes` (
  `id` int(11) NOT NULL,
  `denounceable_type` varchar(255) DEFAULT NULL,
  `denounceable_id` int(11) DEFAULT NULL,
  `code` varchar(255) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `documents`
--

CREATE TABLE `documents` (
  `id` int(11) NOT NULL,
  `institution_id` int(11) DEFAULT NULL,
  `information_standard_id` int(11) DEFAULT NULL,
  `active` tinyint(1) NOT NULL DEFAULT '0',
  `name` varchar(255) DEFAULT NULL,
  `description` text,
  `downloads` int(11) NOT NULL DEFAULT '0',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  `datafile_file_name` varchar(255) DEFAULT NULL,
  `datafile_content_type` varchar(255) DEFAULT NULL,
  `datafile_file_size` int(11) DEFAULT NULL,
  `datafile_updated_at` datetime DEFAULT NULL,
  `document_category_id` int(11) DEFAULT NULL,
  `kind` int(11) DEFAULT '0',
  `priority` int(11) DEFAULT '0',
  `year` int(11) DEFAULT NULL,
  `institution_dependence_id` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `document_categories`
--

CREATE TABLE `document_categories` (
  `id` int(11) NOT NULL,
  `institution_id` int(11) NOT NULL,
  `information_standard_id` int(11) DEFAULT NULL,
  `name` varchar(255) NOT NULL DEFAULT '',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  `priority` int(11) DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `electricity_charge_types`
--

CREATE TABLE `electricity_charge_types` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  `unit` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `electricity_companies`
--

CREATE TABLE `electricity_companies` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `electricity_demand_levels`
--

CREATE TABLE `electricity_demand_levels` (
  `id` int(11) NOT NULL,
  `electricity_demand_level_id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `excuse_note_criteria`
--

CREATE TABLE `excuse_note_criteria` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `percent` decimal(6,3) NOT NULL DEFAULT '0.000',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `excuse_note_criteria_information_ranking_histories`
--

CREATE TABLE `excuse_note_criteria_information_ranking_histories` (
  `excuse_note_criterium_id` int(11) NOT NULL,
  `information_ranking_history_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `exportations`
--

CREATE TABLE `exportations` (
  `id` int(11) NOT NULL,
  `klass_name` varchar(255) NOT NULL,
  `filename` varchar(255) NOT NULL,
  `email` varchar(255) DEFAULT NULL,
  `downloaded` varchar(255) NOT NULL DEFAULT '0',
  `deleted` varchar(255) NOT NULL DEFAULT '0',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `featured_sections`
--

CREATE TABLE `featured_sections` (
  `id` int(11) NOT NULL,
  `active` tinyint(1) NOT NULL DEFAULT '0',
  `name` varchar(255) DEFAULT NULL,
  `link` varchar(255) NOT NULL DEFAULT '',
  `priority` int(11) NOT NULL DEFAULT '0',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  `banner_file_name` varchar(255) DEFAULT NULL,
  `banner_content_type` varchar(255) DEFAULT NULL,
  `banner_file_size` int(11) DEFAULT NULL,
  `banner_updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `forums`
--

CREATE TABLE `forums` (
  `id` int(11) NOT NULL,
  `active` tinyint(1) DEFAULT '1',
  `name` varchar(255) DEFAULT NULL,
  `forum_category_id` int(11) DEFAULT NULL,
  `user_id` int(11) DEFAULT NULL,
  `topics_count` int(11) DEFAULT '0',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  `private` tinyint(1) DEFAULT '0',
  `description` text,
  `slug` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `forums_users`
--

CREATE TABLE `forums_users` (
  `forum_id` int(11) DEFAULT NULL,
  `user_id` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `forum_categories`
--

CREATE TABLE `forum_categories` (
  `id` int(11) NOT NULL,
  `active` tinyint(1) DEFAULT '1',
  `name` varchar(255) DEFAULT NULL,
  `ancestry` varchar(255) DEFAULT NULL,
  `ancestry_depth` int(11) DEFAULT '0',
  `forums_count` int(11) DEFAULT '0',
  `user_id` int(11) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `forum_posts`
--

CREATE TABLE `forum_posts` (
  `id` int(11) NOT NULL,
  `active` tinyint(1) DEFAULT '1',
  `user_id` int(11) DEFAULT NULL,
  `forum_topic_id` int(11) DEFAULT NULL,
  `content` text,
  `featured` tinyint(1) DEFAULT '0',
  `reply_to` int(11) DEFAULT NULL,
  `quote_to` int(11) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `forum_posts_likers`
--

CREATE TABLE `forum_posts_likers` (
  `forum_post_id` int(11) DEFAULT NULL,
  `liker_id` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `forum_posts_users`
--

CREATE TABLE `forum_posts_users` (
  `forum_post_id` int(11) DEFAULT NULL,
  `user_id` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `forum_topics`
--

CREATE TABLE `forum_topics` (
  `id` int(11) NOT NULL,
  `active` tinyint(1) DEFAULT '1',
  `featured` tinyint(1) DEFAULT '0',
  `name` varchar(255) DEFAULT NULL,
  `user_id` int(11) DEFAULT NULL,
  `forum_id` int(11) DEFAULT NULL,
  `posts_count` int(11) DEFAULT '0',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  `last_post_at` datetime DEFAULT NULL,
  `slug` varchar(255) DEFAULT NULL,
  `pinned` tinyint(1) DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `forum_topics_users`
--

CREATE TABLE `forum_topics_users` (
  `forum_topic_id` int(11) DEFAULT NULL,
  `user_id` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `forum_topic_visits`
--

CREATE TABLE `forum_topic_visits` (
  `id` int(11) NOT NULL,
  `forum_topic_id` int(11) DEFAULT NULL,
  `user_id` int(11) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `friendly_id_slugs`
--

CREATE TABLE `friendly_id_slugs` (
  `id` int(11) NOT NULL,
  `slug` varchar(255) NOT NULL,
  `sluggable_id` int(11) NOT NULL,
  `sluggable_type` varchar(40) DEFAULT NULL,
  `created_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `gob_goe_com_categorias`
--

CREATE TABLE `gob_goe_com_categorias` (
  `id` int(11) NOT NULL COMMENT 'Llave primaria de la tabla gob_goe_com_categorias',
  `titulo` varchar(75) NOT NULL COMMENT 'Titulo asignado a la categoria creada',
  `descripcion` varchar(250) NOT NULL COMMENT 'Descripcion de la categoria creada',
  `cumplimiento_estandar` varchar(100) NOT NULL COMMENT 'Estandar de LAIP que se esta cumpliendo',
  `activo` int(11) NOT NULL COMMENT '1=Activo, 0=Inactivo'
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `gob_goe_com_detalle_estandares`
--

CREATE TABLE `gob_goe_com_detalle_estandares` (
  `id` int(11) NOT NULL COMMENT 'Llave primaria de la tabla #__goe_com_detalle_estandares',
  `titulo` varchar(25) NOT NULL COMMENT 'Titulo que se dara al archivo que forma parte del estandar que se necesita cumplir',
  `descripcion` varchar(250) NOT NULL COMMENT 'Descripcion que se dara al archivo que forma parte del estandar que se necesita cumplir',
  `formato` varchar(10) NOT NULL COMMENT 'Formato del archivo (pdf, doc, docx, xls, xlsx)',
  `url_archivo` varchar(250) NOT NULL COMMENT 'Url del archivo para poder ser descargado o visualizado',
  `estandar_id` int(11) NOT NULL COMMENT 'Llave Foranea que enlaza con la tabla #__goe_com_estandares',
  `log_descarga` int(11) NOT NULL COMMENT 'Contador de descargas realizadas del archivo',
  `fecha` date NOT NULL COMMENT 'Fecha que se a publicado el archivo',
  `peso` int(11) NOT NULL COMMENT 'peso en KB',
  `migrated` int(1) DEFAULT '0',
  `attempts` int(1) DEFAULT '0',
  `error_message` text NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `gob_goe_com_estandares`
--

CREATE TABLE `gob_goe_com_estandares` (
  `id` int(11) NOT NULL COMMENT 'Llave primaria de la tabla #__goe_com_estandar',
  `titulo` varchar(150) NOT NULL COMMENT 'Titulo del documento en esquema general a publicar',
  `descripcion` varchar(2000) NOT NULL COMMENT 'Descripcion del documento en esquema general a publicar',
  `url_archivo` varchar(1000) NOT NULL COMMENT 'img',
  `url_portada` varchar(1000) NOT NULL,
  `categoria_id` int(11) NOT NULL COMMENT 'Llave foranea de la tabla #__goe_com_categorias en la cual se determinara a que categoria se estara dando cumplimiento',
  `portada` enum('No','Si') NOT NULL DEFAULT 'No' COMMENT 'determina si es portada o archivo',
  `archivo` enum('No','Si') NOT NULL DEFAULT 'No',
  `fecha` date NOT NULL COMMENT 'Fecha que se a publicado el documento',
  `estado` enum('Activo','Inactivo') NOT NULL COMMENT '1=Activo, 0=Inactivo',
  `formato` enum('PDF','DOC/DOCX','XLS/XLSX') NOT NULL COMMENT 'formato del archivo',
  `peso` varchar(25) NOT NULL COMMENT 'tamano del documento en kb',
  `log_descarga` int(11) NOT NULL COMMENT 'contador de cuantas veces a sido descargado el documento',
  `hijos` int(11) NOT NULL,
  `migrated` int(1) DEFAULT '0',
  `attempts` int(1) DEFAULT '0',
  `error_message` text NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `goes_goe_are_area`
--

CREATE TABLE `goes_goe_are_area` (
  `are_id` int(10) NOT NULL COMMENT 'codigo principal de areas',
  `are_id_ins` int(10) NOT NULL COMMENT 'codigo de Institucion',
  `are_titulo` text NOT NULL COMMENT 'Titulo de areas',
  `are_ubicacion` varchar(300) DEFAULT NULL COMMENT 'Ubicacion o direccion fisica del area',
  `are_padre` int(10) NOT NULL COMMENT 'Area superior',
  `are_descripcion` text NOT NULL COMMENT 'Descripcion del Area',
  `migrated` int(1) DEFAULT '0',
  `attempts` int(1) DEFAULT '0',
  `error_message` text NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Tabla para Areas/Departamentos de la institucion';

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

--
-- Table structure for table `goes_goe_cat_categorias`
--

CREATE TABLE `goes_goe_cat_categorias` (
  `cat_id` int(10) NOT NULL COMMENT 'Id de categoría',
  `cat_id_ins` int(10) NOT NULL COMMENT 'Id de institución',
  `cat_titulo` varchar(100) NOT NULL COMMENT 'Titulo de categoría',
  `cat_descripcion` varchar(300) DEFAULT NULL COMMENT 'Descripción de categoría',
  `cat_estado` int(10) NOT NULL COMMENT 'Estado de servicio\r\n0 No publicado\r\n1 Publicado',
  `cat_parent` int(10) NOT NULL COMMENT 'categoría Padre',
  `cat_orden` int(10) NOT NULL COMMENT 'Orden del ítem en la categoría'
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Tabla para almacenar las categorias de servicios';

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

--
-- Table structure for table `goes_goe_cor_correo`
--

CREATE TABLE `goes_goe_cor_correo` (
  `cor_id` int(10) NOT NULL,
  `cor_id_ins` int(10) NOT NULL,
  `cor_direccion` varchar(100) NOT NULL,
  `cor_clase` int(11) NOT NULL COMMENT 'Especificara la clase de persona asociada al correo 1-Funcionario 2-Ciudadanía'''
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Tabla para almacenar los correos electr?nicos';

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

--
-- Table structure for table `goes_goe_cxf_correoxfuncionario`
--

CREATE TABLE `goes_goe_cxf_correoxfuncionario` (
  `cxf_id_fun` int(11) NOT NULL,
  `cxf_id_ins` int(11) NOT NULL,
  `cxf_id_cor` int(10) NOT NULL,
  `cxf_id_ins2` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `goes_goe_des_destino`
--

CREATE TABLE `goes_goe_des_destino` (
  `des_id` int(11) NOT NULL,
  `des_id_ins` int(11) NOT NULL,
  `des_id_fun` int(11) NOT NULL,
  `des_titulo` varchar(300) NOT NULL,
  `des_fecha` date NOT NULL,
  `des_fecha_fin` date NOT NULL,
  `des_descripcion` varchar(500) DEFAULT NULL,
  `des_destino` varchar(100) NOT NULL,
  `des_duracion` varchar(100) NOT NULL,
  `des_valor_pasaje` decimal(19,2) NOT NULL,
  `des_valor_alojamiento` decimal(19,2) NOT NULL,
  `des_valor_viaticos` decimal(19,2) NOT NULL,
  `des_otros_gastos` varchar(300) NOT NULL,
  `des_ente` int(1) NOT NULL COMMENT '0 = no, 1 = si',
  `des_ente_nombre` varchar(100) NOT NULL,
  `des_ente_aporte` varchar(300) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Tabla para registrar los viajes realizados por funcionarios ';

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

--
-- Table structure for table `goes_goe_fun_funcionario`
--

CREATE TABLE `goes_goe_fun_funcionario` (
  `fun_id` int(11) NOT NULL,
  `fun_id_ins` int(11) NOT NULL,
  `fun_id_pla` int(10) NOT NULL,
  `fun_nombres` varchar(300) NOT NULL,
  `fun_apellidos` varchar(300) NOT NULL,
  `fun_curriculum` longtext,
  `fun_alto_funcionario` int(1) NOT NULL COMMENT '0=alto, 1=normal',
  `fun_tipo_cargo` int(1) NOT NULL COMMENT '0 = Funcionario, 1 = asesor',
  `fun_estado` int(1) NOT NULL COMMENT 'Estado de Empleado\r\n0 inactivo\r\n1 Activo',
  `fun_imagen` varchar(300) NOT NULL,
  `migrated` int(1) DEFAULT '0',
  `attempts` int(1) DEFAULT '0',
  `error_message` text NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Tabla para registrar a los funcionarios de la institucion';

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

--
-- Table structure for table `goes_goe_pas_pasos`
--

CREATE TABLE `goes_goe_pas_pasos` (
  `pas_id` int(10) NOT NULL COMMENT 'Id del paso',
  `pas_id_ser` int(10) NOT NULL COMMENT 'Id de servicio',
  `pas_id_ins` int(10) NOT NULL COMMENT 'Id de la institución',
  `pas_id_fun` int(11) NOT NULL,
  `pas_id_ins2` int(11) NOT NULL,
  `pas_titulo` varchar(100) NOT NULL COMMENT 'Titulo del paso',
  `pas_estado` int(10) NOT NULL COMMENT 'Estado del paso\r\n0 no publicado\r\n1 publicado',
  `pas_descripcion` varchar(300) NOT NULL COMMENT 'Descripción del paso',
  `pas_requisitos` varchar(300) DEFAULT NULL COMMENT 'Requisitos de cada paso',
  `pas_costo` decimal(10,2) DEFAULT NULL COMMENT 'costo monetario del paso',
  `pas_horario` varchar(100) DEFAULT NULL COMMENT 'Horario para brindar el paso',
  `pas_online` varchar(300) DEFAULT NULL COMMENT 'URL del paso',
  `pas_observaciones` varchar(300) DEFAULT NULL COMMENT 'Observaciones del paso',
  `pas_duracion` varchar(100) DEFAULT NULL COMMENT 'Duración Total del paso',
  `pas_orden` int(10) DEFAULT NULL,
  `pas_tiempo_respuesta` varchar(100) DEFAULT NULL,
  `pas_documentos` varchar(300) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Tabla para almacenar los pasos que lleva un servicio';

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

--
-- Table structure for table `goes_goe_pla_plaza`
--

CREATE TABLE `goes_goe_pla_plaza` (
  `pla_id` int(10) NOT NULL,
  `pla_id_ins` int(11) NOT NULL COMMENT 'id de la instituci?n',
  `pla_id_pue` int(10) NOT NULL COMMENT 'id del puesto',
  `pla_id_are` int(10) NOT NULL COMMENT 'id del area',
  `pla_id_ins2` int(10) NOT NULL,
  `pla_titulo` varchar(100) NOT NULL COMMENT 'Titulo de la plaza',
  `pla_salario` decimal(19,2) NOT NULL COMMENT 'Salario de la plaza',
  `pla_dietas` decimal(19,2) NOT NULL COMMENT 'Dietas asignadas a la plaza',
  `pla_descripcion` varchar(300) DEFAULT NULL COMMENT 'descripcion de la plaza',
  `pla_estado` int(1) NOT NULL COMMENT '0 vacante\r\n1 Ocupada',
  `pla_id_tpl` int(11) NOT NULL,
  `pla_id_ins3` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Tabla para almacenar las plazas que se ofertan en el compone';

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

--
-- Table structure for table `goes_goe_tel_telefono`
--

CREATE TABLE `goes_goe_tel_telefono` (
  `tel_id` int(10) NOT NULL,
  `tel_id_ins` int(10) NOT NULL COMMENT 'id de la instituci?n',
  `tel_numero` varchar(100) NOT NULL COMMENT 'n?mero de telefono',
  `tel_tipo` int(1) NOT NULL COMMENT 'Telefono\\r\\nFax\\nCelular',
  `tel_clase` int(11) NOT NULL COMMENT 'Especificará la clase de persona asociada al teléfono 1-Funcionario 2-Ciudadanía'
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Tabla para almacenar los telefonos';

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

--
-- Table structure for table `goes_goe_tpl_tipoplaza`
--

CREATE TABLE `goes_goe_tpl_tipoplaza` (
  `tpl_id` int(11) NOT NULL,
  `tpl_id_ins` int(11) NOT NULL,
  `tpl_titulo` varchar(100) DEFAULT NULL,
  `tpl_icono` varchar(100) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `goes_goe_txf_telefonoxfuncionario`
--

CREATE TABLE `goes_goe_txf_telefonoxfuncionario` (
  `txf_id_tel` int(10) NOT NULL COMMENT 'id del tel',
  `txf_id_ins` int(10) NOT NULL COMMENT 'id de la institucion',
  `txf_id_fun` int(11) NOT NULL COMMENT 'id del funcionario',
  `txf_id_ins2` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Telefono asignados por funcionarios';

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

--
-- Table structure for table `information_officers`
--

CREATE TABLE `information_officers` (
  `id` int(11) NOT NULL,
  `institution_id` int(11) DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `phone` varchar(255) DEFAULT NULL,
  `address` text,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  `latitude` float NOT NULL DEFAULT '0',
  `longitude` float NOT NULL DEFAULT '0',
  `appointment_attachment_file_name` varchar(255) DEFAULT NULL,
  `appointment_attachment_content_type` varchar(255) DEFAULT NULL,
  `appointment_attachment_file_size` int(11) DEFAULT NULL,
  `appointment_attachment_updated_at` datetime DEFAULT NULL,
  `designation_date` date DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `information_rankings`
--

CREATE TABLE `information_rankings` (
  `id` int(11) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `closed_at` date DEFAULT NULL,
  `closed` tinyint(1) NOT NULL DEFAULT '0',
  `published` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  `information_standard_category_id` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `information_ranking_histories`
--

CREATE TABLE `information_ranking_histories` (
  `id` int(11) NOT NULL,
  `information_standard_id` int(11) DEFAULT NULL,
  `information_ranking_id` int(11) DEFAULT NULL,
  `institution_id` int(11) DEFAULT NULL,
  `observations` text NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  `score` decimal(6,3) NOT NULL DEFAULT '0.000',
  `observations_date` datetime DEFAULT NULL,
  `user_id` int(11) NOT NULL,
  `excuse` tinyint(1) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `information_ranking_histories_criteria`
--

CREATE TABLE `information_ranking_histories_criteria` (
  `information_ranking_history_id` int(11) NOT NULL,
  `information_standard_criterium_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `information_ranking_history_comments`
--

CREATE TABLE `information_ranking_history_comments` (
  `id` int(11) NOT NULL,
  `information_ranking_history_id` int(11) DEFAULT NULL,
  `comment` text,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  `user_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `information_ranking_history_views`
--

CREATE TABLE `information_ranking_history_views` (
  `id` int(11) NOT NULL,
  `information_ranking_history_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `information_requests`
--

CREATE TABLE `information_requests` (
  `id` int(11) NOT NULL,
  `institution_id` int(11) DEFAULT NULL,
  `nationality` varchar(255) DEFAULT NULL,
  `entity_type` varchar(255) DEFAULT NULL,
  `firstname` varchar(255) DEFAULT NULL,
  `lastname` varchar(255) DEFAULT NULL,
  `document_type` varchar(255) DEFAULT NULL,
  `document_number` varchar(255) DEFAULT NULL,
  `age` int(11) DEFAULT NULL,
  `gender` varchar(255) DEFAULT NULL,
  `phone` varchar(255) DEFAULT NULL,
  `educational_level` varchar(255) DEFAULT NULL,
  `residence` varchar(255) DEFAULT NULL,
  `city_id` int(11) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `occupation_id` int(11) DEFAULT NULL,
  `requested_information` text,
  `delivery_way` varchar(255) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  `document_front_image_file_name` varchar(255) DEFAULT NULL,
  `document_front_image_content_type` varchar(255) DEFAULT NULL,
  `document_front_image_file_size` int(11) DEFAULT NULL,
  `document_front_image_updated_at` datetime DEFAULT NULL,
  `document_back_image_file_name` varchar(255) DEFAULT NULL,
  `document_back_image_content_type` varchar(255) DEFAULT NULL,
  `document_back_image_file_size` int(11) DEFAULT NULL,
  `document_back_image_updated_at` datetime DEFAULT NULL,
  `reference_code` varchar(255) NOT NULL DEFAULT '',
  `confirmed` tinyint(1) NOT NULL DEFAULT '0',
  `delivery_deadline` date DEFAULT NULL,
  `extension_type` varchar(255) DEFAULT NULL,
  `information_type` varchar(255) DEFAULT NULL,
  `resolution_type` varchar(255) DEFAULT NULL,
  `correlative` varchar(255) DEFAULT NULL,
  `confirmed_at` datetime DEFAULT NULL,
  `from_website` tinyint(1) DEFAULT '1',
  `address` text,
  `redirected_institution_id` int(11) DEFAULT NULL,
  `cellular` varchar(255) DEFAULT NULL,
  `fax` varchar(255) DEFAULT NULL,
  `nationality_name` varchar(255) DEFAULT NULL,
  `seen_document` tinyint(1) DEFAULT '0',
  `notification_mode` varchar(255) DEFAULT NULL,
  `admitted_at` datetime DEFAULT NULL,
  `ignore_it` tinyint(1) DEFAULT '0',
  `resource` varchar(255) DEFAULT 'website',
  `state` varchar(255) DEFAULT 'new'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `information_request_events`
--

CREATE TABLE `information_request_events` (
  `id` int(11) NOT NULL,
  `eventable_id` int(11) DEFAULT NULL,
  `eventable_type` varchar(255) DEFAULT NULL,
  `user_id` int(11) DEFAULT NULL,
  `state` varchar(255) DEFAULT NULL,
  `event_start` date DEFAULT NULL,
  `justification` text,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `information_request_records`
--

CREATE TABLE `information_request_records` (
  `id` int(11) NOT NULL,
  `closing_date` date DEFAULT NULL,
  `institution_id` int(11) DEFAULT NULL,
  `user_id` int(11) DEFAULT NULL,
  `total_requirements` int(11) DEFAULT '0',
  `dismissed_requirements` int(11) DEFAULT '0',
  `abandoned_requirements` int(11) DEFAULT '0',
  `art_10_17_laip` int(11) DEFAULT '0',
  `no_proprietary` int(11) DEFAULT '0',
  `art_31_32_laip` int(11) DEFAULT '0',
  `art_19_laip` int(11) DEFAULT '0',
  `art_24_laip` int(11) DEFAULT '0',
  `art_73_laip` int(11) DEFAULT '0',
  `art_67_laip` int(11) DEFAULT '0',
  `process_requirements` int(11) DEFAULT '0',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  `opening_date` date DEFAULT NULL,
  `total_requests` int(11) DEFAULT '0',
  `art_30_laip` int(11) DEFAULT '0',
  `art_74_laip` int(11) DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `information_request_requirements`
--

CREATE TABLE `information_request_requirements` (
  `id` int(11) NOT NULL,
  `comment_id` int(11) DEFAULT NULL,
  `weight` int(11) DEFAULT '1',
  `information_type` varchar(255) DEFAULT NULL,
  `resolution_type` varchar(255) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  `redirected_id` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `information_standards`
--

CREATE TABLE `information_standards` (
  `id` int(11) NOT NULL,
  `information_standard_frame_id` int(11) DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  `acronym` varchar(255) NOT NULL DEFAULT '',
  `slug` varchar(255) DEFAULT NULL,
  `priority` int(11) NOT NULL DEFAULT '0',
  `kind` varchar(255) DEFAULT 'ordinary'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `information_standard_categories`
--

CREATE TABLE `information_standard_categories` (
  `id` int(11) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `information_standard_criteria`
--

CREATE TABLE `information_standard_criteria` (
  `id` int(11) NOT NULL,
  `information_standard_id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `percent` decimal(6,3) NOT NULL DEFAULT '0.000',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `information_standard_frames`
--

CREATE TABLE `information_standard_frames` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `information_standard_infos`
--

CREATE TABLE `information_standard_infos` (
  `information_standard_id` int(11) NOT NULL,
  `information_standard_category_id` int(11) NOT NULL,
  `id` int(11) NOT NULL,
  `percent` decimal(6,3) NOT NULL DEFAULT '0.000',
  `published` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `information_standard_statistics`
--

CREATE TABLE `information_standard_statistics` (
  `id` int(11) NOT NULL,
  `institution_id` int(11) NOT NULL,
  `information_standard_id` int(11) DEFAULT NULL,
  `sessions` int(11) NOT NULL DEFAULT '0',
  `views` int(11) NOT NULL DEFAULT '0',
  `tracked_date` date NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `information_standard_statistic_tracks`
--

CREATE TABLE `information_standard_statistic_tracks` (
  `id` int(11) NOT NULL,
  `institution_id` int(11) NOT NULL,
  `information_standard_id` int(11) NOT NULL,
  `session_id` varchar(255) NOT NULL,
  `tracked_date` date DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `institutions`
--

CREATE TABLE `institutions` (
  `id` int(11) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  `institution_type_id` int(11) DEFAULT NULL,
  `acronym` varchar(255) NOT NULL DEFAULT '',
  `ranked` tinyint(1) NOT NULL DEFAULT '0',
  `at_complaints` tinyint(1) NOT NULL DEFAULT '0',
  `slug` varchar(255) DEFAULT NULL,
  `logo_file_name` varchar(255) DEFAULT NULL,
  `logo_content_type` varchar(255) DEFAULT NULL,
  `logo_file_size` int(11) DEFAULT NULL,
  `logo_updated_at` datetime DEFAULT NULL,
  `header_file_name` varchar(255) DEFAULT NULL,
  `header_content_type` varchar(255) DEFAULT NULL,
  `header_file_size` int(11) DEFAULT NULL,
  `header_updated_at` datetime DEFAULT NULL,
  `at_information_requests` tinyint(1) NOT NULL DEFAULT '0',
  `accepts_online_information_requests` tinyint(1) NOT NULL DEFAULT '0',
  `information_standard_category_id` int(11) NOT NULL,
  `information_request_correlative` int(11) DEFAULT '1',
  `transparency_external_portal_url` varchar(255) DEFAULT '',
  `highlight_events` tinyint(1) DEFAULT '0',
  `reproduction_amount` float DEFAULT '0',
  `certification_amount` float DEFAULT '0',
  `administrative_record_file_name` varchar(255) DEFAULT NULL,
  `administrative_record_content_type` varchar(255) DEFAULT NULL,
  `administrative_record_file_size` int(11) DEFAULT NULL,
  `administrative_record_updated_at` datetime DEFAULT NULL,
  `administrative_document_type` int(11) DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `institutions_inventory_managers`
--

CREATE TABLE `institutions_inventory_managers` (
  `institution_id` int(11) DEFAULT NULL,
  `inventory_manager_id` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `institutions_notice_complaints`
--

CREATE TABLE `institutions_notice_complaints` (
  `institution_id` int(11) NOT NULL,
  `notice_complaint_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `institution_calendars`
--

CREATE TABLE `institution_calendars` (
  `id` int(11) NOT NULL,
  `institution_id` int(11) DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `year` int(11) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `institution_confidential_infos`
--

CREATE TABLE `institution_confidential_infos` (
  `id` int(11) NOT NULL,
  `institution_id` int(11) DEFAULT NULL,
  `declaration` varchar(255) NOT NULL,
  `category` text NOT NULL,
  `admin_unit` varchar(255) DEFAULT NULL,
  `classification_date` date DEFAULT NULL,
  `classification_type` varchar(255) DEFAULT NULL,
  `legal_foundation` text,
  `justification` text,
  `declassification_date` date DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `institution_consultants`
--

CREATE TABLE `institution_consultants` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `institution_id` int(11) DEFAULT NULL,
  `description` text,
  `job` varchar(255) DEFAULT NULL,
  `phone` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `functions` text,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  `active` tinyint(1) DEFAULT '0',
  `technical_information` text,
  `experience` text,
  `assigned_unit` varchar(255) DEFAULT NULL,
  `net_salary` float DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `institution_dependences`
--

CREATE TABLE `institution_dependences` (
  `id` int(11) NOT NULL,
  `institution_id` int(11) DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `institution_events`
--

CREATE TABLE `institution_events` (
  `id` int(11) NOT NULL,
  `active` tinyint(1) DEFAULT '1',
  `name` varchar(255) DEFAULT NULL,
  `institution_id` int(11) DEFAULT NULL,
  `place` varchar(255) DEFAULT NULL,
  `start_at` datetime DEFAULT NULL,
  `end_at` datetime DEFAULT NULL,
  `attend` varchar(255) DEFAULT NULL,
  `description` text,
  `notes` text,
  `contact_name` varchar(255) DEFAULT NULL,
  `contact_charge` varchar(255) DEFAULT NULL,
  `contact_phone` varchar(255) DEFAULT NULL,
  `contact_email` varchar(255) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `institution_event_participants`
--

CREATE TABLE `institution_event_participants` (
  `id` int(11) NOT NULL,
  `institution_event_id` int(11) DEFAULT NULL,
  `user_id` int(11) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `institution_historical_confidential_infos`
--

CREATE TABLE `institution_historical_confidential_infos` (
  `id` int(11) NOT NULL,
  `institution_confidential_info_id` int(11) DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  `last_date` date DEFAULT NULL,
  `comment` text,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `institution_information_standards_settings`
--

CREATE TABLE `institution_information_standards_settings` (
  `id` int(11) NOT NULL,
  `institution_id` int(11) NOT NULL,
  `related_institution_id` int(11) NOT NULL,
  `information_standard_id` int(11) NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `institution_inventory_categories`
--

CREATE TABLE `institution_inventory_categories` (
  `id` int(11) NOT NULL,
  `institution_id` int(11) DEFAULT NULL,
  `year` int(11) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `institution_items`
--

CREATE TABLE `institution_items` (
  `id` int(11) NOT NULL,
  `institution_inventory_category_id` int(11) DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `description` text,
  `brand` varchar(255) DEFAULT NULL,
  `market_value` decimal(10,2) DEFAULT NULL,
  `current_value` decimal(10,2) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  `file_file_name` varchar(255) DEFAULT NULL,
  `file_content_type` varchar(255) DEFAULT NULL,
  `file_file_size` int(11) DEFAULT NULL,
  `file_updated_at` datetime DEFAULT NULL,
  `acquisition_date` date DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `institution_links`
--

CREATE TABLE `institution_links` (
  `id` int(11) NOT NULL,
  `institution_id` int(11) DEFAULT NULL,
  `url` varchar(255) DEFAULT NULL,
  `kind` varchar(255) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  `name` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `institution_maintenance_information_standards`
--

CREATE TABLE `institution_maintenance_information_standards` (
  `id` int(11) NOT NULL,
  `institution_id` int(11) DEFAULT NULL,
  `information_standard_id` int(11) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `institution_officials`
--

CREATE TABLE `institution_officials` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `description` text,
  `job` varchar(255) DEFAULT NULL,
  `phone` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `curriculum` text,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  `institution_id` int(11) DEFAULT NULL,
  `picture_file_name` varchar(255) DEFAULT NULL,
  `picture_content_type` varchar(255) DEFAULT NULL,
  `picture_file_size` int(11) DEFAULT NULL,
  `picture_updated_at` datetime DEFAULT NULL,
  `active` tinyint(1) DEFAULT '0',
  `committee_id` int(11) DEFAULT NULL,
  `address` text
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `institution_organizational_structures`
--

CREATE TABLE `institution_organizational_structures` (
  `id` int(11) NOT NULL,
  `institution_id` int(11) DEFAULT NULL,
  `institution_organizational_structure_id` int(11) DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `description` text,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  `location` text NOT NULL,
  `public_servant_name` varchar(255) DEFAULT NULL,
  `attendant` varchar(255) DEFAULT NULL,
  `priority` int(11) DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `institution_recruitment_results`
--

CREATE TABLE `institution_recruitment_results` (
  `id` int(11) NOT NULL,
  `institution_id` int(11) DEFAULT NULL,
  `name` varchar(255) NOT NULL,
  `job_url` varchar(255) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `institution_remunerations`
--

CREATE TABLE `institution_remunerations` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `total_employee` int(11) NOT NULL DEFAULT '0',
  `individual_monthly_remuneration` float NOT NULL DEFAULT '0',
  `other_remuneration` float NOT NULL DEFAULT '0',
  `institution_id` int(11) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  `line_of_work_id` int(11) DEFAULT NULL,
  `honorary` tinyint(1) DEFAULT '0',
  `wage_category` varchar(255) DEFAULT NULL,
  `public_official_name` varchar(255) DEFAULT NULL,
  `individual_overtime_remuneration` float NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `institution_remuneration_histories`
--

CREATE TABLE `institution_remuneration_histories` (
  `id` int(11) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `total_employee` int(11) DEFAULT NULL,
  `individual_monthly_remuneration` float NOT NULL DEFAULT '0',
  `other_remuneration` float NOT NULL DEFAULT '0',
  `institution_id` int(11) DEFAULT NULL,
  `line_of_work_id` int(11) DEFAULT NULL,
  `honorary` tinyint(1) NOT NULL DEFAULT '0',
  `wage_category` varchar(255) DEFAULT NULL,
  `deleted_at` datetime DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `institution_services`
--

CREATE TABLE `institution_services` (
  `id` int(11) NOT NULL,
  `institution_id` int(11) DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `description` text,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  `general_requirements` text,
  `response_times` varchar(255) DEFAULT NULL,
  `active` tinyint(1) DEFAULT '0',
  `observations` text NOT NULL,
  `institution_service_category_id` int(11) DEFAULT NULL,
  `address` text NOT NULL,
  `responsible` varchar(255) NOT NULL DEFAULT '',
  `request_address` text NOT NULL,
  `schedule` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `institution_service_attachments`
--

CREATE TABLE `institution_service_attachments` (
  `id` int(11) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `description` text,
  `attachable_id` int(11) DEFAULT NULL,
  `attachable_type` varchar(255) DEFAULT NULL,
  `attachment_file_name` varchar(255) DEFAULT NULL,
  `attachment_content_type` varchar(255) DEFAULT NULL,
  `attachment_file_size` int(11) DEFAULT NULL,
  `attachment_updated_at` datetime DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `institution_service_categories`
--

CREATE TABLE `institution_service_categories` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  `institution_id` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `institution_service_steps`
--

CREATE TABLE `institution_service_steps` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL DEFAULT '',
  `responsible` varchar(255) NOT NULL DEFAULT '',
  `description` text NOT NULL,
  `requirements` text NOT NULL,
  `cost` float NOT NULL DEFAULT '0',
  `schedule` varchar(255) NOT NULL DEFAULT '',
  `observations` text NOT NULL,
  `duration` varchar(255) NOT NULL DEFAULT '',
  `priority` int(11) NOT NULL DEFAULT '0',
  `response_time` varchar(255) NOT NULL DEFAULT '',
  `documents` text NOT NULL,
  `institution_service_id` int(11) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `institution_subscribers`
--

CREATE TABLE `institution_subscribers` (
  `id` int(11) NOT NULL,
  `institution_id` int(11) DEFAULT NULL,
  `user_id` int(11) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `institution_travels`
--

CREATE TABLE `institution_travels` (
  `id` int(11) NOT NULL,
  `institution_id` int(11) DEFAULT NULL,
  `name` varchar(255) NOT NULL,
  `institution_official_name` varchar(255) NOT NULL,
  `destination` varchar(255) NOT NULL,
  `institution_official_job` varchar(255) DEFAULT NULL,
  `start_date` date NOT NULL,
  `end_date` date NOT NULL,
  `travel_cost` float NOT NULL DEFAULT '0',
  `lodgment_cost` float NOT NULL DEFAULT '0',
  `viatical_cost` float NOT NULL DEFAULT '0',
  `objetive` text,
  `others_cost` text,
  `sponsor_contribution` text,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `institution_types`
--

CREATE TABLE `institution_types` (
  `id` int(11) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `interesting_infos`
--

CREATE TABLE `interesting_infos` (
  `id` int(11) NOT NULL,
  `text` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  `image_file_name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `image_content_type` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `image_file_size` int(11) DEFAULT NULL,
  `image_updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

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

--
-- Table structure for table `internships`
--

CREATE TABLE `internships` (
  `id` int(11) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `performance_begin_date` date DEFAULT NULL,
  `performance_end_date` date DEFAULT NULL,
  `apply_begin_date` date DEFAULT NULL,
  `apply_end_date` date DEFAULT NULL,
  `country_id` int(11) DEFAULT NULL,
  `objetive` text,
  `content` text,
  `candidate_profile` text,
  `terms` text,
  `apply_documents` text,
  `url` varchar(255) DEFAULT NULL,
  `download_url` varchar(255) DEFAULT NULL,
  `contact_name` varchar(255) DEFAULT NULL,
  `contact_phone` varchar(255) DEFAULT NULL,
  `contact_email` varchar(255) DEFAULT NULL,
  `address` text,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `line_of_works`
--

CREATE TABLE `line_of_works` (
  `id` int(11) NOT NULL,
  `budget_unit_id` int(11) NOT NULL,
  `digit` int(11) NOT NULL DEFAULT '0',
  `name` varchar(255) NOT NULL,
  `code` varchar(255) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `municipal_jobs`
--

CREATE TABLE `municipal_jobs` (
  `id` int(11) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `nationalities`
--

CREATE TABLE `nationalities` (
  `id` int(11) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `notice_complaints`
--

CREATE TABLE `notice_complaints` (
  `id` int(11) NOT NULL,
  `user_id` int(11) DEFAULT NULL,
  `notice_type` varchar(255) NOT NULL,
  `content` text NOT NULL,
  `correlative` varchar(255) DEFAULT NULL,
  `received` varchar(255) DEFAULT NULL,
  `anonymous` varchar(255) DEFAULT NULL,
  `notice_at` datetime DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  `alternate_officer` varchar(255) DEFAULT NULL,
  `contact_name` varchar(255) DEFAULT NULL,
  `contact_phone` varchar(255) DEFAULT NULL,
  `contact_email` varchar(255) DEFAULT NULL,
  `contact_address` text,
  `contact_twitter` varchar(255) DEFAULT NULL,
  `contact_facebook` varchar(255) DEFAULT NULL,
  `attachment_file_name` varchar(255) DEFAULT NULL,
  `attachment_content_type` varchar(255) DEFAULT NULL,
  `attachment_file_size` int(11) DEFAULT NULL,
  `attachment_updated_at` datetime DEFAULT NULL,
  `solution_comment` text,
  `closed_at` datetime DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `notice_complaint_records`
--

CREATE TABLE `notice_complaint_records` (
  `id` int(11) NOT NULL,
  `notice_complaint_id` int(11) DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  `comment` text
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `occupations`
--

CREATE TABLE `occupations` (
  `id` int(11) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `ofcia_complaints`
--

CREATE TABLE `ofcia_complaints` (
  `id` int(11) NOT NULL,
  `correlative` varchar(255) DEFAULT NULL,
  `user_id` int(11) DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `complaint_at` datetime DEFAULT NULL,
  `received` varchar(255) DEFAULT NULL,
  `phone` varchar(255) DEFAULT NULL,
  `cellular` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `twitter` varchar(255) DEFAULT NULL,
  `facebook` varchar(255) DEFAULT NULL,
  `anonymous` varchar(255) DEFAULT NULL,
  `content` text,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `organizations`
--

CREATE TABLE `organizations` (
  `id` int(11) NOT NULL,
  `code` varchar(255) DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `acronym` varchar(255) DEFAULT NULL,
  `nature` varchar(255) DEFAULT NULL,
  `status_legalization` varchar(255) DEFAULT NULL,
  `starting_date` varchar(255) DEFAULT NULL,
  `legalization_date` varchar(255) DEFAULT NULL,
  `legal_representative` varchar(255) DEFAULT NULL,
  `project_manager` varchar(255) DEFAULT NULL,
  `project_manager_charge` varchar(255) DEFAULT NULL,
  `objectives` text,
  `address` text,
  `department` varchar(255) DEFAULT NULL,
  `city` varchar(255) DEFAULT NULL,
  `organization_branches_count` int(11) DEFAULT '0',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `organization_branches`
--

CREATE TABLE `organization_branches` (
  `id` int(11) NOT NULL,
  `organization_id` int(11) DEFAULT NULL,
  `department` varchar(255) DEFAULT NULL,
  `city` varchar(255) DEFAULT NULL,
  `phone` varchar(255) DEFAULT NULL,
  `fax` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `website` varchar(255) DEFAULT NULL,
  `facebook` varchar(255) DEFAULT NULL,
  `twitter` varchar(255) DEFAULT NULL,
  `network` varchar(255) DEFAULT NULL,
  `organization_branch_areas_count` int(11) DEFAULT '0',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `organization_branch_areas`
--

CREATE TABLE `organization_branch_areas` (
  `id` int(11) NOT NULL,
  `organization_branch_id` int(11) DEFAULT NULL,
  `institutions` varchar(255) DEFAULT NULL,
  `funding_source` varchar(255) DEFAULT NULL,
  `main_activities` varchar(255) DEFAULT NULL,
  `themes` varchar(255) DEFAULT NULL,
  `population` varchar(255) DEFAULT NULL,
  `department` varchar(255) DEFAULT NULL,
  `city` varchar(255) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `pages`
--

CREATE TABLE `pages` (
  `id` int(11) NOT NULL,
  `priority` int(11) DEFAULT NULL,
  `active` tinyint(1) DEFAULT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `content` text COLLATE utf8_unicode_ci,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  `slug` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `portal` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `page_id` int(11) DEFAULT NULL,
  `link` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `restricted` tinyint(1) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

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

--
-- Table structure for table `permissions`
--

CREATE TABLE `permissions` (
  `id` int(11) NOT NULL,
  `subject_class` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `action` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `description` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

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

--
-- Table structure for table `political_parties`
--

CREATE TABLE `political_parties` (
  `id` int(11) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `procurements`
--

CREATE TABLE `procurements` (
  `id` int(11) NOT NULL,
  `institution_id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `amount` decimal(12,4) NOT NULL DEFAULT '0.0000',
  `counterpart_info` text NOT NULL,
  `compliance_deadlines` text NOT NULL,
  `form_of_contract` varchar(255) NOT NULL DEFAULT '',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  `attachment_file_name` varchar(255) DEFAULT NULL,
  `attachment_content_type` varchar(255) DEFAULT NULL,
  `attachment_file_size` int(11) DEFAULT NULL,
  `attachment_updated_at` datetime DEFAULT NULL,
  `counterpart_name` varchar(255) DEFAULT NULL,
  `start_date` date DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `public_officials`
--

CREATE TABLE `public_officials` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL DEFAULT '',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `public_official_declarations`
--

CREATE TABLE `public_official_declarations` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL DEFAULT '',
  `place` varchar(255) NOT NULL DEFAULT '',
  `declaration_date` date NOT NULL,
  `event` varchar(255) NOT NULL DEFAULT '',
  `public_official_id` int(11) NOT NULL,
  `description` text,
  `declaration` text,
  `link` varchar(255) NOT NULL DEFAULT '',
  `tags` varchar(255) NOT NULL DEFAULT '',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  `attachment_file_name` varchar(255) DEFAULT NULL,
  `attachment_content_type` varchar(255) DEFAULT NULL,
  `attachment_file_size` int(11) DEFAULT NULL,
  `attachment_updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `rc_accountability_citizen_evaluations`
--

CREATE TABLE `rc_accountability_citizen_evaluations` (
  `id` int(11) NOT NULL,
  `rc_accountability_resource_id` int(11) DEFAULT NULL,
  `institution_id` int(11) DEFAULT NULL,
  `document_file_name` varchar(255) DEFAULT NULL,
  `document_content_type` varchar(255) DEFAULT NULL,
  `document_file_size` int(11) DEFAULT NULL,
  `document_updated_at` datetime DEFAULT NULL,
  `score` decimal(4,2) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  `institution_dependence_id` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `rc_accountability_photos`
--

CREATE TABLE `rc_accountability_photos` (
  `id` int(11) NOT NULL,
  `rc_accountability_resource_id` int(11) DEFAULT NULL,
  `institution_id` int(11) DEFAULT NULL,
  `picture_file_name` varchar(255) DEFAULT NULL,
  `picture_content_type` varchar(255) DEFAULT NULL,
  `picture_file_size` int(11) DEFAULT NULL,
  `picture_updated_at` datetime DEFAULT NULL,
  `title` varchar(255) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `rc_accountability_resources`
--

CREATE TABLE `rc_accountability_resources` (
  `id` int(11) NOT NULL,
  `title` varchar(255) NOT NULL,
  `year` int(11) NOT NULL,
  `document_file_name` varchar(255) DEFAULT NULL,
  `document_content_type` varchar(255) DEFAULT NULL,
  `document_file_size` int(11) DEFAULT NULL,
  `document_updated_at` datetime DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  `instructive_document_file_name` varchar(255) DEFAULT NULL,
  `instructive_document_content_type` varchar(255) DEFAULT NULL,
  `instructive_document_file_size` int(11) DEFAULT NULL,
  `instructive_document_updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `rc_accountability_spta_evaluations`
--

CREATE TABLE `rc_accountability_spta_evaluations` (
  `id` int(11) NOT NULL,
  `rc_accountability_resource_id` int(11) DEFAULT NULL,
  `institution_id` int(11) DEFAULT NULL,
  `internal_score` decimal(4,2) DEFAULT NULL,
  `spta_score` decimal(4,2) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  `institution_dependence_id` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `roles`
--

CREATE TABLE `roles` (
  `id` int(11) NOT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  `user_id` int(11) DEFAULT NULL,
  `template` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `institution_id` int(11) DEFAULT NULL,
  `role_id` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

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

--
-- Table structure for table `salary_categories`
--

CREATE TABLE `salary_categories` (
  `id` int(11) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `schedules`
--

CREATE TABLE `schedules` (
  `id` int(11) NOT NULL,
  `owner_id` int(11) DEFAULT NULL,
  `user_id` int(11) DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `active` tinyint(1) DEFAULT '1',
  `slug` varchar(255) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `schedule_events`
--

CREATE TABLE `schedule_events` (
  `id` int(11) NOT NULL,
  `schedule_id` int(11) DEFAULT NULL,
  `user_id` int(11) DEFAULT NULL,
  `is_external` tinyint(1) DEFAULT NULL,
  `status` varchar(255) DEFAULT 'draft',
  `start_at` datetime DEFAULT NULL,
  `end_at` datetime DEFAULT NULL,
  `confirmed_at` datetime DEFAULT NULL,
  `place` varchar(255) DEFAULT NULL,
  `address` text,
  `reason` text,
  `inputs` text,
  `require_entry` tinyint(1) DEFAULT NULL,
  `entry_status` text,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `schedule_event_participants`
--

CREATE TABLE `schedule_event_participants` (
  `id` int(11) NOT NULL,
  `schedule_event_id` int(11) DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `charge` varchar(255) DEFAULT NULL,
  `phone` varchar(255) DEFAULT NULL,
  `institution` varchar(255) DEFAULT NULL,
  `confirmed_at` datetime DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `schedule_users`
--

CREATE TABLE `schedule_users` (
  `id` int(11) NOT NULL,
  `schedule_id` int(11) DEFAULT NULL,
  `user_id` int(11) DEFAULT NULL,
  `kind` varchar(255) DEFAULT 'applicant',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `search_strings`
--

CREATE TABLE `search_strings` (
  `id` int(11) NOT NULL,
  `search_string` varchar(255) DEFAULT NULL,
  `counter` int(11) NOT NULL DEFAULT '0',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `id` int(11) NOT NULL,
  `session_id` varchar(255) NOT NULL,
  `data` mediumtext,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `states`
--

CREATE TABLE `states` (
  `id` int(11) NOT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

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

--
-- Table structure for table `ta_discussions`
--

CREATE TABLE `ta_discussions` (
  `id` int(11) NOT NULL,
  `institution_id` int(11) DEFAULT NULL,
  `guest` varchar(255) NOT NULL,
  `guest_picture_file_name` varchar(255) DEFAULT NULL,
  `guest_picture_content_type` varchar(255) DEFAULT NULL,
  `guest_picture_file_size` int(11) DEFAULT NULL,
  `guest_picture_updated_at` datetime DEFAULT NULL,
  `slug` varchar(255) DEFAULT NULL,
  `title` text,
  `place` varchar(255) DEFAULT NULL,
  `description` text,
  `content` text,
  `discussion_date` datetime DEFAULT NULL,
  `slots` int(11) NOT NULL DEFAULT '0',
  `url_video` varchar(255) DEFAULT NULL,
  `url_audio` varchar(255) DEFAULT NULL,
  `url_gallery` varchar(255) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `ta_discussion_forms`
--

CREATE TABLE `ta_discussion_forms` (
  `id` int(11) NOT NULL,
  `ta_discussion_id` int(11) DEFAULT NULL,
  `name` varchar(255) NOT NULL,
  `last_name` varchar(255) NOT NULL,
  `carreer` varchar(255) DEFAULT NULL,
  `university` varchar(255) DEFAULT NULL,
  `dui` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `phone` varchar(255) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `ta_discussion_pictures`
--

CREATE TABLE `ta_discussion_pictures` (
  `id` int(11) NOT NULL,
  `ta_discussion_id` int(11) DEFAULT NULL,
  `photo_file_name` varchar(255) DEFAULT NULL,
  `photo_content_type` varchar(255) DEFAULT NULL,
  `photo_file_size` int(11) DEFAULT NULL,
  `photo_updated_at` datetime DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `ta_suggestions`
--

CREATE TABLE `ta_suggestions` (
  `id` int(11) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `last_name` varchar(255) DEFAULT NULL,
  `content` text,
  `email` varchar(255) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `users`
--

CREATE TABLE `users` (
  `id` int(11) NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `encrypted_password` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `reset_password_token` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `reset_password_sent_at` datetime DEFAULT NULL,
  `remember_created_at` datetime DEFAULT NULL,
  `sign_in_count` int(11) DEFAULT '0',
  `current_sign_in_at` datetime DEFAULT NULL,
  `last_sign_in_at` datetime DEFAULT NULL,
  `current_sign_in_ip` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `last_sign_in_ip` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `role_id` int(11) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `user_id` int(11) DEFAULT NULL,
  `authentication_token` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `avatar_file_name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `avatar_content_type` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `avatar_file_size` int(11) DEFAULT NULL,
  `avatar_updated_at` datetime DEFAULT NULL,
  `active` tinyint(1) NOT NULL DEFAULT '1',
  `highlight_posts` tinyint(1) DEFAULT '0',
  `forum_notifications` tinyint(1) DEFAULT '1',
  `position` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `address` text COLLATE utf8_unicode_ci,
  `phone` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `accountabilities`
--
ALTER TABLE `accountabilities`
  ADD PRIMARY KEY (`id`),
  ADD KEY `index_accountabilities_on_accountable_id_and_accountable_type` (`accountable_id`,`accountable_type`);

--
-- Indexes for table `api_key_logs`
--
ALTER TABLE `api_key_logs`
  ADD PRIMARY KEY (`id`),
  ADD KEY `index_api_key_logs_on_api_key_id` (`api_key_id`);

--
-- Indexes for table `app_complaints`
--
ALTER TABLE `app_complaints`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `ar_internal_metadata`
--
ALTER TABLE `ar_internal_metadata`
  ADD PRIMARY KEY (`key`);

--
-- Indexes for table `attachments`
--
ALTER TABLE `attachments`
  ADD PRIMARY KEY (`id`),
  ADD KEY `attachments_attachment_category_id_fk` (`attachment_category_id`);

--
-- Indexes for table `attachment_categories`
--
ALTER TABLE `attachment_categories`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `backups`
--
ALTER TABLE `backups`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `calendar_events`
--
ALTER TABLE `calendar_events`
  ADD PRIMARY KEY (`id`),
  ADD KEY `index_calendar_events_on_institution_calendar_id` (`institution_calendar_id`),
  ADD KEY `index_calendar_events_on_kind` (`kind`),
  ADD KEY `index_calendar_events_on_user_id` (`user_id`);

--
-- Indexes for table `categories`
--
ALTER TABLE `categories`
  ADD PRIMARY KEY (`id`),
  ADD KEY `categories_category_id_fk` (`category_id`);

--
-- Indexes for table `cities`
--
ALTER TABLE `cities`
  ADD PRIMARY KEY (`id`),
  ADD KEY `cities_state_id_fk` (`state_id`);

--
-- Indexes for table `comments`
--
ALTER TABLE `comments`
  ADD PRIMARY KEY (`id`),
  ADD KEY `index_comments_on_commentable_id_and_commentable_type` (`commentable_id`,`commentable_type`),
  ADD KEY `index_comments_on_comment_id` (`comment_id`),
  ADD KEY `index_comments_on_user_id` (`user_id`),
  ADD KEY `index_comments_on_state` (`state`);

--
-- Indexes for table `comment_users`
--
ALTER TABLE `comment_users`
  ADD PRIMARY KEY (`id`),
  ADD KEY `index_comments_users_on_comment_id_and_user_id` (`comment_id`,`user_id`);

--
-- Indexes for table `companies`
--
ALTER TABLE `companies`
  ADD PRIMARY KEY (`id`),
  ADD KEY `index_companies_on_slug` (`slug`),
  ADD KEY `companies_state_id_fk` (`state_id`);

--
-- Indexes for table `complaints`
--
ALTER TABLE `complaints`
  ADD PRIMARY KEY (`id`),
  ADD KEY `complaints_city_id_fk` (`city_id`),
  ADD KEY `complaints_institution_id_fk` (`institution_id`),
  ADD KEY `complaints_occupation_id_fk` (`occupation_id`),
  ADD KEY `complaints_occurred_city_id_fk` (`occurred_city_id`);

--
-- Indexes for table `contact_messages`
--
ALTER TABLE `contact_messages`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `countries`
--
ALTER TABLE `countries`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `course_participants`
--
ALTER TABLE `course_participants`
  ADD PRIMARY KEY (`id`),
  ADD KEY `index_course_participants_on_state_id` (`state_id`),
  ADD KEY `index_course_participants_on_city_id` (`city_id`);

--
-- Indexes for table `credit_divisions`
--
ALTER TABLE `credit_divisions`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `credit_kinds`
--
ALTER TABLE `credit_kinds`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `csv_imports`
--
ALTER TABLE `csv_imports`
  ADD PRIMARY KEY (`id`),
  ADD KEY `csv_imports_user_id_fk` (`user_id`);

--
-- Indexes for table `delation_infos`
--
ALTER TABLE `delation_infos`
  ADD PRIMARY KEY (`id`),
  ADD KEY `delation_infos_delation_institution_id_fk` (`delation_institution_id`);

--
-- Indexes for table `delation_institutions`
--
ALTER TABLE `delation_institutions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `index_delation_institutions_on_slug` (`slug`);

--
-- Indexes for table `delayed_jobs`
--
ALTER TABLE `delayed_jobs`
  ADD PRIMARY KEY (`id`),
  ADD KEY `delayed_jobs_priority` (`priority`,`run_at`);

--
-- Indexes for table `denouncements`
--
ALTER TABLE `denouncements`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `denouncement_trackings`
--
ALTER TABLE `denouncement_trackings`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `denounce_cars`
--
ALTER TABLE `denounce_cars`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `denounce_codes`
--
ALTER TABLE `denounce_codes`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `documents`
--
ALTER TABLE `documents`
  ADD PRIMARY KEY (`id`),
  ADD KEY `documents_information_standard_id_fk` (`information_standard_id`),
  ADD KEY `documents_institution_id_fk` (`institution_id`);

--
-- Indexes for table `document_categories`
--
ALTER TABLE `document_categories`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `electricity_charge_types`
--
ALTER TABLE `electricity_charge_types`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `electricity_companies`
--
ALTER TABLE `electricity_companies`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `electricity_demand_levels`
--
ALTER TABLE `electricity_demand_levels`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `excuse_note_criteria`
--
ALTER TABLE `excuse_note_criteria`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `exportations`
--
ALTER TABLE `exportations`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `featured_sections`
--
ALTER TABLE `featured_sections`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `forums`
--
ALTER TABLE `forums`
  ADD PRIMARY KEY (`id`),
  ADD KEY `index_forums_on_name` (`name`),
  ADD KEY `index_forums_on_active` (`active`),
  ADD KEY `index_forums_on_user_id` (`user_id`),
  ADD KEY `index_forums_on_forum_category_id` (`forum_category_id`),
  ADD KEY `index_forums_on_slug` (`slug`);

--
-- Indexes for table `forums_users`
--
ALTER TABLE `forums_users`
  ADD KEY `index_forums_users_on_forum_id_and_user_id` (`forum_id`,`user_id`);

--
-- Indexes for table `forum_categories`
--
ALTER TABLE `forum_categories`
  ADD PRIMARY KEY (`id`),
  ADD KEY `index_forum_categories_on_active` (`active`),
  ADD KEY `index_forum_categories_on_ancestry` (`ancestry`),
  ADD KEY `index_forum_categories_on_user_id` (`user_id`);

--
-- Indexes for table `forum_posts`
--
ALTER TABLE `forum_posts`
  ADD PRIMARY KEY (`id`),
  ADD KEY `index_forum_posts_on_active` (`active`),
  ADD KEY `index_forum_posts_on_user_id` (`user_id`),
  ADD KEY `index_forum_posts_on_forum_topic_id` (`forum_topic_id`),
  ADD KEY `index_forum_posts_on_reply_to` (`reply_to`);

--
-- Indexes for table `forum_posts_likers`
--
ALTER TABLE `forum_posts_likers`
  ADD UNIQUE KEY `index_forum_posts_likers_on_forum_post_id_and_liker_id` (`forum_post_id`,`liker_id`),
  ADD KEY `index_forum_posts_likers_on_liker_id` (`liker_id`);

--
-- Indexes for table `forum_posts_users`
--
ALTER TABLE `forum_posts_users`
  ADD UNIQUE KEY `index_forum_posts_users_on_forum_post_id_and_user_id` (`forum_post_id`,`user_id`);

--
-- Indexes for table `forum_topics`
--
ALTER TABLE `forum_topics`
  ADD PRIMARY KEY (`id`),
  ADD KEY `index_forum_topics_on_active` (`active`),
  ADD KEY `index_forum_topics_on_user_id` (`user_id`),
  ADD KEY `index_forum_topics_on_forum_id` (`forum_id`),
  ADD KEY `index_forum_topics_on_slug` (`slug`);

--
-- Indexes for table `forum_topics_users`
--
ALTER TABLE `forum_topics_users`
  ADD KEY `index_forum_topics_users_on_forum_topic_id_and_user_id` (`forum_topic_id`,`user_id`);

--
-- Indexes for table `forum_topic_visits`
--
ALTER TABLE `forum_topic_visits`
  ADD PRIMARY KEY (`id`),
  ADD KEY `index_forum_topic_visits_on_forum_topic_id` (`forum_topic_id`),
  ADD KEY `index_forum_topic_visits_on_user_id` (`user_id`);

--
-- Indexes for table `friendly_id_slugs`
--
ALTER TABLE `friendly_id_slugs`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `index_friendly_id_slugs_on_slug_and_sluggable_type` (`slug`,`sluggable_type`),
  ADD KEY `index_friendly_id_slugs_on_sluggable_id` (`sluggable_id`),
  ADD KEY `index_friendly_id_slugs_on_sluggable_type` (`sluggable_type`);

--
-- Indexes for table `gob_goe_com_categorias`
--
ALTER TABLE `gob_goe_com_categorias`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `gob_goe_com_detalle_estandares`
--
ALTER TABLE `gob_goe_com_detalle_estandares`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `gob_goe_com_estandares`
--
ALTER TABLE `gob_goe_com_estandares`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `goes_goe_are_area`
--
ALTER TABLE `goes_goe_are_area`
  ADD PRIMARY KEY (`are_id`,`are_id_ins`);

--
-- Indexes for table `goes_goe_cat_categorias`
--
ALTER TABLE `goes_goe_cat_categorias`
  ADD PRIMARY KEY (`cat_id`,`cat_id_ins`);

--
-- Indexes for table `goes_goe_cor_correo`
--
ALTER TABLE `goes_goe_cor_correo`
  ADD PRIMARY KEY (`cor_id`,`cor_id_ins`),
  ADD UNIQUE KEY `cor_direccion_UNIQUE` (`cor_direccion`);

--
-- Indexes for table `goes_goe_cxf_correoxfuncionario`
--
ALTER TABLE `goes_goe_cxf_correoxfuncionario`
  ADD PRIMARY KEY (`cxf_id_fun`,`cxf_id_ins`,`cxf_id_cor`),
  ADD KEY `FKcxf_correo659160` (`cxf_id_fun`,`cxf_id_ins2`),
  ADD KEY `FKcxf_correo52294` (`cxf_id_cor`,`cxf_id_ins`);

--
-- Indexes for table `goes_goe_des_destino`
--
ALTER TABLE `goes_goe_des_destino`
  ADD PRIMARY KEY (`des_id`,`des_id_ins`),
  ADD KEY `FKdes_destin989678` (`des_id_fun`,`des_id_ins`);

--
-- Indexes for table `goes_goe_fun_funcionario`
--
ALTER TABLE `goes_goe_fun_funcionario`
  ADD PRIMARY KEY (`fun_id`,`fun_id_ins`),
  ADD KEY `FKfun_funcio985742` (`fun_id_pla`,`fun_id_ins`);

--
-- Indexes for table `goes_goe_pas_pasos`
--
ALTER TABLE `goes_goe_pas_pasos`
  ADD PRIMARY KEY (`pas_id`,`pas_id_ser`,`pas_id_ins`),
  ADD KEY `FKgoes_goe_pas_pa873581` (`pas_id_fun`,`pas_id_ins2`),
  ADD KEY `FKgoes_goe_pas_pa686078` (`pas_id_ser`,`pas_id_ins`);

--
-- Indexes for table `goes_goe_pla_plaza`
--
ALTER TABLE `goes_goe_pla_plaza`
  ADD PRIMARY KEY (`pla_id`,`pla_id_ins`),
  ADD KEY `FKpla_plaza213180` (`pla_id_are`,`pla_id_ins2`),
  ADD KEY `FKpla_plaza671469` (`pla_id_pue`,`pla_id_ins`),
  ADD KEY `FKgoe_pla_pl88193` (`pla_id_tpl`,`pla_id_ins3`);

--
-- Indexes for table `goes_goe_tel_telefono`
--
ALTER TABLE `goes_goe_tel_telefono`
  ADD PRIMARY KEY (`tel_id`,`tel_id_ins`),
  ADD UNIQUE KEY `tel_numero` (`tel_numero`);

--
-- Indexes for table `goes_goe_tpl_tipoplaza`
--
ALTER TABLE `goes_goe_tpl_tipoplaza`
  ADD PRIMARY KEY (`tpl_id`,`tpl_id_ins`);

--
-- Indexes for table `goes_goe_txf_telefonoxfuncionario`
--
ALTER TABLE `goes_goe_txf_telefonoxfuncionario`
  ADD PRIMARY KEY (`txf_id_tel`,`txf_id_ins`,`txf_id_fun`),
  ADD KEY `FKtxf_telefo38877` (`txf_id_tel`,`txf_id_ins`),
  ADD KEY `FKtxf_telefo482824` (`txf_id_fun`,`txf_id_ins2`);

--
-- Indexes for table `information_officers`
--
ALTER TABLE `information_officers`
  ADD PRIMARY KEY (`id`),
  ADD KEY `information_officers_institution_id_fk` (`institution_id`);

--
-- Indexes for table `information_rankings`
--
ALTER TABLE `information_rankings`
  ADD PRIMARY KEY (`id`),
  ADD KEY `information_rankings_information_standard_category_id_fk` (`information_standard_category_id`);

--
-- Indexes for table `information_ranking_histories`
--
ALTER TABLE `information_ranking_histories`
  ADD PRIMARY KEY (`id`),
  ADD KEY `information_ranking_histories_information_ranking_id_fk` (`information_ranking_id`),
  ADD KEY `information_ranking_histories_information_standard_id_fk` (`information_standard_id`),
  ADD KEY `information_ranking_histories_institution_id_fk` (`institution_id`);

--
-- Indexes for table `information_ranking_history_comments`
--
ALTER TABLE `information_ranking_history_comments`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `information_ranking_history_views`
--
ALTER TABLE `information_ranking_history_views`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `information_requests`
--
ALTER TABLE `information_requests`
  ADD PRIMARY KEY (`id`),
  ADD KEY `information_requests_city_id_fk` (`city_id`),
  ADD KEY `information_requests_institution_id_fk` (`institution_id`),
  ADD KEY `information_requests_occupation_id_fk` (`occupation_id`),
  ADD KEY `index_information_requests_on_redirected_institution_id` (`redirected_institution_id`),
  ADD KEY `index_information_requests_on_state` (`state`);

--
-- Indexes for table `information_request_events`
--
ALTER TABLE `information_request_events`
  ADD PRIMARY KEY (`id`),
  ADD KEY `index_information_request_events_on_eventable` (`eventable_id`,`eventable_type`),
  ADD KEY `index_information_request_events_on_user_id` (`user_id`);

--
-- Indexes for table `information_request_records`
--
ALTER TABLE `information_request_records`
  ADD PRIMARY KEY (`id`),
  ADD KEY `index_information_request_records_on_institution_id` (`institution_id`),
  ADD KEY `index_information_request_records_on_user_id` (`user_id`);

--
-- Indexes for table `information_request_requirements`
--
ALTER TABLE `information_request_requirements`
  ADD PRIMARY KEY (`id`),
  ADD KEY `index_information_request_requirements_on_comment_id` (`comment_id`);

--
-- Indexes for table `information_standards`
--
ALTER TABLE `information_standards`
  ADD PRIMARY KEY (`id`),
  ADD KEY `index_information_standards_on_slug` (`slug`),
  ADD KEY `information_standards_information_standard_frame_id_fk` (`information_standard_frame_id`);

--
-- Indexes for table `information_standard_categories`
--
ALTER TABLE `information_standard_categories`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `information_standard_criteria`
--
ALTER TABLE `information_standard_criteria`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `information_standard_frames`
--
ALTER TABLE `information_standard_frames`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `information_standard_infos`
--
ALTER TABLE `information_standard_infos`
  ADD PRIMARY KEY (`id`),
  ADD KEY `information_standard_categories_information_standards_fk1` (`information_standard_category_id`),
  ADD KEY `information_standard_categories_information_standards_fk2` (`information_standard_id`);

--
-- Indexes for table `information_standard_statistics`
--
ALTER TABLE `information_standard_statistics`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `information_standard_statistic_tracks`
--
ALTER TABLE `information_standard_statistic_tracks`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `institutions`
--
ALTER TABLE `institutions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `institutions_institution_type_id_fk` (`institution_type_id`),
  ADD KEY `index_institutions_on_slug` (`slug`),
  ADD KEY `institutions_information_standard_category_id_fk` (`information_standard_category_id`);

--
-- Indexes for table `institutions_inventory_managers`
--
ALTER TABLE `institutions_inventory_managers`
  ADD KEY `institution_manager_ids_key` (`institution_id`,`inventory_manager_id`);

--
-- Indexes for table `institution_calendars`
--
ALTER TABLE `institution_calendars`
  ADD PRIMARY KEY (`id`),
  ADD KEY `index_institution_calendars_on_institution_id` (`institution_id`),
  ADD KEY `index_institution_calendars_on_year` (`year`);

--
-- Indexes for table `institution_confidential_infos`
--
ALTER TABLE `institution_confidential_infos`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `institution_consultants`
--
ALTER TABLE `institution_consultants`
  ADD PRIMARY KEY (`id`),
  ADD KEY `institution_consultants_institution_id_fk` (`institution_id`);

--
-- Indexes for table `institution_dependences`
--
ALTER TABLE `institution_dependences`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `institution_events`
--
ALTER TABLE `institution_events`
  ADD PRIMARY KEY (`id`),
  ADD KEY `index_institution_events_on_name` (`name`),
  ADD KEY `index_institution_events_on_institution_id` (`institution_id`);

--
-- Indexes for table `institution_event_participants`
--
ALTER TABLE `institution_event_participants`
  ADD PRIMARY KEY (`id`),
  ADD KEY `index_institution_event_participants_on_institution_event_id` (`institution_event_id`),
  ADD KEY `index_institution_event_participants_on_user_id` (`user_id`);

--
-- Indexes for table `institution_historical_confidential_infos`
--
ALTER TABLE `institution_historical_confidential_infos`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `institution_information_standards_settings`
--
ALTER TABLE `institution_information_standards_settings`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `institution_inventory_categories`
--
ALTER TABLE `institution_inventory_categories`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `institution_items`
--
ALTER TABLE `institution_items`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `institution_links`
--
ALTER TABLE `institution_links`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `institution_maintenance_information_standards`
--
ALTER TABLE `institution_maintenance_information_standards`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `institution_officials`
--
ALTER TABLE `institution_officials`
  ADD PRIMARY KEY (`id`),
  ADD KEY `institution_officials_institution_id_fk` (`institution_id`);

--
-- Indexes for table `institution_organizational_structures`
--
ALTER TABLE `institution_organizational_structures`
  ADD PRIMARY KEY (`id`),
  ADD KEY `index_institution_organizational_structures_on_institution_id` (`institution_id`),
  ADD KEY `institution_organizational_structure_ids` (`institution_organizational_structure_id`);

--
-- Indexes for table `institution_recruitment_results`
--
ALTER TABLE `institution_recruitment_results`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `institution_remunerations`
--
ALTER TABLE `institution_remunerations`
  ADD PRIMARY KEY (`id`),
  ADD KEY `institution_remunerations_institution_id_fk` (`institution_id`);

--
-- Indexes for table `institution_remuneration_histories`
--
ALTER TABLE `institution_remuneration_histories`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `institution_services`
--
ALTER TABLE `institution_services`
  ADD PRIMARY KEY (`id`),
  ADD KEY `institution_services_institution_id_fk` (`institution_id`);

--
-- Indexes for table `institution_service_attachments`
--
ALTER TABLE `institution_service_attachments`
  ADD PRIMARY KEY (`id`),
  ADD KEY `index_institution_service_attachments_on_attachable_id` (`attachable_id`);

--
-- Indexes for table `institution_service_categories`
--
ALTER TABLE `institution_service_categories`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `institution_service_steps`
--
ALTER TABLE `institution_service_steps`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `institution_subscribers`
--
ALTER TABLE `institution_subscribers`
  ADD PRIMARY KEY (`id`),
  ADD KEY `index_institution_subscribers_on_institution_id` (`institution_id`),
  ADD KEY `index_institution_subscribers_on_user_id` (`user_id`);

--
-- Indexes for table `institution_travels`
--
ALTER TABLE `institution_travels`
  ADD PRIMARY KEY (`id`),
  ADD KEY `institution_travels_institution_id_fk` (`institution_id`);

--
-- Indexes for table `institution_types`
--
ALTER TABLE `institution_types`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `interesting_infos`
--
ALTER TABLE `interesting_infos`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `internships`
--
ALTER TABLE `internships`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `line_of_works`
--
ALTER TABLE `line_of_works`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `municipal_jobs`
--
ALTER TABLE `municipal_jobs`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `nationalities`
--
ALTER TABLE `nationalities`
  ADD PRIMARY KEY (`id`),
  ADD KEY `index_nationalities_on_name` (`name`);

--
-- Indexes for table `notice_complaints`
--
ALTER TABLE `notice_complaints`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `notice_complaint_records`
--
ALTER TABLE `notice_complaint_records`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `occupations`
--
ALTER TABLE `occupations`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `ofcia_complaints`
--
ALTER TABLE `ofcia_complaints`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `organizations`
--
ALTER TABLE `organizations`
  ADD PRIMARY KEY (`id`),
  ADD KEY `index_organizations_on_code` (`code`),
  ADD KEY `index_organizations_on_name` (`name`),
  ADD KEY `index_organizations_on_acronym` (`acronym`);

--
-- Indexes for table `organization_branches`
--
ALTER TABLE `organization_branches`
  ADD PRIMARY KEY (`id`),
  ADD KEY `index_organization_branches_on_organization_id` (`organization_id`);

--
-- Indexes for table `organization_branch_areas`
--
ALTER TABLE `organization_branch_areas`
  ADD PRIMARY KEY (`id`),
  ADD KEY `index_organization_branch_areas_on_organization_branch_id` (`organization_branch_id`),
  ADD KEY `index_organization_branch_areas_on_institutions` (`institutions`),
  ADD KEY `index_organization_branch_areas_on_main_activities` (`main_activities`),
  ADD KEY `index_organization_branch_areas_on_themes` (`themes`);

--
-- Indexes for table `pages`
--
ALTER TABLE `pages`
  ADD PRIMARY KEY (`id`),
  ADD KEY `index_pages_on_slug` (`slug`),
  ADD KEY `pages_page_id_fk` (`page_id`);

--
-- Indexes for table `permissions`
--
ALTER TABLE `permissions`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `political_parties`
--
ALTER TABLE `political_parties`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `procurements`
--
ALTER TABLE `procurements`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `public_officials`
--
ALTER TABLE `public_officials`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `public_official_declarations`
--
ALTER TABLE `public_official_declarations`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `rc_accountability_citizen_evaluations`
--
ALTER TABLE `rc_accountability_citizen_evaluations`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `rc_accountability_photos`
--
ALTER TABLE `rc_accountability_photos`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `rc_accountability_resources`
--
ALTER TABLE `rc_accountability_resources`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `rc_accountability_spta_evaluations`
--
ALTER TABLE `rc_accountability_spta_evaluations`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `roles`
--
ALTER TABLE `roles`
  ADD PRIMARY KEY (`id`),
  ADD KEY `index_roles_on_user_id` (`user_id`),
  ADD KEY `index_roles_on_institution_id` (`institution_id`),
  ADD KEY `index_roles_on_role_id` (`role_id`);

--
-- Indexes for table `salary_categories`
--
ALTER TABLE `salary_categories`
  ADD PRIMARY KEY (`id`),
  ADD KEY `index_salary_categories_on_name` (`name`);

--
-- Indexes for table `schedules`
--
ALTER TABLE `schedules`
  ADD PRIMARY KEY (`id`),
  ADD KEY `index_schedules_on_owner_id` (`owner_id`),
  ADD KEY `index_schedules_on_user_id` (`user_id`),
  ADD KEY `index_schedules_on_slug` (`slug`);

--
-- Indexes for table `schedule_events`
--
ALTER TABLE `schedule_events`
  ADD PRIMARY KEY (`id`),
  ADD KEY `index_schedule_events_on_schedule_id` (`schedule_id`),
  ADD KEY `index_schedule_events_on_user_id` (`user_id`);

--
-- Indexes for table `schedule_event_participants`
--
ALTER TABLE `schedule_event_participants`
  ADD PRIMARY KEY (`id`),
  ADD KEY `index_schedule_event_participants_on_schedule_event_id` (`schedule_event_id`);

--
-- Indexes for table `schedule_users`
--
ALTER TABLE `schedule_users`
  ADD PRIMARY KEY (`id`),
  ADD KEY `index_schedule_users_on_schedule_id` (`schedule_id`),
  ADD KEY `index_schedule_users_on_user_id` (`user_id`);

--
-- Indexes for table `search_strings`
--
ALTER TABLE `search_strings`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `sessions`
--
ALTER TABLE `sessions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `index_sessions_on_session_id` (`session_id`),
  ADD KEY `index_sessions_on_updated_at` (`updated_at`);

--
-- Indexes for table `states`
--
ALTER TABLE `states`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `ta_discussions`
--
ALTER TABLE `ta_discussions`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `ta_discussion_forms`
--
ALTER TABLE `ta_discussion_forms`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `ta_discussion_pictures`
--
ALTER TABLE `ta_discussion_pictures`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `ta_suggestions`
--
ALTER TABLE `ta_suggestions`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `users`
--
ALTER TABLE `users`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `index_users_on_email` (`email`),
  ADD UNIQUE KEY `index_users_on_reset_password_token` (`reset_password_token`),
  ADD UNIQUE KEY `index_users_on_authentication_token` (`authentication_token`),
  ADD KEY `users_role_id_fk` (`role_id`),
  ADD KEY `index_users_on_user_id` (`user_id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `accountabilities`
--
ALTER TABLE `accountabilities`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1185;

--
-- AUTO_INCREMENT for table `api_key_logs`
--
ALTER TABLE `api_key_logs`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `app_complaints`
--
ALTER TABLE `app_complaints`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `attachments`
--
ALTER TABLE `attachments`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13961;

--
-- AUTO_INCREMENT for table `attachment_categories`
--
ALTER TABLE `attachment_categories`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=45;

--
-- AUTO_INCREMENT for table `backups`
--
ALTER TABLE `backups`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `calendar_events`
--
ALTER TABLE `calendar_events`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=32380;

--
-- AUTO_INCREMENT for table `categories`
--
ALTER TABLE `categories`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=61;

--
-- AUTO_INCREMENT for table `cities`
--
ALTER TABLE `cities`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=263;

--
-- AUTO_INCREMENT for table `comments`
--
ALTER TABLE `comments`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=91322;

--
-- AUTO_INCREMENT for table `comment_users`
--
ALTER TABLE `comment_users`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=56580;

--
-- AUTO_INCREMENT for table `companies`
--
ALTER TABLE `companies`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7299;

--
-- AUTO_INCREMENT for table `complaints`
--
ALTER TABLE `complaints`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4117;

--
-- AUTO_INCREMENT for table `contact_messages`
--
ALTER TABLE `contact_messages`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1243;

--
-- AUTO_INCREMENT for table `countries`
--
ALTER TABLE `countries`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=238;

--
-- AUTO_INCREMENT for table `course_participants`
--
ALTER TABLE `course_participants`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=90;

--
-- AUTO_INCREMENT for table `credit_divisions`
--
ALTER TABLE `credit_divisions`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14;

--
-- AUTO_INCREMENT for table `credit_kinds`
--
ALTER TABLE `credit_kinds`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `csv_imports`
--
ALTER TABLE `csv_imports`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=32;

--
-- AUTO_INCREMENT for table `delation_infos`
--
ALTER TABLE `delation_infos`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=141;

--
-- AUTO_INCREMENT for table `delation_institutions`
--
ALTER TABLE `delation_institutions`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=53;

--
-- AUTO_INCREMENT for table `delayed_jobs`
--
ALTER TABLE `delayed_jobs`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=184;

--
-- AUTO_INCREMENT for table `denouncements`
--
ALTER TABLE `denouncements`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=480;

--
-- AUTO_INCREMENT for table `denouncement_trackings`
--
ALTER TABLE `denouncement_trackings`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=92;

--
-- AUTO_INCREMENT for table `denounce_cars`
--
ALTER TABLE `denounce_cars`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `denounce_codes`
--
ALTER TABLE `denounce_codes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `documents`
--
ALTER TABLE `documents`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=198691;

--
-- AUTO_INCREMENT for table `document_categories`
--
ALTER TABLE `document_categories`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8097;

--
-- AUTO_INCREMENT for table `electricity_charge_types`
--
ALTER TABLE `electricity_charge_types`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT for table `electricity_companies`
--
ALTER TABLE `electricity_companies`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT for table `electricity_demand_levels`
--
ALTER TABLE `electricity_demand_levels`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `excuse_note_criteria`
--
ALTER TABLE `excuse_note_criteria`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `exportations`
--
ALTER TABLE `exportations`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=139695;

--
-- AUTO_INCREMENT for table `featured_sections`
--
ALTER TABLE `featured_sections`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;

--
-- AUTO_INCREMENT for table `forums`
--
ALTER TABLE `forums`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT for table `forum_categories`
--
ALTER TABLE `forum_categories`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `forum_posts`
--
ALTER TABLE `forum_posts`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=896;

--
-- AUTO_INCREMENT for table `forum_topics`
--
ALTER TABLE `forum_topics`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=152;

--
-- AUTO_INCREMENT for table `forum_topic_visits`
--
ALTER TABLE `forum_topic_visits`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10252;

--
-- AUTO_INCREMENT for table `friendly_id_slugs`
--
ALTER TABLE `friendly_id_slugs`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17301985;

--
-- AUTO_INCREMENT for table `gob_goe_com_categorias`
--
ALTER TABLE `gob_goe_com_categorias`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Llave primaria de la tabla gob_goe_com_categorias', AUTO_INCREMENT=46;

--
-- AUTO_INCREMENT for table `gob_goe_com_detalle_estandares`
--
ALTER TABLE `gob_goe_com_detalle_estandares`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Llave primaria de la tabla #__goe_com_detalle_estandares', AUTO_INCREMENT=797;

--
-- AUTO_INCREMENT for table `gob_goe_com_estandares`
--
ALTER TABLE `gob_goe_com_estandares`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Llave primaria de la tabla #__goe_com_estandar', AUTO_INCREMENT=69;

--
-- AUTO_INCREMENT for table `goes_goe_are_area`
--
ALTER TABLE `goes_goe_are_area`
  MODIFY `are_id` int(10) NOT NULL AUTO_INCREMENT COMMENT 'codigo principal de areas', AUTO_INCREMENT=55;

--
-- AUTO_INCREMENT for table `goes_goe_cat_categorias`
--
ALTER TABLE `goes_goe_cat_categorias`
  MODIFY `cat_id` int(10) NOT NULL AUTO_INCREMENT COMMENT 'Id de categoría', AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `goes_goe_cor_correo`
--
ALTER TABLE `goes_goe_cor_correo`
  MODIFY `cor_id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=104;

--
-- AUTO_INCREMENT for table `goes_goe_des_destino`
--
ALTER TABLE `goes_goe_des_destino`
  MODIFY `des_id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `goes_goe_fun_funcionario`
--
ALTER TABLE `goes_goe_fun_funcionario`
  MODIFY `fun_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=71;

--
-- AUTO_INCREMENT for table `goes_goe_pas_pasos`
--
ALTER TABLE `goes_goe_pas_pasos`
  MODIFY `pas_id` int(10) NOT NULL AUTO_INCREMENT COMMENT 'Id del paso', AUTO_INCREMENT=60;

--
-- AUTO_INCREMENT for table `goes_goe_pla_plaza`
--
ALTER TABLE `goes_goe_pla_plaza`
  MODIFY `pla_id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=63;

--
-- AUTO_INCREMENT for table `goes_goe_tel_telefono`
--
ALTER TABLE `goes_goe_tel_telefono`
  MODIFY `tel_id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=113;

--
-- AUTO_INCREMENT for table `goes_goe_tpl_tipoplaza`
--
ALTER TABLE `goes_goe_tpl_tipoplaza`
  MODIFY `tpl_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `information_officers`
--
ALTER TABLE `information_officers`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=260;

--
-- AUTO_INCREMENT for table `information_rankings`
--
ALTER TABLE `information_rankings`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=19;

--
-- AUTO_INCREMENT for table `information_ranking_histories`
--
ALTER TABLE `information_ranking_histories`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17914;

--
-- AUTO_INCREMENT for table `information_ranking_history_comments`
--
ALTER TABLE `information_ranking_history_comments`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10083;

--
-- AUTO_INCREMENT for table `information_ranking_history_views`
--
ALTER TABLE `information_ranking_history_views`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14569;

--
-- AUTO_INCREMENT for table `information_requests`
--
ALTER TABLE `information_requests`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=51166;

--
-- AUTO_INCREMENT for table `information_request_events`
--
ALTER TABLE `information_request_events`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=180649;

--
-- AUTO_INCREMENT for table `information_request_records`
--
ALTER TABLE `information_request_records`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=805;

--
-- AUTO_INCREMENT for table `information_request_requirements`
--
ALTER TABLE `information_request_requirements`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=46053;

--
-- AUTO_INCREMENT for table `information_standards`
--
ALTER TABLE `information_standards`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=47;

--
-- AUTO_INCREMENT for table `information_standard_categories`
--
ALTER TABLE `information_standard_categories`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12;

--
-- AUTO_INCREMENT for table `information_standard_criteria`
--
ALTER TABLE `information_standard_criteria`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=153;

--
-- AUTO_INCREMENT for table `information_standard_frames`
--
ALTER TABLE `information_standard_frames`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT for table `information_standard_infos`
--
ALTER TABLE `information_standard_infos`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=199;

--
-- AUTO_INCREMENT for table `information_standard_statistics`
--
ALTER TABLE `information_standard_statistics`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3796528;

--
-- AUTO_INCREMENT for table `information_standard_statistic_tracks`
--
ALTER TABLE `information_standard_statistic_tracks`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `institutions`
--
ALTER TABLE `institutions`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=264;

--
-- AUTO_INCREMENT for table `institution_calendars`
--
ALTER TABLE `institution_calendars`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=208;

--
-- AUTO_INCREMENT for table `institution_confidential_infos`
--
ALTER TABLE `institution_confidential_infos`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=398;

--
-- AUTO_INCREMENT for table `institution_consultants`
--
ALTER TABLE `institution_consultants`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=353;

--
-- AUTO_INCREMENT for table `institution_dependences`
--
ALTER TABLE `institution_dependences`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `institution_events`
--
ALTER TABLE `institution_events`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=662;

--
-- AUTO_INCREMENT for table `institution_event_participants`
--
ALTER TABLE `institution_event_participants`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=39;

--
-- AUTO_INCREMENT for table `institution_historical_confidential_infos`
--
ALTER TABLE `institution_historical_confidential_infos`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `institution_information_standards_settings`
--
ALTER TABLE `institution_information_standards_settings`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=244;

--
-- AUTO_INCREMENT for table `institution_inventory_categories`
--
ALTER TABLE `institution_inventory_categories`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=88;

--
-- AUTO_INCREMENT for table `institution_items`
--
ALTER TABLE `institution_items`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2076;

--
-- AUTO_INCREMENT for table `institution_links`
--
ALTER TABLE `institution_links`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=479;

--
-- AUTO_INCREMENT for table `institution_maintenance_information_standards`
--
ALTER TABLE `institution_maintenance_information_standards`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `institution_officials`
--
ALTER TABLE `institution_officials`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8873;

--
-- AUTO_INCREMENT for table `institution_organizational_structures`
--
ALTER TABLE `institution_organizational_structures`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12843;

--
-- AUTO_INCREMENT for table `institution_recruitment_results`
--
ALTER TABLE `institution_recruitment_results`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=364;

--
-- AUTO_INCREMENT for table `institution_remunerations`
--
ALTER TABLE `institution_remunerations`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=242598;

--
-- AUTO_INCREMENT for table `institution_remuneration_histories`
--
ALTER TABLE `institution_remuneration_histories`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=692120;

--
-- AUTO_INCREMENT for table `institution_services`
--
ALTER TABLE `institution_services`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6230;

--
-- AUTO_INCREMENT for table `institution_service_attachments`
--
ALTER TABLE `institution_service_attachments`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=379;

--
-- AUTO_INCREMENT for table `institution_service_categories`
--
ALTER TABLE `institution_service_categories`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1323;

--
-- AUTO_INCREMENT for table `institution_service_steps`
--
ALTER TABLE `institution_service_steps`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5868;

--
-- AUTO_INCREMENT for table `institution_subscribers`
--
ALTER TABLE `institution_subscribers`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=24;

--
-- AUTO_INCREMENT for table `institution_travels`
--
ALTER TABLE `institution_travels`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14287;

--
-- AUTO_INCREMENT for table `institution_types`
--
ALTER TABLE `institution_types`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT for table `interesting_infos`
--
ALTER TABLE `interesting_infos`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT for table `internships`
--
ALTER TABLE `internships`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `line_of_works`
--
ALTER TABLE `line_of_works`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=172;

--
-- AUTO_INCREMENT for table `municipal_jobs`
--
ALTER TABLE `municipal_jobs`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `nationalities`
--
ALTER TABLE `nationalities`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=160;

--
-- AUTO_INCREMENT for table `notice_complaints`
--
ALTER TABLE `notice_complaints`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=211;

--
-- AUTO_INCREMENT for table `notice_complaint_records`
--
ALTER TABLE `notice_complaint_records`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=125;

--
-- AUTO_INCREMENT for table `occupations`
--
ALTER TABLE `occupations`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=56;

--
-- AUTO_INCREMENT for table `ofcia_complaints`
--
ALTER TABLE `ofcia_complaints`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=59;

--
-- AUTO_INCREMENT for table `organizations`
--
ALTER TABLE `organizations`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2813;

--
-- AUTO_INCREMENT for table `organization_branches`
--
ALTER TABLE `organization_branches`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2992;

--
-- AUTO_INCREMENT for table `organization_branch_areas`
--
ALTER TABLE `organization_branch_areas`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5152;

--
-- AUTO_INCREMENT for table `pages`
--
ALTER TABLE `pages`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=35;

--
-- AUTO_INCREMENT for table `permissions`
--
ALTER TABLE `permissions`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1706;

--
-- AUTO_INCREMENT for table `political_parties`
--
ALTER TABLE `political_parties`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;

--
-- AUTO_INCREMENT for table `procurements`
--
ALTER TABLE `procurements`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=41016;

--
-- AUTO_INCREMENT for table `public_officials`
--
ALTER TABLE `public_officials`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=67;

--
-- AUTO_INCREMENT for table `public_official_declarations`
--
ALTER TABLE `public_official_declarations`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=27;

--
-- AUTO_INCREMENT for table `rc_accountability_citizen_evaluations`
--
ALTER TABLE `rc_accountability_citizen_evaluations`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `rc_accountability_photos`
--
ALTER TABLE `rc_accountability_photos`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=37;

--
-- AUTO_INCREMENT for table `rc_accountability_resources`
--
ALTER TABLE `rc_accountability_resources`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `rc_accountability_spta_evaluations`
--
ALTER TABLE `rc_accountability_spta_evaluations`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=73;

--
-- AUTO_INCREMENT for table `roles`
--
ALTER TABLE `roles`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2959;

--
-- AUTO_INCREMENT for table `salary_categories`
--
ALTER TABLE `salary_categories`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=96;

--
-- AUTO_INCREMENT for table `schedules`
--
ALTER TABLE `schedules`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `schedule_events`
--
ALTER TABLE `schedule_events`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `schedule_event_participants`
--
ALTER TABLE `schedule_event_participants`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT for table `schedule_users`
--
ALTER TABLE `schedule_users`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=18;

--
-- AUTO_INCREMENT for table `search_strings`
--
ALTER TABLE `search_strings`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=282332;

--
-- AUTO_INCREMENT for table `sessions`
--
ALTER TABLE `sessions`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `states`
--
ALTER TABLE `states`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15;

--
-- AUTO_INCREMENT for table `ta_discussions`
--
ALTER TABLE `ta_discussions`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT for table `ta_discussion_forms`
--
ALTER TABLE `ta_discussion_forms`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=70;

--
-- AUTO_INCREMENT for table `ta_discussion_pictures`
--
ALTER TABLE `ta_discussion_pictures`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `ta_suggestions`
--
ALTER TABLE `ta_suggestions`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3143;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `attachments`
--
ALTER TABLE `attachments`
  ADD CONSTRAINT `attachments_attachment_category_id_fk` FOREIGN KEY (`attachment_category_id`) REFERENCES `attachment_categories` (`id`);

--
-- Constraints for table `categories`
--
ALTER TABLE `categories`
  ADD CONSTRAINT `categories_category_id_fk` FOREIGN KEY (`category_id`) REFERENCES `categories` (`id`);

--
-- Constraints for table `cities`
--
ALTER TABLE `cities`
  ADD CONSTRAINT `cities_state_id_fk` FOREIGN KEY (`state_id`) REFERENCES `states` (`id`);

--
-- Constraints for table `companies`
--
ALTER TABLE `companies`
  ADD CONSTRAINT `companies_state_id_fk` FOREIGN KEY (`state_id`) REFERENCES `states` (`id`);

--
-- Constraints for table `complaints`
--
ALTER TABLE `complaints`
  ADD CONSTRAINT `complaints_city_id_fk` FOREIGN KEY (`city_id`) REFERENCES `cities` (`id`),
  ADD CONSTRAINT `complaints_institution_id_fk` FOREIGN KEY (`institution_id`) REFERENCES `institutions` (`id`),
  ADD CONSTRAINT `complaints_occupation_id_fk` FOREIGN KEY (`occupation_id`) REFERENCES `occupations` (`id`),
  ADD CONSTRAINT `complaints_occurred_city_id_fk` FOREIGN KEY (`occurred_city_id`) REFERENCES `cities` (`id`);

--
-- Constraints for table `csv_imports`
--
ALTER TABLE `csv_imports`
  ADD CONSTRAINT `csv_imports_user_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`);

--
-- Constraints for table `delation_infos`
--
ALTER TABLE `delation_infos`
  ADD CONSTRAINT `delation_infos_delation_institution_id_fk` FOREIGN KEY (`delation_institution_id`) REFERENCES `delation_institutions` (`id`);

--
-- Constraints for table `documents`
--
ALTER TABLE `documents`
  ADD CONSTRAINT `documents_information_standard_id_fk` FOREIGN KEY (`information_standard_id`) REFERENCES `information_standards` (`id`),
  ADD CONSTRAINT `documents_institution_id_fk` FOREIGN KEY (`institution_id`) REFERENCES `institutions` (`id`);

--
-- Constraints for table `information_officers`
--
ALTER TABLE `information_officers`
  ADD CONSTRAINT `information_officers_institution_id_fk` FOREIGN KEY (`institution_id`) REFERENCES `institutions` (`id`);

--
-- Constraints for table `information_rankings`
--
ALTER TABLE `information_rankings`
  ADD CONSTRAINT `information_rankings_information_standard_category_id_fk` FOREIGN KEY (`information_standard_category_id`) REFERENCES `information_standard_categories` (`id`);

--
-- Constraints for table `information_ranking_histories`
--
ALTER TABLE `information_ranking_histories`
  ADD CONSTRAINT `information_ranking_histories_information_ranking_id_fk` FOREIGN KEY (`information_ranking_id`) REFERENCES `information_rankings` (`id`),
  ADD CONSTRAINT `information_ranking_histories_information_standard_id_fk` FOREIGN KEY (`information_standard_id`) REFERENCES `information_standards` (`id`),
  ADD CONSTRAINT `information_ranking_histories_institution_id_fk` FOREIGN KEY (`institution_id`) REFERENCES `institutions` (`id`);

--
-- Constraints for table `information_requests`
--
ALTER TABLE `information_requests`
  ADD CONSTRAINT `information_requests_city_id_fk` FOREIGN KEY (`city_id`) REFERENCES `cities` (`id`),
  ADD CONSTRAINT `information_requests_institution_id_fk` FOREIGN KEY (`institution_id`) REFERENCES `institutions` (`id`),
  ADD CONSTRAINT `information_requests_occupation_id_fk` FOREIGN KEY (`occupation_id`) REFERENCES `occupations` (`id`);

--
-- Constraints for table `information_request_records`
--
ALTER TABLE `information_request_records`
  ADD CONSTRAINT `information_request_records_institution_id_fk` FOREIGN KEY (`institution_id`) REFERENCES `institutions` (`id`),
  ADD CONSTRAINT `information_request_records_user_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`);

--
-- Constraints for table `information_request_requirements`
--
ALTER TABLE `information_request_requirements`
  ADD CONSTRAINT `information_request_requirements_comment_id_fk` FOREIGN KEY (`comment_id`) REFERENCES `comments` (`id`);

--
-- Constraints for table `information_standards`
--
ALTER TABLE `information_standards`
  ADD CONSTRAINT `information_standards_information_standard_frame_id_fk` FOREIGN KEY (`information_standard_frame_id`) REFERENCES `information_standard_frames` (`id`);

--
-- Constraints for table `information_standard_infos`
--
ALTER TABLE `information_standard_infos`
  ADD CONSTRAINT `information_standard_categories_information_standards_fk1` FOREIGN KEY (`information_standard_category_id`) REFERENCES `information_standard_categories` (`id`),
  ADD CONSTRAINT `information_standard_categories_information_standards_fk2` FOREIGN KEY (`information_standard_id`) REFERENCES `information_standards` (`id`);

--
-- Constraints for table `institutions`
--
ALTER TABLE `institutions`
  ADD CONSTRAINT `institutions_information_standard_category_id_fk` FOREIGN KEY (`information_standard_category_id`) REFERENCES `information_standard_categories` (`id`),
  ADD CONSTRAINT `institutions_institution_type_id_fk` FOREIGN KEY (`institution_type_id`) REFERENCES `institution_types` (`id`);

--
-- Constraints for table `institution_consultants`
--
ALTER TABLE `institution_consultants`
  ADD CONSTRAINT `institution_consultants_institution_id_fk` FOREIGN KEY (`institution_id`) REFERENCES `institutions` (`id`);

--
-- Constraints for table `institution_officials`
--
ALTER TABLE `institution_officials`
  ADD CONSTRAINT `institution_officials_institution_id_fk` FOREIGN KEY (`institution_id`) REFERENCES `institutions` (`id`);

--
-- Constraints for table `institution_organizational_structures`
--
ALTER TABLE `institution_organizational_structures`
  ADD CONSTRAINT `institution_organizational_structures_fk1` FOREIGN KEY (`institution_organizational_structure_id`) REFERENCES `institution_organizational_structures` (`id`),
  ADD CONSTRAINT `institution_organizational_structures_institution_id_fk` FOREIGN KEY (`institution_id`) REFERENCES `institutions` (`id`);

--
-- Constraints for table `institution_remunerations`
--
ALTER TABLE `institution_remunerations`
  ADD CONSTRAINT `institution_remunerations_institution_id_fk` FOREIGN KEY (`institution_id`) REFERENCES `institutions` (`id`);

--
-- Constraints for table `institution_services`
--
ALTER TABLE `institution_services`
  ADD CONSTRAINT `institution_services_institution_id_fk` FOREIGN KEY (`institution_id`) REFERENCES `institutions` (`id`);

--
-- Constraints for table `institution_travels`
--
ALTER TABLE `institution_travels`
  ADD CONSTRAINT `institution_travels_institution_id_fk` FOREIGN KEY (`institution_id`) REFERENCES `institutions` (`id`);

--
-- Constraints for table `pages`
--
ALTER TABLE `pages`
  ADD CONSTRAINT `pages_page_id_fk` FOREIGN KEY (`page_id`) REFERENCES `pages` (`id`);

--
-- Constraints for table `roles`
--
ALTER TABLE `roles`
  ADD CONSTRAINT `roles_user_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`);

--
-- Constraints for table `users`
--
ALTER TABLE `users`
  ADD CONSTRAINT `users_role_id_fk` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`),
  ADD CONSTRAINT `users_user_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`);
COMMIT;

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