diff --git a/app/migrations/Version20220324104150.php b/app/migrations/Version20220324104150.php new file mode 100644 index 0000000..e1d6722 --- /dev/null +++ b/app/migrations/Version20220324104150.php @@ -0,0 +1,31 @@ +addSql('ALTER TABLE client_insurance ADD created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\''); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql('ALTER TABLE client_insurance DROP created_at'); + } +} diff --git a/app/src/Controller/ClientController.php b/app/src/Controller/ClientController.php index 2cd0178..aa378c4 100755 --- a/app/src/Controller/ClientController.php +++ b/app/src/Controller/ClientController.php @@ -81,7 +81,7 @@ public function create(UserInterface $user, Request $request): Response $entityManager->persist($client); $entityManager->flush(); - return $this->redirectToRoute('client'); + return $this->redirectToRoute('homepage'); } return $this->render('client/create.html.twig', [ @@ -156,7 +156,7 @@ public function edit(Request $request, $id, UserInterface $user): Response $entityManager = $this->getDoctrine()->getManager(); $entityManager->flush(); - return $this->redirectToRoute('client'); + return $this->redirectToRoute('homepage'); } return $this->render('client/edit.html.twig', [ diff --git a/app/src/Entity/ClientInsurance.php b/app/src/Entity/ClientInsurance.php index 7b718a3..7a54334 100755 --- a/app/src/Entity/ClientInsurance.php +++ b/app/src/Entity/ClientInsurance.php @@ -7,7 +7,7 @@ /** * @ORM\Entity(repositoryClass=ClientInsuranceRepository::class) - * @ORM\HasLyfecycleCallbaks() + * @ORM\HasLifecycleCallbacks() */ class ClientInsurance {