Situation:
Some of the fields in the database lost their default values.
Drupal produces errors like
PDOException: SQLSTATE[HY000]: General error: 1364 Field 'users' doesn't have a default value: INSERT INTO {node} (vid, type, language, title, uid, status, created, changed, promote, sticky) VALUES ...
Solutions:
Fast method
Use a tool like phpmyadmin to assign a default value to the column in question.
Manual Method (45 mins to 1.5 hr)
1. Put your site to offline mode.
2. Backup all your databases and files (Important).
3. Install Drupal (same version) to another fresh database. Do NOT uninstall your existing site.
4. Enable the same modules (same version). Run update.php.
5. Open phpMyAdmin and select the new Drupal database.
6. Open phpMyAdmin and select the faulty Drupal database.
7. Select a table (same name in the new database and faulty database).
8. Select 'Structure' tab (on both sides).
9. Compare the 'Name' and 'Default' columns. Pay attention to blanks (in the new database) and 'None' (in the faulty database).
10. If you see any difference in 'Default' values, select 'Change' (Pencil icon) on the faulty database. If no difference, proceed to step 7 or 14.
11. Under 'Default', select 'As defined:'.
12. Select 'Save'.