id(); $table->foreignId('table_id')->constrained('tables')->cascadeOnDelete(); $table->string('index_name'); $table->json('columns'); // Array of column names $table->boolean('is_unique')->default(false); $table->boolean('is_primary')->default(false); $table->string('index_type')->default('btree'); $table->text('definition')->nullable(); $table->timestamps(); $table->unique(['table_id', 'index_name'], 'unique_index'); }); } public function down(): void { Schema::dropIfExists('indexes'); } };