|
|
@@ -1,177 +0,0 @@
|
|
|
---
|
|
|
--- Structure de la table `tags`
|
|
|
---
|
|
|
-
|
|
|
-CREATE TABLE `tags` (
|
|
|
- `id` int(4) NOT NULL,
|
|
|
- `label` tinytext NOT NULL
|
|
|
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
|
|
-
|
|
|
---
|
|
|
--- Déchargement des données de la table `tags`
|
|
|
---
|
|
|
-
|
|
|
-INSERT INTO `tags` (`id`, `label`) VALUES
|
|
|
-(1, 'Trésorier ASC'),
|
|
|
-(2, 'Trésorier AEP');
|
|
|
-
|
|
|
---
|
|
|
--- Index pour les tables déchargées
|
|
|
---
|
|
|
-
|
|
|
---
|
|
|
--- Index pour la table `tags`
|
|
|
---
|
|
|
-ALTER TABLE `tags`
|
|
|
- ADD PRIMARY KEY (`id`);
|
|
|
-
|
|
|
---
|
|
|
--- AUTO_INCREMENT pour les tables déchargées
|
|
|
---
|
|
|
-
|
|
|
---
|
|
|
--- AUTO_INCREMENT pour la table `tags`
|
|
|
---
|
|
|
-ALTER TABLE `tags`
|
|
|
- MODIFY `id` int(4) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
|
|
|
-COMMIT;
|
|
|
-
|
|
|
---
|
|
|
--- Structure de la table `user`
|
|
|
---
|
|
|
-
|
|
|
-ALTER TABLE `user` ADD `tags` TEXT NULL AFTER `id_type`;
|
|
|
-
|
|
|
---
|
|
|
--- Structure de la table `type_document`
|
|
|
---
|
|
|
-
|
|
|
-CREATE TABLE `type_document` (
|
|
|
- `id` int(2) NOT NULL,
|
|
|
- `label` varchar(250) NOT NULL
|
|
|
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
|
|
-
|
|
|
---
|
|
|
--- Déchargement des données de la table `type_document`
|
|
|
---
|
|
|
-
|
|
|
-INSERT INTO `type_document` (`id`, `label`) VALUES
|
|
|
-(0, 'Autre'),
|
|
|
-(1, 'Facture d\'un fournisseur'),
|
|
|
-(2, 'Note de frais'),
|
|
|
-(3, 'Bulletin de salaire');
|
|
|
-
|
|
|
---
|
|
|
--- Index pour les tables déchargées
|
|
|
---
|
|
|
-
|
|
|
---
|
|
|
--- Index pour la table `type_document`
|
|
|
---
|
|
|
-ALTER TABLE `type_document`
|
|
|
- ADD PRIMARY KEY (`id`);
|
|
|
-
|
|
|
---
|
|
|
--- AUTO_INCREMENT pour les tables déchargées
|
|
|
---
|
|
|
-
|
|
|
---
|
|
|
--- AUTO_INCREMENT pour la table `type_document`
|
|
|
---
|
|
|
-ALTER TABLE `type_document`
|
|
|
- MODIFY `id` int(2) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
|
|
|
-COMMIT;
|
|
|
-
|
|
|
-
|
|
|
---
|
|
|
--- Structure de la table `documents`
|
|
|
---
|
|
|
-
|
|
|
-CREATE TABLE `documents` (
|
|
|
- `id` int(5) NOT NULL,
|
|
|
- `id_type` int(2) NOT NULL,
|
|
|
- `id_file` varchar(32) NOT NULL,
|
|
|
- `titre` tinytext NOT NULL,
|
|
|
- `date` date NOT NULL,
|
|
|
- `deadline` date NOT NULL,
|
|
|
- `description` text NOT NULL,
|
|
|
- `tags` text DEFAULT NULL,
|
|
|
- `id_user_done` int(3) DEFAULT NULL,
|
|
|
- `date_done` timestamp NULL DEFAULT NULL
|
|
|
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
|
|
-
|
|
|
---
|
|
|
--- Index pour les tables déchargées
|
|
|
---
|
|
|
-
|
|
|
---
|
|
|
--- Index pour la table `documents`
|
|
|
---
|
|
|
-ALTER TABLE `documents`
|
|
|
- ADD PRIMARY KEY (`id`),
|
|
|
- ADD KEY `id_file_doc` (`id_file`),
|
|
|
- ADD KEY `id_type_doc` (`id_type`),
|
|
|
- ADD KEY `id_user_done` (`id_user_done`);
|
|
|
-
|
|
|
---
|
|
|
--- AUTO_INCREMENT pour les tables déchargées
|
|
|
---
|
|
|
-
|
|
|
---
|
|
|
--- AUTO_INCREMENT pour la table `documents`
|
|
|
---
|
|
|
-ALTER TABLE `documents`
|
|
|
- MODIFY `id` int(5) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;
|
|
|
-
|
|
|
---
|
|
|
--- Contraintes pour les tables déchargées
|
|
|
---
|
|
|
-
|
|
|
---
|
|
|
--- Contraintes pour la table `documents`
|
|
|
---
|
|
|
-ALTER TABLE `documents`
|
|
|
- ADD CONSTRAINT `id_file_doc` FOREIGN KEY (`id_file`) REFERENCES `files` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
|
|
|
- ADD CONSTRAINT `id_type_doc` FOREIGN KEY (`id_type`) REFERENCES `type_document` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
|
|
|
- ADD CONSTRAINT `id_user_done` FOREIGN KEY (`id_user_done`) REFERENCES `user` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION;
|
|
|
-COMMIT;
|
|
|
-
|
|
|
-INSERT INTO `type_access` (`id`, `id_type`, `id_access`) VALUES
|
|
|
-('3#10', 3, 10),
|
|
|
-('4#10', 4, 10),
|
|
|
-('4#11', 4, 11),
|
|
|
-('4#12', 4, 12),
|
|
|
-('4#13', 4, 13),
|
|
|
-('4#14', 4, 14),
|
|
|
-('4#15', 4, 15),
|
|
|
-('4#4', 4, 4),
|
|
|
-('4#5', 4, 5),
|
|
|
-('4#6', 4, 6),
|
|
|
-('4#7', 4, 7),
|
|
|
-('4#8', 4, 8),
|
|
|
-('4#9', 4, 9),
|
|
|
-('5#1', 5, 1),
|
|
|
-('5#10', 5, 10),
|
|
|
-('5#11', 5, 11),
|
|
|
-('5#12', 5, 12),
|
|
|
-('5#13', 5, 13),
|
|
|
-('5#14', 5, 14),
|
|
|
-('5#15', 5, 15),
|
|
|
-('5#2', 5, 2),
|
|
|
-('5#4', 5, 4),
|
|
|
-('5#5', 5, 5),
|
|
|
-('5#6', 5, 6),
|
|
|
-('5#7', 5, 7),
|
|
|
-('5#8', 5, 8),
|
|
|
-('5#9', 5, 9),
|
|
|
-('6#1', 6, 1),
|
|
|
-('6#10', 6, 10),
|
|
|
-('6#11', 6, 11),
|
|
|
-('6#12', 6, 12),
|
|
|
-('6#14', 6, 14),
|
|
|
-('6#15', 6, 15),
|
|
|
-('6#4', 6, 4),
|
|
|
-('6#5', 6, 5),
|
|
|
-('6#7', 6, 7),
|
|
|
-('6#8', 6, 8),
|
|
|
-('7#1', 7, 1);
|