From 499fbf49e8409c4ccea1cc35f7a744d28df74597 Mon Sep 17 00:00:00 2001
From: mattgoss <matthieu.gosset@yahoo.fr>
Date: Thu, 19 Dec 2019 00:32:10 +0100
Subject: [PATCH] cle primaire table favoris

---
 config/pima.sql | 54 ++++++++++++++++++++++++-------------------------
 1 file changed, 26 insertions(+), 28 deletions(-)

diff --git a/config/pima.sql b/config/pima.sql
index 8d5a428..e9a6898 100644
--- a/config/pima.sql
+++ b/config/pima.sql
@@ -1,23 +1,15 @@
 -- phpMyAdmin SQL Dump
--- version 4.8.5
+-- version 4.9.0.1
 -- https://www.phpmyadmin.net/
 --
--- Hôte : 127.0.0.1:3306
--- Généré le :  mer. 18 déc. 2019 à 23:23
+-- Hôte : localhost:8889
+-- Généré le :  mer. 18 déc. 2019 à 23:31
 -- Version du serveur :  5.7.26
--- Version de PHP :  7.2.18
+-- Version de PHP :  7.3.8
 
 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
-SET AUTOCOMMIT = 0;
-START TRANSACTION;
 SET time_zone = "+00:00";
 
-
-/*!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 utf8mb4 */;
-
 --
 -- Base de données :  `pima`
 --
@@ -28,8 +20,7 @@ SET time_zone = "+00:00";
 -- Structure de la table `categorie`
 --
 
-DROP TABLE IF EXISTS `categorie`;
-CREATE TABLE IF NOT EXISTS `categorie` (
+CREATE TABLE `categorie` (
   `id_categorie` int(2) NOT NULL,
   `nom_categorie` varchar(30) NOT NULL
 ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
@@ -52,8 +43,7 @@ INSERT INTO `categorie` (`id_categorie`, `nom_categorie`) VALUES
 -- Structure de la table `favoris`
 --
 
-DROP TABLE IF EXISTS `favoris`;
-CREATE TABLE IF NOT EXISTS `favoris` (
+CREATE TABLE `favoris` (
   `id_artiste` int(11) NOT NULL,
   `id_user` int(11) NOT NULL
 ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
@@ -66,8 +56,8 @@ INSERT INTO `favoris` (`id_artiste`, `id_user`) VALUES
 (3, 2),
 (4, 2),
 (6, 2),
-(21, 2),
-(17, 2);
+(17, 2),
+(21, 2);
 
 -- --------------------------------------------------------
 
@@ -75,8 +65,7 @@ INSERT INTO `favoris` (`id_artiste`, `id_user`) VALUES
 -- Structure de la table `influenceurs`
 --
 
-DROP TABLE IF EXISTS `influenceurs`;
-CREATE TABLE IF NOT EXISTS `influenceurs` (
+CREATE TABLE `influenceurs` (
   `id_artiste` int(11) NOT NULL,
   `nom_artiste` varchar(30) NOT NULL,
   `sexe` varchar(1) NOT NULL,
@@ -84,8 +73,7 @@ CREATE TABLE IF NOT EXISTS `influenceurs` (
   `tag_instagram` varchar(30) NOT NULL,
   `nb_youtube` int(11) NOT NULL,
   `nb_instagram` int(11) NOT NULL,
-  `id_categorie` int(11) NOT NULL,
-  PRIMARY KEY (`id_artiste`)
+  `id_categorie` int(11) NOT NULL
 ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
 
 --
@@ -129,8 +117,7 @@ INSERT INTO `influenceurs` (`id_artiste`, `nom_artiste`, `sexe`, `tag_youtube`,
 -- Structure de la table `users`
 --
 
-DROP TABLE IF EXISTS `users`;
-CREATE TABLE IF NOT EXISTS `users` (
+CREATE TABLE `users` (
   `id_user` int(11) NOT NULL,
   `nom` varchar(30) NOT NULL,
   `prenom` varchar(30) NOT NULL,
@@ -148,8 +135,19 @@ INSERT INTO `users` (`id_user`, `nom`, `prenom`, `mail`, `mdp`, `bday`) VALUES
 (2, 'GOSSET', 'Matthieu', 'matthieu.gosset2@yahoo.fr', 'matthieu', '1998-04-25'),
 (3, 'sellambin', 'hugo', 'hugo91@gmail.com', 'hugohugoo', '2004-12-04'),
 (4, 'Caille', 'Louis', 'louis.caille@hotmail.fr', 'helloworld', '1998-08-13');
-COMMIT;
 
-/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
-/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
-/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
+--
+-- Index pour les tables déchargées
+--
+
+--
+-- Index pour la table `favoris`
+--
+ALTER TABLE `favoris`
+  ADD PRIMARY KEY (`id_artiste`,`id_user`);
+
+--
+-- Index pour la table `influenceurs`
+--
+ALTER TABLE `influenceurs`
+  ADD PRIMARY KEY (`id_artiste`);
-- 
GitLab