charly před 2 roky
rodič
revize
a8be521bb6
7 změnil soubory, kde provedl 178 přidání a 74 odebrání
  1. +9
    -1
      config/packages/doctrine.yaml
  2. +97
    -0
      migrations/Version20211007131528.php
  3. +35
    -0
      migrations/Version20211007134639.php
  4. +35
    -0
      migrations/Version20211007134730.php
  5. +0
    -8
      src/Doctrine/Extension/DescriptionProjectInterface.php
  6. +0
    -63
      src/Doctrine/Extension/DescriptionProjectTrait.php
  7. +2
    -2
      src/Entity/Dream.php

+ 9
- 1
config/packages/doctrine.yaml Zobrazit soubor

@@ -21,4 +21,12 @@ doctrine:
Lc\SovBundle\Model\Site\SiteInterface: App\Entity\Site\Site
Lc\SovBundle\Model\Setting\SiteSettingInterface: App\Entity\Setting\SiteSetting
Lc\SovBundle\Model\Ticket\TicketInterface: App\Entity\Ticket\Ticket
Lc\SovBundle\Model\Ticket\TicketMessageInterface: App\Entity\Ticket\TicketMessage
Lc\SovBundle\Model\Ticket\TicketMessageInterface: App\Entity\Ticket\TicketMessage
Lc\PietroBundle\Model\DreamInterface: App\Entity\Dream
Lc\PietroBundle\Model\IndividualDataInterface: App\Entity\IndividualData
Lc\PietroBundle\Model\ProjectBoostInterface: App\Entity\ProjectBoost
Lc\PietroBundle\Model\ProjectInspiringInterface: App\Entity\ProjectInspiring
Lc\PietroBundle\Model\RevoltInterface: App\Entity\Revolt
Lc\PietroBundle\Model\SubthematicInterface: App\Entity\Subthematic
Lc\PietroBundle\Model\TerritoryInterface: App\Entity\Territory
Lc\PietroBundle\Model\ThematicInterface: App\Entity\Thematic

+ 97
- 0
migrations/Version20211007131528.php Zobrazit soubor

@@ -0,0 +1,97 @@
<?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 Version20211007131528 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('ALTER TABLE dream DROP FOREIGN KEY FK_6A5F004F2395FCED');
$this->addSql('ALTER TABLE dream DROP FOREIGN KEY FK_6A5F004F6C159F58');
$this->addSql('ALTER TABLE dream DROP FOREIGN KEY FK_6A5F004FE2920B1');
$this->addSql('DROP INDEX IDX_6A5F004F6C159F58 ON dream');
$this->addSql('DROP INDEX IDX_6A5F004FE2920B1 ON dream');
$this->addSql('DROP INDEX IDX_6A5F004F2395FCED ON dream');
$this->addSql('ALTER TABLE dream DROP individual_data_id, DROP thematic_id, DROP subthematic_id, DROP description');
$this->addSql('ALTER TABLE individual_data DROP firstname, DROP lastname, DROP email, DROP intro_question, DROP intro_answer');
$this->addSql('ALTER TABLE project_boost DROP FOREIGN KEY FK_45312EF62395FCED');
$this->addSql('ALTER TABLE project_boost DROP FOREIGN KEY FK_45312EF66C159F58');
$this->addSql('ALTER TABLE project_boost DROP FOREIGN KEY FK_45312EF6E2920B1');
$this->addSql('DROP INDEX IDX_45312EF66C159F58 ON project_boost');
$this->addSql('DROP INDEX IDX_45312EF6E2920B1 ON project_boost');
$this->addSql('DROP INDEX IDX_45312EF62395FCED ON project_boost');
$this->addSql('ALTER TABLE project_boost DROP individual_data_id, DROP thematic_id, DROP subthematic_id, DROP description');
$this->addSql('ALTER TABLE project_inspiring DROP FOREIGN KEY FK_2E8C2C2E2395FCED');
$this->addSql('ALTER TABLE project_inspiring DROP FOREIGN KEY FK_2E8C2C2E6C159F58');
$this->addSql('ALTER TABLE project_inspiring DROP FOREIGN KEY FK_2E8C2C2EE2920B1');
$this->addSql('DROP INDEX IDX_2E8C2C2E6C159F58 ON project_inspiring');
$this->addSql('DROP INDEX IDX_2E8C2C2EE2920B1 ON project_inspiring');
$this->addSql('DROP INDEX IDX_2E8C2C2E2395FCED ON project_inspiring');
$this->addSql('ALTER TABLE project_inspiring DROP individual_data_id, DROP thematic_id, DROP subthematic_id, DROP description');
$this->addSql('ALTER TABLE revolt DROP FOREIGN KEY FK_350517872395FCED');
$this->addSql('ALTER TABLE revolt DROP FOREIGN KEY FK_350517876C159F58');
$this->addSql('ALTER TABLE revolt DROP FOREIGN KEY FK_35051787E2920B1');
$this->addSql('DROP INDEX IDX_350517876C159F58 ON revolt');
$this->addSql('DROP INDEX IDX_35051787E2920B1 ON revolt');
$this->addSql('DROP INDEX IDX_350517872395FCED ON revolt');
$this->addSql('ALTER TABLE revolt DROP individual_data_id, DROP thematic_id, DROP subthematic_id, DROP description');
$this->addSql('ALTER TABLE subthematic DROP FOREIGN KEY FK_778C62FB2395FCED');
$this->addSql('DROP INDEX IDX_778C62FB2395FCED ON subthematic');
$this->addSql('ALTER TABLE subthematic DROP thematic_id, DROP name');
$this->addSql('ALTER TABLE territory DROP name');
$this->addSql('ALTER TABLE thematic DROP name');
}

