#32425: MySQL Schema is different about the same class definitions. (depends on
create table vs alter table)
----------------------------+--------------------------------------
Reporter: Jordan Bae | Owner: Jordan Bae
Type: Bug | Status: assigned
Component: Migrations | Version: master
Severity: Normal | Resolution:
Keywords: mysql | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------+--------------------------------------
Changes (by Simon Charette):
* stage: Unreviewed => Accepted
Comment:
[https://github.com/django/django/compare/master...charettes:ticket-32425
Confirmed that this is an issue on MySQL and not on SQLite and Postgres]
but I didn't bother on Oracle.
The weird part is that MySQL still reports the column as `NULL`able
through introspection; while SQLite and Postgres consider that `NULL`
implies a ''fallback'' `DEFAULT NULL` while MySQL's doesn't.
Thanks for the report Jordan, feel free to include regression test from
the above branch in your PR.
I think it should be fine to define
`BaseDatabaseSchemaEditor.sql_alter_column_no_default_null =
sql_alter_column_no_default` and adjust its `_alter_column_default_sql`
method to branch of `field.null` to avoid the override in MySQL's schema
editor. Chances are that some other backends behave the same way and a lot
of this code is likely to change anyway when #470 lands.
--
Ticket URL: <https://code.djangoproject.com/ticket/32425#comment:4>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/067.d75e187a8d9dccbe4bb85f4079ea339b%40djangoproject.com.