Specify the table type/storage engine in Doctrine 2

后端 未结 3 860
悲哀的现实
悲哀的现实 2021-02-05 15:22

So how can one specify the storage engine to use for a given entity in Doctrine 2?

I\'m creating a table that needs a full text index and only the MyISAM storage engine

3条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-05 15:58

    I'm two years too late, but knowing this is important since it isn't documented for some reason, we have been struggling to achieve this but this is the solution

    /**
     * ReportData
     *
     * @ORM\Table(name="reports_report_data",options={"engine":"MyISAM"})
     * @ORM\Entity(repositoryClass="Jac\ReportGeneratorBundle\Entity\ReportDataRepository")
     */
    class ReportData
    {
    

提交回复
热议问题