We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2763012 + be23eef commit c00ccb5Copy full SHA for c00ccb5
src/database/migrations/2020_12_14_113555_add_addressable_index.php
@@ -0,0 +1,32 @@
1
+<?php
2
+
3
+use Illuminate\Database\Migrations\Migration;
4
+use Illuminate\Database\Schema\Blueprint;
5
+use Illuminate\Support\Facades\Schema;
6
7
+class AddAddressableIndex extends Migration
8
+{
9
+ /**
10
+ * Run the migrations.
11
+ *
12
+ * @return void
13
+ */
14
+ public function up()
15
+ {
16
+ Schema::table('addresses', function (Blueprint $table) {
17
+ $table->index(['addressable_type', 'addressable_id']);
18
+ });
19
+ }
20
21
22
+ * Reverse the migrations.
23
24
25
26
+ public function down()
27
28
29
+ $table->dropIndex(['addressable_type', 'addressable_id']);
30
31
32
+}
0 commit comments