How to properly create table in plugin

I see two problems-

$this->table_name = $wpdb->prefix . "b99_pf";

$sql = "CREATE TABLE " . $table_name . " (

$table_name will be undefined, should be $this->table_name

and in your query:

cat tinytext default NOT NULL

I don’t think it’ll like that default in there.

EDIT – to answer your debug question- xdebug, xdebug and netbeans