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