Title: Sql error
Last modified: August 28, 2025

---

# Sql error

 *  [NAROLLES](https://wordpress.org/support/users/narolles/)
 * (@narolles)
 * [8 months, 2 weeks ago](https://wordpress.org/support/topic/sql-error-59/)
 * Hello,
 * When activating WP-Polls, I noticed an SQL error in the logs:
 * `WordPress database error Invalid default value for 'pollq_id' for query ALTER
   TABLE wp_pollsq ALTER COLUMN ``pollq_id` SET DEFAULT ''
 * The issue is that the plugin tries to set `DEFAULT ''` on an `AUTO_INCREMENT`
   column.
   However, in MySQL/MariaDB, an AUTO_INCREMENT column cannot have a default
   value.
 * The correct definition should be:
 * `pollq_id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY`
 * without a DEFAULT.
 * This does not break functionality if the tables are already created correctly,
   but it clutters the error logs and may block installation on some environments.
 * Please consider fixing this in a future release.
 * Best regards,
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fsql-error-59%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

The topic ‘Sql error’ is closed to new replies.

 * ![](https://ps.w.org/wp-polls/assets/icon.svg?rev=977996)
 * [WP-Polls](https://wordpress.org/plugins/wp-polls/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-polls/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-polls/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-polls/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-polls/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-polls/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [NAROLLES](https://wordpress.org/support/users/narolles/)
 * Last activity: [8 months, 2 weeks ago](https://wordpress.org/support/topic/sql-error-59/)
 * Status: not resolved