Let me start by saying I know there are other posts about this, and a lot of documentation is available for this topic, but none of these resources have helped me to solve my issue.
I'm a beginner at creating plugins for WordPress. This is my first, so I'm sure I'm missing something simple, but everything I have read says this should be working.
The plugin activates no problem, my menu shows up, etc. But the following does not create a new table in the database. I removed everything besides the id just to see if it was the SQL syntax, still no results.
register_activation_hook( __FILE__, 'pf_rb_install' );
function pf_rb_install() {
global $wpdb;
$table_name = $wpdb->prefix . 'pf_parts';
$charset_collate = $wpdb->get_charset_collate();
$sql = "CREATE TABLE '$table_name' (
id mediumint(9) NOT NULL AUTO_INCREMENT,
PRIMARY KEY (id)
) $charset_collate;";
require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
dbDelta( $sql );
}
Thanks in advance for any help.