Projet

Général

Profil

Paste
Statistiques
| Branche: | Révision:

root / _scripts / sqlInstall.txt @ 232b0a2c

Historique | Voir | Annoter | Télécharger (3,4 ko)

1 232b0a2c Eric Seigne
CREATE TABLE `mur` (
2
  `id_mur` int(11) NOT NULL,
3
  `nom` varchar(150) NOT NULL,
4
  `slug` varchar(250) NOT NULL,
5
  `descriptif` varchar(250) DEFAULT NULL,
6
  `date_creation` date NOT NULL,
7
  `date_acces` date DEFAULT NULL,
8
  `mdp_admin` varchar(100) NOT NULL,
9
  `mel_admin` varchar(250) DEFAULT NULL,
10
  `mdp_acces` varchar(500) DEFAULT NULL,
11
  `id_theme` tinyint(4) NOT NULL
12
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
13
{{**********}}
14
ALTER TABLE `mur` ADD PRIMARY KEY (`id_mur`);
15
{{**********}}
16
ALTER TABLE `mur` MODIFY `id_mur` int(11) NOT NULL AUTO_INCREMENT;
17
{{**********}}
18
CREATE TABLE `brique` (
19
  `id_brique` int(11) NOT NULL,
20
  `titre` varchar(250) NOT NULL,
21
  `descriptif` text,
22
  `fichier` varchar(500) NOT NULL,
23
  `url` varchar(500) NOT NULL,
24
  `iframe` varchar(500) NOT NULL,
25
  `date_ajout` date NOT NULL,
26
  `isValide` tinyint(1) NOT NULL COMMENT 'vrai si brique validée par admin',
27
  `id_mur` int(11) NOT NULL,
28
  `id_categorie` tinyint(4) NOT NULL
29
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
30
{{**********}}
31
ALTER TABLE `brique` ADD PRIMARY KEY (`id_brique`);
32
{{**********}}
33
ALTER TABLE `brique` MODIFY `id_brique` int(11) NOT NULL AUTO_INCREMENT;
34
{{**********}}
35
CREATE TABLE `categorie` (
36
  `id_categorie` tinyint(4) NOT NULL,
37
  `titre` varchar(50) NOT NULL,
38
  `descriptif` varchar(250) NOT NULL,
39
  `fa_icone` varchar(100) NOT NULL,
40
  `isFichier` tinyint(1) NOT NULL COMMENT 'Vrai si la catégorie renvoie un fichier',
41
  `isUrl` tinyint(1) NOT NULL COMMENT 'Vrai si la catégorie rnevoie une URL',
42
  `isIframe` tinyint(1) NOT NULL COMMENT 'Vrai si la catégorie renvoie vers une Iframe',
43
  `extensions` varchar(500) NOT NULL
44
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
45
{{**********}}
46
ALTER TABLE `categorie` ADD PRIMARY KEY (`id_categorie`);
47
{{**********}}
48
ALTER TABLE `categorie` MODIFY `id_categorie` tinyint(4) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
49
{{**********}}
50
CREATE TABLE `theme` (
51
  `id_theme` tinyint(11) NOT NULL,
52
  `nom` varchar(100) NOT NULL,
53
  `fichier` varchar(100) NOT NULL,
54
  `information` varchar(500) NOT NULL
55
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
56
{{**********}}
57
ALTER TABLE `theme` ADD PRIMARY KEY (`id_theme`);
58
{{**********}}
59
ALTER TABLE `theme` MODIFY `id_theme` tinyint(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
60
{{**********}}
61
INSERT INTO theme (nom, fichier, information) VALUES
62
("Mur de briques", "test.css", "css de test voir <a href='#'>Machin</a>"),
63
("Abuledu-fr", "abuledufr.css", "Illustrations : Arnaud Pérat"),
64
("Sylvanus", "sylvanus.css", "Thème inspiré de <a href='https://abcd.abuledu.org/sylvanus-aquitaine/'>Sylvanus</a> (dessiné par Fanny Roquette)"),
65
("Abel et Bellina","abelEtBellina.css", "Thème inspiré d'<a href='https://odysseuslibre.be/site/' target='_blank'>Odysseus</a>");
66
{{**********}}
67
INSERT INTO categorie (titre,descriptif,fa_icone,isFichier,isUrl,isIframe,extensions) VALUES
68
("Document","Tout type de document (.pdf, .odt, .ods, etc.) ou de fichier","<i class='fas fa-file-alt'></i>",1,0,0,"odt,ods,pdf,txt,rtf"),
69
("Son", "Fichier son (.mp3 par exemple)", "<i class='fas fa-headphones'></i>", 1, 0, 0, "mp3,ogg,wav"),
70
("url", "Lien internet", "<i class='fas fa-link'></i>", 0, 1, 0, ""),
71
("Intégration", "Code d'intégration d'une ressource", "<i class='fas fa-share-alt-square'></i>", 0, 0, 1, ""),
72
("Image", "Fichier image (.jpg, .png par exemple)", "<i class='fas fa-image'></i>", 1, 0, 0, "jpg,jpeg,png,gif"),
73
("Texte", "Afficher un texte simple sur le mur", "<i class='fas fa-pencil-alt'></i>", 0, 0, 0, "");
Redmine Appliance - Powered by TurnKey Linux