1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
|
CREATE TABLE IF NOT EXISTS `mk_cdes` (
`cde_id` int(11) NOT NULL,
`nom` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'cdeEnCours',
`date` date NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-- --------------------------------------------------------
--
-- Structure de la table `mk_cde_lignes`
--
CREATE TABLE IF NOT EXISTS `mk_cde_lignes` (
`cdeLigne_id` int(11) NOT NULL,
`cde_id` int(11) NOT NULL,
`p_id` int(11) NOT NULL,
`qte` tinyint(4) unsigned zerofill NOT NULL,
`livraison` char(10) COLLATE utf8_unicode_ci DEFAULT NULL
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-- --------------------------------------------------------
--
-- Structure de la table `mk_cde_pcomments`
--
CREATE TABLE IF NOT EXISTS `mk_cde_pcomments` (
`pcc_id` int(11) NOT NULL,
`cde_id` int(11) NOT NULL,
`p_id` int(11) NOT NULL,
`cde_p_details` text COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-- --------------------------------------------------------
--
-- Structure de la table `mk_piece_article`
--
CREATE TABLE IF NOT EXISTS `mk_piece_article` (
`p_id` int(11) unsigned zerofill NOT NULL,
`p_reference` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
`p_designation` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`p_machine` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`p_commentaire` text COLLATE utf8_unicode_ci,
`p_famille` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
`p_nb_actuel` smallint(11) DEFAULT NULL,
`p_nb_used` smallint(11) DEFAULT NULL,
`p_nb_mini` smallint(11) DEFAULT NULL,
`p_nb_maxi` smallint(11) DEFAULT NULL,
`p_emplacement` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
`p_photo` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`prix` smallint(8) DEFAULT NULL
) ENGINE=InnoDB AUTO_INCREMENT=314 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
ALTER TABLE `mk_cdes`
ADD PRIMARY KEY (`cde_id`), ADD UNIQUE KEY `nom` (`nom`);
--
-- Index pour la table `mk_cde_lignes`
--
ALTER TABLE `mk_cde_lignes`
ADD PRIMARY KEY (`cdeLigne_id`);
--
-- Index pour la table `mk_cde_pcomments`
--
ALTER TABLE `mk_cde_pcomments`
ADD PRIMARY KEY (`pcc_id`);
--
-- Index pour la table `mk_piece_article`
--
ALTER TABLE `mk_piece_article`
ADD PRIMARY KEY (`p_id`), ADD UNIQUE KEY `p_reference` (`p_reference`); |
Partager