Specify the table type/storage engine in Doctrine 2

后端 未结 3 858
悲哀的现实
悲哀的现实 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条回答
  •  一生所求
    2021-02-05 16:22

    If you're using doctrine2 migrations ..

    $table = $schema->createTable('user');
    $table->addColumn('id', 'integer');
    $table->addOption('engine' , 'MyISAM');
    $table->setPrimaryKey(array('id'));
    

提交回复
热议问题