summaryrefslogtreecommitdiff
path: root/schema/dump-it.sh
diff options
context:
space:
mode:
Diffstat (limited to 'schema/dump-it.sh')
-rwxr-xr-xschema/dump-it.sh17
1 files changed, 16 insertions, 1 deletions
diff --git a/schema/dump-it.sh b/schema/dump-it.sh
index 6e9ea5c..1e2276f 100755
--- a/schema/dump-it.sh
+++ b/schema/dump-it.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash -x
# Copyright 2016 Ludovic Pouzenc <ludovic@pouzenc.fr>
# Copyright 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr>
#
@@ -17,5 +17,20 @@
# You should have received a copy of the GNU General Public License
# along with CHD Gestion. If not, see <http://www.gnu.org/licenses/>.
#
+enum_tables="
+adherent_role_types
+adherent_statuts
+adherent_types
+civilites
+equipement_modeles
+equipement_modes
+periodicites
+service_statuts
+service_types
+"
+mysqldump --defaults-file=/etc/mysql/debian.cnf gestion \
+ $enum_tables > enum-tables-data-mysql.sql
+
mysqldump --defaults-file=/etc/mysql/debian.cnf --no-data gestion \
| sed -e 's/AUTO_INCREMENT=[0-9]\+ //g' > schema-mysql.sql
+