From a14d7884002db814d346013bdf4761b736e84a64 Mon Sep 17 00:00:00 2001 From: dyzulk <66510723+dyzulk@users.noreply.github.com> Date: Tue, 30 Dec 2025 19:51:45 +0700 Subject: [PATCH] Tidy up migrations: consolidate and delete redundant files --- .../0001_01_01_000000_create_users_table.php | 1 + ...12_24_000001_create_legal_pages_tables.php | 2 +- ...2_30_000002_fix_legal_revision_user_id.php | 41 ------------------- ...81926_add_pending_email_to_users_table.php | 28 ------------- 4 files changed, 2 insertions(+), 70 deletions(-) delete mode 100644 database/migrations/2025_12_30_000002_fix_legal_revision_user_id.php delete mode 100644 database/migrations/2025_12_30_081926_add_pending_email_to_users_table.php diff --git a/database/migrations/0001_01_01_000000_create_users_table.php b/database/migrations/0001_01_01_000000_create_users_table.php index 0089be9..0cb85f0 100644 --- a/database/migrations/0001_01_01_000000_create_users_table.php +++ b/database/migrations/0001_01_01_000000_create_users_table.php @@ -16,6 +16,7 @@ return new class extends Migration $table->string('first_name')->nullable(); $table->string('last_name')->nullable(); $table->string('email')->unique(); + $table->string('pending_email')->nullable(); $table->timestamp('email_verified_at')->nullable(); $table->string('password')->nullable(); diff --git a/database/migrations/2025_12_24_000001_create_legal_pages_tables.php b/database/migrations/2025_12_24_000001_create_legal_pages_tables.php index 90d9de7..1113822 100644 --- a/database/migrations/2025_12_24_000001_create_legal_pages_tables.php +++ b/database/migrations/2025_12_24_000001_create_legal_pages_tables.php @@ -35,7 +35,7 @@ return new class extends Migration $table->text('change_log')->nullable(); $table->boolean('is_active')->default(true); // Internal Soft delete/archive - $table->unsignedBigInteger('created_by')->nullable(); + $table->uuid('created_by')->nullable(); $table->timestamps(); }); } 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 deleted file mode 100644 index 30164a0..0000000 --- a/database/migrations/2025_12_30_000002_fix_legal_revision_user_id.php +++ /dev/null @@ -1,41 +0,0 @@ - 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(); - }); - } -}; diff --git a/database/migrations/2025_12_30_081926_add_pending_email_to_users_table.php b/database/migrations/2025_12_30_081926_add_pending_email_to_users_table.php deleted file mode 100644 index 28cc5cd..0000000 --- a/database/migrations/2025_12_30_081926_add_pending_email_to_users_table.php +++ /dev/null @@ -1,28 +0,0 @@ -string('pending_email')->nullable()->after('email'); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::table('users', function (Blueprint $label) { - $label->dropColumn('pending_email'); - }); - } -};