Compare commits
4 Commits
v1.7.0
...
44d69db560
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
44d69db560 | ||
|
|
453065c9f0 | ||
|
|
eb85323116 | ||
|
|
2dfa501a65 |
Submodule Inventory_frontend updated: a98ab8c275...efd0fbe407
@@ -23,8 +23,8 @@ final class Version20260302103003 extends AbstractMigration
|
|||||||
$this->addSql('COMMENT ON COLUMN comments.created_at IS \'(DC2Type:datetime_immutable)\'');
|
$this->addSql('COMMENT ON COLUMN comments.created_at IS \'(DC2Type:datetime_immutable)\'');
|
||||||
$this->addSql('COMMENT ON COLUMN comments.updated_at IS \'(DC2Type:datetime_immutable)\'');
|
$this->addSql('COMMENT ON COLUMN comments.updated_at IS \'(DC2Type:datetime_immutable)\'');
|
||||||
|
|
||||||
// Piece: remove unique on name
|
// Piece: remove unique constraint on name (it's a constraint, not just an index)
|
||||||
$this->addSql('DROP INDEX IF EXISTS uniq_b92d74725e237e06');
|
$this->addSql('ALTER TABLE pieces DROP CONSTRAINT IF EXISTS uniq_b92d74725e237e06');
|
||||||
|
|
||||||
// Deduplicate piece references before adding unique constraint
|
// Deduplicate piece references before adding unique constraint
|
||||||
$this->addSql("
|
$this->addSql("
|
||||||
|
|||||||
28
migrations/Version20260302120000.php
Normal file
28
migrations/Version20260302120000.php
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace DoctrineMigrations;
|
||||||
|
|
||||||
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Doctrine\Migrations\AbstractMigration;
|
||||||
|
|
||||||
|
final class Version20260302120000 extends AbstractMigration
|
||||||
|
{
|
||||||
|
public function getDescription(): string
|
||||||
|
{
|
||||||
|
return 'Add description column to pieces and composants tables';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function up(Schema $schema): void
|
||||||
|
{
|
||||||
|
$this->addSql('ALTER TABLE pieces ADD COLUMN IF NOT EXISTS description TEXT DEFAULT NULL');
|
||||||
|
$this->addSql('ALTER TABLE composants ADD COLUMN IF NOT EXISTS description TEXT DEFAULT NULL');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down(Schema $schema): void
|
||||||
|
{
|
||||||
|
$this->addSql('ALTER TABLE pieces DROP COLUMN IF EXISTS description');
|
||||||
|
$this->addSql('ALTER TABLE composants DROP COLUMN IF EXISTS description');
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -55,6 +55,10 @@ class Composant
|
|||||||
#[Groups(['composant:read'])]
|
#[Groups(['composant:read'])]
|
||||||
private ?string $reference = null;
|
private ?string $reference = null;
|
||||||
|
|
||||||
|
#[ORM\Column(type: Types::TEXT, nullable: true)]
|
||||||
|
#[Groups(['composant:read'])]
|
||||||
|
private ?string $description = null;
|
||||||
|
|
||||||
#[ORM\Column(type: Types::DECIMAL, precision: 10, scale: 2, nullable: true)]
|
#[ORM\Column(type: Types::DECIMAL, precision: 10, scale: 2, nullable: true)]
|
||||||
#[Groups(['composant:read'])]
|
#[Groups(['composant:read'])]
|
||||||
private ?string $prix = null;
|
private ?string $prix = null;
|
||||||
@@ -175,6 +179,18 @@ class Composant
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getDescription(): ?string
|
||||||
|
{
|
||||||
|
return $this->description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setDescription(?string $description): static
|
||||||
|
{
|
||||||
|
$this->description = $description;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
public function getPrix(): ?string
|
public function getPrix(): ?string
|
||||||
{
|
{
|
||||||
return $this->prix;
|
return $this->prix;
|
||||||
|
|||||||
@@ -57,6 +57,10 @@ class Piece
|
|||||||
#[Groups(['piece:read'])]
|
#[Groups(['piece:read'])]
|
||||||
private ?string $reference = null;
|
private ?string $reference = null;
|
||||||
|
|
||||||
|
#[ORM\Column(type: Types::TEXT, nullable: true)]
|
||||||
|
#[Groups(['piece:read'])]
|
||||||
|
private ?string $description = null;
|
||||||
|
|
||||||
#[ORM\Column(type: Types::DECIMAL, precision: 10, scale: 2, nullable: true)]
|
#[ORM\Column(type: Types::DECIMAL, precision: 10, scale: 2, nullable: true)]
|
||||||
#[Groups(['piece:read'])]
|
#[Groups(['piece:read'])]
|
||||||
private ?string $prix = null;
|
private ?string $prix = null;
|
||||||
@@ -177,6 +181,18 @@ class Piece
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getDescription(): ?string
|
||||||
|
{
|
||||||
|
return $this->description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setDescription(?string $description): static
|
||||||
|
{
|
||||||
|
$this->description = $description;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
public function getPrix(): ?string
|
public function getPrix(): ?string
|
||||||
{
|
{
|
||||||
return $this->prix;
|
return $this->prix;
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ use ApiPlatform\Metadata\ApiResource;
|
|||||||
use ApiPlatform\Metadata\Delete;
|
use ApiPlatform\Metadata\Delete;
|
||||||
use ApiPlatform\Metadata\Get;
|
use ApiPlatform\Metadata\Get;
|
||||||
use ApiPlatform\Metadata\GetCollection;
|
use ApiPlatform\Metadata\GetCollection;
|
||||||
|
use ApiPlatform\Metadata\Patch;
|
||||||
use ApiPlatform\Metadata\Post;
|
use ApiPlatform\Metadata\Post;
|
||||||
use ApiPlatform\Metadata\Put;
|
use ApiPlatform\Metadata\Put;
|
||||||
use App\Repository\SiteRepository;
|
use App\Repository\SiteRepository;
|
||||||
@@ -28,6 +29,7 @@ use Symfony\Component\Validator\Constraints as Assert;
|
|||||||
new GetCollection(security: "is_granted('ROLE_VIEWER')"),
|
new GetCollection(security: "is_granted('ROLE_VIEWER')"),
|
||||||
new Post(security: "is_granted('ROLE_GESTIONNAIRE')"),
|
new Post(security: "is_granted('ROLE_GESTIONNAIRE')"),
|
||||||
new Put(security: "is_granted('ROLE_GESTIONNAIRE')"),
|
new Put(security: "is_granted('ROLE_GESTIONNAIRE')"),
|
||||||
|
new Patch(security: "is_granted('ROLE_GESTIONNAIRE')"),
|
||||||
new Delete(security: "is_granted('ROLE_GESTIONNAIRE')"),
|
new Delete(security: "is_granted('ROLE_GESTIONNAIRE')"),
|
||||||
],
|
],
|
||||||
paginationClientItemsPerPage: true,
|
paginationClientItemsPerPage: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user