<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20240315120332 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE `private_community` CHANGE `design_speciality` `design_speciality` TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL;');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE cities DROP slug, DROP deleted_at');
$this->addSql('ALTER TABLE cms_section_value CHANGE field_value field_value TEXT DEFAULT NULL');
$this->addSql('ALTER TABLE community_categories CHANGE name name VARCHAR(255) DEFAULT NULL, CHANGE status status TINYINT(1) NOT NULL, CHANGE sort_order sort_order TINYINT(1) NOT NULL, CHANGE created_at created_at DATETIME DEFAULT NULL, CHANGE updated_at updated_at DATETIME DEFAULT NULL, CHANGE deleted_at deleted_at DATETIME DEFAULT NULL');
$this->addSql('ALTER TABLE community_groups CHANGE title title VARCHAR(255) DEFAULT NULL, CHANGE sub_title sub_title VARCHAR(255) DEFAULT NULL, CHANGE status status TINYINT(1) DEFAULT NULL, CHANGE sort_order sort_order INT DEFAULT NULL, CHANGE created_at created_at DATETIME DEFAULT NULL, CHANGE updated_at updated_at DATETIME DEFAULT NULL, CHANGE deleted_at deleted_at DATETIME DEFAULT NULL, CHANGE slug slug VARCHAR(255) DEFAULT NULL');
$this->addSql('ALTER TABLE community_post CHANGE like_count like_count INT DEFAULT NULL, CHANGE comment_count comment_count INT DEFAULT NULL');
$this->addSql('ALTER TABLE community_post_comment CHANGE user_id_id user_id_id INT DEFAULT NULL, CHANGE post_id_id post_id_id INT DEFAULT NULL, CHANGE parent_comment_id_id parent_comment_id_id INT DEFAULT NULL, CHANGE like_count like_count INT DEFAULT 0, CHANGE comment_count comment_count INT DEFAULT NULL');
$this->addSql('DROP INDEX UNIQ_AEED7EEC989D9B62 ON community_tags');
$this->addSql('ALTER TABLE community_tags CHANGE slug slug VARCHAR(255) DEFAULT NULL, CHANGE status status TINYINT(1) DEFAULT NULL, CHANGE created_at created_at DATETIME DEFAULT NULL, CHANGE updated_at updated_at DATETIME DEFAULT NULL, CHANGE deleted_at deleted_at DATETIME DEFAULT NULL');
$this->addSql('ALTER TABLE contact_preferences CHANGE status status TINYINT(1) NOT NULL');
$this->addSql('ALTER TABLE contact_us ADD created_by INT DEFAULT NULL');
$this->addSql('ALTER TABLE countries MODIFY id INT NOT NULL');
$this->addSql('DROP INDEX `primary` ON countries');
$this->addSql('ALTER TABLE countries CHANGE id id INT NOT NULL, CHANGE phonecode phonecode INT NOT NULL, CHANGE status status INT DEFAULT 1, CHANGE deleted_at deleted_at DATETIME DEFAULT NULL');
$this->addSql('ALTER TABLE direct_message_read CHANGE user_id user_id INT DEFAULT NULL, CHANGE dm_id dm_id INT DEFAULT NULL, CHANGE created_at created_at DATETIME DEFAULT NULL');
$this->addSql('ALTER TABLE direct_message_user_folder CHANGE user_id user_id INT DEFAULT NULL, CHANGE folder_id folder_id INT DEFAULT NULL, CHANGE dm_id dm_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE directory_profile DROP FOREIGN KEY FK_E2445289A76ED395');
$this->addSql('DROP INDEX IDX_E2445289A76ED395 ON directory_profile');
$this->addSql('ALTER TABLE directory_profile CHANGE user_id user_id INT DEFAULT NULL, CHANGE categories categories VARCHAR(255) DEFAULT NULL, CHANGE business_brief business_brief TEXT DEFAULT NULL, CHANGE business_detail business_detail TEXT DEFAULT NULL, CHANGE is_published is_published TINYINT(1) NOT NULL, CHANGE is_active is_active TINYINT(1) NOT NULL, CHANGE created_on created_on DATETIME NOT NULL, CHANGE deleted_at deleted_at DATETIME DEFAULT NULL, CHANGE is_approved is_approved VARCHAR(255) DEFAULT NULL, CHANGE slug slug VARCHAR(100) DEFAULT NULL');
$this->addSql('CREATE UNIQUE INDEX id ON directory_profile (id)');
$this->addSql('ALTER TABLE directory_profile_categories CHANGE type type VARCHAR(255) DEFAULT \'architect\' NOT NULL, CHANGE created_at created_at DATETIME NOT NULL, CHANGE updated_at updated_at DATETIME DEFAULT NULL, CHANGE deleted_at deleted_at DATETIME DEFAULT NULL');
$this->addSql('ALTER TABLE dm_folders CHANGE user_id user_id INT DEFAULT NULL, CHANGE name name VARCHAR(255) DEFAULT NULL, CHANGE created_at created_at DATETIME DEFAULT NULL, CHANGE updated_at updated_at DATETIME DEFAULT NULL, CHANGE deleted_at deleted_at DATETIME DEFAULT NULL');
$this->addSql('ALTER TABLE education_categories CHANGE name name VARCHAR(255) NOT NULL, CHANGE slug slug VARCHAR(255) NOT NULL, CHANGE sort_order sort_order INT NOT NULL, CHANGE status status TINYINT(1) DEFAULT 1 NOT NULL, CHANGE created_at created_at DATETIME DEFAULT NULL, CHANGE updated_at updated_at DATETIME DEFAULT NULL, CHANGE deleted_at deleted_at DATETIME DEFAULT NULL, CHANGE category_path category_path VARCHAR(255) DEFAULT NULL');
$this->addSql('ALTER TABLE education_type CHANGE icon icon VARCHAR(255) NOT NULL');
$this->addSql('ALTER TABLE educations CHANGE title title LONGTEXT NOT NULL, CHANGE is_approved is_approved VARCHAR(255) NOT NULL, CHANGE slug slug LONGTEXT DEFAULT NULL');
$this->addSql('ALTER TABLE footer_links CHANGE title title VARCHAR(255) NOT NULL, CHANGE link link VARCHAR(255) DEFAULT NULL, CHANGE sort_order sort_order INT NOT NULL, CHANGE is_active is_active TINYINT(1) DEFAULT 1 NOT NULL, CHANGE created_at created_at DATETIME DEFAULT NULL, CHANGE updated_at updated_at DATETIME DEFAULT NULL, CHANGE deleted_at deleted_at DATETIME DEFAULT NULL');
$this->addSql('ALTER TABLE geographic_zone CHANGE name name VARCHAR(255) DEFAULT NULL, CHANGE status status TINYINT(1) DEFAULT NULL, CHANGE created_at created_at DATETIME DEFAULT NULL, CHANGE updated_at updated_at DATETIME DEFAULT NULL, CHANGE deleted_at deleted_at DATETIME DEFAULT NULL');
$this->addSql('ALTER TABLE master_data CHANGE name name VARCHAR(255) NOT NULL, CHANGE sort_order sort_order INT NOT NULL, CHANGE type type VARCHAR(255) NOT NULL, CHANGE is_active is_active TINYINT(1) DEFAULT 1 NOT NULL, CHANGE created_at created_at DATETIME DEFAULT NULL, CHANGE updated_at updated_at DATETIME DEFAULT NULL, CHANGE deleted_at deleted_at DATETIME DEFAULT NULL');
$this->addSql('ALTER TABLE media_kit_file CHANGE media_kit_id_id media_kit_id_id INT DEFAULT NULL, CHANGE media_kit_folder_id_id media_kit_folder_id_id INT DEFAULT NULL');
$this->addSql('DROP INDEX UNIQ_40BB9BE9989D9B62 ON memo_categories');
$this->addSql('ALTER TABLE memo_categories CHANGE name name VARCHAR(255) NOT NULL, CHANGE slug slug VARCHAR(255) NOT NULL, CHANGE sort_order sort_order INT NOT NULL, CHANGE status status TINYINT(1) DEFAULT 1 NOT NULL, CHANGE is_premium is_premium TINYINT(1) DEFAULT 1 NOT NULL, CHANGE created_at created_at DATETIME DEFAULT NULL, CHANGE updated_at updated_at DATETIME DEFAULT NULL, CHANGE deleted_at deleted_at DATETIME DEFAULT NULL, CHANGE category_path category_path VARCHAR(255) DEFAULT NULL');
$this->addSql('ALTER TABLE memos CHANGE author author VARCHAR(255) DEFAULT NULL');
$this->addSql('DROP INDEX UNIQ_D7E805BD989D9B62 ON podcast');
$this->addSql('ALTER TABLE podcast CHANGE title title VARCHAR(255) DEFAULT NULL, CHANGE slug slug VARCHAR(255) DEFAULT NULL, CHANGE category_id category_id INT DEFAULT NULL, CHANGE sub_title sub_title VARCHAR(255) DEFAULT NULL, CHANGE podcast_date podcast_date DATETIME DEFAULT NULL, CHANGE image image VARCHAR(255) DEFAULT NULL, CHANGE description description TEXT DEFAULT NULL, CHANGE teaser_1 teaser_1 VARCHAR(255) DEFAULT NULL, CHANGE teaser_2 teaser_2 VARCHAR(255) DEFAULT NULL, CHANGE teaser_3 teaser_3 VARCHAR(255) DEFAULT NULL, CHANGE teaser_4 teaser_4 VARCHAR(255) DEFAULT NULL, CHANGE sponsor_title sponsor_title VARCHAR(255) DEFAULT NULL, CHANGE sponsor_website sponsor_website VARCHAR(255) DEFAULT NULL, CHANGE sponsor_social_media_link sponsor_social_media_link VARCHAR(255) DEFAULT NULL, CHANGE sponsor_social_media_fb_link sponsor_social_media_fb_link VARCHAR(255) DEFAULT NULL, CHANGE sponsor_social_media_insta_link sponsor_social_media_insta_link VARCHAR(255) DEFAULT NULL, CHANGE sponsor_social_media_youtube_link sponsor_social_media_youtube_link VARCHAR(255) DEFAULT NULL, CHANGE sponsor_social_media_twitter_link sponsor_social_media_twitter_link VARCHAR(255) DEFAULT NULL, CHANGE sponsor_social_media_pinterest_link sponsor_social_media_pinterest_link VARCHAR(255) DEFAULT NULL, CHANGE is_premium is_premium VARCHAR(255) DEFAULT NULL COMMENT \'0-->unpublished 1-->published\', CHANGE is_active is_active VARCHAR(255) DEFAULT \'1\' NOT NULL COMMENT \'0-->inactive 1-->active\', CHANGE created_by created_by INT NOT NULL, CHANGE created_at created_at DATETIME DEFAULT NULL, CHANGE updated_at updated_at DATETIME DEFAULT NULL, CHANGE deleted_at deleted_at DATETIME DEFAULT NULL, CHANGE seo_description seo_description VARCHAR(255) DEFAULT NULL, CHANGE sponsor_sub_title sponsor_sub_title VARCHAR(255) DEFAULT NULL');
$this->addSql('DROP INDEX UNIQ_A6B81226989D9B62 ON podcast_categories');
$this->addSql('ALTER TABLE podcast_categories CHANGE name name VARCHAR(255) NOT NULL, CHANGE slug slug VARCHAR(255) NOT NULL, CHANGE sort_order sort_order INT NOT NULL, CHANGE status status TINYINT(1) DEFAULT 1 NOT NULL, CHANGE created_at created_at DATETIME DEFAULT NULL, CHANGE updated_at updated_at DATETIME DEFAULT NULL, CHANGE deleted_at deleted_at DATETIME DEFAULT NULL, CHANGE category_path category_path VARCHAR(255) DEFAULT NULL');
$this->addSql('ALTER TABLE private_community CHANGE business_establishment_year business_establishment_year BIGINT NOT NULL, CHANGE annual_revenue annual_revenue BIGINT DEFAULT NULL, CHANGE num_of_active_clients num_of_active_clients BIGINT DEFAULT NULL, CHANGE avg_project_budget avg_project_budget BIGINT DEFAULT NULL, CHANGE contact_country_2 contact_country_2 BIGINT DEFAULT NULL, CHANGE contact_country_3 contact_country_3 BIGINT DEFAULT NULL, CHANGE contact_bod_1 contact_bod_1 VARCHAR(100) DEFAULT NULL, CHANGE contact_bod_2 contact_bod_2 VARCHAR(100) DEFAULT NULL, CHANGE contact_bod_3 contact_bod_3 VARCHAR(100) DEFAULT NULL');
$this->addSql('ALTER TABLE purchasing_groups CHANGE area area VARCHAR(255) DEFAULT NULL, CHANGE status status VARCHAR(255) DEFAULT NULL, CHANGE updated_at updated_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\'');
$this->addSql('ALTER TABLE rating_criterias CHANGE description description TEXT DEFAULT NULL');
$this->addSql('DROP INDEX UNIQ_F2907AA1989D9B62 ON resource_directory_categories');
$this->addSql('ALTER TABLE resource_directory_categories CHANGE name name VARCHAR(255) NOT NULL, CHANGE slug slug VARCHAR(255) NOT NULL, CHANGE sort_order sort_order INT NOT NULL, CHANGE status status TINYINT(1) DEFAULT 1 NOT NULL, CHANGE created_at created_at DATETIME DEFAULT NULL, CHANGE updated_at updated_at DATETIME DEFAULT NULL, CHANGE deleted_at deleted_at DATETIME DEFAULT NULL, CHANGE category_path category_path VARCHAR(255) DEFAULT NULL');
$this->addSql('ALTER TABLE resource_rating CHANGE ratings ratings DOUBLE PRECISION DEFAULT NULL, CHANGE comment comment TEXT DEFAULT NULL, CHANGE created_at created_at DATETIME DEFAULT NULL, CHANGE updated_at updated_at DATETIME DEFAULT NULL, CHANGE deleted_at deleted_at DATETIME DEFAULT NULL');
$this->addSql('ALTER TABLE resource_reviews CHANGE review_information review_information TEXT DEFAULT NULL, CHANGE avgerage_rating avgerage_rating NUMERIC(10, 2) DEFAULT NULL, CHANGE created_at created_at DATETIME DEFAULT NULL, CHANGE updated_at updated_at DATETIME DEFAULT NULL, CHANGE deleted_at deleted_at DATETIME DEFAULT NULL');
$this->addSql('ALTER TABLE resource_types CHANGE type type VARCHAR(255) NOT NULL, CHANGE is_active is_active TINYINT(1) DEFAULT 1 NOT NULL, CHANGE created_at created_at DATETIME DEFAULT NULL, CHANGE updated_at updated_at DATETIME DEFAULT NULL, CHANGE deleted_at deleted_at DATETIME DEFAULT NULL');
$this->addSql('ALTER TABLE resources CHANGE is_residential is_residential TINYINT(1) DEFAULT NULL COMMENT \'1->Residential
2->Commercial
3->Both\', CHANGE state state INT DEFAULT NULL, CHANGE is_published is_published TINYINT(1) NOT NULL COMMENT \'1=>residential, 2=>commercial\', CHANGE preferred_communication preferred_communication VARCHAR(255) DEFAULT NULL');
$this->addSql('ALTER TABLE roles CHANGE parent_id parent_id INT DEFAULT NULL, CHANGE is_admin is_admin TINYINT(1) NOT NULL COMMENT \'0=>is not admin, 1=>is admin\'');
$this->addSql('ALTER TABLE saved_items CHANGE folder_name folder_name VARCHAR(255) DEFAULT \' \', CHANGE related_id related_id INT DEFAULT 0');
$this->addSql('ALTER TABLE schedule_notifications CHANGE type type INT DEFAULT NULL COMMENT \'1 = Post Liked, 2 = User Followed, 3 = Comment / Reply on Post, 4 = Comment / Reply Like, 5 = Comment / Reply on post to post followers\', CHANGE reference_id reference_id INT DEFAULT NULL COMMENT \'This will be post id for now.\', CHANGE owner_id owner_id INT DEFAULT NULL, CHANGE from_user_id from_user_id INT DEFAULT NULL, CHANGE flag_sent flag_sent INT DEFAULT 0 NOT NULL COMMENT \'0 = Not Sent (default 0), 1 = Sent\', CHANGE is_picked is_picked SMALLINT DEFAULT 0, CHANGE created_on created_on DATETIME DEFAULT NULL, CHANGE comment_id comment_id INT DEFAULT 0 COMMENT \'This will be comment id on which user has liked or posted comments.\'');
$this->addSql('ALTER TABLE showroom_additional_details CHANGE user_id user_id INT NOT NULL, CHANGE is_primary is_primary TINYINT(1) NOT NULL');
$this->addSql('ALTER TABLE showroom_details CHANGE state state BIGINT DEFAULT NULL, CHANGE country country BIGINT NOT NULL');
$this->addSql('ALTER TABLE states MODIFY id INT NOT NULL');
$this->addSql('DROP INDEX `primary` ON states');
$this->addSql('ALTER TABLE states CHANGE id id INT NOT NULL, CHANGE name name VARCHAR(30) NOT NULL, CHANGE slug slug VARCHAR(150) DEFAULT NULL, CHANGE country_id country_id INT DEFAULT 1 NOT NULL, CHANGE status status INT DEFAULT 1 NOT NULL, CHANGE deleted_at deleted_at DATETIME DEFAULT NULL');
$this->addSql('ALTER TABLE subscribe CHANGE status status CHAR(2) DEFAULT \'1\' NOT NULL');
$this->addSql('ALTER TABLE subscription_plans CHANGE name name VARCHAR(255) DEFAULT NULL, CHANGE duration duration VARCHAR(255) DEFAULT NULL, CHANGE type type VARCHAR(255) DEFAULT NULL COMMENT \'(Yearly/monthly)\', CHANGE price price DOUBLE PRECISION DEFAULT NULL, CHANGE description description TEXT DEFAULT NULL, CHANGE created_at created_at DATETIME DEFAULT NULL, CHANGE updated_at updated_at DATETIME DEFAULT NULL, CHANGE deleted_at deleted_at DATETIME DEFAULT NULL, CHANGE stripe_subscription_id stripe_subscription_id VARCHAR(255) DEFAULT NULL, CHANGE subscription_type subscription_type VARCHAR(255) DEFAULT \'premium-services\' NOT NULL, CHANGE trial_period trial_period INT DEFAULT 0 NOT NULL');
$this->addSql('ALTER TABLE subscription_transactions CHANGE amount amount NUMERIC(10, 0) DEFAULT NULL, CHANGE subscription_id subscription_id INT NOT NULL, CHANGE other_info other_info VARCHAR(255) DEFAULT NULL, CHANGE status status VARCHAR(111) DEFAULT NULL, CHANGE type type VARCHAR(255) DEFAULT \'premium-services\', CHANGE created_at created_at DATETIME DEFAULT NULL, CHANGE updated_at updated_at DATETIME DEFAULT NULL, CHANGE start_date start_date DATETIME DEFAULT NULL, CHANGE end_date end_date DATETIME DEFAULT NULL, CHANGE deleted_at deleted_at DATETIME DEFAULT NULL, CHANGE brand brand VARCHAR(11) DEFAULT NULL, CHANGE last_4_digit last_4_digit VARCHAR(11) DEFAULT NULL');
$this->addSql('ALTER TABLE subscriptions ADD card_id INT DEFAULT NULL, CHANGE subscription_type subscription_type VARCHAR(255) DEFAULT \'premium-services\', CHANGE created_at created_at DATETIME DEFAULT NULL, CHANGE updated_at updated_at DATETIME DEFAULT NULL, CHANGE deleted_at deleted_at DATETIME DEFAULT NULL');
$this->addSql('ALTER TABLE suppliers CHANGE area area VARCHAR(255) DEFAULT NULL, CHANGE status status VARCHAR(255) DEFAULT NULL, CHANGE updated_at updated_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\'');
$this->addSql('ALTER TABLE trash_direct_messages CHANGE user_id user_id INT DEFAULT NULL, CHANGE dm_id dm_id INT DEFAULT NULL, CHANGE created_at created_at DATETIME DEFAULT NULL');
$this->addSql('ALTER TABLE user CHANGE firstname firstname VARCHAR(255) DEFAULT NULL, CHANGE lastname lastname VARCHAR(255) DEFAULT NULL, CHANGE phone phone VARCHAR(255) DEFAULT NULL, CHANGE timezone timezone VARCHAR(255) DEFAULT NULL, CHANGE user_type user_type VARCHAR(200) DEFAULT NULL COMMENT \'0 => backend, 1 => frontend\', CHANGE user_role_type user_role_type VARCHAR(255) DEFAULT NULL, CHANGE city city VARCHAR(255) DEFAULT NULL, CHANGE styles styles TEXT DEFAULT NULL, CHANGE state state VARCHAR(255) DEFAULT NULL, CHANGE parent_id parent_id INT DEFAULT NULL, CHANGE birth_year birth_year VARCHAR(100) DEFAULT NULL, CHANGE stripe_customer_id stripe_customer_id VARCHAR(100) DEFAULT NULL COMMENT \'stripe customer id\', CHANGE is_subscription_cancelled is_subscription_cancelled INT DEFAULT 0, CHANGE subscription_expire_at subscription_expire_at DATETIME DEFAULT NULL, CHANGE is_private is_private INT DEFAULT NULL');
$this->addSql('CREATE UNIQUE INDEX username ON user (username)');
$this->addSql('ALTER TABLE user_ads CHANGE tag tag LONGTEXT DEFAULT NULL');
$this->addSql('ALTER TABLE user_ads_data CHANGE title title VARCHAR(255) DEFAULT NULL, CHANGE status status VARCHAR(255) DEFAULT NULL, CHANGE deleted_at deleted_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\'');
$this->addSql('ALTER TABLE user_cards CHANGE card_name card_name VARCHAR(255) NOT NULL, CHANGE card_id card_id VARCHAR(255) DEFAULT NULL, CHANGE last_4_digits last_4_digits INT DEFAULT NULL, CHANGE exp_month exp_month INT DEFAULT NULL, CHANGE exp_year exp_year INT DEFAULT NULL, CHANGE is_default is_default VARCHAR(255) CHARACTER SET latin1 DEFAULT \'No\' COLLATE `latin1_swedish_ci`, CHANGE created_at created_at DATETIME DEFAULT NULL, CHANGE updated_at updated_at DATETIME DEFAULT NULL, CHANGE deleted_at deleted_at DATETIME DEFAULT NULL');
}
}