<?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 Version20210601122627 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 collectif_data ADD status DOUBLE PRECISION NOT NULL'); | |||||
$this->addSql('ALTER TABLE configuration ADD dev_alias VARCHAR(255) DEFAULT NULL'); | |||||
$this->addSql('ALTER TABLE dreams ADD thematic_id INT DEFAULT NULL, ADD description LONGTEXT NOT NULL'); | |||||
$this->addSql('ALTER TABLE dreams ADD CONSTRAINT FK_FD07CC0A2395FCED FOREIGN KEY (thematic_id) REFERENCES thematic (id)'); | |||||
$this->addSql('CREATE INDEX IDX_FD07CC0A2395FCED ON dreams (thematic_id)'); | |||||
$this->addSql('ALTER TABLE individual_data ADD status DOUBLE PRECISION NOT NULL'); | |||||
$this->addSql('ALTER TABLE projects_boost ADD thematic_id INT DEFAULT NULL, ADD description LONGTEXT NOT NULL'); | |||||
$this->addSql('ALTER TABLE projects_boost ADD CONSTRAINT FK_C3E573562395FCED FOREIGN KEY (thematic_id) REFERENCES thematic (id)'); | |||||
$this->addSql('CREATE INDEX IDX_C3E573562395FCED ON projects_boost (thematic_id)'); | |||||
$this->addSql('ALTER TABLE projects_inspiring ADD thematic_id INT DEFAULT NULL, ADD description LONGTEXT NOT NULL'); | |||||
$this->addSql('ALTER TABLE projects_inspiring ADD CONSTRAINT FK_E60CAEC62395FCED FOREIGN KEY (thematic_id) REFERENCES thematic (id)'); | |||||
$this->addSql('CREATE INDEX IDX_E60CAEC62395FCED ON projects_inspiring (thematic_id)'); | |||||
$this->addSql('ALTER TABLE revolts ADD thematic_id INT DEFAULT NULL, ADD description LONGTEXT NOT NULL'); | |||||
$this->addSql('ALTER TABLE revolts ADD CONSTRAINT FK_68E7DC9F2395FCED FOREIGN KEY (thematic_id) REFERENCES thematic (id)'); | |||||
$this->addSql('CREATE INDEX IDX_68E7DC9F2395FCED ON revolts (thematic_id)'); | |||||
} | |||||
public function down(Schema $schema): void | |||||
{ | |||||
// this down() migration is auto-generated, please modify it to your needs | |||||
$this->addSql('ALTER TABLE collectif_data DROP status'); | |||||
$this->addSql('ALTER TABLE configuration DROP dev_alias'); | |||||
$this->addSql('ALTER TABLE dreams DROP FOREIGN KEY FK_FD07CC0A2395FCED'); | |||||
$this->addSql('DROP INDEX IDX_FD07CC0A2395FCED ON dreams'); | |||||
$this->addSql('ALTER TABLE dreams DROP thematic_id, DROP description'); | |||||
$this->addSql('ALTER TABLE individual_data DROP status'); | |||||
$this->addSql('ALTER TABLE projects_boost DROP FOREIGN KEY FK_C3E573562395FCED'); | |||||
$this->addSql('DROP INDEX IDX_C3E573562395FCED ON projects_boost'); | |||||
$this->addSql('ALTER TABLE projects_boost DROP thematic_id, DROP description'); | |||||
$this->addSql('ALTER TABLE projects_inspiring DROP FOREIGN KEY FK_E60CAEC62395FCED'); | |||||
$this->addSql('DROP INDEX IDX_E60CAEC62395FCED ON projects_inspiring'); | |||||
$this->addSql('ALTER TABLE projects_inspiring DROP thematic_id, DROP description'); | |||||
$this->addSql('ALTER TABLE revolts DROP FOREIGN KEY FK_68E7DC9F2395FCED'); | |||||
$this->addSql('DROP INDEX IDX_68E7DC9F2395FCED ON revolts'); | |||||
$this->addSql('ALTER TABLE revolts DROP thematic_id, DROP description'); | |||||
} | |||||
} |
<?php | |||||
namespace Lc\SovBundle\Doctrine\Extension; | |||||
interface DescriptionProjectInterface | |||||
{ | |||||
} |
<?php | |||||
namespace Lc\SovBundle\Doctrine\Extension; | |||||
use Doctrine\ORM\Mapping as ORM; | |||||
trait DescriptionProjectTrait | |||||
{ | |||||
/** | |||||
* @ORM\Column(type="text") | |||||
*/ | |||||
private $description; | |||||
/** | |||||
* @ORM\ManyToOne(targetEntity=Thematic::class) | |||||
*/ | |||||
private $thematic; | |||||
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; | |||||
} | |||||
} |
use Doctrine\Common\Collections\ArrayCollection; | use Doctrine\Common\Collections\ArrayCollection; | ||||
use Doctrine\Common\Collections\Collection; | use Doctrine\Common\Collections\Collection; | ||||
use Doctrine\ORM\Mapping as ORM; | use Doctrine\ORM\Mapping as ORM; | ||||
use Lc\SovBundle\Doctrine\Extension\StatusInterface; | |||||
use Lc\SovBundle\Doctrine\Extension\StatusTrait; | |||||
/** | /** | ||||
* @ORM\Entity(repositoryClass=CollectifDataRepository::class) | * @ORM\Entity(repositoryClass=CollectifDataRepository::class) | ||||
*/ | */ | ||||
class CollectifData | |||||
class CollectifData implements StatusInterface | |||||
{ | { | ||||
use StatusTrait; | |||||
/** | /** | ||||
* @ORM\Id | * @ORM\Id | ||||
* @ORM\GeneratedValue | * @ORM\GeneratedValue |
use App\Repository\ConfigurationRepository; | use App\Repository\ConfigurationRepository; | ||||
use Doctrine\ORM\Mapping as ORM; | use Doctrine\ORM\Mapping as ORM; | ||||
use Lc\SovBundle\Doctrine\Extension\DevAliasInterface; | |||||
use Lc\SovBundle\Doctrine\Extension\DevAliasTrait; | |||||
/** | /** | ||||
* @ORM\Entity(repositoryClass=ConfigurationRepository::class) | * @ORM\Entity(repositoryClass=ConfigurationRepository::class) | ||||
*/ | */ | ||||
class Configuration | |||||
class Configuration implements DevAliasInterface | |||||
{ | { | ||||
use DevAliasTrait; | |||||
/** | /** | ||||
* @ORM\Id | * @ORM\Id | ||||
* @ORM\GeneratedValue | * @ORM\GeneratedValue |
use App\Repository\DreamsRepository; | use App\Repository\DreamsRepository; | ||||
use Doctrine\ORM\Mapping as ORM; | use Doctrine\ORM\Mapping as ORM; | ||||
use Lc\SovBundle\Doctrine\Extension\DescriptionProjectInterface; | |||||
use Lc\SovBundle\Doctrine\Extension\DescriptionProjectTrait; | |||||
/** | /** | ||||
* @ORM\Entity(repositoryClass=DreamsRepository::class) | * @ORM\Entity(repositoryClass=DreamsRepository::class) | ||||
*/ | */ | ||||
class Dreams | |||||
class Dreams implements DescriptionProjectInterface | |||||
{ | { | ||||
use DescriptionProjectTrait; | |||||
/** | /** | ||||
* @ORM\Id | * @ORM\Id | ||||
* @ORM\GeneratedValue | * @ORM\GeneratedValue |
use Doctrine\Common\Collections\ArrayCollection; | use Doctrine\Common\Collections\ArrayCollection; | ||||
use Doctrine\Common\Collections\Collection; | use Doctrine\Common\Collections\Collection; | ||||
use Doctrine\ORM\Mapping as ORM; | use Doctrine\ORM\Mapping as ORM; | ||||
use Lc\SovBundle\Doctrine\Extension\StatusInterface; | |||||
use Lc\SovBundle\Doctrine\Extension\StatusTrait; | |||||
/** | /** | ||||
* @ORM\Entity(repositoryClass=IndividualDataRepository::class) | * @ORM\Entity(repositoryClass=IndividualDataRepository::class) | ||||
*/ | */ | ||||
class IndividualData | |||||
class IndividualData implements StatusInterface | |||||
{ | { | ||||
use StatusTrait; | |||||
/** | /** | ||||
* @ORM\Id | * @ORM\Id | ||||
* @ORM\GeneratedValue | * @ORM\GeneratedValue |
use App\Repository\ProjectsBoostRepository; | use App\Repository\ProjectsBoostRepository; | ||||
use Doctrine\ORM\Mapping as ORM; | use Doctrine\ORM\Mapping as ORM; | ||||
use Lc\SovBundle\Doctrine\Extension\DescriptionProjectInterface; | |||||
use Lc\SovBundle\Doctrine\Extension\DescriptionProjectTrait; | |||||
/** | /** | ||||
* @ORM\Entity(repositoryClass=ProjectsBoostRepository::class) | * @ORM\Entity(repositoryClass=ProjectsBoostRepository::class) | ||||
*/ | */ | ||||
class ProjectsBoost | |||||
class ProjectsBoost implements DescriptionProjectInterface | |||||
{ | { | ||||
use DescriptionProjectTrait; | |||||
/** | /** | ||||
* @ORM\Id | * @ORM\Id | ||||
* @ORM\GeneratedValue | * @ORM\GeneratedValue |
use App\Repository\ProjectsInspiringRepository; | use App\Repository\ProjectsInspiringRepository; | ||||
use Doctrine\ORM\Mapping as ORM; | use Doctrine\ORM\Mapping as ORM; | ||||
use Lc\SovBundle\Doctrine\Extension\DescriptionProjectInterface; | |||||
use Lc\SovBundle\Doctrine\Extension\DescriptionProjectTrait; | |||||
/** | /** | ||||
* @ORM\Entity(repositoryClass=ProjectsInspiringRepository::class) | * @ORM\Entity(repositoryClass=ProjectsInspiringRepository::class) | ||||
*/ | */ | ||||
class ProjectsInspiring | |||||
class ProjectsInspiring implements DescriptionProjectInterface | |||||
{ | { | ||||
use DescriptionProjectTrait; | |||||
/** | /** | ||||
* @ORM\Id | * @ORM\Id | ||||
* @ORM\GeneratedValue | * @ORM\GeneratedValue |
use App\Repository\RevoltsRepository; | use App\Repository\RevoltsRepository; | ||||
use Doctrine\ORM\Mapping as ORM; | use Doctrine\ORM\Mapping as ORM; | ||||
use Lc\SovBundle\Doctrine\Extension\DescriptionProjectInterface; | |||||
use Lc\SovBundle\Doctrine\Extension\DescriptionProjectTrait; | |||||
/** | /** | ||||
* @ORM\Entity(repositoryClass=RevoltsRepository::class) | * @ORM\Entity(repositoryClass=RevoltsRepository::class) | ||||
*/ | */ | ||||
class Revolts | |||||
class Revolts implements DescriptionProjectInterface | |||||
{ | { | ||||
use DescriptionProjectTrait; | |||||
/** | /** | ||||
* @ORM\Id | * @ORM\Id | ||||
* @ORM\GeneratedValue | * @ORM\GeneratedValue |
use Doctrine\Common\Collections\Collection; | use Doctrine\Common\Collections\Collection; | ||||
use Doctrine\ORM\Mapping as ORM; | use Doctrine\ORM\Mapping as ORM; | ||||
use Lc\SovBundle\Doctrine\Pattern\AbstractFullEntity; | use Lc\SovBundle\Doctrine\Pattern\AbstractFullEntity; | ||||
use App\Entity\File\File ; | |||||
use App\Entity\File\File; | |||||
use App\Repository\PageRepository; | use App\Repository\PageRepository; | ||||
/** | /** | ||||
*/ | */ | ||||
class Page extends AbstractFullEntity | class Page extends AbstractFullEntity | ||||
{ | { | ||||
/** | |||||
* @ORM\Id | |||||
* @ORM\GeneratedValue | |||||
* @ORM\Column(type="integer") | |||||
*/ | |||||
private $id; | |||||
/** | |||||
* @ORM\ManyToOne(targetEntity=File::class, cascade={"persist", "remove"}) | |||||
*/ | |||||
private $image; | |||||
/** | |||||
* @ORM\ManyToMany(targetEntity=File::class, cascade={"persist", "remove"}, orphanRemoval=true) | |||||
* @ORM\OrderBy({"position" = "ASC"}) | |||||
*/ | |||||
private $gallery; | |||||
/** | |||||
* @ORM\ManyToOne(targetEntity=File::class, cascade={"persist"}) | |||||
*/ | |||||
private $file; | |||||
public function __construct() | |||||
{ | |||||
$this->gallery = new ArrayCollection(); | |||||
} | |||||
public function __toString() | |||||
{ | |||||
return $this->title; | |||||
} | |||||
/** | |||||
* @ORM\Id | |||||
* @ORM\GeneratedValue | |||||
* @ORM\Column(type="integer") | |||||
*/ | |||||
private $id; | |||||
/** | |||||
* @ORM\ManyToOne(targetEntity=File::class, cascade={"persist", "remove"}) | |||||
*/ | |||||
private $image; | |||||
/** | |||||
* @ORM\ManyToMany(targetEntity=File::class, cascade={"persist", "remove"}, orphanRemoval=true) | |||||
* @ORM\OrderBy({"position" = "ASC"}) | |||||
*/ | |||||
private $gallery; | |||||
/** | |||||
* @ORM\ManyToOne(targetEntity=File::class, cascade={"persist"}) | |||||
*/ | |||||
private $file; | |||||
public function __construct() | |||||
{ | |||||
$this->gallery = new ArrayCollection(); | |||||
} | |||||
public function __toString() | |||||
{ | |||||
return $this->title; | |||||
} | |||||
public function getId(): ?int | public function getId(): ?int | ||||
{ | |||||
return $this->id; | |||||
} | |||||
public function getImage(): ?File | |||||
{ | |||||
return $this->image; | |||||
{ | |||||
return $this->id; | |||||
} | |||||
public function getImage(): ?File | |||||
{ | |||||
return $this->image; | |||||
} | |||||
public function setImage(?File $image): self | |||||
{ | |||||
$this->image = $image; | |||||
return $this; | |||||
} | |||||
/** | |||||
* @return Collection|File[] | |||||
*/ | |||||
public function getGallery(): Collection | |||||
{ | |||||
return $this->gallery; | |||||
} | |||||
public function addGallery(File $gallery): self | |||||
{ | |||||
if (!$this->gallery->contains($gallery)) { | |||||
$this->gallery[] = $gallery; | |||||
} | } | ||||
public function setImage(?File $image): self | |||||
{ | |||||
$this->image = $image; | |||||
return $this; | |||||
} | |||||
return $this; | |||||
} | |||||
public function removeGallery(File $gallery): self | |||||
{ | |||||
$this->gallery->removeElement($gallery); | |||||
/** | |||||
* @return Collection|File[] | |||||
*/ | |||||
public function getGallery(): Collection | |||||
{ | |||||
return $this->gallery; | |||||
} | |||||
return $this; | |||||
} | |||||
public function addGallery(File $gallery): self | |||||
{ | |||||
if (!$this->gallery->contains($gallery)) { | |||||
$this->gallery[] = $gallery; | |||||
} | |||||
public function getFile(): ?File | |||||
{ | |||||
return $this->file; | |||||
} | |||||
return $this; | |||||
} | |||||
public function setFile(?File $file): self | |||||
{ | |||||
$this->file = $file; | |||||
public function removeGallery(File $gallery): self | |||||
{ | |||||
$this->gallery->removeElement($gallery); | |||||
return $this; | |||||
} | |||||
public function getFile(): ?File | |||||
{ | |||||
return $this->file; | |||||
} | |||||
public function setFile(?File $file): self | |||||
{ | |||||
$this->file = $file; | |||||
return $this; | |||||
} | |||||
return $this; | |||||
} | |||||
} | } |
"symfony/polyfill-php80": { | "symfony/polyfill-php80": { | ||||
"version": "v1.22.1" | "version": "v1.22.1" | ||||
}, | }, | ||||
"symfony/polyfill-php81": { | |||||
"version": "v1.23.0" | |||||
}, | |||||
"symfony/polyfill-uuid": { | "symfony/polyfill-uuid": { | ||||
"version": "v1.22.1" | "version": "v1.22.1" | ||||
}, | }, |