-- Adminer 4.2.2 MySQL dump

SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';

CREATE TABLE `migrations` (
  `migration` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `batch` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

INSERT INTO `migrations` (`migration`, `batch`) VALUES
('2014_10_12_000000_create_users_table',	1),
('2014_10_12_100000_create_password_resets_table',	1),
('2015_12_14_093017_create_posts_table',	1),
('2015_12_14_093113_create_tags_table',	1),
('2015_12_14_093137_create_post_tag_table',	1);


CREATE TABLE `posts` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `excerpt` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `content` longtext COLLATE utf8_unicode_ci NOT NULL,
  `begin` datetime NOT NULL,
  `end` datetime NOT NULL,
  `published_at` datetime NOT NULL,
  `status` enum('publié','dé-publié','supprimé') COLLATE utf8_unicode_ci NOT NULL,
  `urlconf` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `urlimg` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

INSERT INTO `posts` (`id`, `title`, `excerpt`, `content`, `begin`, `end`, `published_at`, `status`, `urlconf`, `urlimg`, `created_at`, `updated_at`) VALUES
(1,	'Symfony Live Madrid 2014',	'SensioLabs Madrid is proud to announce the third edition of the exceptionally successful SymfonyLive Madrid.',	'The two day conference will take place on Thursday 25th - Friday 26th September 2014, in the heart of Madrid, and will bring together the sharpest minds in open source enterprise software development. Day one is a workshop day consisting of hands-on training courses from industry leading Symfony experts. Day two is the main conference day when we\'re pulling out all the stops. Talks on Symfony, Drupal, BDD and wider PHP topics will make this an event to remember.',	'0000-00-00 00:00:00',	'0000-00-00 00:00:00',	'0000-00-00 00:00:00',	'publié',	'http://berlin2014.live.symfony.com/',	'asset/images/confs/symfony_madrid.png',	'0000-00-00 00:00:00',	'2015-12-14 13:21:14'),
(2,	'Symfony Live London 2014',	'SensioLabs UK is proud to announce the third edition of the exceptionally successful SymfonyLive London. ',	'The two day conference will take place on Thursday 25th - Friday 26th September 2014, in the heart of London, and will bring together the sharpest minds in open source enterprise software development. Day one is a workshop day consisting of hands-on training courses from industry leading Symfony experts. Day two is the main conference day when we\'re pulling out all the stops. Talks on Symfony, Drupal, BDD and wider PHP topics will make this an event to remember. ',	'0000-00-00 00:00:00',	'0000-00-00 00:00:00',	'0000-00-00 00:00:00',	'publié',	'http://london2014.live.symfony.com/',	'asset/images/confs/symfony_london.png',	'0000-00-00 00:00:00',	'2015-12-14 13:20:54'),
(3,	'Laracom Amsterdam 2014',	'The creator of Laravel gives a talk about building artisan commands, the IoC container, queues, testing, and some upcoming Laravel features. ',	'The Community contributor Tony talks about his experiences writing large applications with Laravel 4 and his current architectural approaches.\r\nThe creator of Laravel gives a talk about building artisan commands, the IoC container, queues, testing, and some upcoming Laravel features. ',	'0000-00-00 00:00:00',	'0000-00-00 00:00:00',	'0000-00-00 00:00:00',	'publié',	'http://laracon.eu/2014/',	'asset/images/confs/laravel_amsterdam2014.jpg',	'0000-00-00 00:00:00',	'2015-12-14 13:21:00'),
(4,	'PHP Tour 2014',	'Cette année au PHP Tour Lyon 2014, l\'AFUP et JoliCode, sponsor Argent, exaucent leur souhait ! Un apéro communautaire se tiendra le lundi 23 juin, uniquement réservé aux visiteurs de l\'event, juste après la fin de la première journée de conférences. ',	'C\'est au Red House, pub situé à quelques pas de la Manufacture des Tabacs, que nous organiserons cet apéro PHP exceptionnel. Repas, boissons, ambiance conviviale, quelques surprises, on se charge de tout ! Et l\'AFUP est soutenue dans l\'organisation de cette soirée par JoliCode, agence experte dans la réalisation de projets Web et mobiles. En effet, JoliCode s\'implique dans de nombreuses conférences à travers le monde, et a depuis toujours une véritable affinité avec les événements AFUP. Sans compter que les développeurs de JoliCode sont convaincus que, ce qu\'il y a de mieux dans une conférence, ce sont les gens que l\'on y croise et les discussions qui s\'en suivent... C\'est pourquoi, en plus de devenir sponsor Argent du PHP Tour Lyon 2014, JoliCode participe à l\'organisation de cet apéro communautaire gratuit pour tous les visiteurs de l\'event !',	'0000-00-00 00:00:00',	'0000-00-00 00:00:00',	'0000-00-00 00:00:00',	'publié',	'http://afup.org/pages/phptourlyon2014/',	'asset/images/confs/rasmusLerdorf.jpg',	'0000-00-00 00:00:00',	'0000-00-00 00:00:00');

CREATE TABLE `post_tag` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `post_id` int(10) unsigned NOT NULL,
  `tag_id` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `post_tag_post_id_index` (`post_id`),
  KEY `post_tag_tag_id_index` (`tag_id`),
  CONSTRAINT `post_tag_post_id_foreign` FOREIGN KEY (`post_id`) REFERENCES `posts` (`id`) ON DELETE CASCADE,
  CONSTRAINT `post_tag_tag_id_foreign` FOREIGN KEY (`tag_id`) REFERENCES `tags` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

INSERT INTO `post_tag` (`id`, `post_id`, `tag_id`) VALUES
(1,	1,	4),
(2,	2,	3),
(3,	4,	1),
(4,	4,	3),
(5,	4,	4);

CREATE TABLE `tags` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

INSERT INTO `tags` (`id`, `name`, `created_at`, `updated_at`) VALUES
(1,	'design pattern',	'0000-00-00 00:00:00',	'0000-00-00 00:00:00'),
(2,	'cache',	'0000-00-00 00:00:00',	'0000-00-00 00:00:00'),
(3,	'tests',	'0000-00-00 00:00:00',	'0000-00-00 00:00:00'),
(4,	'sécurité',	'0000-00-00 00:00:00',	'0000-00-00 00:00:00');

-- 2015-12-14 13:25:13
