index(['created_at']); $table->index(['datetime']); }); DB::statement('CREATE INDEX echomail_seenby_unsent ON echomail_seenby (address_id,echomail_id) WHERE sent_at IS NULL AND export_at IS NOT NULL;'); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('echomails', function (Blueprint $table) { $table->dropIndex(['created_at']); $table->dropIndex(['datetime']); }); DB::statement('DROP INDEX echomail_seenby_unsent'); } };