public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE dream ADD individual_data_id INT DEFAULT NULL, ADD thematic_id INT DEFAULT NULL, ADD subthematic_id INT DEFAULT NULL, ADD description LONGTEXT CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`');
$this->addSql('ALTER TABLE dream ADD CONSTRAINT FK_6A5F004F2395FCED FOREIGN KEY (thematic_id) REFERENCES thematic (id)');
$this->addSql('ALTER TABLE dream ADD CONSTRAINT FK_6A5F004F6C159F58 FOREIGN KEY (subthematic_id) REFERENCES subthematic (id)');
$this->addSql('ALTER TABLE dream ADD CONSTRAINT FK_6A5F004FE2920B1 FOREIGN KEY (individual_data_id) REFERENCES individual_data (id)');
$this->addSql('CREATE INDEX IDX_6A5F004F6C159F58 ON dream (subthematic_id)');
$this->addSql('CREATE INDEX IDX_6A5F004FE2920B1 ON dream (individual_data_id)');
$this->addSql('CREATE INDEX IDX_6A5F004F2395FCED ON dream (thematic_id)');
$this->addSql('ALTER TABLE individual_data ADD firstname VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, ADD lastname VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, ADD email VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, ADD intro_question VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, ADD intro_answer VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`');
$this->addSql('ALTER TABLE project_boost ADD individual_data_id INT DEFAULT NULL, ADD thematic_id INT DEFAULT NULL, ADD subthematic_id INT DEFAULT NULL, ADD description LONGTEXT CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`');
$this->addSql('ALTER TABLE project_boost ADD CONSTRAINT FK_45312EF62395FCED FOREIGN KEY (thematic_id) REFERENCES thematic (id)');
$this->addSql('ALTER TABLE project_boost ADD CONSTRAINT FK_45312EF66C159F58 FOREIGN KEY (subthematic_id) REFERENCES subthematic (id)');
$this->addSql('ALTER TABLE project_boost ADD CONSTRAINT FK_45312EF6E2920B1 FOREIGN KEY (individual_data_id) REFERENCES individual_data (id)');
$this->addSql('CREATE INDEX IDX_45312EF66C159F58 ON project_boost (subthematic_id)');
$this->addSql('CREATE INDEX IDX_45312EF6E2920B1 ON project_boost (individual_data_id)');
$this->addSql('CREATE INDEX IDX_45312EF62395FCED ON project_boost (thematic_id)');
$this->addSql('ALTER TABLE project_inspiring ADD individual_data_id INT DEFAULT NULL, ADD thematic_id INT DEFAULT NULL, ADD subthematic_id INT DEFAULT NULL, ADD description LONGTEXT CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`');
$this->addSql('ALTER TABLE project_inspiring ADD CONSTRAINT FK_2E8C2C2E2395FCED FOREIGN KEY (thematic_id) REFERENCES thematic (id)');
$this->addSql('ALTER TABLE project_inspiring ADD CONSTRAINT FK_2E8C2C2E6C159F58 FOREIGN KEY (subthematic_id) REFERENCES subthematic (id)');
$this->addSql('ALTER TABLE project_inspiring ADD CONSTRAINT FK_2E8C2C2EE2920B1 FOREIGN KEY (individual_data_id) REFERENCES individual_data (id)');
$this->addSql('CREATE INDEX IDX_2E8C2C2E6C159F58 ON project_inspiring (subthematic_id)');
$this->addSql('CREATE INDEX IDX_2E8C2C2EE2920B1 ON project_inspiring (individual_data_id)');
$this->addSql('CREATE INDEX IDX_2E8C2C2E2395FCED ON project_inspiring (thematic_id)');
$this->addSql('ALTER TABLE revolt ADD individual_data_id INT DEFAULT NULL, ADD thematic_id INT DEFAULT NULL, ADD subthematic_id INT DEFAULT NULL, ADD description LONGTEXT CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`');
$this->addSql('ALTER TABLE revolt ADD CONSTRAINT FK_350517872395FCED FOREIGN KEY (thematic_id) REFERENCES thematic (id)');
$this->addSql('ALTER TABLE revolt ADD CONSTRAINT FK_350517876C159F58 FOREIGN KEY (subthematic_id) REFERENCES subthematic (id)');
$this->addSql('ALTER TABLE revolt ADD CONSTRAINT FK_35051787E2920B1 FOREIGN KEY (individual_data_id) REFERENCES individual_data (id)');
$this->addSql('CREATE INDEX IDX_350517876C159F58 ON revolt (subthematic_id)');
$this->addSql('CREATE INDEX IDX_35051787E2920B1 ON revolt (individual_data_id)');
$this->addSql('CREATE INDEX IDX_350517872395FCED ON revolt (thematic_id)');
$this->addSql('ALTER TABLE subthematic ADD thematic_id INT DEFAULT NULL, ADD name VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`');
$this->addSql('ALTER TABLE subthematic ADD CONSTRAINT FK_778C62FB2395FCED FOREIGN KEY (thematic_id) REFERENCES thematic (id)');
$this->addSql('CREATE INDEX IDX_778C62FB2395FCED ON subthematic (thematic_id)');
$this->addSql('ALTER TABLE territory ADD name VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`');
$this->addSql('ALTER TABLE thematic ADD name VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`');
}
}

