[GH-ISSUE #1048] dovecot: dict(12777): Error: sql dict: commit failed: Field 'messages' doesn't have a default value #880

Closed
opened 2026-02-27 11:14:04 +03:00 by kerem · 8 comments
Owner

Originally created by @cerw on GitHub (Feb 26, 2017).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/1048

Impacted versions

  • Modoboa: 1.6.3
  • installer used: Yes
  • Webserver: Nginx

Steps to reproduce

Getting this lots in logs?

dovecot: dict(12777): Error: sql dict: commit failed: Field 'messages' doesn't have a default value

Random in mail.log

Current behavior

Expected behavior

Video/Screenshot link (optional)

Originally created by @cerw on GitHub (Feb 26, 2017). Original GitHub issue: https://github.com/modoboa/modoboa/issues/1048 # Impacted versions * Modoboa: 1.6.3 * installer used: Yes * Webserver: Nginx # Steps to reproduce Getting this lots in logs? ``` dovecot: dict(12777): Error: sql dict: commit failed: Field 'messages' doesn't have a default value ``` Random in mail.log # Current behavior # Expected behavior # Video/Screenshot link (optional)
kerem 2026-02-27 11:14:04 +03:00
Author
Owner

@tonioo commented on GitHub (Feb 27, 2017):

What is your database?

On 26/02/2017 13:49, Petr Cervenka wrote:

Impacted versions

  • Modoboa: 1.6.3
  • installer used: Yes
  • Webserver: Nginx

Steps to reproduce

Getting this lots in logs?

|dovecot: dict(12777): Error: sql dict: commit failed: Field 'messages'
doesn't have a default value |

Random in mail.log

Current behavior

Expected behavior

Video/Screenshot link (optional)


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/modoboa/modoboa/issues/1048, or mute the thread
https://github.com/notifications/unsubscribe-auth/AAgc7oeWK5UDeL5fKhx6yPRNiIsh6gaIks5rgXTxgaJpZM4MMX5N.

<!-- gh-comment-id:282656099 --> @tonioo commented on GitHub (Feb 27, 2017): What is your database? On 26/02/2017 13:49, Petr Cervenka wrote: > > > Impacted versions > > * Modoboa: 1.6.3 > * installer used: Yes > * Webserver: Nginx > > > Steps to reproduce > > Getting this lots in logs? > > |dovecot: dict(12777): Error: sql dict: commit failed: Field 'messages' > doesn't have a default value | > > Random in mail.log > > > Current behavior > > > Expected behavior > > > Video/Screenshot link (optional) > > — > You are receiving this because you are subscribed to this thread. > Reply to this email directly, view it on GitHub > <https://github.com/modoboa/modoboa/issues/1048>, or mute the thread > <https://github.com/notifications/unsubscribe-auth/AAgc7oeWK5UDeL5fKhx6yPRNiIsh6gaIks5rgXTxgaJpZM4MMX5N>. >
Author
Owner

@tonioo commented on GitHub (Mar 2, 2017):

@cerw ping

<!-- gh-comment-id:283611373 --> @tonioo commented on GitHub (Mar 2, 2017): @cerw ping
Author
Owner

@tonioo commented on GitHub (Apr 20, 2017):

Closed for inactivity.

<!-- gh-comment-id:295654210 --> @tonioo commented on GitHub (Apr 20, 2017): Closed for inactivity.
Author
Owner

@cerw commented on GitHub (May 15, 2017):

Sorry for some reason github did not send me email :(

mysql 5.7.18

<!-- gh-comment-id:301373026 --> @cerw commented on GitHub (May 15, 2017): Sorry for some reason github did not send me email :( mysql 5.7.18
Author
Owner

@cerw commented on GitHub (May 16, 2017):

@tonioo

<!-- gh-comment-id:301655966 --> @cerw commented on GitHub (May 16, 2017): @tonioo
Author
Owner

@tonioo commented on GitHub (May 16, 2017):

@cerw That's strange because the corresponding django model defines a default value for this field...
Can you try to run the following SQL statement please:

ALTER TABLE admin_quota ALTER COLUMN messages SET DEFAULT 0;
<!-- gh-comment-id:301730706 --> @tonioo commented on GitHub (May 16, 2017): @cerw That's strange because the corresponding django model defines a default value for this field... Can you try to run the following SQL statement please: ```sql ALTER TABLE admin_quota ALTER COLUMN messages SET DEFAULT 0; ```
Author
Owner

@cerw commented on GitHub (May 16, 2017):

The date got there via postfixadmin migration script? could this cause it?

I ran the SQL alter command and it seem to fix the messages now i have for bytes.

May 16 19:50:52 modoboa dovecot: dict(22930): Error: sql dict: commit failed: Field 'bytes' doesn't have a default value
M
<!-- gh-comment-id:301758146 --> @cerw commented on GitHub (May 16, 2017): The date got there via postfixadmin migration script? could this cause it? I ran the SQL alter command and it seem to fix the messages now i have for bytes. ``` May 16 19:50:52 modoboa dovecot: dict(22930): Error: sql dict: commit failed: Field 'bytes' doesn't have a default value M ```
Author
Owner

@cerw commented on GitHub (May 16, 2017):

After I set default to bytes its seem to be fixed. Thanks

<!-- gh-comment-id:301759428 --> @cerw commented on GitHub (May 16, 2017): After I set default to `bytes` its seem to be fixed. Thanks
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/modoboa-modoboa#880
No description provided.