Bug 24584: Rewrite optional/sample_libraries to YAML
authorBernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Wed, 5 Feb 2020 12:42:17 +0000 (09:42 -0300)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Mon, 9 Mar 2020 13:54:38 +0000 (13:54 +0000)
YAML version of optional sample_libraries

To test:
1) Same test plan of first patch, only check table
   branches

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

installer/data/mysql/en/optional/sample_libraries.sql [deleted file]
installer/data/mysql/en/optional/sample_libraries.txt [deleted file]
installer/data/mysql/en/optional/sample_libraries.yml [new file with mode: 0644]

diff --git a/installer/data/mysql/en/optional/sample_libraries.sql b/installer/data/mysql/en/optional/sample_libraries.sql
deleted file mode 100644 (file)
index 234cba5..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-INSERT INTO branches ( `branchcode`,`branchname`,`branchaddress1`) VALUES
-
-('MPL','Midway','372 Forest Street'),
-('SPL','Springfield','Highland Boulevard'),
-('RPL','Riverside','Johnson Terrace'),
-('CPL','Centerville','Jefferson Summit'),
-('FPL','Fairview','Hickory Squere'),
-('FFL','Fairfield','River Station'),
-('IPT','Institut Protestant de Théologie',''),
-('PVL','Pleasant Valley','Meadow Grove'),
-('TPL','Troy','Valley Way'),
-('FRL','Franklin','Smith Heights'),
-('LPL','Liberty','East Hills'),
-('UPL','Union','Chestnut Hollow')
-;
-
diff --git a/installer/data/mysql/en/optional/sample_libraries.txt b/installer/data/mysql/en/optional/sample_libraries.txt
deleted file mode 100644 (file)
index 2a1bd9a..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Sample libraries.
diff --git a/installer/data/mysql/en/optional/sample_libraries.yml b/installer/data/mysql/en/optional/sample_libraries.yml
new file mode 100644 (file)
index 0000000..b1abd1f
--- /dev/null
@@ -0,0 +1,75 @@
+---
+#
+#  Copyright 2020 Koha Development Team
+#
+#  This file is part of Koha.
+#
+#  Koha is free software; you can redistribute it and/or modify it under the
+#  terms of the GNU General Public License as published by the Free Software
+#  Foundation; either version 2 of the License, or (at your option) any later
+#  version.
+#
+#  Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+#  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+#  A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License along
+#  with Koha; if not, write to the Free Software Foundation, Inc.,
+#  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+
+description:
+  - "Sample libraries."
+
+tables:
+  - branches:
+      translatable: [ ]
+      multiline: []
+      rows:
+        - branchcode: MPL
+          branchname: "Midway"
+          branchaddress1: "372 Forest Street"
+
+        - branchcode: SPL
+          branchname: "Springfield"
+          branchaddress1: "Highland Boulevard"
+
+        - branchcode: RPL
+          branchname: "Riverside"
+          branchaddress1: "Johnson Terrace"
+
+        - branchcode: CPL
+          branchname: "Centerville"
+          branchaddress1: "Jefferson Summit"
+
+        - branchcode: FPL
+          branchname: "Fairview"
+          branchaddress1: "Hickory Squere"
+
+        - branchcode: FFL
+          branchname: "Fairfield"
+          branchaddress1: "River Station"
+
+        - branchcode: IPT
+          branchname: "Institut Protestant de Théologie"
+          branchaddress1: ""
+
+        - branchcode: PVL
+          branchname: "Pleasant Valley"
+          branchaddress1: "Meadow Grove"
+
+        - branchcode: TPL
+          branchname: "Troy"
+          branchaddress1: "Valley Way"
+
+        - branchcode: FRL
+          branchname: "Franklin"
+          branchaddress1: "Smith Heights"
+
+        - branchcode: LPL
+          branchname: "Liberty"
+          branchaddress1: "East Hills"
+
+        - branchcode: UPL
+          branchname: "Union"
+          branchaddress1: "Chestnut Hollow"