-- http://www.phpmyadmin.net
--
-- Versão do servidor: 5.6.19




--
-- Database: `cms`
--

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

--
-- Estrutura da tabela `albums`
--

CREATE TABLE IF NOT EXISTS `albums` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(150) DEFAULT NULL,
  `slug` varchar(255) NOT NULL,
  `active` tinyint(1) NOT NULL DEFAULT '0',
  `created` datetime NOT NULL,
  `modified` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;

--
-- Extraindo dados da tabela `albums`
--

INSERT INTO `albums` (`id`, `title`, `slug`, `active`, `created`, `modified`) VALUES
(1, 'gangan styles', 'gangan-styles', 1, '2013-02-06 09:22:06', '2014-03-06 17:47:07');

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

--
-- Estrutura da tabela `albums_posts`
--

CREATE TABLE IF NOT EXISTS `albums_posts` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `album_id` int(11) NOT NULL,
  `post_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_albums_posts_albums1` (`album_id`),
  KEY `fk_albums_posts_posts1` (`post_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

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

--
-- Estrutura da tabela `album_relations`
--

CREATE TABLE IF NOT EXISTS `album_relations` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `album_id` int(11) NOT NULL,
  `object_id` int(11) NOT NULL,
  `scope` varchar(100) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_album_relations_albums1` (`album_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

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

--
-- Estrutura da tabela `categories`
--

CREATE TABLE IF NOT EXISTS `categories` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(150) NOT NULL,
  `slug` varchar(150) DEFAULT NULL,
  `lft` int(11) NOT NULL,
  `rght` int(11) NOT NULL,
  `active` tinyint(1) NOT NULL DEFAULT '0',
  `color` varchar(7) DEFAULT NULL,
  `created` datetime NOT NULL,
  `modified` datetime NOT NULL,
  `parent_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `slug_UNIQUE` (`slug`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=8 ;

--
-- Extraindo dados da tabela `categories`
--

INSERT INTO `categories` (`id`, `title`, `slug`, `lft`, `rght`, `active`, `color`, `created`, `modified`, `parent_id`) VALUES
(1, 'Paginas', 'paginas', 1, 2, 1, '', '2013-02-06 10:07:17', '2013-02-06 10:07:17', NULL),
(2, 'Notí­cias', 'noticias', 3, 4, 1, '', '2013-02-20 10:35:13', '2013-02-22 16:56:33', NULL),
(3, 'Agenda', 'agenda', 5, 6, 1, '', '2014-06-04 11:59:32', '2014-06-04 11:59:32', NULL),
(4, 'Multimidia', 'multimidia', 7, 14, 1, '', '2014-06-04 12:00:52', '2014-06-04 12:00:52', NULL),
(5, 'Album de fotos', 'album-de-fotos', 8, 9, 1, '', '2014-06-04 12:01:39', '2014-06-04 12:01:39', 4),
(6, 'Clipping', 'clipping', 10, 11, 1, '', '2014-06-04 12:01:57', '2014-06-04 12:01:57', 4),
(7, 'Vídeo', 'video', 12, 13, 1, '', '2014-06-04 12:02:13', '2014-06-04 12:02:13', 4);

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

--
-- Estrutura da tabela `categories_posts`
--

CREATE TABLE IF NOT EXISTS `categories_posts` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `category_id` int(11) NOT NULL,
  `post_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_categories_posts_categories1` (`category_id`),
  KEY `fk_categories_posts_posts1` (`post_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;

--
-- Extraindo dados da tabela `categories_posts`
--

INSERT INTO `categories_posts` (`id`, `category_id`, `post_id`) VALUES
(1, 1, 2),
(2, 1, 3);

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

--
-- Estrutura da tabela `comments`
--

CREATE TABLE IF NOT EXISTS `comments` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(150) NOT NULL,
  `email` varchar(150) DEFAULT NULL,
  `text` text NOT NULL,
  `active` tinyint(1) NOT NULL DEFAULT '0',
  `created` datetime NOT NULL,
  `modified` datetime NOT NULL,
  `post_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_comments_posts1` (`post_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

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

--
-- Estrutura da tabela `configurations`
--

CREATE TABLE IF NOT EXISTS `configurations` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(150) NOT NULL,
  `value` text,
  `active` tinyint(1) NOT NULL DEFAULT '0',
  `created` datetime NOT NULL,
  `modified` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=132 ;

--
-- Extraindo dados da tabela `configurations`
--

INSERT INTO `configurations` (`id`, `title`, `value`, `active`, `created`, `modified`) VALUES
(125, 'meta_keywords', 'Palavras, Chavas', 1, '2012-12-14 16:34:59', '2014-07-10 16:20:11'),
(126, 'meta_description', 'Descrição do site', 1, '2012-12-14 16:34:59', '2014-07-10 16:19:59'),
(127, 'title', 'Título - mudar em configurações', 1, '2012-12-14 16:34:59', '2014-07-10 16:19:35'),
(128, 'project_name', 'Projeto - mudar em configurações', 1, '2012-12-14 16:35:01', '2014-07-10 16:19:42'),
(129, 'analytics', '', 1, '2012-12-14 16:35:02', '2012-12-20 11:21:11'),
(130, 'img.teste', '450x450', 1, '2013-02-25 17:41:43', '2013-02-25 17:41:43'),
(131, 'contact.email', 'atendimento@maxmeio.com', 1, '2014-05-08 17:25:40', '2014-07-10 16:19:52');

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

--
-- Estrutura da tabela `coordinates`
--

CREATE TABLE IF NOT EXISTS `coordinates` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `x` int(11) NOT NULL,
  `y` int(11) NOT NULL,
  `cw` int(11) NOT NULL,
  `ch` int(11) NOT NULL,
  `iw` int(11) NOT NULL,
  `ih` int(11) NOT NULL,
  `scope` varchar(100) NOT NULL,
  `photo_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_coordinates_photos1` (`photo_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=9 ;

--
-- Extraindo dados da tabela `coordinates`
--

INSERT INTO `coordinates` (`id`, `x`, `y`, `cw`, `ch`, `iw`, `ih`, `scope`, `photo_id`) VALUES
(1, 124, 168, 450, 450, 792, 619, 'teste', 7),
(3, 150, 150, 450, 450, 1022, 1022, 'teste', 1),
(6, 57, 3, 450, 450, 599, 468, 'teste', 4),
(8, 0, 0, 450, 450, 662, 497, 'teste', 13);

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

--
-- Estrutura da tabela `forms`
--

CREATE TABLE IF NOT EXISTS `forms` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET latin1 DEFAULT NULL,
  `read` tinyint(1) unsigned DEFAULT '0',
  `created` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=12 ;

--
-- Extraindo dados da tabela `forms`
--

INSERT INTO `forms` (`id`, `name`, `read`, `created`) VALUES
(1, 'Contato', 1, '2013-02-22 16:59:39'),
(2, 'Contato', 1, '2013-02-22 16:59:42'),
(3, 'Contato', 1, '2013-02-22 16:59:44'),
(4, 'Contato', 1, '2013-02-22 16:59:46'),
(5, 'Contato', 1, '2013-02-22 16:59:47'),
(6, 'Contato', 1, '2013-02-22 16:59:49'),
(7, 'Contato', 1, '2013-02-22 16:59:50'),
(8, 'Contato', 1, '2013-02-22 16:59:53'),
(9, 'Contato', 1, '2013-02-22 16:59:54'),
(10, 'Contato', 1, '2013-02-22 17:00:03'),
(11, 'Contato', 1, '2013-02-22 17:00:07');

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

--
-- Estrutura da tabela `groups`
--

CREATE TABLE IF NOT EXISTS `groups` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(100) NOT NULL,
  `rules` text,
  `active` tinyint(1) NOT NULL DEFAULT '0',
  `login_redirect` varchar(255) DEFAULT NULL,
  `logout_redirect` varchar(255) DEFAULT NULL,
  `created` datetime NOT NULL,
  `modified` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;

--
-- Extraindo dados da tabela `groups`
--

INSERT INTO `groups` (`id`, `name`, `rules`, `active`, `login_redirect`, `logout_redirect`, `created`, `modified`) VALUES
(1, 'Administrador', '{"AlbumRelations":["admin_index","admin_view","admin_add","admin_edit","admin_delete","admin_changeState","admin_multipleActions"],"Albums":["admin_index","admin_view","admin_add","admin_edit","admin_delete","admin_changeState","admin_multipleActions"],"AlbumsPosts":["admin_index","admin_view","admin_add","admin_edit","admin_delete","admin_changeState","admin_multipleActions"],"Categories":["admin_index","admin_view","admin_add","admin_edit","admin_delete","admin_changeState","admin_multipleActions"],"CategoriesPosts":["admin_index","admin_view","admin_add","admin_edit","admin_delete","admin_changeState","admin_multipleActions"],"Comments":["admin_index","admin_view","admin_add","admin_edit","admin_delete","admin_changeState","admin_multipleActions"],"Configurations":["admin_index","admin_view","admin_add","admin_edit","admin_editConfig","admin_delete","admin_changeState","admin_multipleActions"],"Coordinates":["admin_index","admin_view","admin_add","admin_edit","admin_delete","admin_changeState","admin_multipleActions"],"Fields":["admin_index","admin_view","admin_add","admin_edit","admin_delete","admin_changeState","admin_multipleActions"],"Forms":["admin_index","admin_view","admin_add","admin_edit","admin_delete","admin_changeState","admin_multipleActions"],"Groups":["admin_index","admin_view","admin_add","admin_edit","admin_delete","admin_changeState","admin_multipleActions"],"Links":["admin_index","admin_view","admin_add","admin_edit","admin_delete","admin_changeState","admin_multipleActions"],"Menus":["admin_index","admin_view","admin_add","admin_edit","admin_delete","admin_changeState","admin_multipleActions"],"Newsletters":["admin_index","admin_view","admin_add","admin_edit","admin_delete","admin_changeState","admin_multipleActions"],"Pages":["admin_index","admin_changeState","admin_multipleActions"],"PhotoRelations":["admin_index","admin_view","admin_add","admin_edit","admin_delete","admin_removeRelation","admin_changeState","admin_multipleActions"],"Photos":["admin_index","admin_view","admin_add","admin_addonalbum","admin_edit","admin_labelEdit","admin_delete","admin_deleteonalbum","admin_redactorChoose","admin_redactorUpload","admin_imageUpload","admin_imageCrop","admin_crop","admin_cropSave","admin_changeState","admin_multipleActions"],"Posts":["admin_index","admin_view","admin_add","admin_edit","admin_delete","admin_changeState","admin_multipleActions"],"Users":["admin_index","admin_view","admin_add","admin_edit","admin_delete","admin_passwordChange","admin_changeState","admin_multipleActions"]}', 1, '', '', '2012-04-27 10:46:29', '2012-11-29 18:13:40');

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

--
-- Estrutura da tabela `links`
--

CREATE TABLE IF NOT EXISTS `links` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `label` varchar(100) NOT NULL,
  `url` varchar(255) NOT NULL,
  `target` varchar(45) DEFAULT NULL,
  `order` int(11) DEFAULT NULL,
  `menu_id` int(11) NOT NULL,
  `link_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_links_menus1` (`menu_id`),
  KEY `fk_links_links1` (`link_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

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

--
-- Estrutura da tabela `menus`
--

CREATE TABLE IF NOT EXISTS `menus` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(45) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

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

--
-- Estrutura da tabela `newsletters`
--

CREATE TABLE IF NOT EXISTS `newsletters` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(150) DEFAULT NULL,
  `email` varchar(150) NOT NULL,
  `created` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

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

--
-- Estrutura da tabela `photos`
--

CREATE TABLE IF NOT EXISTS `photos` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `image` varchar(255) NOT NULL,
  `label` varchar(150) DEFAULT NULL,
  `cover` tinyint(1) NOT NULL,
  `created` datetime NOT NULL,
  `modified` datetime NOT NULL,
  `album_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_photos_albums1` (`album_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=14 ;

--
-- Extraindo dados da tabela `photos`
--

INSERT INTO `photos` (`id`, `image`, `label`, `cover`, `created`, `modified`, `album_id`) VALUES
(1, 'abstract_q_c_1920_1920_3.jpg', NULL, 0, '2013-02-25 17:42:21', '2013-02-25 17:42:21', 1),
(2, 'people_q_c_1024_800_1.jpg', NULL, 0, '2013-02-25 17:42:21', '2013-02-25 17:42:21', 1),
(3, 'people_q_c_1024_800_7.jpg', NULL, 0, '2013-02-25 17:42:21', '2013-02-25 17:42:21', 1),
(4, 'people_q_c_1024_800_9.jpg', NULL, 0, '2013-02-25 17:42:21', '2013-02-25 17:42:21', 1),
(5, 'sports_q_c_1024_800_5.jpg', NULL, 0, '2013-02-25 17:42:22', '2013-02-25 17:42:22', 1),
(6, 'technics_q_c_1024_800_4.jpg', NULL, 0, '2013-02-25 17:42:22', '2013-02-25 17:42:22', 1),
(7, 'technics_q_c_1024_800_6.jpg', NULL, 0, '2013-02-25 17:42:22', '2013-02-25 17:42:22', 1),
(8, 'technics_q_c_1024_800_7.jpg', NULL, 0, '2013-02-25 17:42:22', '2013-02-25 17:42:22', 1),
(9, 'imagens_14ef98.jpg', 'teste5', 0, '2014-03-06 17:52:26', '2014-03-07 17:12:15', NULL),
(10, 'imagens_b7562b.jpg', 'teste4', 0, '2014-03-06 17:54:14', '2014-03-07 17:01:29', NULL),
(11, 'imagens_b7562b-0.jpg', 'teste3', 0, '2014-03-06 17:54:41', '2014-03-07 17:01:26', NULL),
(12, 'imagens_b7562b-1.jpg', 'teste2', 0, '2014-03-06 17:54:52', '2014-03-07 17:01:21', NULL),
(13, 'imagens_14ef98-0.jpg', 'teste1', 0, '2014-03-06 17:56:52', '2014-03-07 18:23:38', NULL);

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

--
-- Estrutura da tabela `photo_relations`
--

CREATE TABLE IF NOT EXISTS `photo_relations` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `object_id` int(11) NOT NULL,
  `scope` varchar(100) NOT NULL,
  `photo_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_photo_relations_photos1` (`photo_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=9 ;

--
-- Extraindo dados da tabela `photo_relations`
--

INSERT INTO `photo_relations` (`id`, `object_id`, `scope`, `photo_id`) VALUES
(5, 1, 'Album', 10),
(8, 3, 'Post', 13);

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

--
-- Estrutura da tabela `posts`
--

CREATE TABLE IF NOT EXISTS `posts` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(150) NOT NULL,
  `subtitle` varchar(255) DEFAULT NULL,
  `slug` varchar(255) DEFAULT NULL,
  `call` text,
  `text` text,
  `publication` datetime DEFAULT NULL,
  `disable` datetime DEFAULT NULL,
  `active` tinyint(1) NOT NULL DEFAULT '0',
  `order` int(11) DEFAULT NULL,
  `author` varchar(150) DEFAULT NULL,
  `link` varchar(255) DEFAULT NULL,
  `video` varchar(255) DEFAULT NULL,
  `source` varchar(255) DEFAULT NULL,
  `tags` varchar(255) DEFAULT NULL,
  `keywords` text,
  `description` text,
  `created` datetime NOT NULL,
  `modified` datetime NOT NULL,
  `menu_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `slug_UNIQUE` (`slug`),
  KEY `fk_posts_menus1` (`menu_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ;

--
-- Extraindo dados da tabela `posts`
--

INSERT INTO `posts` (`id`, `title`, `subtitle`, `slug`, `call`, `text`, `publication`, `disable`, `active`, `order`, `author`, `link`, `video`, `source`, `tags`, `keywords`, `description`, `created`, `modified`, `menu_id`) VALUES
(2, 'teste 2', '', 'teste-2', '', '<p>Dr. Albert nasceu em Natal-RN no dia 18 de abril de 1972, sendo o último filho de Damião Batista de Lima e Teresinha de Oliveira Lima, ambos vindos do interior do RN para a capital, na década de 60. Casado com a Dra. Hilkéa Carla e pai de Albert Filho e Davi. Estudou medicina em Natal, fora do Estado e País. Evangélico há 25 anos, foi líder de jovens de sua igreja e cursou o IBAD - Instituto Bíblico das Assembléias de Deus.</p>\r\n						<p>Aos 24 anos foi estudar fora do RN para se especializar em Oftalmologia. Estudou no maior Hospital de Olhos da América Latina, o HOPE- FAV, indo morar em San Juan, Caribe, onde teve acesso aos mais conceituados oftalmologistas do mundo.</p>\r\n						<p>Um desses contatos gerou-lhe a expectativa de voltar à sua terra natal e dar inicio ao seu trabalho voluntário de ajudar as pessoas. Recebeu vários convites para morar fora do Estado e País, devido à sua especialidade em Cirurgia de Transplante de Córnea e Catarata. Fez diversas pesquisas experimentais que renderam-lhe prêmios nacionais e internacionais como pesquisador.</p>\r\n						<p>Com visibilidade internacional, foi representar o Conselho Brasileiro de Oftalmologia em Orlando- EUA e San Juan. Em seguida foi morar no Caribe, onde se especializou em Doenças Externas do Olho.</p>\r\n						<p>De volta ao Brasil, continuou suas linhas de pesquisas as quais lhe rendeu a base para a fabricação do colírio de uma grande multinacional em medicamentos.</p>\r\n						<p>Implantou a Clínica Dr. Albert e com ela os projetos sociais “Um novo olhar” e “Solidariedade”, onde são doados mais de 1.000 consultas por mês gratuitamente e mais de uma tonelada de Alimentos são repassados para comunidades e instituições filantrópicas mensalmente.</p>\r\n						<p>Sua biografia foi incluída no Centro Internacional de Cambridge, na Inglaterra, e no livro Whos Whos, nos EUA. É membro do Conselho Brasileiro de Oftalmologia, da Sociedade Brasileira de Oftalmologia, da Sociedade para Pesquisa em Cirurgia e da Academia Americana de Oftalmologia.</p>\r\n						<p>Em seu segundo mandato como Vereador da cidade de Natal, eleito com 7.344 votos, tem ideias de promover leis em prol da saúde pública e com a marca da assistência social.</p>', '2013-06-02 00:00:00', NULL, 1, 9999, '', '', 'http://www.youtube.com/watch?v=VWt_OByJmUk', '', '', '', '', '2013-02-06 10:08:02', '2014-08-05 10:08:57', NULL),
(3, 'Teste', '', 'teste', '<p>teste&nbsp;<span rel="pastemarkerend" id="pastemarkerend77506"></span>çãéô<span rel="pastemarkerend" id="pastemarkerend83923"></span></p>\r\n', '<p>teste&nbsp;<span rel="pastemarkerend" id="pastemarkerend47956"></span>çãéô<span rel="pastemarkerend" id="pastemarkerend47920"></span></p>\r\n', '2013-06-02 00:00:00', NULL, 1, 9999, '', '', '', '', '', '', '', '2013-02-06 10:08:35', '2014-08-05 10:08:34', NULL);

--
-- Constraints for dumped tables
--

--
-- Limitadores para a tabela `albums_posts`
--
ALTER TABLE `albums_posts`
  ADD CONSTRAINT `fk_albums_posts_albums1` FOREIGN KEY (`album_id`) REFERENCES `albums` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_albums_posts_posts1` FOREIGN KEY (`post_id`) REFERENCES `posts` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION;

--
-- Limitadores para a tabela `album_relations`
--
ALTER TABLE `album_relations`
  ADD CONSTRAINT `fk_album_relations_albums1` FOREIGN KEY (`album_id`) REFERENCES `albums` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION;

--
-- Limitadores para a tabela `categories_posts`
--
ALTER TABLE `categories_posts`
  ADD CONSTRAINT `fk_categories_posts_categories1` FOREIGN KEY (`category_id`) REFERENCES `categories` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_categories_posts_posts1` FOREIGN KEY (`post_id`) REFERENCES `posts` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION;

--
-- Limitadores para a tabela `comments`
--
ALTER TABLE `comments`
  ADD CONSTRAINT `fk_comments_posts1` FOREIGN KEY (`post_id`) REFERENCES `posts` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION;

--
-- Limitadores para a tabela `coordinates`
--
ALTER TABLE `coordinates`
  ADD CONSTRAINT `fk_coordinates_photos1` FOREIGN KEY (`photo_id`) REFERENCES `photos` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION;

--
-- Limitadores para a tabela `links`
--
ALTER TABLE `links`
  ADD CONSTRAINT `fk_links_links1` FOREIGN KEY (`link_id`) REFERENCES `links` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_links_menus1` FOREIGN KEY (`menu_id`) REFERENCES `menus` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION;

--
-- Limitadores para a tabela `photos`
--
ALTER TABLE `photos`
  ADD CONSTRAINT `fk_photos_albums1` FOREIGN KEY (`album_id`) REFERENCES `albums` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION;

--
-- Limitadores para a tabela `photo_relations`
--
ALTER TABLE `photo_relations`
  ADD CONSTRAINT `fk_photo_relations_photos1` FOREIGN KEY (`photo_id`) REFERENCES `photos` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION;

--
-- Limitadores para a tabela `posts`
--
ALTER TABLE `posts`
  ADD CONSTRAINT `fk_posts_menus1` FOREIGN KEY (`menu_id`) REFERENCES `menus` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION;

