Title: Database missing column &#8216;new&#8217;
Last modified: November 18, 2021

---

# Database missing column ‘new’

 *  Resolved [damiantk](https://wordpress.org/support/users/damiantk/)
 * (@damiantk)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/database-missing-column-new/)
 * After one of the updates, an error with the text
 *     ```
       [Unknown column 'new' in 'where clause']
       SELECT * FROM wp_aioseo_notifications WHERE 1 = 1 AND <code>dismissed</code> = 0 AND <code>new</code> = 1
       ```
   
 *  appeared in wp-admin.
    I found in app/Common/Main/Updates.php file, lines 180
   +, you are creating aioseo_notifications table without column “new”, but in app/
   Common/Models/Notification.php you are using “new” in where clause. Is this the
   cause of the error message Im getting?

Viewing 1 replies (of 1 total)

 *  [Naveen Kharwar](https://wordpress.org/support/users/naveenkharwar/)
 * (@naveenkharwar)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/database-missing-column-new/#post-15086686)
 * Hi [@damiantk](https://wordpress.org/support/users/damiantk/),
 * Thank you for reporting the issue.
 * Can you please add the below code on your website using the [Code Snippet](https://wordpress.org/plugins/code%20snippet)
   plugin? After adding the code, refresh your WordPress Dashboard and it will fix
   the problem for you.
 *     ```
       add_action( 'admin_init', 'aioseo_add_notification_new_column' );
       function aioseo_add_notification_new_column() {
       	if ( ! method_exists( 'AIOSEO\Plugin\Common\Main\Updates', 'addNotificationsNewColumn' ) || ! method_exists( 'AIOSEO\Plugin\Common\Utils\Database', 'columnExists' ) ) {
       		return;
       	}
       	if ( ! aioseo()->db->columnExists( 'aioseo_notifications', 'new' ) ) {
       		aioseo()->updates->addNotificationsNewColumn();
       	}
       }
       ```
   
 * Please note, you don’t need to keep this code on your site so after refreshing
   your dashboard please remove it.
 * If this doesn’t fix the problem, contact us from our website using the form below
   and we can take a closer look:
 * [https://aioseo.com/contact/](https://aioseo.com/contact/)
 * Thanks!

Viewing 1 replies (of 1 total)

The topic ‘Database missing column ‘new’’ is closed to new replies.

 * ![](https://ps.w.org/all-in-one-seo-pack/assets/icon.svg?rev=2443290)
 * [All in One SEO – Powerful SEO Plugin to Boost SEO Rankings & Increase Traffic](https://wordpress.org/plugins/all-in-one-seo-pack/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/all-in-one-seo-pack/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/all-in-one-seo-pack/)
 * [Active Topics](https://wordpress.org/support/plugin/all-in-one-seo-pack/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/all-in-one-seo-pack/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/all-in-one-seo-pack/reviews/)

## Tags

 * [database](https://wordpress.org/support/topic-tag/database/)
 * [table](https://wordpress.org/support/topic-tag/table/)

 * 1 reply
 * 2 participants
 * Last reply from: [Naveen Kharwar](https://wordpress.org/support/users/naveenkharwar/)
 * Last activity: [4 years, 6 months ago](https://wordpress.org/support/topic/database-missing-column-new/#post-15086686)
 * Status: resolved