diff --git a/database/migrations/2025_12_30_000002_fix_legal_revision_user_id.php b/database/migrations/2025_12_30_000002_fix_legal_revision_user_id.php new file mode 100644 index 0000000..30164a0 --- /dev/null +++ b/database/migrations/2025_12_30_000002_fix_legal_revision_user_id.php @@ -0,0 +1,41 @@ + UUID) + if (Schema::hasColumn('legal_page_revisions', 'created_by')) { + Schema::table('legal_page_revisions', function (Blueprint $table) { + $table->dropColumn('created_by'); + }); + } + + Schema::table('legal_page_revisions', function (Blueprint $table) { + $table->uuid('created_by')->nullable(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + if (Schema::hasColumn('legal_page_revisions', 'created_by')) { + Schema::table('legal_page_revisions', function (Blueprint $table) { + $table->dropColumn('created_by'); + }); + } + + Schema::table('legal_page_revisions', function (Blueprint $table) { + $table->unsignedBigInteger('created_by')->nullable(); + }); + } +};