src/Migrations/Version20220722114558.php line 1
<?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 Version20220722114558 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 olymp_online_participant_message (id INT AUTO_INCREMENT NOT NULL, participant_id INT NOT NULL, type VARCHAR(255) NOT NULL, `show` TINYINT(1) NOT NULL, message LONGTEXT DEFAULT NULL, created_at DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, updated_at DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, deleted TINYINT(1) DEFAULT \'0\' NOT NULL, INDEX IDX_1FD2BC4E9D1C3019 (participant_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE olymp_online_participant_message ADD CONSTRAINT FK_1FD2BC4E9D1C3019 FOREIGN KEY (participant_id) REFERENCES olymp_online_participant (id)');
$this->addSql('ALTER TABLE contacts DROP FOREIGN KEY FK_33401573896DBBDE');
$this->addSql('ALTER TABLE contacts DROP FOREIGN KEY FK_33401573B03A8386');
$this->addSql('ALTER TABLE contacts ADD CONSTRAINT FK_33401573896DBBDE FOREIGN KEY (updated_by_id) REFERENCES users (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE contacts ADD CONSTRAINT FK_33401573B03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE content_faq DROP FOREIGN KEY FK_5D142339896DBBDE');
$this->addSql('ALTER TABLE content_faq DROP FOREIGN KEY FK_5D142339B03A8386');
$this->addSql('ALTER TABLE content_faq ADD CONSTRAINT FK_5D142339896DBBDE FOREIGN KEY (updated_by_id) REFERENCES users (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE content_faq ADD CONSTRAINT FK_5D142339B03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE content_textblock DROP FOREIGN KEY FK_E9A7D10F896DBBDE');
$this->addSql('ALTER TABLE content_textblock DROP FOREIGN KEY FK_E9A7D10FB03A8386');
$this->addSql('ALTER TABLE content_textblock ADD CONSTRAINT FK_E9A7D10F896DBBDE FOREIGN KEY (updated_by_id) REFERENCES users (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE content_textblock ADD CONSTRAINT FK_E9A7D10FB03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE federal_district DROP FOREIGN KEY FK_1A878A05896DBBDE');
$this->addSql('ALTER TABLE federal_district DROP FOREIGN KEY FK_1A878A05B03A8386');
$this->addSql('ALTER TABLE federal_district ADD CONSTRAINT FK_1A878A05896DBBDE FOREIGN KEY (updated_by_id) REFERENCES users (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE federal_district ADD CONSTRAINT FK_1A878A05B03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE federal_region DROP FOREIGN KEY FK_E9720525896DBBDE');
$this->addSql('ALTER TABLE federal_region DROP FOREIGN KEY FK_E9720525B03A8386');
$this->addSql('ALTER TABLE federal_region ADD CONSTRAINT FK_E9720525896DBBDE FOREIGN KEY (updated_by_id) REFERENCES users (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE federal_region ADD CONSTRAINT FK_E9720525B03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE files DROP FOREIGN KEY FK_6354059B03A8386');
$this->addSql('ALTER TABLE files ADD CONSTRAINT FK_6354059B03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE forum_post DROP FOREIGN KEY FK_996BCC5A896DBBDE');
$this->addSql('ALTER TABLE forum_post DROP FOREIGN KEY FK_996BCC5AB03A8386');
$this->addSql('ALTER TABLE forum_post ADD CONSTRAINT FK_996BCC5A896DBBDE FOREIGN KEY (updated_by_id) REFERENCES users (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE forum_post ADD CONSTRAINT FK_996BCC5AB03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE forum_thread DROP FOREIGN KEY FK_298F7F52896DBBDE');
$this->addSql('ALTER TABLE forum_thread DROP FOREIGN KEY FK_298F7F52B03A8386');
$this->addSql('ALTER TABLE forum_thread ADD CONSTRAINT FK_298F7F52896DBBDE FOREIGN KEY (updated_by_id) REFERENCES users (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE forum_thread ADD CONSTRAINT FK_298F7F52B03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE gallery_album DROP FOREIGN KEY FK_DD05BE60896DBBDE');
$this->addSql('ALTER TABLE gallery_album DROP FOREIGN KEY FK_DD05BE60B03A8386');
$this->addSql('ALTER TABLE gallery_album ADD CONSTRAINT FK_DD05BE60896DBBDE FOREIGN KEY (updated_by_id) REFERENCES users (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE gallery_album ADD CONSTRAINT FK_DD05BE60B03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE gallery_photo DROP FOREIGN KEY FK_F02A543B896DBBDE');
$this->addSql('ALTER TABLE gallery_photo DROP FOREIGN KEY FK_F02A543BB03A8386');
$this->addSql('ALTER TABLE gallery_photo ADD CONSTRAINT FK_F02A543B896DBBDE FOREIGN KEY (updated_by_id) REFERENCES users (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE gallery_photo ADD CONSTRAINT FK_F02A543BB03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE gallery_video DROP FOREIGN KEY FK_985A0A0F896DBBDE');
$this->addSql('ALTER TABLE gallery_video DROP FOREIGN KEY FK_985A0A0FB03A8386');
$this->addSql('ALTER TABLE gallery_video ADD CONSTRAINT FK_985A0A0F896DBBDE FOREIGN KEY (updated_by_id) REFERENCES users (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE gallery_video ADD CONSTRAINT FK_985A0A0FB03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE links DROP FOREIGN KEY FK_D182A118896DBBDE');
$this->addSql('ALTER TABLE links DROP FOREIGN KEY FK_D182A118B03A8386');
$this->addSql('ALTER TABLE links ADD CONSTRAINT FK_D182A118896DBBDE FOREIGN KEY (updated_by_id) REFERENCES users (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE links ADD CONSTRAINT FK_D182A118B03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE material DROP FOREIGN KEY FK_7CBE7595896DBBDE');
$this->addSql('ALTER TABLE material DROP FOREIGN KEY FK_7CBE7595B03A8386');
$this->addSql('ALTER TABLE material ADD CONSTRAINT FK_7CBE7595896DBBDE FOREIGN KEY (updated_by_id) REFERENCES users (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE material ADD CONSTRAINT FK_7CBE7595B03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE news DROP FOREIGN KEY FK_1DD39950896DBBDE');
$this->addSql('ALTER TABLE news DROP FOREIGN KEY FK_1DD39950B03A8386');
$this->addSql('ALTER TABLE news ADD CONSTRAINT FK_1DD39950896DBBDE FOREIGN KEY (updated_by_id) REFERENCES users (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE news ADD CONSTRAINT FK_1DD39950B03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE olymp_online DROP FOREIGN KEY FK_8A90EECF896DBBDE');
$this->addSql('ALTER TABLE olymp_online DROP FOREIGN KEY FK_8A90EECFB03A8386');
$this->addSql('ALTER TABLE olymp_online ADD CONSTRAINT FK_8A90EECF896DBBDE FOREIGN KEY (updated_by_id) REFERENCES users (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE olymp_online ADD CONSTRAINT FK_8A90EECFB03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE olymp_online_category DROP FOREIGN KEY FK_894BE6E9896DBBDE');
$this->addSql('ALTER TABLE olymp_online_category DROP FOREIGN KEY FK_894BE6E9B03A8386');
$this->addSql('ALTER TABLE olymp_online_category ADD CONSTRAINT FK_894BE6E9896DBBDE FOREIGN KEY (updated_by_id) REFERENCES users (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE olymp_online_category ADD CONSTRAINT FK_894BE6E9B03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE olymp_online_direction DROP FOREIGN KEY FK_B707EB6896DBBDE');
$this->addSql('ALTER TABLE olymp_online_direction DROP FOREIGN KEY FK_B707EB6B03A8386');
$this->addSql('ALTER TABLE olymp_online_direction ADD CONSTRAINT FK_B707EB6896DBBDE FOREIGN KEY (updated_by_id) REFERENCES users (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE olymp_online_direction ADD CONSTRAINT FK_B707EB6B03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE olympiad DROP FOREIGN KEY FK_77700B8E896DBBDE');
$this->addSql('ALTER TABLE olympiad DROP FOREIGN KEY FK_77700B8EB03A8386');
$this->addSql('ALTER TABLE olympiad ADD subtitle VARCHAR(255) DEFAULT NULL');
$this->addSql('ALTER TABLE olympiad ADD CONSTRAINT FK_77700B8E896DBBDE FOREIGN KEY (updated_by_id) REFERENCES users (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE olympiad ADD CONSTRAINT FK_77700B8EB03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE olympiad_category DROP FOREIGN KEY FK_213E7678B03A8386');
$this->addSql('ALTER TABLE olympiad_category ADD CONSTRAINT FK_213E7678B03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE olympiad_discipline DROP FOREIGN KEY FK_9DB4A075B03A8386');
$this->addSql('ALTER TABLE olympiad_discipline ADD CONSTRAINT FK_9DB4A075B03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE olympiad_grade DROP FOREIGN KEY FK_BA89D858896DBBDE');
$this->addSql('ALTER TABLE olympiad_grade DROP FOREIGN KEY FK_BA89D858B03A8386');
$this->addSql('ALTER TABLE olympiad_grade ADD CONSTRAINT FK_BA89D858896DBBDE FOREIGN KEY (updated_by_id) REFERENCES users (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE olympiad_grade ADD CONSTRAINT FK_BA89D858B03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE olympiad_level DROP FOREIGN KEY FK_7939BA7FB03A8386');
$this->addSql('ALTER TABLE olympiad_level ADD CONSTRAINT FK_7939BA7FB03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE olympiad_reviews DROP FOREIGN KEY FK_195EF87E896DBBDE');
$this->addSql('ALTER TABLE olympiad_reviews DROP FOREIGN KEY FK_195EF87EB03A8386');
$this->addSql('ALTER TABLE olympiad_reviews ADD CONSTRAINT FK_195EF87E896DBBDE FOREIGN KEY (updated_by_id) REFERENCES users (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE olympiad_reviews ADD CONSTRAINT FK_195EF87EB03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE olympiad_stage DROP FOREIGN KEY FK_21AFE505896DBBDE');
$this->addSql('ALTER TABLE olympiad_stage DROP FOREIGN KEY FK_21AFE505B03A8386');
$this->addSql('ALTER TABLE olympiad_stage ADD CONSTRAINT FK_21AFE505896DBBDE FOREIGN KEY (updated_by_id) REFERENCES users (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE olympiad_stage ADD CONSTRAINT FK_21AFE505B03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE olympiad_translation ADD subtitle VARCHAR(255) DEFAULT NULL');
$this->addSql('ALTER TABLE organisation DROP FOREIGN KEY FK_E6E132B4896DBBDE');
$this->addSql('ALTER TABLE organisation DROP FOREIGN KEY FK_E6E132B4B03A8386');
$this->addSql('ALTER TABLE organisation ADD CONSTRAINT FK_E6E132B4896DBBDE FOREIGN KEY (updated_by_id) REFERENCES users (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE organisation ADD CONSTRAINT FK_E6E132B4B03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE organisation_page DROP FOREIGN KEY FK_564EB638896DBBDE');
$this->addSql('ALTER TABLE organisation_page DROP FOREIGN KEY FK_564EB638B03A8386');
$this->addSql('ALTER TABLE organisation_page ADD CONSTRAINT FK_564EB638896DBBDE FOREIGN KEY (updated_by_id) REFERENCES users (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE organisation_page ADD CONSTRAINT FK_564EB638B03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE organisation_page_type DROP FOREIGN KEY FK_EE569F2BB03A8386');
$this->addSql('ALTER TABLE organisation_page_type ADD CONSTRAINT FK_EE569F2BB03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE organisation_success_history DROP FOREIGN KEY FK_7D3B61C9896DBBDE');
$this->addSql('ALTER TABLE organisation_success_history DROP FOREIGN KEY FK_7D3B61C9B03A8386');
$this->addSql('ALTER TABLE organisation_success_history ADD CONSTRAINT FK_7D3B61C9896DBBDE FOREIGN KEY (updated_by_id) REFERENCES users (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE organisation_success_history ADD CONSTRAINT FK_7D3B61C9B03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE scholar_achievement DROP FOREIGN KEY FK_51294918896DBBDE');
$this->addSql('ALTER TABLE scholar_achievement DROP FOREIGN KEY FK_51294918B03A8386');
$this->addSql('ALTER TABLE scholar_achievement ADD CONSTRAINT FK_51294918896DBBDE FOREIGN KEY (updated_by_id) REFERENCES users (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE scholar_achievement ADD CONSTRAINT FK_51294918B03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE scholar_competence DROP FOREIGN KEY FK_194A3504896DBBDE');
$this->addSql('ALTER TABLE scholar_competence DROP FOREIGN KEY FK_194A3504B03A8386');
$this->addSql('ALTER TABLE scholar_competence ADD CONSTRAINT FK_194A3504896DBBDE FOREIGN KEY (updated_by_id) REFERENCES users (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE scholar_competence ADD CONSTRAINT FK_194A3504B03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE scholar_profile DROP FOREIGN KEY FK_14FBF773896DBBDE');
$this->addSql('ALTER TABLE scholar_profile DROP FOREIGN KEY FK_14FBF773B03A8386');
$this->addSql('ALTER TABLE scholar_profile ADD CONSTRAINT FK_14FBF773896DBBDE FOREIGN KEY (updated_by_id) REFERENCES users (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE scholar_profile ADD CONSTRAINT FK_14FBF773B03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE specialty DROP FOREIGN KEY FK_E066A6EC896DBBDE');
$this->addSql('ALTER TABLE specialty DROP FOREIGN KEY FK_E066A6ECB03A8386');
$this->addSql('ALTER TABLE specialty ADD CONSTRAINT FK_E066A6EC896DBBDE FOREIGN KEY (updated_by_id) REFERENCES users (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE specialty ADD CONSTRAINT FK_E066A6ECB03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE static_page DROP FOREIGN KEY FK_8FA4EF95896DBBDE');
$this->addSql('ALTER TABLE static_page DROP FOREIGN KEY FK_8FA4EF95B03A8386');
$this->addSql('ALTER TABLE static_page ADD CONSTRAINT FK_8FA4EF95896DBBDE FOREIGN KEY (updated_by_id) REFERENCES users (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE static_page ADD CONSTRAINT FK_8FA4EF95B03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE subscribe_subscription DROP FOREIGN KEY FK_AC1B261A896DBBDE');
$this->addSql('ALTER TABLE subscribe_subscription DROP FOREIGN KEY FK_AC1B261AB03A8386');
$this->addSql('ALTER TABLE subscribe_subscription ADD CONSTRAINT FK_AC1B261A896DBBDE FOREIGN KEY (updated_by_id) REFERENCES users (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE subscribe_subscription ADD CONSTRAINT FK_AC1B261AB03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE university_category DROP FOREIGN KEY FK_BE513B6B896DBBDE');
$this->addSql('ALTER TABLE university_category DROP FOREIGN KEY FK_BE513B6BB03A8386');
$this->addSql('ALTER TABLE university_category ADD CONSTRAINT FK_BE513B6B896DBBDE FOREIGN KEY (updated_by_id) REFERENCES users (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE university_category ADD CONSTRAINT FK_BE513B6BB03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE university_olymp_privilegy DROP FOREIGN KEY FK_C6CDC01C896DBBDE');
$this->addSql('ALTER TABLE university_olymp_privilegy DROP FOREIGN KEY FK_C6CDC01CB03A8386');
$this->addSql('ALTER TABLE university_olymp_privilegy ADD CONSTRAINT FK_C6CDC01C896DBBDE FOREIGN KEY (updated_by_id) REFERENCES users (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE university_olymp_privilegy ADD CONSTRAINT FK_C6CDC01CB03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE user_rights DROP FOREIGN KEY FK_6432CA3E896DBBDE');
$this->addSql('ALTER TABLE user_rights DROP FOREIGN KEY FK_6432CA3EB03A8386');
$this->addSql('ALTER TABLE user_rights ADD CONSTRAINT FK_6432CA3E896DBBDE FOREIGN KEY (updated_by_id) REFERENCES users (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE user_rights ADD CONSTRAINT FK_6432CA3EB03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE users DROP FOREIGN KEY FK_1483A5E9896DBBDE');
$this->addSql('ALTER TABLE users DROP FOREIGN KEY FK_1483A5E9B03A8386');
$this->addSql('ALTER TABLE users ADD CONSTRAINT FK_1483A5E9896DBBDE FOREIGN KEY (updated_by_id) REFERENCES users (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE users ADD CONSTRAINT FK_1483A5E9B03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id) ON DELETE SET NULL');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE olymp_online_participant_message');
$this->addSql('ALTER TABLE contacts DROP FOREIGN KEY FK_33401573B03A8386');
$this->addSql('ALTER TABLE contacts DROP FOREIGN KEY FK_33401573896DBBDE');
$this->addSql('ALTER TABLE contacts ADD CONSTRAINT FK_33401573B03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE contacts ADD CONSTRAINT FK_33401573896DBBDE FOREIGN KEY (updated_by_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE content_faq DROP FOREIGN KEY FK_5D142339B03A8386');
$this->addSql('ALTER TABLE content_faq DROP FOREIGN KEY FK_5D142339896DBBDE');
$this->addSql('ALTER TABLE content_faq ADD CONSTRAINT FK_5D142339B03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE content_faq ADD CONSTRAINT FK_5D142339896DBBDE FOREIGN KEY (updated_by_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE content_textblock DROP FOREIGN KEY FK_E9A7D10FB03A8386');
$this->addSql('ALTER TABLE content_textblock DROP FOREIGN KEY FK_E9A7D10F896DBBDE');
$this->addSql('ALTER TABLE content_textblock ADD CONSTRAINT FK_E9A7D10FB03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE content_textblock ADD CONSTRAINT FK_E9A7D10F896DBBDE FOREIGN KEY (updated_by_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE federal_district DROP FOREIGN KEY FK_1A878A05B03A8386');
$this->addSql('ALTER TABLE federal_district DROP FOREIGN KEY FK_1A878A05896DBBDE');
$this->addSql('ALTER TABLE federal_district ADD CONSTRAINT FK_1A878A05B03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE federal_district ADD CONSTRAINT FK_1A878A05896DBBDE FOREIGN KEY (updated_by_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE federal_region DROP FOREIGN KEY FK_E9720525B03A8386');
$this->addSql('ALTER TABLE federal_region DROP FOREIGN KEY FK_E9720525896DBBDE');
$this->addSql('ALTER TABLE federal_region ADD CONSTRAINT FK_E9720525B03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE federal_region ADD CONSTRAINT FK_E9720525896DBBDE FOREIGN KEY (updated_by_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE files DROP FOREIGN KEY FK_6354059B03A8386');
$this->addSql('ALTER TABLE files ADD CONSTRAINT FK_6354059B03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE forum_post DROP FOREIGN KEY FK_996BCC5AB03A8386');
$this->addSql('ALTER TABLE forum_post DROP FOREIGN KEY FK_996BCC5A896DBBDE');
$this->addSql('ALTER TABLE forum_post ADD CONSTRAINT FK_996BCC5AB03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE forum_post ADD CONSTRAINT FK_996BCC5A896DBBDE FOREIGN KEY (updated_by_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE forum_thread DROP FOREIGN KEY FK_298F7F52B03A8386');
$this->addSql('ALTER TABLE forum_thread DROP FOREIGN KEY FK_298F7F52896DBBDE');
$this->addSql('ALTER TABLE forum_thread ADD CONSTRAINT FK_298F7F52B03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE forum_thread ADD CONSTRAINT FK_298F7F52896DBBDE FOREIGN KEY (updated_by_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE gallery_album DROP FOREIGN KEY FK_DD05BE60B03A8386');
$this->addSql('ALTER TABLE gallery_album DROP FOREIGN KEY FK_DD05BE60896DBBDE');
$this->addSql('ALTER TABLE gallery_album ADD CONSTRAINT FK_DD05BE60B03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE gallery_album ADD CONSTRAINT FK_DD05BE60896DBBDE FOREIGN KEY (updated_by_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE gallery_photo DROP FOREIGN KEY FK_F02A543BB03A8386');
$this->addSql('ALTER TABLE gallery_photo DROP FOREIGN KEY FK_F02A543B896DBBDE');
$this->addSql('ALTER TABLE gallery_photo ADD CONSTRAINT FK_F02A543BB03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE gallery_photo ADD CONSTRAINT FK_F02A543B896DBBDE FOREIGN KEY (updated_by_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE gallery_video DROP FOREIGN KEY FK_985A0A0FB03A8386');
$this->addSql('ALTER TABLE gallery_video DROP FOREIGN KEY FK_985A0A0F896DBBDE');
$this->addSql('ALTER TABLE gallery_video ADD CONSTRAINT FK_985A0A0FB03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE gallery_video ADD CONSTRAINT FK_985A0A0F896DBBDE FOREIGN KEY (updated_by_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE links DROP FOREIGN KEY FK_D182A118B03A8386');
$this->addSql('ALTER TABLE links DROP FOREIGN KEY FK_D182A118896DBBDE');
$this->addSql('ALTER TABLE links ADD CONSTRAINT FK_D182A118B03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE links ADD CONSTRAINT FK_D182A118896DBBDE FOREIGN KEY (updated_by_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE material DROP FOREIGN KEY FK_7CBE7595B03A8386');
$this->addSql('ALTER TABLE material DROP FOREIGN KEY FK_7CBE7595896DBBDE');
$this->addSql('ALTER TABLE material ADD CONSTRAINT FK_7CBE7595B03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE material ADD CONSTRAINT FK_7CBE7595896DBBDE FOREIGN KEY (updated_by_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE news DROP FOREIGN KEY FK_1DD39950B03A8386');
$this->addSql('ALTER TABLE news DROP FOREIGN KEY FK_1DD39950896DBBDE');
$this->addSql('ALTER TABLE news ADD CONSTRAINT FK_1DD39950B03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE news ADD CONSTRAINT FK_1DD39950896DBBDE FOREIGN KEY (updated_by_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE olymp_online DROP FOREIGN KEY FK_8A90EECFB03A8386');
$this->addSql('ALTER TABLE olymp_online DROP FOREIGN KEY FK_8A90EECF896DBBDE');
$this->addSql('ALTER TABLE olymp_online ADD CONSTRAINT FK_8A90EECFB03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE olymp_online ADD CONSTRAINT FK_8A90EECF896DBBDE FOREIGN KEY (updated_by_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE olymp_online_category DROP FOREIGN KEY FK_894BE6E9B03A8386');
$this->addSql('ALTER TABLE olymp_online_category DROP FOREIGN KEY FK_894BE6E9896DBBDE');
$this->addSql('ALTER TABLE olymp_online_category ADD CONSTRAINT FK_894BE6E9B03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE olymp_online_category ADD CONSTRAINT FK_894BE6E9896DBBDE FOREIGN KEY (updated_by_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE olymp_online_direction DROP FOREIGN KEY FK_B707EB6B03A8386');
$this->addSql('ALTER TABLE olymp_online_direction DROP FOREIGN KEY FK_B707EB6896DBBDE');
$this->addSql('ALTER TABLE olymp_online_direction ADD CONSTRAINT FK_B707EB6B03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE olymp_online_direction ADD CONSTRAINT FK_B707EB6896DBBDE FOREIGN KEY (updated_by_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE olympiad DROP FOREIGN KEY FK_77700B8EB03A8386');
$this->addSql('ALTER TABLE olympiad DROP FOREIGN KEY FK_77700B8E896DBBDE');
$this->addSql('ALTER TABLE olympiad DROP subtitle');
$this->addSql('ALTER TABLE olympiad ADD CONSTRAINT FK_77700B8EB03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE olympiad ADD CONSTRAINT FK_77700B8E896DBBDE FOREIGN KEY (updated_by_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE olympiad_category DROP FOREIGN KEY FK_213E7678B03A8386');
$this->addSql('ALTER TABLE olympiad_category ADD CONSTRAINT FK_213E7678B03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE olympiad_discipline DROP FOREIGN KEY FK_9DB4A075B03A8386');
$this->addSql('ALTER TABLE olympiad_discipline ADD CONSTRAINT FK_9DB4A075B03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE olympiad_grade DROP FOREIGN KEY FK_BA89D858B03A8386');
$this->addSql('ALTER TABLE olympiad_grade DROP FOREIGN KEY FK_BA89D858896DBBDE');
$this->addSql('ALTER TABLE olympiad_grade ADD CONSTRAINT FK_BA89D858B03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE olympiad_grade ADD CONSTRAINT FK_BA89D858896DBBDE FOREIGN KEY (updated_by_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE olympiad_level DROP FOREIGN KEY FK_7939BA7FB03A8386');
$this->addSql('ALTER TABLE olympiad_level ADD CONSTRAINT FK_7939BA7FB03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE olympiad_reviews DROP FOREIGN KEY FK_195EF87EB03A8386');
$this->addSql('ALTER TABLE olympiad_reviews DROP FOREIGN KEY FK_195EF87E896DBBDE');
$this->addSql('ALTER TABLE olympiad_reviews ADD CONSTRAINT FK_195EF87EB03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE olympiad_reviews ADD CONSTRAINT FK_195EF87E896DBBDE FOREIGN KEY (updated_by_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE olympiad_stage DROP FOREIGN KEY FK_21AFE505B03A8386');
$this->addSql('ALTER TABLE olympiad_stage DROP FOREIGN KEY FK_21AFE505896DBBDE');
$this->addSql('ALTER TABLE olympiad_stage ADD CONSTRAINT FK_21AFE505B03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE olympiad_stage ADD CONSTRAINT FK_21AFE505896DBBDE FOREIGN KEY (updated_by_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE olympiad_translation DROP subtitle');
$this->addSql('ALTER TABLE organisation DROP FOREIGN KEY FK_E6E132B4B03A8386');
$this->addSql('ALTER TABLE organisation DROP FOREIGN KEY FK_E6E132B4896DBBDE');
$this->addSql('ALTER TABLE organisation ADD CONSTRAINT FK_E6E132B4B03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE organisation ADD CONSTRAINT FK_E6E132B4896DBBDE FOREIGN KEY (updated_by_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE organisation_page DROP FOREIGN KEY FK_564EB638B03A8386');
$this->addSql('ALTER TABLE organisation_page DROP FOREIGN KEY FK_564EB638896DBBDE');
$this->addSql('ALTER TABLE organisation_page ADD CONSTRAINT FK_564EB638B03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE organisation_page ADD CONSTRAINT FK_564EB638896DBBDE FOREIGN KEY (updated_by_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE organisation_page_type DROP FOREIGN KEY FK_EE569F2BB03A8386');
$this->addSql('ALTER TABLE organisation_page_type ADD CONSTRAINT FK_EE569F2BB03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE organisation_success_history DROP FOREIGN KEY FK_7D3B61C9B03A8386');
$this->addSql('ALTER TABLE organisation_success_history DROP FOREIGN KEY FK_7D3B61C9896DBBDE');
$this->addSql('ALTER TABLE organisation_success_history ADD CONSTRAINT FK_7D3B61C9B03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE organisation_success_history ADD CONSTRAINT FK_7D3B61C9896DBBDE FOREIGN KEY (updated_by_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE scholar_achievement DROP FOREIGN KEY FK_51294918B03A8386');
$this->addSql('ALTER TABLE scholar_achievement DROP FOREIGN KEY FK_51294918896DBBDE');
$this->addSql('ALTER TABLE scholar_achievement ADD CONSTRAINT FK_51294918B03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE scholar_achievement ADD CONSTRAINT FK_51294918896DBBDE FOREIGN KEY (updated_by_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE scholar_competence DROP FOREIGN KEY FK_194A3504B03A8386');
$this->addSql('ALTER TABLE scholar_competence DROP FOREIGN KEY FK_194A3504896DBBDE');
$this->addSql('ALTER TABLE scholar_competence ADD CONSTRAINT FK_194A3504B03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE scholar_competence ADD CONSTRAINT FK_194A3504896DBBDE FOREIGN KEY (updated_by_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE scholar_profile DROP FOREIGN KEY FK_14FBF773B03A8386');
$this->addSql('ALTER TABLE scholar_profile DROP FOREIGN KEY FK_14FBF773896DBBDE');
$this->addSql('ALTER TABLE scholar_profile ADD CONSTRAINT FK_14FBF773B03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE scholar_profile ADD CONSTRAINT FK_14FBF773896DBBDE FOREIGN KEY (updated_by_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE specialty DROP FOREIGN KEY FK_E066A6ECB03A8386');
$this->addSql('ALTER TABLE specialty DROP FOREIGN KEY FK_E066A6EC896DBBDE');
$this->addSql('ALTER TABLE specialty ADD CONSTRAINT FK_E066A6ECB03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE specialty ADD CONSTRAINT FK_E066A6EC896DBBDE FOREIGN KEY (updated_by_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE static_page DROP FOREIGN KEY FK_8FA4EF95B03A8386');
$this->addSql('ALTER TABLE static_page DROP FOREIGN KEY FK_8FA4EF95896DBBDE');
$this->addSql('ALTER TABLE static_page ADD CONSTRAINT FK_8FA4EF95B03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE static_page ADD CONSTRAINT FK_8FA4EF95896DBBDE FOREIGN KEY (updated_by_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE subscribe_subscription DROP FOREIGN KEY FK_AC1B261AB03A8386');
$this->addSql('ALTER TABLE subscribe_subscription DROP FOREIGN KEY FK_AC1B261A896DBBDE');
$this->addSql('ALTER TABLE subscribe_subscription ADD CONSTRAINT FK_AC1B261AB03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE subscribe_subscription ADD CONSTRAINT FK_AC1B261A896DBBDE FOREIGN KEY (updated_by_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE university_category DROP FOREIGN KEY FK_BE513B6BB03A8386');
$this->addSql('ALTER TABLE university_category DROP FOREIGN KEY FK_BE513B6B896DBBDE');
$this->addSql('ALTER TABLE university_category ADD CONSTRAINT FK_BE513B6BB03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE university_category ADD CONSTRAINT FK_BE513B6B896DBBDE FOREIGN KEY (updated_by_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE university_olymp_privilegy DROP FOREIGN KEY FK_C6CDC01CB03A8386');
$this->addSql('ALTER TABLE university_olymp_privilegy DROP FOREIGN KEY FK_C6CDC01C896DBBDE');
$this->addSql('ALTER TABLE university_olymp_privilegy ADD CONSTRAINT FK_C6CDC01CB03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE university_olymp_privilegy ADD CONSTRAINT FK_C6CDC01C896DBBDE FOREIGN KEY (updated_by_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE user_rights DROP FOREIGN KEY FK_6432CA3EB03A8386');
$this->addSql('ALTER TABLE user_rights DROP FOREIGN KEY FK_6432CA3E896DBBDE');
$this->addSql('ALTER TABLE user_rights ADD CONSTRAINT FK_6432CA3EB03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE user_rights ADD CONSTRAINT FK_6432CA3E896DBBDE FOREIGN KEY (updated_by_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE users DROP FOREIGN KEY FK_1483A5E9B03A8386');
$this->addSql('ALTER TABLE users DROP FOREIGN KEY FK_1483A5E9896DBBDE');
$this->addSql('ALTER TABLE users ADD CONSTRAINT FK_1483A5E9B03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE users ADD CONSTRAINT FK_1483A5E9896DBBDE FOREIGN KEY (updated_by_id) REFERENCES users (id)');
}
}