• Resolved madis

    (@madis)


    Hi,

    I keep getting reg flags next to my custom tables. I double-checked the naming convention requirements but didn’t have any luck.

    Can it be a false positive, or there’s an error in my code?

    
    $test_table_name = $wpdb->prefix . 'test';
    $sql = "CREATE TABLE $test_table_name ( 	
    	entry_id BIGINT(20) PRIMARY KEY NOT NULL AUTO_INCREMENT,
    	test_col VARCHAR(15) NOT NULL
    	) $charset_collate;
    ";
    dbDelta($sql);
    
Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Hi @madis,

    If all table in a database are showing a red flag, it is probably your database name which is causing this issue. So what is the name of your database?

    Thanks,
    Peter

    Thread Starter madis

    (@madis)

    Hi @peterschulznl,

    Thanks for the quick reply.

    It’s wp_test in that case. That was the first thing I checked…

    Screenshot (2021-11-02-wpda.png)

    Thread Starter madis

    (@madis)

    Perhaps the reason is that the type value is “base table”? My setup requires that the table creation takes place in a function in the custom theme.

    Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Hi @madis,

    Look like I misunderstood your question. Only the wp_test is showing a red flag, I thought all your table were. Can you add an image showing all columns of wp_test in the Data Explorer? What version of the plugin are you using?

    Thanks,
    Peter

    Thread Starter madis

    (@madis)

    Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Thanks!

    No idea why, but you should not see that red flag. Can you send me your create table script? You can copy it from the SQL tab.

    Thanks,
    Peter

    Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Hi @madis,

    Just wanted to let you kknow…

    Tomorrow version 5.0.1 will be released. This update solves the red flag issue for database names starting witrh a number. ??

    Thank you very much for your input!

    Best regards,
    Peter

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Red flag notification on custom tables’ is closed to new replies.