 --
 -- Database: `demo`
 --
+DROP DATABASE `demo`;
 CREATE DATABASE IF NOT EXISTS `demo` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
 USE `demo`;
 

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


--

  ADD CONSTRAINT `ArticleCategory_FK` FOREIGN KEY (`categoryId`) REFERENCES `categories` (`categoryId`);

--
-- Constraints for table `articles_tags`
--
ALTER TABLE `articles_tags`
  ADD CONSTRAINT `articlestags_articles_FK` FOREIGN KEY (`articleId`) REFERENCES `articles` (`articleId`) ON UPDATE CASCADE,
  ADD CONSTRAINT `articletags_tags_FK` FOREIGN KEY (`tagId`) REFERENCES `tags` (`tagId`) ON UPDATE CASCADE;

--
-- Constraints for table `categories`
--
ALTER TABLE `categories`
