I have installed WPMU Multi DB in my WordPress multisite

Hi,

I have installed WPMU Multi DB in my WordPress multisite setup.
I need to create a table and it doesn't seem to be working.
My query is as follows.

$sql = "
CREATE TABLE IF NOT EXISTS {$GLOBALS['wpdb']->prefix}test_table (
id INT UNSIGNED NOT NULL auto_increment,
ip INT UNSIGNED DEFAULT 0,
other_ip INT UNSIGNED DEFAULT 0,
CONSTRAINT PRIMARY KEY (id)
)";

dbDelta($sql);

I have included the upgrade.php WordPress file before calling dbDelta(). But, this is not creating the required table.

Even when I try to do a insert into that table with the following code, it is not getting inserted.

$wpdb->insert($wpdb->prefix.'test_table', array('id' => '','ip' => '1212','other_ip' => '2'));

Also, I have to create this table for every blog. SO what I do is, call the switch_to_blog() and run this part of sql query.

Please let me know if there are any mistakes or how I can proceed with this setup..

Thanks.