From 70fb033024954512b5c25dd50cffe79d525ba574 Mon Sep 17 00:00:00 2001 From: Paul Derscheid Date: Wed, 16 Apr 2025 15:48:53 +0000 Subject: [PATCH] Bug 37829: [DO NOT PUSH] Add db seed for SO + QA This file can just be run against the db to: - Make books bookable in general - Add some authorised values targeted at testing the different types - Add some additional fields, some of which using the aforementioned authorised values --- test_bug_37829.sql | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 test_bug_37829.sql diff --git a/test_bug_37829.sql b/test_bug_37829.sql new file mode 100644 index 0000000000..db03ca3b9d --- /dev/null +++ b/test_bug_37829.sql @@ -0,0 +1,29 @@ +UPDATE itemtypes +SET bookable = 1 +WHERE itemtype = 'BK'; +INSERT INTO authorised_value_categories (category_name) +VALUES ('BOOKINGS_URGENCY'); +INSERT INTO authorised_values (category, authorised_value, lib) +VALUES ('BOOKINGS_URGENCY', 'LOW', 'Low'); +INSERT INTO authorised_values (category, authorised_value, lib) +VALUES ( + 'BOOKINGS_URGENCY', + 'MEDIUM', + 'Medium' + ); +INSERT INTO authorised_values (category, authorised_value, lib) +VALUES ('BOOKINGS_URGENCY', 'HIGH', 'High'); +INSERT INTO additional_fields ( + tablename, + name, + authorised_value_category + ) +VALUES ('bookings', 'Urgency', 'BOOKINGS_URGENCY'); +INSERT INTO additional_fields ( + tablename, + name, + repeatable + ) +VALUES ('bookings', 'Note', 1); +INSERT INTO additional_fields (tablename, name) +VALUES ('bookings', 'Contact'); \ No newline at end of file -- 2.39.5