Skip to content

A free open source IT asset/license management system

Backport the license index fix from Develop onto the v5 branch

Brady Wetherington6b0a1ab3fb2a
diff --git a/database/migrations/2022_01_10_182548_add_license_id_index_to_license_seats.php b/database/migrations/2022_01_10_182548_add_license_id_index_to_license_seats.php
new file mode 100644
index 0000000000..0eb0dfc463
--- /dev/null
+++ b/database/migrations/2022_01_10_182548_add_license_id_index_to_license_seats.php
@@ -0,0 +1,32 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+class AddLicenseIdIndexToLicenseSeats extends Migration
+{
+ /**
+ * Run the migrations.
+ *
+ * @return void
+ */
+ public function up()
+ {
+ Schema::table('license_seats', function (Blueprint $table) {
+ $table->index(['license_id']);
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::table('license_seats', function (Blueprint $table) {
+ $table->dropIndex(['license_id']);
+ });
+ }
+}