From f672c5e22bb308527ca1e1c889d95d41348f5f91 Mon Sep 17 00:00:00 2001 From: Irina Gómez Date: Tue, 11 May 2021 09:42:07 +0200 Subject: #1046 Import script Fixes the error when there is a record with the string 'usuario' in the original database. The SQL statement includes a stricter condition when modifying the 'usuario' table. --- installer/opengnsys_import.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installer/opengnsys_import.sh b/installer/opengnsys_import.sh index d49c3312..5f79f04e 100755 --- a/installer/opengnsys_import.sh +++ b/installer/opengnsys_import.sh @@ -361,7 +361,7 @@ fi sed -i -e '/Table structure.* `entornos`/,/Table structure/d' \ -e '/Table structure.*`usuarios`/,/CHARSET/d' \ -e '/usuarios/s/IGNORE//g' \ - -e '/usuarios/s/^INSERT /\nALTER TABLE usuarios ADD UNIQUE (usuario);\n\nINSERT IGNORE /g' \ + -e '/usuarios/s/^INSERT INTO .usuarios. /\nALTER TABLE usuarios ADD UNIQUE (usuario);\n\nINSERT IGNORE INTO `usuarios` /g' \ -e "s/\(DEFINER=\`\)[^\`]*\(\`.* TRIGGER\)/\1$USUARIO\2/" \ -e "s/\(\` [a-z]*int([0-9]*) NOT NULL\),/\1 DEFAULT 0,/" \ -e "s/\(\` [a-z]*char([0-9]*) NOT NULL\),/\1 DEFAULT '',/" \ -- cgit v1.2.3-18-g5258