|
| 1 | +<?php |
| 2 | + |
| 3 | +use Illuminate\Database\Migrations\Migration; |
| 4 | +use Illuminate\Database\Schema\Blueprint; |
| 5 | +use Illuminate\Support\Facades\Schema; |
| 6 | + |
| 7 | +return new class extends Migration { |
| 8 | + /** |
| 9 | + * Run the migrations. |
| 10 | + */ |
| 11 | + public function up(): void |
| 12 | + { |
| 13 | + Schema::create('packages', function (Blueprint $table) { |
| 14 | + $table->uuid('id')->primary(); |
| 15 | + $table->string('title'); |
| 16 | + $table->string('name'); |
| 17 | + $table->string('vendor')->nullable(); |
| 18 | + $table->string('version_installed')->nullable(); |
| 19 | + $table->foreignId('installed_by_id')->nullable(); |
| 20 | + $table->string('installed_by_type')->nullable(); |
| 21 | + $table->foreignId('updated_by_id')->nullable(); |
| 22 | + $table->enum('install_status', ['available', 'installed', 'active'])->nullable(); |
| 23 | + $table->enum('update_status', ['up-to-date', 'update-available', 'update-scheduled', 'update-failed'])->nullable(); |
| 24 | + $table->boolean('auto_update')->default(false); |
| 25 | + $table->boolean('is_theme')->default(false); |
| 26 | + $table->enum('package_type', ['moox_package', 'core_package', 'feature_package', 'theme_package', 'module_package', 'integration_package'])->nullable(); |
| 27 | + $table->json('activation_steps')->nullable(); |
| 28 | + $table->string('icon')->nullable(); |
| 29 | + $table->timestamp('installed_at')->nullable(); |
| 30 | + $table->timestamp('update_scheduled_at')->nullable(); |
| 31 | + $table->timestamp('created_at')->nullable(); |
| 32 | + $table->timestamp('updated_at')->nullable(); |
| 33 | + }); |
| 34 | + } |
| 35 | + |
| 36 | + /** |
| 37 | + * Reverse the migrations. |
| 38 | + */ |
| 39 | + public function down(): void |
| 40 | + { |
| 41 | + Schema::dropIfExists('packages'); |
| 42 | + } |
| 43 | +}; |
0 commit comments