Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class IncreaseQuotationReferenceLength extends AbstractMigration
{
public function change(): void
{
$this->table('afup_compta_facture_details')
->changeColumn('ref', 'string', [
'limit' => 50,
'null' => false,
])
->update();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class ReduceProduitReferenceLength extends AbstractMigration
{
public function change(): void
{
$this->table('compta_produit')
->changeColumn('reference', 'string', [
'limit' => 50,
'null' => false,
])
->update();
}
}
2 changes: 1 addition & 1 deletion sources/AppBundle/Accounting/Entity/Produit.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Produit
#[ORM\Column]
public ?int $id = null;

#[ORM\Column(length: 255, nullable: false)]
#[ORM\Column(length: 50, nullable: false)]
public string $reference;

#[ORM\Column(length: 255, nullable: false)]
Expand Down
2 changes: 1 addition & 1 deletion sources/AppBundle/Accounting/Form/InvoicingRowType.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
'constraints' => [
new Assert\NotBlank(),
new Assert\Type(type: 'string'),
new Assert\Length(max: 20),
new Assert\Length(max: 50),
],
])->add('designation', TextareaType::class, [
'label' => 'Désignation',
Expand Down
2 changes: 1 addition & 1 deletion sources/AppBundle/Accounting/Form/ProduitType.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
'constraints' => [
new Assert\NotBlank(),
new Assert\Type('string'),
new Assert\Length(max: 20),
new Assert\Length(max: 50),
],
])->add('designation', TextareaType::class, [
'label' => 'Désignation',
Expand Down
Loading