migrations/Version20261022141002.php line 1

  1. <?php
  2. declare(strict_types=1);
  3. namespace DoctrineMigrations;
  4. use Doctrine\DBAL\Schema\Schema;
  5. use Doctrine\Migrations\AbstractMigration;
  6. /**
  7.  * Auto-generated Migration: Please modify to your needs!
  8.  */
  9. final class Version20261022141002 extends AbstractMigration
  10. {
  11.     public function getDescription(): string
  12.     {
  13.         return '';
  14.     }
  15.     public function up(Schema $schema): void
  16.     {
  17.         // this up() migration is auto-generated, please modify it to your needs
  18.         $this->addSql('ALTER TABLE post_record ADD metrics JSON DEFAULT NULL COMMENT \'(DC2Type:json)\', DROP facebook_video_views_total, DROP facebook_video_viewscomplete_total, DROP facebook_video_view_time, DROP facebook_reel_views_total, DROP facebook_reel_views_complete_total, DROP page_link_video_clicks_count, DROP profile_story_total_interactions, DROP profile_post_follows, DROP profile_post_profile_vists, DROP profile_story_impressions, DROP profile_story_taps_forward, DROP profile_story_taps_back, DROP profile_story_exits, DROP profile_story_replies, DROP profile_post_video_views_total, DROP profile_post_replays, DROP profile_post_plays, DROP profile_post_reels_view_total_time, DROP facebook_video_views10s, CHANGE raw_metrics raw_metrics JSON DEFAULT NULL COMMENT \'(DC2Type:json)\'');
  19.         $this->addSql('ALTER TABLE record_social_media ADD metrics JSON DEFAULT NULL COMMENT \'(DC2Type:json)\', DROP fb_links_post_count, DROP carousel_post_count, DROP igtv_post_count, DROP fb_page_link_video_clicks_count, DROP fb_page_posts_reactions, DROP fb_page_posts_comments_count, DROP fb_page_posts_shares_count, DROP igprofile_likes_count_total, DROP igprofile_comments_count_total, DROP igprofile_post_saved_total, DROP igprofile_post_shares, DROP igprofile_story_shares, DROP igprofile_post_video_views_total, DROP igprofile_post_profile_activity_total, DROP igprofile_story_profile_activity_total, DROP tweets_retweets, DROP tweets_likes, DROP tweets_replies, DROP tweets_quotes, DROP tweets_url_link_clicks, DROP channel_likes_count, DROP channel_dislikes_count, DROP channel_comments_count, DROP profile_followers_gain, DROP profile_followers_lost, DROP profile_overall_tweets, DROP youtube_channel_follows_per_day, DROP youtube_channel_unfollows_per_day, DROP channel_views_count, DROP channel_total_videos_count, DROP youtube_channel_estimated_minutes_watched, DROP youtube_channel_average_view_duration, DROP youtube_channel_shares_per_day, DROP youtube_channel_comments_per_day, DROP youtube_channel_likes_per_day, DROP youtube_channel_dislikes_per_day, DROP tiktoker_profile_media_count, DROP tiktoker_profile_like_count, CHANGE raw_metrics raw_metrics JSON DEFAULT NULL COMMENT \'(DC2Type:json)\'');
  20.         $this->addSql('ALTER TABLE user CHANGE roles roles JSON NOT NULL COMMENT \'(DC2Type:json)\'');
  21.     }
  22.     public function down(Schema $schema): void
  23.     {
  24.         // this down() migration is auto-generated, please modify it to your needs
  25.         $this->addSql('ALTER TABLE post_record ADD facebook_video_views_total INT DEFAULT NULL, ADD facebook_video_viewscomplete_total INT DEFAULT NULL, ADD facebook_video_view_time INT DEFAULT NULL, ADD facebook_reel_views_total INT DEFAULT NULL, ADD facebook_reel_views_complete_total INT DEFAULT NULL, ADD page_link_video_clicks_count INT DEFAULT NULL, ADD profile_story_total_interactions VARCHAR(255) DEFAULT NULL, ADD profile_post_follows VARCHAR(255) DEFAULT NULL, ADD profile_post_profile_vists VARCHAR(255) DEFAULT NULL, ADD profile_story_impressions VARCHAR(255) DEFAULT NULL, ADD profile_story_taps_forward VARCHAR(255) DEFAULT NULL, ADD profile_story_taps_back VARCHAR(255) DEFAULT NULL, ADD profile_story_exits VARCHAR(255) DEFAULT NULL, ADD profile_story_replies VARCHAR(255) DEFAULT NULL, ADD profile_post_video_views_total INT DEFAULT NULL, ADD profile_post_replays INT DEFAULT NULL, ADD profile_post_plays INT DEFAULT NULL, ADD profile_post_reels_view_total_time INT DEFAULT NULL, ADD facebook_video_views10s VARCHAR(255) DEFAULT NULL, DROP metrics, CHANGE raw_metrics raw_metrics JSON DEFAULT NULL COMMENT \'(DC2Type:json)\'');
  26.         $this->addSql('ALTER TABLE record_social_media ADD fb_links_post_count INT DEFAULT NULL, ADD carousel_post_count INT DEFAULT NULL, ADD igtv_post_count INT DEFAULT NULL, ADD fb_page_link_video_clicks_count VARCHAR(255) DEFAULT NULL, ADD fb_page_posts_reactions VARCHAR(255) DEFAULT NULL, ADD fb_page_posts_comments_count VARCHAR(255) DEFAULT NULL, ADD fb_page_posts_shares_count VARCHAR(255) DEFAULT NULL, ADD igprofile_likes_count_total VARCHAR(255) DEFAULT NULL, ADD igprofile_comments_count_total VARCHAR(255) DEFAULT NULL, ADD igprofile_post_saved_total VARCHAR(255) DEFAULT NULL, ADD igprofile_post_shares VARCHAR(255) DEFAULT NULL, ADD igprofile_story_shares VARCHAR(255) DEFAULT NULL, ADD igprofile_post_video_views_total VARCHAR(255) DEFAULT NULL, ADD igprofile_post_profile_activity_total VARCHAR(255) DEFAULT NULL, ADD igprofile_story_profile_activity_total VARCHAR(255) DEFAULT NULL, ADD tweets_retweets VARCHAR(255) DEFAULT NULL, ADD tweets_likes VARCHAR(255) DEFAULT NULL, ADD tweets_replies VARCHAR(255) DEFAULT NULL, ADD tweets_quotes VARCHAR(255) DEFAULT NULL, ADD tweets_url_link_clicks VARCHAR(255) DEFAULT NULL, ADD channel_likes_count VARCHAR(255) DEFAULT NULL, ADD channel_dislikes_count VARCHAR(255) DEFAULT NULL, ADD channel_comments_count VARCHAR(255) DEFAULT NULL, ADD profile_followers_gain VARCHAR(255) DEFAULT NULL, ADD profile_followers_lost VARCHAR(255) DEFAULT NULL, ADD profile_overall_tweets VARCHAR(255) DEFAULT NULL, ADD youtube_channel_follows_per_day VARCHAR(255) DEFAULT NULL, ADD youtube_channel_unfollows_per_day VARCHAR(255) DEFAULT NULL, ADD channel_views_count VARCHAR(255) DEFAULT NULL, ADD channel_total_videos_count VARCHAR(255) DEFAULT NULL, ADD youtube_channel_estimated_minutes_watched VARCHAR(255) DEFAULT NULL, ADD youtube_channel_average_view_duration VARCHAR(255) DEFAULT NULL, ADD youtube_channel_shares_per_day VARCHAR(255) DEFAULT NULL, ADD youtube_channel_comments_per_day VARCHAR(255) DEFAULT NULL, ADD youtube_channel_likes_per_day VARCHAR(255) DEFAULT NULL, ADD youtube_channel_dislikes_per_day VARCHAR(255) DEFAULT NULL, ADD tiktoker_profile_media_count INT DEFAULT NULL, ADD tiktoker_profile_like_count INT DEFAULT NULL, DROP metrics, CHANGE raw_metrics raw_metrics JSON DEFAULT NULL COMMENT \'(DC2Type:json)\'');
  27.         $this->addSql('ALTER TABLE user CHANGE roles roles JSON NOT NULL COMMENT \'(DC2Type:json)\'');
  28.     }
  29. }