Skip to content

Instantly share code, notes, and snippets.

@harikt
Created July 28, 2014 15:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save harikt/9bc6f991c8b7c82db650 to your computer and use it in GitHub Desktop.
Save harikt/9bc6f991c8b7c82db650 to your computer and use it in GitHub Desktop.
The database that supporting my experiments https://github.com/harikt/experiments
-- Adminer 4.1.0 MySQL dump
SET NAMES utf8;
SET time_zone = '+00:00';
SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
DROP TABLE IF EXISTS `authors`;
CREATE TABLE `authors` (
`id` varchar(255) NOT NULL,
`name` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `authors` (`id`, `name`) VALUES
('67a731b6-0434-4240-a6bd-931aacaba29b', 'Paul M Jones'),
('8ffa0a93-fba2-4a2a-ac8a-69b370c51e9f', 'Beau Simensen'),
('dac1004d-575d-44d6-90d2-884aa651fcd9', 'Hari KT');
DROP TABLE IF EXISTS `posts`;
CREATE TABLE `posts` (
`id` varchar(255) NOT NULL,
`title` varchar(255) NOT NULL,
`body` text NOT NULL,
`author_id` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `posts` (`id`, `title`, `body`, `author_id`) VALUES
('277b62e7-d03b-42e4-a171-87ffe4eb6faf', 'Oh and the title is changed', 'Oh and the body is changed', 'dac1004d-575d-44d6-90d2-884aa651fcd9'),
('c0313abc-50bd-4f81-b979-89d936297e64', 'Something else', 'Something else body', '67a731b6-0434-4240-a6bd-931aacaba29b'),
('f72c03ca-d6e5-4ee4-bce6-14a43de1e3de', 'Hello Post', 'Hello Post Body', '8ffa0a93-fba2-4a2a-ac8a-69b370c51e9f');
DROP TABLE IF EXISTS `posts_tags`;
CREATE TABLE `posts_tags` (
`id` varchar(255) NOT NULL,
`post_id` varchar(255) NOT NULL,
`tag_id` varchar(255) NOT NULL,
PRIMARY KEY (`id`),
KEY `post_id` (`post_id`),
KEY `tag_id` (`tag_id`),
CONSTRAINT `posts_tags_ibfk_1` FOREIGN KEY (`post_id`) REFERENCES `posts` (`id`) ON DELETE CASCADE,
CONSTRAINT `posts_tags_ibfk_2` FOREIGN KEY (`tag_id`) REFERENCES `tags` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `posts_tags` (`id`, `post_id`, `tag_id`) VALUES
('6fed1f6d-09d7-45c4-91b7-bd07d62a88b2', '277b62e7-d03b-42e4-a171-87ffe4eb6faf', '160e2b93-52c9-448f-a667-bd5ce141c3e3'),
('bf515650-a161-4056-831a-64bf9bcadd9c', '277b62e7-d03b-42e4-a171-87ffe4eb6faf', '0423ba07-4537-4f58-a485-dd460ecf1ec5');
DROP TABLE IF EXISTS `tags`;
CREATE TABLE `tags` (
`id` varchar(255) NOT NULL,
`name` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `tags` (`id`, `name`) VALUES
('0423ba07-4537-4f58-a485-dd460ecf1ec5', 'framework'),
('10d0cdd7-634e-498c-bf49-00672edfc915', 'php'),
('160e2b93-52c9-448f-a667-bd5ce141c3e3', 'aura');
-- 2014-07-28 15:33:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment