- 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.
36 lines
1.4 KiB
PHP
36 lines
1.4 KiB
PHP
<?php
|
|
|
|
namespace App\Core\Database\Migrations;
|
|
|
|
use App\Core\Database\Migration;
|
|
|
|
class CreateDashboardWidgetsTable extends Migration
|
|
{
|
|
public function up(): void
|
|
{
|
|
$this->createTable('dashboard_widgets', function($table) {
|
|
$table->bigInteger('id')->autoIncrement()->notNull();
|
|
$table->string('widget_id', 100)->notNull()->unique();
|
|
$table->string('module_name', 100)->notNull()->index();
|
|
$table->string('widget_name', 255)->notNull();
|
|
$table->text('widget_description')->nullable();
|
|
$table->string('widget_class', 255)->notNull();
|
|
$table->string('widget_method', 100)->nullable()->default('render');
|
|
$table->json('default_config')->nullable();
|
|
$table->string('widget_size', 20)->nullable()->default('medium');
|
|
$table->string('widget_category', 100)->nullable()->default('general')->index();
|
|
$table->boolean('is_active')->nullable()->default(true)->index();
|
|
$table->timestamp('created_at')->default('CURRENT_TIMESTAMP')->notNull();
|
|
$table->timestamp('updated_at')->default('CURRENT_TIMESTAMP')->notNull();
|
|
$table->bigInteger('user_id')->nullable()->index();
|
|
|
|
$table->primaryKey('id');
|
|
$table->index(['widget_id']);
|
|
});
|
|
}
|
|
|
|
public function down(): void
|
|
{
|
|
$this->dropTable('dashboard_widgets');
|
|
}
|
|
}
|