CREATE DATABASE  IF NOT EXISTS `praticboutic-default-schema` /*!40100 DEFAULT CHARACTER SET latin1 */ /*!80016 DEFAULT ENCRYPTION='N' */;
USE `praticboutic-default-schema`;
--
-- Host: localhost    Database: merge_test_fusion3
-- ------------------------------------------------------


--
-- Table structure for table `abonnement`
--

CREATE TABLE `abonnement` (
  `aboid` int unsigned NOT NULL AUTO_INCREMENT,
  `cltid` int unsigned NOT NULL,
  `creationboutic` bit(1) NOT NULL,
  `bouticid` int unsigned NOT NULL,
  `stripe_subscription_id` varchar(255) NOT NULL,
  `actif` int unsigned NOT NULL,
  `metered` int unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`aboid`),
  KEY `FK5pnyx5xihfrsbasys9s7gq214` (`cltid`),
  CONSTRAINT `FK5pnyx5xihfrsbasys9s7gq214` FOREIGN KEY (`cltid`) REFERENCES `client` (`cltid`)
) ENGINE=InnoDB AUTO_INCREMENT=379 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `abonnement`
--

INSERT INTO `abonnement` VALUES (378,0,_binary '\0',0,'',0,0);

--
-- Table structure for table `article`
--

CREATE TABLE `article` (
  `artid` int unsigned NOT NULL AUTO_INCREMENT,
  `customid` int unsigned NOT NULL,
  `nom` varchar(150) NOT NULL,
  `prix` double NOT NULL DEFAULT '0',
  `description` varchar(350) DEFAULT NULL,
  `visible` int unsigned NOT NULL DEFAULT '1',
  `catid` int unsigned NOT NULL DEFAULT '0',
  `unite` varchar(150) NOT NULL,
  `image` varchar(255) DEFAULT NULL,
  `imgvisible` int unsigned NOT NULL DEFAULT '0',
  `obligatoire` int unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`artid`),
  UNIQUE KEY `customid_nom_catid_UNIQUE` (`customid`,`nom`,`catid`) USING BTREE,
  KEY `FK2nol60s845a4svi0u3qpdqtw5` (`catid`),
  CONSTRAINT `FK2nol60s845a4svi0u3qpdqtw5` FOREIGN KEY (`catid`) REFERENCES `categorie` (`catid`)
) ENGINE=InnoDB AUTO_INCREMENT=113 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `article`
--

INSERT INTO `article` VALUES (0,0,'',0,'',0,0,'','',0,0);

--
-- Table structure for table `artlistimg`
--

CREATE TABLE `artlistimg` (
  `artlistimgid` int unsigned NOT NULL AUTO_INCREMENT,
  `customid` int unsigned NOT NULL DEFAULT '0',
  `artid` int unsigned NOT NULL DEFAULT '0',
  `image` varchar(255) NOT NULL,
  `favori` int NOT NULL DEFAULT '0',
  `visible` int NOT NULL DEFAULT '1',
  PRIMARY KEY (`artlistimgid`)
) ENGINE=InnoDB AUTO_INCREMENT=170 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `artlistimg`
--

INSERT INTO `artlistimg` VALUES (0,0,0,'',0,0);

--
-- Table structure for table `barlivr`
--

CREATE TABLE `barlivr` (
  `barlivrid` int unsigned NOT NULL AUTO_INCREMENT,
  `customid` int unsigned NOT NULL,
  `valminin` float NOT NULL,
  `valmaxex` float NOT NULL,
  `surcout` float NOT NULL DEFAULT '0',
  `limitebasse` int unsigned NOT NULL DEFAULT '1',
  `limitehaute` int unsigned NOT NULL DEFAULT '1',
  `actif` int unsigned NOT NULL DEFAULT '1',
  PRIMARY KEY (`barlivrid`)
) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `barlivr`
--

INSERT INTO `barlivr` VALUES (0,0,0,0,0,0,0,0);

--
-- Table structure for table `categorie`
--

