From the Codex:
Note that the dbDelta function is rather picky, however. For instance: […]
- You must not use any apostrophes or backticks around field names.
$sql = "CREATE TABLE ".TEST_TABLE." (
id INT( 11 ) NOT NULL AUTO_INCREMENT,
title VARCHAR( 100 ) NOT NULL,
description TEXT DEFAULT NULL,
location_id INT( 11 ) NOT NULL,
PRIMARY KEY (id),
FOREIGN KEY (location_id) REFERENCES ".TEST2_TABLE." (id)
);";