Commit dc81a710c9c0dab119a142914f175f0437fe36b3

Authored by Etienne Pallier
1 parent f775a0d9
Exists in master and in 1 other branch dev

bugfix install BDD + amelioration script install + bugfix phpmyadmin

database/create_database.sql
... ... @@ -8,8 +8,6 @@
8 8 -- Version de PHP : 5.6.33
9 9  
10 10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
11   -SET AUTOCOMMIT = 0;
12   -START TRANSACTION;
13 11 SET time_zone = "+00:00";
14 12  
15 13  
... ... @@ -22,6 +20,10 @@ SET time_zone = "+00:00";
22 20 -- Base de données : `_mydb_`
23 21 --
24 22  
  23 +-- (EP) Est-ce vraiment utile de faire une transaction si tot ?
  24 +-- SET AUTOCOMMIT = 0;
  25 +-- START TRANSACTION;
  26 +
25 27 DROP DATABASE IF EXISTS _mydb_;
26 28 CREATE SCHEMA IF NOT EXISTS _mydb_ DEFAULT CHARACTER SET latin1;
27 29 CREATE SCHEMA IF NOT EXISTS _mydbtest_ DEFAULT CHARACTER SET latin1;
... ...
database/create_tables.sql
... ... @@ -24,9 +24,9 @@ SET FOREIGN_KEY_CHECKS = 0;
24 24 -- Version de PHP : 7.3.1
25 25  
26 26 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
  27 +SET time_zone = "+00:00";
27 28 SET AUTOCOMMIT = 0;
28 29 START TRANSACTION;
29   -SET time_zone = "+00:00";
30 30  
31 31 --
32 32 -- Base de données : labinvent
... ... @@ -870,4 +870,12 @@ ALTER TABLE suivis
870 870 --
871 871 ALTER TABLE users
872 872 ADD CONSTRAINT fk_users_sur_categories_id FOREIGN KEY (sur_categorie_id) REFERENCES sur_categories (id) ON DELETE NO ACTION ON UPDATE NO ACTION;
  873 +
  874 +
  875 +
  876 +-- commit transaction
873 877 COMMIT;
  878 +
  879 +-- autocommit pour la suite (insert data)
  880 +SET AUTOCOMMIT = 1;
  881 +
... ...
database/insert_tables_default_data_general.sql
... ... @@ -59,6 +59,3 @@ INSERT INTO type_documents (id, nom) VALUES
59 59 (13, 'Devis');
60 60  
61 61  
62   -
63   -
64   -
... ...
install/installation.sh
... ... @@ -498,17 +498,18 @@ echo "----------------------------------"
498 498 echo "...[taper une touche]..."
499 499 read rep
500 500 if [ $bddAdminName == 'bd_existante' ] ; then
501   - mysql --user=$bddUserName --password=$bddUserPass -h $bddIp < ./build.sql
  501 + mysql --user=$bddUserName --password="$bddUserPass" -h $bddIp < ./build.sql
502 502 else
503   - #echo "mysql --user=$bddAdminName --password=$bddAdminPass -h $bddIp < ./build.sql"
504   - mysql --user=$bddAdminName --password=$bddAdminPass -h $bddIp < ./build.sql
  503 + #echo "mysql --user=$bddAdminName --password="$bddAdminPass" -h $bddIp < ./build.sql"
  504 + mysql --user=$bddAdminName --password="$bddAdminPass" -h $bddIp < ./build.sql
505 505 fi
506 506 echo "==> Done (a verifier quand même)"
507 507 echo "NB: "
508 508 echo " Si jamais il y a eu des erreurs lors de la création de la BD,"
509 509 echo " veuillez modifier à la main le script de création de la BD qui est ../database/build.sql"
510 510 echo " puis exécutez à la main cette ligne pour re-créer la BDD :"
511   - echo " $ mysql --user=$bddAdminName --password=$bddAdminPass -h $bddIp < ../database/build.sql"
  511 + #echo " $ mysql --user=$bddAdminName --password="$bddAdminPass" -h $bddIp < ../database/build.sql"
  512 + echo " $ mysql --user=$bddAdminName --password="votre-mot-de-pass-admin-de-mysql" -h $bddIp < ../database/build.sql"
512 513 cd ../
513 514  
514 515 fi # BDD = O
... ...
install/export.sh renamed to install/old/export.sh