forge->addField([ 'group_id' => [ 'type' => 'INT', 'constraint' => 11, 'unsigned' => true, ], 'user_id' => [ 'type' => 'INT', 'constraint' => 11, 'unsigned' => true, ], ]); $this->forge->addKey(['group_id', 'user_id'], true); $this->forge->createTable($config->dbTableGroupToUser, true); } //-------------------------------------------------------------------- /** * Drops Table * * @return void */ public function down() { $config = new AauthConfig(); $this->forge->dropTable($config->dbTableGroupToUser, true); } }