<?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 Version20220401122058 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('CREATE TABLE Members (id INT AUTO_INCREMENT NOT NULL, picture_id INT DEFAULT NULL, fname VARCHAR(255) DEFAULT NULL, lname VARCHAR(255) DEFAULT NULL, date DATETIME DEFAULT NULL, isEnabled TINYINT(1) DEFAULT NULL, title VARCHAR(255) DEFAULT NULL, profession VARCHAR(255) DEFAULT NULL, createdBy INT DEFAULT NULL, updatedBy INT DEFAULT NULL, UNIQUE INDEX UNIQ_8A1DEB63EE45BDBF (picture_id), INDEX IDX_8A1DEB63D3564642 (createdBy), INDEX IDX_8A1DEB63E8DE7170 (updatedBy), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE Structures (id INT AUTO_INCREMENT NOT NULL, logo_id INT DEFAULT NULL, director_picture_id INT DEFAULT NULL, category_id INT DEFAULT NULL, sector_id INT DEFAULT NULL, position INT DEFAULT NULL, name VARCHAR(255) DEFAULT NULL, abbreviation VARCHAR(255) DEFAULT NULL, director VARCHAR(255) DEFAULT NULL, address VARCHAR(255) DEFAULT NULL, phone VARCHAR(255) DEFAULT NULL, email VARCHAR(255) DEFAULT NULL, website VARCHAR(255) DEFAULT NULL, map VARCHAR(255) DEFAULT NULL, description LONGTEXT DEFAULT NULL, content LONGTEXT DEFAULT NULL, date DATETIME DEFAULT NULL, isEnabled TINYINT(1) DEFAULT NULL, slug VARCHAR(255) DEFAULT NULL, createdBy INT DEFAULT NULL, updatedBy INT DEFAULT NULL, UNIQUE INDEX UNIQ_14E3C68AF98F144A (logo_id), UNIQUE INDEX UNIQ_14E3C68A134F7FC6 (director_picture_id), INDEX IDX_14E3C68AD3564642 (createdBy), INDEX IDX_14E3C68AE8DE7170 (updatedBy), INDEX IDX_14E3C68A12469DE2 (category_id), INDEX IDX_14E3C68ADE95C867 (sector_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE StructuresCategories (id INT AUTO_INCREMENT NOT NULL, label VARCHAR(255) NOT NULL, description LONGTEXT DEFAULT NULL, slug VARCHAR(255) DEFAULT NULL, is_enabled TINYINT(1) DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE Subscribers (id INT AUTO_INCREMENT NOT NULL, email VARCHAR(255) DEFAULT NULL, date DATETIME DEFAULT NULL, IP VARCHAR(255) DEFAULT NULL, browser VARCHAR(255) NOT NULL, OS VARCHAR(255) NOT NULL, fname VARCHAR(255) DEFAULT NULL, lname VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE Videos (id INT AUTO_INCREMENT NOT NULL, banner_id INT DEFAULT NULL, file_id INT DEFAULT NULL, user_id INT DEFAULT NULL, biblio_id INT DEFAULT NULL, title VARCHAR(255) DEFAULT NULL, description LONGTEXT DEFAULT NULL, createdAt DATETIME DEFAULT NULL, date DATETIME DEFAULT NULL, isEnabled TINYINT(1) DEFAULT NULL, youtube VARCHAR(255) DEFAULT NULL, UNIQUE INDEX UNIQ_2E066104684EC833 (banner_id), UNIQUE INDEX UNIQ_2E06610493CB796C (file_id), INDEX IDX_2E066104A76ED395 (user_id), UNIQUE INDEX UNIQ_2E06610456407ABA (biblio_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE albums (id INT AUTO_INCREMENT NOT NULL, title VARCHAR(255) DEFAULT NULL, isEnabled TINYINT(1) DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE albums_picture (albums_id INT NOT NULL, picture_id INT NOT NULL, INDEX IDX_F5BA7956ECBB55AF (albums_id), INDEX IDX_F5BA7956EE45BDBF (picture_id), PRIMARY KEY(albums_id, picture_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE articles (id INT AUTO_INCREMENT NOT NULL, banner_id INT DEFAULT NULL, category_id INT DEFAULT NULL, type_id INT DEFAULT NULL, user_id INT DEFAULT NULL, album_id INT DEFAULT NULL, biblio_id INT DEFAULT NULL, title VARCHAR(255) DEFAULT NULL, description LONGTEXT DEFAULT NULL, content LONGTEXT DEFAULT NULL, slug VARCHAR(255) DEFAULT NULL, createdAt DATETIME DEFAULT NULL, lastUpdate DATETIME DEFAULT NULL, date DATETIME DEFAULT NULL, isEnabled TINYINT(1) DEFAULT NULL, isOnFrontPage TINYINT(1) DEFAULT NULL, isVisible TINYINT(1) DEFAULT NULL, isDeleted TINYINT(1) DEFAULT NULL, youtube VARCHAR(255) DEFAULT NULL, flickr VARCHAR(255) DEFAULT NULL, URL VARCHAR(255) DEFAULT NULL, soundcloud VARCHAR(255) DEFAULT NULL, updatedBy INT DEFAULT NULL, INDEX IDX_BFDD3168E8DE7170 (updatedBy), UNIQUE INDEX UNIQ_BFDD3168684EC833 (banner_id), INDEX IDX_BFDD316812469DE2 (category_id), INDEX IDX_BFDD3168C54C8C93 (type_id), INDEX IDX_BFDD3168A76ED395 (user_id), UNIQUE INDEX UNIQ_BFDD31681137ABCF (album_id), UNIQUE INDEX UNIQ_BFDD316856407ABA (biblio_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE articles_tags (articles_id INT NOT NULL, tags_id INT NOT NULL, INDEX IDX_354053611EBAF6CC (articles_id), INDEX IDX_354053618D7B4FB4 (tags_id), PRIMARY KEY(articles_id, tags_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE articles_categories (id INT AUTO_INCREMENT NOT NULL, banner_id INT DEFAULT NULL, name VARCHAR(255) DEFAULT NULL, slug VARCHAR(255) DEFAULT NULL, description LONGTEXT DEFAULT NULL, INDEX IDX_DE004A0E684EC833 (banner_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE articles_types (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(255) DEFAULT NULL, slug VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE banners (id INT AUTO_INCREMENT NOT NULL, banner_id INT DEFAULT NULL, title VARCHAR(255) DEFAULT NULL, btnTitle VARCHAR(255) DEFAULT NULL, link VARCHAR(255) DEFAULT NULL, description LONGTEXT DEFAULT NULL, isEnabled TINYINT(1) DEFAULT NULL, createdAt DATETIME DEFAULT NULL, lastUpdate DATETIME DEFAULT NULL, date DATETIME DEFAULT NULL, INDEX IDX_250F2568684EC833 (banner_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE biblios (id INT AUTO_INCREMENT NOT NULL, title VARCHAR(255) DEFAULT NULL, isEnabled TINYINT(1) DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE biblios_file (biblios_id INT NOT NULL, file_id INT NOT NULL, INDEX IDX_D314735DCC93A7CD (biblios_id), INDEX IDX_D314735D93CB796C (file_id), PRIMARY KEY(biblios_id, file_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE faq (id INT AUTO_INCREMENT NOT NULL, category_id INT NOT NULL, question LONGTEXT NOT NULL, response LONGTEXT NOT NULL, created_at DATETIME NOT NULL, is_enabled TINYINT(1) DEFAULT NULL, position INT DEFAULT NULL, INDEX IDX_E8FF75CC12469DE2 (category_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE faqcategories (id INT AUTO_INCREMENT NOT NULL, label VARCHAR(255) NOT NULL, description LONGTEXT DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE file (id INT AUTO_INCREMENT NOT NULL, target VARCHAR(255) DEFAULT NULL, pages INT DEFAULT NULL, downloads INT DEFAULT NULL, reading INT DEFAULT NULL, name VARCHAR(255) DEFAULT NULL, dir VARCHAR(255) DEFAULT NULL, source VARCHAR(255) DEFAULT NULL, size INT DEFAULT NULL, is_enabled TINYINT(1) DEFAULT NULL, is_deleted TINYINT(1) DEFAULT NULL, last_update DATETIME DEFAULT NULL, created_at DATETIME DEFAULT NULL, formatSize VARCHAR(255) DEFAULT NULL, mimetype VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE formations (id INT AUTO_INCREMENT NOT NULL, banner_id INT DEFAULT NULL, album_id INT DEFAULT NULL, user_id INT DEFAULT NULL, label VARCHAR(255) DEFAULT NULL, description LONGTEXT DEFAULT NULL, details LONGTEXT DEFAULT NULL, slug VARCHAR(255) DEFAULT NULL, is_enabled TINYINT(1) DEFAULT NULL, created_at DATETIME NOT NULL, UNIQUE INDEX UNIQ_40902137684EC833 (banner_id), UNIQUE INDEX UNIQ_409021371137ABCF (album_id), INDEX IDX_40902137A76ED395 (user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE messages (id INT AUTO_INCREMENT NOT NULL, structure_id INT DEFAULT NULL, fName VARCHAR(255) NOT NULL, lName VARCHAR(255) NOT NULL, email VARCHAR(255) NOT NULL, phone VARCHAR(255) NOT NULL, subject VARCHAR(255) DEFAULT NULL, object VARCHAR(255) NOT NULL, content LONGTEXT DEFAULT NULL, date DATETIME DEFAULT NULL, IP VARCHAR(255) DEFAULT NULL, browser VARCHAR(255) NOT NULL, OS VARCHAR(255) NOT NULL, civility VARCHAR(255) DEFAULT NULL, country VARCHAR(255) DEFAULT NULL, INDEX IDX_DB021E962534008B (structure_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE pages (id INT AUTO_INCREMENT NOT NULL, user_id INT DEFAULT NULL, picture_id INT DEFAULT NULL, banner_id INT DEFAULT NULL, title VARCHAR(255) DEFAULT NULL, titleAlt VARCHAR(255) DEFAULT NULL, pictureTitle VARCHAR(255) DEFAULT NULL, pictureSubtitle VARCHAR(255) DEFAULT NULL, description LONGTEXT DEFAULT NULL, content LONGTEXT DEFAULT NULL, slug VARCHAR(255) DEFAULT NULL, lastUpdate DATETIME NOT NULL, date DATETIME DEFAULT NULL, isEnabled TINYINT(1) DEFAULT NULL, createdBy INT DEFAULT NULL, updatedBy INT DEFAULT NULL, INDEX IDX_2074E575D3564642 (createdBy), INDEX IDX_2074E575E8DE7170 (updatedBy), INDEX IDX_2074E575A76ED395 (user_id), UNIQUE INDEX UNIQ_2074E575EE45BDBF (picture_id), UNIQUE INDEX UNIQ_2074E575684EC833 (banner_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE partners (id INT AUTO_INCREMENT NOT NULL, logo_id INT DEFAULT NULL, user_id INT DEFAULT NULL, name VARCHAR(255) DEFAULT NULL, website VARCHAR(255) DEFAULT NULL, is_enabled TINYINT(1) DEFAULT NULL, created_at DATETIME DEFAULT NULL, UNIQUE INDEX UNIQ_EFEB5164F98F144A (logo_id), INDEX IDX_EFEB5164A76ED395 (user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE picture (id INT AUTO_INCREMENT NOT NULL, target VARCHAR(255) DEFAULT NULL, thumbnailDir VARCHAR(255) DEFAULT NULL, hasThumbnail TINYINT(1) DEFAULT NULL, pages INT DEFAULT NULL, downloads INT DEFAULT NULL, reading INT DEFAULT NULL, name VARCHAR(255) DEFAULT NULL, dir VARCHAR(255) DEFAULT NULL, source VARCHAR(255) DEFAULT NULL, size INT DEFAULT NULL, is_enabled TINYINT(1) DEFAULT NULL, is_deleted TINYINT(1) DEFAULT NULL, last_update DATETIME DEFAULT NULL, created_at DATETIME DEFAULT NULL, formatSize VARCHAR(255) DEFAULT NULL, mimetype VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE pillars (id INT AUTO_INCREMENT NOT NULL, label VARCHAR(255) DEFAULT NULL, description LONGTEXT DEFAULT NULL, slug VARCHAR(255) DEFAULT NULL, content LONGTEXT DEFAULT NULL, is_enabled TINYINT(1) DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE profiles (id INT AUTO_INCREMENT NOT NULL, code VARCHAR(255) DEFAULT NULL, role VARCHAR(255) DEFAULT NULL, description LONGTEXT DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE program (id INT AUTO_INCREMENT NOT NULL, file_id INT DEFAULT NULL, cover_id INT DEFAULT NULL, date DATE DEFAULT NULL, enabled TINYINT(1) DEFAULT NULL, created_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', label VARCHAR(255) DEFAULT NULL, place VARCHAR(255) DEFAULT NULL, end_date DATE DEFAULT NULL, description LONGTEXT DEFAULT NULL, UNIQUE INDEX UNIQ_92ED778493CB796C (file_id), UNIQUE INDEX UNIQ_92ED7784922726E9 (cover_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE program_activities (id INT AUTO_INCREMENT NOT NULL, program_id INT DEFAULT NULL, content LONGTEXT DEFAULT NULL, time TIME DEFAULT NULL, enabled TINYINT(1) DEFAULT NULL, author VARCHAR(255) DEFAULT NULL, start_time TIME DEFAULT NULL, end_time TIME DEFAULT NULL, name VARCHAR(255) DEFAULT NULL, INDEX IDX_A3CB52513EB8070A (program_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE projects (id INT AUTO_INCREMENT NOT NULL, album_id INT DEFAULT NULL, user_id INT DEFAULT NULL, document_id INT DEFAULT NULL, name VARCHAR(255) DEFAULT NULL, description LONGTEXT DEFAULT NULL, details LONGTEXT DEFAULT NULL, created_at DATETIME NOT NULL, slug VARCHAR(255) DEFAULT NULL, is_enabled TINYINT(1) DEFAULT NULL, UNIQUE INDEX UNIQ_5C93B3A41137ABCF (album_id), INDEX IDX_5C93B3A4A76ED395 (user_id), UNIQUE INDEX UNIQ_5C93B3A4C33F7837 (document_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE resources (id INT AUTO_INCREMENT NOT NULL, document_id INT DEFAULT NULL, cover_id INT DEFAULT NULL, category_id INT DEFAULT NULL, title VARCHAR(255) DEFAULT NULL, description LONGTEXT DEFAULT NULL, isEnabled TINYINT(1) DEFAULT NULL, createdAt DATETIME DEFAULT NULL, date DATE DEFAULT NULL, createdBy INT DEFAULT NULL, updatedBy INT DEFAULT NULL, UNIQUE INDEX UNIQ_EF66EBAEC33F7837 (document_id), UNIQUE INDEX UNIQ_EF66EBAE922726E9 (cover_id), INDEX IDX_EF66EBAE12469DE2 (category_id), INDEX IDX_EF66EBAED3564642 (createdBy), INDEX IDX_EF66EBAEE8DE7170 (updatedBy), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE resources_categories (id INT AUTO_INCREMENT NOT NULL, label VARCHAR(255) NOT NULL, description LONGTEXT DEFAULT NULL, slug VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE resources_phases (id INT AUTO_INCREMENT NOT NULL, category_id INT DEFAULT NULL, label VARCHAR(255) DEFAULT NULL, date DATE DEFAULT NULL, slug VARCHAR(255) DEFAULT NULL, is_enabled TINYINT(1) DEFAULT NULL, INDEX IDX_1D431E9712469DE2 (category_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE sectors (id INT AUTO_INCREMENT NOT NULL, banner_id INT DEFAULT NULL, icon_id INT DEFAULT NULL, pillar_id INT DEFAULT NULL, label VARCHAR(255) DEFAULT NULL, description LONGTEXT DEFAULT NULL, is_enabled TINYINT(1) DEFAULT NULL, color VARCHAR(255) DEFAULT NULL, slug VARCHAR(255) DEFAULT NULL, priority INT DEFAULT NULL, UNIQUE INDEX UNIQ_B5940698684EC833 (banner_id), UNIQUE INDEX UNIQ_B594069854B9D732 (icon_id), INDEX IDX_B5940698164AAF93 (pillar_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE services (id INT AUTO_INCREMENT NOT NULL, banner_id INT DEFAULT NULL, icon_id INT DEFAULT NULL, title VARCHAR(255) DEFAULT NULL, description LONGTEXT DEFAULT NULL, content LONGTEXT DEFAULT NULL, isEnabled TINYINT(1) DEFAULT NULL, createdAt DATETIME DEFAULT NULL, lastUpdate DATETIME DEFAULT NULL, btn_text VARCHAR(255) DEFAULT NULL, btn_link VARCHAR(255) DEFAULT NULL, UNIQUE INDEX UNIQ_7332E169684EC833 (banner_id), UNIQUE INDEX UNIQ_7332E16954B9D732 (icon_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE tags (id INT AUTO_INCREMENT NOT NULL, banner_id INT DEFAULT NULL, created_by_id INT DEFAULT NULL, label VARCHAR(255) NOT NULL, description LONGTEXT DEFAULT NULL, created_at DATETIME DEFAULT NULL, slug VARCHAR(191) NOT NULL, UNIQUE INDEX UNIQ_6FBC9426989D9B62 (slug), UNIQUE INDEX UNIQ_6FBC9426684EC833 (banner_id), INDEX IDX_6FBC9426B03A8386 (created_by_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE users (id INT AUTO_INCREMENT NOT NULL, profile_id INT DEFAULT NULL, fName VARCHAR(255) DEFAULT NULL, lName VARCHAR(255) DEFAULT NULL, phone VARCHAR(255) DEFAULT NULL, createdAt DATETIME DEFAULT NULL, lastLogin DATETIME DEFAULT NULL, password VARCHAR(255) DEFAULT NULL, token VARCHAR(255) DEFAULT NULL, sex TINYINT(1) DEFAULT NULL, isEnabled TINYINT(1) DEFAULT NULL, email VARCHAR(191) NOT NULL, UNIQUE INDEX UNIQ_1483A5E9E7927C74 (email), INDEX IDX_1483A5E9CCFA12B8 (profile_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE users_activities (id INT AUTO_INCREMENT NOT NULL, user_id INT DEFAULT NULL, object VARCHAR(255) DEFAULT NULL, objectID INT DEFAULT NULL, action VARCHAR(255) DEFAULT NULL, info VARCHAR(255) DEFAULT NULL, date DATETIME DEFAULT NULL, INDEX IDX_629A0071A76ED395 (user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE Members ADD CONSTRAINT FK_8A1DEB63EE45BDBF FOREIGN KEY (picture_id) REFERENCES picture (id)');
$this->addSql('ALTER TABLE Members ADD CONSTRAINT FK_8A1DEB63D3564642 FOREIGN KEY (createdBy) REFERENCES users (id)');
$this->addSql('ALTER TABLE Members ADD CONSTRAINT FK_8A1DEB63E8DE7170 FOREIGN KEY (updatedBy) REFERENCES users (id)');
$this->addSql('ALTER TABLE Structures ADD CONSTRAINT FK_14E3C68AF98F144A FOREIGN KEY (logo_id) REFERENCES picture (id)');
$this->addSql('ALTER TABLE Structures ADD CONSTRAINT FK_14E3C68A134F7FC6 FOREIGN KEY (director_picture_id) REFERENCES picture (id)');
$this->addSql('ALTER TABLE Structures ADD CONSTRAINT FK_14E3C68AD3564642 FOREIGN KEY (createdBy) REFERENCES users (id)');
$this->addSql('ALTER TABLE Structures ADD CONSTRAINT FK_14E3C68AE8DE7170 FOREIGN KEY (updatedBy) REFERENCES users (id)');
$this->addSql('ALTER TABLE Structures ADD CONSTRAINT FK_14E3C68A12469DE2 FOREIGN KEY (category_id) REFERENCES StructuresCategories (id)');
$this->addSql('ALTER TABLE Structures ADD CONSTRAINT FK_14E3C68ADE95C867 FOREIGN KEY (sector_id) REFERENCES sectors (id)');
$this->addSql('ALTER TABLE Videos ADD CONSTRAINT FK_2E066104684EC833 FOREIGN KEY (banner_id) REFERENCES picture (id)');
$this->addSql('ALTER TABLE Videos ADD CONSTRAINT FK_2E06610493CB796C FOREIGN KEY (file_id) REFERENCES file (id)');
$this->addSql('ALTER TABLE Videos ADD CONSTRAINT FK_2E066104A76ED395 FOREIGN KEY (user_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE Videos ADD CONSTRAINT FK_2E06610456407ABA FOREIGN KEY (biblio_id) REFERENCES biblios (id)');
$this->addSql('ALTER TABLE albums_picture ADD CONSTRAINT FK_F5BA7956ECBB55AF FOREIGN KEY (albums_id) REFERENCES albums (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE albums_picture ADD CONSTRAINT FK_F5BA7956EE45BDBF FOREIGN KEY (picture_id) REFERENCES picture (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE articles ADD CONSTRAINT FK_BFDD3168E8DE7170 FOREIGN KEY (updatedBy) REFERENCES users (id)');
$this->addSql('ALTER TABLE articles ADD CONSTRAINT FK_BFDD3168684EC833 FOREIGN KEY (banner_id) REFERENCES picture (id)');
$this->addSql('ALTER TABLE articles ADD CONSTRAINT FK_BFDD316812469DE2 FOREIGN KEY (category_id) REFERENCES articles_categories (id)');
$this->addSql('ALTER TABLE articles ADD CONSTRAINT FK_BFDD3168C54C8C93 FOREIGN KEY (type_id) REFERENCES articles_types (id)');
$this->addSql('ALTER TABLE articles ADD CONSTRAINT FK_BFDD3168A76ED395 FOREIGN KEY (user_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE articles ADD CONSTRAINT FK_BFDD31681137ABCF FOREIGN KEY (album_id) REFERENCES albums (id)');
$this->addSql('ALTER TABLE articles ADD CONSTRAINT FK_BFDD316856407ABA FOREIGN KEY (biblio_id) REFERENCES biblios (id)');
$this->addSql('ALTER TABLE articles_tags ADD CONSTRAINT FK_354053611EBAF6CC FOREIGN KEY (articles_id) REFERENCES articles (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE articles_tags ADD CONSTRAINT FK_354053618D7B4FB4 FOREIGN KEY (tags_id) REFERENCES tags (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE articles_categories ADD CONSTRAINT FK_DE004A0E684EC833 FOREIGN KEY (banner_id) REFERENCES picture (id)');
$this->addSql('ALTER TABLE banners ADD CONSTRAINT FK_250F2568684EC833 FOREIGN KEY (banner_id) REFERENCES picture (id)');
$this->addSql('ALTER TABLE biblios_file ADD CONSTRAINT FK_D314735DCC93A7CD FOREIGN KEY (biblios_id) REFERENCES biblios (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE biblios_file ADD CONSTRAINT FK_D314735D93CB796C FOREIGN KEY (file_id) REFERENCES file (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE faq ADD CONSTRAINT FK_E8FF75CC12469DE2 FOREIGN KEY (category_id) REFERENCES faqcategories (id)');
$this->addSql('ALTER TABLE formations ADD CONSTRAINT FK_40902137684EC833 FOREIGN KEY (banner_id) REFERENCES picture (id)');
$this->addSql('ALTER TABLE formations ADD CONSTRAINT FK_409021371137ABCF FOREIGN KEY (album_id) REFERENCES albums (id)');
$this->addSql('ALTER TABLE formations ADD CONSTRAINT FK_40902137A76ED395 FOREIGN KEY (user_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE messages ADD CONSTRAINT FK_DB021E962534008B FOREIGN KEY (structure_id) REFERENCES Structures (id)');
$this->addSql('ALTER TABLE pages ADD CONSTRAINT FK_2074E575D3564642 FOREIGN KEY (createdBy) REFERENCES users (id)');
$this->addSql('ALTER TABLE pages ADD CONSTRAINT FK_2074E575E8DE7170 FOREIGN KEY (updatedBy) REFERENCES users (id)');
$this->addSql('ALTER TABLE pages ADD CONSTRAINT FK_2074E575A76ED395 FOREIGN KEY (user_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE pages ADD CONSTRAINT FK_2074E575EE45BDBF FOREIGN KEY (picture_id) REFERENCES picture (id)');
$this->addSql('ALTER TABLE pages ADD CONSTRAINT FK_2074E575684EC833 FOREIGN KEY (banner_id) REFERENCES picture (id)');
$this->addSql('ALTER TABLE partners ADD CONSTRAINT FK_EFEB5164F98F144A FOREIGN KEY (logo_id) REFERENCES picture (id)');
$this->addSql('ALTER TABLE partners ADD CONSTRAINT FK_EFEB5164A76ED395 FOREIGN KEY (user_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE program ADD CONSTRAINT FK_92ED778493CB796C FOREIGN KEY (file_id) REFERENCES file (id)');
$this->addSql('ALTER TABLE program ADD CONSTRAINT FK_92ED7784922726E9 FOREIGN KEY (cover_id) REFERENCES picture (id)');
$this->addSql('ALTER TABLE program_activities ADD CONSTRAINT FK_A3CB52513EB8070A FOREIGN KEY (program_id) REFERENCES program (id)');
$this->addSql('ALTER TABLE projects ADD CONSTRAINT FK_5C93B3A41137ABCF FOREIGN KEY (album_id) REFERENCES albums (id)');
$this->addSql('ALTER TABLE projects ADD CONSTRAINT FK_5C93B3A4A76ED395 FOREIGN KEY (user_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE projects ADD CONSTRAINT FK_5C93B3A4C33F7837 FOREIGN KEY (document_id) REFERENCES file (id)');
$this->addSql('ALTER TABLE resources ADD CONSTRAINT FK_EF66EBAEC33F7837 FOREIGN KEY (document_id) REFERENCES file (id)');
$this->addSql('ALTER TABLE resources ADD CONSTRAINT FK_EF66EBAE922726E9 FOREIGN KEY (cover_id) REFERENCES picture (id)');
$this->addSql('ALTER TABLE resources ADD CONSTRAINT FK_EF66EBAE12469DE2 FOREIGN KEY (category_id) REFERENCES resources_categories (id)');
$this->addSql('ALTER TABLE resources ADD CONSTRAINT FK_EF66EBAED3564642 FOREIGN KEY (createdBy) REFERENCES users (id)');
$this->addSql('ALTER TABLE resources ADD CONSTRAINT FK_EF66EBAEE8DE7170 FOREIGN KEY (updatedBy) REFERENCES users (id)');
$this->addSql('ALTER TABLE resources_phases ADD CONSTRAINT FK_1D431E9712469DE2 FOREIGN KEY (category_id) REFERENCES resources_categories (id)');
$this->addSql('ALTER TABLE sectors ADD CONSTRAINT FK_B5940698684EC833 FOREIGN KEY (banner_id) REFERENCES picture (id)');
$this->addSql('ALTER TABLE sectors ADD CONSTRAINT FK_B594069854B9D732 FOREIGN KEY (icon_id) REFERENCES picture (id)');
$this->addSql('ALTER TABLE sectors ADD CONSTRAINT FK_B5940698164AAF93 FOREIGN KEY (pillar_id) REFERENCES pillars (id)');
$this->addSql('ALTER TABLE services ADD CONSTRAINT FK_7332E169684EC833 FOREIGN KEY (banner_id) REFERENCES picture (id)');
$this->addSql('ALTER TABLE services ADD CONSTRAINT FK_7332E16954B9D732 FOREIGN KEY (icon_id) REFERENCES picture (id)');
$this->addSql('ALTER TABLE tags ADD CONSTRAINT FK_6FBC9426684EC833 FOREIGN KEY (banner_id) REFERENCES picture (id)');
$this->addSql('ALTER TABLE tags ADD CONSTRAINT FK_6FBC9426B03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE users ADD CONSTRAINT FK_1483A5E9CCFA12B8 FOREIGN KEY (profile_id) REFERENCES profiles (id)');
$this->addSql('ALTER TABLE users_activities ADD CONSTRAINT FK_629A0071A76ED395 FOREIGN KEY (user_id) REFERENCES users (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE messages DROP FOREIGN KEY FK_DB021E962534008B');
$this->addSql('ALTER TABLE Structures DROP FOREIGN KEY FK_14E3C68A12469DE2');
$this->addSql('ALTER TABLE albums_picture DROP FOREIGN KEY FK_F5BA7956ECBB55AF');
$this->addSql('ALTER TABLE articles DROP FOREIGN KEY FK_BFDD31681137ABCF');
$this->addSql('ALTER TABLE formations DROP FOREIGN KEY FK_409021371137ABCF');
$this->addSql('ALTER TABLE projects DROP FOREIGN KEY FK_5C93B3A41137ABCF');
$this->addSql('ALTER TABLE articles_tags DROP FOREIGN KEY FK_354053611EBAF6CC');
$this->addSql('ALTER TABLE articles DROP FOREIGN KEY FK_BFDD316812469DE2');
$this->addSql('ALTER TABLE articles DROP FOREIGN KEY FK_BFDD3168C54C8C93');
$this->addSql('ALTER TABLE Videos DROP FOREIGN KEY FK_2E06610456407ABA');
$this->addSql('ALTER TABLE articles DROP FOREIGN KEY FK_BFDD316856407ABA');
$this->addSql('ALTER TABLE biblios_file DROP FOREIGN KEY FK_D314735DCC93A7CD');
$this->addSql('ALTER TABLE faq DROP FOREIGN KEY FK_E8FF75CC12469DE2');
$this->addSql('ALTER TABLE Videos DROP FOREIGN KEY FK_2E06610493CB796C');
$this->addSql('ALTER TABLE biblios_file DROP FOREIGN KEY FK_D314735D93CB796C');
$this->addSql('ALTER TABLE program DROP FOREIGN KEY FK_92ED778493CB796C');
$this->addSql('ALTER TABLE projects DROP FOREIGN KEY FK_5C93B3A4C33F7837');
$this->addSql('ALTER TABLE resources DROP FOREIGN KEY FK_EF66EBAEC33F7837');
$this->addSql('ALTER TABLE Members DROP FOREIGN KEY FK_8A1DEB63EE45BDBF');
$this->addSql('ALTER TABLE Structures DROP FOREIGN KEY FK_14E3C68AF98F144A');
$this->addSql('ALTER TABLE Structures DROP FOREIGN KEY FK_14E3C68A134F7FC6');
$this->addSql('ALTER TABLE Videos DROP FOREIGN KEY FK_2E066104684EC833');
$this->addSql('ALTER TABLE albums_picture DROP FOREIGN KEY FK_F5BA7956EE45BDBF');
$this->addSql('ALTER TABLE articles DROP FOREIGN KEY FK_BFDD3168684EC833');
$this->addSql('ALTER TABLE articles_categories DROP FOREIGN KEY FK_DE004A0E684EC833');
$this->addSql('ALTER TABLE banners DROP FOREIGN KEY FK_250F2568684EC833');
$this->addSql('ALTER TABLE formations DROP FOREIGN KEY FK_40902137684EC833');
$this->addSql('ALTER TABLE pages DROP FOREIGN KEY FK_2074E575EE45BDBF');
$this->addSql('ALTER TABLE pages DROP FOREIGN KEY FK_2074E575684EC833');
$this->addSql('ALTER TABLE partners DROP FOREIGN KEY FK_EFEB5164F98F144A');
$this->addSql('ALTER TABLE program DROP FOREIGN KEY FK_92ED7784922726E9');
$this->addSql('ALTER TABLE resources DROP FOREIGN KEY FK_EF66EBAE922726E9');
$this->addSql('ALTER TABLE sectors DROP FOREIGN KEY FK_B5940698684EC833');
$this->addSql('ALTER TABLE sectors DROP FOREIGN KEY FK_B594069854B9D732');
$this->addSql('ALTER TABLE services DROP FOREIGN KEY FK_7332E169684EC833');
$this->addSql('ALTER TABLE services DROP FOREIGN KEY FK_7332E16954B9D732');
$this->addSql('ALTER TABLE tags DROP FOREIGN KEY FK_6FBC9426684EC833');
$this->addSql('ALTER TABLE sectors DROP FOREIGN KEY FK_B5940698164AAF93');
$this->addSql('ALTER TABLE users DROP FOREIGN KEY FK_1483A5E9CCFA12B8');
$this->addSql('ALTER TABLE program_activities DROP FOREIGN KEY FK_A3CB52513EB8070A');
$this->addSql('ALTER TABLE resources DROP FOREIGN KEY FK_EF66EBAE12469DE2');
$this->addSql('ALTER TABLE resources_phases DROP FOREIGN KEY FK_1D431E9712469DE2');
$this->addSql('ALTER TABLE Structures DROP FOREIGN KEY FK_14E3C68ADE95C867');
$this->addSql('ALTER TABLE articles_tags DROP FOREIGN KEY FK_354053618D7B4FB4');
$this->addSql('ALTER TABLE Members DROP FOREIGN KEY FK_8A1DEB63D3564642');
$this->addSql('ALTER TABLE Members DROP FOREIGN KEY FK_8A1DEB63E8DE7170');
$this->addSql('ALTER TABLE Structures DROP FOREIGN KEY FK_14E3C68AD3564642');
$this->addSql('ALTER TABLE Structures DROP FOREIGN KEY FK_14E3C68AE8DE7170');
$this->addSql('ALTER TABLE Videos DROP FOREIGN KEY FK_2E066104A76ED395');
$this->addSql('ALTER TABLE articles DROP FOREIGN KEY FK_BFDD3168E8DE7170');
$this->addSql('ALTER TABLE articles DROP FOREIGN KEY FK_BFDD3168A76ED395');
$this->addSql('ALTER TABLE formations DROP FOREIGN KEY FK_40902137A76ED395');
$this->addSql('ALTER TABLE pages DROP FOREIGN KEY FK_2074E575D3564642');
$this->addSql('ALTER TABLE pages DROP FOREIGN KEY FK_2074E575E8DE7170');
$this->addSql('ALTER TABLE pages DROP FOREIGN KEY FK_2074E575A76ED395');
$this->addSql('ALTER TABLE partners DROP FOREIGN KEY FK_EFEB5164A76ED395');
$this->addSql('ALTER TABLE projects DROP FOREIGN KEY FK_5C93B3A4A76ED395');
$this->addSql('ALTER TABLE resources DROP FOREIGN KEY FK_EF66EBAED3564642');
$this->addSql('ALTER TABLE resources DROP FOREIGN KEY FK_EF66EBAEE8DE7170');
$this->addSql('ALTER TABLE tags DROP FOREIGN KEY FK_6FBC9426B03A8386');
$this->addSql('ALTER TABLE users_activities DROP FOREIGN KEY FK_629A0071A76ED395');
$this->addSql('DROP TABLE Members');
$this->addSql('DROP TABLE Structures');
$this->addSql('DROP TABLE StructuresCategories');
$this->addSql('DROP TABLE Subscribers');
$this->addSql('DROP TABLE Videos');
$this->addSql('DROP TABLE albums');
$this->addSql('DROP TABLE albums_picture');
$this->addSql('DROP TABLE articles');
$this->addSql('DROP TABLE articles_tags');
$this->addSql('DROP TABLE articles_categories');
$this->addSql('DROP TABLE articles_types');
$this->addSql('DROP TABLE banners');
$this->addSql('DROP TABLE biblios');
$this->addSql('DROP TABLE biblios_file');
$this->addSql('DROP TABLE faq');
$this->addSql('DROP TABLE faqcategories');
$this->addSql('DROP TABLE file');
$this->addSql('DROP TABLE formations');
$this->addSql('DROP TABLE messages');
$this->addSql('DROP TABLE pages');
$this->addSql('DROP TABLE partners');
$this->addSql('DROP TABLE picture');
$this->addSql('DROP TABLE pillars');
$this->addSql('DROP TABLE profiles');
$this->addSql('DROP TABLE program');
$this->addSql('DROP TABLE program_activities');
$this->addSql('DROP TABLE projects');
$this->addSql('DROP TABLE resources');
$this->addSql('DROP TABLE resources_categories');
$this->addSql('DROP TABLE resources_phases');
$this->addSql('DROP TABLE sectors');
$this->addSql('DROP TABLE services');
$this->addSql('DROP TABLE tags');
$this->addSql('DROP TABLE users');
$this->addSql('DROP TABLE users_activities');
}
}