Files
MoneyFlix/crm/Core/Database/Migrations/RemoveLegacyTrackersTable.php
1sonhador 9d43854277 feat: Initial MoneyFlix project setup
- Created separate MoneyFlix project directory
- Copied Node.js redirector from production server
- Added CRM PHP code (Redirects module, Core classes, Config, Routes, Views)
- Created comprehensive documentation (README_MONEYFLIX.md)
- Added sync script to keep CRM code updated (sync-from-crm.sh)
- Configured .gitignore for Node.js and PHP
- Set up proper project structure for multi-client isolation

This separates MoneyFlix from the main CRM to avoid confusion
between different client systems and provides a dedicated
environment for MoneyFlix-specific development and maintenance.
2025-10-03 12:09:41 +01:00

32 lines
990 B
PHP

<?php
namespace App\Core\Database\Migrations;
use App\Core\Database\Migration;
class RemoveLegacyTrackersTable extends Migration
{
protected ?string $connection = null;
public function up(): void
{
// Remove legacy trackers table that was not being used
// This table had only 3 columns (id, url, created_at) and 0 records
// All tracker functionality uses advertising_trackers table instead
$this->db->query("DROP TABLE IF EXISTS trackers");
}
public function down(): void
{
// Recreate the legacy table if needed (though it was unused)
$this->db->query("
CREATE TABLE IF NOT EXISTS trackers (
id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
url TEXT NOT NULL,
created_at TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
");
}
}