composer require ldc/web-status-checker-laravel remove Old static status checker Fix ImportMedia WIP commands OK many fixes Fix and try to optimize folder component Fix front icons + actions based on icons Favico front fix alert Fix Media upload on depot fix folder component buttons Full front fix with perf due tu vuejs Download medias Navigate within medias superfix Move media + loader isLocked boolean and remove media fix Folder scroll fix arcadia link color red Fix panier show external Tons of fixes back as front REwrited all
533 lines
28 KiB
Text
533 lines
28 KiB
Text
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
|
|
/*!40103 SET TIME_ZONE='+00:00' */;
|
|
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
|
|
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
|
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
|
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
|
DROP TABLE IF EXISTS `arcadia_link`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!40101 SET character_set_client = utf8 */;
|
|
CREATE TABLE `arcadia_link` (
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
|
`media_id` bigint(20) NOT NULL DEFAULT 0,
|
|
`arcadia_id` bigint(20) DEFAULT 0,
|
|
`filename` varchar(255) COLLATE utf8mb4_bin NOT NULL DEFAULT '0',
|
|
`created_at` timestamp NULL DEFAULT NULL,
|
|
`updated_at` timestamp NULL DEFAULT NULL,
|
|
PRIMARY KEY (`id`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
DROP TABLE IF EXISTS `articles`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!40101 SET character_set_client = utf8 */;
|
|
CREATE TABLE `articles` (
|
|
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
|
`noArt` bigint(20) unsigned DEFAULT NULL,
|
|
`libCcial` varchar(300) COLLATE utf8mb4_bin DEFAULT '',
|
|
`codMarq` bigint(20) unsigned DEFAULT NULL,
|
|
`libMarq` varchar(300) COLLATE utf8mb4_bin DEFAULT '',
|
|
`codFamVte` bigint(20) unsigned DEFAULT NULL,
|
|
`libFamVte` varchar(300) COLLATE utf8mb4_bin DEFAULT '',
|
|
`codGencodAdm` varchar(50) COLLATE utf8mb4_bin DEFAULT '',
|
|
`codGencodSymb` varchar(50) COLLATE utf8mb4_bin DEFAULT '',
|
|
`codGencodPds` varchar(50) COLLATE utf8mb4_bin DEFAULT '',
|
|
`utilisableGroupe` int(11) NOT NULL,
|
|
`created_at` timestamp NULL DEFAULT NULL,
|
|
`updated_at` timestamp NULL DEFAULT NULL,
|
|
PRIMARY KEY (`id`),
|
|
KEY `noArt` (`noArt`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
DROP TABLE IF EXISTS `copyrights`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!40101 SET character_set_client = utf8 */;
|
|
CREATE TABLE `copyrights` (
|
|
`copyright_id` bigint(20) unsigned NOT NULL,
|
|
`libelle` varchar(150) COLLATE utf8mb4_bin DEFAULT '',
|
|
PRIMARY KEY (`copyright_id`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
DROP TABLE IF EXISTS `dossiers`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!40101 SET character_set_client = utf8 */;
|
|
CREATE TABLE `dossiers` (
|
|
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
|
`libelle` varchar(255) COLLATE utf8mb4_bin NOT NULL DEFAULT '',
|
|
`description` text COLLATE utf8mb4_bin DEFAULT NULL,
|
|
`parent_id` bigint(20) unsigned DEFAULT NULL,
|
|
`sujet_id` bigint(20) unsigned DEFAULT NULL,
|
|
`system` int(11) unsigned NOT NULL DEFAULT 0,
|
|
`is_private` int(11) unsigned NOT NULL DEFAULT 0,
|
|
`created_at` timestamp NULL DEFAULT NULL,
|
|
`updated_at` timestamp NULL DEFAULT NULL,
|
|
PRIMARY KEY (`id`),
|
|
KEY `parent_id` (`parent_id`),
|
|
KEY `FK_dossiers_sujets` (`sujet_id`),
|
|
CONSTRAINT `FK_dossiers_sujets` FOREIGN KEY (`sujet_id`) REFERENCES `sujets` (`codeSujet`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
DROP TABLE IF EXISTS `dossiers_users`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!40101 SET character_set_client = utf8 */;
|
|
CREATE TABLE `dossiers_users` (
|
|
`dossier_id` bigint(20) unsigned NOT NULL,
|
|
`user_id` bigint(20) unsigned NOT NULL,
|
|
PRIMARY KEY (`dossier_id`,`user_id`),
|
|
KEY `FK_dossiers_users_users` (`user_id`),
|
|
KEY `FK_dossiers_users_dossiers` (`dossier_id`),
|
|
CONSTRAINT `FK_dossiers_users_dossiers` FOREIGN KEY (`dossier_id`) REFERENCES `dossiers` (`id`) ON DELETE CASCADE,
|
|
CONSTRAINT `FK_dossiers_users_users` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
DROP TABLE IF EXISTS `etiquettes`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!40101 SET character_set_client = utf8 */;
|
|
CREATE TABLE `etiquettes` (
|
|
`etiquette_id` bigint(20) unsigned NOT NULL,
|
|
`libelle` varchar(150) COLLATE utf8mb4_bin DEFAULT '',
|
|
`color` varchar(10) COLLATE utf8mb4_bin NOT NULL DEFAULT '#000000',
|
|
PRIMARY KEY (`etiquette_id`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
DROP TABLE IF EXISTS `format_restrictions`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!40101 SET character_set_client = utf8 */;
|
|
CREATE TABLE `format_restrictions` (
|
|
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
|
`sujet_id` bigint(20) unsigned DEFAULT NULL,
|
|
`typevues_id` bigint(20) unsigned DEFAULT NULL,
|
|
`typemedias_id` bigint(20) unsigned DEFAULT NULL,
|
|
`in_mimes` int(11) DEFAULT NULL,
|
|
`in_width` int(11) DEFAULT NULL,
|
|
`in_height` int(11) DEFAULT NULL,
|
|
`out_mimes` int(11) DEFAULT NULL,
|
|
`out_width` int(11) DEFAULT NULL,
|
|
`out_height` int(11) DEFAULT NULL,
|
|
`created_at` timestamp NULL DEFAULT NULL,
|
|
`updated_at` timestamp NULL DEFAULT NULL,
|
|
PRIMARY KEY (`id`),
|
|
KEY `format_restrictions_sujet_id_foreign` (`sujet_id`),
|
|
KEY `format_restrictions_typevues_id_foreign` (`typevues_id`),
|
|
KEY `format_restrictions_typemedias_id_foreign` (`typemedias_id`),
|
|
CONSTRAINT `format_restrictions_sujet_id_foreign` FOREIGN KEY (`sujet_id`) REFERENCES `sujets` (`codeSujet`),
|
|
CONSTRAINT `format_restrictions_typemedias_id_foreign` FOREIGN KEY (`typemedias_id`) REFERENCES `typemedias` (`codeTypemedia`),
|
|
CONSTRAINT `format_restrictions_typevues_id_foreign` FOREIGN KEY (`typevues_id`) REFERENCES `typevues` (`codeTypevue`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
DROP TABLE IF EXISTS `formats`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!40101 SET character_set_client = utf8 */;
|
|
CREATE TABLE `formats` (
|
|
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
|
`libelle` varchar(191) COLLATE utf8mb4_bin NOT NULL,
|
|
`extension` varchar(50) COLLATE utf8mb4_bin NOT NULL DEFAULT '',
|
|
`largeur` int(11) unsigned NOT NULL DEFAULT 0 COMMENT 'Largeur max de l''image générée',
|
|
`hauteur` int(11) unsigned NOT NULL DEFAULT 0 COMMENT 'Hauteur max de l''image générée. 0 = pas de contrainte de hauteur',
|
|
`system` int(11) unsigned NOT NULL DEFAULT 0,
|
|
PRIMARY KEY (`id`),
|
|
UNIQUE KEY `libelle` (`libelle`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
DROP TABLE IF EXISTS `historiques`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!40101 SET character_set_client = utf8 */;
|
|
CREATE TABLE `historiques` (
|
|
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
|
`user_id` bigint(20) unsigned DEFAULT NULL,
|
|
`media_id` bigint(20) unsigned DEFAULT NULL,
|
|
`type` varchar(250) COLLATE utf8mb4_bin NOT NULL DEFAULT '',
|
|
`description` varchar(250) COLLATE utf8mb4_bin NOT NULL DEFAULT '',
|
|
`created_date` timestamp NULL DEFAULT current_timestamp(),
|
|
PRIMARY KEY (`id`),
|
|
KEY `FK_historiques_users` (`user_id`),
|
|
KEY `FK_historiques_medias` (`media_id`),
|
|
CONSTRAINT `FK_historiques_medias` FOREIGN KEY (`media_id`) REFERENCES `medias` (`id`) ON DELETE CASCADE,
|
|
CONSTRAINT `FK_historiques_users` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
DROP TABLE IF EXISTS `langues`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!40101 SET character_set_client = utf8 */;
|
|
CREATE TABLE `langues` (
|
|
`langue_id` bigint(20) unsigned NOT NULL,
|
|
`libelle` varchar(150) COLLATE utf8mb4_bin DEFAULT '',
|
|
PRIMARY KEY (`langue_id`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
DROP TABLE IF EXISTS `marques`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!40101 SET character_set_client = utf8 */;
|
|
CREATE TABLE `marques` (
|
|
`codMarq` bigint(20) unsigned NOT NULL,
|
|
`libMarq` varchar(50) COLLATE utf8mb4_bin DEFAULT NULL,
|
|
`created_at` timestamp NULL DEFAULT NULL,
|
|
`updated_at` timestamp NULL DEFAULT NULL,
|
|
PRIMARY KEY (`codMarq`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
DROP TABLE IF EXISTS `marques_dossiers`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!40101 SET character_set_client = utf8 */;
|
|
CREATE TABLE `marques_dossiers` (
|
|
`marque_id` bigint(20) unsigned NOT NULL,
|
|
`dossier_id` bigint(20) unsigned NOT NULL,
|
|
PRIMARY KEY (`marque_id`,`dossier_id`),
|
|
KEY `FK_marques_dossiers_dossiers` (`dossier_id`),
|
|
CONSTRAINT `FK_marques_dossiers_dossiers` FOREIGN KEY (`dossier_id`) REFERENCES `dossiers` (`id`) ON DELETE CASCADE,
|
|
CONSTRAINT `FK_marques_dossiers_marques` FOREIGN KEY (`marque_id`) REFERENCES `marques` (`codMarq`) ON DELETE CASCADE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
DROP TABLE IF EXISTS `marques_users`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!40101 SET character_set_client = utf8 */;
|
|
CREATE TABLE `marques_users` (
|
|
`marque_id` bigint(20) unsigned NOT NULL,
|
|
`user_id` bigint(20) unsigned NOT NULL,
|
|
PRIMARY KEY (`marque_id`,`user_id`),
|
|
KEY `FK_marques_users_users` (`user_id`),
|
|
CONSTRAINT `FK_marques_users_marques` FOREIGN KEY (`marque_id`) REFERENCES `marques` (`codMarq`) ON DELETE CASCADE,
|
|
CONSTRAINT `FK_marques_users_users` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
DROP TABLE IF EXISTS `medias`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!40101 SET character_set_client = utf8 */;
|
|
CREATE TABLE `medias` (
|
|
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
|
`arcadia_id` bigint(20) unsigned DEFAULT NULL,
|
|
`libelle` varchar(50) COLLATE utf8mb4_bin NOT NULL DEFAULT '',
|
|
`folder` varchar(750) COLLATE utf8mb4_bin NOT NULL DEFAULT '',
|
|
`uid` varchar(750) COLLATE utf8mb4_bin NOT NULL DEFAULT '',
|
|
`extension` varchar(750) COLLATE utf8mb4_bin NOT NULL DEFAULT '',
|
|
`taille` varchar(100) COLLATE utf8mb4_bin NOT NULL DEFAULT '0',
|
|
`largeur` varchar(100) COLLATE utf8mb4_bin NOT NULL DEFAULT '',
|
|
`largeur_mm` varchar(100) COLLATE utf8mb4_bin NOT NULL DEFAULT '',
|
|
`hauteur` varchar(100) COLLATE utf8mb4_bin NOT NULL DEFAULT '',
|
|
`hauteur_mm` varchar(100) COLLATE utf8mb4_bin NOT NULL DEFAULT '',
|
|
`resolution` varchar(100) COLLATE utf8mb4_bin NOT NULL DEFAULT '',
|
|
`duree` varchar(100) COLLATE utf8mb4_bin NOT NULL DEFAULT '',
|
|
`version` bigint(20) unsigned NOT NULL DEFAULT 1,
|
|
`typemedia_id` bigint(20) unsigned DEFAULT NULL,
|
|
`typevue_id` bigint(20) unsigned DEFAULT NULL,
|
|
`commentaire` text COLLATE utf8mb4_bin DEFAULT NULL,
|
|
`dossier_id` bigint(20) unsigned DEFAULT NULL,
|
|
`sujet_id` bigint(20) unsigned DEFAULT NULL,
|
|
`langue_id` bigint(20) unsigned DEFAULT 0,
|
|
`copyright_id` bigint(20) unsigned DEFAULT 0,
|
|
`etiquette_id` bigint(20) unsigned DEFAULT 0,
|
|
`variante_id` bigint(20) unsigned DEFAULT NULL,
|
|
`created_by` bigint(20) unsigned DEFAULT NULL,
|
|
`statut` int(10) unsigned DEFAULT 0,
|
|
`isLocked` int(10) unsigned DEFAULT 0,
|
|
`isDefault` int(10) unsigned DEFAULT 0,
|
|
`created_at` timestamp NULL DEFAULT NULL,
|
|
`updated_at` timestamp NULL DEFAULT NULL,
|
|
`deleted_at` timestamp NULL DEFAULT NULL,
|
|
`published_at` timestamp NULL DEFAULT NULL,
|
|
PRIMARY KEY (`id`),
|
|
KEY `dossier_id` (`dossier_id`),
|
|
KEY `sujet_id` (`sujet_id`),
|
|
KEY `arcadia_id` (`arcadia_id`),
|
|
KEY `typemedia_id` (`typemedia_id`),
|
|
KEY `typevue_id` (`typevue_id`),
|
|
KEY `langue_id` (`langue_id`),
|
|
KEY `copyright_id` (`copyright_id`),
|
|
KEY `etiquette_id` (`etiquette_id`),
|
|
KEY `FK_medias_variantes` (`variante_id`),
|
|
KEY `FK_medias_users` (`created_by`),
|
|
CONSTRAINT `FK_medias_copyrights` FOREIGN KEY (`copyright_id`) REFERENCES `copyrights` (`copyright_id`),
|
|
CONSTRAINT `FK_medias_dossiers` FOREIGN KEY (`dossier_id`) REFERENCES `dossiers` (`id`),
|
|
CONSTRAINT `FK_medias_etiquettes` FOREIGN KEY (`etiquette_id`) REFERENCES `etiquettes` (`etiquette_id`),
|
|
CONSTRAINT `FK_medias_langues` FOREIGN KEY (`langue_id`) REFERENCES `langues` (`langue_id`),
|
|
CONSTRAINT `FK_medias_sujets` FOREIGN KEY (`sujet_id`) REFERENCES `sujets` (`codeSujet`),
|
|
CONSTRAINT `FK_medias_typemedias` FOREIGN KEY (`typemedia_id`) REFERENCES `typemedias` (`codeTypemedia`),
|
|
CONSTRAINT `FK_medias_typevues` FOREIGN KEY (`typevue_id`) REFERENCES `typevues` (`codeTypevue`),
|
|
CONSTRAINT `FK_medias_users` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`),
|
|
CONSTRAINT `FK_medias_variantes` FOREIGN KEY (`variante_id`) REFERENCES `variantes` (`codeVariante`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
DROP TABLE IF EXISTS `medias_articles`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!40101 SET character_set_client = utf8 */;
|
|
CREATE TABLE `medias_articles` (
|
|
`media_id` bigint(20) unsigned NOT NULL,
|
|
`article_id` bigint(20) unsigned NOT NULL,
|
|
PRIMARY KEY (`media_id`,`article_id`),
|
|
KEY `FK_medias_articles_articles` (`article_id`),
|
|
CONSTRAINT `FK_medias_articles_articles` FOREIGN KEY (`article_id`) REFERENCES `articles` (`id`) ON DELETE CASCADE,
|
|
CONSTRAINT `FK_medias_articles_medias` FOREIGN KEY (`media_id`) REFERENCES `medias` (`id`) ON DELETE CASCADE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
DROP TABLE IF EXISTS `medias_marques`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!40101 SET character_set_client = utf8 */;
|
|
CREATE TABLE `medias_marques` (
|
|
`media_id` bigint(20) unsigned NOT NULL,
|
|
`marque_id` bigint(20) unsigned NOT NULL,
|
|
PRIMARY KEY (`media_id`,`marque_id`),
|
|
KEY `FK_medias_marques_marques` (`marque_id`),
|
|
CONSTRAINT `FK_medias_marques_marques` FOREIGN KEY (`marque_id`) REFERENCES `marques` (`codMarq`) ON DELETE CASCADE,
|
|
CONSTRAINT `FK_medias_marques_medias` FOREIGN KEY (`media_id`) REFERENCES `medias` (`id`) ON DELETE CASCADE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
DROP TABLE IF EXISTS `medias_societes`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!40101 SET character_set_client = utf8 */;
|
|
CREATE TABLE `medias_societes` (
|
|
`media_id` bigint(20) unsigned NOT NULL,
|
|
`societe_id` bigint(20) unsigned NOT NULL,
|
|
PRIMARY KEY (`media_id`,`societe_id`),
|
|
KEY `FK_medias_sites_sites` (`societe_id`),
|
|
CONSTRAINT `FK_medias_sites_medias` FOREIGN KEY (`media_id`) REFERENCES `medias` (`id`) ON DELETE CASCADE,
|
|
CONSTRAINT `FK_medias_sites_sites` FOREIGN KEY (`societe_id`) REFERENCES `societes` (`id`) ON DELETE CASCADE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
DROP TABLE IF EXISTS `medias_tags`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!40101 SET character_set_client = utf8 */;
|
|
CREATE TABLE `medias_tags` (
|
|
`media_id` bigint(20) unsigned NOT NULL,
|
|
`tag_id` bigint(20) unsigned NOT NULL,
|
|
PRIMARY KEY (`media_id`,`tag_id`),
|
|
KEY `FK_medias_tags_tags` (`tag_id`),
|
|
CONSTRAINT `FK_medias_tags_medias` FOREIGN KEY (`media_id`) REFERENCES `medias` (`id`) ON DELETE CASCADE,
|
|
CONSTRAINT `FK_medias_tags_tags` FOREIGN KEY (`tag_id`) REFERENCES `tags` (`id`) ON DELETE CASCADE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
DROP TABLE IF EXISTS `migrations`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!40101 SET character_set_client = utf8 */;
|
|
CREATE TABLE `migrations` (
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
`migration` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
|
`batch` int(11) NOT NULL,
|
|
PRIMARY KEY (`id`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
DROP TABLE IF EXISTS `paniers`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!40101 SET character_set_client = utf8 */;
|
|
CREATE TABLE `paniers` (
|
|
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
|
`user_id` bigint(20) unsigned NOT NULL DEFAULT 0,
|
|
`libelle` varchar(255) COLLATE utf8mb4_bin NOT NULL DEFAULT '',
|
|
`uid` varchar(191) COLLATE utf8mb4_bin NOT NULL DEFAULT '',
|
|
`description` text COLLATE utf8mb4_bin DEFAULT NULL,
|
|
`statut` int(11) DEFAULT 0,
|
|
`created_at` timestamp NULL DEFAULT NULL,
|
|
`updated_at` timestamp NULL DEFAULT NULL,
|
|
`deleted_at` timestamp NULL DEFAULT NULL,
|
|
PRIMARY KEY (`id`),
|
|
UNIQUE KEY `uid` (`uid`),
|
|
KEY `FK_paniers_users` (`user_id`) USING BTREE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
DROP TABLE IF EXISTS `paniers_medias`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!40101 SET character_set_client = utf8 */;
|
|
CREATE TABLE `paniers_medias` (
|
|
`panier_id` bigint(20) unsigned NOT NULL,
|
|
`media_id` bigint(20) unsigned NOT NULL,
|
|
PRIMARY KEY (`panier_id`,`media_id`),
|
|
KEY `FK_paniers_medias_medias` (`media_id`),
|
|
CONSTRAINT `FK_paniers_medias_medias` FOREIGN KEY (`media_id`) REFERENCES `medias` (`id`) ON DELETE CASCADE,
|
|
CONSTRAINT `FK_paniers_medias_panier` FOREIGN KEY (`panier_id`) REFERENCES `paniers` (`id`) ON DELETE CASCADE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
DROP TABLE IF EXISTS `paniers_users`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!40101 SET character_set_client = utf8 */;
|
|
CREATE TABLE `paniers_users` (
|
|
`panier_id` bigint(20) unsigned NOT NULL,
|
|
`user_id` bigint(20) unsigned NOT NULL,
|
|
PRIMARY KEY (`panier_id`,`user_id`),
|
|
KEY `FK_paniers_users_users` (`user_id`),
|
|
CONSTRAINT `FK_paniers_users_panier` FOREIGN KEY (`panier_id`) REFERENCES `paniers` (`id`) ON DELETE CASCADE,
|
|
CONSTRAINT `FK_paniers_users_users` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
DROP TABLE IF EXISTS `password_resets`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!40101 SET character_set_client = utf8 */;
|
|
CREATE TABLE `password_resets` (
|
|
`email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
|
`token` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
|
`created_at` timestamp NULL DEFAULT NULL,
|
|
KEY `password_resets_email_index` (`email`(191))
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
DROP TABLE IF EXISTS `recherches`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!40101 SET character_set_client = utf8 */;
|
|
CREATE TABLE `recherches` (
|
|
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
|
`user_id` bigint(20) unsigned NOT NULL DEFAULT 0,
|
|
`sujet_id` bigint(20) unsigned NOT NULL DEFAULT 0,
|
|
`dossier_id` bigint(20) NOT NULL DEFAULT 0,
|
|
`filters` longtext COLLATE utf8mb4_bin NOT NULL,
|
|
`libelle` varchar(200) COLLATE utf8mb4_bin NOT NULL DEFAULT '',
|
|
`created_at` timestamp NULL DEFAULT NULL,
|
|
`updated_at` timestamp NULL DEFAULT NULL,
|
|
PRIMARY KEY (`id`),
|
|
KEY `FK_recherche_users` (`user_id`),
|
|
KEY `FK_recherche_sujets` (`sujet_id`),
|
|
KEY `FK_recherche_dossiers` (`dossier_id`),
|
|
CONSTRAINT `FK_recherche_sujets` FOREIGN KEY (`sujet_id`) REFERENCES `sujets` (`codeSujet`) ON DELETE CASCADE,
|
|
CONSTRAINT `FK_recherche_users` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
DROP TABLE IF EXISTS `settings`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!40101 SET character_set_client = utf8 */;
|
|
CREATE TABLE `settings` (
|
|
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
|
`key` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
|
`value` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
|
`created_at` timestamp NULL DEFAULT NULL,
|
|
`updated_at` timestamp NULL DEFAULT NULL,
|
|
PRIMARY KEY (`id`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
DROP TABLE IF EXISTS `sites`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!40101 SET character_set_client = utf8 */;
|
|
CREATE TABLE `sites` (
|
|
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
|
`libelle` varchar(255) COLLATE utf8mb4_bin NOT NULL DEFAULT '',
|
|
`created_at` timestamp NULL DEFAULT NULL,
|
|
`updated_at` timestamp NULL DEFAULT NULL,
|
|
PRIMARY KEY (`id`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
DROP TABLE IF EXISTS `societes`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!40101 SET character_set_client = utf8 */;
|
|
CREATE TABLE `societes` (
|
|
`id` bigint(20) unsigned NOT NULL,
|
|
`libelle` varchar(50) COLLATE utf8mb4_bin DEFAULT NULL,
|
|
`created_at` timestamp NULL DEFAULT NULL,
|
|
`updated_at` timestamp NULL DEFAULT NULL,
|
|
PRIMARY KEY (`id`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
DROP TABLE IF EXISTS `sujets`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!40101 SET character_set_client = utf8 */;
|
|
CREATE TABLE `sujets` (
|
|
`codeSujet` bigint(20) unsigned NOT NULL,
|
|
`libelle` varchar(150) COLLATE utf8mb4_bin DEFAULT NULL,
|
|
`sujet_arcadia` int(10) unsigned DEFAULT 0 COMMENT 'sujet en lien avec Arcadia',
|
|
`sujet_dam` int(10) unsigned DEFAULT 0 COMMENT 'sujet pouvant être géré dans le DAM',
|
|
`created_at` timestamp NULL DEFAULT NULL,
|
|
`updated_at` timestamp NULL DEFAULT NULL,
|
|
PRIMARY KEY (`codeSujet`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
DROP TABLE IF EXISTS `sujets_formats`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!40101 SET character_set_client = utf8 */;
|
|
CREATE TABLE `sujets_formats` (
|
|
`sujet_id` bigint(20) unsigned NOT NULL,
|
|
`format_id` bigint(20) unsigned NOT NULL,
|
|
PRIMARY KEY (`format_id`,`sujet_id`),
|
|
KEY `format_id` (`format_id`),
|
|
KEY `media_id` (`sujet_id`),
|
|
CONSTRAINT `FK_medias_formats_formats` FOREIGN KEY (`format_id`) REFERENCES `formats` (`id`),
|
|
CONSTRAINT `FK_medias_formats_medias` FOREIGN KEY (`sujet_id`) REFERENCES `sujets` (`codeSujet`) ON DELETE CASCADE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
DROP TABLE IF EXISTS `sujets_users`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!40101 SET character_set_client = utf8 */;
|
|
CREATE TABLE `sujets_users` (
|
|
`sujet_id` bigint(20) unsigned NOT NULL,
|
|
`user_id` bigint(20) unsigned NOT NULL,
|
|
PRIMARY KEY (`sujet_id`,`user_id`),
|
|
KEY `FK_sujets_users_users` (`user_id`),
|
|
CONSTRAINT `FK_sujets_users_sujets` FOREIGN KEY (`sujet_id`) REFERENCES `sujets` (`codeSujet`) ON DELETE CASCADE,
|
|
CONSTRAINT `FK_sujets_users_users` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
DROP TABLE IF EXISTS `tags`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!40101 SET character_set_client = utf8 */;
|
|
CREATE TABLE `tags` (
|
|
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
|
`libelle` varchar(255) COLLATE utf8mb4_bin NOT NULL DEFAULT '',
|
|
PRIMARY KEY (`id`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
DROP TABLE IF EXISTS `typemedias`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!40101 SET character_set_client = utf8 */;
|
|
CREATE TABLE `typemedias` (
|
|
`codeTypemedia` bigint(20) unsigned NOT NULL,
|
|
`libelle` varchar(150) COLLATE utf8mb4_bin DEFAULT '',
|
|
`created_at` timestamp NULL DEFAULT NULL,
|
|
`updated_at` timestamp NULL DEFAULT NULL,
|
|
PRIMARY KEY (`codeTypemedia`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
DROP TABLE IF EXISTS `typevues`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!40101 SET character_set_client = utf8 */;
|
|
CREATE TABLE `typevues` (
|
|
`codeTypevue` bigint(20) unsigned NOT NULL,
|
|
`libelle` varchar(150) COLLATE utf8mb4_bin DEFAULT '',
|
|
`sujet_id` bigint(20) unsigned NOT NULL,
|
|
`created_at` timestamp NULL DEFAULT NULL,
|
|
`updated_at` timestamp NULL DEFAULT NULL,
|
|
PRIMARY KEY (`codeTypevue`),
|
|
KEY `sujet_id` (`sujet_id`),
|
|
CONSTRAINT `FK_typevues_sujets` FOREIGN KEY (`sujet_id`) REFERENCES `sujets` (`codeSujet`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
DROP TABLE IF EXISTS `users`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!40101 SET character_set_client = utf8 */;
|
|
CREATE TABLE `users` (
|
|
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
|
`firstname` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`lastname` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`email` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`objectguid` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`matricule` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
|
|
`email_verified_at` timestamp NULL DEFAULT NULL,
|
|
`password` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`role` int(11) DEFAULT 0,
|
|
`created_at` timestamp NULL DEFAULT NULL,
|
|
`updated_at` timestamp NULL DEFAULT NULL,
|
|
PRIMARY KEY (`id`),
|
|
UNIQUE KEY `matricule` (`matricule`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
DROP TABLE IF EXISTS `variantes`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!40101 SET character_set_client = utf8 */;
|
|
CREATE TABLE `variantes` (
|
|
`codeVariante` bigint(20) unsigned NOT NULL,
|
|
`libelle` varchar(150) COLLATE utf8mb4_bin DEFAULT NULL,
|
|
`sujet_id` bigint(20) unsigned NOT NULL,
|
|
`typevue_id` bigint(20) unsigned NOT NULL,
|
|
`created_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
|
|
`updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
|
|
PRIMARY KEY (`codeVariante`),
|
|
KEY `FK_variantes_sujets` (`sujet_id`),
|
|
KEY `FK_variantes_typevues` (`typevue_id`),
|
|
CONSTRAINT `FK_variantes_sujets` FOREIGN KEY (`sujet_id`) REFERENCES `sujets` (`codeSujet`),
|
|
CONSTRAINT `FK_variantes_typevues` FOREIGN KEY (`typevue_id`) REFERENCES `typevues` (`codeTypevue`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
|
|
|
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
|
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
|
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
|
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
|
|
|
INSERT INTO `migrations` VALUES (1,'2014_10_12_000000_create_users_table',1);
|
|
INSERT INTO `migrations` VALUES (2,'2014_10_12_100000_create_password_resets_table',1);
|
|
INSERT INTO `migrations` VALUES (3,'2019_05_15_080601_create_marques_table',2);
|
|
INSERT INTO `migrations` VALUES (4,'2021_06_09_101909_create_format_restrictions_table',3);
|
|
INSERT INTO `migrations` VALUES (5,'2021_06_09_115021_create_settings_table',4);
|