Page MenuHomePhorge

D5307.1775391877.diff
No OneTemporary

Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None

D5307.1775391877.diff

diff --git a/src/database/migrations/2025_06_04_100000_add_transactions_type_index.php b/src/database/migrations/2025_06_04_100000_add_transactions_type_index.php
new file mode 100644
--- /dev/null
+++ b/src/database/migrations/2025_06_04_100000_add_transactions_type_index.php
@@ -0,0 +1,34 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+return new class extends Migration {
+ /**
+ * Run the migrations.
+ */
+ public function up(): void
+ {
+ Schema::create(
+ 'transactions',
+ static function (Blueprint $table) {
+ $table->unique(['user_id', 'email']);
+ $table->index(['type'], 'type_idx');
+ }
+ );
+ }
+
+ /**
+ * Reverse the migrations.
+ */
+ public function down(): void
+ {
+ Schema::table(
+ 'transactions',
+ static function (Blueprint $table) {
+ $table->dropIndex('type_idx');
+ }
+ );
+ }
+};

File Metadata

Mime Type
text/plain
Expires
Sun, Apr 5, 12:24 PM (15 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18831526
Default Alt Text
D5307.1775391877.diff (1 KB)

Event Timeline