Title: Not null fields without default values
Last modified: August 21, 2016

---

# Not null fields without default values

 *  Resolved [dimagsv](https://wordpress.org/support/users/dimagsv/)
 * (@dimagsv)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/not-null-fields-without-default-values/)
 * Ignored, deleted fields in wpmcleaner table must have default values.
 * [http://wordpress.org/plugins/wp-media-cleaner/](http://wordpress.org/plugins/wp-media-cleaner/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [Jordy Meow](https://wordpress.org/support/users/tigroumeow/)
 * (@tigroumeow)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/not-null-fields-without-default-values/#post-4025160)
 * Sorry, I just came across this thread now. Can you elaborate?
 *  Thread Starter [dimagsv](https://wordpress.org/support/users/dimagsv/)
 * (@dimagsv)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/not-null-fields-without-default-values/#post-4025161)
 * Fields ‘ignored’ and ‘deleted’ in table wp_wpmcleaner do not have default values.
   
   I’ve got many errors like this: [09-Jan-2014 09:44:22 UTC] База данных WordPress
   возвратила ошибку Field ‘ignored’ doesn’t have a default value в ответ на запрос
   INSERT INTO `wp_wpmcleaner` (`time`,`type`,`path`,`size`,`issue`) VALUES (‘2014-
   01-09 12:44:22′,’0′,’dreamwork/1_uploadfolder/thumb/v28-resized.jpg’,’2615′,’
   NO_MEDIA’), выполненный do_action(‘wp_ajax_wpmc_scan_do’), call_user_func_array,
   wpmc_wp_ajax_wpmc_scan_do, wpmc_check_file
 *  [fbtrcm](https://wordpress.org/support/users/fbtrcm/)
 * (@fbtrcm)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/not-null-fields-without-default-values/#post-4025165)
 * Hi,
 * I seem to have the same issue : [http://wordpress.org/support/topic/erreur-dans-la-base-de-donnees?replies=3](http://wordpress.org/support/topic/erreur-dans-la-base-de-donnees?replies=3)
 * In my version of MySQL (5.5.24 – MySQL Community Server (GPL)), if you have a
   field/column set to NOT NULL you should set a default value to the field/column
   in case a tuple is inserted with no value for that field/column.
 * I read the table create script in function wpmc_activate().
    It shows no default
   value set for the following fields/columns:
    - type TINYINT(1) NOT NULL,
    - ignored BIT NOT NULL,
    - deleted BIT NOT NULL,
    - issue TINYTEXT NOT NULL,
 * So, when I want to add an image to the table, it generates an error such as shown
   in this post or the other.
 * You’ve got two solutions in this case.
    First, you can mend the faultive table.
   Or the other, you change the INSERT query in adding default values to these fields.
 * For my part, i added a default value 0 to the BIT columns and all worked fine.
 *  Plugin Author [Jordy Meow](https://wordpress.org/support/users/tigroumeow/)
 * (@tigroumeow)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/not-null-fields-without-default-values/#post-4025170)
 * Thanks! I will update my code in the next release.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Not null fields without default values’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-media-cleaner.svg)
 * [WP Media Cleaner](https://wordpress.org/plugins/wp-media-cleaner/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-media-cleaner/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-media-cleaner/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-media-cleaner/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-media-cleaner/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-media-cleaner/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [Jordy Meow](https://wordpress.org/support/users/tigroumeow/)
 * Last activity: [12 years, 2 months ago](https://wordpress.org/support/topic/not-null-fields-without-default-values/#post-4025170)
 * Status: resolved