createTable( 'tax_group_lang', [ 'tax_group_id' => $this->integer() ->notNull(), 'language_id' => $this->integer() ->notNull(), 'title' => $this->string() ->notNull(), 'description' => $this->text(), ] ); $this->createIndex( 'tax_group_lang_tax_group_language_key', 'tax_group_lang', [ 'tax_group_id', 'language_id', ], true ); $this->addForeignKey( 'tax_group_fk', 'tax_group_lang', 'tax_group_id', 'tax_group', 'id', 'CASCADE', 'CASCADE' ); $this->addForeignKey( 'language_fk', 'tax_group_lang', 'language_id', 'language', 'id', 'RESTRICT', 'CASCADE' ); } /** * @inheritdoc */ public function down() { $this->dropTable('tax_group_lang'); } }