nineskeletor/migrations/Version20230203163146.php
afornerot eef04429ee
Some checks failed
Cadoles/nineskeletor/pipeline/head There was a failure building this commit
svg
2023-02-16 17:03:53 +01:00

246 lines
25 KiB
PHP

<?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 Version20230203163146 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 SEQUENCE Blog_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE SEQUENCE Page_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE SEQUENCE audit_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE SEQUENCE blogtype_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE SEQUENCE child_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE SEQUENCE childheader_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE SEQUENCE cron_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE SEQUENCE groupe_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE SEQUENCE menu_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE SEQUENCE menuchild_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE SEQUENCE niveau01_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE SEQUENCE niveau02_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE SEQUENCE niveau03_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE SEQUENCE niveau04_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE SEQUENCE pagetype_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE SEQUENCE pin_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE SEQUENCE registration_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE SEQUENCE useraccount_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE SEQUENCE usergroupe_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE SEQUENCE usermodo_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE SEQUENCE whitelist_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE TABLE Blog (id INT NOT NULL, blogtype_id INT DEFAULT NULL, name VARCHAR(255) NOT NULL, submitdate TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, externalcode VARCHAR(255) DEFAULT NULL, externalid VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE INDEX IDX_6027FE7DA930CED1 ON Blog (blogtype_id)');
$this->addSql('CREATE TABLE Page (id INT NOT NULL, pagetype_id INT DEFAULT NULL, name VARCHAR(255) NOT NULL, submitdate TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, externalcode VARCHAR(255) DEFAULT NULL, externalid VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE INDEX IDX_B438191E53A99D0E ON Page (pagetype_id)');
$this->addSql('CREATE TABLE audit (id INT NOT NULL, entityname VARCHAR(250) NOT NULL, entityid VARCHAR(250) NOT NULL, datesubmit TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, username VARCHAR(250) NOT NULL, description TEXT DEFAULT NULL, detail TEXT DEFAULT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE INDEX search_idx ON audit (entityname, entityid, datesubmit)');
$this->addSql('COMMENT ON COLUMN audit.detail IS \'(DC2Type:array)\'');
$this->addSql('CREATE TABLE blogtype (id INT NOT NULL, name VARCHAR(255) NOT NULL, description TEXT DEFAULT NULL, sortby VARCHAR(255) NOT NULL, image VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE TABLE child (id INT NOT NULL, blog_id INT DEFAULT NULL, page_id INT DEFAULT NULL, childtype_id INT DEFAULT NULL, name VARCHAR(255) NOT NULL, subname VARCHAR(255) DEFAULT NULL, description TEXT DEFAULT NULL, submitdate TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, filename VARCHAR(255) DEFAULT NULL, fileextention VARCHAR(255) DEFAULT NULL, fileminetype VARCHAR(255) DEFAULT NULL, url VARCHAR(255) DEFAULT NULL, externalcode VARCHAR(255) DEFAULT NULL, externalid VARCHAR(255) DEFAULT NULL, externalscript VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE INDEX IDX_22B35429DAE07E97 ON child (blog_id)');
$this->addSql('CREATE INDEX IDX_22B35429C4663E4 ON child (page_id)');
$this->addSql('CREATE INDEX IDX_22B35429552AAF4C ON child (childtype_id)');
$this->addSql('CREATE TABLE childtag (child INT NOT NULL, tag VARCHAR(255) NOT NULL, PRIMARY KEY(child, tag))');
$this->addSql('CREATE INDEX IDX_B8AAB0A822B35429 ON childtag (child)');
$this->addSql('CREATE INDEX IDX_B8AAB0A8389B783 ON childtag (tag)');
$this->addSql('CREATE TABLE childpin (child INT NOT NULL, pin INT NOT NULL, PRIMARY KEY(child, pin))');
$this->addSql('CREATE INDEX IDX_EA62AD822B35429 ON childpin (child)');
$this->addSql('CREATE INDEX IDX_EA62AD8B5852DF3 ON childpin (pin)');
$this->addSql('CREATE TABLE childheader (id INT NOT NULL, child_id INT DEFAULT NULL, filename VARCHAR(255) NOT NULL, roworder INT NOT NULL, credit VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE INDEX IDX_B74CE6CEDD62C21B ON childheader (child_id)');
$this->addSql('CREATE TABLE childtype (id INT NOT NULL, name VARCHAR(255) NOT NULL, roworder INT NOT NULL, submitroute VARCHAR(255) NOT NULL, havechildheader BOOLEAN NOT NULL, havefile BOOLEAN NOT NULL, haveurl BOOLEAN NOT NULL, havepin BOOLEAN NOT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE TABLE config (id VARCHAR(255) NOT NULL, title VARCHAR(250) NOT NULL, value TEXT DEFAULT NULL, defaultvalue TEXT NOT NULL, roworder VARCHAR(255) NOT NULL, visible BOOLEAN NOT NULL, changeable BOOLEAN NOT NULL, required BOOLEAN NOT NULL, type VARCHAR(255) NOT NULL, grouped VARCHAR(255) NOT NULL, category VARCHAR(255) NOT NULL, help TEXT NOT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE TABLE cron (id INT NOT NULL, command VARCHAR(255) NOT NULL, description TEXT DEFAULT NULL, statut INT DEFAULT NULL, submitdate TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, startexecdate TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, endexecdate TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, nextexecdate TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, repeatinterval INT DEFAULT NULL, jsonargument TEXT DEFAULT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE TABLE groupe (id INT NOT NULL, owner_id INT DEFAULT NULL, label VARCHAR(250) NOT NULL, description TEXT DEFAULT NULL, email VARCHAR(250) DEFAULT NULL, isopen BOOLEAN DEFAULT false NOT NULL, isworkgroup BOOLEAN DEFAULT false NOT NULL, apikey VARCHAR(255) NOT NULL, ldapfilter TEXT DEFAULT NULL, attributes TEXT DEFAULT NULL, idexternal TEXT DEFAULT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE UNIQUE INDEX UNIQ_4B98C21EA750E8 ON groupe (label)');
$this->addSql('CREATE INDEX IDX_4B98C217E3C61F9 ON groupe (owner_id)');
$this->addSql('CREATE TABLE menu (id INT NOT NULL, name VARCHAR(255) NOT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE TABLE menuchild (id INT NOT NULL, menu_id INT DEFAULT NULL, blog_id INT DEFAULT NULL, page_id INT DEFAULT NULL, blogtype_id INT DEFAULT NULL, pagetype_id INT DEFAULT NULL, childtype VARCHAR(255) NOT NULL, roworder INT NOT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE INDEX IDX_B7D9D47CCCD7E912 ON menuchild (menu_id)');
$this->addSql('CREATE INDEX IDX_B7D9D47CDAE07E97 ON menuchild (blog_id)');
$this->addSql('CREATE INDEX IDX_B7D9D47CC4663E4 ON menuchild (page_id)');
$this->addSql('CREATE INDEX IDX_B7D9D47CA930CED1 ON menuchild (blogtype_id)');
$this->addSql('CREATE INDEX IDX_B7D9D47C53A99D0E ON menuchild (pagetype_id)');
$this->addSql('CREATE TABLE niveau01 (id INT NOT NULL, label VARCHAR(250) NOT NULL, code TEXT DEFAULT NULL, postaladress TEXT DEFAULT NULL, telephonenumber VARCHAR(60) DEFAULT NULL, email VARCHAR(60) DEFAULT NULL, apikey VARCHAR(255) NOT NULL, ldapfilter TEXT DEFAULT NULL, attributes TEXT DEFAULT NULL, idexternal TEXT DEFAULT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE UNIQUE INDEX UNIQ_6DFC7E23EA750E8 ON niveau01 (label)');
$this->addSql('CREATE TABLE niveau02 (id INT NOT NULL, niveau01_id INT NOT NULL, label VARCHAR(250) NOT NULL, code TEXT DEFAULT NULL, postaladress TEXT DEFAULT NULL, telephonenumber VARCHAR(60) DEFAULT NULL, email VARCHAR(60) DEFAULT NULL, apikey VARCHAR(255) NOT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE UNIQUE INDEX UNIQ_F4F52F99EA750E8 ON niveau02 (label)');
$this->addSql('CREATE INDEX IDX_F4F52F9959FDD7AB ON niveau02 (niveau01_id)');
$this->addSql('CREATE TABLE niveau03 (id INT NOT NULL, niveau02_id INT NOT NULL, label VARCHAR(250) NOT NULL, code TEXT DEFAULT NULL, postaladress TEXT DEFAULT NULL, telephonenumber VARCHAR(60) DEFAULT NULL, email VARCHAR(60) DEFAULT NULL, apikey VARCHAR(255) NOT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE UNIQUE INDEX UNIQ_83F21F0FEA750E8 ON niveau03 (label)');
$this->addSql('CREATE INDEX IDX_83F21F0F4B487845 ON niveau03 (niveau02_id)');
$this->addSql('CREATE TABLE niveau04 (id INT NOT NULL, niveau03_id INT NOT NULL, label VARCHAR(250) NOT NULL, code TEXT DEFAULT NULL, postaladress TEXT DEFAULT NULL, telephonenumber VARCHAR(60) DEFAULT NULL, email VARCHAR(60) DEFAULT NULL, apikey VARCHAR(255) NOT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE UNIQUE INDEX UNIQ_1D968AACEA750E8 ON niveau04 (label)');
$this->addSql('CREATE INDEX IDX_1D968AACF3F41F20 ON niveau04 (niveau03_id)');
$this->addSql('CREATE TABLE pagetype (id INT NOT NULL, name VARCHAR(255) NOT NULL, description TEXT DEFAULT NULL, sortby VARCHAR(255) NOT NULL, image VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE TABLE pin (id INT NOT NULL, name VARCHAR(255) NOT NULL, subname VARCHAR(255) DEFAULT NULL, description TEXT DEFAULT NULL, image VARCHAR(255) DEFAULT NULL, submitdate TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE TABLE registration (id INT NOT NULL, niveau01_id INT NOT NULL, niveau02_id INT DEFAULT NULL, niveau03_id INT DEFAULT NULL, niveau04_id INT DEFAULT NULL, username VARCHAR(128) NOT NULL, firstname VARCHAR(250) DEFAULT NULL, lastname VARCHAR(250) DEFAULT NULL, password VARCHAR(250) NOT NULL, salt VARCHAR(250) NOT NULL, email VARCHAR(128) NOT NULL, isvisible BOOLEAN NOT NULL, postaladress VARCHAR(250) DEFAULT NULL, telephonenumber VARCHAR(60) DEFAULT NULL, job VARCHAR(250) DEFAULT NULL, position VARCHAR(250) DEFAULT NULL, motivation TEXT DEFAULT NULL, note TEXT DEFAULT NULL, keyexpire TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, keyvalue VARCHAR(60) DEFAULT NULL, statut INT NOT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE UNIQUE INDEX UNIQ_62A8A7A7F85E0677 ON registration (username)');
$this->addSql('CREATE UNIQUE INDEX UNIQ_62A8A7A7E7927C74 ON registration (email)');
$this->addSql('CREATE INDEX IDX_62A8A7A759FDD7AB ON registration (niveau01_id)');
$this->addSql('CREATE INDEX IDX_62A8A7A74B487845 ON registration (niveau02_id)');
$this->addSql('CREATE INDEX IDX_62A8A7A7F3F41F20 ON registration (niveau03_id)');
$this->addSql('CREATE INDEX IDX_62A8A7A76E232799 ON registration (niveau04_id)');
$this->addSql('CREATE TABLE tag (id VARCHAR(255) NOT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE TABLE useraccount (id INT NOT NULL, niveau01_id INT NOT NULL, niveau02_id INT DEFAULT NULL, niveau03_id INT DEFAULT NULL, niveau04_id INT DEFAULT NULL, username VARCHAR(128) NOT NULL, apikey VARCHAR(255) NOT NULL, firstname VARCHAR(250) DEFAULT NULL, lastname VARCHAR(250) DEFAULT NULL, roles TEXT NOT NULL, password VARCHAR(250) NOT NULL, salt VARCHAR(250) NOT NULL, isactive BOOLEAN NOT NULL, email VARCHAR(128) NOT NULL, avatar VARCHAR(250) DEFAULT \'0\', isvisible BOOLEAN NOT NULL, postaladress TEXT DEFAULT NULL, telephonenumber VARCHAR(60) DEFAULT NULL, job VARCHAR(250) DEFAULT NULL, position VARCHAR(250) DEFAULT NULL, motivation TEXT DEFAULT NULL, note TEXT DEFAULT NULL, preference TEXT DEFAULT NULL, keyexpire TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, keyvalue VARCHAR(60) DEFAULT NULL, visitedate TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, visitecpt INT DEFAULT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE UNIQUE INDEX UNIQ_E157AA1AF85E0677 ON useraccount (username)');
$this->addSql('CREATE UNIQUE INDEX UNIQ_E157AA1AE7927C74 ON useraccount (email)');
$this->addSql('CREATE INDEX IDX_E157AA1A59FDD7AB ON useraccount (niveau01_id)');
$this->addSql('CREATE INDEX IDX_E157AA1A4B487845 ON useraccount (niveau02_id)');
$this->addSql('CREATE INDEX IDX_E157AA1AF3F41F20 ON useraccount (niveau03_id)');
$this->addSql('CREATE INDEX IDX_E157AA1A6E232799 ON useraccount (niveau04_id)');
$this->addSql('COMMENT ON COLUMN useraccount.roles IS \'(DC2Type:array)\'');
$this->addSql('COMMENT ON COLUMN useraccount.preference IS \'(DC2Type:array)\'');
$this->addSql('CREATE TABLE usergroupe (id INT NOT NULL, user_id INT DEFAULT NULL, group_id INT DEFAULT NULL, rolegroup INT NOT NULL, apikey VARCHAR(60) NOT NULL, visitedate TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, visitecpt INT DEFAULT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE INDEX IDX_6C439BE5A76ED395 ON usergroupe (user_id)');
$this->addSql('CREATE INDEX IDX_6C439BE5FE54D947 ON usergroupe (group_id)');
$this->addSql('CREATE UNIQUE INDEX UNIQ_6C439BE5A76ED395FE54D947 ON usergroupe (user_id, group_id)');
$this->addSql('CREATE TABLE usermodo (id INT NOT NULL, user_id INT NOT NULL, niveau01_id INT NOT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE INDEX IDX_D162D6C4A76ED395 ON usermodo (user_id)');
$this->addSql('CREATE INDEX IDX_D162D6C459FDD7AB ON usermodo (niveau01_id)');
$this->addSql('CREATE TABLE whitelist (id INT NOT NULL, label VARCHAR(250) NOT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE UNIQUE INDEX UNIQ_CB069864EA750E8 ON whitelist (label)');
$this->addSql('CREATE TABLE messenger_messages (id BIGSERIAL NOT NULL, body TEXT NOT NULL, headers TEXT NOT NULL, queue_name VARCHAR(190) NOT NULL, created_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, available_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, delivered_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE INDEX IDX_75EA56E0FB7336F0 ON messenger_messages (queue_name)');
$this->addSql('CREATE INDEX IDX_75EA56E0E3BD61CE ON messenger_messages (available_at)');
$this->addSql('CREATE INDEX IDX_75EA56E016BA31DB ON messenger_messages (delivered_at)');
$this->addSql('CREATE OR REPLACE FUNCTION notify_messenger_messages() RETURNS TRIGGER AS $$
BEGIN
PERFORM pg_notify(\'messenger_messages\', NEW.queue_name::text);
RETURN NEW;
END;
$$ LANGUAGE plpgsql;');
$this->addSql('DROP TRIGGER IF EXISTS notify_trigger ON messenger_messages;');
$this->addSql('CREATE TRIGGER notify_trigger AFTER INSERT OR UPDATE ON messenger_messages FOR EACH ROW EXECUTE PROCEDURE notify_messenger_messages();');
$this->addSql('ALTER TABLE Blog ADD CONSTRAINT FK_6027FE7DA930CED1 FOREIGN KEY (blogtype_id) REFERENCES blogtype (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE Page ADD CONSTRAINT FK_B438191E53A99D0E FOREIGN KEY (pagetype_id) REFERENCES pagetype (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE child ADD CONSTRAINT FK_22B35429DAE07E97 FOREIGN KEY (blog_id) REFERENCES Blog (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE child ADD CONSTRAINT FK_22B35429C4663E4 FOREIGN KEY (page_id) REFERENCES Page (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE child ADD CONSTRAINT FK_22B35429552AAF4C FOREIGN KEY (childtype_id) REFERENCES childtype (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE childtag ADD CONSTRAINT FK_B8AAB0A822B35429 FOREIGN KEY (child) REFERENCES child (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE childtag ADD CONSTRAINT FK_B8AAB0A8389B783 FOREIGN KEY (tag) REFERENCES tag (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE childpin ADD CONSTRAINT FK_EA62AD822B35429 FOREIGN KEY (child) REFERENCES child (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE childpin ADD CONSTRAINT FK_EA62AD8B5852DF3 FOREIGN KEY (pin) REFERENCES pin (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE childheader ADD CONSTRAINT FK_B74CE6CEDD62C21B FOREIGN KEY (child_id) REFERENCES child (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE groupe ADD CONSTRAINT FK_4B98C217E3C61F9 FOREIGN KEY (owner_id) REFERENCES useraccount (id) ON DELETE SET NULL NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE menuchild ADD CONSTRAINT FK_B7D9D47CCCD7E912 FOREIGN KEY (menu_id) REFERENCES menu (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE menuchild ADD CONSTRAINT FK_B7D9D47CDAE07E97 FOREIGN KEY (blog_id) REFERENCES Blog (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE menuchild ADD CONSTRAINT FK_B7D9D47CC4663E4 FOREIGN KEY (page_id) REFERENCES Page (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE menuchild ADD CONSTRAINT FK_B7D9D47CA930CED1 FOREIGN KEY (blogtype_id) REFERENCES blogtype (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE menuchild ADD CONSTRAINT FK_B7D9D47C53A99D0E FOREIGN KEY (pagetype_id) REFERENCES pagetype (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE niveau02 ADD CONSTRAINT FK_F4F52F9959FDD7AB FOREIGN KEY (niveau01_id) REFERENCES niveau01 (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE niveau03 ADD CONSTRAINT FK_83F21F0F4B487845 FOREIGN KEY (niveau02_id) REFERENCES niveau02 (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE niveau04 ADD CONSTRAINT FK_1D968AACF3F41F20 FOREIGN KEY (niveau03_id) REFERENCES niveau03 (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE registration ADD CONSTRAINT FK_62A8A7A759FDD7AB FOREIGN KEY (niveau01_id) REFERENCES niveau01 (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE registration ADD CONSTRAINT FK_62A8A7A74B487845 FOREIGN KEY (niveau02_id) REFERENCES niveau02 (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE registration ADD CONSTRAINT FK_62A8A7A7F3F41F20 FOREIGN KEY (niveau03_id) REFERENCES niveau03 (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE registration ADD CONSTRAINT FK_62A8A7A76E232799 FOREIGN KEY (niveau04_id) REFERENCES niveau04 (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE useraccount ADD CONSTRAINT FK_E157AA1A59FDD7AB FOREIGN KEY (niveau01_id) REFERENCES niveau01 (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE useraccount ADD CONSTRAINT FK_E157AA1A4B487845 FOREIGN KEY (niveau02_id) REFERENCES niveau02 (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE useraccount ADD CONSTRAINT FK_E157AA1AF3F41F20 FOREIGN KEY (niveau03_id) REFERENCES niveau03 (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE useraccount ADD CONSTRAINT FK_E157AA1A6E232799 FOREIGN KEY (niveau04_id) REFERENCES niveau04 (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE usergroupe ADD CONSTRAINT FK_6C439BE5A76ED395 FOREIGN KEY (user_id) REFERENCES useraccount (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE usergroupe ADD CONSTRAINT FK_6C439BE5FE54D947 FOREIGN KEY (group_id) REFERENCES groupe (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE usermodo ADD CONSTRAINT FK_D162D6C4A76ED395 FOREIGN KEY (user_id) REFERENCES useraccount (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE usermodo ADD CONSTRAINT FK_D162D6C459FDD7AB FOREIGN KEY (niveau01_id) REFERENCES niveau01 (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE SCHEMA public');
$this->addSql('DROP SEQUENCE Blog_id_seq CASCADE');
$this->addSql('DROP SEQUENCE Page_id_seq CASCADE');
$this->addSql('DROP SEQUENCE audit_id_seq CASCADE');
$this->addSql('DROP SEQUENCE blogtype_id_seq CASCADE');
$this->addSql('DROP SEQUENCE child_id_seq CASCADE');
$this->addSql('DROP SEQUENCE childheader_id_seq CASCADE');
$this->addSql('DROP SEQUENCE cron_id_seq CASCADE');
$this->addSql('DROP SEQUENCE groupe_id_seq CASCADE');
$this->addSql('DROP SEQUENCE menu_id_seq CASCADE');
$this->addSql('DROP SEQUENCE menuchild_id_seq CASCADE');
$this->addSql('DROP SEQUENCE niveau01_id_seq CASCADE');
$this->addSql('DROP SEQUENCE niveau02_id_seq CASCADE');
$this->addSql('DROP SEQUENCE niveau03_id_seq CASCADE');
$this->addSql('DROP SEQUENCE niveau04_id_seq CASCADE');
$this->addSql('DROP SEQUENCE pagetype_id_seq CASCADE');
$this->addSql('DROP SEQUENCE pin_id_seq CASCADE');
$this->addSql('DROP SEQUENCE registration_id_seq CASCADE');
$this->addSql('DROP SEQUENCE useraccount_id_seq CASCADE');
$this->addSql('DROP SEQUENCE usergroupe_id_seq CASCADE');
$this->addSql('DROP SEQUENCE usermodo_id_seq CASCADE');
$this->addSql('DROP SEQUENCE whitelist_id_seq CASCADE');
$this->addSql('ALTER TABLE Blog DROP CONSTRAINT FK_6027FE7DA930CED1');
$this->addSql('ALTER TABLE Page DROP CONSTRAINT FK_B438191E53A99D0E');
$this->addSql('ALTER TABLE child DROP CONSTRAINT FK_22B35429DAE07E97');
$this->addSql('ALTER TABLE child DROP CONSTRAINT FK_22B35429C4663E4');
$this->addSql('ALTER TABLE child DROP CONSTRAINT FK_22B35429552AAF4C');
$this->addSql('ALTER TABLE childtag DROP CONSTRAINT FK_B8AAB0A822B35429');
$this->addSql('ALTER TABLE childtag DROP CONSTRAINT FK_B8AAB0A8389B783');
$this->addSql('ALTER TABLE childpin DROP CONSTRAINT FK_EA62AD822B35429');
$this->addSql('ALTER TABLE childpin DROP CONSTRAINT FK_EA62AD8B5852DF3');
$this->addSql('ALTER TABLE childheader DROP CONSTRAINT FK_B74CE6CEDD62C21B');
$this->addSql('ALTER TABLE groupe DROP CONSTRAINT FK_4B98C217E3C61F9');
$this->addSql('ALTER TABLE menuchild DROP CONSTRAINT FK_B7D9D47CCCD7E912');
$this->addSql('ALTER TABLE menuchild DROP CONSTRAINT FK_B7D9D47CDAE07E97');
$this->addSql('ALTER TABLE menuchild DROP CONSTRAINT FK_B7D9D47CC4663E4');
$this->addSql('ALTER TABLE menuchild DROP CONSTRAINT FK_B7D9D47CA930CED1');
$this->addSql('ALTER TABLE menuchild DROP CONSTRAINT FK_B7D9D47C53A99D0E');
$this->addSql('ALTER TABLE niveau02 DROP CONSTRAINT FK_F4F52F9959FDD7AB');
$this->addSql('ALTER TABLE niveau03 DROP CONSTRAINT FK_83F21F0F4B487845');
$this->addSql('ALTER TABLE niveau04 DROP CONSTRAINT FK_1D968AACF3F41F20');
$this->addSql('ALTER TABLE registration DROP CONSTRAINT FK_62A8A7A759FDD7AB');
$this->addSql('ALTER TABLE registration DROP CONSTRAINT FK_62A8A7A74B487845');
$this->addSql('ALTER TABLE registration DROP CONSTRAINT FK_62A8A7A7F3F41F20');
$this->addSql('ALTER TABLE registration DROP CONSTRAINT FK_62A8A7A76E232799');
$this->addSql('ALTER TABLE useraccount DROP CONSTRAINT FK_E157AA1A59FDD7AB');
$this->addSql('ALTER TABLE useraccount DROP CONSTRAINT FK_E157AA1A4B487845');
$this->addSql('ALTER TABLE useraccount DROP CONSTRAINT FK_E157AA1AF3F41F20');
$this->addSql('ALTER TABLE useraccount DROP CONSTRAINT FK_E157AA1A6E232799');
$this->addSql('ALTER TABLE usergroupe DROP CONSTRAINT FK_6C439BE5A76ED395');
$this->addSql('ALTER TABLE usergroupe DROP CONSTRAINT FK_6C439BE5FE54D947');
$this->addSql('ALTER TABLE usermodo DROP CONSTRAINT FK_D162D6C4A76ED395');
$this->addSql('ALTER TABLE usermodo DROP CONSTRAINT FK_D162D6C459FDD7AB');
$this->addSql('DROP TABLE Blog');
$this->addSql('DROP TABLE Page');
$this->addSql('DROP TABLE audit');
$this->addSql('DROP TABLE blogtype');
$this->addSql('DROP TABLE child');
$this->addSql('DROP TABLE childtag');
$this->addSql('DROP TABLE childpin');
$this->addSql('DROP TABLE childheader');
$this->addSql('DROP TABLE childtype');
$this->addSql('DROP TABLE config');
$this->addSql('DROP TABLE cron');
$this->addSql('DROP TABLE groupe');
$this->addSql('DROP TABLE menu');
$this->addSql('DROP TABLE menuchild');
$this->addSql('DROP TABLE niveau01');
$this->addSql('DROP TABLE niveau02');
$this->addSql('DROP TABLE niveau03');
$this->addSql('DROP TABLE niveau04');
$this->addSql('DROP TABLE pagetype');
$this->addSql('DROP TABLE pin');
$this->addSql('DROP TABLE registration');
$this->addSql('DROP TABLE tag');
$this->addSql('DROP TABLE useraccount');
$this->addSql('DROP TABLE usergroupe');
$this->addSql('DROP TABLE usermodo');
$this->addSql('DROP TABLE whitelist');
$this->addSql('DROP TABLE messenger_messages');
}
}