Answer the question
In order to leave comments, you need to log in
Symfony migration can't figure out how it works?
Meet Symphony. But I'm confused about migrations. Symphony version 6. Since. then this version will have to be used.
I create entity through make. By default it is created with attributes. I think because 6 version"php": ">=8.0.2",
#[Column(type: 'string', length: 255)]
private $prop;
#[Column(type: 'string', length: 255, options: ["default" => "value"])]
private $prop;
#[Route('/test', name: 'test')]
public function test(EntityManagerInterface $entityManager): Response
{
$test = new Test();
$test->setName('test name'.);
$entityManager->persist($test);
$entityManager->flush();
return new Response(sprintf('New test id #%d', $test->getId()));
}
/**
* @Column(type="string", length=255, options={"default":"value"})
*/
doctrine:migrations:diff
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question