Commit 1ee8a82a authored by Mat's avatar Mat
Browse files

modif sur la colonne 'unité' de l'entité 'Legume' + dumpdb + chmod

parent 587cc6bd
......@@ -68,7 +68,7 @@ class Legume
/**
* @var string
*
* @ORM\Column(name="unite", type="string", length=25)
* @ORM\Column(name="unite", type="string", columnDefinition="enum('kg', 'botte', 'pièce')")
*/
private $unite;
......
......@@ -51,7 +51,7 @@ class Offre
private $updatedAt;
/**
* @var array
* @var string
*
* @ORM\Column(name="status", type="string", columnDefinition="enum('draft', 'current', 'closed', 'trash')")
*/
......
File mode changed from 100644 to 100755
......@@ -3,7 +3,7 @@
-- https://www.phpmyadmin.net/
--
-- Hôte : 172.17.0.1
-- Généré le : Dim 03 juin 2018 à 07:54
-- Généré le : jeu. 07 juin 2018 à 11:31
-- Version du serveur : 10.0.34-MariaDB-1~jessie
-- Version de PHP : 7.2.2
......@@ -50,7 +50,7 @@ CREATE TABLE `fos_user` (
--
INSERT INTO `fos_user` (`id`, `username`, `username_canonical`, `email`, `email_canonical`, `enabled`, `salt`, `password`, `last_login`, `confirmation_token`, `password_requested_at`, `roles`) VALUES
(1, 'mathieu', 'mathieu', 'jaum_mathieu@collectifs.net', 'jaum_mathieu@collectifs.net', 1, NULL, '$2y$13$YM5GI53uRu0k32kIL8aZyeOSqkiZIEdXA5t2vdmchfPBMWcso3eJa', '2018-06-02 23:43:37', NULL, NULL, 'a:1:{i:0;s:10:\"ROLE_ADMIN\";}');
(1, 'mathieu', 'mathieu', 'jaum_mathieu@collectifs.net', 'jaum_mathieu@collectifs.net', 1, NULL, '$2y$13$YM5GI53uRu0k32kIL8aZyeOSqkiZIEdXA5t2vdmchfPBMWcso3eJa', '2018-06-07 09:42:28', NULL, NULL, 'a:1:{i:0;s:10:\"ROLE_ADMIN\";}');
-- --------------------------------------------------------
......@@ -63,43 +63,108 @@ CREATE TABLE `legume` (
`nom` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
`description` longtext COLLATE utf8_unicode_ci NOT NULL,
`origine` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
`unite` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
`unite` enum('kg','botte','pièce') COLLATE utf8_unicode_ci DEFAULT NULL,
`quantite_min` double DEFAULT NULL,
`quantite_max` double DEFAULT NULL,
`quantite_step` double DEFAULT NULL,
`prix_unitaire` double NOT NULL
`prix_unitaire` double NOT NULL,
`updated_at` datetime NOT NULL,
`image` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`created_at` datetime NOT NULL,
`is_fruit` tinyint(1) NOT NULL,
`is_revente` tinyint(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- Déchargement des données de la table `legume`
--
INSERT INTO `legume` (`id`, `nom`, `description`, `origine`, `unite`, `quantite_min`, `quantite_max`, `quantite_step`, `prix_unitaire`) VALUES
(1, 'Courgettes', 'Jeunes courgettes en vrac', NULL, 'kg', 0.2, 30, 0.2, 4),
(2, 'Persil', 'Botte de persil plat', NULL, 'botte', 1, 10, NULL, 1.4),
(3, 'Chou pointu', '', NULL, 'pièce', NULL, NULL, NULL, 2.2),
(4, 'Persil', '', NULL, 'botte', NULL, NULL, NULL, 1.6),
(5, 'Jeunes oignons', '', NULL, 'botte', NULL, NULL, NULL, 1.6),
(6, 'Aillette', '', NULL, 'botte', NULL, NULL, NULL, 2),
(7, 'Jeunes Navet', '', NULL, 'botte', NULL, NULL, NULL, 1.6),
(8, 'Chou Rave vert', '', NULL, 'pièce', NULL, NULL, NULL, 1.5),
(9, 'Bette Primeur', 'ici c\'est fait', 'azerty', 'botte', 2, 1, 0.2, 2.2),
(10, 'PDT Agria', 'Intermédiaire de chez Françis Dumortier, Agri.Biodynamique Wallonie', NULL, 'kg', 1, 1, NULL, 1.2),
(11, 'PDT Agria', 'Intermédiaire de chez Françis Dumortier, Agri.Biodynamique Wallonie', NULL, 'kg', 15, 15, NULL, 15),
(12, 'PDT ditta', 'Ferme Bio Belge', NULL, 'kg', 1, 1, NULL, 1.2),
(13, 'Carotte', 'Nouvelle, Italie', NULL, 'kg', NULL, NULL, NULL, 2),
(14, 'Oignon Jaune', 'Bio Belge', NULL, 'kg', NULL, NULL, NULL, 1.5),
(15, 'Oignon Rouge', 'Bio Belge', NULL, 'kg', NULL, NULL, NULL, 2.5),
(16, 'Échalotes', 'Bio Lorraine', NULL, 'kg', NULL, NULL, NULL, 5),
(17, 'Ail sec', 'Bio Espagne', NULL, 'kg', NULL, NULL, NULL, 10),
(18, 'Céleri rave', 'Bio Belge', NULL, 'pièce', NULL, NULL, NULL, 2.5),
(19, 'Poireaux', 'Bio Belge', NULL, 'kg', NULL, NULL, NULL, 4),
(20, 'Orange', 'Valencia Bio Italie', NULL, 'kg', NULL, NULL, NULL, 2.2),
(21, 'Citron', 'Bio Italie', NULL, 'kg', NULL, NULL, NULL, 3),
(22, 'Courgettes', 'Jeunes courgettes en vrac. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.', NULL, 'kg', NULL, NULL, NULL, 4),
(23, 'Persil', 'Botte de persil plat', NULL, 'botte', 1, 10, NULL, 1.4),
(24, 'Persil', '', NULL, 'botte', NULL, NULL, NULL, 1.6),
(25, 'Chou pointu', 'On s\'amuse', NULL, 'pièce', NULL, NULL, NULL, 2.2);
INSERT INTO `legume` (`id`, `nom`, `description`, `origine`, `unite`, `quantite_min`, `quantite_max`, `quantite_step`, `prix_unitaire`, `updated_at`, `image`, `created_at`, `is_fruit`, `is_revente`) VALUES
(1, 'Courgettes', 'Jeunes courgettes en vrac', NULL, 'kg', 1, 10, 0.2, 4, '2018-06-05 23:50:00', 'pois.jpg', '0000-00-00 00:00:00', 0, 0),
(2, 'Persil', 'Botte de persil plat', NULL, 'botte', 2, 20, 0.4, 1.4, '2018-06-03 16:34:26', 'radis.jpg', '0000-00-00 00:00:00', 0, 0),
(3, 'Chou pointu', 'hop hip', NULL, 'pièce', NULL, NULL, NULL, 2.4, '2018-06-04 16:39:56', 'cornichon.jpg', '0000-00-00 00:00:00', 0, 0),
(4, 'Jeunes carottes', 'vrac', NULL, 'botte', NULL, NULL, NULL, 1.6, '2018-06-03 13:47:48', 'carottes.jpg', '0000-00-00 00:00:00', 0, 0),
(5, 'Jeunes oignons', '', NULL, 'botte', 1, 10, 1, 1.6, '2018-06-04 16:29:39', 'radis.jpg', '0000-00-00 00:00:00', 1, 0),
(6, 'Aillette', '', NULL, 'botte', NULL, NULL, NULL, 2, '2018-06-03 17:14:24', '', '0000-00-00 00:00:00', 0, 0),
(7, 'Jeunes Navet', 'je suis navré', NULL, 'botte', 2, 3, 4, 1.6, '2018-06-06 01:40:36', '', '0000-00-00 00:00:00', 1, 0),
(8, 'Chou Rave vert', '', NULL, 'pièce', NULL, NULL, NULL, 1.5, '2018-06-03 19:27:27', '', '0000-00-00 00:00:00', 0, 0),
(9, 'Bette Primeur', 'ici c\'est fait', NULL, 'botte', NULL, NULL, NULL, 2.2, '2018-06-03 15:41:22', 'radis.jpg', '0000-00-00 00:00:00', 0, 0),
(10, 'PDT Agria', '', 'Françis Dumortier, Agribio', 'kg', NULL, NULL, NULL, 1.2, '2018-06-03 19:15:30', '', '0000-00-00 00:00:00', 0, 1),
(11, 'PDT Agria', '', 'Françis Dumortier, Agribio', 'kg', NULL, NULL, NULL, 15, '2018-06-03 19:02:22', '', '0000-00-00 00:00:00', 0, 1),
(12, 'PDT ditta', 'Ferme Bio Belge', NULL, 'kg', 0.5, 25, 0.5, 1.2, '2018-06-03 19:16:34', '', '0000-00-00 00:00:00', 0, 0),
(13, 'Carotte', 'Nouvelle', 'Italie', 'kg', NULL, NULL, NULL, 2, '2018-06-05 20:40:57', 'carottes.jpg', '0000-00-00 00:00:00', 0, 1),
(14, 'Oignon Jaune', 'Bio Belge bb', NULL, 'kg', NULL, NULL, NULL, 1.5, '2018-06-05 14:11:07', '', '0000-00-00 00:00:00', 1, 0),
(15, 'Oignon Rouge', 'Bio Belge', NULL, 'kg', NULL, NULL, NULL, 2.5, '2018-06-03 14:48:16', 'tomate_cerise.jpg', '0000-00-00 00:00:00', 0, 0),
(16, 'Échalotes', 'Bio Lorraine', NULL, 'kg', NULL, NULL, NULL, 5, '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 0, 0),
(17, 'Ail sec', 'Bio', 'Espagne', 'kg', NULL, NULL, NULL, 10, '2018-06-03 19:17:02', '', '0000-00-00 00:00:00', 0, 1),
(18, 'Céleri rave', 'Bio Belge', NULL, 'pièce', NULL, NULL, NULL, 2.5, '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 0, 0),
(19, 'Poireaux', 'Bio Belge', NULL, 'kg', NULL, NULL, NULL, 4, '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 0, 0),
(20, 'Orange', 'Valencia Bio Italie', NULL, 'kg', NULL, NULL, NULL, 2.2, '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 0, 0),
(21, 'Citron', 'Citrons Bio de Sicile', 'Italie', 'kg', NULL, NULL, NULL, 3, '2018-06-04 22:25:04', 'cornichon.jpg', '0000-00-00 00:00:00', 1, 1),
(22, 'Tomates', 'Jeunes tomates en vrac. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', 'Italie', 'kg', 0.25, 10, 0.25, 4, '2018-06-03 19:18:38', 'tomate.jpg', '0000-00-00 00:00:00', 0, 1),
(23, 'Persil', 'Botte de persil plat', NULL, 'botte', NULL, NULL, NULL, 1.4, '2018-06-03 16:46:22', 'pois.jpg', '0000-00-00 00:00:00', 0, 0),
(24, 'Fenouil', '', NULL, 'botte', NULL, NULL, NULL, 1.6, '2018-06-04 23:09:44', 'fenouil.jpg', '0000-00-00 00:00:00', 0, 0),
(25, 'Chou pointu', 'On s\'amuse', NULL, 'pièce', NULL, NULL, NULL, 2.2, '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 0, 0),
(26, 'Potimarron', 'haha le voila', NULL, 'pièce', 1, 10, 1, 2.2, '2018-06-03 17:39:08', 'oignon.jpg', '2018-06-03 17:39:08', 0, 0),
(27, 'Pommes de saison', 'alala', NULL, 'kg', 1, 12, 0.5, 3.7, '2018-06-04 22:24:22', 'tomate_cerise.jpg', '2018-06-04 11:43:23', 0, 0),
(28, 'Courgettes', 'Jeunes courgettes en vrac', NULL, 'kg', 2, 20, 0.25, 4.2, '2018-06-04 14:30:43', 'pois.jpg', '2018-06-04 14:29:39', 0, 0),
(29, 'Courgettes', 'Jeunes courgettes en vrac', NULL, 'kg', 1, 10, 0.2, 4, '2018-06-04 23:10:49', 'fenouil2.jpg', '2018-06-04 14:46:08', 0, 0),
(30, 'Échalotes', 'Bio Lorraine', NULL, 'kg', NULL, NULL, NULL, 5, '0000-00-00 00:00:00', '', '2018-06-05 21:45:44', 0, 0);
-- --------------------------------------------------------
--
-- Structure de la table `offre`
--
CREATE TABLE `offre` (
`id` int(11) NOT NULL,
`reference` varchar(16) COLLATE utf8_unicode_ci NOT NULL,
`createdAt` datetime NOT NULL,
`updatedAt` datetime NOT NULL,
`endedAt` datetime NOT NULL,
`status` enum('draft','current','closed','trash') COLLATE utf8_unicode_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- Déchargement des données de la table `offre`
--
INSERT INTO `offre` (`id`, `reference`, `createdAt`, `updatedAt`, `endedAt`, `status`) VALUES
(1, 'OF18060601', '2018-06-05 23:50:00', '2018-06-05 23:50:00', '2018-06-05 23:50:00', 'closed'),
(2, 'OF18060602', '2018-06-05 23:50:00', '2018-06-05 23:50:00', '2018-06-05 23:50:00', 'current'),
(3, 'OF18060503', '2018-06-05 23:50:00', '2018-06-05 23:50:00', '2018-06-05 23:50:00', 'draft'),
(4, 'OF18060703', '2018-06-07 12:07:19', '0000-00-00 00:00:00', '2013-01-01 00:00:00', 'draft'),
(5, 'OF18060704', '2018-06-07 12:32:36', '0000-00-00 00:00:00', '2018-06-20 12:00:00', 'draft'),
(6, 'OF18060705', '2018-06-07 13:23:21', '0000-00-00 00:00:00', '2018-08-04 00:00:00', 'draft');
-- --------------------------------------------------------
--
-- Structure de la table `offre_legumes`
--
CREATE TABLE `offre_legumes` (
`id` int(11) NOT NULL,
`id_offre` int(11) NOT NULL,
`reference` varchar(16) COLLATE utf8_unicode_ci NOT NULL,
`createdAt` datetime NOT NULL,
`updatedAt` datetime NOT NULL,
`nom` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
`description` longtext COLLATE utf8_unicode_ci NOT NULL,
`is_fruit` tinyint(1) NOT NULL,
`is_revente` tinyint(1) NOT NULL,
`origine` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
`prix_unitaire` double NOT NULL,
`unite` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
`quantite_min` double DEFAULT NULL,
`quantite_max` double DEFAULT NULL,
`quantite_step` double DEFAULT NULL,
`image` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`volume_max` double DEFAULT NULL,
`is_promo` tinyint(1) NOT NULL,
`promo` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- Index pour les tables déchargées
......@@ -120,6 +185,21 @@ ALTER TABLE `fos_user`
ALTER TABLE `legume`
ADD PRIMARY KEY (`id`);
--
-- Index pour la table `offre`
--
ALTER TABLE `offre`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `UNIQ_AF86866FAEA34913` (`reference`);
--
-- Index pour la table `offre_legumes`
--
ALTER TABLE `offre_legumes`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `UNIQ_C3E208C2AEA34913` (`reference`),
ADD KEY `IDX_C3E208C24103C75F` (`id_offre`);
--
-- AUTO_INCREMENT pour les tables déchargées
--
......@@ -134,7 +214,29 @@ ALTER TABLE `fos_user`
-- AUTO_INCREMENT pour la table `legume`
--
ALTER TABLE `legume`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=26;
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=31;
--
-- AUTO_INCREMENT pour la table `offre`
--
ALTER TABLE `offre`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
--
-- AUTO_INCREMENT pour la table `offre_legumes`
--
ALTER TABLE `offre_legumes`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- Contraintes pour les tables déchargées
--
--
-- Contraintes pour la table `offre_legumes`
--
ALTER TABLE `offre_legumes`
ADD CONSTRAINT `FK_C3E208C24103C75F` FOREIGN KEY (`id_offre`) REFERENCES `offre` (`id`);
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment