<?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 Version20211201162548 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->abortIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('CREATE TABLE apartment (id INT AUTO_INCREMENT NOT NULL, entrance_id INT DEFAULT NULL, name VARCHAR(255) CHARACTER SET utf8 NOT NULL COLLATE `utf8_unicode_ci`, customer_data JSON DEFAULT NULL, placement_data JSON DEFAULT NULL, building VARCHAR(255) CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_unicode_ci`, floor VARCHAR(255) CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_unicode_ci`, number VARCHAR(255) CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_unicode_ci`, name_to_display VARCHAR(255) CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_unicode_ci`, guidance VARCHAR(255) CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_unicode_ci`, description VARCHAR(255) CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_unicode_ci`, type VARCHAR(255) CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_unicode_ci`, logo_name VARCHAR(255) CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_unicode_ci`, logo_storage_name VARCHAR(255) CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_unicode_ci`, logo_orientation VARCHAR(255) CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_unicode_ci`, signage_integration TINYINT(1) DEFAULT NULL, INDEX IDX_4D7E685492458494 (entrance_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('CREATE TABLE cat_set (category_set_id INT NOT NULL, picture_category_id INT NOT NULL, INDEX IDX_62F3F0CC1F13C763 (category_set_id), INDEX IDX_62F3F0CC8C0ED801 (picture_category_id), PRIMARY KEY(category_set_id, picture_category_id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('CREATE TABLE category_set (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(191) CHARACTER SET utf8 NOT NULL COLLATE `utf8_unicode_ci`, UNIQUE INDEX UNIQ_C3D688865E237E06 (name), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('CREATE TABLE entrance (id INT AUTO_INCREMENT NOT NULL, residence_id INT DEFAULT NULL, name VARCHAR(255) CHARACTER SET utf8 NOT NULL COLLATE `utf8_unicode_ci`, polling_frequency INT DEFAULT NULL, grid_rows INT DEFAULT NULL, grid_columns INT DEFAULT NULL, grid_modules_list JSON DEFAULT NULL, specific_modules_config TINYINT(1) NOT NULL, exchange_host VARCHAR(255) CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_unicode_ci`, exchange_login VARCHAR(255) CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_unicode_ci`, exchange_pass VARCHAR(255) CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_unicode_ci`, exchange_calendar_content JSON DEFAULT NULL, update_token INT NOT NULL, wifi_enabled TINYINT(1) NOT NULL, enable_exchange_calendar TINYINT(1) NOT NULL, wifi_ssid VARCHAR(255) CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_unicode_ci`, wifi_passphrase VARCHAR(255) CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_unicode_ci`, customer_data JSON DEFAULT NULL, placement_feature_activated TINYINT(1) NOT NULL, INDEX IDX_87DA61898B225FBD (residence_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('CREATE TABLE external_link (id INT AUTO_INCREMENT NOT NULL, organization_id INT DEFAULT NULL, title VARCHAR(255) CHARACTER SET utf8 NOT NULL COLLATE `utf8_unicode_ci`, color VARCHAR(255) CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_unicode_ci`, description VARCHAR(255) CHARACTER SET utf8 NOT NULL COLLATE `utf8_unicode_ci`, link VARCHAR(255) CHARACTER SET utf8 NOT NULL COLLATE `utf8_unicode_ci`, INDEX IDX_A3B3F9DD32C8A3DE (organization_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('CREATE TABLE fcm_device_group (id INT AUTO_INCREMENT NOT NULL, user_id INT DEFAULT NULL, notification_key VARCHAR(255) CHARACTER SET utf8 NOT NULL COLLATE `utf8_unicode_ci`, UNIQUE INDEX UNIQ_1065FF57A76ED395 (user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('CREATE TABLE fcm_device_token (id INT AUTO_INCREMENT NOT NULL, device_group_id INT DEFAULT NULL, token VARCHAR(255) CHARACTER SET utf8 NOT NULL COLLATE `utf8_unicode_ci`, device_name VARCHAR(255) CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_unicode_ci`, creation_date DATETIME NOT NULL, INDEX IDX_22921AA970608067 (device_group_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('CREATE TABLE feature_configuration (id INT AUTO_INCREMENT NOT NULL, organization_id INT DEFAULT NULL, feature_id VARCHAR(255) CHARACTER SET utf8 NOT NULL COLLATE `utf8_unicode_ci`, configuration JSON DEFAULT NULL, INDEX IDX_CC5C029F32C8A3DE (organization_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('CREATE TABLE import (id INT AUTO_INCREMENT NOT NULL, organization_id INT DEFAULT NULL, reference VARCHAR(255) CHARACTER SET utf8 NOT NULL COLLATE `utf8_unicode_ci`, creation_date DATETIME NOT NULL, validation_date DATETIME DEFAULT NULL, original_file_storage_name VARCHAR(255) CHARACTER SET utf8 NOT NULL COLLATE `utf8_unicode_ci`, original_file_name VARCHAR(255) CHARACTER SET utf8 NOT NULL COLLATE `utf8_unicode_ci`, data_to_import LONGTEXT CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_unicode_ci` COMMENT \'(DC2Type:array)\', configuration JSON DEFAULT NULL, state VARCHAR(255) CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_unicode_ci`, INDEX IDX_9D4ECE1D32C8A3DE (organization_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('CREATE TABLE landlords_residences (residence_id INT NOT NULL, user_id INT NOT NULL, INDEX IDX_1E6E72A78B225FBD (residence_id), INDEX IDX_1E6E72A7A76ED395 (user_id), PRIMARY KEY(residence_id, user_id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('CREATE TABLE message_target (id INT AUTO_INCREMENT NOT NULL, residence_id INT DEFAULT NULL, entrance_id INT DEFAULT NULL, public_message_id INT DEFAULT NULL, public_page_id INT DEFAULT NULL, INDEX IDX_7148B2F357983C56 (public_page_id), INDEX IDX_7148B2F38B225FBD (residence_id), INDEX IDX_7148B2F392458494 (entrance_id), INDEX IDX_7148B2F3C9E88744 (public_message_id), UNIQUE INDEX message_target_unicity_contraint (residence_id, entrance_id, public_message_id, public_page_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('CREATE TABLE moderation_event (id INT AUTO_INCREMENT NOT NULL, public_message_id INT DEFAULT NULL, public_page_id INT DEFAULT NULL, moderator_id INT DEFAULT NULL, date DATETIME NOT NULL, publication_status VARCHAR(255) CHARACTER SET utf8 DEFAULT \'waiting\' COLLATE `utf8_unicode_ci`, INDEX IDX_C8F4ED3357983C56 (public_page_id), INDEX IDX_C8F4ED33C9E88744 (public_message_id), INDEX IDX_C8F4ED33D0AFA354 (moderator_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('CREATE TABLE notification (id INT AUTO_INCREMENT NOT NULL, recipient_id INT DEFAULT NULL, concerned_user_id INT DEFAULT NULL, concerned_document_id INT DEFAULT NULL, date DATETIME NOT NULL, message VARCHAR(255) CHARACTER SET utf8 NOT NULL COLLATE `utf8_unicode_ci`, type VARCHAR(255) CHARACTER SET utf8 NOT NULL COLLATE `utf8_unicode_ci`, details VARCHAR(255) CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_unicode_ci`, status INT DEFAULT NULL, INDEX IDX_BF5476CA5880D9EB (concerned_user_id), INDEX IDX_BF5476CAA8B71BA1 (concerned_document_id), INDEX IDX_BF5476CAE92F8F78 (recipient_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('CREATE TABLE organization (id INT AUTO_INCREMENT NOT NULL, category_set_id INT DEFAULT NULL, corporate_name VARCHAR(255) CHARACTER SET utf8 NOT NULL COLLATE `utf8_unicode_ci`, phone_number VARCHAR(255) CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_unicode_ci`, adress_email VARCHAR(255) CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_unicode_ci`, title_url VARCHAR(255) CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_unicode_ci`, url VARCHAR(255) CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_unicode_ci`, last_receipt_filename VARCHAR(255) CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_unicode_ci`, last_receipt_date DATETIME DEFAULT NULL, last_regul_charges_filename VARCHAR(255) CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_unicode_ci`, last_regul_charges_date DATETIME DEFAULT NULL, sepa_model_filename VARCHAR(255) CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_unicode_ci`, isAdminInterfaceVisible TINYINT(1) DEFAULT \'0\' NOT NULL, address VARCHAR(255) CHARACTER SET utf8 NOT NULL COLLATE `utf8_unicode_ci`, city VARCHAR(255) CHARACTER SET utf8 NOT NULL COLLATE `utf8_unicode_ci`, zipcode VARCHAR(255) CHARACTER SET utf8 NOT NULL COLLATE `utf8_unicode_ci`, screen_width INT NOT NULL, screen_height INT NOT NULL, active_interface TINYINT(1) DEFAULT \'0\' NOT NULL, screen_bg_name VARCHAR(255) CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_unicode_ci`, screen_bg_updated_at DATETIME DEFAULT NULL, pages_bg_name VARCHAR(255) CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_unicode_ci`, pages_bg_updated_at DATETIME DEFAULT NULL, logo_name VARCHAR(255) CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_unicode_ci`, logo_updated_at DATETIME DEFAULT NULL, type VARCHAR(255) CHARACTER SET utf8 DEFAULT \'real_estate\' COLLATE `utf8_unicode_ci`, color_set LONGTEXT CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_unicode_ci` COMMENT \'(DC2Type:object)\', corporate_logo_name VARCHAR(255) CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_unicode_ci`, corporate_logo_storage_name VARCHAR(255) CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_unicode_ci`, firebase_api_key VARCHAR(255) CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_unicode_ci`, firebase_sender_id VARCHAR(255) CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_unicode_ci`, default_grid_rows INT DEFAULT NULL, default_grid_columns INT DEFAULT NULL, default_grid_modules_list JSON DEFAULT NULL, specific_modules_config TINYINT(1) NOT NULL, INDEX IDX_C1EE637C1F13C763 (category_set_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('CREATE TABLE partner_client (id INT AUTO_INCREMENT NOT NULL, organization_id INT DEFAULT NULL, name VARCHAR(255) CHARACTER SET utf8 NOT NULL COLLATE `utf8_unicode_ci`, description LONGTEXT CHARACTER SET utf8 NOT NULL COLLATE `utf8_unicode_ci`, INDEX IDX_FA8FAD2E32C8A3DE (organization_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('CREATE TABLE picture (id INT AUTO_INCREMENT NOT NULL, uploader_id INT DEFAULT NULL, picture_category_id INT DEFAULT NULL, nb_of_use INT NOT NULL, picture_name VARCHAR(255) CHARACTER SET utf8 NOT NULL COLLATE `utf8_unicode_ci`, updated_at DATETIME NOT NULL, INDEX IDX_16DB4F8916678C77 (uploader_id), INDEX IDX_16DB4F898C0ED801 (picture_category_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('CREATE TABLE picture_category (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(255) CHARACTER SET utf8 NOT NULL COLLATE `utf8_unicode_ci`, UNIQUE INDEX UNIQ_6E8C8CCD5E237E06 (name), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('CREATE TABLE private_message (id INT AUTO_INCREMENT NOT NULL, sender_id INT DEFAULT NULL, sending_date_time DATETIME DEFAULT NULL, screen_readable TINYINT(1) NOT NULL, attachment_file_storage_name VARCHAR(255) CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_unicode_ci`, attachment_file_name VARCHAR(255) CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_unicode_ci`, subject VARCHAR(85) CHARACTER SET utf8 NOT NULL COLLATE `utf8_unicode_ci`, content VARCHAR(500) CHARACTER SET utf8 NOT NULL COLLATE `utf8_unicode_ci`, INDEX IDX_4744FC9BF624B39D (sender_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('CREATE TABLE private_message_receiver (id INT AUTO_INCREMENT NOT NULL, receiver_id INT DEFAULT NULL, private_message_id INT DEFAULT NULL, reading_date_time DATETIME DEFAULT NULL, INDEX IDX_51657FAE5EBFB95E (private_message_id), INDEX IDX_51657FAECD53EDB6 (receiver_id), UNIQUE INDEX message_once_per_receiver (receiver_id, private_message_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('CREATE TABLE public_message (id INT AUTO_INCREMENT NOT NULL, sender_id INT DEFAULT NULL, start_display_date DATETIME NOT NULL, stop_display_date DATETIME DEFAULT NULL, creation_date DATETIME NOT NULL, important TINYINT(1) NOT NULL, subject VARCHAR(85) CHARACTER SET utf8 NOT NULL COLLATE `utf8_unicode_ci`, content VARCHAR(500) CHARACTER SET utf8 NOT NULL COLLATE `utf8_unicode_ci`, INDEX IDX_ED636FCDF624B39D (sender_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('CREATE TABLE public_page (id INT AUTO_INCREMENT NOT NULL, creator_id INT DEFAULT NULL, video_id INT DEFAULT NULL, name VARCHAR(255) CHARACTER SET utf8 NOT NULL COLLATE `utf8_unicode_ci`, content JSON NOT NULL, preview_name VARCHAR(255) CHARACTER SET utf8 NOT NULL COLLATE `utf8_unicode_ci`, preview_updated_at DATETIME NOT NULL, start_display_date DATETIME NOT NULL, stop_display_date DATETIME DEFAULT NULL, creation_date DATETIME NOT NULL, sliding_duration SMALLINT NOT NULL, INDEX IDX_6F57F4F129C1004E (video_id), INDEX IDX_6F57F4F161220EA6 (creator_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('CREATE TABLE publication_background (id INT AUTO_INCREMENT NOT NULL, uploader_id INT DEFAULT NULL, organization_id INT DEFAULT NULL, name VARCHAR(255) CHARACTER SET utf8 NOT NULL COLLATE `utf8_unicode_ci`, storage_name VARCHAR(255) CHARACTER SET utf8 NOT NULL COLLATE `utf8_unicode_ci`, upload_date DATETIME NOT NULL, INDEX IDX_D21FF1B116678C77 (uploader_id), INDEX IDX_D21FF1B132C8A3DE (organization_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('CREATE TABLE residence (id INT AUTO_INCREMENT NOT NULL, organization_id INT DEFAULT NULL, name VARCHAR(255) CHARACTER SET utf8 NOT NULL COLLATE `utf8_unicode_ci`, name_to_display VARCHAR(255) CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_unicode_ci`, address VARCHAR(255) CHARACTER SET utf8 NOT NULL COLLATE `utf8_unicode_ci`, city VARCHAR(255) CHARACTER SET utf8 NOT NULL COLLATE `utf8_unicode_ci`, zipcode VARCHAR(255) CHARACTER SET utf8 NOT NULL COLLATE `utf8_unicode_ci`, latitude DOUBLE PRECISION DEFAULT NULL, longitude DOUBLE PRECISION DEFAULT NULL, has_socialad TINYINT(1) NOT NULL, has_incident TINYINT(1) NOT NULL, has_private_message TINYINT(1) NOT NULL, electric_service_email VARCHAR(255) CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_unicode_ci`, plumbing_service_email VARCHAR(255) CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_unicode_ci`, gaz_service_email VARCHAR(255) CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_unicode_ci`, heating_service_email VARCHAR(255) CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_unicode_ci`, intercom_service_email VARCHAR(255) CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_unicode_ci`, tv_service_email VARCHAR(255) CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_unicode_ci`, customer_data JSON DEFAULT NULL, default_grid_rows INT DEFAULT NULL, default_grid_columns INT DEFAULT NULL, default_grid_modules_list JSON DEFAULT NULL, specific_modules_config JSON DEFAULT NULL, INDEX IDX_327582332C8A3DE (organization_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('CREATE TABLE resident_document (id INT AUTO_INCREMENT NOT NULL, owner_id INT DEFAULT NULL, self_uploaded_document TINYINT(1) NOT NULL, public_name VARCHAR(255) CHARACTER SET utf8 NOT NULL COLLATE `utf8_unicode_ci`, storage_name VARCHAR(255) CHARACTER SET utf8 NOT NULL COLLATE `utf8_unicode_ci`, description VARCHAR(255) CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_unicode_ci`, updated_at DATETIME NOT NULL, type INT DEFAULT NULL, document_approved TINYINT(1) DEFAULT NULL, approval_decision_date DATETIME DEFAULT NULL, INDEX IDX_9CCED7907E3C61F9 (owner_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('CREATE TABLE setting (id INT AUTO_INCREMENT NOT NULL, setting_key VARCHAR(255) CHARACTER SET utf8 NOT NULL COLLATE `utf8_unicode_ci`, setting_value JSON NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('CREATE TABLE social_ad_babysitting (id INT NOT NULL, min_children_age INT NOT NULL, max_children_age INT NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('CREATE TABLE social_ad_base (id INT AUTO_INCREMENT NOT NULL, public_message_id INT DEFAULT NULL, status TINYINT(1) NOT NULL, days_in_week JSON NOT NULL COMMENT \'(DC2Type:json)\', start_time TIME DEFAULT NULL, end_time TIME DEFAULT NULL, recurrent TINYINT(1) NOT NULL, is_offer TINYINT(1) NOT NULL, subtype VARCHAR(255) CHARACTER SET utf8 NOT NULL COLLATE `utf8_unicode_ci`, UNIQUE INDEX UNIQ_F7007999C9E88744 (public_message_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('CREATE TABLE social_ad_carsharing (id INT NOT NULL, destination VARCHAR(255) CHARACTER SET utf8 NOT NULL COLLATE `utf8_unicode_ci`, seat_number INT NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('CREATE TABLE social_ad_cleaning (id INT NOT NULL, categories JSON NOT NULL COMMENT \'(DC2Type:json)\', PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('CREATE TABLE social_ad_petsitting (id INT NOT NULL, pet_types JSON NOT NULL COMMENT \'(DC2Type:json)\', PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('CREATE TABLE social_ad_repair (id INT NOT NULL, categories JSON NOT NULL COMMENT \'(DC2Type:json)\', PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('CREATE TABLE social_ad_tutoring (id INT NOT NULL, disciplines JSON NOT NULL COMMENT \'(DC2Type:json)\', levels JSON NOT NULL COMMENT \'(DC2Type:json)\', PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('CREATE TABLE thin_client (id INT AUTO_INCREMENT NOT NULL, entrance_id INT DEFAULT NULL, mac_address VARCHAR(255) CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_unicode_ci`, name VARCHAR(255) CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_unicode_ci`, ip_address VARCHAR(255) CHARACTER SET utf8 NOT NULL COLLATE `utf8_unicode_ci`, ip_vpn VARCHAR(255) CHARACTER SET utf8 NOT NULL COLLATE `utf8_unicode_ci`, disable_upgrades TINYINT(1) NOT NULL, update_to_version VARCHAR(255) CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_unicode_ci`, need_config_update TINYINT(1) NOT NULL, software_version VARCHAR(255) CHARACTER SET utf8 NOT NULL COLLATE `utf8_unicode_ci`, hardware_id VARCHAR(255) CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_unicode_ci`, software_id VARCHAR(255) CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_unicode_ci`, token VARCHAR(255) CHARACTER SET utf8 NOT NULL COLLATE `utf8_unicode_ci`, last_consumption_reset DATETIME DEFAULT NULL, last_screenshot_name VARCHAR(255) CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_unicode_ci`, last_screenshot_updated_at DATETIME DEFAULT NULL, last_known_status INT DEFAULT NULL, last_status_update DATETIME DEFAULT NULL, last_unreachable_alert DATETIME DEFAULT NULL, data_consumption INT DEFAULT NULL, router VARCHAR(255) CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_unicode_ci`, imsi VARCHAR(255) CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_unicode_ci`, UNIQUE INDEX UNIQ_71F66DC792458494 (entrance_id), UNIQUE INDEX UNIQ_71F66DC7C9CC762B (hardware_id), UNIQUE INDEX UNIQ_71F66DC7D7452741 (software_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('CREATE TABLE thinclient_command (id INT AUTO_INCREMENT NOT NULL, thinclient_id INT DEFAULT NULL, operation VARCHAR(255) CHARACTER SET utf8 NOT NULL COLLATE `utf8_unicode_ci`, args JSON DEFAULT NULL COMMENT \'(DC2Type:json)\', date_asked DATETIME DEFAULT NULL, date_success DATETIME DEFAULT NULL, status INT DEFAULT NULL, INDEX IDX_76159D324032AB97 (thinclient_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('CREATE TABLE useful_number (id INT AUTO_INCREMENT NOT NULL, title VARCHAR(255) CHARACTER SET utf8 NOT NULL COLLATE `utf8_unicode_ci`, type VARCHAR(255) CHARACTER SET utf8 NOT NULL COLLATE `utf8_unicode_ci`, contact VARCHAR(255) CHARACTER SET utf8 NOT NULL COLLATE `utf8_unicode_ci`, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('CREATE TABLE useful_number_residence (useful_number_id INT NOT NULL, residence_id INT NOT NULL, INDEX IDX_8B5C94A2805D9428 (useful_number_id), INDEX IDX_8B5C94A28B225FBD (residence_id), PRIMARY KEY(useful_number_id, residence_id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('CREATE TABLE video (id INT AUTO_INCREMENT NOT NULL, uploader_id INT DEFAULT NULL, name VARCHAR(255) CHARACTER SET utf8 NOT NULL COLLATE `utf8_unicode_ci`, video_name VARCHAR(255) CHARACTER SET utf8 NOT NULL COLLATE `utf8_unicode_ci`, video_uniqid VARCHAR(255) CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_unicode_ci`, upload_id VARCHAR(255) CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_unicode_ci`, resumed_upload TINYINT(1) NOT NULL, size INT NOT NULL, video_status INT NOT NULL, video_transcode_percentage INT NOT NULL, video_preview VARCHAR(255) CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_unicode_ci`, INDEX IDX_7CC7DA2C16678C77 (uploader_id), UNIQUE INDEX UNIQ_7CC7DA2C19859B71 (video_uniqid), UNIQUE INDEX UNIQ_7CC7DA2CCCCFBA31 (upload_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('CREATE TABLE weeke_user (id INT AUTO_INCREMENT NOT NULL, apartment_id INT DEFAULT NULL, family_apartment_id INT DEFAULT NULL, family_link_document_id INT DEFAULT NULL, organization_id INT DEFAULT NULL, username VARCHAR(255) CHARACTER SET utf8 NOT NULL COLLATE `utf8_unicode_ci`, username_canonical VARCHAR(255) CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_unicode_ci`, enabled TINYINT(1) NOT NULL, last_login DATETIME DEFAULT NULL, password VARCHAR(255) CHARACTER SET utf8 NOT NULL COLLATE `utf8_unicode_ci`, first_name VARCHAR(255) CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_unicode_ci`, last_name VARCHAR(255) CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_unicode_ci`, roles LONGTEXT CHARACTER SET utf8 NOT NULL COLLATE `utf8_unicode_ci` COMMENT \'(DC2Type:array)\', notif_types JSON DEFAULT NULL, cellphone VARCHAR(255) CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_unicode_ci`, tenant_number VARCHAR(255) CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_unicode_ci`, family_link VARCHAR(255) CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_unicode_ci`, maturity_insurance_date DATETIME DEFAULT NULL, last_insurance_reminder DATETIME DEFAULT NULL, enabled_quittance_paper_receipt TINYINT(1) NOT NULL, client_ref VARCHAR(255) CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_unicode_ci`, email VARCHAR(255) CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_unicode_ci`, email_canonical VARCHAR(255) CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_unicode_ci`, INDEX IDX_BEFC4B1A32C8A3DE (organization_id), INDEX IDX_BEFC4B1AA0102B18 (family_apartment_id), UNIQUE INDEX UNIQ_BEFC4B1A176DFE85 (apartment_id), UNIQUE INDEX UNIQ_BEFC4B1A5431B52 (family_link_document_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('CREATE TABLE weeke_user_group (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(255) CHARACTER SET utf8 NOT NULL COLLATE `utf8_unicode_ci`, roles LONGTEXT CHARACTER SET utf8 NOT NULL COLLATE `utf8_unicode_ci` COMMENT \'(DC2Type:array)\', PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('CREATE TABLE weeke_user_user_group (user_id INT NOT NULL, group_id INT NOT NULL, INDEX IDX_75F4DBE6A76ED395 (user_id), INDEX IDX_75F4DBE6FE54D947 (group_id), PRIMARY KEY(user_id, group_id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('ALTER TABLE apartment ADD CONSTRAINT FK_4D7E685492458494 FOREIGN KEY (entrance_id) REFERENCES entrance (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE cat_set ADD CONSTRAINT FK_62F3F0CC1F13C763 FOREIGN KEY (category_set_id) REFERENCES category_set (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE cat_set ADD CONSTRAINT FK_62F3F0CC8C0ED801 FOREIGN KEY (picture_category_id) REFERENCES picture_category (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE entrance ADD CONSTRAINT FK_87DA61898B225FBD FOREIGN KEY (residence_id) REFERENCES residence (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE external_link ADD CONSTRAINT FK_A3B3F9DD32C8A3DE FOREIGN KEY (organization_id) REFERENCES organization (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE fcm_device_group ADD CONSTRAINT FK_1065FF57A76ED395 FOREIGN KEY (user_id) REFERENCES weeke_user (id)');
$this->addSql('ALTER TABLE fcm_device_token ADD CONSTRAINT FK_22921AA970608067 FOREIGN KEY (device_group_id) REFERENCES fcm_device_group (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE feature_configuration ADD CONSTRAINT FK_CC5C029F32C8A3DE FOREIGN KEY (organization_id) REFERENCES organization (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE import ADD CONSTRAINT FK_9D4ECE1D32C8A3DE FOREIGN KEY (organization_id) REFERENCES organization (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE message_target ADD CONSTRAINT FK_7148B2F38B225FBD FOREIGN KEY (residence_id) REFERENCES residence (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE message_target ADD CONSTRAINT FK_7148B2F392458494 FOREIGN KEY (entrance_id) REFERENCES entrance (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE message_target ADD CONSTRAINT FK_7148B2F3C9E88744 FOREIGN KEY (public_message_id) REFERENCES public_message (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE message_target ADD CONSTRAINT FK_7148B2F357983C56 FOREIGN KEY (public_page_id) REFERENCES public_page (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE moderation_event CHANGE publication_status publication_status ENUM( \'waiting\', \'accepted\', \'rejected\') DEFAULT \'waiting\' ');
$this->addSql('ALTER TABLE moderation_event ADD CONSTRAINT FK_C8F4ED33C9E88744 FOREIGN KEY (public_message_id) REFERENCES public_message (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE moderation_event ADD CONSTRAINT FK_C8F4ED3357983C56 FOREIGN KEY (public_page_id) REFERENCES public_page (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE moderation_event ADD CONSTRAINT FK_C8F4ED33D0AFA354 FOREIGN KEY (moderator_id) REFERENCES weeke_user (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE notification ADD CONSTRAINT FK_BF5476CAE92F8F78 FOREIGN KEY (recipient_id) REFERENCES weeke_user (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE notification ADD CONSTRAINT FK_BF5476CA5880D9EB FOREIGN KEY (concerned_user_id) REFERENCES weeke_user (id)');
$this->addSql('ALTER TABLE notification ADD CONSTRAINT FK_BF5476CAA8B71BA1 FOREIGN KEY (concerned_document_id) REFERENCES resident_document (id)');
$this->addSql('ALTER TABLE organization CHANGE type type ENUM( \'real_estate\', \'cityhall\') DEFAULT \'real_estate\' ');
$this->addSql('ALTER TABLE organization ADD CONSTRAINT FK_C1EE637C1F13C763 FOREIGN KEY (category_set_id) REFERENCES category_set (id)');
$this->addSql('ALTER TABLE partner_client ADD CONSTRAINT FK_FA8FAD2E32C8A3DE FOREIGN KEY (organization_id) REFERENCES organization (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE picture ADD CONSTRAINT FK_16DB4F8916678C77 FOREIGN KEY (uploader_id) REFERENCES weeke_user (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE picture ADD CONSTRAINT FK_16DB4F898C0ED801 FOREIGN KEY (picture_category_id) REFERENCES picture_category (id)');
$this->addSql('ALTER TABLE private_message ADD CONSTRAINT FK_4744FC9BF624B39D FOREIGN KEY (sender_id) REFERENCES weeke_user (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE private_message_receiver ADD CONSTRAINT FK_51657FAECD53EDB6 FOREIGN KEY (receiver_id) REFERENCES weeke_user (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE private_message_receiver ADD CONSTRAINT FK_51657FAE5EBFB95E FOREIGN KEY (private_message_id) REFERENCES private_message (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE public_message ADD CONSTRAINT FK_ED636FCDF624B39D FOREIGN KEY (sender_id) REFERENCES weeke_user (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE public_page ADD CONSTRAINT FK_6F57F4F161220EA6 FOREIGN KEY (creator_id) REFERENCES weeke_user (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE public_page ADD CONSTRAINT FK_6F57F4F129C1004E FOREIGN KEY (video_id) REFERENCES video (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE publication_background ADD CONSTRAINT FK_D21FF1B116678C77 FOREIGN KEY (uploader_id) REFERENCES weeke_user (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE publication_background ADD CONSTRAINT FK_D21FF1B132C8A3DE FOREIGN KEY (organization_id) REFERENCES organization (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE residence ADD CONSTRAINT FK_327582332C8A3DE FOREIGN KEY (organization_id) REFERENCES organization (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE landlords_residences ADD CONSTRAINT FK_1E6E72A78B225FBD FOREIGN KEY (residence_id) REFERENCES residence (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE landlords_residences ADD CONSTRAINT FK_1E6E72A7A76ED395 FOREIGN KEY (user_id) REFERENCES weeke_user (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE resident_document ADD CONSTRAINT FK_9CCED7907E3C61F9 FOREIGN KEY (owner_id) REFERENCES weeke_user (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE social_ad_babysitting ADD CONSTRAINT FK_35D54B4DBF396750 FOREIGN KEY (id) REFERENCES social_ad_base (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE social_ad_base ADD CONSTRAINT FK_F7007999C9E88744 FOREIGN KEY (public_message_id) REFERENCES public_message (id)');
$this->addSql('ALTER TABLE social_ad_carsharing ADD CONSTRAINT FK_6E93A37BF396750 FOREIGN KEY (id) REFERENCES social_ad_base (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE social_ad_cleaning ADD CONSTRAINT FK_A0D0A107BF396750 FOREIGN KEY (id) REFERENCES social_ad_base (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE social_ad_petsitting ADD CONSTRAINT FK_17C4CCDCBF396750 FOREIGN KEY (id) REFERENCES social_ad_base (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE social_ad_repair ADD CONSTRAINT FK_215D7EA3BF396750 FOREIGN KEY (id) REFERENCES social_ad_base (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE social_ad_tutoring ADD CONSTRAINT FK_499DC750BF396750 FOREIGN KEY (id) REFERENCES social_ad_base (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE thin_client ADD CONSTRAINT FK_71F66DC792458494 FOREIGN KEY (entrance_id) REFERENCES entrance (id)');
$this->addSql('ALTER TABLE thinclient_command ADD CONSTRAINT FK_76159D324032AB97 FOREIGN KEY (thinclient_id) REFERENCES thin_client (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE useful_number_residence ADD CONSTRAINT FK_8B5C94A2805D9428 FOREIGN KEY (useful_number_id) REFERENCES useful_number (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE useful_number_residence ADD CONSTRAINT FK_8B5C94A28B225FBD FOREIGN KEY (residence_id) REFERENCES residence (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE video ADD CONSTRAINT FK_7CC7DA2C16678C77 FOREIGN KEY (uploader_id) REFERENCES weeke_user (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE weeke_user ADD CONSTRAINT FK_BEFC4B1A176DFE85 FOREIGN KEY (apartment_id) REFERENCES apartment (id)');
$this->addSql('ALTER TABLE weeke_user ADD CONSTRAINT FK_BEFC4B1AA0102B18 FOREIGN KEY (family_apartment_id) REFERENCES apartment (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE weeke_user ADD CONSTRAINT FK_BEFC4B1A5431B52 FOREIGN KEY (family_link_document_id) REFERENCES resident_document (id)');
$this->addSql('ALTER TABLE weeke_user ADD CONSTRAINT FK_BEFC4B1A32C8A3DE FOREIGN KEY (organization_id) REFERENCES organization (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE weeke_user_user_group ADD CONSTRAINT FK_75F4DBE6A76ED395 FOREIGN KEY (user_id) REFERENCES weeke_user (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE weeke_user_user_group ADD CONSTRAINT FK_75F4DBE6FE54D947 FOREIGN KEY (group_id) REFERENCES weeke_user_group (id) ON DELETE CASCADE');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->abortIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('DROP TABLE apartment');
$this->addSql('DROP TABLE cat_set');
$this->addSql('DROP TABLE category_set');
$this->addSql('DROP TABLE entrance');
$this->addSql('DROP TABLE external_link');
$this->addSql('DROP TABLE fcm_device_group');
$this->addSql('DROP TABLE fcm_device_token');
$this->addSql('DROP TABLE feature_configuration');
$this->addSql('DROP TABLE import');
$this->addSql('DROP TABLE landlords_residences');
$this->addSql('DROP TABLE message_target');
$this->addSql('DROP TABLE moderation_event');
$this->addSql('DROP TABLE notification');
$this->addSql('DROP TABLE organization');
$this->addSql('DROP TABLE partner_client');
$this->addSql('DROP TABLE picture');
$this->addSql('DROP TABLE picture_category');
$this->addSql('DROP TABLE private_message');
$this->addSql('DROP TABLE private_message_receiver');
$this->addSql('DROP TABLE public_message');
$this->addSql('DROP TABLE public_page');
$this->addSql('DROP TABLE publication_background');
$this->addSql('DROP TABLE residence');
$this->addSql('DROP TABLE resident_document');
$this->addSql('DROP TABLE setting');
$this->addSql('DROP TABLE social_ad_babysitting');
$this->addSql('DROP TABLE social_ad_base');
$this->addSql('DROP TABLE social_ad_carsharing');
$this->addSql('DROP TABLE social_ad_cleaning');
$this->addSql('DROP TABLE social_ad_petsitting');
$this->addSql('DROP TABLE social_ad_repair');
$this->addSql('DROP TABLE social_ad_tutoring');
$this->addSql('DROP TABLE thin_client');
$this->addSql('DROP TABLE thinclient_command');
$this->addSql('DROP TABLE useful_number');
$this->addSql('DROP TABLE useful_number_residence');
$this->addSql('DROP TABLE video');
$this->addSql('DROP TABLE weeke_user');
$this->addSql('DROP TABLE weeke_user_group');
$this->addSql('DROP TABLE weeke_user_user_group');
$this->addSql('ALTER TABLE apartment DROP FOREIGN KEY FK_4D7E685492458494');
$this->addSql('ALTER TABLE cat_set DROP FOREIGN KEY FK_62F3F0CC1F13C763');
$this->addSql('ALTER TABLE cat_set DROP FOREIGN KEY FK_62F3F0CC8C0ED801');
$this->addSql('ALTER TABLE entrance DROP FOREIGN KEY FK_87DA61898B225FBD');
$this->addSql('ALTER TABLE external_link DROP FOREIGN KEY FK_A3B3F9DD32C8A3DE');
$this->addSql('ALTER TABLE fcm_device_group DROP FOREIGN KEY FK_1065FF57A76ED395');
$this->addSql('ALTER TABLE fcm_device_token DROP FOREIGN KEY FK_22921AA970608067');
$this->addSql('ALTER TABLE feature_configuration DROP FOREIGN KEY FK_CC5C029F32C8A3DE');
$this->addSql('ALTER TABLE import DROP FOREIGN KEY FK_9D4ECE1D32C8A3DE');
$this->addSql('ALTER TABLE landlords_residences DROP FOREIGN KEY FK_1E6E72A78B225FBD');
$this->addSql('ALTER TABLE landlords_residences DROP FOREIGN KEY FK_1E6E72A7A76ED395');
$this->addSql('ALTER TABLE message_target DROP FOREIGN KEY FK_7148B2F38B225FBD');
$this->addSql('ALTER TABLE message_target DROP FOREIGN KEY FK_7148B2F392458494');
$this->addSql('ALTER TABLE message_target DROP FOREIGN KEY FK_7148B2F3C9E88744');
$this->addSql('ALTER TABLE message_target DROP FOREIGN KEY FK_7148B2F357983C56');
$this->addSql('ALTER TABLE moderation_event DROP FOREIGN KEY FK_C8F4ED33C9E88744');
$this->addSql('ALTER TABLE moderation_event DROP FOREIGN KEY FK_C8F4ED3357983C56');
$this->addSql('ALTER TABLE moderation_event DROP FOREIGN KEY FK_C8F4ED33D0AFA354');
$this->addSql('ALTER TABLE moderation_event CHANGE publication_status publication_status VARCHAR(255) CHARACTER SET utf8 DEFAULT \'waiting\' COLLATE `utf8_unicode_ci`');
$this->addSql('ALTER TABLE notification DROP FOREIGN KEY FK_BF5476CAE92F8F78');
$this->addSql('ALTER TABLE notification DROP FOREIGN KEY FK_BF5476CA5880D9EB');
$this->addSql('ALTER TABLE notification DROP FOREIGN KEY FK_BF5476CAA8B71BA1');
$this->addSql('ALTER TABLE organization DROP FOREIGN KEY FK_C1EE637C1F13C763');
$this->addSql('ALTER TABLE organization CHANGE type type VARCHAR(255) CHARACTER SET utf8 DEFAULT \'real_estate\' COLLATE `utf8_unicode_ci`');
$this->addSql('ALTER TABLE partner_client DROP FOREIGN KEY FK_FA8FAD2E32C8A3DE');
$this->addSql('ALTER TABLE picture DROP FOREIGN KEY FK_16DB4F8916678C77');
$this->addSql('ALTER TABLE picture DROP FOREIGN KEY FK_16DB4F898C0ED801');
$this->addSql('ALTER TABLE private_message DROP FOREIGN KEY FK_4744FC9BF624B39D');
$this->addSql('ALTER TABLE private_message_receiver DROP FOREIGN KEY FK_51657FAECD53EDB6');
$this->addSql('ALTER TABLE private_message_receiver DROP FOREIGN KEY FK_51657FAE5EBFB95E');
$this->addSql('ALTER TABLE public_message DROP FOREIGN KEY FK_ED636FCDF624B39D');
$this->addSql('ALTER TABLE public_page DROP FOREIGN KEY FK_6F57F4F161220EA6');
$this->addSql('ALTER TABLE public_page DROP FOREIGN KEY FK_6F57F4F129C1004E');
$this->addSql('ALTER TABLE publication_background DROP FOREIGN KEY FK_D21FF1B116678C77');
$this->addSql('ALTER TABLE publication_background DROP FOREIGN KEY FK_D21FF1B132C8A3DE');
$this->addSql('ALTER TABLE residence DROP FOREIGN KEY FK_327582332C8A3DE');
$this->addSql('ALTER TABLE resident_document DROP FOREIGN KEY FK_9CCED7907E3C61F9');
$this->addSql('ALTER TABLE social_ad_babysitting DROP FOREIGN KEY FK_35D54B4DBF396750');
$this->addSql('ALTER TABLE social_ad_base DROP FOREIGN KEY FK_F7007999C9E88744');
$this->addSql('ALTER TABLE social_ad_carsharing DROP FOREIGN KEY FK_6E93A37BF396750');
$this->addSql('ALTER TABLE social_ad_cleaning DROP FOREIGN KEY FK_A0D0A107BF396750');
$this->addSql('ALTER TABLE social_ad_petsitting DROP FOREIGN KEY FK_17C4CCDCBF396750');
$this->addSql('ALTER TABLE social_ad_repair DROP FOREIGN KEY FK_215D7EA3BF396750');
$this->addSql('ALTER TABLE social_ad_tutoring DROP FOREIGN KEY FK_499DC750BF396750');
$this->addSql('ALTER TABLE thin_client DROP FOREIGN KEY FK_71F66DC792458494');
$this->addSql('ALTER TABLE thinclient_command DROP FOREIGN KEY FK_76159D324032AB97');
$this->addSql('ALTER TABLE useful_number_residence DROP FOREIGN KEY FK_8B5C94A2805D9428');
$this->addSql('ALTER TABLE useful_number_residence DROP FOREIGN KEY FK_8B5C94A28B225FBD');
$this->addSql('ALTER TABLE video DROP FOREIGN KEY FK_7CC7DA2C16678C77');
$this->addSql('ALTER TABLE weeke_user DROP FOREIGN KEY FK_BEFC4B1A176DFE85');
$this->addSql('ALTER TABLE weeke_user DROP FOREIGN KEY FK_BEFC4B1AA0102B18');
$this->addSql('ALTER TABLE weeke_user DROP FOREIGN KEY FK_BEFC4B1A5431B52');
$this->addSql('ALTER TABLE weeke_user DROP FOREIGN KEY FK_BEFC4B1A32C8A3DE');
$this->addSql('ALTER TABLE weeke_user_user_group DROP FOREIGN KEY FK_75F4DBE6A76ED395');
$this->addSql('ALTER TABLE weeke_user_user_group DROP FOREIGN KEY FK_75F4DBE6FE54D947');
}
}