$table3->addColumns([$column31, $column32]); $table4 = new Table('blog_tag'); $table4->setDescription('The list of tags'); $table4->setNamespace('Blog'); $table4->setPackage('Acme.Blog'); $table4->addColumns([$column41, $column42]); $table5 = new Table('blog_post_tag'); $table5->setNamespace('Blog'); $table5->setPackage('Acme.Blog'); $table5->setCrossRef(); $table5->addColumns([$column51, $column52]); $table5->addForeignKeys([$fkPostTag, $fkTagPost]); $table6 = new Table('cms_page'); $table6->setPhpName('Page'); $table6->setNamespace('Cms'); $table6->setBaseClass('Acme\\Model\\PublicationActiveRecord'); $table6->setPackage('Acme.Cms'); $table6->addColumns([$column61, $column62, $column63, $column64]); $table6->addIndex($pageContentFulltextIdx); $table6->addVendorInfo(new VendorInfo('mysql', ['Engine' => 'MyISAM'])); /* Database */ $database = new Database('acme_blog', new MysqlPlatform()); $database->setSchema('acme'); $database->setTablePrefix('acme_'); $database->setNamespace('Acme\\Model'); $database->setBaseClass('Acme\\Model\\ActiveRecord'); $database->setPackage('Acme'); $database->setHeavyIndexing(); $database->addVendorInfo(new VendorInfo('mysql', ['Engine' => 'InnoDB', 'Charset' => 'utf8'])); $database->addTables([$table1, $table2, $table3, $table4, $table5, $table6]); return $database;
public function testSetHeavyIndexing() { $database = new Database(); $database->setHeavyIndexing(true); $this->assertTrue($database->isHeavyIndexing()); $this->assertTrue($database->getHeavyIndexing()); }