2016-04-10 10:23:26 +00:00
|
|
|
-- phpMyAdmin SQL Dump
|
|
|
|
-- version 4.4.13.1deb1
|
|
|
|
-- http://www.phpmyadmin.net
|
|
|
|
--
|
|
|
|
-- Host: localhost
|
2016-04-19 14:00:17 +00:00
|
|
|
-- Generation Time: Apr 19, 2016 at 03:36 PM
|
2016-04-10 10:23:26 +00:00
|
|
|
-- Server version: 5.6.28-0ubuntu0.15.10.1
|
|
|
|
-- PHP Version: 5.6.11-1ubuntu3.1
|
|
|
|
|
|
|
|
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
|
|
|
|
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 */;
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Database: `socioview`
|
|
|
|
--
|
|
|
|
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
|
2016-04-12 15:46:34 +00:00
|
|
|
--
|
|
|
|
-- Table structure for table `api_token`
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS `api_token` (
|
|
|
|
`id_token` int(11) NOT NULL,
|
|
|
|
`token` varchar(40) NOT NULL,
|
|
|
|
`name` varchar(50) NOT NULL,
|
2016-04-13 13:15:52 +00:00
|
|
|
`expires` date NOT NULL,
|
|
|
|
`permission` text NOT NULL
|
2016-04-19 14:00:17 +00:00
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=61 DEFAULT CHARSET=latin1;
|
2016-04-12 15:46:34 +00:00
|
|
|
|
|
|
|
--
|
|
|
|
-- Dumping data for table `api_token`
|
|
|
|
--
|
|
|
|
|
2016-04-13 13:15:52 +00:00
|
|
|
INSERT INTO `api_token` (`id_token`, `token`, `name`, `expires`, `permission`) VALUES
|
|
|
|
(38, '48e701d4e72e4e35bc37c9a800b49d5400734d7b', 'test', '2016-04-11', 'admin,token'),
|
2016-04-19 14:00:17 +00:00
|
|
|
(51, '52945efbed43b50c12413f2f0e9519bfd9e98ce8', 'API', '2016-04-24', 'token,admin');
|
2016-04-12 15:46:34 +00:00
|
|
|
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
|
2016-04-10 10:23:26 +00:00
|
|
|
--
|
2016-04-19 14:00:17 +00:00
|
|
|
-- Table structure for table `call_directory`
|
2016-04-10 10:23:26 +00:00
|
|
|
--
|
|
|
|
|
2016-04-19 14:00:17 +00:00
|
|
|
CREATE TABLE IF NOT EXISTS `call_directory` (
|
|
|
|
`id_call_directory` int(11) NOT NULL,
|
|
|
|
`id_owner` int(11) NOT NULL,
|
|
|
|
`number` varchar(10) NOT NULL,
|
|
|
|
`name` varchar(30) NOT NULL
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
|
|
|
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Table structure for table `call_logs`
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS `call_logs` (
|
|
|
|
`id_call_log` int(11) NOT NULL,
|
|
|
|
`source` varchar(10) NOT NULL,
|
|
|
|
`target` varchar(10) NOT NULL,
|
|
|
|
`type` varchar(5) NOT NULL,
|
|
|
|
`date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
|
|
|
`duration` int(11) NOT NULL
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
|
|
|
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Table structure for table `categories`
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS `categories` (
|
2016-04-10 10:23:26 +00:00
|
|
|
`idCategorie` int(11) NOT NULL,
|
2016-04-12 15:46:34 +00:00
|
|
|
`intitule` varchar(40) NOT NULL
|
2016-04-10 10:23:26 +00:00
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;
|
|
|
|
|
|
|
|
--
|
2016-04-19 14:00:17 +00:00
|
|
|
-- Dumping data for table `categories`
|
2016-04-10 10:23:26 +00:00
|
|
|
--
|
|
|
|
|
2016-04-19 14:00:17 +00:00
|
|
|
INSERT INTO `categories` (`idCategorie`, `intitule`) VALUES
|
2016-04-10 10:23:26 +00:00
|
|
|
(1, '_CALL'),
|
|
|
|
(2, '_SMS'),
|
|
|
|
(3, '_FACEBOOK'),
|
|
|
|
(4, '_MESSENGER');
|
|
|
|
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
|
|
|
|
--
|
2016-04-19 14:00:17 +00:00
|
|
|
-- Table structure for table `etudes`
|
2016-04-10 10:23:26 +00:00
|
|
|
--
|
|
|
|
|
2016-04-19 14:00:17 +00:00
|
|
|
CREATE TABLE IF NOT EXISTS `etudes` (
|
2016-04-10 10:23:26 +00:00
|
|
|
`idEtude` int(11) NOT NULL,
|
|
|
|
`intitule` int(11) DEFAULT NULL
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
|
|
|
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
|
|
|
|
--
|
2016-04-19 14:00:17 +00:00
|
|
|
-- Table structure for table `etude_personnes`
|
2016-04-10 10:23:26 +00:00
|
|
|
--
|
|
|
|
|
2016-04-19 14:00:17 +00:00
|
|
|
CREATE TABLE IF NOT EXISTS `etude_personnes` (
|
2016-04-10 10:23:26 +00:00
|
|
|
`idEtude` int(11) NOT NULL DEFAULT '0',
|
|
|
|
`idPersonne` int(11) NOT NULL DEFAULT '0'
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
|
|
|
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
|
|
|
|
--
|
2016-04-19 14:00:17 +00:00
|
|
|
-- Table structure for table `questions`
|
2016-04-10 10:23:26 +00:00
|
|
|
--
|
|
|
|
|
2016-04-19 14:00:17 +00:00
|
|
|
CREATE TABLE IF NOT EXISTS `questions` (
|
2016-04-10 10:23:26 +00:00
|
|
|
`idQuestion` int(11) NOT NULL,
|
|
|
|
`intitule` text NOT NULL,
|
|
|
|
`qualification` varchar(255) NOT NULL,
|
|
|
|
`ihmType` int(11) NOT NULL,
|
|
|
|
`idEtude` int(11) NOT NULL
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
|
|
|
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
|
|
|
|
--
|
2016-04-19 14:00:17 +00:00
|
|
|
-- Table structure for table `relations`
|
2016-04-10 10:23:26 +00:00
|
|
|
--
|
|
|
|
|
2016-04-19 14:00:17 +00:00
|
|
|
CREATE TABLE IF NOT EXISTS `relations` (
|
2016-04-10 10:23:26 +00:00
|
|
|
`idPersonneA` int(11) NOT NULL,
|
|
|
|
`idPersonneB` int(11) NOT NULL,
|
|
|
|
`idCategorie` int(11) DEFAULT NULL
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
|
|
|
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
|
|
|
|
--
|
2016-04-19 14:00:17 +00:00
|
|
|
-- Table structure for table `reponsesAttendues`
|
2016-04-10 10:23:26 +00:00
|
|
|
--
|
|
|
|
|
2016-04-19 14:00:17 +00:00
|
|
|
CREATE TABLE IF NOT EXISTS `reponsesAttendues` (
|
2016-04-10 10:23:26 +00:00
|
|
|
`idReponseAttendue` int(11) NOT NULL,
|
|
|
|
`intitule` varchar(255) NOT NULL,
|
|
|
|
`idQuestion` int(11) NOT NULL
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
|
|
|
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
|
|
|
|
--
|
2016-04-19 14:00:17 +00:00
|
|
|
-- Table structure for table `reponsesUtilisateurs`
|
2016-04-10 10:23:26 +00:00
|
|
|
--
|
|
|
|
|
2016-04-19 14:00:17 +00:00
|
|
|
CREATE TABLE IF NOT EXISTS `reponsesUtilisateurs` (
|
2016-04-10 10:23:26 +00:00
|
|
|
`idReponseUtilisateur` int(11) NOT NULL,
|
|
|
|
`intitule` varchar(255) NOT NULL,
|
|
|
|
`idQuestion` int(11) NOT NULL,
|
|
|
|
`idUtilisateur` int(11) NOT NULL
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
|
|
|
|
2016-04-12 15:46:34 +00:00
|
|
|
-- --------------------------------------------------------
|
|
|
|
|
2016-04-19 14:00:17 +00:00
|
|
|
--
|
|
|
|
-- Table structure for table `sujets`
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS `sujets` (
|
|
|
|
`idSujet` int(11) NOT NULL,
|
|
|
|
`pseudo` varchar(255) DEFAULT NULL,
|
|
|
|
`nom` varchar(255) DEFAULT NULL,
|
|
|
|
`prenom` varchar(255) DEFAULT NULL,
|
|
|
|
`id_facebook` int(11) DEFAULT NULL,
|
|
|
|
`telephone` varchar(10) DEFAULT NULL
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Dumping data for table `sujets`
|
|
|
|
--
|
|
|
|
|
|
|
|
INSERT INTO `sujets` (`idSujet`, `pseudo`, `nom`, `prenom`, `id_facebook`, `telephone`) VALUES
|
|
|
|
(1, 'Jeannot', '', 'Jean', NULL, NULL);
|
|
|
|
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
|
2016-04-12 15:46:34 +00:00
|
|
|
--
|
|
|
|
-- Table structure for table `users`
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS `users` (
|
|
|
|
`id_user` int(11) NOT NULL,
|
|
|
|
`login` varchar(30) NOT NULL,
|
|
|
|
`password` varchar(40) NOT NULL,
|
2016-04-19 14:00:17 +00:00
|
|
|
`mail` varchar(50) NOT NULL,
|
2016-04-12 15:46:34 +00:00
|
|
|
`reference` int(11) DEFAULT NULL,
|
|
|
|
`permission` text NOT NULL
|
2016-04-19 14:00:17 +00:00
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=latin1;
|
2016-04-12 15:46:34 +00:00
|
|
|
|
|
|
|
--
|
|
|
|
-- Dumping data for table `users`
|
|
|
|
--
|
|
|
|
|
|
|
|
INSERT INTO `users` (`id_user`, `login`, `password`, `mail`, `reference`, `permission`) VALUES
|
2016-04-19 14:00:17 +00:00
|
|
|
(1, 'xdrm', 'fa80b2513864bbc9edd3ef52a9b6f29af3993768', 'xdrm@xdrm.io', NULL, 'admin'),
|
|
|
|
(11, 'julien.figeac', 'b5f2c48f299dabcf32e044ea6f2243abce812c55', 'julien.figeac@gmail.com', NULL, 'admin'),
|
|
|
|
(12, 'Buser', 'fa80b2513864bbc9edd3ef52a9b6f29af3993768', 'B@gmail.com', NULL, 'subject');
|
2016-04-12 15:46:34 +00:00
|
|
|
|
2016-04-10 10:23:26 +00:00
|
|
|
--
|
|
|
|
-- Indexes for dumped tables
|
|
|
|
--
|
|
|
|
|
2016-04-12 15:46:34 +00:00
|
|
|
--
|
|
|
|
-- Indexes for table `api_token`
|
|
|
|
--
|
|
|
|
ALTER TABLE `api_token`
|
|
|
|
ADD PRIMARY KEY (`id_token`);
|
|
|
|
|
2016-04-10 10:23:26 +00:00
|
|
|
--
|
2016-04-19 14:00:17 +00:00
|
|
|
-- Indexes for table `call_logs`
|
2016-04-10 10:23:26 +00:00
|
|
|
--
|
2016-04-19 14:00:17 +00:00
|
|
|
ALTER TABLE `call_logs`
|
|
|
|
ADD PRIMARY KEY (`id_call_log`);
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Indexes for table `categories`
|
|
|
|
--
|
|
|
|
ALTER TABLE `categories`
|
2016-04-10 10:23:26 +00:00
|
|
|
ADD PRIMARY KEY (`idCategorie`),
|
|
|
|
ADD UNIQUE KEY `uindex_Catégories_idCatégorie` (`idCategorie`);
|
|
|
|
|
|
|
|
--
|
2016-04-19 14:00:17 +00:00
|
|
|
-- Indexes for table `etudes`
|
2016-04-10 10:23:26 +00:00
|
|
|
--
|
2016-04-19 14:00:17 +00:00
|
|
|
ALTER TABLE `etudes`
|
2016-04-10 10:23:26 +00:00
|
|
|
ADD PRIMARY KEY (`idEtude`),
|
|
|
|
ADD UNIQUE KEY `uindex_Etudes_idEtude` (`idEtude`);
|
|
|
|
|
|
|
|
--
|
2016-04-19 14:00:17 +00:00
|
|
|
-- Indexes for table `etude_personnes`
|
2016-04-10 10:23:26 +00:00
|
|
|
--
|
2016-04-19 14:00:17 +00:00
|
|
|
ALTER TABLE `etude_personnes`
|
2016-04-10 10:23:26 +00:00
|
|
|
ADD PRIMARY KEY (`idEtude`,`idPersonne`),
|
|
|
|
ADD KEY `index_EP_idPersonne` (`idPersonne`);
|
|
|
|
|
|
|
|
--
|
2016-04-19 14:00:17 +00:00
|
|
|
-- Indexes for table `questions`
|
2016-04-10 10:23:26 +00:00
|
|
|
--
|
2016-04-19 14:00:17 +00:00
|
|
|
ALTER TABLE `questions`
|
2016-04-10 10:23:26 +00:00
|
|
|
ADD PRIMARY KEY (`idQuestion`),
|
|
|
|
ADD UNIQUE KEY `uindex_Questions_idQuestion` (`idQuestion`),
|
|
|
|
ADD KEY `index_Question_idEtude` (`idEtude`);
|
|
|
|
|
|
|
|
--
|
2016-04-19 14:00:17 +00:00
|
|
|
-- Indexes for table `relations`
|
2016-04-10 10:23:26 +00:00
|
|
|
--
|
2016-04-19 14:00:17 +00:00
|
|
|
ALTER TABLE `relations`
|
2016-04-10 10:23:26 +00:00
|
|
|
ADD PRIMARY KEY (`idPersonneA`,`idPersonneB`),
|
|
|
|
ADD KEY `index_Relations_idCategorie` (`idCategorie`),
|
|
|
|
ADD KEY `index_Relations_idUtilsateurB` (`idPersonneB`);
|
|
|
|
|
|
|
|
--
|
2016-04-19 14:00:17 +00:00
|
|
|
-- Indexes for table `reponsesAttendues`
|
2016-04-10 10:23:26 +00:00
|
|
|
--
|
2016-04-19 14:00:17 +00:00
|
|
|
ALTER TABLE `reponsesAttendues`
|
2016-04-10 10:23:26 +00:00
|
|
|
ADD PRIMARY KEY (`idReponseAttendue`),
|
|
|
|
ADD UNIQUE KEY `uindex_ReponsesAttendues_idReponseAttendue` (`idReponseAttendue`),
|
|
|
|
ADD KEY `index_ReponsesAttendues_idQuestion` (`idQuestion`);
|
|
|
|
|
|
|
|
--
|
2016-04-19 14:00:17 +00:00
|
|
|
-- Indexes for table `reponsesUtilisateurs`
|
2016-04-10 10:23:26 +00:00
|
|
|
--
|
2016-04-19 14:00:17 +00:00
|
|
|
ALTER TABLE `reponsesUtilisateurs`
|
2016-04-10 10:23:26 +00:00
|
|
|
ADD PRIMARY KEY (`idReponseUtilisateur`),
|
|
|
|
ADD UNIQUE KEY `uindex_ReponsesUtilisateurs_idReponseUtilisateur` (`idReponseUtilisateur`),
|
|
|
|
ADD KEY `index_ReponsesUtilisateurs` (`idQuestion`),
|
|
|
|
ADD KEY `index_ReponsesUtilisateurs_idPersonne` (`idUtilisateur`);
|
|
|
|
|
2016-04-19 14:00:17 +00:00
|
|
|
--
|
|
|
|
-- Indexes for table `sujets`
|
|
|
|
--
|
|
|
|
ALTER TABLE `sujets`
|
|
|
|
ADD PRIMARY KEY (`idSujet`),
|
|
|
|
ADD UNIQUE KEY `uindex_Personnes_idPersonne` (`idSujet`);
|
|
|
|
|
2016-04-12 15:46:34 +00:00
|
|
|
--
|
|
|
|
-- Indexes for table `users`
|
|
|
|
--
|
|
|
|
ALTER TABLE `users`
|
2016-04-19 14:00:17 +00:00
|
|
|
ADD PRIMARY KEY (`id_user`),
|
|
|
|
ADD UNIQUE KEY `login` (`login`),
|
|
|
|
ADD UNIQUE KEY `mail` (`mail`),
|
|
|
|
ADD UNIQUE KEY `reference` (`reference`);
|
2016-04-12 15:46:34 +00:00
|
|
|
|
2016-04-10 10:23:26 +00:00
|
|
|
--
|
|
|
|
-- AUTO_INCREMENT for dumped tables
|
|
|
|
--
|
|
|
|
|
2016-04-12 15:46:34 +00:00
|
|
|
--
|
|
|
|
-- AUTO_INCREMENT for table `api_token`
|
|
|
|
--
|
|
|
|
ALTER TABLE `api_token`
|
2016-04-19 14:00:17 +00:00
|
|
|
MODIFY `id_token` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=61;
|
2016-04-10 10:23:26 +00:00
|
|
|
--
|
2016-04-19 14:00:17 +00:00
|
|
|
-- AUTO_INCREMENT for table `call_logs`
|
2016-04-10 10:23:26 +00:00
|
|
|
--
|
2016-04-19 14:00:17 +00:00
|
|
|
ALTER TABLE `call_logs`
|
|
|
|
MODIFY `id_call_log` int(11) NOT NULL AUTO_INCREMENT;
|
2016-04-10 10:23:26 +00:00
|
|
|
--
|
2016-04-19 14:00:17 +00:00
|
|
|
-- AUTO_INCREMENT for table `categories`
|
2016-04-10 10:23:26 +00:00
|
|
|
--
|
2016-04-19 14:00:17 +00:00
|
|
|
ALTER TABLE `categories`
|
|
|
|
MODIFY `idCategorie` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=5;
|
2016-04-10 10:23:26 +00:00
|
|
|
--
|
2016-04-19 14:00:17 +00:00
|
|
|
-- AUTO_INCREMENT for table `etudes`
|
2016-04-10 10:23:26 +00:00
|
|
|
--
|
2016-04-19 14:00:17 +00:00
|
|
|
ALTER TABLE `etudes`
|
|
|
|
MODIFY `idEtude` int(11) NOT NULL AUTO_INCREMENT;
|
2016-04-10 10:23:26 +00:00
|
|
|
--
|
2016-04-19 14:00:17 +00:00
|
|
|
-- AUTO_INCREMENT for table `questions`
|
2016-04-10 10:23:26 +00:00
|
|
|
--
|
2016-04-19 14:00:17 +00:00
|
|
|
ALTER TABLE `questions`
|
2016-04-10 10:23:26 +00:00
|
|
|
MODIFY `idQuestion` int(11) NOT NULL AUTO_INCREMENT;
|
|
|
|
--
|
2016-04-19 14:00:17 +00:00
|
|
|
-- AUTO_INCREMENT for table `reponsesAttendues`
|
2016-04-10 10:23:26 +00:00
|
|
|
--
|
2016-04-19 14:00:17 +00:00
|
|
|
ALTER TABLE `reponsesAttendues`
|
2016-04-10 10:23:26 +00:00
|
|
|
MODIFY `idReponseAttendue` int(11) NOT NULL AUTO_INCREMENT;
|
|
|
|
--
|
2016-04-19 14:00:17 +00:00
|
|
|
-- AUTO_INCREMENT for table `reponsesUtilisateurs`
|
2016-04-10 10:23:26 +00:00
|
|
|
--
|
2016-04-19 14:00:17 +00:00
|
|
|
ALTER TABLE `reponsesUtilisateurs`
|
2016-04-10 10:23:26 +00:00
|
|
|
MODIFY `idReponseUtilisateur` int(11) NOT NULL AUTO_INCREMENT;
|
|
|
|
--
|
2016-04-19 14:00:17 +00:00
|
|
|
-- AUTO_INCREMENT for table `sujets`
|
|
|
|
--
|
|
|
|
ALTER TABLE `sujets`
|
|
|
|
MODIFY `idSujet` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
|
|
|
|
--
|
2016-04-12 15:46:34 +00:00
|
|
|
-- AUTO_INCREMENT for table `users`
|
|
|
|
--
|
|
|
|
ALTER TABLE `users`
|
2016-04-19 14:00:17 +00:00
|
|
|
MODIFY `id_user` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=17;
|
2016-04-12 15:46:34 +00:00
|
|
|
--
|
2016-04-10 10:23:26 +00:00
|
|
|
-- Constraints for dumped tables
|
|
|
|
--
|
|
|
|
|
|
|
|
--
|
2016-04-19 14:00:17 +00:00
|
|
|
-- Constraints for table `etude_personnes`
|
2016-04-10 10:23:26 +00:00
|
|
|
--
|
2016-04-19 14:00:17 +00:00
|
|
|
ALTER TABLE `etude_personnes`
|
|
|
|
ADD CONSTRAINT `fk_EP_idEtude` FOREIGN KEY (`idEtude`) REFERENCES `etudes` (`idEtude`),
|
|
|
|
ADD CONSTRAINT `fk_EP_idPersonne` FOREIGN KEY (`idPersonne`) REFERENCES `sujets` (`idSujet`);
|
2016-04-10 10:23:26 +00:00
|
|
|
|
|
|
|
--
|
2016-04-19 14:00:17 +00:00
|
|
|
-- Constraints for table `questions`
|
2016-04-10 10:23:26 +00:00
|
|
|
--
|
2016-04-19 14:00:17 +00:00
|
|
|
ALTER TABLE `questions`
|
|
|
|
ADD CONSTRAINT `uindex_Question_idEtude` FOREIGN KEY (`idEtude`) REFERENCES `etudes` (`idEtude`);
|
2016-04-10 10:23:26 +00:00
|
|
|
|
|
|
|
--
|
2016-04-19 14:00:17 +00:00
|
|
|
-- Constraints for table `relations`
|
2016-04-10 10:23:26 +00:00
|
|
|
--
|
2016-04-19 14:00:17 +00:00
|
|
|
ALTER TABLE `relations`
|
|
|
|
ADD CONSTRAINT `fk_Relations_idCategorie` FOREIGN KEY (`idCategorie`) REFERENCES `categories` (`idCategorie`),
|
|
|
|
ADD CONSTRAINT `fk_Relations_idUtilsateurA` FOREIGN KEY (`idPersonneA`) REFERENCES `sujets` (`idSujet`),
|
|
|
|
ADD CONSTRAINT `fk_Relations_idUtilsateurB` FOREIGN KEY (`idPersonneB`) REFERENCES `sujets` (`idSujet`);
|
2016-04-10 10:23:26 +00:00
|
|
|
|
|
|
|
--
|
2016-04-19 14:00:17 +00:00
|
|
|
-- Constraints for table `reponsesAttendues`
|
2016-04-10 10:23:26 +00:00
|
|
|
--
|
2016-04-19 14:00:17 +00:00
|
|
|
ALTER TABLE `reponsesAttendues`
|
|
|
|
ADD CONSTRAINT `fk_ReponsesAttendues_idQuestion` FOREIGN KEY (`idQuestion`) REFERENCES `questions` (`idQuestion`);
|
2016-04-10 10:23:26 +00:00
|
|
|
|
|
|
|
--
|
2016-04-19 14:00:17 +00:00
|
|
|
-- Constraints for table `reponsesUtilisateurs`
|
2016-04-10 10:23:26 +00:00
|
|
|
--
|
2016-04-19 14:00:17 +00:00
|
|
|
ALTER TABLE `reponsesUtilisateurs`
|
|
|
|
ADD CONSTRAINT `fk_ReponsesUtilisateurs` FOREIGN KEY (`idQuestion`) REFERENCES `questions` (`idQuestion`),
|
|
|
|
ADD CONSTRAINT `fk_ReponsesUtilisateurs_idPersonne` FOREIGN KEY (`idUtilisateur`) REFERENCES `sujets` (`idSujet`);
|
2016-04-10 10:23:26 +00:00
|
|
|
|
|
|
|
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
|
|
|
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
2016-04-19 14:00:17 +00:00
|
|
|
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|