Added migration from old Database to new database.

This commit is contained in:
Jan Böhmer 2019-08-06 13:18:29 +02:00
parent 42c8222e35
commit 2f39ac90a2
19 changed files with 391 additions and 31 deletions

View file

@ -30,9 +30,13 @@ use Symfony\Component\Intl\Exception\NotImplementedException;
* Class Attachment.
*
* @ORM\Entity
* @ORM\Table(name="attachements")
* @ORM\Table(name="`attachements`")
* @ORM\InheritanceType("SINGLE_TABLE")
* @ORM\DiscriminatorColumn(name="class_name", type="string")
* @ORM\DiscriminatorMap({"PartDB\Part" = "PartAttachment", "Part" = "PartAttachment"})
*
*/
class Attachment extends NamedDBElement
abstract class Attachment extends NamedDBElement
{
/**
* @var bool
@ -47,9 +51,7 @@ class Attachment extends NamedDBElement
protected $filename;
/**
* //TODO
* //@ORM\ManyToOne(targetEntity="AttachmentContainingDBElement", inversedBy="attachment")
* //@ORM\JoinColumn(name="element_id", referencedColumnName="id").
* ORM mapping is done in sub classes (like PartAttachment)
*/
protected $element;