diff --git a/app/Database/Migrations/2020-06-08-130000_add_analytics_podcasts_by_episode.php b/app/Database/Migrations/2020-06-08-130000_add_analytics_podcasts_by_episode.php index b189ef06..f26977ac 100644 --- a/app/Database/Migrations/2020-06-08-130000_add_analytics_podcasts_by_episode.php +++ b/app/Database/Migrations/2020-06-08-130000_add_analytics_podcasts_by_episode.php @@ -41,7 +41,7 @@ class AddAnalyticsPodcastsByEpisode extends Migration 'default' => 1, ], ]); - $this->forge->addPrimaryKey(['podcast_id', 'episode_id', 'date']); + $this->forge->addPrimaryKey(['podcast_id', 'date', 'episode_id']); $this->forge->addField( '`created_at` timestamp NOT NULL DEFAULT current_timestamp()' ); diff --git a/app/Database/Migrations/2020-06-08-140000_add_analytics_podcasts_by_player.php b/app/Database/Migrations/2020-06-08-140000_add_analytics_podcasts_by_player.php index c1bc04af..a8f8d32d 100644 --- a/app/Database/Migrations/2020-06-08-140000_add_analytics_podcasts_by_player.php +++ b/app/Database/Migrations/2020-06-08-140000_add_analytics_podcasts_by_player.php @@ -50,11 +50,11 @@ class AddAnalyticsPodcastsByPlayer extends Migration ]); $this->forge->addPrimaryKey([ 'podcast_id', + 'date', 'app', 'device', 'os', 'bot', - 'date', ]); $this->forge->addField( '`created_at` timestamp NOT NULL DEFAULT current_timestamp()' diff --git a/app/Database/Migrations/2020-06-08-150000_add_analytics_podcasts_by_country.php b/app/Database/Migrations/2020-06-08-150000_add_analytics_podcasts_by_country.php index e5f045e6..81335375 100644 --- a/app/Database/Migrations/2020-06-08-150000_add_analytics_podcasts_by_country.php +++ b/app/Database/Migrations/2020-06-08-150000_add_analytics_podcasts_by_country.php @@ -36,7 +36,7 @@ class AddAnalyticsPodcastsByCountry extends Migration 'default' => 1, ], ]); - $this->forge->addPrimaryKey(['podcast_id', 'country_code', 'date']); + $this->forge->addPrimaryKey(['podcast_id', 'date', 'country_code']); $this->forge->addField( '`created_at` timestamp NOT NULL DEFAULT current_timestamp()' ); diff --git a/app/Database/Migrations/2020-06-08-160000_add_analytics_podcasts_by_region.php b/app/Database/Migrations/2020-06-08-160000_add_analytics_podcasts_by_region.php index 7b787878..fa317996 100644 --- a/app/Database/Migrations/2020-06-08-160000_add_analytics_podcasts_by_region.php +++ b/app/Database/Migrations/2020-06-08-160000_add_analytics_podcasts_by_region.php @@ -51,9 +51,9 @@ class AddAnalyticsPodcastsByRegion extends Migration ]); $this->forge->addPrimaryKey([ 'podcast_id', + 'date', 'country_code', 'region_code', - 'date', ]); $this->forge->addField( '`created_at` timestamp NOT NULL DEFAULT current_timestamp()' diff --git a/app/Database/Migrations/2020-06-08-170000_add_analytics_website_by_browser.php b/app/Database/Migrations/2020-06-08-170000_add_analytics_website_by_browser.php index 21724af7..a99ebf19 100644 --- a/app/Database/Migrations/2020-06-08-170000_add_analytics_website_by_browser.php +++ b/app/Database/Migrations/2020-06-08-170000_add_analytics_website_by_browser.php @@ -36,7 +36,7 @@ class AddAnalyticsWebsiteByBrowser extends Migration 'default' => 1, ], ]); - $this->forge->addPrimaryKey(['podcast_id', 'browser', 'date']); + $this->forge->addPrimaryKey(['podcast_id', 'date', 'browser']); $this->forge->addField( '`created_at` timestamp NOT NULL DEFAULT current_timestamp()' ); diff --git a/app/Database/Migrations/2020-06-08-180000_add_analytics_website_by_referer.php b/app/Database/Migrations/2020-06-08-180000_add_analytics_website_by_referer.php index 579024b0..4addc2e2 100644 --- a/app/Database/Migrations/2020-06-08-180000_add_analytics_website_by_referer.php +++ b/app/Database/Migrations/2020-06-08-180000_add_analytics_website_by_referer.php @@ -46,7 +46,7 @@ class AddAnalyticsWebsiteByReferer extends Migration 'default' => 1, ], ]); - $this->forge->addPrimaryKey(['podcast_id', 'referer', 'date']); + $this->forge->addPrimaryKey(['podcast_id', 'date', 'referer']); $this->forge->addField( '`created_at` timestamp NOT NULL DEFAULT current_timestamp()' ); diff --git a/app/Database/Migrations/2020-06-08-190000_add_analytics_website_by_entry_page.php b/app/Database/Migrations/2020-06-08-190000_add_analytics_website_by_entry_page.php index 19bce6de..426783c2 100644 --- a/app/Database/Migrations/2020-06-08-190000_add_analytics_website_by_entry_page.php +++ b/app/Database/Migrations/2020-06-08-190000_add_analytics_website_by_entry_page.php @@ -36,7 +36,7 @@ class AddAnalyticsWebsiteByEntryPage extends Migration 'default' => 1, ], ]); - $this->forge->addPrimaryKey(['podcast_id', 'entry_page', 'date']); + $this->forge->addPrimaryKey(['podcast_id', 'date', 'entry_page']); $this->forge->addField( '`created_at` timestamp NOT NULL DEFAULT current_timestamp()' );