diff --git a/migrations/Version20210519090349.php b/migrations/Version20210519090349.php new file mode 100644 index 0000000..ef91083 --- /dev/null +++ b/migrations/Version20210519090349.php @@ -0,0 +1,31 @@ +addSql('ALTER TABLE offering ALTER COLUMN description DROP NOT NULL'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql('CREATE SCHEMA public'); + } +} diff --git a/src/Form/OfferingFormType.php b/src/Form/OfferingFormType.php index 79728fd..1cfae36 100644 --- a/src/Form/OfferingFormType.php +++ b/src/Form/OfferingFormType.php @@ -5,6 +5,7 @@ namespace App\Form; use App\Entity\Offering; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type\FileType; +use Symfony\Component\Form\Extension\Core\Type\TextType; use Symfony\Component\Form\Extension\Core\Type\SubmitType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\OptionsResolver\OptionsResolver; @@ -16,8 +17,12 @@ class OfferingFormType extends AbstractType { $builder ->add('title') - ->add('zipCode') - ->add('description') + ->add('zipCode', TextType::class, [ + 'label' => 'ZIP', + ]) + ->add('description', null, [ + 'required' => false, + ]) ->add('photo', FileType::class, [ 'required' => false, 'mapped' => false,