Page MenuHomePhorge

No OneTemporary

diff --git a/src/database/migrations/2022_11_14_100000_add_entitltments_entitleable_index.php b/src/database/migrations/2022_11_14_100000_add_entitltments_entitleable_index.php
new file mode 100644
index 00000000..3f8006bc
--- /dev/null
+++ b/src/database/migrations/2022_11_14_100000_add_entitltments_entitleable_index.php
@@ -0,0 +1,38 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+return new class extends Migration
+{
+ /**
+ * Run the migrations.
+ *
+ * @return void
+ */
+ public function up()
+ {
+ Schema::table(
+ 'entitlements',
+ function (Blueprint $table) {
+ $table->index(['entitleable_id', 'entitleable_type']);
+ }
+ );
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::table(
+ 'entitlements',
+ function (Blueprint $table) {
+ $table->dropIndex(['entitleable_id', 'entitleable_type']);
+ }
+ );
+ }
+};

File Metadata

Mime Type
text/x-diff
Expires
Sun, Jun 29, 2:10 PM (1 d, 12 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
201477
Default Alt Text
(1 KB)

Event Timeline