diff --git a/Modules/Pages/Database/Migrations/2026_07_24_030700_enhance_pages_for_publishing.php b/Modules/Pages/Database/Migrations/2026_07_24_030700_enhance_pages_for_publishing.php index c23f1fd..987be9a 100644 --- a/Modules/Pages/Database/Migrations/2026_07_24_030700_enhance_pages_for_publishing.php +++ b/Modules/Pages/Database/Migrations/2026_07_24_030700_enhance_pages_for_publishing.php @@ -1,3 +1,4 @@ string('template')->default('default'); $table->timestamp('expires_at')->nullable(); $table->string('preview_token',64)->nullable()->unique(); $table->foreignId('locked_by')->nullable()->constrained('users')->nullOnDelete(); $table->timestamp('locked_at')->nullable(); }); Schema::create('page_revisions', function(Blueprint $table): void { $table->id(); $table->foreignId('page_id')->constrained('pages')->cascadeOnDelete(); $table->foreignId('user_id')->nullable()->constrained()->nullOnDelete(); $table->string('title'); $table->longText('content')->nullable(); $table->json('snapshot'); $table->timestamps(); }); } public function down(): void { Schema::dropIfExists('page_revisions'); Schema::table('pages', function(Blueprint $table): void { $table->dropConstrainedForeignId('locked_by'); $table->dropColumn(['template','expires_at','preview_token','locked_at']); }); } };