#26116 closed Bug (fixed)
schema's test_alter_implicit_id_to_explicit warns/errors with "Field 'id' doesn't have a default value" on MySQL
| Reported by: | Tim Graham | Owned by: | Tim Graham |
|---|---|---|---|
| Component: | Migrations | Version: | 1.8 |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Accepted | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
On MySQL 5.6.27:
django/db/backends/mysql/base.py:112: Warning: Field 'id' doesn't have a default value return self.cursor.execute(query, args)
On MySQL 5.7.10:
IntegrityError: (1364, "Field 'id' doesn't have a default value")
(I guess MySQL is getting stricter about data integrity.)
I'm not sure if it's something Django can fix or if the test should be skipped on MySQL.
Change History (4)
comment:1 by , 10 years ago
| Has patch: | set |
|---|---|
| Owner: | changed from to |
| Status: | new → assigned |
| Triage Stage: | Unreviewed → Accepted |
Note:
See TracTickets
for help on using tickets.
I think correcting the test should be sufficient: PR