+ 35
- 0
migrations/Version20211007134639.php Zobrazit soubor

@@ -0,0 +1,35 @@
<?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 Version20211007134639 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('ALTER TABLE dream DROP FOREIGN KEY FK_6A5F004FD9275BF1');
$this->addSql('DROP INDEX IDX_6A5F004FD9275BF1 ON dream');
$this->addSql('ALTER TABLE dream DROP collectif_data_id');
}

public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE dream ADD collectif_data_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE dream ADD CONSTRAINT FK_6A5F004FD9275BF1 FOREIGN KEY (collectif_data_id) REFERENCES collectif_data (id)');
$this->addSql('CREATE INDEX IDX_6A5F004FD9275BF1 ON dream (collectif_data_id)');
}
}

+ 35
- 0
migrations/Version20211007134730.php Zobrazit soubor

@@ -0,0 +1,35 @@
<?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 Version20211007134730 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('ALTER TABLE dream ADD collectif_data_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE dream ADD CONSTRAINT FK_6A5F004FD9275BF1 FOREIGN KEY (collectif_data_id) REFERENCES collectif_data (id)');
$this->addSql('CREATE INDEX IDX_6A5F004FD9275BF1 ON dream (collectif_data_id)');
}

public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE dream DROP FOREIGN KEY FK_6A5F004FD9275BF1');
$this->addSql('DROP INDEX IDX_6A5F004FD9275BF1 ON dream');
$this->addSql('ALTER TABLE dream DROP collectif_data_id');
}
}

+ 0
- 8
src/Doctrine/Extension/DescriptionProjectInterface.php Zobrazit soubor

@@ -1,8 +0,0 @@
<?php

namespace App\Doctrine\Extension;

interface DescriptionProjectInterface
{

}

+ 0
- 63
src/Doctrine/Extension/DescriptionProjectTrait.php Zobrazit soubor

@@ -1,63 +0,0 @@
<?php

namespace App\Doctrine\Extension;

use App\Entity\Thematic;
use App\Entity\Subthematic;
use Doctrine\ORM\Mapping as ORM;

trait DescriptionProjectTrait
{

/**
* @ORM\Column(type="text")
*/
private $description;

/**
* @ORM\ManyToOne(targetEntity=Thematic::class)
*/
private $thematic;

/**
* @ORM\ManyToOne(targetEntity=Subthematic::class)
*/
private $subthematic;

public function getDescription(): ?string
{
return $this->description;
}

public function setDescription(string $description): self
{
$this->description = $description;

return $this;
}

public function getThematic(): ?Thematic
{
return $this->thematic;
}

public function setThematic(?Thematic $thematic): self
{
$this->thematic = $thematic;

return $this;
}

public function getSubthematic(): ?Subthematic
{
return $this->subthematic;
}

public function setSubthematic(?Subthematic $subthematic): self
{
$this->subthematic = $subthematic;

return $this;
}

}

+ 2
- 2
src/Entity/Dream.php Zobrazit soubor

@@ -4,12 +4,12 @@ namespace App\Entity;

use Lc\PietroBundle\Repository\Dream\DreamRepository;
use Doctrine\ORM\Mapping as ORM;
use Lc\PietroBundle\Model\Dream as PietroDream;
use Lc\PietroBundle\Model\DreamModel;

/**
* @ORM\Entity(repositoryClass=DreamRepository::class)
*/
class Dream extends PietroDream
class Dream extends DreamModel
{

/**

Načítá se…
Zrušit
Uložit