CREATE TABLE `categorie` (
  `catid` int unsigned NOT NULL AUTO_INCREMENT,
  `customid` int unsigned NOT NULL,
  `nom` varchar(150) NOT NULL,
  `visible` int NOT NULL DEFAULT '1',
  PRIMARY KEY (`catid`),
  UNIQUE KEY `customid_nom_UNIQUE` (`customid`,`nom`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=108 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `categorie`
--

INSERT INTO `categorie` VALUES (0,0,'Pas de catégorie',0);

--
-- Table structure for table `commande`
--

CREATE TABLE `commande` (
  `cmdid` int unsigned NOT NULL AUTO_INCREMENT,
  `customid` int unsigned NOT NULL,
  `numref` varchar(60) NOT NULL,
  `nom` varchar(60) NOT NULL,
  `prenom` varchar(60) NOT NULL,
  `telephone` varchar(60) NOT NULL,
  `adresse1` varchar(150) NOT NULL,
  `adresse2` varchar(150) NOT NULL,
  `codepostal` varchar(5) NOT NULL,
  `ville` varchar(50) NOT NULL,
  `vente` varchar(45) NOT NULL,
  `paiement` varchar(45) NOT NULL,
  `sstotal` double NOT NULL DEFAULT '0',
  `remise` double NOT NULL DEFAULT '0',
  `fraislivraison` double NOT NULL DEFAULT '0',
  `total` double NOT NULL DEFAULT '0',
  `commentaire` varchar(300) NOT NULL,
  `method` varchar(45) NOT NULL,
  `table` int NOT NULL DEFAULT '0',
  `datecreation` datetime NOT NULL DEFAULT '1900-01-01 00:00:00',
  `statid` int unsigned NOT NULL,
  PRIMARY KEY (`cmdid`),
  UNIQUE KEY `numref_UNIQUE` (`customid`,`numref`),
  KEY `FKo1thqc51x9e0dh1om2dhgvxe` (`statid`),
  CONSTRAINT `FKo1thqc51x9e0dh1om2dhgvxe` FOREIGN KEY (`statid`) REFERENCES `statutcmd` (`statid`)
) ENGINE=InnoDB AUTO_INCREMENT=335 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `commande`
--

INSERT INTO `commande` VALUES (0,0,'','','','','','','','','','',0,0,0,0,'','',0,'1900-01-01 00:00:00',0);

--
-- Table structure for table `commandedetail`
--

CREATE TABLE `commandedetail` (
  `cmddetid` int NOT NULL AUTO_INCREMENT,
  `artid` int NOT NULL,
  `customid` int NOT NULL,
  `options` varchar(300) DEFAULT NULL,
  `prix_unitaire` double NOT NULL,
  `quantite` int NOT NULL,
  `total` double NOT NULL,
  `cmdid` int NOT NULL,
  PRIMARY KEY (`cmddetid`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `commandedetail`
--

INSERT INTO `commandedetail` VALUES (0,0,0,'',0,0,0,0);

--
-- Table structure for table `connexion`
--

CREATE TABLE `connexion` (
  `connexid` bigint NOT NULL AUTO_INCREMENT,
  `ip` varchar(255) NOT NULL,
  `ts` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`connexid`)
) ENGINE=InnoDB AUTO_INCREMENT=543 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `connexion`
--


--
-- Table structure for table `cpzone`
--

CREATE TABLE `cpzone` (
  `cpzoneid` int unsigned NOT NULL AUTO_INCREMENT,
  `customid` int unsigned NOT NULL,
  `codepostal` varchar(5) NOT NULL,
  `ville` varchar(45) NOT NULL,
  `actif` int unsigned NOT NULL DEFAULT '1',
  PRIMARY KEY (`cpzoneid`)
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `cpzone`
--

INSERT INTO `cpzone` VALUES (0,0,'','',0);

--
-- Table structure for table `customer`
--

CREATE TABLE `customer` (
  `customid` int unsigned NOT NULL AUTO_INCREMENT,
  `cltid` int unsigned NOT NULL,
  `customer` varchar(100) NOT NULL,
  `nom` varchar(100) NOT NULL,
  `adresse1` varchar(150) DEFAULT NULL,
  `adresse2` varchar(150) DEFAULT NULL,
  `codepostal` varchar(5) DEFAULT NULL,
  `ville` varchar(50) DEFAULT NULL,
  `logo` varchar(100) NOT NULL,
  `courriel` varchar(255) NOT NULL,
  `actif` int unsigned NOT NULL DEFAULT '1',
  PRIMARY KEY (`customid`),
  UNIQUE KEY `customer_UNIQUE` (`customer`),
  KEY `FKlxr319iiwcp042k94s7s7d0t6` (`cltid`),
  CONSTRAINT `FKlxr319iiwcp042k94s7s7d0t6` FOREIGN KEY (`cltid`) REFERENCES `client` (`cltid`)
) ENGINE=InnoDB AUTO_INCREMENT=110 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `customer`
--

INSERT INTO `customer` VALUES (0,0,'','','','','','','','',0);

--
-- Table structure for table `groupeopt`
--

CREATE TABLE `groupeopt` (
  `grpoptid` int unsigned NOT NULL AUTO_INCREMENT,
  `customid` int unsigned NOT NULL,
  `nom` varchar(150) NOT NULL,
  `visible` int unsigned NOT NULL DEFAULT '1',
  `multiple` int unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`grpoptid`)
) ENGINE=InnoDB AUTO_INCREMENT=38 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `groupeopt`
--

INSERT INTO `groupeopt` VALUES (0,0,'',0,0);

--
-- Table structure for table `lignecmd`
--

CREATE TABLE `lignecmd` (
  `lignecmdid` int unsigned NOT NULL AUTO_INCREMENT,
  `customid` int unsigned NOT NULL,
  `cmdid` int unsigned NOT NULL,
  `ordre` int unsigned NOT NULL,
  `type` varchar(45) NOT NULL,
  `nom` varchar(150) NOT NULL,
  `prix` float unsigned NOT NULL,
  `quantite` float unsigned NOT NULL,
  `commentaire` varchar(300) NOT NULL,
  `artid` int unsigned NOT NULL,
  `optid` int unsigned NOT NULL,
  PRIMARY KEY (`lignecmdid`),
  UNIQUE KEY `numref_UNIQUE` (`customid`,`cmdid`,`ordre`),
  KEY `FKo6pyudb5gn4fifm81eivrw396` (`artid`),
  CONSTRAINT `FKo6pyudb5gn4fifm81eivrw396` FOREIGN KEY (`artid`) REFERENCES `article` (`artid`)
) ENGINE=InnoDB AUTO_INCREMENT=571 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `lignecmd`
--

INSERT INTO `lignecmd` VALUES (0,0,0,0,'','',0,0,'',0,0);

--
-- Table structure for table `option`
--

CREATE TABLE `option` (
  `optid` int unsigned NOT NULL AUTO_INCREMENT,
  `customid` int unsigned NOT NULL,
  `nom` varchar(150) NOT NULL,
  `surcout` double NOT NULL DEFAULT '0',
  `grpoptid` int unsigned NOT NULL DEFAULT '0',
  `visible` int unsigned NOT NULL,
  PRIMARY KEY (`optid`),
  KEY `FKcsswwhbd8kvm2a0bxho4stgk9` (`grpoptid`),
  CONSTRAINT `FKcsswwhbd8kvm2a0bxho4stgk9` FOREIGN KEY (`grpoptid`) REFERENCES `groupeopt` (`grpoptid`)
) ENGINE=InnoDB AUTO_INCREMENT=78 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `option`
--

INSERT INTO `option` VALUES (0,0,'',0,0,0);

--
-- Table structure for table `parametre`
--

CREATE TABLE `parametre` (
  `paramid` int unsigned NOT NULL AUTO_INCREMENT,
  `customid` int unsigned NOT NULL,
  `nom` varchar(255) DEFAULT NULL,
  `valeur` varchar(255) DEFAULT NULL,
  `commentaire` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`paramid`),
  UNIQUE KEY `nom_UNIQUE` (`nom`,`customid`)
) ENGINE=InnoDB AUTO_INCREMENT=1658 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `parametre`
--

INSERT INTO `parametre` VALUES (0,0,'','','');

--
-- Table structure for table `promotion`
--

CREATE TABLE `promotion` (
  `promoid` int unsigned NOT NULL AUTO_INCREMENT,
  `customid` int unsigned NOT NULL DEFAULT '0',
  `code` varchar(255) NOT NULL,
  `taux` double NOT NULL,
  `actif` tinyint unsigned NOT NULL DEFAULT '1',
  PRIMARY KEY (`promoid`),
  UNIQUE KEY `code_UNIQUE` (`code`,`customid`)
) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `promotion`
--

INSERT INTO `promotion` VALUES (0,0,'',0,0);

--
-- Table structure for table `relgrpoptart`
--

CREATE TABLE `relgrpoptart` (
  `relgrpoartid` int unsigned NOT NULL AUTO_INCREMENT,
  `customid` int unsigned NOT NULL,
  `grpoptid` int unsigned NOT NULL DEFAULT '0',
  `artid` int unsigned NOT NULL DEFAULT '0',
  `visible` int unsigned NOT NULL DEFAULT '1',
  PRIMARY KEY (`relgrpoartid`),
  KEY `FK3yngjy5t6chvrl4j4nhld2rst` (`artid`),
  KEY `FK5rbmny6kcbytktid9drp59taq` (`grpoptid`),
  CONSTRAINT `FK3yngjy5t6chvrl4j4nhld2rst` FOREIGN KEY (`artid`) REFERENCES `article` (`artid`),
  CONSTRAINT `FK5rbmny6kcbytktid9drp59taq` FOREIGN KEY (`grpoptid`) REFERENCES `groupeopt` (`grpoptid`)
) ENGINE=InnoDB AUTO_INCREMENT=47 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `relgrpoptart`
--

INSERT INTO `relgrpoptart` VALUES (0,0,0,0,0);

--
-- Table structure for table `statutcmd`
--

CREATE TABLE `statutcmd` (
  `statid` int unsigned NOT NULL AUTO_INCREMENT,
  `customid` int unsigned NOT NULL,
  `etat` varchar(255) DEFAULT NULL,
  `couleur` varchar(255) DEFAULT NULL,
  `message` varchar(255) DEFAULT NULL,
  `defaut` int DEFAULT NULL,
  `actif` int unsigned DEFAULT NULL,
  PRIMARY KEY (`statid`),
  KEY `idx_statutcmd_customid_etat` (`customid`,`etat`)
) ENGINE=InnoDB AUTO_INCREMENT=551 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `statutcmd`
--

INSERT INTO `statutcmd` VALUES (0,0,'','','',0,0);


