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 b189ef062b0a31325a910a9ef5c14230498b9e12..f26977ac01f1ab9ab8f4dad13986069b79257b87 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 c1bc04af881e3b5b57741ab80611bfbdf008fe1e..a8f8d32d7d7866c481dea392a91a60d230eeee40 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 e5f045e6ef76ddf775c76b999e0ad1d0e1820ebd..8133537570630fcb0ed871f6a5b9fb6ddedf1965 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 7b787878deec93505bd454c2eab19270845329a4..fa317996d50629a67f8e415c359e5a165c69e13b 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 21724af7097c7025a23b9aac381437ca2bf751bd..a99ebf1985c87cfe8db93f9ef99db0bbeea41afc 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 579024b02b845edfbf88ab79eaadb9ca8dd11e3c..4addc2e25c9662c87a4cc8cd259dff4da423cbc3 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 19bce6de19fb00b85be29b074b5899cc6518b5a3..426783c290b752e696638867fe9679cb32822c18 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()' );