diff --git a/migrations/Version20260408135722.php b/migrations/Version20260408135722.php new file mode 100644 index 0000000..c0e09ef --- /dev/null +++ b/migrations/Version20260408135722.php @@ -0,0 +1,31 @@ +addSql('ALTER TABLE environment ADD database_name VARCHAR(255) DEFAULT NULL'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql('ALTER TABLE environment DROP database_name'); + } +} diff --git a/src/Entity/Environment.php b/src/Entity/Environment.php index 761ed13..476a157 100644 --- a/src/Entity/Environment.php +++ b/src/Entity/Environment.php @@ -73,6 +73,10 @@ class Environment #[Groups(['env:read', 'env:write', 'app:detail'])] private ?string $appUrl = null; + #[ORM\Column(length: 255, nullable: true)] + #[Groups(['env:read', 'env:write', 'app:detail'])] + private ?string $databaseName = null; + #[ORM\ManyToOne(targetEntity: Application::class, inversedBy: 'environments')] #[ORM\JoinColumn(nullable: false)] private ?Application $application = null; @@ -155,6 +159,18 @@ class Environment return $this; } + public function getDatabaseName(): ?string + { + return $this->databaseName; + } + + public function setDatabaseName(?string $databaseName): static + { + $this->databaseName = $databaseName; + + return $this; + } + public function getApplication(): ?Application { return $this->application;