Normalize formatting/line endings across configs, controllers, models, tests, and OpenAPI specs. Update rule expression/rule engine implementation and remove obsolete RuleAction controller/model. Add unit tests for rule expression syntax and multi-action behavior, and include docs updates.
41 lines
1.0 KiB
PHP
41 lines
1.0 KiB
PHP
<?php
|
|
|
|
namespace App\Database\Seeds;
|
|
|
|
use CodeIgniter\Database\Seeder;
|
|
|
|
class ClearOrderDataSeeder extends Seeder
|
|
{
|
|
public function run()
|
|
{
|
|
echo "Clearing order-related tables...\n";
|
|
|
|
// Disable foreign key checks temporarily
|
|
$this->db->query('SET FOREIGN_KEY_CHECKS = 0');
|
|
|
|
// Clear tables in reverse dependency order
|
|
$this->db->table('ordercom')->truncate();
|
|
echo " - ordercom truncated\n";
|
|
|
|
$this->db->table('orderstatus')->truncate();
|
|
echo " - orderstatus truncated\n";
|
|
|
|
$this->db->table('patres')->truncate();
|
|
echo " - patres truncated\n";
|
|
|
|
$this->db->table('specimenstatus')->truncate();
|
|
echo " - specimenstatus truncated\n";
|
|
|
|
$this->db->table('specimen')->truncate();
|
|
echo " - specimen truncated\n";
|
|
|
|
$this->db->table('ordertest')->truncate();
|
|
echo " - ordertest truncated\n";
|
|
|
|
// Re-enable foreign key checks
|
|
$this->db->query('SET FOREIGN_KEY_CHECKS = 1');
|
|
|
|
echo "\nAll order-related tables cleared successfully!\n";
|
|
}
|
|
}
|