migrations/Version20261022150345.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 Version20261022150345 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 DROP twitter_quotes, DROP tweets_url_link_clicks, DROP tweets_user_profile_clicks, DROP tweets_retweets, DROP channel_dislikes_count, DROP channel_videos_video_view_count, DROP channel_shorts_video_view_count, DROP tiktoker_post_reach, DROP tiktoker_post_total_time_watched, CHANGE raw_metrics raw_metrics JSON DEFAULT NULL COMMENT \'(DC2Type:json)\', CHANGE metrics metrics JSON DEFAULT NULL COMMENT \'(DC2Type:json)\'');
  19.         $this->addSql('ALTER TABLE record_social_media CHANGE raw_metrics raw_metrics JSON DEFAULT NULL COMMENT \'(DC2Type:json)\', CHANGE metrics 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 twitter_quotes INT DEFAULT NULL, ADD tweets_url_link_clicks VARCHAR(255) DEFAULT NULL, ADD tweets_user_profile_clicks VARCHAR(255) DEFAULT NULL, ADD tweets_retweets VARCHAR(255) DEFAULT NULL, ADD channel_dislikes_count VARCHAR(255) DEFAULT NULL, ADD channel_videos_video_view_count VARCHAR(255) DEFAULT NULL, ADD channel_shorts_video_view_count VARCHAR(255) DEFAULT NULL, ADD tiktoker_post_reach VARCHAR(255) DEFAULT NULL, ADD tiktoker_post_total_time_watched VARCHAR(255) DEFAULT NULL, CHANGE raw_metrics raw_metrics JSON DEFAULT NULL COMMENT \'(DC2Type:json)\', CHANGE metrics metrics JSON DEFAULT NULL COMMENT \'(DC2Type:json)\'');
  26.         $this->addSql('ALTER TABLE record_social_media CHANGE raw_metrics raw_metrics JSON DEFAULT NULL COMMENT \'(DC2Type:json)\', CHANGE metrics metrics JSON DEFAULT NULL COMMENT \'(DC2Type:json)\'');
  27.         $this->addSql('ALTER TABLE user CHANGE roles roles JSON NOT NULL COMMENT \'(DC2Type:json)\'');
  28.     }
  29. }