From ca04884e8893cc2e6d3593d0ade26c8f8c82d15d Mon Sep 17 00:00:00 2001 From: Yisroel Baum Date: Tue, 26 May 2026 21:13:39 +0300 Subject: [PATCH] backfill element descriptions --- ...6_000001_backfill_element_descriptions.php | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 backend/database/migrations/2026_05_26_000001_backfill_element_descriptions.php diff --git a/backend/database/migrations/2026_05_26_000001_backfill_element_descriptions.php b/backend/database/migrations/2026_05_26_000001_backfill_element_descriptions.php new file mode 100644 index 0000000..68ee685 --- /dev/null +++ b/backend/database/migrations/2026_05_26_000001_backfill_element_descriptions.php @@ -0,0 +1,41 @@ + 'Baderech HaAvodah is a way of living - ' + . 'a structured path for inner and outer growth, ' + . 'spiritual refinement, and personal development.', + 'Avodah Foundations' => 'Core foundations for building a steady ' + . 'avodah practice.', + 'Daily Practice' => 'Practical steps for consistent daily growth.', + ]; + + foreach ($descriptionsByTitle as $title => $description) { + DB::table('elements') + ->where('title', $title) + ->where('description', '') + ->update(['description' => $description]); + } + } + + public function down(): void + { + $titles = [ + 'Baderech HaAvodah', + 'Avodah Foundations', + 'Daily Practice', + ]; + + foreach ($titles as $title) { + DB::table('elements') + ->where('title', $title) + ->update(['description' => '']); + } + } +};