PluginProbe
Yatra – Travel Booking & Tour Operator Software / 3.0.2.6
Yatra – Travel Booking & Tour Operator Software v3.0.2.6
3.0.16 3.0.15 3.0.14 3.0.14.1 3.0.14.2 3.0.12 3.0.13 3.0.11 3.0.10 3.0.9 3.0.8 3.0.7 3.0.6 3.0.5 3.0.5.1 3.0.4 3.0.3 3.0.2.9 3.0.2.7 3.0.2.8 3.0.2.6 trunk 1.0.0 2.0.0 2.0.1 All 84 releases
yatra / app / Migrations / TripCategoryMigration.php

TripCategoryMigration.php in Yatra – Travel Booking & Tour Operator Software 3.0.2.6, at app/Migrations/TripCategoryMigration.php

26 lines 684 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 declare(strict_types=1);
4
5 namespace Yatra\Migration;
6
7 use Yatra\Constants\ClassificationTypes;
8
9 /**
10 * Migrates trip type / tour category taxonomy terms into ClassificationsTable (type=category).
11 *
12 * Old sites may register either `trip_category` (Yatra 3.x) or `tour_category` (some 2.x builds).
13 */
14 class TripCategoryMigration extends BaseMigration
15 {
16 public function run(): array
17 {
18 // Include both slugs: legacy DB rows may exist even if `tour_category` is no longer registered.
19 return $this->migrateTaxonomy(
20 ['trip_category', 'tour_category'],
21 ClassificationTypes::CATEGORY,
22 'trip_categories'
23 );
24 }
25 }
26