Skip to content

Instantly share code, notes, and snippets.

@jarektkaczyk
Created July 20, 2018 13:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jarektkaczyk/950365819a2f44f630e8fcf7e4fc0c79 to your computer and use it in GitHub Desktop.
Save jarektkaczyk/950365819a2f44f630e8fcf7e4fc0c79 to your computer and use it in GitHub Desktop.
<?php
Schema::table('clicks', function (Blueprint $table) {
$table->index('user_id');
$table->index(['user_id', 'date_clicked']);
$table->index(['user_id', 'date_clicked', 'ip']);
$table->index(['user_id', 'date_clicked', 'country']);
$table->index(['user_id', 'date_clicked', 'city']);
$table->index(['user_id', 'date_clicked', 'browser']);
$table->index(['user_id', 'date_clicked', 'os']);
});
Schema::table('links', function (Blueprint $table) {
$table->index('user_id');
});
Schema::table('pixels', function (Blueprint $table) {
$table->index('user_id');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment