Commit 3692ddea by Sgelberger

Delete Version20190211162828.php

parent 0e35e454
<?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 Version20190211162828 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($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('CREATE TABLE flux (id INT AUTO_INCREMENT NOT NULL, user_id INT DEFAULT NULL, adherent_id INT DEFAULT NULL, prestataire_id INT DEFAULT NULL, prestataire_dest_id INT DEFAULT NULL, comptoir_id INT DEFAULT NULL, groupe_id INT DEFAULT NULL, siege_id INT DEFAULT NULL, type VARCHAR(200) NOT NULL, parenttype VARCHAR(20) NOT NULL, montant NUMERIC(7, 2) NOT NULL, moyen VARCHAR(100) NOT NULL, reference VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, discr VARCHAR(255) NOT NULL, INDEX IDX_7252313AA76ED395 (user_id), INDEX IDX_7252313A25F06C53 (adherent_id), INDEX IDX_7252313ABE3DB2B7 (prestataire_id), INDEX IDX_7252313AECEF536E (prestataire_dest_id), INDEX IDX_7252313AAEB0C1F5 (comptoir_id), INDEX IDX_7252313A7A45358C (groupe_id), INDEX IDX_7252313ABF006E8B (siege_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE = InnoDB');
$this->addSql('ALTER TABLE flux ADD CONSTRAINT FK_7252313AA76ED395 FOREIGN KEY (user_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE flux ADD CONSTRAINT FK_7252313A25F06C53 FOREIGN KEY (adherent_id) REFERENCES adherent (id)');
$this->addSql('ALTER TABLE flux ADD CONSTRAINT FK_7252313ABE3DB2B7 FOREIGN KEY (prestataire_id) REFERENCES prestataire (id)');
$this->addSql('ALTER TABLE flux ADD CONSTRAINT FK_7252313AECEF536E FOREIGN KEY (prestataire_dest_id) REFERENCES prestataire (id)');
$this->addSql('ALTER TABLE flux ADD CONSTRAINT FK_7252313AAEB0C1F5 FOREIGN KEY (comptoir_id) REFERENCES comptoir (id)');
$this->addSql('ALTER TABLE flux ADD CONSTRAINT FK_7252313A7A45358C FOREIGN KEY (groupe_id) REFERENCES groupe (id)');
$this->addSql('ALTER TABLE flux ADD CONSTRAINT FK_7252313ABF006E8B FOREIGN KEY (siege_id) REFERENCES siege (id)');
$this->addSql('DROP TABLE cotisation');
$this->addSql('DROP TABLE transaction');
$this->addSql('DROP TABLE transfert');
}
public function down(Schema $schema) : void
{
// this down() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('CREATE TABLE cotisation (id INT AUTO_INCREMENT NOT NULL, siege_id INT DEFAULT NULL, user_id INT DEFAULT NULL, adherent_id INT DEFAULT NULL, prestataire_id INT DEFAULT NULL, moyen VARCHAR(100) NOT NULL COLLATE utf8_general_ci, annee INT NOT NULL, debut DATE NOT NULL, fin DATE NOT NULL, recu TINYINT(1) NOT NULL, type VARCHAR(200) NOT NULL COLLATE utf8_general_ci, parenttype VARCHAR(20) NOT NULL COLLATE utf8_general_ci, montant NUMERIC(7, 2) NOT NULL, reference VARCHAR(255) DEFAULT NULL COLLATE utf8_general_ci, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, discr VARCHAR(255) NOT NULL COLLATE utf8_general_ci, INDEX IDX_AE64D2ED25F06C53 (adherent_id), INDEX IDX_AE64D2EDA76ED395 (user_id), INDEX IDX_AE64D2EDBF006E8B (siege_id), INDEX IDX_AE64D2EDBE3DB2B7 (prestataire_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('CREATE TABLE transaction (id INT AUTO_INCREMENT NOT NULL, user_id INT DEFAULT NULL, adherent_id INT DEFAULT NULL, prestataire_id INT DEFAULT NULL, prestataire_dest_id INT DEFAULT NULL, moyen VARCHAR(100) NOT NULL COLLATE utf8_general_ci, type VARCHAR(200) NOT NULL COLLATE utf8_general_ci, parenttype VARCHAR(20) NOT NULL COLLATE utf8_general_ci, montant NUMERIC(7, 2) NOT NULL, reference VARCHAR(255) DEFAULT NULL COLLATE utf8_general_ci, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, discr VARCHAR(255) NOT NULL COLLATE utf8_general_ci, INDEX IDX_723705D1BE3DB2B7 (prestataire_id), INDEX IDX_723705D125F06C53 (adherent_id), INDEX IDX_723705D1A76ED395 (user_id), INDEX IDX_723705D1ECEF536E (prestataire_dest_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('CREATE TABLE transfert (id INT AUTO_INCREMENT NOT NULL, user_id INT DEFAULT NULL, comptoir_id INT DEFAULT NULL, adherent_id INT DEFAULT NULL, groupe_id INT DEFAULT NULL, prestataire_id INT DEFAULT NULL, siege_id INT DEFAULT NULL, moyen VARCHAR(100) NOT NULL COLLATE utf8_general_ci, type VARCHAR(200) NOT NULL COLLATE utf8_general_ci, parenttype VARCHAR(20) NOT NULL COLLATE utf8_general_ci, montant NUMERIC(7, 2) NOT NULL, reference VARCHAR(255) DEFAULT NULL COLLATE utf8_general_ci, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, discr VARCHAR(255) NOT NULL COLLATE utf8_general_ci, INDEX IDX_1E4EACBB25F06C53 (adherent_id), INDEX IDX_1E4EACBBBF006E8B (siege_id), INDEX IDX_1E4EACBBAEB0C1F5 (comptoir_id), INDEX IDX_1E4EACBBBE3DB2B7 (prestataire_id), INDEX IDX_1E4EACBBA76ED395 (user_id), INDEX IDX_1E4EACBB7A45358C (groupe_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('ALTER TABLE cotisation ADD CONSTRAINT FK_AE64D2ED25F06C53 FOREIGN KEY (adherent_id) REFERENCES adherent (id)');
$this->addSql('ALTER TABLE cotisation ADD CONSTRAINT FK_AE64D2EDA76ED395 FOREIGN KEY (user_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE cotisation ADD CONSTRAINT FK_AE64D2EDBE3DB2B7 FOREIGN KEY (prestataire_id) REFERENCES prestataire (id)');
$this->addSql('ALTER TABLE cotisation ADD CONSTRAINT FK_AE64D2EDBF006E8B FOREIGN KEY (siege_id) REFERENCES siege (id)');
$this->addSql('ALTER TABLE transaction ADD CONSTRAINT FK_723705D125F06C53 FOREIGN KEY (adherent_id) REFERENCES adherent (id)');
$this->addSql('ALTER TABLE transaction ADD CONSTRAINT FK_723705D1A76ED395 FOREIGN KEY (user_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE transaction ADD CONSTRAINT FK_723705D1BE3DB2B7 FOREIGN KEY (prestataire_id) REFERENCES prestataire (id)');
$this->addSql('ALTER TABLE transaction ADD CONSTRAINT FK_723705D1ECEF536E FOREIGN KEY (prestataire_dest_id) REFERENCES prestataire (id)');
$this->addSql('ALTER TABLE transfert ADD CONSTRAINT FK_1E4EACBB25F06C53 FOREIGN KEY (adherent_id) REFERENCES adherent (id)');
$this->addSql('ALTER TABLE transfert ADD CONSTRAINT FK_1E4EACBB7A45358C FOREIGN KEY (groupe_id) REFERENCES groupe (id)');
$this->addSql('ALTER TABLE transfert ADD CONSTRAINT FK_1E4EACBBA76ED395 FOREIGN KEY (user_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE transfert ADD CONSTRAINT FK_1E4EACBBAEB0C1F5 FOREIGN KEY (comptoir_id) REFERENCES comptoir (id)');
$this->addSql('ALTER TABLE transfert ADD CONSTRAINT FK_1E4EACBBBE3DB2B7 FOREIGN KEY (prestataire_id) REFERENCES prestataire (id)');
$this->addSql('ALTER TABLE transfert ADD CONSTRAINT FK_1E4EACBBBF006E8B FOREIGN KEY (siege_id) REFERENCES siege (id)');
$this->addSql('DROP TABLE flux');
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment