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
| SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
--
-- Base de données: `supcommerce`
--
-- --------------------------------------------------------
--
-- Structure de la table `products`
--
CREATE TABLE IF NOT EXISTS `products` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`content` varchar(255) DEFAULT NULL,
`name` varchar(255) DEFAULT NULL,
`price` float DEFAULT NULL,
`category_fk` bigint(20) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `content` (`content`),
UNIQUE KEY `name` (`name`),
UNIQUE KEY `price` (`price`),
KEY `FKF2D1C164487F026B` (`category_fk`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=16 ;
--
-- Contenu de la table `products`
--
INSERT INTO `products` (`id`, `content`, `name`, `price`, `category_fk`) VALUES
(2, 'variable', 'Test', 28, 1),
(4, 'variables', 'Testf', 285, 1),
(5, 'oui', 'Oui', 15, 1),
(15, 'ouiff', 'Ouiff', 1, 1);
--
-- Contraintes pour les tables exportées
--
--
-- Contraintes pour la table `products`
--
ALTER TABLE `products`
ADD CONSTRAINT `FKF2D1C164487F026B` FOREIGN KEY (`category_fk`) REFERENCES `categories` (`id`); |
Partager