Skip to content

Commit

Permalink
🔥
Browse files Browse the repository at this point in the history
  • Loading branch information
yordadev committed Aug 20, 2024
1 parent 1d80cf6 commit 6cec16c
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
Expand All @@ -14,7 +15,13 @@
public function up()
{
Schema::table('short_url_tracings', function (Blueprint $table) {
$table->index(['utm_source(100)', 'utm_medium(100)', 'utm_campaign(100)', 'utm_content(100)', 'utm_term(100)'], 'utm_composite_index');
DB::statement('CREATE INDEX utm_composite_index ON short_url_tracings (utm_source(100), utm_medium(100), utm_campaign(100), utm_content(100), utm_term(100))');
});
}

public function down(){
Schema::table('short_url_tracings', function (Blueprint $table) {
$table->dropIndex('utm_composite_index');
});
}
};

0 comments on commit 6cec16c

Please sign in to comment.